<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">webpackJsonp([68],{"8tJR":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.__extends=function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},n.d(e,"__assign",function(){return i}),e.__rest=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&amp;&amp;e.indexOf(r)&lt;0&amp;&amp;(n[r]=t[r]);if(null!=t&amp;&amp;"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i&lt;r.length;i++)e.indexOf(r[i])&lt;0&amp;&amp;Object.prototype.propertyIsEnumerable.call(t,r[i])&amp;&amp;(n[r[i]]=t[r[i]]);return n},e.__decorate=function(t,e,n,r){var i,o=arguments.length,a=o&lt;3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&amp;&amp;"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s&gt;=0;s--)(i=t[s])&amp;&amp;(a=(o&lt;3?i(a):o&gt;3?i(e,n,a):i(e,n))||a);return o&gt;3&amp;&amp;a&amp;&amp;Object.defineProperty(e,n,a),a},e.__param=function(t,e){return function(n,r){e(n,r,t)}},e.__metadata=function(t,e){if("object"==typeof Reflect&amp;&amp;"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},e.__awaiter=function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,s)}u((r=r.apply(t,e||[])).next())})},e.__generator=function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&amp;i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&amp;&amp;(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&amp;&amp;(i=2&amp;o[0]?r.return:o[0]?r.throw||((i=r.return)&amp;&amp;i.call(r),0):r.next)&amp;&amp;!(i=i.call(r,o[1])).done)return i;switch(r=0,i&amp;&amp;(o=[2&amp;o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length&gt;0&amp;&amp;i[i.length-1])&amp;&amp;(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&amp;&amp;(!i||o[1]&gt;i[0]&amp;&amp;o[1]&lt;i[3])){a.label=o[1];break}if(6===o[0]&amp;&amp;a.label&lt;i[1]){a.label=i[1],i=o;break}if(i&amp;&amp;a.label&lt;i[2]){a.label=i[2],a.ops.push(o);break}i[2]&amp;&amp;a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&amp;o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},e.__createBinding=function(t,e,n,r){void 0===r&amp;&amp;(r=n);t[r]=e[n]},e.__exportStar=function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||(e[n]=t[n])},e.__values=o,e.__read=a,e.__spread=function(){for(var t=[],e=0;e&lt;arguments.length;e++)t=t.concat(a(arguments[e]));return t},e.__spreadArrays=function(){for(var t=0,e=0,n=arguments.length;e&lt;n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e&lt;n;e++)for(var o=arguments[e],a=0,s=o.length;a&lt;s;a++,i++)r[i]=o[a];return r},e.__await=s,e.__asyncGenerator=function(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(t,e||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(t){i[t]&amp;&amp;(r[t]=function(e){return new Promise(function(n,r){o.push([t,e,n,r])&gt;1||u(t,e)})})}function u(t,e){try{(n=i[t](e)).value instanceof s?Promise.resolve(n.value.v).then(c,h):f(o[0][2],n)}catch(t){f(o[0][3],t)}var n}function c(t){u("next",t)}function h(t){u("throw",t)}function f(t,e){t(e),o.shift(),o.length&amp;&amp;u(o[0][0],o[0][1])}},e.__asyncDelegator=function(t){var e,n;return e={},r("next"),r("throw",function(t){throw t}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){e[r]=t[r]?function(e){return(n=!n)?{value:s(t[r](e)),done:"return"===r}:i?i(e):e}:i}},e.__asyncValues=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=o(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&amp;&amp;function(e){return new Promise(function(r,i){e=t[n](e),function(t,e,n,r){Promise.resolve(r).then(function(e){t({value:e,done:n})},e)}(r,i,e.done,e.value)})}}},e.__makeTemplateObject=function(t,e){Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e;return t},e.__importStar=function(t){if(t&amp;&amp;t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&amp;&amp;(e[n]=t[n]);return e.default=t,e},e.__importDefault=function(t){return t&amp;&amp;t.__esModule?t:{default:t}},e.__classPrivateFieldGet=function(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)},e.__classPrivateFieldSet=function(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n};
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&amp;&amp;(t[n]=e[n])})(t,e)};var i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n&lt;r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&amp;&amp;(t[i]=e[i]);return t}).apply(this,arguments)};function o(t){var e="function"==typeof Symbol&amp;&amp;Symbol.iterator,n=e&amp;&amp;t[e],r=0;if(n)return n.call(t);if(t&amp;&amp;"number"==typeof t.length)return{next:function(){return t&amp;&amp;r&gt;=t.length&amp;&amp;(t=void 0),{value:t&amp;&amp;t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(t,e){var n="function"==typeof Symbol&amp;&amp;t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- &gt;0)&amp;&amp;!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&amp;&amp;!r.done&amp;&amp;(n=o.return)&amp;&amp;n.call(o)}finally{if(i)throw i.error}}return a}function s(t){return this instanceof s?(this.v=t,this):new s(t)}},EEcg:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.__extends=function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},n.d(e,"__assign",function(){return i}),e.__rest=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&amp;&amp;e.indexOf(r)&lt;0&amp;&amp;(n[r]=t[r]);if(null!=t&amp;&amp;"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i&lt;r.length;i++)e.indexOf(r[i])&lt;0&amp;&amp;Object.prototype.propertyIsEnumerable.call(t,r[i])&amp;&amp;(n[r[i]]=t[r[i]]);return n},e.__decorate=function(t,e,n,r){var i,o=arguments.length,a=o&lt;3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&amp;&amp;"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s&gt;=0;s--)(i=t[s])&amp;&amp;(a=(o&lt;3?i(a):o&gt;3?i(e,n,a):i(e,n))||a);return o&gt;3&amp;&amp;a&amp;&amp;Object.defineProperty(e,n,a),a},e.__param=function(t,e){return function(n,r){e(n,r,t)}},e.__metadata=function(t,e){if("object"==typeof Reflect&amp;&amp;"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},e.__awaiter=function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,s)}u((r=r.apply(t,e||[])).next())})},e.__generator=function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&amp;i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&amp;&amp;(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&amp;&amp;(i=2&amp;o[0]?r.return:o[0]?r.throw||((i=r.return)&amp;&amp;i.call(r),0):r.next)&amp;&amp;!(i=i.call(r,o[1])).done)return i;switch(r=0,i&amp;&amp;(o=[2&amp;o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length&gt;0&amp;&amp;i[i.length-1])&amp;&amp;(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&amp;&amp;(!i||o[1]&gt;i[0]&amp;&amp;o[1]&lt;i[3])){a.label=o[1];break}if(6===o[0]&amp;&amp;a.label&lt;i[1]){a.label=i[1],i=o;break}if(i&amp;&amp;a.label&lt;i[2]){a.label=i[2],a.ops.push(o);break}i[2]&amp;&amp;a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&amp;o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},e.__createBinding=function(t,e,n,r){void 0===r&amp;&amp;(r=n);t[r]=e[n]},e.__exportStar=function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||(e[n]=t[n])},e.__values=o,e.__read=a,e.__spread=function(){for(var t=[],e=0;e&lt;arguments.length;e++)t=t.concat(a(arguments[e]));return t},e.__spreadArrays=function(){for(var t=0,e=0,n=arguments.length;e&lt;n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e&lt;n;e++)for(var o=arguments[e],a=0,s=o.length;a&lt;s;a++,i++)r[i]=o[a];return r},e.__await=s,e.__asyncGenerator=function(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(t,e||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(t){i[t]&amp;&amp;(r[t]=function(e){return new Promise(function(n,r){o.push([t,e,n,r])&gt;1||u(t,e)})})}function u(t,e){try{(n=i[t](e)).value instanceof s?Promise.resolve(n.value.v).then(c,h):f(o[0][2],n)}catch(t){f(o[0][3],t)}var n}function c(t){u("next",t)}function h(t){u("throw",t)}function f(t,e){t(e),o.shift(),o.length&amp;&amp;u(o[0][0],o[0][1])}},e.__asyncDelegator=function(t){var e,n;return e={},r("next"),r("throw",function(t){throw t}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){e[r]=t[r]?function(e){return(n=!n)?{value:s(t[r](e)),done:"return"===r}:i?i(e):e}:i}},e.__asyncValues=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=o(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&amp;&amp;function(e){return new Promise(function(r,i){e=t[n](e),function(t,e,n,r){Promise.resolve(r).then(function(e){t({value:e,done:n})},e)}(r,i,e.done,e.value)})}}},e.__makeTemplateObject=function(t,e){Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e;return t},e.__importStar=function(t){if(t&amp;&amp;t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&amp;&amp;(e[n]=t[n]);return e.default=t,e},e.__importDefault=function(t){return t&amp;&amp;t.__esModule?t:{default:t}},e.__classPrivateFieldGet=function(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)},e.__classPrivateFieldSet=function(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n};
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&amp;&amp;(t[n]=e[n])})(t,e)};var i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n&lt;r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&amp;&amp;(t[i]=e[i]);return t}).apply(this,arguments)};function o(t){var e="function"==typeof Symbol&amp;&amp;Symbol.iterator,n=e&amp;&amp;t[e],r=0;if(n)return n.call(t);if(t&amp;&amp;"number"==typeof t.length)return{next:function(){return t&amp;&amp;r&gt;=t.length&amp;&amp;(t=void 0),{value:t&amp;&amp;t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(t,e){var n="function"==typeof Symbol&amp;&amp;t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- &gt;0)&amp;&amp;!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&amp;&amp;!r.done&amp;&amp;(n=o.return)&amp;&amp;n.call(o)}finally{if(i)throw i.error}}return a}function s(t){return this instanceof s?(this.v=t,this):new s(t)}},"GB/M":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){n.d(e,"ErrorCode",function(){return Qn}),n.d(e,"EventType",function(){return $n}),n.d(e,"WebChannel",function(){return Zn}),n.d(e,"XhrIo",function(){return tr}),n.d(e,"createWebChannelTransport",function(){return Yn});
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&amp;&amp;(t[n]=e[n])})(t,e)};function i(t){var e="function"==typeof Symbol&amp;&amp;Symbol.iterator,n=e&amp;&amp;t[e],r=0;if(n)return n.call(t);if(t&amp;&amp;"number"==typeof t.length)return{next:function(){return t&amp;&amp;r&gt;=t.length&amp;&amp;(t=void 0),{value:t&amp;&amp;t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}var o,a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},s=s||{},u=a||self;function c(){}function h(t){var e=typeof t;return"object"!=e?e:t?Array.isArray(t)?"array":e:"null"}function f(t){var e=h(t);return"array"==e||"object"==e&amp;&amp;"number"==typeof t.length}function l(t){var e=typeof t;return"object"==e&amp;&amp;null!=t||"function"==e}var p="closure_uid_"+(1e9*Math.random()&gt;&gt;&gt;0),d=0;function v(t,e,n){return t.call.apply(t.bind,arguments)}function y(t,e,n){if(!t)throw Error();if(2&lt;arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),t.apply(e,n)}}return function(){return t.apply(e,arguments)}}function g(t,e,n){return(g=Function.prototype.bind&amp;&amp;-1!=Function.prototype.bind.toString().indexOf("native code")?v:y).apply(null,arguments)}function m(t,e){var n=Array.prototype.slice.call(arguments,1);return function(){var e=n.slice();return e.push.apply(e,arguments),t.apply(this,e)}}var b=Date.now;function w(t,e){function n(){}n.prototype=e.prototype,t.S=e.prototype,t.prototype=new n,t.prototype.constructor=t}function _(){this.j=this.j,this.i=this.i}_.prototype.j=!1,_.prototype.ja=function(){if(!this.j&amp;&amp;(this.j=!0,this.G(),0))(function(t){Object.prototype.hasOwnProperty.call(t,p)&amp;&amp;t[p]||(t[p]=++d)})(this)},_.prototype.G=function(){if(this.i)for(;this.i.length;)this.i.shift()()};var I=Array.prototype.indexOf?function(t,e){return Array.prototype.indexOf.call(t,e,void 0)}:function(t,e){if("string"==typeof t)return"string"!=typeof e||1!=e.length?-1:t.indexOf(e,0);for(var n=0;n&lt;t.length;n++)if(n in t&amp;&amp;t[n]===e)return n;return-1},E=Array.prototype.forEach?function(t,e,n){Array.prototype.forEach.call(t,e,n)}:function(t,e,n){for(var r=t.length,i="string"==typeof t?t.split(""):t,o=0;o&lt;r;o++)o in i&amp;&amp;e.call(n,i[o],o,t)};function T(t){return Array.prototype.concat.apply([],arguments)}function A(t){var e=t.length;if(0&lt;e){for(var n=Array(e),r=0;r&lt;e;r++)n[r]=t[r];return n}return[]}function S(t){return/^[\s\xa0]*$/.test(t)}var N,O=String.prototype.trim?function(t){return t.trim()}:function(t){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(t)[1]};function k(t,e){return-1!=t.indexOf(e)}function D(t,e){return t&lt;e?-1:t&gt;e?1:0}t:{var P=u.navigator;if(P){var R=P.userAgent;if(R){N=R;break t}}N=""}function x(t,e,n){for(var r in t)e.call(n,t[r],r,t)}function C(t){var e={};for(var n in t)e[n]=t[n];return e}var L="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function j(t,e){for(var n,r,i=1;i&lt;arguments.length;i++){for(n in r=arguments[i])t[n]=r[n];for(var o=0;o&lt;L.length;o++)n=L[o],Object.prototype.hasOwnProperty.call(r,n)&amp;&amp;(t[n]=r[n])}}function M(t){return M[" "](t),t}M[" "]=c;var V,U,F=k(N,"Opera"),q=k(N,"Trident")||k(N,"MSIE"),B=k(N,"Edge"),G=B||q,z=k(N,"Gecko")&amp;&amp;!(k(N.toLowerCase(),"webkit")&amp;&amp;!k(N,"Edge"))&amp;&amp;!(k(N,"Trident")||k(N,"MSIE"))&amp;&amp;!k(N,"Edge"),K=k(N.toLowerCase(),"webkit")&amp;&amp;!k(N,"Edge");function H(){var t=u.document;return t?t.documentMode:void 0}t:{var W="",X=(U=N,z?/rv:([^\);]+)(\)|;)/.exec(U):B?/Edge\/([\d\.]+)/.exec(U):q?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(U):K?/WebKit\/(\S+)/.exec(U):F?/(?:Version)[ \/]?(\S+)/.exec(U):void 0);if(X&amp;&amp;(W=X?X[1]:""),q){var J=H();if(null!=J&amp;&amp;J&gt;parseFloat(W)){V=String(J);break t}}V=W}var Y,Q={};function $(t){return function(t,e){var n=Q;return Object.prototype.hasOwnProperty.call(n,t)?n[t]:n[t]=e(t)}(t,function(){for(var e=0,n=O(String(V)).split("."),r=O(String(t)).split("."),i=Math.max(n.length,r.length),o=0;0==e&amp;&amp;o&lt;i;o++){var a=n[o]||"",s=r[o]||"";do{if(a=/(\d*)(\D*)(.*)/.exec(a)||["","","",""],s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],0==a[0].length&amp;&amp;0==s[0].length)break;e=D(0==a[1].length?0:parseInt(a[1],10),0==s[1].length?0:parseInt(s[1],10))||D(0==a[2].length,0==s[2].length)||D(a[2],s[2]),a=a[3],s=s[3]}while(0==e)}return 0&lt;=e})}if(u.document&amp;&amp;q){var Z=H();Y=Z||(parseInt(V,10)||void 0)}else Y=void 0;var tt=Y,et=!q||9&lt;=Number(tt),nt=q&amp;&amp;!$("9"),rt=function(){if(!u.addEventListener||!Object.defineProperty)return!1;var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}});try{u.addEventListener("test",c,e),u.removeEventListener("test",c,e)}catch(t){}return t}();function it(t,e){this.type=t,this.a=this.target=e,this.defaultPrevented=!1}function ot(t,e){if(it.call(this,t?t.type:""),this.relatedTarget=this.a=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.c=null,t){var n=this.type=t.type,r=t.changedTouches&amp;&amp;t.changedTouches.length?t.changedTouches[0]:null;if(this.target=t.target||t.srcElement,this.a=e,e=t.relatedTarget){if(z){t:{try{M(e.nodeName);var i=!0;break t}catch(t){}i=!1}i||(e=null)}}else"mouseover"==n?e=t.fromElement:"mouseout"==n&amp;&amp;(e=t.toElement);this.relatedTarget=e,r?(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=void 0!==t.clientX?t.clientX:t.pageX,this.clientY=void 0!==t.clientY?t.clientY:t.pageY,this.screenX=t.screenX||0,this.screenY=t.screenY||0),this.button=t.button,this.key=t.key||"",this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.pointerId=t.pointerId||0,this.pointerType="string"==typeof t.pointerType?t.pointerType:at[t.pointerType]||"",this.c=t,t.defaultPrevented&amp;&amp;this.b()}}it.prototype.b=function(){this.defaultPrevented=!0},w(ot,it);var at={2:"touch",3:"pen",4:"mouse"};ot.prototype.b=function(){ot.S.b.call(this);var t=this.c;if(t.preventDefault)t.preventDefault();else if(t.returnValue=!1,nt)try{(t.ctrlKey||112&lt;=t.keyCode&amp;&amp;123&gt;=t.keyCode)&amp;&amp;(t.keyCode=-1)}catch(t){}};var st="closure_listenable_"+(1e6*Math.random()|0),ut=0;function ct(t){t.Y=!0,t.listener=null,t.proxy=null,t.src=null,t.ca=null}function ht(t){this.src=t,this.a={},this.b=0}function ft(t,e){var n=e.type;if(n in t.a){var r,i=t.a[n],o=I(i,e);(r=0&lt;=o)&amp;&amp;Array.prototype.splice.call(i,o,1),r&amp;&amp;(ct(e),0==t.a[n].length&amp;&amp;(delete t.a[n],t.b--))}}function lt(t,e,n,r){for(var i=0;i&lt;t.length;++i){var o=t[i];if(!o.Y&amp;&amp;o.listener==e&amp;&amp;o.capture==!!n&amp;&amp;o.ca==r)return i}return-1}ht.prototype.add=function(t,e,n,r,i){var o=t.toString();(t=this.a[o])||(t=this.a[o]=[],this.b++);var a=lt(t,e,r,i);return-1&lt;a?(e=t[a],n||(e.Z=!1)):((e=new function(t,e,n,r,i){this.listener=t,this.proxy=null,this.src=e,this.type=n,this.capture=!!r,this.ca=i,this.key=++ut,this.Y=this.Z=!1}(e,this.src,o,!!r,i)).Z=n,t.push(e)),e};var pt="closure_lm_"+(1e6*Math.random()|0),dt={};function vt(t,e,n,r,i){if(r&amp;&amp;r.once)return function t(e,n,r,i,o){if(Array.isArray(n)){for(var a=0;a&lt;n.length;a++)t(e,n[a],r,i,o);return null}r=Et(r);return e&amp;&amp;e[st]?e.wa(n,r,l(i)?!!i.capture:!!i,o):yt(e,n,r,!0,i,o)}(t,e,n,r,i);if(Array.isArray(e)){for(var o=0;o&lt;e.length;o++)vt(t,e[o],n,r,i);return null}return n=Et(n),t&amp;&amp;t[st]?t.va(e,n,l(r)?!!r.capture:!!r,i):yt(t,e,n,!1,r,i)}function yt(t,e,n,r,i,o){if(!e)throw Error("Invalid event type");var a=l(i)?!!i.capture:!!i;if(a&amp;&amp;!et)return null;var s=_t(t);if(s||(t[pt]=s=new ht(t)),(n=s.add(e,n,r,a,o)).proxy)return n;if(r=function(){var t=wt,e=et?function(n){return t.call(e.src,e.listener,n)}:function(n){if(!(n=t.call(e.src,e.listener,n)))return n};return e}(),n.proxy=r,r.src=t,r.listener=n,t.addEventListener)rt||(i=a),void 0===i&amp;&amp;(i=!1),t.addEventListener(e.toString(),r,i);else if(t.attachEvent)t.attachEvent(mt(e.toString()),r);else{if(!t.addListener||!t.removeListener)throw Error("addEventListener and attachEvent are unavailable.");t.addListener(r)}return n}function gt(t){if("number"!=typeof t&amp;&amp;t&amp;&amp;!t.Y){var e=t.src;if(e&amp;&amp;e[st])ft(e.c,t);else{var n=t.type,r=t.proxy;e.removeEventListener?e.removeEventListener(n,r,t.capture):e.detachEvent?e.detachEvent(mt(n),r):e.addListener&amp;&amp;e.removeListener&amp;&amp;e.removeListener(r),(n=_t(e))?(ft(n,t),0==n.b&amp;&amp;(n.src=null,e[pt]=null)):ct(t)}}}function mt(t){return t in dt?dt[t]:dt[t]="on"+t}function bt(t,e){var n=t.listener,r=t.ca||t.src;return t.Z&amp;&amp;gt(t),n.call(r,e)}function wt(t,e){if(t.Y)return!0;if(!et){if(!e)t:{e=["window","event"];for(var n=u,r=0;r&lt;e.length;r++)if(null==(n=n[e[r]])){e=null;break t}e=n}return bt(t,e=new ot(e,this))}return bt(t,new ot(e,this))}function _t(t){return(t=t[pt])instanceof ht?t:null}var It="__closure_events_fn_"+(1e9*Math.random()&gt;&gt;&gt;0);function Et(t){return"function"==h(t)?t:(t[It]||(t[It]=function(e){return t.handleEvent(e)}),t[It])}function Tt(){_.call(this),this.c=new ht(this),this.J=this,this.C=null}function At(t,e,n,r){if(!(e=t.c.a[String(e)]))return!0;e=e.concat();for(var i=!0,o=0;o&lt;e.length;++o){var a=e[o];if(a&amp;&amp;!a.Y&amp;&amp;a.capture==n){var s=a.listener,u=a.ca||a.src;a.Z&amp;&amp;ft(t.c,a),i=!1!==s.call(u,r)&amp;&amp;i}}return i&amp;&amp;!r.defaultPrevented}w(Tt,_),Tt.prototype[st]=!0,(o=Tt.prototype).addEventListener=function(t,e,n,r){vt(this,t,e,n,r)},o.removeEventListener=function(t,e,n,r){!function t(e,n,r,i,o){if(Array.isArray(n))for(var a=0;a&lt;n.length;a++)t(e,n[a],r,i,o);else i=l(i)?!!i.capture:!!i,r=Et(r),e&amp;&amp;e[st]?(e=e.c,(n=String(n).toString())in e.a&amp;&amp;-1&lt;(r=lt(a=e.a[n],r,i,o))&amp;&amp;(ct(a[r]),Array.prototype.splice.call(a,r,1),0==a.length&amp;&amp;(delete e.a[n],e.b--))):e&amp;&amp;(e=_t(e))&amp;&amp;(n=e.a[n.toString()],e=-1,n&amp;&amp;(e=lt(n,r,i,o)),(r=-1&lt;e?n[e]:null)&amp;&amp;gt(r))}(this,t,e,n,r)},o.dispatchEvent=function(t){var e,n=this.C;if(n)for(e=[];n;n=n.C)e.push(n);n=this.J;var r=t.type||t;if("string"==typeof t)t=new it(t,n);else if(t instanceof it)t.target=t.target||n;else{var i=t;j(t=new it(r,n),i)}if(i=!0,e)for(var o=e.length-1;0&lt;=o;o--){var a=t.a=e[o];i=At(a,r,!0,t)&amp;&amp;i}if(i=At(a=t.a=n,r,!0,t)&amp;&amp;i,i=At(a,r,!1,t)&amp;&amp;i,e)for(o=0;o&lt;e.length;o++)i=At(a=t.a=e[o],r,!1,t)&amp;&amp;i;return i},o.G=function(){if(Tt.S.G.call(this),this.c){var t,e=this.c;for(t in e.a){for(var n=e.a[t],r=0;r&lt;n.length;r++)ct(n[r]);delete e.a[t],e.b--}}this.C=null},o.va=function(t,e,n,r){return this.c.add(String(t),e,!1,n,r)},o.wa=function(t,e,n,r){return this.c.add(String(t),e,!0,n,r)};var St=u.JSON.stringify;function Nt(){this.b=this.a=null}var Ot,kt=new(function(){function t(t,e,n){this.f=n,this.c=t,this.g=e,this.b=0,this.a=null}return t.prototype.get=function(){var t;return 0&lt;this.b?(this.b--,t=this.a,this.a=t.next,t.next=null):t=this.c(),t},t}())(function(){return new Pt},function(t){t.reset()},100);function Dt(){var t=Lt,e=null;return t.a&amp;&amp;(e=t.a,t.a=t.a.next,t.a||(t.b=null),e.next=null),e}function Pt(){this.next=this.b=this.a=null}function Rt(t){u.setTimeout(function(){throw t},0)}function xt(t,e){Ot||function(){var t=u.Promise.resolve(void 0);Ot=function(){t.then(jt)}}(),Ct||(Ot(),Ct=!0),Lt.add(t,e)}Nt.prototype.add=function(t,e){var n=kt.get();n.set(t,e),this.b?this.b.next=n:this.a=n,this.b=n},Pt.prototype.set=function(t,e){this.a=t,this.b=e,this.next=null},Pt.prototype.reset=function(){this.next=this.b=this.a=null};var Ct=!1,Lt=new Nt;function jt(){for(var t;t=Dt();){try{t.a.call(t.b)}catch(t){Rt(t)}var e=kt;e.g(t),e.b&lt;e.f&amp;&amp;(e.b++,t.next=e.a,e.a=t)}Ct=!1}function Mt(t,e){Tt.call(this),this.b=t||1,this.a=e||u,this.f=g(this.Ya,this),this.g=b()}function Vt(t){t.aa=!1,t.M&amp;&amp;(t.a.clearTimeout(t.M),t.M=null)}function Ut(t,e,n){if("function"==h(t))n&amp;&amp;(t=g(t,n));else{if(!t||"function"!=typeof t.handleEvent)throw Error("Invalid listener argument");t=g(t.handleEvent,t)}return 2147483647&lt;Number(e)?-1:u.setTimeout(t,e||0)}w(Mt,Tt),(o=Mt.prototype).aa=!1,o.M=null,o.Ya=function(){if(this.aa){var t=b()-this.g;0&lt;t&amp;&amp;t&lt;.8*this.b?this.M=this.a.setTimeout(this.f,this.b-t):(this.M&amp;&amp;(this.a.clearTimeout(this.M),this.M=null),this.dispatchEvent("tick"),this.aa&amp;&amp;(Vt(this),this.start()))}},o.start=function(){this.aa=!0,this.M||(this.M=this.a.setTimeout(this.f,this.b),this.g=b())},o.G=function(){Mt.S.G.call(this),Vt(this),delete this.a};var Ft=function(t){function e(e,n,r){var i=t.call(this)||this;return i.g=null!=r?e.bind(r):e,i.h=n,i.b=null,i.c=!1,i.a=null,i}return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype.f=function(t){this.b=arguments,this.a?this.c=!0:function t(e){e.a=Ut(function(){e.a=null,e.c&amp;&amp;(e.c=!1,t(e))},e.h);var n=e.b;e.b=null,e.g.apply(null,n)}(this)},e.prototype.G=function(){t.prototype.G.call(this),this.a&amp;&amp;(u.clearTimeout(this.a),this.a=null,this.c=!1,this.b=null)},e}(_);function qt(t){_.call(this),this.b=t,this.a={}}w(qt,_);var Bt=[];function Gt(t,e,n,r){Array.isArray(n)||(n&amp;&amp;(Bt[0]=n.toString()),n=Bt);for(var i=0;i&lt;n.length;i++){var o=vt(e,n[i],r||t.handleEvent,!1,t.b||t);if(!o)break;t.a[o.key]=o}}function zt(t){x(t.a,function(t,e){this.a.hasOwnProperty(e)&amp;&amp;gt(t)},t),t.a={}}function Kt(){this.a=!0}function Ht(t,e,n,r){t.info(function(){return"XMLHTTP TEXT ("+e+"): "+function(t,e){if(!t.a)return e;if(!e)return null;try{var n=JSON.parse(e);if(n)for(t=0;t&lt;n.length;t++)if(Array.isArray(n[t])){var r=n[t];if(!(2&gt;r.length)){var i=r[1];if(Array.isArray(i)&amp;&amp;!(1&gt;i.length)){var o=i[0];if("noop"!=o&amp;&amp;"stop"!=o&amp;&amp;"close"!=o)for(var a=1;a&lt;i.length;a++)i[a]=""}}}return St(n)}catch(t){return e}}(t,n)+(r?" "+r:"")})}qt.prototype.G=function(){qt.S.G.call(this),zt(this)},qt.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},Kt.prototype.info=function(){};var Wt=null;function Xt(){return Wt=Wt||new Tt}function Jt(t){it.call(this,"serverreachability",t)}function Yt(t){var e=Xt();e.dispatchEvent(new Jt(e,t))}function Qt(t){it.call(this,"statevent",t)}function $t(t){var e=Xt();e.dispatchEvent(new Qt(e,t))}function Zt(t){it.call(this,"timingevent",t)}function te(t,e){if("function"!=h(t))throw Error("Fn must not be null and must be a function");return u.setTimeout(function(){t()},e)}w(Jt,it),w(Qt,it),w(Zt,it);var ee={NO_ERROR:0,Za:1,gb:2,fb:3,bb:4,eb:5,hb:6,Da:7,TIMEOUT:8,kb:9},ne={ab:"complete",ob:"success",Ea:"error",Da:"abort",mb:"ready",nb:"readystatechange",TIMEOUT:"timeout",ib:"incrementaldata",lb:"progress",cb:"downloadprogress",pb:"uploadprogress"};function re(){}function ie(t){var e;return(e=t.a)||(e=t.a={}),e}function oe(){}re.prototype.a=null;var ae,se={OPEN:"a",$a:"b",Ea:"c",jb:"d"};function ue(){it.call(this,"d")}function ce(){it.call(this,"c")}function he(){}function fe(t,e,n,r){this.g=t,this.c=e,this.f=n,this.T=r||1,this.J=new qt(this),this.P=le,t=G?125:void 0,this.R=new Mt(t),this.B=null,this.b=!1,this.j=this.l=this.i=this.H=this.u=this.U=this.o=null,this.s=[],this.a=null,this.D=0,this.h=this.m=null,this.N=-1,this.A=!1,this.O=0,this.F=null,this.W=this.C=this.V=this.I=!1}w(ue,it),w(ce,it),w(he,re),ae=new he;var le=45e3,pe={},de={};function ve(t,e,n){t.H=1,t.i=Me(Pe(e)),t.j=n,t.I=!0,ye(t,null)}function ye(t,e){t.u=b(),be(t),t.l=Pe(t.i);var n=t.l,r=t.T;Array.isArray(r)||(r=[String(r)]),Ye(n.b,"t",r),t.D=0,t.a=Gn(t.g,t.g.C?e:null),0&lt;t.O&amp;&amp;(t.F=new Ft(g(t.Ca,t,t.a),t.O)),Gt(t.J,t.a,"readystatechange",t.Wa),e=t.B?C(t.B):{},t.j?(t.m||(t.m="POST"),e["Content-Type"]="application/x-www-form-urlencoded",t.a.ba(t.l,t.m,t.j,e)):(t.m="GET",t.a.ba(t.l,t.m,null,e)),Yt(1),function(t,e,n,r,i,o){t.info(function(){if(t.a)if(o)for(var a="",s=o.split("&amp;"),u=0;u&lt;s.length;u++){var c=s[u].split("=");if(1&lt;c.length){var h=c[0];c=c[1];var f=h.split("_");a=2&lt;=f.length&amp;&amp;"type"==f[1]?a+(h+"=")+c+"&amp;":a+(h+"=redacted&amp;")}}else a=null;else a=o;return"XMLHTTP REQ ("+r+") [attempt "+i+"]: "+e+"\n"+n+"\n"+a})}(t.c,t.m,t.l,t.f,t.T,t.j)}function ge(t,e,n){for(var r=!0;!t.A&amp;&amp;t.D&lt;n.length;){var i=me(t,n);if(i==de){4==e&amp;&amp;(t.h=4,$t(14),r=!1),Ht(t.c,t.f,null,"[Incomplete Response]");break}if(i==pe){t.h=4,$t(15),Ht(t.c,t.f,n,"[Invalid Chunk]"),r=!1;break}Ht(t.c,t.f,i,null),Te(t,i)}4==e&amp;&amp;0==n.length&amp;&amp;(t.h=1,$t(16),r=!1),t.b=t.b&amp;&amp;r,r?0&lt;n.length&amp;&amp;!t.W&amp;&amp;(t.W=!0,(e=t.g).a==t&amp;&amp;e.V&amp;&amp;!e.F&amp;&amp;(e.c.info("Great, no buffering proxy detected. Bytes received: "+n.length),Ln(e),e.F=!0)):(Ht(t.c,t.f,n,"[Invalid Chunked Response]"),Ee(t),Ie(t))}function me(t,e){var n=t.D,r=e.indexOf("\n",n);return-1==r?de:(n=Number(e.substring(n,r)),isNaN(n)?pe:(r+=1)+n&gt;e.length?de:(e=e.substr(r,n),t.D=r+n,e))}function be(t){t.U=b()+t.P,we(t,t.P)}function we(t,e){if(null!=t.o)throw Error("WatchDog timer not null");t.o=te(g(t.Ua,t),e)}function _e(t){t.o&amp;&amp;(u.clearTimeout(t.o),t.o=null)}function Ie(t){0==t.g.v||t.A||Vn(t.g,t)}function Ee(t){_e(t);var e=t.F;e&amp;&amp;"function"==typeof e.ja&amp;&amp;e.ja(),t.F=null,Vt(t.R),zt(t.J),t.a&amp;&amp;(e=t.a,t.a=null,e.abort(),e.ja())}function Te(t,e){try{var n=t.g;if(0!=n.v&amp;&amp;(n.a==t||nn(n.b,t)))if(n.I=t.N,!t.C&amp;&amp;nn(n.b,t)&amp;&amp;3==n.v){try{var r=n.ka.a.parse(e)}catch(t){r=null}if(Array.isArray(r)&amp;&amp;3==r.length){var i=r;if(0==i[0]){t:if(!n.j){if(n.a){if(!(n.a.u+3e3&lt;t.u))break t;Mn(n),Sn(n)}Cn(n),$t(18)}}else n.oa=i[1],0&lt;n.oa-n.P&amp;&amp;37500&gt;i[2]&amp;&amp;n.H&amp;&amp;0==n.o&amp;&amp;!n.m&amp;&amp;(n.m=te(g(n.Ra,n),6e3));if(1&gt;=en(n.b)&amp;&amp;n.ea){try{n.ea()}catch(t){}n.ea=void 0}}else Fn(n,11)}else if((t.C||n.a==t)&amp;&amp;Mn(n),!S(e))for(e=r=n.ka.a.parse(e),r=0;r&lt;e.length;r++)if(i=e[r],n.P=i[0],i=i[1],2==n.v)if("c"==i[0]){n.J=i[1],n.ga=i[2];var o=i[3];null!=o&amp;&amp;(n.ha=o,n.c.info("VER="+n.ha));var a=i[4];null!=a&amp;&amp;(n.pa=a,n.c.info("SVER="+n.pa));var s=i[5];if(null!=s&amp;&amp;"number"==typeof s&amp;&amp;0&lt;s){var u=1.5*s;n.D=u,n.c.info("backChannelRequestTimeoutMs_="+u)}u=n;var c=t.a;if(c){var h=c.a?c.a.getResponseHeader("X-Client-Wire-Protocol"):null;if(h){var f=u.b;!f.a&amp;&amp;(k(h,"spdy")||k(h,"quic")||k(h,"h2"))&amp;&amp;(f.f=f.g,f.a=new Set,f.b&amp;&amp;(rn(f,f.b),f.b=null))}if(u.A){var l=c.a?c.a.getResponseHeader("X-HTTP-Session-Id"):null;l&amp;&amp;(u.na=l,je(u.B,u.A,l))}}n.v=3,n.f&amp;&amp;n.f.ta(),n.V&amp;&amp;(n.N=b()-t.u,n.c.info("Handshake RTT: "+n.N+"ms"));var p=t;if((u=n).la=Bn(u,u.C?u.ga:null,u.fa),p.C){on(u.b,p);var d=p,v=u.D;v&amp;&amp;d.setTimeout(v),d.o&amp;&amp;(_e(d),be(d)),u.a=p}else xn(u);0&lt;n.g.length&amp;&amp;kn(n)}else"stop"!=i[0]&amp;&amp;"close"!=i[0]||Fn(n,7);else 3==n.v&amp;&amp;("stop"==i[0]||"close"==i[0]?"stop"==i[0]?Fn(n,7):An(n):"noop"!=i[0]&amp;&amp;n.f&amp;&amp;n.f.sa(i),n.o=0);Yt(4)}catch(t){}}function Ae(t,e){if(t.forEach&amp;&amp;"function"==typeof t.forEach)t.forEach(e,void 0);else if(f(t)||"string"==typeof t)E(t,e,void 0);else{if(t.L&amp;&amp;"function"==typeof t.L)var n=t.L();else if(t.K&amp;&amp;"function"==typeof t.K)n=void 0;else if(f(t)||"string"==typeof t){n=[];for(var r=t.length,i=0;i&lt;r;i++)n.push(i)}else for(i in n=[],r=0,t)n[r++]=i;i=(r=function(t){if(t.K&amp;&amp;"function"==typeof t.K)return t.K();if("string"==typeof t)return t.split("");if(f(t)){for(var e=[],n=t.length,r=0;r&lt;n;r++)e.push(t[r]);return e}for(r in e=[],n=0,t)e[n++]=t[r];return e}(t)).length;for(var o=0;o&lt;i;o++)e.call(void 0,r[o],n&amp;&amp;n[o],t)}}function Se(t,e){this.b={},this.a=[],this.c=0;var n=arguments.length;if(1&lt;n){if(n%2)throw Error("Uneven number of arguments");for(var r=0;r&lt;n;r+=2)this.set(arguments[r],arguments[r+1])}else if(t)if(t instanceof Se)for(n=t.L(),r=0;r&lt;n.length;r++)this.set(n[r],t.get(n[r]));else for(r in t)this.set(r,t[r])}function Ne(t){if(t.c!=t.a.length){for(var e=0,n=0;e&lt;t.a.length;){var r=t.a[e];Oe(t.b,r)&amp;&amp;(t.a[n++]=r),e++}t.a.length=n}if(t.c!=t.a.length){var i={};for(n=e=0;e&lt;t.a.length;)Oe(i,r=t.a[e])||(t.a[n++]=r,i[r]=1),e++;t.a.length=n}}function Oe(t,e){return Object.prototype.hasOwnProperty.call(t,e)}(o=fe.prototype).setTimeout=function(t){this.P=t},o.Wa=function(t){t=t.target;var e=this.F;e&amp;&amp;3==_n(t)?e.f():this.Ca(t)},o.Ca=function(t){try{if(t==this.a)t:{var e=_n(this.a),n=this.a.ua(),r=this.a.X();if(!(3&gt;e||3==e&amp;&amp;!G&amp;&amp;!this.a.$())){this.A||4!=e||7==n||Yt(8==n||0&gt;=r?3:2),_e(this);var i=this.a.X();this.N=i;var o=this.a.$();if(this.b=200==i,function(t,e,n,r,i,o,a){t.info(function(){return"XMLHTTP RESP ("+r+") [ attempt "+i+"]: "+e+"\n"+n+"\n"+o+" "+a})}(this.c,this.m,this.l,this.f,this.T,e,i),this.b){if(this.V&amp;&amp;!this.C){e:{if(this.a){var a,s=this.a;if((a=s.a?s.a.getResponseHeader("X-HTTP-Initial-Response"):null)&amp;&amp;!S(a)){var u=a;break e}}u=null}if(!u){this.b=!1,this.h=3,$t(12),Ee(this),Ie(this);break t}Ht(this.c,this.f,u,"Initial handshake response via X-HTTP-Initial-Response"),this.C=!0,Te(this,u)}this.I?(ge(this,e,o),G&amp;&amp;this.b&amp;&amp;3==e&amp;&amp;(Gt(this.J,this.R,"tick",this.Va),this.R.start())):(Ht(this.c,this.f,o,null),Te(this,o)),4==e&amp;&amp;Ee(this),this.b&amp;&amp;!this.A&amp;&amp;(4==e?Vn(this.g,this):(this.b=!1,be(this)))}else 400==i&amp;&amp;0&lt;o.indexOf("Unknown SID")?(this.h=3,$t(12)):(this.h=0,$t(13)),Ee(this),Ie(this)}}}catch(t){}},o.Va=function(){if(this.a){var t=_n(this.a),e=this.a.$();this.D&lt;e.length&amp;&amp;(_e(this),ge(this,t,e),this.b&amp;&amp;4!=t&amp;&amp;be(this))}},o.cancel=function(){this.A=!0,Ee(this)},o.Ua=function(){this.o=null;var t=b();0&lt;=t-this.U?(function(t,e){t.info(function(){return"TIMEOUT: "+e})}(this.c,this.l),2!=this.H&amp;&amp;(Yt(3),$t(17)),Ee(this),this.h=2,Ie(this)):we(this,this.U-t)},(o=Se.prototype).K=function(){Ne(this);for(var t=[],e=0;e&lt;this.a.length;e++)t.push(this.b[this.a[e]]);return t},o.L=function(){return Ne(this),this.a.concat()},o.get=function(t,e){return Oe(this.b,t)?this.b[t]:e},o.set=function(t,e){Oe(this.b,t)||(this.c++,this.a.push(t)),this.b[t]=e},o.forEach=function(t,e){for(var n=this.L(),r=0;r&lt;n.length;r++){var i=n[r],o=this.get(i);t.call(e,o,i,this)}};var ke=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function De(t,e){if(this.c=this.j=this.f="",this.h=null,this.i=this.g="",this.a=!1,t instanceof De){this.a=void 0!==e?e:t.a,Re(this,t.f),this.j=t.j,xe(this,t.c),Ce(this,t.h),this.g=t.g,e=t.b;var n=new He;n.c=e.c,e.a&amp;&amp;(n.a=new Se(e.a),n.b=e.b),Le(this,n),this.i=t.i}else t&amp;&amp;(n=String(t).match(ke))?(this.a=!!e,Re(this,n[1]||"",!0),this.j=Ve(n[2]||""),xe(this,n[3]||"",!0),Ce(this,n[4]),this.g=Ve(n[5]||"",!0),Le(this,n[6]||"",!0),this.i=Ve(n[7]||"")):(this.a=!!e,this.b=new He(null,this.a))}function Pe(t){return new De(t)}function Re(t,e,n){t.f=n?Ve(e,!0):e,t.f&amp;&amp;(t.f=t.f.replace(/:$/,""))}function xe(t,e,n){t.c=n?Ve(e,!0):e}function Ce(t,e){if(e){if(e=Number(e),isNaN(e)||0&gt;e)throw Error("Bad port number "+e);t.h=e}else t.h=null}function Le(t,e,n){e instanceof He?(t.b=e,function(t,e){e&amp;&amp;!t.f&amp;&amp;(We(t),t.c=null,t.a.forEach(function(t,e){var n=e.toLowerCase();e!=n&amp;&amp;(Xe(this,e),Ye(this,n,t))},t)),t.f=e}(t.b,t.a)):(n||(e=Ue(e,ze)),t.b=new He(e,t.a))}function je(t,e,n){t.b.set(e,n)}function Me(t){return je(t,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^b()).toString(36)),t}function Ve(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function Ue(t,e,n){return"string"==typeof t?(t=encodeURI(t).replace(e,Fe),n&amp;&amp;(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function Fe(t){return"%"+((t=t.charCodeAt(0))&gt;&gt;4&amp;15).toString(16)+(15&amp;t).toString(16)}De.prototype.toString=function(){var t=[],e=this.f;e&amp;&amp;t.push(Ue(e,qe,!0),":");var n=this.c;return(n||"file"==e)&amp;&amp;(t.push("//"),(e=this.j)&amp;&amp;t.push(Ue(e,qe,!0),"@"),t.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.h)&amp;&amp;t.push(":",String(n))),(n=this.g)&amp;&amp;(this.c&amp;&amp;"/"!=n.charAt(0)&amp;&amp;t.push("/"),t.push(Ue(n,"/"==n.charAt(0)?Ge:Be,!0))),(n=this.b.toString())&amp;&amp;t.push("?",n),(n=this.i)&amp;&amp;t.push("#",Ue(n,Ke)),t.join("")};var qe=/[#\/\?@]/g,Be=/[#\?:]/g,Ge=/[#\?]/g,ze=/[#\?@]/g,Ke=/#/g;function He(t,e){this.b=this.a=null,this.c=t||null,this.f=!!e}function We(t){t.a||(t.a=new Se,t.b=0,t.c&amp;&amp;function(t,e){if(t){t=t.split("&amp;");for(var n=0;n&lt;t.length;n++){var r=t[n].indexOf("="),i=null;if(0&lt;=r){var o=t[n].substring(0,r);i=t[n].substring(r+1)}else o=t[n];e(o,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(t.c,function(e,n){t.add(decodeURIComponent(e.replace(/\+/g," ")),n)}))}function Xe(t,e){We(t),e=Qe(t,e),Oe(t.a.b,e)&amp;&amp;(t.c=null,t.b-=t.a.get(e).length,Oe((t=t.a).b,e)&amp;&amp;(delete t.b[e],t.c--,t.a.length&gt;2*t.c&amp;&amp;Ne(t)))}function Je(t,e){return We(t),e=Qe(t,e),Oe(t.a.b,e)}function Ye(t,e,n){Xe(t,e),0&lt;n.length&amp;&amp;(t.c=null,t.a.set(Qe(t,e),A(n)),t.b+=n.length)}function Qe(t,e){return e=String(e),t.f&amp;&amp;(e=e.toLowerCase()),e}function $e(t){this.g=t||Ze,u.PerformanceNavigationTiming?t=0&lt;(t=u.performance.getEntriesByType("navigation")).length&amp;&amp;("hq"==t[0].nextHopProtocol||"h2"==t[0].nextHopProtocol):t=!!(u.ia&amp;&amp;u.ia.ya&amp;&amp;u.ia.ya()&amp;&amp;u.ia.ya().qb),this.f=t?this.g:1,this.a=null,1&lt;this.f&amp;&amp;(this.a=new Set),this.b=null,this.c=[]}(o=He.prototype).add=function(t,e){We(this),this.c=null,t=Qe(this,t);var n=this.a.get(t);return n||this.a.set(t,n=[]),n.push(e),this.b+=1,this},o.forEach=function(t,e){We(this),this.a.forEach(function(n,r){E(n,function(n){t.call(e,n,r,this)},this)},this)},o.L=function(){We(this);for(var t=this.a.K(),e=this.a.L(),n=[],r=0;r&lt;e.length;r++)for(var i=t[r],o=0;o&lt;i.length;o++)n.push(e[r]);return n},o.K=function(t){We(this);var e=[];if("string"==typeof t)Je(this,t)&amp;&amp;(e=T(e,this.a.get(Qe(this,t))));else{t=this.a.K();for(var n=0;n&lt;t.length;n++)e=T(e,t[n])}return e},o.set=function(t,e){return We(this),this.c=null,Je(this,t=Qe(this,t))&amp;&amp;(this.b-=this.a.get(t).length),this.a.set(t,[e]),this.b+=1,this},o.get=function(t,e){return t&amp;&amp;0&lt;(t=this.K(t)).length?String(t[0]):e},o.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var t=[],e=this.a.L(),n=0;n&lt;e.length;n++){var r=e[n],i=encodeURIComponent(String(r));r=this.K(r);for(var o=0;o&lt;r.length;o++){var a=i;""!==r[o]&amp;&amp;(a+="="+encodeURIComponent(String(r[o]))),t.push(a)}}return this.c=t.join("&amp;")};var Ze=10;function tn(t){return!!t.b||!!t.a&amp;&amp;t.a.size&gt;=t.f}function en(t){return t.b?1:t.a?t.a.size:0}function nn(t,e){return t.b?t.b==e:!!t.a&amp;&amp;t.a.has(e)}function rn(t,e){t.a?t.a.add(e):t.b=e}function on(t,e){t.b&amp;&amp;t.b==e?t.b=null:t.a&amp;&amp;t.a.has(e)&amp;&amp;t.a.delete(e)}function an(t){var e,n;if(null!=t.b)return t.c.concat(t.b.s);if(null!=t.a&amp;&amp;0!==t.a.size){var r=t.c;try{for(var o=i(t.a.values()),a=o.next();!a.done;a=o.next()){var s=a.value;r=r.concat(s.s)}}catch(t){e={error:t}}finally{try{a&amp;&amp;!a.done&amp;&amp;(n=o.return)&amp;&amp;n.call(o)}finally{if(e)throw e.error}}return r}return A(t.c)}function sn(){}function un(t,e,n){var r=n||"";try{Ae(t,function(t,n){var i=t;l(t)&amp;&amp;(i=St(t)),e.push(r+n+"="+encodeURIComponent(i))})}catch(t){throw e.push(r+"type="+encodeURIComponent("_badmap")),t}}function cn(t,e,n,r,i){try{e.onload=null,e.onerror=null,e.onabort=null,e.ontimeout=null,i(r)}catch(t){}}$e.prototype.cancel=function(){var t,e;if(this.c=an(this),this.b)this.b.cancel(),this.b=null;else if(this.a&amp;&amp;0!==this.a.size){try{for(var n=i(this.a.values()),r=n.next();!r.done;r=n.next()){r.value.cancel()}}catch(e){t={error:e}}finally{try{r&amp;&amp;!r.done&amp;&amp;(e=n.return)&amp;&amp;e.call(n)}finally{if(t)throw t.error}}this.a.clear()}},sn.prototype.stringify=function(t){return u.JSON.stringify(t,void 0)},sn.prototype.parse=function(t){return u.JSON.parse(t,void 0)};var hn=u.JSON.parse;function fn(t){Tt.call(this),this.headers=new Se,this.H=t||null,this.b=!1,this.s=this.a=null,this.B="",this.h=0,this.f="",this.g=this.A=this.l=this.u=!1,this.o=0,this.m=null,this.I=ln,this.D=this.F=!1}w(fn,Tt);var ln="",pn=/^https?$/i,dn=["POST","PUT"];function vn(t){return"content-type"==t.toLowerCase()}function yn(t,e){t.b=!1,t.a&amp;&amp;(t.g=!0,t.a.abort(),t.g=!1),t.f=e,t.h=5,gn(t),bn(t)}function gn(t){t.u||(t.u=!0,t.dispatchEvent("complete"),t.dispatchEvent("error"))}function mn(t){if(t.b&amp;&amp;void 0!==s&amp;&amp;(!t.s[1]||4!=_n(t)||2!=t.X()))if(t.l&amp;&amp;4==_n(t))Ut(t.za,0,t);else if(t.dispatchEvent("readystatechange"),4==_n(t)){t.b=!1;try{var e,n=t.X();t:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r=!0;break t;default:r=!1}if(!(e=r)){var i;if(i=0===n){var o=String(t.B).match(ke)[1]||null;if(!o&amp;&amp;u.self&amp;&amp;u.self.location){var a=u.self.location.protocol;o=a.substr(0,a.length-1)}i=!pn.test(o?o.toLowerCase():"")}e=i}if(e)t.dispatchEvent("complete"),t.dispatchEvent("success");else{t.h=6;try{var c=2&lt;_n(t)?t.a.statusText:""}catch(t){c=""}t.f=c+" ["+t.X()+"]",gn(t)}}finally{bn(t)}}}function bn(t,e){if(t.a){wn(t);var n=t.a,r=t.s[0]?c:null;t.a=null,t.s=null,e||t.dispatchEvent("ready");try{n.onreadystatechange=r}catch(t){}}}function wn(t){t.a&amp;&amp;t.D&amp;&amp;(t.a.ontimeout=null),t.m&amp;&amp;(u.clearTimeout(t.m),t.m=null)}function _n(t){return t.a?t.a.readyState:0}function In(t,e,n){t:{for(r in n){var r=!1;break t}r=!0}r||(n=function(t){var e="";return x(t,function(t,n){e+=n,e+=":",e+=t,e+="\r\n"}),e}(n),"string"==typeof t?null!=n&amp;&amp;encodeURIComponent(String(n)):je(t,e,n))}function En(t,e,n){return n&amp;&amp;n.internalChannelParams&amp;&amp;n.internalChannelParams[t]||e}function Tn(t){this.pa=0,this.g=[],this.c=new Kt,this.ga=this.la=this.B=this.fa=this.a=this.na=this.A=this.W=this.i=this.O=this.l=null,this.La=this.R=0,this.Ia=En("failFast",!1,t),this.H=this.m=this.j=this.h=this.f=null,this.T=!0,this.I=this.oa=this.P=-1,this.U=this.o=this.u=0,this.Fa=En("baseRetryDelayMs",5e3,t),this.Ma=En("retryDelaySeedMs",1e4,t),this.Ja=En("forwardChannelMaxRetries",2,t),this.ma=En("forwardChannelRequestTimeoutMs",2e4,t),this.Ka=t&amp;&amp;t.g||void 0,this.D=void 0,this.C=t&amp;&amp;t.supportsCrossDomainXhr||!1,this.J="",this.b=new $e(t&amp;&amp;t.concurrentRequestLimit),this.ka=new function(){this.a=new sn},this.da=t&amp;&amp;t.fastHandshake||!1,this.Ga=t&amp;&amp;t.b||!1,t&amp;&amp;t.f&amp;&amp;(this.c.a=!1),t&amp;&amp;t.forceLongPolling&amp;&amp;(this.T=!1),this.V=!this.da&amp;&amp;this.T&amp;&amp;t&amp;&amp;t.c||!1,this.ea=void 0,this.N=0,this.F=!1,this.s=null}function An(t){if(Nn(t),3==t.v){var e=t.R++,n=Pe(t.B);je(n,"SID",t.J),je(n,"RID",e),je(n,"TYPE","terminate"),Pn(t,n),(e=new fe(t,t.c,e,void 0)).H=2,e.i=Me(Pe(n)),n=!1,u.navigator&amp;&amp;u.navigator.sendBeacon&amp;&amp;(n=u.navigator.sendBeacon(e.i.toString(),"")),!n&amp;&amp;u.Image&amp;&amp;((new Image).src=e.i,n=!0),n||(e.a=Gn(e.g,null),e.a.ba(e.i)),e.u=b(),be(e)}qn(t)}function Sn(t){t.a&amp;&amp;(Ln(t),t.a.cancel(),t.a=null)}function Nn(t){Sn(t),t.j&amp;&amp;(u.clearTimeout(t.j),t.j=null),Mn(t),t.b.cancel(),t.h&amp;&amp;("number"==typeof t.h&amp;&amp;u.clearTimeout(t.h),t.h=null)}function On(t,e){t.g.push(new function(t,e){this.b=t,this.a=e}(t.La++,e)),3==t.v&amp;&amp;kn(t)}function kn(t){tn(t.b)||t.h||(t.h=!0,xt(t.Ba,t),t.u=0)}function Dn(t,e){var n;n=e?e.f:t.R++;var r=Pe(t.B);je(r,"SID",t.J),je(r,"RID",n),je(r,"AID",t.P),Pn(t,r),t.i&amp;&amp;t.l&amp;&amp;In(r,t.i,t.l),n=new fe(t,t.c,n,t.u+1),null===t.i&amp;&amp;(n.B=t.l),e&amp;&amp;(t.g=e.s.concat(t.g)),e=Rn(t,n,1e3),n.setTimeout(Math.round(.5*t.ma)+Math.round(.5*t.ma*Math.random())),rn(t.b,n),ve(n,r,e)}function Pn(t,e){t.f&amp;&amp;Ae({},function(t,n){je(e,n,t)})}function Rn(t,e,n){n=Math.min(t.g.length,n);var r=t.f?g(t.f.Ha,t.f,t):null;t:for(var i=t.g,o=-1;;){var a=["count="+n];-1==o?0&lt;n?(o=i[0].b,a.push("ofs="+o)):o=0:a.push("ofs="+o);for(var s=!0,u=0;u&lt;n;u++){var c=i[u].b,h=i[u].a;if(0&gt;(c-=o))o=Math.max(0,i[u].b-100),s=!1;else try{un(h,a,"req"+c+"_")}catch(t){r&amp;&amp;r(h)}}if(s){r=a.join("&amp;");break t}}return t=t.g.splice(0,n),e.s=t,r}function xn(t){t.a||t.j||(t.U=1,xt(t.Aa,t),t.o=0)}function Cn(t){return!(t.a||t.j||3&lt;=t.o)&amp;&amp;(t.U++,t.j=te(g(t.Aa,t),Un(t,t.o)),t.o++,!0)}function Ln(t){null!=t.s&amp;&amp;(u.clearTimeout(t.s),t.s=null)}function jn(t){t.a=new fe(t,t.c,"rpc",t.U),null===t.i&amp;&amp;(t.a.B=t.l),t.a.O=0;var e=Pe(t.la);je(e,"RID","rpc"),je(e,"SID",t.J),je(e,"CI",t.H?"0":"1"),je(e,"AID",t.P),Pn(t,e),je(e,"TYPE","xmlhttp"),t.i&amp;&amp;t.l&amp;&amp;In(e,t.i,t.l),t.D&amp;&amp;t.a.setTimeout(t.D);var n=t.a;t=t.ga,n.H=1,n.i=Me(Pe(e)),n.j=null,n.I=!0,ye(n,t)}function Mn(t){null!=t.m&amp;&amp;(u.clearTimeout(t.m),t.m=null)}function Vn(t,e){var n=null;if(t.a==e){Mn(t),Ln(t),t.a=null;var r=2}else{if(!nn(t.b,e))return;n=e.s,on(t.b,e),r=1}if(t.I=e.N,0!=t.v)if(e.b)if(1==r){n=e.j?e.j.length:0,e=b()-e.u;var i=t.u;(r=Xt()).dispatchEvent(new Zt(r,n,e,i)),kn(t)}else xn(t);else if(3==(i=e.h)||0==i&amp;&amp;0&lt;t.I||!(1==r&amp;&amp;function(t,e){return!(en(t.b)&gt;=t.b.f-(t.h?1:0)||(t.h?(t.g=e.s.concat(t.g),0):1==t.v||2==t.v||t.u&gt;=(t.Ia?0:t.Ja)||(t.h=te(g(t.Ba,t,e),Un(t,t.u)),t.u++,0)))}(t,e)||2==r&amp;&amp;Cn(t)))switch(n&amp;&amp;0&lt;n.length&amp;&amp;(e=t.b,e.c=e.c.concat(n)),i){case 1:Fn(t,5);break;case 4:Fn(t,10);break;case 3:Fn(t,6);break;default:Fn(t,2)}}function Un(t,e){var n=t.Fa+Math.floor(Math.random()*t.Ma);return t.f||(n*=2),n*e}function Fn(t,e){if(t.c.info("Error code "+e),2==e){var n=null;t.f&amp;&amp;(n=null);var r=g(t.Xa,t);n||(n=new De("//www.google.com/images/cleardot.gif"),u.location&amp;&amp;"http"==u.location.protocol||Re(n,"https"),Me(n)),function(t,e){var n=new Kt;if(u.Image){var r=new Image;r.onload=m(cn,n,r,"TestLoadImage: loaded",!0,e),r.onerror=m(cn,n,r,"TestLoadImage: error",!1,e),r.onabort=m(cn,n,r,"TestLoadImage: abort",!1,e),r.ontimeout=m(cn,n,r,"TestLoadImage: timeout",!1,e),u.setTimeout(function(){r.ontimeout&amp;&amp;r.ontimeout()},1e4),r.src=t}else e(!1)}(n.toString(),r)}else $t(2);t.v=0,t.f&amp;&amp;t.f.ra(e),qn(t),Nn(t)}function qn(t){t.v=0,t.I=-1,t.f&amp;&amp;(0==an(t.b).length&amp;&amp;0==t.g.length||(t.b.c.length=0,A(t.g),t.g.length=0),t.f.qa())}function Bn(t,e,n){var r=function(t){return t instanceof De?Pe(t):new De(t,void 0)}(n);if(""!=r.c)e&amp;&amp;xe(r,e+"."+r.c),Ce(r,r.h);else{var i=u.location;r=function(t,e,n,r){var i=new De(null,void 0);return t&amp;&amp;Re(i,t),e&amp;&amp;xe(i,e),n&amp;&amp;Ce(i,n),r&amp;&amp;(i.g=r),i}(i.protocol,e?e+"."+i.hostname:i.hostname,+i.port,n)}return t.W&amp;&amp;x(t.W,function(t,e){je(r,e,t)}),e=t.A,n=t.na,e&amp;&amp;n&amp;&amp;je(r,e,n),je(r,"VER",t.ha),Pn(t,r),r}function Gn(t,e){if(e&amp;&amp;!t.C)throw Error("Can't create secondary domain capable XhrIo object.");return(e=new fn(t.Ka)).F=t.C,e}function zn(){}function Kn(){if(q&amp;&amp;!(10&lt;=Number(tt)))throw Error("Environmental error: no available transport.")}function Hn(t,e){Tt.call(this),this.a=new Tn(e),this.l=t,this.b=e&amp;&amp;e.messageUrlParams||null,t=e&amp;&amp;e.messageHeaders||null,e&amp;&amp;e.clientProtocolHeaderRequired&amp;&amp;(t?t["X-Client-Protocol"]="webchannel":t={"X-Client-Protocol":"webchannel"}),this.a.l=t,t=e&amp;&amp;e.initMessageHeaders||null,e&amp;&amp;e.messageContentType&amp;&amp;(t?t["X-WebChannel-Content-Type"]=e.messageContentType:t={"X-WebChannel-Content-Type":e.messageContentType}),e&amp;&amp;e.a&amp;&amp;(t?t["X-WebChannel-Client-Profile"]=e.a:t={"X-WebChannel-Client-Profile":e.a}),this.a.O=t,(t=e&amp;&amp;e.httpHeadersOverwriteParam)&amp;&amp;!S(t)&amp;&amp;(this.a.i=t),this.h=e&amp;&amp;e.supportsCrossDomainXhr||!1,this.g=e&amp;&amp;e.sendRawJson||!1,(e=e&amp;&amp;e.httpSessionIdParam)&amp;&amp;!S(e)&amp;&amp;(this.a.A=e,null!==(t=this.b)&amp;&amp;e in t&amp;&amp;(e in(t=this.b)&amp;&amp;delete t[e])),this.f=new Jn(this)}function Wn(t){ue.call(this);var e=t.__sm__;if(e){t:{for(var n in e){t=n;break t}t=void 0}(this.c=t)?(t=this.c,this.data=null!==e&amp;&amp;t in e?e[t]:void 0):this.data=e}else this.data=t}function Xn(){ce.call(this),this.status=1}function Jn(t){this.a=t}(o=fn.prototype).ba=function(t,e,n,r){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.B+"; newUri="+t);e=e?e.toUpperCase():"GET",this.B=t,this.f="",this.h=0,this.u=!1,this.b=!0,this.a=new XMLHttpRequest,this.s=this.H?ie(this.H):ie(ae),this.a.onreadystatechange=g(this.za,this);try{this.A=!0,this.a.open(e,String(t),!0),this.A=!1}catch(t){return void yn(this,t)}t=n||"";var i=new Se(this.headers);r&amp;&amp;Ae(r,function(t,e){i.set(e,t)}),r=function(t){t:{for(var e=vn,n=t.length,r="string"==typeof t?t.split(""):t,i=0;i&lt;n;i++)if(i in r&amp;&amp;e.call(void 0,r[i],i,t)){e=i;break t}e=-1}return 0&gt;e?null:"string"==typeof t?t.charAt(e):t[e]}(i.L()),n=u.FormData&amp;&amp;t instanceof u.FormData,!(0&lt;=I(dn,e))||r||n||i.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),i.forEach(function(t,e){this.a.setRequestHeader(e,t)},this),this.I&amp;&amp;(this.a.responseType=this.I),"withCredentials"in this.a&amp;&amp;this.a.withCredentials!==this.F&amp;&amp;(this.a.withCredentials=this.F);try{wn(this),0&lt;this.o&amp;&amp;((this.D=function(t){return q&amp;&amp;$(9)&amp;&amp;"number"==typeof t.timeout&amp;&amp;void 0!==t.ontimeout}(this.a))?(this.a.timeout=this.o,this.a.ontimeout=g(this.xa,this)):this.m=Ut(this.xa,this.o,this)),this.l=!0,this.a.send(t),this.l=!1}catch(t){yn(this,t)}},o.xa=function(){void 0!==s&amp;&amp;this.a&amp;&amp;(this.f="Timed out after "+this.o+"ms, aborting",this.h=8,this.dispatchEvent("timeout"),this.abort(8))},o.abort=function(t){this.a&amp;&amp;this.b&amp;&amp;(this.b=!1,this.g=!0,this.a.abort(),this.g=!1,this.h=t||7,this.dispatchEvent("complete"),this.dispatchEvent("abort"),bn(this))},o.G=function(){this.a&amp;&amp;(this.b&amp;&amp;(this.b=!1,this.g=!0,this.a.abort(),this.g=!1),bn(this,!0)),fn.S.G.call(this)},o.za=function(){this.j||(this.A||this.l||this.g?mn(this):this.Ta())},o.Ta=function(){mn(this)},o.X=function(){try{return 2&lt;_n(this)?this.a.status:-1}catch(t){return-1}},o.$=function(){try{return this.a?this.a.responseText:""}catch(t){return""}},o.Na=function(t){if(this.a){var e=this.a.responseText;return t&amp;&amp;0==e.indexOf(t)&amp;&amp;(e=e.substring(t.length)),hn(e)}},o.ua=function(){return this.h},o.Qa=function(){return"string"==typeof this.f?this.f:String(this.f)},(o=Tn.prototype).ha=8,o.v=1,o.Ba=function(t){if(this.h)if(this.h=null,1==this.v){if(!t){this.R=Math.floor(1e5*Math.random()),t=this.R++;var e,n=new fe(this,this.c,t,void 0),r=this.l;if(this.O&amp;&amp;(r?j(r=C(r),this.O):r=this.O),null===this.i&amp;&amp;(n.B=r),this.da)t:{for(var i=e=0;i&lt;this.g.length;i++){var o=this.g[i];if(void 0===(o="__data__"in o.a&amp;&amp;"string"==typeof(o=o.a.__data__)?o.length:void 0))break;if(4096&lt;(e+=o)){e=i;break t}if(4096===e||i===this.g.length-1){e=i+1;break t}}e=1e3}else e=1e3;e=Rn(this,n,e),je(i=Pe(this.B),"RID",t),je(i,"CVER",22),this.A&amp;&amp;je(i,"X-HTTP-Session-Id",this.A),Pn(this,i),this.i&amp;&amp;r&amp;&amp;In(i,this.i,r),rn(this.b,n),this.Ga&amp;&amp;je(i,"TYPE","init"),this.da?(je(i,"$req",e),je(i,"SID","null"),n.V=!0,ve(n,i,null)):ve(n,i,e),this.v=2}}else 3==this.v&amp;&amp;(t?Dn(this,t):0==this.g.length||tn(this.b)||Dn(this))},o.Aa=function(){if(this.j=null,jn(this),this.V&amp;&amp;!(this.F||null==this.a||0&gt;=this.N)){var t=2*this.N;this.c.info("BP detection timer enabled: "+t),this.s=te(g(this.Sa,this),t)}},o.Sa=function(){this.s&amp;&amp;(this.s=null,this.c.info("BP detection timeout reached."),this.c.info("Buffering proxy detected and switch to long-polling!"),this.H=!1,this.F=!0,Sn(this),jn(this))},o.Ra=function(){null!=this.m&amp;&amp;(this.m=null,Sn(this),Cn(this),$t(19))},o.Xa=function(t){t?(this.c.info("Successfully pinged google.com"),$t(2)):(this.c.info("Failed to ping google.com"),$t(1))},(o=zn.prototype).ta=function(){},o.sa=function(){},o.ra=function(){},o.qa=function(){},o.Ha=function(){},Kn.prototype.a=function(t,e){return new Hn(t,e)},w(Hn,Tt),(o=Hn.prototype).addEventListener=function(t,e,n,r){Hn.S.addEventListener.call(this,t,e,n,r)},o.removeEventListener=function(t,e,n,r){Hn.S.removeEventListener.call(this,t,e,n,r)},o.Oa=function(){this.a.f=this.f,this.h&amp;&amp;(this.a.C=!0);var t=this.a,e=this.l,n=this.b||void 0;$t(0),t.fa=e,t.W=n||{},t.H=t.T,t.B=Bn(t,null,t.fa),kn(t)},o.close=function(){An(this.a)},o.Pa=function(t){if("string"==typeof t){var e={};e.__data__=t,On(this.a,e)}else this.g?((e={}).__data__=St(t),On(this.a,e)):On(this.a,t)},o.G=function(){this.a.f=null,delete this.f,An(this.a),delete this.a,Hn.S.G.call(this)},w(Wn,ue),w(Xn,ce),w(Jn,zn),Jn.prototype.ta=function(){this.a.dispatchEvent("a")},Jn.prototype.sa=function(t){this.a.dispatchEvent(new Wn(t))},Jn.prototype.ra=function(t){this.a.dispatchEvent(new Xn(t))},Jn.prototype.qa=function(){this.a.dispatchEvent("b")},Kn.prototype.createWebChannel=Kn.prototype.a,Hn.prototype.send=Hn.prototype.Pa,Hn.prototype.open=Hn.prototype.Oa,Hn.prototype.close=Hn.prototype.close,ee.NO_ERROR=0,ee.TIMEOUT=8,ee.HTTP_ERROR=6,ne.COMPLETE="complete",oe.EventType=se,se.OPEN="a",se.CLOSE="b",se.ERROR="c",se.MESSAGE="d",Tt.prototype.listen=Tt.prototype.va,fn.prototype.listenOnce=fn.prototype.wa,fn.prototype.getLastError=fn.prototype.Qa,fn.prototype.getLastErrorCode=fn.prototype.ua,fn.prototype.getStatus=fn.prototype.X,fn.prototype.getResponseJson=fn.prototype.Na,fn.prototype.getResponseText=fn.prototype.$,fn.prototype.send=fn.prototype.ba;var Yn=function(){return new Kn},Qn=ee,$n=ne,Zn=oe,tr=fn,er={createWebChannelTransport:Yn,ErrorCode:Qn,EventType:$n,WebChannel:Zn,XhrIo:tr};e.default=er}.call(e,n("DuR2"))},O4tu:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i,o=n("l7Gt"),a=n("Pxmi"),s=n("l0SK"),u=n("fjI4"),c=((r={})["no-app"]="No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()",r["bad-app-name"]="Illegal App name: '{$appName}",r["duplicate-app"]="Firebase App named '{$appName}' already exists",r["app-deleted"]="Firebase App named '{$appName}' already deleted",r["invalid-app-argument"]="firebase.{$appName}() takes either no argument or a Firebase App instance.",r["invalid-log-argument"]="First argument to `onLog` must be null or a function.",r),h=new a.ErrorFactory("app","Firebase",c),f="@firebase/app",l="0.6.11",p="[DEFAULT]",d=((i={})[f]="fire-core",i["@firebase/analytics"]="fire-analytics",i["@firebase/auth"]="fire-auth",i["@firebase/database"]="fire-rtdb",i["@firebase/functions"]="fire-fn",i["@firebase/installations"]="fire-iid",i["@firebase/messaging"]="fire-fcm",i["@firebase/performance"]="fire-perf",i["@firebase/remote-config"]="fire-rc",i["@firebase/storage"]="fire-gcs",i["@firebase/firestore"]="fire-fst",i["fire-js"]="fire-js",i["firebase-wrapper"]="fire-js-all",i),v=new u.Logger("@firebase/app"),y=function(){function t(t,e,n){var r,i,u=this;this.firebase_=n,this.isDeleted_=!1,this.name_=e.name,this.automaticDataCollectionEnabled_=e.automaticDataCollectionEnabled||!1,this.options_=a.deepCopy(t),this.container=new s.ComponentContainer(e.name),this._addComponent(new s.Component("app",function(){return u},"PUBLIC"));try{for(var c=o.__values(this.firebase_.INTERNAL.components.values()),h=c.next();!h.done;h=c.next()){var f=h.value;this._addComponent(f)}}catch(t){r={error:t}}finally{try{h&amp;&amp;!h.done&amp;&amp;(i=c.return)&amp;&amp;i.call(c)}finally{if(r)throw r.error}}}return Object.defineProperty(t.prototype,"automaticDataCollectionEnabled",{get:function(){return this.checkDestroyed_(),this.automaticDataCollectionEnabled_},set:function(t){this.checkDestroyed_(),this.automaticDataCollectionEnabled_=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.checkDestroyed_(),this.name_},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"options",{get:function(){return this.checkDestroyed_(),this.options_},enumerable:!1,configurable:!0}),t.prototype.delete=function(){var t=this;return new Promise(function(e){t.checkDestroyed_(),e()}).then(function(){return t.firebase_.INTERNAL.removeApp(t.name_),Promise.all(t.container.getProviders().map(function(t){return t.delete()}))}).then(function(){t.isDeleted_=!0})},t.prototype._getService=function(t,e){return void 0===e&amp;&amp;(e=p),this.checkDestroyed_(),this.container.getProvider(t).getImmediate({identifier:e})},t.prototype._removeServiceInstance=function(t,e){void 0===e&amp;&amp;(e=p),this.container.getProvider(t).clearInstance(e)},t.prototype._addComponent=function(t){try{this.container.addComponent(t)}catch(e){v.debug("Component "+t.name+" failed to register with FirebaseApp "+this.name,e)}},t.prototype._addOrOverwriteComponent=function(t){this.container.addOrOverwriteComponent(t)},t.prototype.checkDestroyed_=function(){if(this.isDeleted_)throw h.create("app-deleted",{appName:this.name_})},t}();y.prototype.name&amp;&amp;y.prototype.options||y.prototype.delete;var g="7.20.0";
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var m=
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function t(){var e=function(t){var e={},n=new Map,r={__esModule:!0,initializeApp:function(n,i){if(void 0===i&amp;&amp;(i={}),"object"!=typeof i||null===i){var o=i;i={name:o}}var s=i;void 0===s.name&amp;&amp;(s.name=p);var u=s.name;if("string"!=typeof u||!u)throw h.create("bad-app-name",{appName:String(u)});if(a.contains(e,u))throw h.create("duplicate-app",{appName:u});var c=new t(n,s,r);return e[u]=c,c},app:i,registerVersion:function(t,e,n){var r,i=null!==(r=d[t])&amp;&amp;void 0!==r?r:t;n&amp;&amp;(i+="-"+n);var o=i.match(/\s|\//),a=e.match(/\s|\//);if(o||a){var u=['Unable to register library "'+i+'" with version "'+e+'":'];return o&amp;&amp;u.push('library name "'+i+'" contains illegal characters (whitespace or "/")'),o&amp;&amp;a&amp;&amp;u.push("and"),a&amp;&amp;u.push('version name "'+e+'" contains illegal characters (whitespace or "/")'),void v.warn(u.join(" "))}c(new s.Component(i+"-version",function(){return{library:i,version:e}},"VERSION"))},setLogLevel:u.setLogLevel,onLog:function(t,e){if(null!==t&amp;&amp;"function"!=typeof t)throw h.create("invalid-log-argument",{appName:name});u.setUserLogHandler(t,e)},apps:null,SDK_VERSION:g,INTERNAL:{registerComponent:c,removeApp:function(t){delete e[t]},components:n,useAsService:function(t,e){return"serverAuth"===e?null:e}}};function i(t){if(t=t||p,!a.contains(e,t))throw h.create("no-app",{appName:t});return e[t]}function c(s){var u,c,f=s.name;if(n.has(f))return v.debug("There were multiple attempts to register component "+f+"."),"PUBLIC"===s.type?r[f]:null;if(n.set(f,s),"PUBLIC"===s.type){var l=function(t){if(void 0===t&amp;&amp;(t=i()),"function"!=typeof t[f])throw h.create("invalid-app-argument",{appName:f});return t[f]()};void 0!==s.serviceProps&amp;&amp;a.deepExtend(l,s.serviceProps),r[f]=l,t.prototype[f]=function(){for(var t=[],e=0;e&lt;arguments.length;e++)t[e]=arguments[e];return this._getService.bind(this,f).apply(this,s.multipleInstances?t:[])}}try{for(var p=o.__values(Object.keys(e)),d=p.next();!d.done;d=p.next()){var y=d.value;e[y]._addComponent(s)}}catch(t){u={error:t}}finally{try{d&amp;&amp;!d.done&amp;&amp;(c=p.return)&amp;&amp;c.call(p)}finally{if(u)throw u.error}}return"PUBLIC"===s.type?r[f]:null}return r.default=r,Object.defineProperty(r,"apps",{get:function(){return Object.keys(e).map(function(t){return e[t]})}}),i.App=t,r}(y);return e.INTERNAL=o.__assign(o.__assign({},e.INTERNAL),{createFirebaseNamespace:t,extendNamespace:function(t){a.deepExtend(e,t)},createSubscribe:a.createSubscribe,ErrorFactory:a.ErrorFactory,deepExtend:a.deepExtend}),e}(),b=function(){function t(t){this.container=t}return t.prototype.getPlatformInfoString=function(){return this.container.getProviders().map(function(t){if(function(t){var e=t.getComponent();return"VERSION"===(null===e||void 0===e?void 0:e.type)}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */(t)){var e=t.getImmediate();return e.library+"/"+e.version}return null}).filter(function(t){return t}).join(" ")},t}();
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
if(a.isBrowser()&amp;&amp;void 0!==self.firebase){v.warn("\n    Warning: Firebase is already defined in the global scope. Please make sure\n    Firebase library is only loaded once.\n  ");var w=self.firebase.SDK_VERSION;w&amp;&amp;w.indexOf("LITE")&gt;=0&amp;&amp;v.warn("\n    Warning: You are trying to load Firebase while using Firebase Performance standalone script.\n    You should load Firebase Performance with this instance of Firebase to avoid loading duplicate code.\n    ")}var _=m.initializeApp;m.initializeApp=function(){for(var t=[],e=0;e&lt;arguments.length;e++)t[e]=arguments[e];return a.isNode()&amp;&amp;v.warn('\n      Warning: This is a browser-targeted Firebase bundle but it appears it is being\n      run in a Node environment.  If running in a Node environment, make sure you\n      are using the bundle specified by the "main" field in package.json.\n      \n      If you are using Webpack, you can specify "main" as the first item in\n      "resolve.mainFields":\n      https://webpack.js.org/configuration/resolve/#resolvemainfields\n      \n      If using Rollup, use the rollup-plugin-node-resolve plugin and specify "main"\n      as the first item in "mainFields", e.g. [\'main\', \'module\'].\n      https://github.com/rollup/rollup-plugin-node-resolve\n      '),_.apply(void 0,t)};var I=m;!function(t,e){t.INTERNAL.registerComponent(new s.Component("platform-logger",function(t){return new b(t)},"PRIVATE")),t.registerVersion(f,l,e),t.registerVersion("fire-js","")}(I),e.default=I,e.firebase=I},Pxmi:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var r=n("ZKbr"),i={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},o=function(t,e){if(!t)throw a(e)},a=function(t){return new Error("Firebase Database ("+i.SDK_VERSION+") INTERNAL ASSERT FAILED: "+t)},s=function(t){for(var e=[],n=0,r=0;r&lt;t.length;r++){var i=t.charCodeAt(r);i&lt;128?e[n++]=i:i&lt;2048?(e[n++]=i&gt;&gt;6|192,e[n++]=63&amp;i|128):55296==(64512&amp;i)&amp;&amp;r+1&lt;t.length&amp;&amp;56320==(64512&amp;t.charCodeAt(r+1))?(i=65536+((1023&amp;i)&lt;&lt;10)+(1023&amp;t.charCodeAt(++r)),e[n++]=i&gt;&gt;18|240,e[n++]=i&gt;&gt;12&amp;63|128,e[n++]=i&gt;&gt;6&amp;63|128,e[n++]=63&amp;i|128):(e[n++]=i&gt;&gt;12|224,e[n++]=i&gt;&gt;6&amp;63|128,e[n++]=63&amp;i|128)}return e},u={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray:function(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[],i=0;i&lt;t.length;i+=3){var o=t[i],a=i+1&lt;t.length,s=a?t[i+1]:0,u=i+2&lt;t.length,c=u?t[i+2]:0,h=o&gt;&gt;2,f=(3&amp;o)&lt;&lt;4|s&gt;&gt;4,l=(15&amp;s)&lt;&lt;2|c&gt;&gt;6,p=63&amp;c;u||(p=64,a||(l=64)),r.push(n[h],n[f],n[l],n[p])}return r.join("")},encodeString:function(t,e){return this.HAS_NATIVE_SUPPORT&amp;&amp;!e?btoa(t):this.encodeByteArray(s(t),e)},decodeString:function(t,e){return this.HAS_NATIVE_SUPPORT&amp;&amp;!e?atob(t):function(t){for(var e=[],n=0,r=0;n&lt;t.length;){var i=t[n++];if(i&lt;128)e[r++]=String.fromCharCode(i);else if(i&gt;191&amp;&amp;i&lt;224){var o=t[n++];e[r++]=String.fromCharCode((31&amp;i)&lt;&lt;6|63&amp;o)}else if(i&gt;239&amp;&amp;i&lt;365){var a=((7&amp;i)&lt;&lt;18|(63&amp;(o=t[n++]))&lt;&lt;12|(63&amp;(s=t[n++]))&lt;&lt;6|63&amp;t[n++])-65536;e[r++]=String.fromCharCode(55296+(a&gt;&gt;10)),e[r++]=String.fromCharCode(56320+(1023&amp;a))}else{o=t[n++];var s=t[n++];e[r++]=String.fromCharCode((15&amp;i)&lt;&lt;12|(63&amp;o)&lt;&lt;6|63&amp;s)}}return e.join("")}(this.decodeStringToByteArray(t,e))},decodeStringToByteArray:function(t,e){this.init_();for(var n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],i=0;i&lt;t.length;){var o=n[t.charAt(i++)],a=i&lt;t.length?n[t.charAt(i)]:0,s=++i&lt;t.length?n[t.charAt(i)]:64,u=++i&lt;t.length?n[t.charAt(i)]:64;if(++i,null==o||null==a||null==s||null==u)throw Error();var c=o&lt;&lt;2|a&gt;&gt;4;if(r.push(c),64!==s){var h=a&lt;&lt;4&amp;240|s&gt;&gt;2;if(r.push(h),64!==u){var f=s&lt;&lt;6&amp;192|u;r.push(f)}}}return r},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var t=0;t&lt;this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t&gt;=this.ENCODED_VALS_BASE.length&amp;&amp;(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}},c=function(t){try{return u.decodeString(t,!0)}catch(t){}return null};
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function h(t,e){if(!(e instanceof Object))return e;switch(e.constructor){case Date:return new Date(e.getTime());case Object:void 0===t&amp;&amp;(t={});break;case Array:t=[];break;default:return e}for(var n in e)e.hasOwnProperty(n)&amp;&amp;(t[n]=h(t[n],e[n]));return t}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var f=function(){function t(){var t=this;this.reject=function(){},this.resolve=function(){},this.promise=new Promise(function(e,n){t.resolve=e,t.reject=n})}return t.prototype.wrapCallback=function(t){var e=this;return function(n,r){n?e.reject(n):e.resolve(r),"function"==typeof t&amp;&amp;(e.promise.catch(function(){}),1===t.length?t(n):t(n,r))}},t}();
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function l(){return"undefined"!=typeof navigator&amp;&amp;"string"==typeof navigator.userAgent?navigator.userAgent:""}function p(){try{return"[object process]"===Object.prototype.toString.call(t.process)}catch(t){return!1}}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
var d="FirebaseError",v=function(t){function e(n,r){var i=t.call(this,r)||this;return i.code=n,i.name=d,Object.setPrototypeOf(i,e.prototype),Error.captureStackTrace&amp;&amp;Error.captureStackTrace(i,y.prototype.create),i}return r.__extends(e,t),e}(Error),y=function(){function t(t,e,n){this.service=t,this.serviceName=e,this.errors=n}return t.prototype.create=function(t){for(var e=[],n=1;n&lt;arguments.length;n++)e[n-1]=arguments[n];for(var r=e[0]||{},i=this.service+"/"+t,o=this.errors[t],a=o?function(t,e){return t.replace(g,function(t,n){var r=e[n];return null!=r?String(r):"&lt;"+n+"?&gt;"})}(o,r):"Error",s=this.serviceName+": "+a+" ("+i+").",u=new v(i,s),c=0,h=Object.keys(r);c&lt;h.length;c++){var f=h[c];"_"!==f.slice(-1)&amp;&amp;(u[f]=r[f])}return u},t}();var g=/\{\$([^}]+)}/g;
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function m(t){return JSON.parse(t)}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
var b=function(t){var e={},n={},r={},i="";try{var o=t.split(".");e=m(c(o[0])||""),n=m(c(o[1])||""),i=o[2],r=n.d||{},delete n.d}catch(t){}return{header:e,claims:n,data:r,signature:i}};
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
var w=function(){function t(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=64,this.pad_[0]=128;for(var t=1;t&lt;this.blockSize;++t)this.pad_[t]=0;this.reset()}return t.prototype.reset=function(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0},t.prototype.compress_=function(t,e){e||(e=0);var n=this.W_;if("string"==typeof t)for(var r=0;r&lt;16;r++)n[r]=t.charCodeAt(e)&lt;&lt;24|t.charCodeAt(e+1)&lt;&lt;16|t.charCodeAt(e+2)&lt;&lt;8|t.charCodeAt(e+3),e+=4;else for(r=0;r&lt;16;r++)n[r]=t[e]&lt;&lt;24|t[e+1]&lt;&lt;16|t[e+2]&lt;&lt;8|t[e+3],e+=4;for(r=16;r&lt;80;r++){var i=n[r-3]^n[r-8]^n[r-14]^n[r-16];n[r]=4294967295&amp;(i&lt;&lt;1|i&gt;&gt;&gt;31)}var o,a,s=this.chain_[0],u=this.chain_[1],c=this.chain_[2],h=this.chain_[3],f=this.chain_[4];for(r=0;r&lt;80;r++){r&lt;40?r&lt;20?(o=h^u&amp;(c^h),a=1518500249):(o=u^c^h,a=1859775393):r&lt;60?(o=u&amp;c|h&amp;(u|c),a=2400959708):(o=u^c^h,a=3395469782);i=(s&lt;&lt;5|s&gt;&gt;&gt;27)+o+f+a+n[r]&amp;4294967295;f=h,h=c,c=4294967295&amp;(u&lt;&lt;30|u&gt;&gt;&gt;2),u=s,s=i}this.chain_[0]=this.chain_[0]+s&amp;4294967295,this.chain_[1]=this.chain_[1]+u&amp;4294967295,this.chain_[2]=this.chain_[2]+c&amp;4294967295,this.chain_[3]=this.chain_[3]+h&amp;4294967295,this.chain_[4]=this.chain_[4]+f&amp;4294967295},t.prototype.update=function(t,e){if(null!=t){void 0===e&amp;&amp;(e=t.length);for(var n=e-this.blockSize,r=0,i=this.buf_,o=this.inbuf_;r&lt;e;){if(0===o)for(;r&lt;=n;)this.compress_(t,r),r+=this.blockSize;if("string"==typeof t){for(;r&lt;e;)if(i[o]=t.charCodeAt(r),++r,++o===this.blockSize){this.compress_(i),o=0;break}}else for(;r&lt;e;)if(i[o]=t[r],++r,++o===this.blockSize){this.compress_(i),o=0;break}}this.inbuf_=o,this.total_+=e}},t.prototype.digest=function(){var t=[],e=8*this.total_;this.inbuf_&lt;56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var n=this.blockSize-1;n&gt;=56;n--)this.buf_[n]=255&amp;e,e/=256;this.compress_(this.buf_);var r=0;for(n=0;n&lt;5;n++)for(var i=24;i&gt;=0;i-=8)t[r]=this.chain_[n]&gt;&gt;i&amp;255,++r;return t},t}();var _=function(){function t(t,e){var n=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=e,this.task.then(function(){t(n)}).catch(function(t){n.error(t)})}return t.prototype.next=function(t){this.forEachObserver(function(e){e.next(t)})},t.prototype.error=function(t){this.forEachObserver(function(e){e.error(t)}),this.close(t)},t.prototype.complete=function(){this.forEachObserver(function(t){t.complete()}),this.close()},t.prototype.subscribe=function(t,e,n){var r,i=this;if(void 0===t&amp;&amp;void 0===e&amp;&amp;void 0===n)throw new Error("Missing Observer.");void 0===(r=function(t,e){if("object"!=typeof t||null===t)return!1;for(var n=0,r=e;n&lt;r.length;n++){var i=r[n];if(i in t&amp;&amp;"function"==typeof t[i])return!0}return!1}(t,["next","error","complete"])?t:{next:t,error:e,complete:n}).next&amp;&amp;(r.next=I),void 0===r.error&amp;&amp;(r.error=I),void 0===r.complete&amp;&amp;(r.complete=I);var o=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&amp;&amp;this.task.then(function(){try{i.finalError?r.error(i.finalError):r.complete()}catch(t){}}),this.observers.push(r),o},t.prototype.unsubscribeOne=function(t){void 0!==this.observers&amp;&amp;void 0!==this.observers[t]&amp;&amp;(delete this.observers[t],this.observerCount-=1,0===this.observerCount&amp;&amp;void 0!==this.onNoObservers&amp;&amp;this.onNoObservers(this))},t.prototype.forEachObserver=function(t){if(!this.finalized)for(var e=0;e&lt;this.observers.length;e++)this.sendOne(e,t)},t.prototype.sendOne=function(t,e){var n=this;this.task.then(function(){if(void 0!==n.observers&amp;&amp;void 0!==n.observers[t])try{e(n.observers[t])}catch(t){"undefined"!=typeof console&amp;&amp;console.error}})},t.prototype.close=function(t){var e=this;this.finalized||(this.finalized=!0,void 0!==t&amp;&amp;(this.finalError=t),this.task.then(function(){e.observers=void 0,e.onNoObservers=void 0}))},t}();function I(){}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function E(t,e,n){var r="";switch(e){case 1:r=n?"first":"First";break;case 2:r=n?"second":"Second";break;case 3:r=n?"third":"Third";break;case 4:r=n?"fourth":"Fourth";break;default:throw new Error("errorPrefix called with argumentNumber &gt; 4.  Need to update it?")}var i=t+" failed: ";return i+=r+" argument "}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
var T=1e3,A=2,S=144e5,N=.5;e.CONSTANTS=i,e.Deferred=f,e.ErrorFactory=y,e.FirebaseError=v,e.MAX_VALUE_MILLIS=S,e.RANDOM_FACTOR=N,e.Sha1=w,e.areCookiesEnabled=function(){return!(!navigator||!navigator.cookieEnabled)},e.assert=o,e.assertionError=a,e.async=function(t,e){return function(){for(var n=[],r=0;r&lt;arguments.length;r++)n[r]=arguments[r];Promise.resolve(!0).then(function(){t.apply(void 0,n)}).catch(function(t){e&amp;&amp;e(t)})}},e.base64=u,e.base64Decode=c,e.base64Encode=function(t){var e=s(t);return u.encodeByteArray(e,!0)},e.calculateBackoffMillis=function(t,e,n){void 0===e&amp;&amp;(e=T),void 0===n&amp;&amp;(n=A);var r=e*Math.pow(n,t),i=Math.round(N*r*(Math.random()-.5)*2);return Math.min(S,r+i)},e.contains=
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.createSubscribe=function(t,e){var n=new _(t,e);return n.subscribe.bind(n)},e.decode=b,e.deepCopy=
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function(t){return h(void 0,t)},e.deepExtend=h,e.errorPrefix=E,e.getUA=l,e.isAdmin=function(t){var e=b(t).claims;return"object"==typeof e&amp;&amp;!0===e.admin},e.isBrowser=function(){return"object"==typeof self&amp;&amp;self.self===self},e.isBrowserExtension=function(){var t="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof t&amp;&amp;void 0!==t.id},e.isElectron=function(){return l().indexOf("Electron/")&gt;=0},e.isEmpty=function(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0},e.isIE=function(){var t=l();return t.indexOf("MSIE ")&gt;=0||t.indexOf("Trident/")&gt;=0},e.isIndexedDBAvailable=function(){return"indexedDB"in self&amp;&amp;null!=indexedDB},e.isMobileCordova=function(){return"undefined"!=typeof window&amp;&amp;!!(window.cordova||window.phonegap||window.PhoneGap)&amp;&amp;/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(l())},e.isNode=p,e.isNodeSdk=function(){return!0===i.NODE_CLIENT||!0===i.NODE_ADMIN},e.isReactNative=function(){return"object"==typeof navigator&amp;&amp;"ReactNative"===navigator.product},e.isSafari=function(){return!p()&amp;&amp;navigator.userAgent.includes("Safari")&amp;&amp;!navigator.userAgent.includes("Chrome")},e.isUWP=function(){return l().indexOf("MSAppHost/")&gt;=0},e.isValidFormat=function(t){var e=b(t).claims;return!!e&amp;&amp;"object"==typeof e&amp;&amp;e.hasOwnProperty("iat")},e.isValidTimestamp=function(t){var e=b(t).claims,n=Math.floor((new Date).getTime()/1e3),r=0,i=0;return"object"==typeof e&amp;&amp;(e.hasOwnProperty("nbf")?r=e.nbf:e.hasOwnProperty("iat")&amp;&amp;(r=e.iat),i=e.hasOwnProperty("exp")?e.exp:r+86400),!!n&amp;&amp;!!r&amp;&amp;!!i&amp;&amp;n&gt;=r&amp;&amp;n&lt;=i},e.issuedAtTime=function(t){var e=b(t).claims;return"object"==typeof e&amp;&amp;e.hasOwnProperty("iat")?e.iat:null},e.jsonEval=m,e.map=function(t,e,n){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&amp;&amp;(r[i]=e.call(n,t[i],i,t));return r}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */,e.querystring=function(t){for(var e=[],n=function(t,n){Array.isArray(n)?n.forEach(function(n){e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))}):e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))},r=0,i=Object.entries(t);r&lt;i.length;r++){var o=i[r];n(o[0],o[1])}return e.length?"&amp;"+e.join("&amp;"):""},e.querystringDecode=function(t){var e={};return t.replace(/^\?/,"").split("&amp;").forEach(function(t){if(t){var n=t.split("=");e[n[0]]=n[1]}}),e},e.safeGet=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0},e.stringLength=function(t){for(var e=0,n=0;n&lt;t.length;n++){var r=t.charCodeAt(n);r&lt;128?e++:r&lt;2048?e+=2:r&gt;=55296&amp;&amp;r&lt;=56319?(e+=4,n++):e+=3}return e},e.stringToByteArray=function(t){for(var e=[],n=0,r=0;r&lt;t.length;r++){var i=t.charCodeAt(r);if(i&gt;=55296&amp;&amp;i&lt;=56319){var a=i-55296;o(++r&lt;t.length,"Surrogate pair missing trail surrogate."),i=65536+(a&lt;&lt;10)+(t.charCodeAt(r)-56320)}i&lt;128?e[n++]=i:i&lt;2048?(e[n++]=i&gt;&gt;6|192,e[n++]=63&amp;i|128):i&lt;65536?(e[n++]=i&gt;&gt;12|224,e[n++]=i&gt;&gt;6&amp;63|128,e[n++]=63&amp;i|128):(e[n++]=i&gt;&gt;18|240,e[n++]=i&gt;&gt;12&amp;63|128,e[n++]=i&gt;&gt;6&amp;63|128,e[n++]=63&amp;i|128)}return e},e.stringify=function(t){return JSON.stringify(t)},e.validateArgCount=function(t,e,n,r){var i;if(r&lt;e?i="at least "+e:r&gt;n&amp;&amp;(i=0===n?"none":"no more than "+n),i)throw new Error(t+" failed: Was called with "+r+(1===r?" argument.":" arguments.")+" Expects "+i+".")},e.validateCallback=function(t,e,n,r){if((!r||n)&amp;&amp;"function"!=typeof n)throw new Error(E(t,e,r)+"must be a valid function.")},e.validateContextObject=function(t,e,n,r){if((!r||n)&amp;&amp;("object"!=typeof n||null===n))throw new Error(E(t,e,r)+"must be a valid context object.")},e.validateIndexedDBOpenable=function(){return new Promise(function(t,e){try{var n=!0,r="validate-browser-context-for-indexeddb-analytics-module",i=window.indexedDB.open(r);i.onsuccess=function(){i.result.close(),n||window.indexedDB.deleteDatabase(r),t(!0)},i.onupgradeneeded=function(){n=!1},i.onerror=function(){var t;e((null===(t=i.error)||void 0===t?void 0:t.message)||"")}}catch(t){e(t)}})},e.validateNamespace=function(t,e,n,r){if((!r||n)&amp;&amp;"string"!=typeof n)throw new Error(E(t,e,r)+"must be a valid firebase namespace.")}}).call(e,n("DuR2"))},VuKk:function(t,e,n){(function(t){(function(){var e,r=n("O4tu").default,i="function"==typeof Object.defineProperties?Object.defineProperty:function(t,e,n){t!=Array.prototype&amp;&amp;t!=Object.prototype&amp;&amp;(t[e]=n.value)};var o=function(e){e=["object"==typeof window&amp;&amp;window,"object"==typeof self&amp;&amp;self,"object"==typeof t&amp;&amp;t,e];for(var n=0;n&lt;e.length;++n){var r=e[n];if(r&amp;&amp;r.Math==Math)return r}return globalThis}(this);function a(t){var e="undefined"!=typeof Symbol&amp;&amp;Symbol.iterator&amp;&amp;t[Symbol.iterator];return e?e.call(t):{next:function(t){var e=0;return function(){return e&lt;t.length?{done:!1,value:t[e++]}:{done:!0}}}(t)}}!function(t,e){if(e){var n=o;t=t.split(".");for(var r=0;r&lt;t.length-1;r++){var a=t[r];a in n||(n[a]={}),n=n[a]}(e=e(r=n[t=t[t.length-1]]))!=r&amp;&amp;null!=e&amp;&amp;i(n,t,{configurable:!0,writable:!0,value:e})}}("Promise",function(t){function e(t){this.b=0,this.c=void 0,this.a=[];var e=this.f();try{t(e.resolve,e.reject)}catch(t){e.reject(t)}}function n(){this.a=null}function r(t){return t instanceof e?t:new e(function(e){e(t)})}if(t)return t;n.prototype.b=function(t){if(null==this.a){this.a=[];var e=this;this.c(function(){e.g()})}this.a.push(t)};var i=o.setTimeout;n.prototype.c=function(t){i(t,0)},n.prototype.g=function(){for(;this.a&amp;&amp;this.a.length;){var t=this.a;this.a=[];for(var e=0;e&lt;t.length;++e){var n=t[e];t[e]=null;try{n()}catch(t){this.f(t)}}}this.a=null},n.prototype.f=function(t){this.c(function(){throw t})},e.prototype.f=function(){function t(t){return function(r){n||(n=!0,t.call(e,r))}}var e=this,n=!1;return{resolve:t(this.v),reject:t(this.g)}},e.prototype.v=function(t){if(t===this)this.g(new TypeError("A Promise cannot resolve to itself"));else if(t instanceof e)this.o(t);else{t:switch(typeof t){case"object":var n=null!=t;break t;case"function":n=!0;break t;default:n=!1}n?this.m(t):this.h(t)}},e.prototype.m=function(t){var e=void 0;try{e=t.then}catch(t){return void this.g(t)}"function"==typeof e?this.u(e,t):this.h(t)},e.prototype.g=function(t){this.i(2,t)},e.prototype.h=function(t){this.i(1,t)},e.prototype.i=function(t,e){if(0!=this.b)throw Error("Cannot settle("+t+", "+e+"): Promise already settled in state"+this.b);this.b=t,this.c=e,this.l()},e.prototype.l=function(){if(null!=this.a){for(var t=0;t&lt;this.a.length;++t)s.b(this.a[t]);this.a=null}};var s=new n;return e.prototype.o=function(t){var e=this.f();t.Pa(e.resolve,e.reject)},e.prototype.u=function(t,e){var n=this.f();try{t.call(e,n.resolve,n.reject)}catch(t){n.reject(t)}},e.prototype.then=function(t,n){function r(t,e){return"function"==typeof t?function(e){try{i(t(e))}catch(t){o(t)}}:e}var i,o,a=new e(function(t,e){i=t,o=e});return this.Pa(r(t,i),r(n,o)),a},e.prototype.catch=function(t){return this.then(void 0,t)},e.prototype.Pa=function(t,e){function n(){switch(r.b){case 1:t(r.c);break;case 2:e(r.c);break;default:throw Error("Unexpected state: "+r.b)}}var r=this;null==this.a?s.b(n):this.a.push(n)},e.resolve=r,e.reject=function(t){return new e(function(e,n){n(t)})},e.race=function(t){return new e(function(e,n){for(var i=a(t),o=i.next();!o.done;o=i.next())r(o.value).Pa(e,n)})},e.all=function(t){var n=a(t),i=n.next();return i.done?r([]):new e(function(t,e){function o(e){return function(n){a[e]=n,0==--s&amp;&amp;t(a)}}var a=[],s=0;do{a.push(void 0),s++,r(i.value).Pa(o(a.length-1),e),i=n.next()}while(!i.done)})},e});var s=s||{},u=this||self,c=/^[\w+/_-]+[=]{0,2}$/,h=null;function f(){}function l(t){var e=typeof t;if("object"==e){if(!t)return"null";if(t instanceof Array)return"array";if(t instanceof Object)return e;var n=Object.prototype.toString.call(t);if("[object Window]"==n)return"object";if("[object Array]"==n||"number"==typeof t.length&amp;&amp;void 0!==t.splice&amp;&amp;void 0!==t.propertyIsEnumerable&amp;&amp;!t.propertyIsEnumerable("splice"))return"array";if("[object Function]"==n||void 0!==t.call&amp;&amp;void 0!==t.propertyIsEnumerable&amp;&amp;!t.propertyIsEnumerable("call"))return"function"}else if("function"==e&amp;&amp;void 0===t.call)return"object";return e}function p(t){var e=l(t);return"array"==e||"object"==e&amp;&amp;"number"==typeof t.length}function d(t){return"function"==l(t)}function v(t){var e=typeof t;return"object"==e&amp;&amp;null!=t||"function"==e}function y(t){return Object.prototype.hasOwnProperty.call(t,g)&amp;&amp;t[g]||(t[g]=++m)}var g="closure_uid_"+(1e9*Math.random()&gt;&gt;&gt;0),m=0;function b(t,e,n){return t.call.apply(t.bind,arguments)}function w(t,e,n){if(!t)throw Error();if(2&lt;arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),t.apply(e,n)}}return function(){return t.apply(e,arguments)}}function _(t,e,n){return(_=Function.prototype.bind&amp;&amp;-1!=Function.prototype.bind.toString().indexOf("native code")?b:w).apply(null,arguments)}function I(t,e){var n=Array.prototype.slice.call(arguments,1);return function(){var e=n.slice();return e.push.apply(e,arguments),t.apply(this,e)}}var E=Date.now||function(){return+new Date};function T(t,e){function n(){}n.prototype=e.prototype,t.$a=e.prototype,t.prototype=new n,t.prototype.constructor=t}function A(t,e,n){this.code=O+t,this.message=e||k[t]||"",this.a=n||null}function S(t){var e=t&amp;&amp;t.code;return e?new A(e.substring(O.length),t.message,t.serverResponse):null}T(A,Error),A.prototype.w=function(){var t={code:this.code,message:this.message};return this.a&amp;&amp;(t.serverResponse=this.a),t},A.prototype.toJSON=function(){return this.w()};var N,O="auth/",k={"admin-restricted-operation":"This operation is restricted to administrators only.","argument-error":"","app-not-authorized":"This app, identified by the domain where it's hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.","app-not-installed":"The requested mobile application corresponding to the identifier (Android package name or iOS bundle ID) provided is not installed on this device.","captcha-check-failed":"The reCAPTCHA response token provided is either invalid, expired, already used or the domain associated with it does not match the list of whitelisted domains.","code-expired":"The SMS code has expired. Please re-send the verification code to try again.","cordova-not-ready":"Cordova framework is not ready.","cors-unsupported":"This browser is not supported.","credential-already-in-use":"This credential is already associated with a different user account.","custom-token-mismatch":"The custom token corresponds to a different audience.","requires-recent-login":"This operation is sensitive and requires recent authentication. Log in again before retrying this request.","dynamic-link-not-activated":"Please activate Dynamic Links in the Firebase Console and agree to the terms and conditions.","email-change-needs-verification":"Multi-factor users must always have a verified email.","email-already-in-use":"The email address is already in use by another account.","expired-action-code":"The action code has expired. ","cancelled-popup-request":"This operation has been cancelled due to another conflicting popup being opened.","internal-error":"An internal error has occurred.","invalid-app-credential":"The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired.","invalid-app-id":"The mobile app identifier is not registed for the current project.","invalid-user-token":"This user's credential isn't valid for this project. This can happen if the user's token has been tampered with, or if the user isn't for the project associated with this API key.","invalid-auth-event":"An internal error has occurred.","invalid-verification-code":"The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure use the verification code provided by the user.","invalid-continue-uri":"The continue URL provided in the request is invalid.","invalid-cordova-configuration":"The following Cordova plugins must be installed to enable OAuth sign-in: cordova-plugin-buildinfo, cordova-universal-links-plugin, cordova-plugin-browsertab, cordova-plugin-inappbrowser and cordova-plugin-customurlscheme.","invalid-custom-token":"The custom token format is incorrect. Please check the documentation.","invalid-dynamic-link-domain":"The provided dynamic link domain is not configured or authorized for the current project.","invalid-email":"The email address is badly formatted.","invalid-api-key":"Your API key is invalid, please check you have copied it correctly.","invalid-cert-hash":"The SHA-1 certificate hash provided is invalid.","invalid-credential":"The supplied auth credential is malformed or has expired.","invalid-message-payload":"The email template corresponding to this action contains invalid characters in its message. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-multi-factor-session":"The request does not contain a valid proof of first factor successful sign-in.","invalid-oauth-provider":"EmailAuthProvider is not supported for this operation. This operation only supports OAuth providers.","invalid-oauth-client-id":"The OAuth client ID provided is either invalid or does not match the specified API key.","unauthorized-domain":"This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.","invalid-action-code":"The action code is invalid. This can happen if the code is malformed, expired, or has already been used.","wrong-password":"The password is invalid or the user does not have a password.","invalid-persistence-type":"The specified persistence type is invalid. It can only be local, session or none.","invalid-phone-number":"The format of the phone number provided is incorrect. Please enter the phone number in a format that can be parsed into E.164 format. E.164 phone numbers are written in the format [+][country code][subscriber number including area code].","invalid-provider-id":"The specified provider ID is invalid.","invalid-recipient-email":"The email corresponding to this action failed to send as the provided recipient email address is invalid.","invalid-sender":"The email template corresponding to this action contains an invalid sender email or name. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-verification-id":"The verification ID used to create the phone auth credential is invalid.","invalid-tenant-id":"The Auth instance's tenant ID is invalid.","multi-factor-info-not-found":"The user does not have a second factor matching the identifier provided.","multi-factor-auth-required":"Proof of ownership of a second factor is required to complete sign-in.","missing-android-pkg-name":"An Android Package Name must be provided if the Android App is required to be installed.","auth-domain-config-required":"Be sure to include authDomain when calling firebase.initializeApp(), by following the instructions in the Firebase console.","missing-app-credential":"The phone verification request is missing an application verifier assertion. A reCAPTCHA response token needs to be provided.","missing-verification-code":"The phone auth credential was created with an empty SMS verification code.","missing-continue-uri":"A continue URL must be provided in the request.","missing-iframe-start":"An internal error has occurred.","missing-ios-bundle-id":"An iOS Bundle ID must be provided if an App Store ID is provided.","missing-multi-factor-info":"No second factor identifier is provided.","missing-multi-factor-session":"The request is missing proof of first factor successful sign-in.","missing-or-invalid-nonce":"The request does not contain a valid nonce. This can occur if the SHA-256 hash of the provided raw nonce does not match the hashed nonce in the ID token payload.","missing-phone-number":"To send verification codes, provide a phone number for the recipient.","missing-verification-id":"The phone auth credential was created with an empty verification ID.","app-deleted":"This instance of FirebaseApp has been deleted.","account-exists-with-different-credential":"An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address.","network-request-failed":"A network error (such as timeout, interrupted connection or unreachable host) has occurred.","no-auth-event":"An internal error has occurred.","no-such-provider":"User was not linked to an account with the given provider.","null-user":"A null user object was provided as the argument for an operation which requires a non-null user object.","operation-not-allowed":"The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section.","operation-not-supported-in-this-environment":'This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled.',"popup-blocked":"Unable to establish a connection with the popup. It may have been blocked by the browser.","popup-closed-by-user":"The popup has been closed by the user before finalizing the operation.","provider-already-linked":"User can only be linked to one identity for the given provider.","quota-exceeded":"The project's quota for this operation has been exceeded.","redirect-cancelled-by-user":"The redirect operation has been cancelled by the user before finalizing.","redirect-operation-pending":"A redirect sign-in operation is already pending.","rejected-credential":"The request contains malformed or mismatching credentials.","second-factor-already-in-use":"The second factor is already enrolled on this account.","maximum-second-factor-count-exceeded":"The maximum allowed number of second factors on a user has been exceeded.","tenant-id-mismatch":"The provided tenant ID does not match the Auth instance's tenant ID",timeout:"The operation has timed out.","user-token-expired":"The user's credential is no longer valid. The user must sign in again.","too-many-requests":"We have blocked all requests from this device due to unusual activity. Try again later.","unauthorized-continue-uri":"The domain of the continue URL is not whitelisted.  Please whitelist the domain in the Firebase console.","unsupported-first-factor":"Enrolling a second factor or signing in with a multi-factor account requires sign-in with a supported first factor.","unsupported-persistence-type":"The current environment does not support the specified persistence type.","unsupported-tenant-operation":"This operation is not supported in a multi-tenant context.","unverified-email":"The operation requires a verified email.","user-cancelled":"The user did not grant your application the permissions it requested.","user-not-found":"There is no user record corresponding to this identifier. The user may have been deleted.","user-disabled":"The user account has been disabled by an administrator.","user-mismatch":"The supplied credentials do not correspond to the previously signed in user.","user-signed-out":"","weak-password":"The password must be 6 characters long or more.","web-storage-unsupported":"This browser is not supported or 3rd party cookies and data may be disabled."},D={kd:{Sa:"https://staging-identitytoolkit.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/",Ya:"https://staging-securetoken.sandbox.googleapis.com/v1/token",Va:"https://staging-identitytoolkit.sandbox.googleapis.com/v2/",id:"b"},rd:{Sa:"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",Ya:"https://securetoken.googleapis.com/v1/token",Va:"https://identitytoolkit.googleapis.com/v2/",id:"p"},td:{Sa:"https://staging-www.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/",Ya:"https://staging-securetoken.sandbox.googleapis.com/v1/token",Va:"https://staging-identitytoolkit.sandbox.googleapis.com/v2/",id:"s"},ud:{Sa:"https://www-googleapis-test.sandbox.google.com/identitytoolkit/v3/relyingparty/",Ya:"https://test-securetoken.sandbox.googleapis.com/v1/token",Va:"https://test-identitytoolkit.sandbox.googleapis.com/v2/",id:"t"}};function P(t){for(var e in D)if(D[e].id===t)return{firebaseEndpoint:(t=D[e]).Sa,secureTokenEndpoint:t.Ya,identityPlatformEndpoint:t.Va};return null}function R(t){if(!t)return!1;try{return!!t.$goog_Thenable}catch(t){return!1}}function x(t){if(Error.captureStackTrace)Error.captureStackTrace(this,x);else{var e=Error().stack;e&amp;&amp;(this.stack=e)}t&amp;&amp;(this.message=String(t))}function C(t,e){for(var n="",r=(t=t.split("%s")).length-1,i=0;i&lt;r;i++)n+=t[i]+(i&lt;e.length?e[i]:"%s");x.call(this,n+t[r])}function L(t,e){throw new C("Failure"+(t?": "+t:""),Array.prototype.slice.call(arguments,1))}function j(t,e){this.c=t,this.f=e,this.b=0,this.a=null}function M(t,e){t.f(e),100&gt;t.b&amp;&amp;(t.b++,e.next=t.a,t.a=e)}function V(){this.b=this.a=null}N=P("__EID__")?"__EID__":void 0,T(x,Error),x.prototype.name="CustomError",T(C,x),C.prototype.name="AssertionError",j.prototype.get=function(){if(0&lt;this.b){this.b--;var t=this.a;this.a=t.next,t.next=null}else t=this.c();return t};var U=new j(function(){return new q},function(t){t.reset()});function F(){var t=me,e=null;return t.a&amp;&amp;(e=t.a,t.a=t.a.next,t.a||(t.b=null),e.next=null),e}function q(){this.next=this.b=this.a=null}V.prototype.add=function(t,e){var n=U.get();n.set(t,e),this.b?this.b.next=n:this.a=n,this.b=n},q.prototype.set=function(t,e){this.a=t,this.b=e,this.next=null},q.prototype.reset=function(){this.next=this.b=this.a=null};var B=Array.prototype.indexOf?function(t,e){return Array.prototype.indexOf.call(t,e,void 0)}:function(t,e){if("string"==typeof t)return"string"!=typeof e||1!=e.length?-1:t.indexOf(e,0);for(var n=0;n&lt;t.length;n++)if(n in t&amp;&amp;t[n]===e)return n;return-1},G=Array.prototype.forEach?function(t,e,n){Array.prototype.forEach.call(t,e,n)}:function(t,e,n){for(var r=t.length,i="string"==typeof t?t.split(""):t,o=0;o&lt;r;o++)o in i&amp;&amp;e.call(n,i[o],o,t)};var z=Array.prototype.filter?function(t,e){return Array.prototype.filter.call(t,e,void 0)}:function(t,e){for(var n=t.length,r=[],i=0,o="string"==typeof t?t.split(""):t,a=0;a&lt;n;a++)if(a in o){var s=o[a];e.call(void 0,s,a,t)&amp;&amp;(r[i++]=s)}return r},K=Array.prototype.map?function(t,e){return Array.prototype.map.call(t,e,void 0)}:function(t,e){for(var n=t.length,r=Array(n),i="string"==typeof t?t.split(""):t,o=0;o&lt;n;o++)o in i&amp;&amp;(r[o]=e.call(void 0,i[o],o,t));return r},H=Array.prototype.some?function(t,e){return Array.prototype.some.call(t,e,void 0)}:function(t,e){for(var n=t.length,r="string"==typeof t?t.split(""):t,i=0;i&lt;n;i++)if(i in r&amp;&amp;e.call(void 0,r[i],i,t))return!0;return!1};function W(t,e){return 0&lt;=B(t,e)}function X(t,e){var n;return(n=0&lt;=(e=B(t,e)))&amp;&amp;Array.prototype.splice.call(t,e,1),n}function J(t,e){!function(t,e){for(var n="string"==typeof t?t.split(""):t,r=t.length-1;0&lt;=r;--r)r in n&amp;&amp;e.call(void 0,n[r],r,t)}(t,function(n,r){e.call(void 0,n,r,t)&amp;&amp;1==Array.prototype.splice.call(t,r,1).length&amp;&amp;0})}function Y(t){return Array.prototype.concat.apply([],arguments)}function Q(t){var e=t.length;if(0&lt;e){for(var n=Array(e),r=0;r&lt;e;r++)n[r]=t[r];return n}return[]}var $,Z=String.prototype.trim?function(t){return t.trim()}:function(t){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(t)[1]},tt=/&amp;/g,et=/&lt;/g,nt=/&gt;/g,rt=/"/g,it=/'/g,ot=/\x00/g,at=/[\x00&amp;&lt;&gt;"']/;function st(t,e){return-1!=t.indexOf(e)}function ut(t,e){return t&lt;e?-1:t&gt;e?1:0}t:{var ct=u.navigator;if(ct){var ht=ct.userAgent;if(ht){$=ht;break t}}$=""}function ft(t){return st($,t)}function lt(t,e){for(var n in t)e.call(void 0,t[n],n,t)}function pt(t){for(var e in t)return!1;return!0}function dt(t){var e,n={};for(e in t)n[e]=t[e];return n}var vt="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function yt(t,e){for(var n,r,i=1;i&lt;arguments.length;i++){for(n in r=arguments[i])t[n]=r[n];for(var o=0;o&lt;vt.length;o++)n=vt[o],Object.prototype.hasOwnProperty.call(r,n)&amp;&amp;(t[n]=r[n])}}function gt(t,e){t:{try{var n=t&amp;&amp;t.ownerDocument,r=n&amp;&amp;(n.defaultView||n.parentWindow);if((r=r||u).Element&amp;&amp;r.Location){var i=r;break t}}catch(t){}i=null}if(i&amp;&amp;void 0!==i[e]&amp;&amp;(!t||!(t instanceof i[e])&amp;&amp;(t instanceof i.Location||t instanceof i.Element))){if(v(t))try{var o=t.constructor.displayName||t.constructor.name||Object.prototype.toString.call(t)}catch(t){o="&lt;object could not be stringified&gt;"}else o=void 0===t?"undefined":null===t?"null":typeof t;L("Argument is not a %s (or a non-Element, non-Location mock); got: %s",e,o)}}function mt(t,e){this.a=t===_t&amp;&amp;e||"",this.b=wt}function bt(t){return t instanceof mt&amp;&amp;t.constructor===mt&amp;&amp;t.b===wt?t.a:(L("expected object of type Const, got '"+t+"'"),"type_error:Const")}mt.prototype.sa=!0,mt.prototype.ra=function(){return this.a},mt.prototype.toString=function(){return"Const{"+this.a+"}"};var wt={},_t={},It=new mt(_t,"");function Et(t,e){this.a=t===kt&amp;&amp;e||"",this.b=Ot}function Tt(t){return t instanceof Et&amp;&amp;t.constructor===Et&amp;&amp;t.b===Ot?t.a:(L("expected object of type TrustedResourceUrl, got '"+t+"' of type "+l(t)),"type_error:TrustedResourceUrl")}function At(t,e){var n=bt(t);if(!Nt.test(n))throw Error("Invalid TrustedResourceUrl format: "+n);return t=n.replace(St,function(t,r){if(!Object.prototype.hasOwnProperty.call(e,r))throw Error('Found marker, "'+r+'", in format string, "'+n+'", but no valid label mapping found in args: '+JSON.stringify(e));return(t=e[r])instanceof mt?bt(t):encodeURIComponent(String(t))}),new Et(kt,t)}Et.prototype.sa=!0,Et.prototype.ra=function(){return this.a.toString()},Et.prototype.toString=function(){return"TrustedResourceUrl{"+this.a+"}"};var St=/%{(\w+)}/g,Nt=/^((https:)?\/\/[0-9a-z.:[\]-]+\/|\/[^/\\]|[^:/\\%]+\/|[^:/\\%]*[?#]|about:blank#)/i,Ot={},kt={};function Dt(t,e){this.a=t===Lt&amp;&amp;e||"",this.b=Ct}function Pt(t){return t instanceof Dt&amp;&amp;t.constructor===Dt&amp;&amp;t.b===Ct?t.a:(L("expected object of type SafeUrl, got '"+t+"' of type "+l(t)),"type_error:SafeUrl")}Dt.prototype.sa=!0,Dt.prototype.ra=function(){return this.a.toString()},Dt.prototype.toString=function(){return"SafeUrl{"+this.a+"}"};var Rt=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;function xt(t){return t instanceof Dt?t:(t="object"==typeof t&amp;&amp;t.sa?t.ra():String(t),Rt.test(t)||(t="about:invalid#zClosurez"),new Dt(Lt,t))}var Ct={},Lt={};function jt(){this.a="",this.b=Vt}function Mt(t){return t instanceof jt&amp;&amp;t.constructor===jt&amp;&amp;t.b===Vt?t.a:(L("expected object of type SafeHtml, got '"+t+"' of type "+l(t)),"type_error:SafeHtml")}jt.prototype.sa=!0,jt.prototype.ra=function(){return this.a.toString()},jt.prototype.toString=function(){return"SafeHtml{"+this.a+"}"};var Vt={};function Ut(t){var e=new jt;return e.a=t,e}Ut("&lt;!DOCTYPE html&gt;");var Ft=Ut("");function qt(t,e){for(var n=t.split("%s"),r="",i=Array.prototype.slice.call(arguments,1);i.length&amp;&amp;1&lt;n.length;)r+=n.shift()+i.shift();return r+n.join("%s")}function Bt(t){return at.test(t)&amp;&amp;(-1!=t.indexOf("&amp;")&amp;&amp;(t=t.replace(tt,"&amp;amp;")),-1!=t.indexOf("&lt;")&amp;&amp;(t=t.replace(et,"&amp;lt;")),-1!=t.indexOf("&gt;")&amp;&amp;(t=t.replace(nt,"&amp;gt;")),-1!=t.indexOf('"')&amp;&amp;(t=t.replace(rt,"&amp;quot;")),-1!=t.indexOf("'")&amp;&amp;(t=t.replace(it,"&amp;#39;")),-1!=t.indexOf("\0")&amp;&amp;(t=t.replace(ot,"&amp;#0;"))),t}function Gt(t){return Gt[" "](t),t}Ut("&lt;br&gt;"),Gt[" "]=f;var zt,Kt,Ht=ft("Opera"),Wt=ft("Trident")||ft("MSIE"),Xt=ft("Edge"),Jt=Xt||Wt,Yt=ft("Gecko")&amp;&amp;!(st($.toLowerCase(),"webkit")&amp;&amp;!ft("Edge"))&amp;&amp;!(ft("Trident")||ft("MSIE"))&amp;&amp;!ft("Edge"),Qt=st($.toLowerCase(),"webkit")&amp;&amp;!ft("Edge");function $t(){var t=u.document;return t?t.documentMode:void 0}t:{var Zt="",te=(Kt=$,Yt?/rv:([^\);]+)(\)|;)/.exec(Kt):Xt?/Edge\/([\d\.]+)/.exec(Kt):Wt?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(Kt):Qt?/WebKit\/(\S+)/.exec(Kt):Ht?/(?:Version)[ \/]?(\S+)/.exec(Kt):void 0);if(te&amp;&amp;(Zt=te?te[1]:""),Wt){var ee=$t();if(null!=ee&amp;&amp;ee&gt;parseFloat(Zt)){zt=String(ee);break t}}zt=Zt}var ne,re={};function ie(t){return function(t,e){var n=re;return Object.prototype.hasOwnProperty.call(n,t)?n[t]:n[t]=e(t)}(t,function(){for(var e=0,n=Z(String(zt)).split("."),r=Z(String(t)).split("."),i=Math.max(n.length,r.length),o=0;0==e&amp;&amp;o&lt;i;o++){var a=n[o]||"",s=r[o]||"";do{if(a=/(\d*)(\D*)(.*)/.exec(a)||["","","",""],s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],0==a[0].length&amp;&amp;0==s[0].length)break;e=ut(0==a[1].length?0:parseInt(a[1],10),0==s[1].length?0:parseInt(s[1],10))||ut(0==a[2].length,0==s[2].length)||ut(a[2],s[2]),a=a[3],s=s[3]}while(0==e)}return 0&lt;=e})}ne=u.document&amp;&amp;Wt?$t():void 0;try{new self.OffscreenCanvas(0,0).getContext("2d")}catch(Kt){}var oe=!Wt||9&lt;=Number(ne);function ae(t){var e=document;return"string"==typeof t?e.getElementById(t):t}function se(t,e){lt(e,function(e,n){e&amp;&amp;"object"==typeof e&amp;&amp;e.sa&amp;&amp;(e=e.ra()),"style"==n?t.style.cssText=e:"class"==n?t.className=e:"for"==n?t.htmlFor=e:he.hasOwnProperty(n)?t.setAttribute(he[n],e):0==n.lastIndexOf("aria-",0)||0==n.lastIndexOf("data-",0)?t.setAttribute(n,e):t[n]=e})}var ue,ce,he={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};function fe(t,e,n){var r=arguments,i=document,o=String(r[0]),a=r[1];if(!oe&amp;&amp;a&amp;&amp;(a.name||a.type)){if(o=["&lt;",o],a.name&amp;&amp;o.push(' name="',Bt(a.name),'"'),a.type){o.push(' type="',Bt(a.type),'"');var s={};yt(s,a),delete s.type,a=s}o.push("&gt;"),o=o.join("")}return o=le(i,o),a&amp;&amp;("string"==typeof a?o.className=a:Array.isArray(a)?o.className=a.join(" "):se(o,a)),2&lt;r.length&amp;&amp;function(t,e,n){function r(n){n&amp;&amp;e.appendChild("string"==typeof n?t.createTextNode(n):n)}for(var i=2;i&lt;n.length;i++){var o=n[i];!p(o)||v(o)&amp;&amp;0&lt;o.nodeType?r(o):G(pe(o)?Q(o):o,r)}}(i,o,r),o}function le(t,e){return e=String(e),"application/xhtml+xml"===t.contentType&amp;&amp;(e=e.toLowerCase()),t.createElement(e)}function pe(t){if(t&amp;&amp;"number"==typeof t.length){if(v(t))return"function"==typeof t.item||"string"==typeof t.item;if(d(t))return"function"==typeof t.item}return!1}function de(t){u.setTimeout(function(){throw t},0)}function ve(){var t=u.MessageChannel;if(void 0===t&amp;&amp;"undefined"!=typeof window&amp;&amp;window.postMessage&amp;&amp;window.addEventListener&amp;&amp;!ft("Presto")&amp;&amp;(t=function(){var t,e,n=le(document,"IFRAME");n.style.display="none",t=n,e=new Et(kt,bt(It)),gt(t,"HTMLIFrameElement"),t.src=Tt(e).toString(),document.documentElement.appendChild(n);var r=n.contentWindow;(n=r.document).open(),n.write(Mt(Ft)),n.close();var i="callImmediate"+Math.random(),o="file:"==r.location.protocol?"*":r.location.protocol+"//"+r.location.host;n=_(function(t){"*"!=o&amp;&amp;t.origin!=o||t.data!=i||this.port1.onmessage()},this),r.addEventListener("message",n,!1),this.port1={},this.port2={postMessage:function(){r.postMessage(i,o)}}}),void 0!==t&amp;&amp;!ft("Trident")&amp;&amp;!ft("MSIE")){var e=new t,n={},r=n;return e.port1.onmessage=function(){if(void 0!==n.next){var t=(n=n.next).Fb;n.Fb=null,t()}},function(t){r.next={Fb:t},r=r.next,e.port2.postMessage(0)}}return function(t){u.setTimeout(t,0)}}function ye(t,e){ce||function(){if(u.Promise&amp;&amp;u.Promise.resolve){var t=u.Promise.resolve(void 0);ce=function(){t.then(be)}}else ce=function(){var t=be;!d(u.setImmediate)||u.Window&amp;&amp;u.Window.prototype&amp;&amp;!ft("Edge")&amp;&amp;u.Window.prototype.setImmediate==u.setImmediate?(ue||(ue=ve()),ue(t)):u.setImmediate(t)}}(),ge||(ce(),ge=!0),me.add(t,e)}var ge=!1,me=new V;function be(){for(var t;t=F();){try{t.a.call(t.b)}catch(t){de(t)}M(U,t)}ge=!1}function we(t,e){if(this.a=_e,this.i=void 0,this.f=this.b=this.c=null,this.g=this.h=!1,t!=f)try{var n=this;t.call(e,function(t){xe(n,Ie,t)},function(t){if(!(t instanceof Fe))try{if(t instanceof Error)throw t;throw Error("Promise rejected.")}catch(t){}xe(n,Ee,t)})}catch(t){xe(this,Ee,t)}}var _e=0,Ie=2,Ee=3;function Te(){this.next=this.f=this.b=this.g=this.a=null,this.c=!1}Te.prototype.reset=function(){this.f=this.b=this.g=this.a=null,this.c=!1};var Ae=new j(function(){return new Te},function(t){t.reset()});function Se(t,e,n){var r=Ae.get();return r.g=t,r.b=e,r.f=n,r}function Ne(t){if(t instanceof we)return t;var e=new we(f);return xe(e,Ie,t),e}function Oe(t){return new we(function(e,n){n(t)})}function ke(t,e,n){Ce(t,e,n,null)||ye(I(e,t))}function De(t){return new we(function(e){var n=t.length,r=[];if(n)for(var i=function(t,i,o){n--,r[t]=i?{Ob:!0,value:o}:{Ob:!1,reason:o},0==n&amp;&amp;e(r)},o=0;o&lt;t.length;o++)ke(t[o],I(i,o,!0),I(i,o,!1));else e(r)})}function Pe(t,e){t.b||t.a!=Ie&amp;&amp;t.a!=Ee||Le(t),t.f?t.f.next=e:t.b=e,t.f=e}function Re(t,e,n,r){var i=Se(null,null,null);return i.a=new we(function(t,o){i.g=e?function(n){try{var i=e.call(r,n);t(i)}catch(t){o(t)}}:t,i.b=n?function(e){try{var i=n.call(r,e);void 0===i&amp;&amp;e instanceof Fe?o(e):t(i)}catch(t){o(t)}}:o}),i.a.c=t,Pe(t,i),i.a}function xe(t,e,n){t.a==_e&amp;&amp;(t===n&amp;&amp;(e=Ee,n=new TypeError("Promise cannot resolve to itself")),t.a=1,Ce(n,t.Zc,t.$c,t)||(t.i=n,t.a=e,t.c=null,Le(t),e!=Ee||n instanceof Fe||function(t,e){t.g=!0,ye(function(){t.g&amp;&amp;Ue.call(null,e)})}(t,n)))}function Ce(t,e,n,r){if(t instanceof we)return Pe(t,Se(e||f,n||null,r)),!0;if(R(t))return t.then(e,n,r),!0;if(v(t))try{var i=t.then;if(d(i))return function(t,e,n,r,i){function o(t){a||(a=!0,r.call(i,t))}var a=!1;try{e.call(t,function(t){a||(a=!0,n.call(i,t))},o)}catch(t){o(t)}}(t,i,e,n,r),!0}catch(t){return n.call(r,t),!0}return!1}function Le(t){t.h||(t.h=!0,ye(t.fc,t))}function je(t){var e=null;return t.b&amp;&amp;(e=t.b,t.b=e.next,e.next=null),t.b||(t.f=null),e}function Me(t,e,n,r){if(n==Ee&amp;&amp;e.b&amp;&amp;!e.c)for(;t&amp;&amp;t.g;t=t.c)t.g=!1;if(e.a)e.a.c=null,Ve(e,n,r);else try{e.c?e.g.call(e.f):Ve(e,n,r)}catch(t){Ue.call(null,t)}M(Ae,e)}function Ve(t,e,n){e==Ie?t.g.call(t.f,n):t.b&amp;&amp;t.b.call(t.f,n)}we.prototype.then=function(t,e,n){return Re(this,d(t)?t:null,d(e)?e:null,n)},we.prototype.$goog_Thenable=!0,(e=we.prototype).na=function(t,e){return(t=Se(t,t,e)).c=!0,Pe(this,t),this},e.s=function(t,e){return Re(this,null,t,e)},e.cancel=function(t){if(this.a==_e){var e=new Fe(t);ye(function(){!function t(e,n){if(e.a==_e)if(e.c){var r=e.c;if(r.b){for(var i=0,o=null,a=null,s=r.b;s&amp;&amp;(s.c||(i++,s.a==e&amp;&amp;(o=s),!(o&amp;&amp;1&lt;i)));s=s.next)o||(a=s);o&amp;&amp;(r.a==_e&amp;&amp;1==i?t(r,n):(a?((i=a).next==r.f&amp;&amp;(r.f=i),i.next=i.next.next):je(r),Me(r,o,Ee,n)))}e.c=null}else xe(e,Ee,n)}(this,e)},this)}},e.Zc=function(t){this.a=_e,xe(this,Ie,t)},e.$c=function(t){this.a=_e,xe(this,Ee,t)},e.fc=function(){for(var t;t=je(this);)Me(this,t,this.a,this.i);this.h=!1};var Ue=de;function Fe(t){x.call(this,t)}function qe(){0!=Be&amp;&amp;(Ge[y(this)]=this),this.xa=this.xa,this.oa=this.oa}T(Fe,x),Fe.prototype.name="cancel";var Be=0,Ge={};function ze(t){if(!t.xa&amp;&amp;(t.xa=!0,t.Da(),0!=Be)){var e=y(t);if(0!=Be&amp;&amp;t.oa&amp;&amp;0&lt;t.oa.length)throw Error(t+" did not empty its onDisposeCallbacks queue. This probably means it overrode dispose() or disposeInternal() without calling the superclass' method.");delete Ge[e]}}qe.prototype.xa=!1,qe.prototype.Da=function(){if(this.oa)for(;this.oa.length;)this.oa.shift()()};var Ke=Object.freeze||function(t){return t},He=!Wt||9&lt;=Number(ne),We=Wt&amp;&amp;!ie("9"),Xe=function(){if(!u.addEventListener||!Object.defineProperty)return!1;var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}});try{u.addEventListener("test",f,e),u.removeEventListener("test",f,e)}catch(t){}return t}();function Je(t,e){this.type=t,this.b=this.target=e,this.defaultPrevented=!1}function Ye(t,e){if(Je.call(this,t?t.type:""),this.relatedTarget=this.b=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.a=null,t){var n=this.type=t.type,r=t.changedTouches&amp;&amp;t.changedTouches.length?t.changedTouches[0]:null;if(this.target=t.target||t.srcElement,this.b=e,e=t.relatedTarget){if(Yt){t:{try{Gt(e.nodeName);var i=!0;break t}catch(t){}i=!1}i||(e=null)}}else"mouseover"==n?e=t.fromElement:"mouseout"==n&amp;&amp;(e=t.toElement);this.relatedTarget=e,r?(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=void 0!==t.clientX?t.clientX:t.pageX,this.clientY=void 0!==t.clientY?t.clientY:t.pageY,this.screenX=t.screenX||0,this.screenY=t.screenY||0),this.button=t.button,this.key=t.key||"",this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.pointerId=t.pointerId||0,this.pointerType="string"==typeof t.pointerType?t.pointerType:Qe[t.pointerType]||"",this.a=t,t.defaultPrevented&amp;&amp;this.preventDefault()}}Je.prototype.preventDefault=function(){this.defaultPrevented=!0},T(Ye,Je);var Qe=Ke({2:"touch",3:"pen",4:"mouse"});Ye.prototype.preventDefault=function(){Ye.$a.preventDefault.call(this);var t=this.a;if(t.preventDefault)t.preventDefault();else if(t.returnValue=!1,We)try{(t.ctrlKey||112&lt;=t.keyCode&amp;&amp;123&gt;=t.keyCode)&amp;&amp;(t.keyCode=-1)}catch(t){}},Ye.prototype.g=function(){return this.a};var $e="closure_listenable_"+(1e6*Math.random()|0),Ze=0;function tn(t){t.va=!0,t.listener=null,t.proxy=null,t.src=null,t.Ua=null}function en(t){this.src=t,this.a={},this.b=0}function nn(t,e){var n=e.type;n in t.a&amp;&amp;X(t.a[n],e)&amp;&amp;(tn(e),0==t.a[n].length&amp;&amp;(delete t.a[n],t.b--))}function rn(t,e,n,r){for(var i=0;i&lt;t.length;++i){var o=t[i];if(!o.va&amp;&amp;o.listener==e&amp;&amp;o.capture==!!n&amp;&amp;o.Ua==r)return i}return-1}en.prototype.add=function(t,e,n,r,i){var o=t.toString();(t=this.a[o])||(t=this.a[o]=[],this.b++);var a=rn(t,e,r,i);return-1&lt;a?(e=t[a],n||(e.Oa=!1)):((e=new function(t,e,n,r,i){this.listener=t,this.proxy=null,this.src=e,this.type=n,this.capture=!!r,this.Ua=i,this.key=++Ze,this.va=this.Oa=!1}(e,this.src,o,!!r,i)).Oa=n,t.push(e)),e};var on="closure_lm_"+(1e6*Math.random()|0),an={};function sn(t,e,n,r,i){if(r&amp;&amp;r.once)cn(t,e,n,r,i);else if(Array.isArray(e))for(var o=0;o&lt;e.length;o++)sn(t,e[o],n,r,i);else n=mn(n),t&amp;&amp;t[$e]?wn(t,e,n,v(r)?!!r.capture:!!r,i):un(t,e,n,!1,r,i)}function un(t,e,n,r,i,o){if(!e)throw Error("Invalid event type");var a=v(i)?!!i.capture:!!i,s=yn(t);if(s||(t[on]=s=new en(t)),!(n=s.add(e,n,r,a,o)).proxy){if(r=function(){var t=vn,e=He?function(n){return t.call(e.src,e.listener,n)}:function(n){if(!(n=t.call(e.src,e.listener,n)))return n};return e}(),n.proxy=r,r.src=t,r.listener=n,t.addEventListener)Xe||(i=a),void 0===i&amp;&amp;(i=!1),t.addEventListener(e.toString(),r,i);else if(t.attachEvent)t.attachEvent(ln(e.toString()),r);else{if(!t.addListener||!t.removeListener)throw Error("addEventListener and attachEvent are unavailable.");t.addListener(r)}0}}function cn(t,e,n,r,i){if(Array.isArray(e))for(var o=0;o&lt;e.length;o++)cn(t,e[o],n,r,i);else n=mn(n),t&amp;&amp;t[$e]?_n(t,e,n,v(r)?!!r.capture:!!r,i):un(t,e,n,!0,r,i)}function hn(t,e,n,r,i){if(Array.isArray(e))for(var o=0;o&lt;e.length;o++)hn(t,e[o],n,r,i);else r=v(r)?!!r.capture:!!r,n=mn(n),t&amp;&amp;t[$e]?(t=t.v,(e=String(e).toString())in t.a&amp;&amp;(-1&lt;(n=rn(o=t.a[e],n,r,i))&amp;&amp;(tn(o[n]),Array.prototype.splice.call(o,n,1),0==o.length&amp;&amp;(delete t.a[e],t.b--)))):t&amp;&amp;(t=yn(t))&amp;&amp;(e=t.a[e.toString()],t=-1,e&amp;&amp;(t=rn(e,n,r,i)),(n=-1&lt;t?e[t]:null)&amp;&amp;fn(n))}function fn(t){if("number"!=typeof t&amp;&amp;t&amp;&amp;!t.va){var e=t.src;if(e&amp;&amp;e[$e])nn(e.v,t);else{var n=t.type,r=t.proxy;e.removeEventListener?e.removeEventListener(n,r,t.capture):e.detachEvent?e.detachEvent(ln(n),r):e.addListener&amp;&amp;e.removeListener&amp;&amp;e.removeListener(r),0,(n=yn(e))?(nn(n,t),0==n.b&amp;&amp;(n.src=null,e[on]=null)):tn(t)}}}function ln(t){return t in an?an[t]:an[t]="on"+t}function pn(t,e,n,r){var i=!0;if((t=yn(t))&amp;&amp;(e=t.a[e.toString()]))for(e=e.concat(),t=0;t&lt;e.length;t++){var o=e[t];o&amp;&amp;o.capture==n&amp;&amp;!o.va&amp;&amp;(o=dn(o,r),i=i&amp;&amp;!1!==o)}return i}function dn(t,e){var n=t.listener,r=t.Ua||t.src;return t.Oa&amp;&amp;fn(t),n.call(r,e)}function vn(t,e){if(t.va)return!0;if(!He){if(!e)t:{e=["window","event"];for(var n=u,r=0;r&lt;e.length;r++)if(null==(n=n[e[r]])){e=null;break t}e=n}if(e=new Ye(r=e,this),n=!0,!(0&gt;r.keyCode||void 0!=r.returnValue)){t:{var i=!1;if(0==r.keyCode)try{r.keyCode=-1;break t}catch(t){i=!0}(i||void 0==r.returnValue)&amp;&amp;(r.returnValue=!0)}for(r=[],i=e.b;i;i=i.parentNode)r.push(i);for(t=t.type,i=r.length-1;0&lt;=i;i--){e.b=r[i];var o=pn(r[i],t,!0,e);n=n&amp;&amp;o}for(i=0;i&lt;r.length;i++)e.b=r[i],o=pn(r[i],t,!1,e),n=n&amp;&amp;o}return n}return dn(t,new Ye(e,this))}function yn(t){return(t=t[on])instanceof en?t:null}var gn="__closure_events_fn_"+(1e9*Math.random()&gt;&gt;&gt;0);function mn(t){return d(t)?t:(t[gn]||(t[gn]=function(e){return t.handleEvent(e)}),t[gn])}function bn(){qe.call(this),this.v=new en(this),this.$b=this,this.fb=null}function wn(t,e,n,r,i){t.v.add(String(e),n,!1,r,i)}function _n(t,e,n,r,i){t.v.add(String(e),n,!0,r,i)}function In(t,e,n,r){if(!(e=t.v.a[String(e)]))return!0;e=e.concat();for(var i=!0,o=0;o&lt;e.length;++o){var a=e[o];if(a&amp;&amp;!a.va&amp;&amp;a.capture==n){var s=a.listener,u=a.Ua||a.src;a.Oa&amp;&amp;nn(t.v,a),i=!1!==s.call(u,r)&amp;&amp;i}}return i&amp;&amp;!r.defaultPrevented}function En(t,e,n){if(d(t))n&amp;&amp;(t=_(t,n));else{if(!t||"function"!=typeof t.handleEvent)throw Error("Invalid listener argument");t=_(t.handleEvent,t)}return 2147483647&lt;Number(e)?-1:u.setTimeout(t,e||0)}function Tn(t){var e=null;return new we(function(n,r){-1==(e=En(function(){n(void 0)},t))&amp;&amp;r(Error("Failed to schedule timer."))}).s(function(t){throw u.clearTimeout(e),t})}function An(t){if(t.V&amp;&amp;"function"==typeof t.V)return t.V();if("string"==typeof t)return t.split("");if(p(t)){for(var e=[],n=t.length,r=0;r&lt;n;r++)e.push(t[r]);return e}for(r in e=[],n=0,t)e[n++]=t[r];return e}function Sn(t){if(t.Y&amp;&amp;"function"==typeof t.Y)return t.Y();if(!t.V||"function"!=typeof t.V){if(p(t)||"string"==typeof t){var e=[];t=t.length;for(var n=0;n&lt;t;n++)e.push(n);return e}for(var r in e=[],n=0,t)e[n++]=r;return e}}function Nn(t,e){this.b={},this.a=[],this.c=0;var n=arguments.length;if(1&lt;n){if(n%2)throw Error("Uneven number of arguments");for(var r=0;r&lt;n;r+=2)this.set(arguments[r],arguments[r+1])}else if(t)if(t instanceof Nn)for(n=t.Y(),r=0;r&lt;n.length;r++)this.set(n[r],t.get(n[r]));else for(r in t)this.set(r,t[r])}function On(t){if(t.c!=t.a.length){for(var e=0,n=0;e&lt;t.a.length;){var r=t.a[e];kn(t.b,r)&amp;&amp;(t.a[n++]=r),e++}t.a.length=n}if(t.c!=t.a.length){var i={};for(n=e=0;e&lt;t.a.length;)kn(i,r=t.a[e])||(t.a[n++]=r,i[r]=1),e++;t.a.length=n}}function kn(t,e){return Object.prototype.hasOwnProperty.call(t,e)}T(bn,qe),bn.prototype[$e]=!0,bn.prototype.addEventListener=function(t,e,n,r){sn(this,t,e,n,r)},bn.prototype.removeEventListener=function(t,e,n,r){hn(this,t,e,n,r)},bn.prototype.dispatchEvent=function(t){var e,n=this.fb;if(n)for(e=[];n;n=n.fb)e.push(n);n=this.$b;var r=t.type||t;if("string"==typeof t)t=new Je(t,n);else if(t instanceof Je)t.target=t.target||n;else{var i=t;yt(t=new Je(r,n),i)}if(i=!0,e)for(var o=e.length-1;0&lt;=o;o--){var a=t.b=e[o];i=In(a,r,!0,t)&amp;&amp;i}if(i=In(a=t.b=n,r,!0,t)&amp;&amp;i,i=In(a,r,!1,t)&amp;&amp;i,e)for(o=0;o&lt;e.length;o++)i=In(a=t.b=e[o],r,!1,t)&amp;&amp;i;return i},bn.prototype.Da=function(){if(bn.$a.Da.call(this),this.v){var t,e=this.v;for(t in e.a){for(var n=e.a[t],r=0;r&lt;n.length;r++)0,tn(n[r]);delete e.a[t],e.b--}}this.fb=null},(e=Nn.prototype).V=function(){On(this);for(var t=[],e=0;e&lt;this.a.length;e++)t.push(this.b[this.a[e]]);return t},e.Y=function(){return On(this),this.a.concat()},e.clear=function(){this.b={},this.c=this.a.length=0},e.get=function(t,e){return kn(this.b,t)?this.b[t]:e},e.set=function(t,e){kn(this.b,t)||(this.c++,this.a.push(t)),this.b[t]=e},e.forEach=function(t,e){for(var n=this.Y(),r=0;r&lt;n.length;r++){var i=n[r],o=this.get(i);t.call(e,o,i,this)}};var Dn=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/\\#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function Pn(t,e){var n;this.a=this.l=this.f="",this.g=null,this.h=this.c="",this.i=!1,t instanceof Pn?(this.i=void 0!==e?e:t.i,Rn(this,t.f),this.l=t.l,this.a=t.a,xn(this,t.g),this.c=t.c,Cn(this,Zn(t.b)),this.h=t.h):t&amp;&amp;(n=String(t).match(Dn))?(this.i=!!e,Rn(this,n[1]||"",!0),this.l=Un(n[2]||""),this.a=Un(n[3]||"",!0),xn(this,n[4]),this.c=Un(n[5]||"",!0),Cn(this,n[6]||"",!0),this.h=Un(n[7]||"")):(this.i=!!e,this.b=new Wn(null,this.i))}function Rn(t,e,n){t.f=n?Un(e,!0):e,t.f&amp;&amp;(t.f=t.f.replace(/:$/,""))}function xn(t,e){if(e){if(e=Number(e),isNaN(e)||0&gt;e)throw Error("Bad port number "+e);t.g=e}else t.g=null}function Cn(t,e,n){e instanceof Wn?(t.b=e,function(t,e){e&amp;&amp;!t.f&amp;&amp;(Xn(t),t.c=null,t.a.forEach(function(t,e){var n=e.toLowerCase();e!=n&amp;&amp;(Yn(this,e),$n(this,n,t))},t)),t.f=e}(t.b,t.i)):(n||(e=Fn(e,Kn)),t.b=new Wn(e,t.i))}function Ln(t,e,n){t.b.set(e,n)}function jn(t,e){return t.b.get(e)}function Mn(t){return t instanceof Pn?new Pn(t):new Pn(t,void 0)}function Vn(t,e,n,r){var i=new Pn(null,void 0);return t&amp;&amp;Rn(i,t),e&amp;&amp;(i.a=e),n&amp;&amp;xn(i,n),r&amp;&amp;(i.c=r),i}function Un(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function Fn(t,e,n){return"string"==typeof t?(t=encodeURI(t).replace(e,qn),n&amp;&amp;(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function qn(t){return"%"+((t=t.charCodeAt(0))&gt;&gt;4&amp;15).toString(16)+(15&amp;t).toString(16)}Pn.prototype.toString=function(){var t=[],e=this.f;e&amp;&amp;t.push(Fn(e,Bn,!0),":");var n=this.a;return(n||"file"==e)&amp;&amp;(t.push("//"),(e=this.l)&amp;&amp;t.push(Fn(e,Bn,!0),"@"),t.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.g)&amp;&amp;t.push(":",String(n))),(n=this.c)&amp;&amp;(this.a&amp;&amp;"/"!=n.charAt(0)&amp;&amp;t.push("/"),t.push(Fn(n,"/"==n.charAt(0)?zn:Gn,!0))),(n=this.b.toString())&amp;&amp;t.push("?",n),(n=this.h)&amp;&amp;t.push("#",Fn(n,Hn)),t.join("")},Pn.prototype.resolve=function(t){var e=new Pn(this),n=!!t.f;n?Rn(e,t.f):n=!!t.l,n?e.l=t.l:n=!!t.a,n?e.a=t.a:n=null!=t.g;var r=t.c;if(n)xn(e,t.g);else if(n=!!t.c){if("/"!=r.charAt(0))if(this.a&amp;&amp;!this.c)r="/"+r;else{var i=e.c.lastIndexOf("/");-1!=i&amp;&amp;(r=e.c.substr(0,i+1)+r)}if(".."==(i=r)||"."==i)r="";else if(st(i,"./")||st(i,"/.")){r=0==i.lastIndexOf("/",0),i=i.split("/");for(var o=[],a=0;a&lt;i.length;){var s=i[a++];"."==s?r&amp;&amp;a==i.length&amp;&amp;o.push(""):".."==s?((1&lt;o.length||1==o.length&amp;&amp;""!=o[0])&amp;&amp;o.pop(),r&amp;&amp;a==i.length&amp;&amp;o.push("")):(o.push(s),r=!0)}r=o.join("/")}else r=i}return n?e.c=r:n=""!==t.b.toString(),n?Cn(e,Zn(t.b)):n=!!t.h,n&amp;&amp;(e.h=t.h),e};var Bn=/[#\/\?@]/g,Gn=/[#\?:]/g,zn=/[#\?]/g,Kn=/[#\?@]/g,Hn=/#/g;function Wn(t,e){this.b=this.a=null,this.c=t||null,this.f=!!e}function Xn(t){t.a||(t.a=new Nn,t.b=0,t.c&amp;&amp;function(t,e){if(t){t=t.split("&amp;");for(var n=0;n&lt;t.length;n++){var r=t[n].indexOf("="),i=null;if(0&lt;=r){var o=t[n].substring(0,r);i=t[n].substring(r+1)}else o=t[n];e(o,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(t.c,function(e,n){t.add(decodeURIComponent(e.replace(/\+/g," ")),n)}))}function Jn(t){var e=Sn(t);if(void 0===e)throw Error("Keys are undefined");var n=new Wn(null,void 0);t=An(t);for(var r=0;r&lt;e.length;r++){var i=e[r],o=t[r];Array.isArray(o)?$n(n,i,o):n.add(i,o)}return n}function Yn(t,e){Xn(t),e=tr(t,e),kn(t.a.b,e)&amp;&amp;(t.c=null,t.b-=t.a.get(e).length,kn((t=t.a).b,e)&amp;&amp;(delete t.b[e],t.c--,t.a.length&gt;2*t.c&amp;&amp;On(t)))}function Qn(t,e){return Xn(t),e=tr(t,e),kn(t.a.b,e)}function $n(t,e,n){Yn(t,e),0&lt;n.length&amp;&amp;(t.c=null,t.a.set(tr(t,e),Q(n)),t.b+=n.length)}function Zn(t){var e=new Wn;return e.c=t.c,t.a&amp;&amp;(e.a=new Nn(t.a),e.b=t.b),e}function tr(t,e){return e=String(e),t.f&amp;&amp;(e=e.toLowerCase()),e}function er(t){var e=[];return function t(e,n,r){if(null==n)r.push("null");else{if("object"==typeof n){if(Array.isArray(n)){var i=n;n=i.length,r.push("[");for(var o="",a=0;a&lt;n;a++)r.push(o),t(e,i[a],r),o=",";return void r.push("]")}if(!(n instanceof String||n instanceof Number||n instanceof Boolean)){for(i in r.push("{"),o="",n)Object.prototype.hasOwnProperty.call(n,i)&amp;&amp;("function"!=typeof(a=n[i])&amp;&amp;(r.push(o),ir(i,r),r.push(":"),t(e,a,r),o=","));return void r.push("}")}n=n.valueOf()}switch(typeof n){case"string":ir(n,r);break;case"number":r.push(isFinite(n)&amp;&amp;!isNaN(n)?String(n):"null");break;case"boolean":r.push(String(n));break;case"function":r.push("null");break;default:throw Error("Unknown type: "+typeof n)}}}(new function(){},t,e),e.join("")}(e=Wn.prototype).add=function(t,e){Xn(this),this.c=null,t=tr(this,t);var n=this.a.get(t);return n||this.a.set(t,n=[]),n.push(e),this.b+=1,this},e.clear=function(){this.a=this.c=null,this.b=0},e.forEach=function(t,e){Xn(this),this.a.forEach(function(n,r){G(n,function(n){t.call(e,n,r,this)},this)},this)},e.Y=function(){Xn(this);for(var t=this.a.V(),e=this.a.Y(),n=[],r=0;r&lt;e.length;r++)for(var i=t[r],o=0;o&lt;i.length;o++)n.push(e[r]);return n},e.V=function(t){Xn(this);var e=[];if("string"==typeof t)Qn(this,t)&amp;&amp;(e=Y(e,this.a.get(tr(this,t))));else{t=this.a.V();for(var n=0;n&lt;t.length;n++)e=Y(e,t[n])}return e},e.set=function(t,e){return Xn(this),this.c=null,Qn(this,t=tr(this,t))&amp;&amp;(this.b-=this.a.get(t).length),this.a.set(t,[e]),this.b+=1,this},e.get=function(t,e){return t&amp;&amp;0&lt;(t=this.V(t)).length?String(t[0]):e},e.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var t=[],e=this.a.Y(),n=0;n&lt;e.length;n++){var r=e[n],i=encodeURIComponent(String(r));r=this.V(r);for(var o=0;o&lt;r.length;o++){var a=i;""!==r[o]&amp;&amp;(a+="="+encodeURIComponent(String(r[o]))),t.push(a)}}return this.c=t.join("&amp;")};var nr={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\u000b"},rr=/\uffff/.test("￿")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g;function ir(t,e){e.push('"',t.replace(rr,function(t){var e=nr[t];return e||(e="\\u"+(65536|t.charCodeAt(0)).toString(16).substr(1),nr[t]=e),e}),'"')}function or(){var t=Tr();return Wt&amp;&amp;!!ne&amp;&amp;11==ne||/Edge\/\d+/.test(t)}function ar(){return u.window&amp;&amp;u.window.location.href||self&amp;&amp;self.location&amp;&amp;self.location.href||""}function sr(t,e){e=e||u.window;var n="about:blank";t&amp;&amp;(n=Pt(xt(t))),e.location.href=n}function ur(t){return!!((t=(t||Tr()).toLowerCase()).match(/android/)||t.match(/webos/)||t.match(/iphone|ipad|ipod/)||t.match(/blackberry/)||t.match(/windows phone/)||t.match(/iemobile/))}function cr(t){t=t||u.window;try{t.close()}catch(t){}}function hr(t,e,n){var r=Math.floor(1e9*Math.random()).toString();e=e||500,n=n||600;var i=(window.screen.availHeight-n)/2,o=(window.screen.availWidth-e)/2;for(a in e={width:e,height:n,top:0&lt;i?i:0,left:0&lt;o?o:0,location:!0,resizable:!0,statusbar:!0,toolbar:!1},n=Tr().toLowerCase(),r&amp;&amp;(e.target=r,st(n,"crios/")&amp;&amp;(e.target="_blank")),_r(Tr())==br&amp;&amp;(t=t||"http://localhost",e.scrollbars=!0),n=t||"",(t=e)||(t={}),r=window,e=n instanceof Dt?n:xt(void 0!==n.href?n.href:String(n)),n=t.target||n.target,i=[],t)switch(a){case"width":case"height":case"top":case"left":i.push(a+"="+t[a]);break;case"target":case"noopener":case"noreferrer":break;default:i.push(a+"="+(t[a]?1:0))}var a=i.join(",");if((ft("iPhone")&amp;&amp;!ft("iPod")&amp;&amp;!ft("iPad")||ft("iPad")||ft("iPod"))&amp;&amp;r.navigator&amp;&amp;r.navigator.standalone&amp;&amp;n&amp;&amp;"_self"!=n?(gt(a=le(document,"A"),"HTMLAnchorElement"),e instanceof Dt||e instanceof Dt||(e="object"==typeof e&amp;&amp;e.sa?e.ra():String(e),Rt.test(e)||(e="about:invalid#zClosurez"),e=new Dt(Lt,e)),a.href=Pt(e),a.setAttribute("target",n),t.noreferrer&amp;&amp;a.setAttribute("rel","noreferrer"),(t=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,r,1),a.dispatchEvent(t),a={}):t.noreferrer?(a=r.open("",n,a),t=Pt(e),a&amp;&amp;(Jt&amp;&amp;st(t,";")&amp;&amp;(t="'"+t.replace(/'/g,"%27")+"'"),a.opener=null,t=Ut('&lt;meta name="referrer" content="no-referrer"&gt;&lt;meta http-equiv="refresh" content="0; url='+Bt(t)+'"&gt;'),r=a.document)&amp;&amp;(r.write(Mt(t)),r.close())):(a=r.open(Pt(e),n,a))&amp;&amp;t.noopener&amp;&amp;(a.opener=null),a)try{a.focus()}catch(t){}return a}var fr=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,lr=/^[^@]+@[^@]+$/;function pr(){var t=null;return new we(function(e){"complete"==u.document.readyState?e():(t=function(){e()},cn(window,"load",t))}).s(function(e){throw hn(window,"load",t),e})}function dr(t){return t=t||Tr(),!("file:"!==kr()&amp;&amp;"ionic:"!==kr()||!t.toLowerCase().match(/iphone|ipad|ipod|android/))}function vr(){var t=u.window;try{return!(!t||t==t.top)}catch(t){return!1}}function yr(){return void 0!==u.WorkerGlobalScope&amp;&amp;"function"==typeof u.importScripts}function gr(){return r.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":r.INTERNAL.hasOwnProperty("node")?"Node":yr()?"Worker":"Browser"}function mr(){var t=gr();return"ReactNative"===t||"Node"===t}var br="Firefox",wr="Chrome";function _r(t){var e=t.toLowerCase();return st(e,"opera/")||st(e,"opr/")||st(e,"opios/")?"Opera":st(e,"iemobile")?"IEMobile":st(e,"msie")||st(e,"trident/")?"IE":st(e,"edge/")?"Edge":st(e,"firefox/")?br:st(e,"silk/")?"Silk":st(e,"blackberry")?"Blackberry":st(e,"webos")?"Webos":!st(e,"safari/")||st(e,"chrome/")||st(e,"crios/")||st(e,"android")?!st(e,"chrome/")&amp;&amp;!st(e,"crios/")||st(e,"edge/")?st(e,"android")?"Android":(t=t.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/))&amp;&amp;2==t.length?t[1]:"Other":wr:"Safari"}var Ir={ld:"FirebaseCore-web",nd:"FirebaseUI-web"};function Er(t,e){e=e||[];var n,r=[],i={};for(n in Ir)i[Ir[n]]=!0;for(n=0;n&lt;e.length;n++)void 0!==i[e[n]]&amp;&amp;(delete i[e[n]],r.push(e[n]));return r.sort(),(e=r).length||(e=["FirebaseCore-web"]),"Browser"===(r=gr())?r=_r(i=Tr()):"Worker"===r&amp;&amp;(r=_r(i=Tr())+"-"+r),r+"/JsCore/"+t+"/"+e.join(",")}function Tr(){return u.navigator&amp;&amp;u.navigator.userAgent||""}function Ar(t,e){t=t.split("."),e=e||u;for(var n=0;n&lt;t.length&amp;&amp;"object"==typeof e&amp;&amp;null!=e;n++)e=e[t[n]];return n!=t.length&amp;&amp;(e=void 0),e}function Sr(){try{var t=u.localStorage,e=Cr();if(t)return t.setItem(e,"1"),t.removeItem(e),!or()||!!u.indexedDB}catch(t){return yr()&amp;&amp;!!u.indexedDB}return!1}function Nr(){return(Or()||"chrome-extension:"===kr()||dr())&amp;&amp;!mr()&amp;&amp;Sr()&amp;&amp;!yr()}function Or(){return"http:"===kr()||"https:"===kr()}function kr(){return u.location&amp;&amp;u.location.protocol||null}function Dr(t){return!ur(t=t||Tr())&amp;&amp;_r(t)!=br}function Pr(t){return void 0===t?null:er(t)}function Rr(t){var e,n={};for(e in t)t.hasOwnProperty(e)&amp;&amp;null!==t[e]&amp;&amp;void 0!==t[e]&amp;&amp;(n[e]=t[e]);return n}function xr(t){if(null!==t)return JSON.parse(t)}function Cr(t){return t||Math.floor(1e9*Math.random()).toString()}function Lr(t){return"Safari"!=_r(t=t||Tr())&amp;&amp;!t.toLowerCase().match(/iphone|ipad|ipod/)}function jr(){var t=u.___jsl;if(t&amp;&amp;t.H)for(var e in t.H)if(t.H[e].r=t.H[e].r||[],t.H[e].L=t.H[e].L||[],t.H[e].r=t.H[e].L.concat(),t.CP)for(var n=0;n&lt;t.CP.length;n++)t.CP[n]=null}function Mr(t,e){if(t&gt;e)throw Error("Short delay should be less than long delay!");this.a=t,this.c=e,t=Tr(),e=gr(),this.b=ur(t)||"ReactNative"===e}function Vr(){var t=u.document;return!t||void 0===t.visibilityState||"visible"==t.visibilityState}function Ur(t){"undefined"!=typeof console&amp;&amp;console.warn}function Fr(t){try{var e=new Date(parseInt(t,10));if(!isNaN(e.getTime())&amp;&amp;!/[^0-9]/.test(t))return e.toUTCString()}catch(t){}return null}function qr(){return!(!Ar("fireauth.oauthhelper",u)&amp;&amp;!Ar("fireauth.iframe",u))}Mr.prototype.get=function(){var t=u.navigator;return!t||"boolean"!=typeof t.onLine||!Or()&amp;&amp;"chrome-extension:"!==kr()&amp;&amp;void 0===t.connection||t.onLine?this.b?this.c:this.a:Math.min(5e3,this.a)};var Br,Gr={};function zr(t){Gr[t]||(Gr[t]=!0,Ur())}try{var Kr={};Object.defineProperty(Kr,"abcd",{configurable:!0,enumerable:!0,value:1}),Object.defineProperty(Kr,"abcd",{configurable:!0,enumerable:!0,value:2}),Br=2==Kr.abcd}catch(Kt){Br=!1}function Hr(t,e,n){Br?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,value:n}):t[e]=n}function Wr(t,e){if(e)for(var n in e)e.hasOwnProperty(n)&amp;&amp;Hr(t,n,e[n])}function Xr(t){var e={};return Wr(e,t),e}function Jr(t){var e=t;if("object"==typeof t&amp;&amp;null!=t)for(var n in e="length"in t?[]:{},t)Hr(e,n,Jr(t[n]));return e}function Yr(t){var e=t&amp;&amp;(t[ei]?"phone":null);if(!(e&amp;&amp;t&amp;&amp;t[ti]))throw new A("internal-error","Internal assert: invalid MultiFactorInfo object");Hr(this,"uid",t[ti]),Hr(this,"displayName",t[$r]||null);var n=null;t[Zr]&amp;&amp;(n=new Date(t[Zr]).toUTCString()),Hr(this,"enrollmentTime",n),Hr(this,"factorId",e)}function Qr(t){try{var e=new ni(t)}catch(t){e=null}return e}Yr.prototype.w=function(){return{uid:this.uid,displayName:this.displayName,factorId:this.factorId,enrollmentTime:this.enrollmentTime}};var $r="displayName",Zr="enrolledAt",ti="mfaEnrollmentId",ei="phoneInfo";function ni(t){Yr.call(this,t),Hr(this,"phoneNumber",t[ei])}T(ni,Yr),ni.prototype.w=function(){var t=ni.$a.w.call(this);return t.phoneNumber=this.phoneNumber,t};var ri="REVERT_SECOND_FACTOR_ADDITION",ii="EMAIL_SIGNIN",oi="VERIFY_AND_CHANGE_EMAIL",ai="email",si="mfaInfo",ui="newEmail",ci="requestType",hi="email",fi="fromEmail",li="multiFactorInfo",pi="previousEmail",di="data",vi="operation";function yi(t){var e=jn(t=Mn(t),gi)||null,n=jn(t,mi)||null,r=jn(t,_i)||null;if(r=r&amp;&amp;Ei[r]||null,!e||!n||!r)throw new A("argument-error",gi+", "+mi+"and "+_i+" are required in a valid action code URL.");Wr(this,{apiKey:e,operation:r,code:n,continueUrl:jn(t,bi)||null,languageCode:jn(t,wi)||null,tenantId:jn(t,Ii)||null})}var gi="apiKey",mi="oobCode",bi="continueUrl",wi="languageCode",_i="mode",Ii="tenantId",Ei={recoverEmail:"RECOVER_EMAIL",resetPassword:"PASSWORD_RESET",revertSecondFactorAddition:ri,signIn:ii,verifyAndChangeEmail:oi,verifyEmail:"VERIFY_EMAIL"};function Ti(t){try{return new yi(t)}catch(t){return null}}function Ai(t){var e=t[Di];if(void 0===e)throw new A("missing-continue-uri");if("string"!=typeof e||"string"==typeof e&amp;&amp;!e.length)throw new A("invalid-continue-uri");this.h=e,this.b=this.a=null,this.g=!1;var n=t[Si];if(n&amp;&amp;"object"==typeof n){e=n[xi];var r=n[Pi];if(n=n[Ri],"string"==typeof e&amp;&amp;e.length){if(this.a=e,void 0!==r&amp;&amp;"boolean"!=typeof r)throw new A("argument-error",Pi+" property must be a boolean when specified.");if(this.g=!!r,void 0!==n&amp;&amp;("string"!=typeof n||"string"==typeof n&amp;&amp;!n.length))throw new A("argument-error",Ri+" property must be a non empty string when specified.");this.b=n||null}else{if(void 0!==e)throw new A("argument-error",xi+" property must be a non empty string when specified.");if(void 0!==r||void 0!==n)throw new A("missing-android-pkg-name")}}else if(void 0!==n)throw new A("argument-error",Si+" property must be a non null object when specified.");if(this.f=null,(e=t[ki])&amp;&amp;"object"==typeof e){if("string"==typeof(e=e[Ci])&amp;&amp;e.length)this.f=e;else if(void 0!==e)throw new A("argument-error",Ci+" property must be a non empty string when specified.")}else if(void 0!==e)throw new A("argument-error",ki+" property must be a non null object when specified.");if(void 0!==(e=t[Oi])&amp;&amp;"boolean"!=typeof e)throw new A("argument-error",Oi+" property must be a boolean when specified.");if(this.c=!!e,void 0!==(t=t[Ni])&amp;&amp;("string"!=typeof t||"string"==typeof t&amp;&amp;!t.length))throw new A("argument-error",Ni+" property must be a non empty string when specified.");this.i=t||null}var Si="android",Ni="dynamicLinkDomain",Oi="handleCodeInApp",ki="iOS",Di="url",Pi="installApp",Ri="minimumVersion",xi="packageName",Ci="bundleId";function Li(t){var e={};for(var n in e.continueUrl=t.h,e.canHandleCodeInApp=t.c,(e.androidPackageName=t.a)&amp;&amp;(e.androidMinimumVersion=t.b,e.androidInstallApp=t.g),e.iOSBundleId=t.f,e.dynamicLinkDomain=t.i,e)null===e[n]&amp;&amp;delete e[n];return e}var ji=null;function Mi(t){var e="";return function(t,e){function n(e){for(;r&lt;t.length;){var n=t.charAt(r++),i=ji[n];if(null!=i)return i;if(!/^[\s\xa0]*$/.test(n))throw Error("Unknown base64 encoding at char: "+n)}return e}!function(){if(!ji){ji={};for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"],n=0;5&gt;n;n++)for(var r=t.concat(e[n].split("")),i=0;i&lt;r.length;i++){var o=r[i];void 0===ji[o]&amp;&amp;(ji[o]=i)}}}();for(var r=0;;){var i=n(-1),o=n(0),a=n(64),s=n(64);if(64===s&amp;&amp;-1===i)break;e(i&lt;&lt;2|o&gt;&gt;4),64!=a&amp;&amp;(e(o&lt;&lt;4&amp;240|a&gt;&gt;2),64!=s&amp;&amp;e(a&lt;&lt;6&amp;192|s))}}(t,function(t){e+=String.fromCharCode(t)}),e}function Vi(t){var e=Fi(t);if(!(e&amp;&amp;e.sub&amp;&amp;e.iss&amp;&amp;e.aud&amp;&amp;e.exp))throw Error("Invalid JWT");this.g=t,this.c=e.exp,this.h=e.sub,E(),this.a=e.provider_id||e.firebase&amp;&amp;e.firebase.sign_in_provider||null,this.f=e.firebase&amp;&amp;e.firebase.tenant||null,this.b=!!e.is_anonymous||"anonymous"==this.a}function Ui(t){try{return new Vi(t)}catch(t){return null}}function Fi(t){if(!t)return null;if(3!=(t=t.split(".")).length)return null;for(var e=(4-(t=t[1]).length%4)%4,n=0;n&lt;e;n++)t+=".";try{return JSON.parse(Mi(t))}catch(t){}return null}Vi.prototype.S=function(){return this.f},Vi.prototype.i=function(){return this.b},Vi.prototype.toString=function(){return this.g};var qi="oauth_consumer_key oauth_nonce oauth_signature oauth_signature_method oauth_timestamp oauth_token oauth_version".split(" "),Bi=["client_id","response_type","scope","redirect_uri","state"],Gi={md:{Ja:"locale",ua:700,ta:600,fa:"facebook.com",Wa:Bi},od:{Ja:null,ua:500,ta:750,fa:"github.com",Wa:Bi},pd:{Ja:"hl",ua:515,ta:680,fa:"google.com",Wa:Bi},vd:{Ja:"lang",ua:485,ta:705,fa:"twitter.com",Wa:qi},jd:{Ja:"locale",ua:640,ta:600,fa:"apple.com",Wa:[]}};function zi(t){for(var e in Gi)if(Gi[e].fa==t)return Gi[e];return null}function Ki(t){var e={};e["facebook.com"]=Yi,e["google.com"]=$i,e["github.com"]=Qi,e["twitter.com"]=Zi;var n=t&amp;&amp;t[Wi];try{if(n)return e[n]?new e[n](t):new Ji(t);if(void 0!==t[Hi])return new Xi(t)}catch(t){}return null}var Hi="idToken",Wi="providerId";function Xi(t){var e=t[Wi];if(!e&amp;&amp;t[Hi]){var n=Ui(t[Hi]);n&amp;&amp;n.a&amp;&amp;(e=n.a)}if(!e)throw Error("Invalid additional user info!");"anonymous"!=e&amp;&amp;"custom"!=e||(e=null),n=!1,void 0!==t.isNewUser?n=!!t.isNewUser:"identitytoolkit#SignupNewUserResponse"===t.kind&amp;&amp;(n=!0),Hr(this,"providerId",e),Hr(this,"isNewUser",n)}function Ji(t){Xi.call(this,t),Hr(this,"profile",Jr((t=xr(t.rawUserInfo||"{}"))||{}))}function Yi(t){if(Ji.call(this,t),"facebook.com"!=this.providerId)throw Error("Invalid provider ID!")}function Qi(t){if(Ji.call(this,t),"github.com"!=this.providerId)throw Error("Invalid provider ID!");Hr(this,"username",this.profile&amp;&amp;this.profile.login||null)}function $i(t){if(Ji.call(this,t),"google.com"!=this.providerId)throw Error("Invalid provider ID!")}function Zi(t){if(Ji.call(this,t),"twitter.com"!=this.providerId)throw Error("Invalid provider ID!");Hr(this,"username",t.screenName||null)}function to(t){var e=Mn(t),n=jn(e,"link"),r=jn(Mn(n),"link");return jn(Mn(e=jn(e,"deep_link_id")),"link")||e||r||n||t}function eo(t,e){if(!t&amp;&amp;!e)throw new A("internal-error","Internal assert: no raw session string available");if(t&amp;&amp;e)throw new A("internal-error","Internal assert: unable to determine the session type");this.a=t||null,this.b=e||null,this.type=this.a?no:ro}T(Ji,Xi),T(Yi,Ji),T(Qi,Ji),T($i,Ji),T(Zi,Ji);var no="enroll",ro="signin";function io(){}function oo(t,e){return t.then(function(t){if(t[Ha]){var n=Ui(t[Ha]);if(!n||e!=n.h)throw new A("user-mismatch");return t}throw new A("user-mismatch")}).s(function(t){throw t&amp;&amp;t.code&amp;&amp;t.code==O+"user-not-found"?new A("user-mismatch"):t})}function ao(t,e){if(!e)throw new A("internal-error","failed to construct a credential");this.a=e,Hr(this,"providerId",t),Hr(this,"signInMethod",t)}function so(t){return{pendingToken:t.a,requestUri:"http://localhost"}}function uo(t){if(t&amp;&amp;t.providerId&amp;&amp;t.signInMethod&amp;&amp;0==t.providerId.indexOf("saml.")&amp;&amp;t.pendingToken)try{return new ao(t.providerId,t.pendingToken)}catch(t){}return null}function co(t,e,n){if(this.a=null,e.idToken||e.accessToken)e.idToken&amp;&amp;Hr(this,"idToken",e.idToken),e.accessToken&amp;&amp;Hr(this,"accessToken",e.accessToken),e.nonce&amp;&amp;!e.pendingToken&amp;&amp;Hr(this,"nonce",e.nonce),e.pendingToken&amp;&amp;(this.a=e.pendingToken);else{if(!e.oauthToken||!e.oauthTokenSecret)throw new A("internal-error","failed to construct a credential");Hr(this,"accessToken",e.oauthToken),Hr(this,"secret",e.oauthTokenSecret)}Hr(this,"providerId",t),Hr(this,"signInMethod",n)}function ho(t){var e={};return t.idToken&amp;&amp;(e.id_token=t.idToken),t.accessToken&amp;&amp;(e.access_token=t.accessToken),t.secret&amp;&amp;(e.oauth_token_secret=t.secret),e.providerId=t.providerId,t.nonce&amp;&amp;!t.a&amp;&amp;(e.nonce=t.nonce),e={postBody:Jn(e).toString(),requestUri:"http://localhost"},t.a&amp;&amp;(delete e.postBody,e.pendingToken=t.a),e}function fo(t){if(t&amp;&amp;t.providerId&amp;&amp;t.signInMethod){var e={idToken:t.oauthIdToken,accessToken:t.oauthTokenSecret?null:t.oauthAccessToken,oauthTokenSecret:t.oauthTokenSecret,oauthToken:t.oauthTokenSecret&amp;&amp;t.oauthAccessToken,nonce:t.nonce,pendingToken:t.pendingToken};try{return new co(t.providerId,e,t.signInMethod)}catch(t){}}return null}function lo(t,e){this.Pc=e||[],Wr(this,{providerId:t,isOAuthProvider:!0}),this.Hb={},this.ob=(zi(t)||{}).Ja||null,this.nb=null}function po(t){if("string"!=typeof t||0!=t.indexOf("saml."))throw new A("argument-error",'SAML provider IDs must be prefixed with "saml."');lo.call(this,t,[])}function vo(t){lo.call(this,t,Bi),this.a=[]}function yo(){vo.call(this,"facebook.com")}function go(t){if(!t)throw new A("argument-error","credential failed: expected 1 argument (the OAuth access token).");var e=t;return v(t)&amp;&amp;(e=t.accessToken),(new yo).credential({accessToken:e})}function mo(){vo.call(this,"github.com")}function bo(t){if(!t)throw new A("argument-error","credential failed: expected 1 argument (the OAuth access token).");var e=t;return v(t)&amp;&amp;(e=t.accessToken),(new mo).credential({accessToken:e})}function wo(){vo.call(this,"google.com"),this.Ca("profile")}function _o(t,e){var n=t;return v(t)&amp;&amp;(n=t.idToken,e=t.accessToken),(new wo).credential({idToken:n,accessToken:e})}function Io(){lo.call(this,"twitter.com",qi)}function Eo(t,e){var n=t;if(v(n)||(n={oauthToken:t,oauthTokenSecret:e}),!n.oauthToken||!n.oauthTokenSecret)throw new A("argument-error","credential failed: expected 2 arguments (the OAuth access token and secret).");return new co("twitter.com",n,"twitter.com")}function To(t,e,n){this.a=t,this.f=e,Hr(this,"providerId","password"),Hr(this,"signInMethod",n===So.EMAIL_LINK_SIGN_IN_METHOD?So.EMAIL_LINK_SIGN_IN_METHOD:So.EMAIL_PASSWORD_SIGN_IN_METHOD)}function Ao(t){return t&amp;&amp;t.email&amp;&amp;t.password?new To(t.email,t.password,t.signInMethod):null}function So(){Wr(this,{providerId:"password",isOAuthProvider:!1})}function No(t,e){if(!(e=Oo(e)))throw new A("argument-error","Invalid email link!");return new To(t,e.code,So.EMAIL_LINK_SIGN_IN_METHOD)}function Oo(t){return(t=Ti(t=to(t)))&amp;&amp;t.operation===ii?t:null}function ko(t){if(!(t.cb&amp;&amp;t.bb||t.La&amp;&amp;t.ea))throw new A("internal-error");this.a=t,Hr(this,"providerId","phone"),this.fa="phone",Hr(this,"signInMethod","phone")}function Do(t){if(t&amp;&amp;"phone"===t.providerId&amp;&amp;(t.verificationId&amp;&amp;t.verificationCode||t.temporaryProof&amp;&amp;t.phoneNumber)){var e={};return G(["verificationId","verificationCode","temporaryProof","phoneNumber"],function(n){t[n]&amp;&amp;(e[n]=t[n])}),new ko(e)}return null}function Po(t){return t.a.La&amp;&amp;t.a.ea?{temporaryProof:t.a.La,phoneNumber:t.a.ea}:{sessionInfo:t.a.cb,code:t.a.bb}}function Ro(t){try{this.a=t||r.auth()}catch(t){throw new A("argument-error","Either an instance of firebase.auth.Auth must be passed as an argument to the firebase.auth.PhoneAuthProvider constructor, or the default firebase App instance must be initialized via firebase.initializeApp().")}Wr(this,{providerId:"phone",isOAuthProvider:!1})}function xo(t,e){if(!t)throw new A("missing-verification-id");if(!e)throw new A("missing-verification-code");return new ko({cb:t,bb:e})}function Co(t){if(t.temporaryProof&amp;&amp;t.phoneNumber)return new ko({La:t.temporaryProof,ea:t.phoneNumber});var e=t&amp;&amp;t.providerId;if(!e||"password"===e)return null;var n=t&amp;&amp;t.oauthAccessToken,r=t&amp;&amp;t.oauthTokenSecret,i=t&amp;&amp;t.nonce,o=t&amp;&amp;t.oauthIdToken,a=t&amp;&amp;t.pendingToken;try{switch(e){case"google.com":return _o(o,n);case"facebook.com":return go(n);case"github.com":return bo(n);case"twitter.com":return Eo(n,r);default:return n||r||o||a?a?0==e.indexOf("saml.")?new ao(e,a):new co(e,{pendingToken:a,idToken:t.oauthIdToken,accessToken:t.oauthAccessToken},e):new vo(e).credential({idToken:o,accessToken:n,rawNonce:i}):null}}catch(t){return null}}function Lo(t){if(!t.isOAuthProvider)throw new A("invalid-oauth-provider")}function jo(t,e,n,r,i,o,a){if(this.c=t,this.b=e||null,this.g=n||null,this.f=r||null,this.i=o||null,this.h=a||null,this.a=i||null,!this.g&amp;&amp;!this.a)throw new A("invalid-auth-event");if(this.g&amp;&amp;this.a)throw new A("invalid-auth-event");if(this.g&amp;&amp;!this.f)throw new A("invalid-auth-event")}function Mo(t){return(t=t||{}).type?new jo(t.type,t.eventId,t.urlResponse,t.sessionId,t.error&amp;&amp;S(t.error),t.postBody,t.tenantId):null}eo.prototype.Ha=function(){return this.a?Ne(this.a):Ne(this.b)},eo.prototype.w=function(){return this.type==no?{multiFactorSession:{idToken:this.a}}:{multiFactorSession:{pendingCredential:this.b}}},io.prototype.ja=function(){},io.prototype.b=function(){},io.prototype.c=function(){},io.prototype.w=function(){},ao.prototype.ja=function(t){return ds(t,so(this))},ao.prototype.b=function(t,e){var n=so(this);return n.idToken=e,vs(t,n)},ao.prototype.c=function(t,e){return oo(ys(t,so(this)),e)},ao.prototype.w=function(){return{providerId:this.providerId,signInMethod:this.signInMethod,pendingToken:this.a}},co.prototype.ja=function(t){return ds(t,ho(this))},co.prototype.b=function(t,e){var n=ho(this);return n.idToken=e,vs(t,n)},co.prototype.c=function(t,e){return oo(ys(t,ho(this)),e)},co.prototype.w=function(){var t={providerId:this.providerId,signInMethod:this.signInMethod};return this.idToken&amp;&amp;(t.oauthIdToken=this.idToken),this.accessToken&amp;&amp;(t.oauthAccessToken=this.accessToken),this.secret&amp;&amp;(t.oauthTokenSecret=this.secret),this.nonce&amp;&amp;(t.nonce=this.nonce),this.a&amp;&amp;(t.pendingToken=this.a),t},lo.prototype.Ka=function(t){return this.Hb=dt(t),this},T(po,lo),T(vo,lo),vo.prototype.Ca=function(t){return W(this.a,t)||this.a.push(t),this},vo.prototype.Pb=function(){return Q(this.a)},vo.prototype.credential=function(t,e){var n;if(!(n=v(t)?{idToken:t.idToken||null,accessToken:t.accessToken||null,nonce:t.rawNonce||null}:{idToken:t||null,accessToken:e||null}).idToken&amp;&amp;!n.accessToken)throw new A("argument-error","credential failed: must provide the ID token and/or the access token.");return new co(this.providerId,n,this.providerId)},T(yo,vo),Hr(yo,"PROVIDER_ID","facebook.com"),Hr(yo,"FACEBOOK_SIGN_IN_METHOD","facebook.com"),T(mo,vo),Hr(mo,"PROVIDER_ID","github.com"),Hr(mo,"GITHUB_SIGN_IN_METHOD","github.com"),T(wo,vo),Hr(wo,"PROVIDER_ID","google.com"),Hr(wo,"GOOGLE_SIGN_IN_METHOD","google.com"),T(Io,lo),Hr(Io,"PROVIDER_ID","twitter.com"),Hr(Io,"TWITTER_SIGN_IN_METHOD","twitter.com"),To.prototype.ja=function(t){return this.signInMethod==So.EMAIL_LINK_SIGN_IN_METHOD?Qs(t,Ts,{email:this.a,oobCode:this.f}):Qs(t,Hs,{email:this.a,password:this.f})},To.prototype.b=function(t,e){return this.signInMethod==So.EMAIL_LINK_SIGN_IN_METHOD?Qs(t,As,{idToken:e,email:this.a,oobCode:this.f}):Qs(t,Vs,{idToken:e,email:this.a,password:this.f})},To.prototype.c=function(t,e){return oo(this.ja(t),e)},To.prototype.w=function(){return{email:this.a,password:this.f,signInMethod:this.signInMethod}},Wr(So,{PROVIDER_ID:"password"}),Wr(So,{EMAIL_LINK_SIGN_IN_METHOD:"emailLink"}),Wr(So,{EMAIL_PASSWORD_SIGN_IN_METHOD:"password"}),ko.prototype.ja=function(t){return t.eb(Po(this))},ko.prototype.b=function(t,e){var n=Po(this);return n.idToken=e,Qs(t,Xs,n)},ko.prototype.c=function(t,e){var n=Po(this);return n.operation="REAUTH",oo(t=Qs(t,Js,n),e)},ko.prototype.w=function(){var t={providerId:"phone"};return this.a.cb&amp;&amp;(t.verificationId=this.a.cb),this.a.bb&amp;&amp;(t.verificationCode=this.a.bb),this.a.La&amp;&amp;(t.temporaryProof=this.a.La),this.a.ea&amp;&amp;(t.phoneNumber=this.a.ea),t},Ro.prototype.eb=function(t,e){var n=this.a.a;return Ne(e.verify()).then(function(r){if("string"!=typeof r)throw new A("argument-error","An implementation of firebase.auth.ApplicationVerifier.prototype.verify() must return a firebase.Promise that resolves with a string.");switch(e.type){case"recaptcha":var i=v(t)?t.session:null,o=v(t)?t.phoneNumber:t;return(i&amp;&amp;i.type==no?i.Ha().then(function(t){return Qs(n,Fs,{idToken:t,phoneEnrollmentInfo:{phoneNumber:o,recaptchaToken:r}}).then(function(t){return t.phoneSessionInfo.sessionInfo})}):i&amp;&amp;i.type==ro?i.Ha().then(function(e){return function(t,e){return Qs(t,qs,e).then(function(t){return t.phoneResponseInfo.sessionInfo})}(n,{mfaPendingCredential:e,mfaEnrollmentId:t.multiFactorHint&amp;&amp;t.multiFactorHint.uid||t.multiFactorUid,phoneSignInInfo:{recaptchaToken:r}})}):function(t,e){return Qs(t,js,e)}(n,{phoneNumber:o,recaptchaToken:r})).then(function(t){return"function"==typeof e.reset&amp;&amp;e.reset(),t},function(t){throw"function"==typeof e.reset&amp;&amp;e.reset(),t});default:throw new A("argument-error",'Only firebase.auth.ApplicationVerifiers with type="recaptcha" are currently supported.')}})},Wr(Ro,{PROVIDER_ID:"phone"}),Wr(Ro,{PHONE_SIGN_IN_METHOD:"phone"}),jo.prototype.getUid=function(){var t=[];return t.push(this.c),this.b&amp;&amp;t.push(this.b),this.f&amp;&amp;t.push(this.f),this.h&amp;&amp;t.push(this.h),t.join("-")},jo.prototype.S=function(){return this.h},jo.prototype.w=function(){return{type:this.c,eventId:this.b,urlResponse:this.g,sessionId:this.f,postBody:this.i,tenantId:this.h,error:this.a&amp;&amp;this.a.w()}};var Vo,Uo=null;function Fo(t){var e="unauthorized-domain",n=void 0,r=Mn(t);t=r.a,"chrome-extension"==(r=r.f)?n=qt("This chrome extension ID (chrome-extension://%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -&gt; Auth section -&gt; Sign in method tab.",t):"http"==r||"https"==r?n=qt("This domain (%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -&gt; Auth section -&gt; Sign in method tab.",t):e="operation-not-supported-in-this-environment",A.call(this,e,n)}function qo(t,e,n){A.call(this,t,n),(t=e||{}).Ib&amp;&amp;Hr(this,"email",t.Ib),t.ea&amp;&amp;Hr(this,"phoneNumber",t.ea),t.credential&amp;&amp;Hr(this,"credential",t.credential),t.Yb&amp;&amp;Hr(this,"tenantId",t.Yb)}function Bo(t){if(t.code){var e=t.code||"";0==e.indexOf(O)&amp;&amp;(e=e.substring(O.length));var n={credential:Co(t),Yb:t.tenantId};if(t.email)n.Ib=t.email;else if(t.phoneNumber)n.ea=t.phoneNumber;else if(!n.credential)return new A(e,t.message||void 0);return new qo(e,n,t.message)}return null}function Go(){}function zo(t){return t.c||(t.c=t.b())}function Ko(){}function Ho(t){if(!t.f&amp;&amp;"undefined"==typeof XMLHttpRequest&amp;&amp;"undefined"!=typeof ActiveXObject){for(var e=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],n=0;n&lt;e.length;n++){var r=e[n];try{return new ActiveXObject(r),t.f=r}catch(t){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return t.f}function Wo(){}function Xo(){this.a=new XDomainRequest,this.readyState=0,this.onreadystatechange=null,this.responseType=this.responseText=this.response="",this.status=-1,this.statusText="",this.a.onload=_(this.pc,this),this.a.onerror=_(this.Rb,this),this.a.onprogress=_(this.qc,this),this.a.ontimeout=_(this.uc,this)}function Jo(t,e){t.readyState=e,t.onreadystatechange&amp;&amp;t.onreadystatechange()}function Yo(t,e,n){this.reset(t,e,n,void 0,void 0)}T(Fo,A),T(qo,A),qo.prototype.w=function(){var t={code:this.code,message:this.message};this.email&amp;&amp;(t.email=this.email),this.phoneNumber&amp;&amp;(t.phoneNumber=this.phoneNumber),this.tenantId&amp;&amp;(t.tenantId=this.tenantId);var e=this.credential&amp;&amp;this.credential.w();return e&amp;&amp;yt(t,e),t},qo.prototype.toJSON=function(){return this.w()},Go.prototype.c=null,T(Ko,Go),Ko.prototype.a=function(){var t=Ho(this);return t?new ActiveXObject(t):new XMLHttpRequest},Ko.prototype.b=function(){var t={};return Ho(this)&amp;&amp;(t[0]=!0,t[1]=!0),t},Vo=new Ko,T(Wo,Go),Wo.prototype.a=function(){var t=new XMLHttpRequest;if("withCredentials"in t)return t;if("undefined"!=typeof XDomainRequest)return new Xo;throw Error("Unsupported browser")},Wo.prototype.b=function(){return{}},(e=Xo.prototype).open=function(t,e,n){if(null!=n&amp;&amp;!n)throw Error("Only async requests are supported.");this.a.open(t,e)},e.send=function(t){if(t){if("string"!=typeof t)throw Error("Only string data is supported");this.a.send(t)}else this.a.send()},e.abort=function(){this.a.abort()},e.setRequestHeader=function(){},e.getResponseHeader=function(t){return"content-type"==t.toLowerCase()?this.a.contentType:""},e.pc=function(){this.status=200,this.response=this.responseText=this.a.responseText,Jo(this,4)},e.Rb=function(){this.status=500,this.response=this.responseText="",Jo(this,4)},e.uc=function(){this.Rb()},e.qc=function(){this.status=200,Jo(this,1)},e.getAllResponseHeaders=function(){return"content-type: "+this.a.contentType},Yo.prototype.a=null;function Qo(t){this.f=t,this.b=this.c=this.a=null}function $o(t,e){this.name=t,this.value=e}Yo.prototype.reset=function(t,e,n,r,i){"number"==typeof i||0,r||E(),delete this.a},$o.prototype.toString=function(){return this.name};var Zo=new $o("SEVERE",1e3),ta=new $o("WARNING",900),ea=new $o("CONFIG",700),na=new $o("FINE",500);Qo.prototype.log=function(t,e,n){if(t.value&gt;=function t(e){return e.c?e.c:e.a?t(e.a):(L("Root logger has no level set."),null)}(this).value)for(d(e)&amp;&amp;(e=e()),t=new Yo(t,String(e),this.f),n&amp;&amp;(t.a=n),n=this;n;)n=n.a};var ra={},ia=null;function oa(t){var e;if(ia||(ia=new Qo(""),ra[""]=ia,ia.c=ea),!(e=ra[t])){e=new Qo(t);var n=t.lastIndexOf("."),r=t.substr(n+1);(n=oa(t.substr(0,n))).b||(n.b={}),n.b[r]=e,e.a=n,ra[t]=e}return e}function aa(t,e){t&amp;&amp;t.log(na,e,void 0)}function sa(t){this.f=t}function ua(t){bn.call(this),this.o=t,this.readyState=ca,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.i=new Headers,this.b=null,this.m="GET",this.g="",this.a=!1,this.h=oa("goog.net.FetchXmlHttp"),this.l=this.c=this.f=null}T(sa,Go),sa.prototype.a=function(){return new ua(this.f)},sa.prototype.b=function(t){return function(){return t}}({}),T(ua,bn);var ca=0;function ha(t){t.c.read().then(t.oc.bind(t)).catch(t.Ta.bind(t))}function fa(t,e){e&amp;&amp;t.f&amp;&amp;(t.status=t.f.status,t.statusText=t.f.statusText),t.readyState=4,t.f=null,t.c=null,t.l=null,la(t)}function la(t){t.onreadystatechange&amp;&amp;t.onreadystatechange.call(t)}function pa(t){bn.call(this),this.headers=new Nn,this.O=t||null,this.c=!1,this.A=this.a=null,this.h=this.P=this.l="",this.f=this.N=this.i=this.G=!1,this.g=0,this.o=null,this.m=da,this.u=this.R=!1}(e=ua.prototype).open=function(t,e){if(this.readyState!=ca)throw this.abort(),Error("Error reopening a connection");this.m=t,this.g=e,this.readyState=1,la(this)},e.send=function(t){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.a=!0;var e={headers:this.i,method:this.m,credentials:void 0,cache:void 0};t&amp;&amp;(e.body=t),this.o.fetch(new Request(this.g,e)).then(this.tc.bind(this),this.Ta.bind(this))},e.abort=function(){this.response=this.responseText="",this.i=new Headers,this.status=0,this.c&amp;&amp;this.c.cancel("Request was aborted."),1&lt;=this.readyState&amp;&amp;this.a&amp;&amp;4!=this.readyState&amp;&amp;(this.a=!1,fa(this,!1)),this.readyState=ca},e.tc=function(t){this.a&amp;&amp;(this.f=t,this.b||(this.b=t.headers,this.readyState=2,la(this)),this.a&amp;&amp;(this.readyState=3,la(this),this.a&amp;&amp;("arraybuffer"===this.responseType?t.arrayBuffer().then(this.rc.bind(this),this.Ta.bind(this)):void 0!==u.ReadableStream&amp;&amp;"body"in t?(this.response=this.responseText="",this.c=t.body.getReader(),this.l=new TextDecoder,ha(this)):t.text().then(this.sc.bind(this),this.Ta.bind(this)))))},e.oc=function(t){if(this.a){var e=this.l.decode(t.value?t.value:new Uint8Array(0),{stream:!t.done});e&amp;&amp;(this.response=this.responseText+=e),t.done?fa(this,!0):la(this),3==this.readyState&amp;&amp;ha(this)}},e.sc=function(t){this.a&amp;&amp;(this.response=this.responseText=t,fa(this,!0))},e.rc=function(t){this.a&amp;&amp;(this.response=t,fa(this,!0))},e.Ta=function(t){var e=this.h;e&amp;&amp;e.log(ta,"Failed to fetch url "+this.g,t instanceof Error?t:Error(t)),this.a&amp;&amp;fa(this,!0)},e.setRequestHeader=function(t,e){this.i.append(t,e)},e.getResponseHeader=function(t){return this.b?this.b.get(t.toLowerCase())||"":((t=this.h)&amp;&amp;t.log(ta,"Attempting to get response header but no headers have been received for url: "+this.g,void 0),"")},e.getAllResponseHeaders=function(){if(!this.b){var t=this.h;return t&amp;&amp;t.log(ta,"Attempting to get all response headers but no headers have been received for url: "+this.g,void 0),""}t=[];for(var e=this.b.entries(),n=e.next();!n.done;)n=n.value,t.push(n[0]+": "+n[1]),n=e.next();return t.join("\r\n")},T(pa,bn);var da="";pa.prototype.b=oa("goog.net.XhrIo");var va=/^https?$/i,ya=["POST","PUT"];function ga(t,e,n,r,i){if(t.a)throw Error("[goog.net.XhrIo] Object is active with another request="+t.l+"; newUri="+e);n=n?n.toUpperCase():"GET",t.l=e,t.h="",t.P=n,t.G=!1,t.c=!0,t.a=t.O?t.O.a():Vo.a(),t.A=t.O?zo(t.O):zo(Vo),t.a.onreadystatechange=_(t.Ub,t);try{aa(t.b,Sa(t,"Opening Xhr")),t.N=!0,t.a.open(n,String(e),!0),t.N=!1}catch(e){return aa(t.b,Sa(t,"Error opening Xhr: "+e.message)),void ba(t,e)}e=r||"";var o=new Nn(t.headers);i&amp;&amp;function(t,e){if(t.forEach&amp;&amp;"function"==typeof t.forEach)t.forEach(e,void 0);else if(p(t)||"string"==typeof t)G(t,e,void 0);else for(var n=Sn(t),r=An(t),i=r.length,o=0;o&lt;i;o++)e.call(void 0,r[o],n&amp;&amp;n[o],t)}(i,function(t,e){o.set(e,t)}),i=function(t){t:{for(var e=ma,n=t.length,r="string"==typeof t?t.split(""):t,i=0;i&lt;n;i++)if(i in r&amp;&amp;e.call(void 0,r[i],i,t)){e=i;break t}e=-1}return 0&gt;e?null:"string"==typeof t?t.charAt(e):t[e]}(o.Y()),r=u.FormData&amp;&amp;e instanceof u.FormData,!W(ya,n)||i||r||o.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),o.forEach(function(t,e){this.a.setRequestHeader(e,t)},t),t.m&amp;&amp;(t.a.responseType=t.m),"withCredentials"in t.a&amp;&amp;t.a.withCredentials!==t.R&amp;&amp;(t.a.withCredentials=t.R);try{Ea(t),0&lt;t.g&amp;&amp;(t.u=function(t){return Wt&amp;&amp;ie(9)&amp;&amp;"number"==typeof t.timeout&amp;&amp;void 0!==t.ontimeout}(t.a),aa(t.b,Sa(t,"Will abort after "+t.g+"ms if incomplete, xhr2 "+t.u)),t.u?(t.a.timeout=t.g,t.a.ontimeout=_(t.Ma,t)):t.o=En(t.Ma,t.g,t)),aa(t.b,Sa(t,"Sending request")),t.i=!0,t.a.send(e),t.i=!1}catch(e){aa(t.b,Sa(t,"Send error: "+e.message)),ba(t,e)}}function ma(t){return"content-type"==t.toLowerCase()}function ba(t,e){t.c=!1,t.a&amp;&amp;(t.f=!0,t.a.abort(),t.f=!1),t.h=e,wa(t),Ia(t)}function wa(t){t.G||(t.G=!0,t.dispatchEvent("complete"),t.dispatchEvent("error"))}function _a(t){if(t.c&amp;&amp;void 0!==s)if(t.A[1]&amp;&amp;4==Ta(t)&amp;&amp;2==Aa(t))aa(t.b,Sa(t,"Local request error detected and ignored"));else if(t.i&amp;&amp;4==Ta(t))En(t.Ub,0,t);else if(t.dispatchEvent("readystatechange"),4==Ta(t)){aa(t.b,Sa(t,"Request complete")),t.c=!1;try{var e,n=Aa(t);t:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r=!0;break t;default:r=!1}if(!(e=r)){var i;if(i=0===n){var o=String(t.l).match(Dn)[1]||null;if(!o&amp;&amp;u.self&amp;&amp;u.self.location){var a=u.self.location.protocol;o=a.substr(0,a.length-1)}i=!va.test(o?o.toLowerCase():"")}e=i}if(e)t.dispatchEvent("complete"),t.dispatchEvent("success");else{try{var c=2&lt;Ta(t)?t.a.statusText:""}catch(e){aa(t.b,"Can not get status: "+e.message),c=""}t.h=c+" ["+Aa(t)+"]",wa(t)}}finally{Ia(t)}}}function Ia(t,e){if(t.a){Ea(t);var n=t.a,r=t.A[0]?f:null;t.a=null,t.A=null,e||t.dispatchEvent("ready");try{n.onreadystatechange=r}catch(e){(t=t.b)&amp;&amp;t.log(Zo,"Problem encountered resetting onreadystatechange: "+e.message,void 0)}}}function Ea(t){t.a&amp;&amp;t.u&amp;&amp;(t.a.ontimeout=null),t.o&amp;&amp;(u.clearTimeout(t.o),t.o=null)}function Ta(t){return t.a?t.a.readyState:0}function Aa(t){try{return 2&lt;Ta(t)?t.a.status:-1}catch(t){return-1}}function Sa(t,e){return e+" ["+t.P+" "+t.l+" "+Aa(t)+"]"}function Na(t){var e=Va;this.g=[],this.u=e,this.o=t||null,this.f=this.a=!1,this.c=void 0,this.m=this.A=this.i=!1,this.h=0,this.b=null,this.l=0}function Oa(t,e,n){t.a=!0,t.c=n,t.f=!e,Ra(t)}function ka(t){if(t.a){if(!t.m)throw new xa(t);t.m=!1}}function Da(t,e,n,r){t.g.push([e,n,r]),t.a&amp;&amp;Ra(t)}function Pa(t){return H(t.g,function(t){return d(t[1])})}function Ra(t){if(t.h&amp;&amp;t.a&amp;&amp;Pa(t)){var e=t.h,n=ja[e];n&amp;&amp;(u.clearTimeout(n.a),delete ja[e]),t.h=0}t.b&amp;&amp;(t.b.l--,delete t.b),e=t.c;for(var r=n=!1;t.g.length&amp;&amp;!t.i;){var i=t.g.shift(),o=i[0],a=i[1];if(i=i[2],o=t.f?a:o)try{var s=o.call(i||t.o,e);void 0!==s&amp;&amp;(t.f=t.f&amp;&amp;(s==e||s instanceof Error),t.c=e=s),(R(e)||"function"==typeof u.Promise&amp;&amp;e instanceof u.Promise)&amp;&amp;(r=!0,t.i=!0)}catch(r){e=r,t.f=!0,Pa(t)||(n=!0)}}t.c=e,r&amp;&amp;(s=_(t.v,t,!0),r=_(t.v,t,!1),e instanceof Na?(Da(e,s,r),e.A=!0):e.then(s,r)),n&amp;&amp;(e=new La(e),ja[e.a]=e,t.h=e.a)}function xa(){x.call(this)}function Ca(){x.call(this)}function La(t){this.a=u.setTimeout(_(this.c,this),0),this.b=t}(e=pa.prototype).Ma=function(){void 0!==s&amp;&amp;this.a&amp;&amp;(this.h="Timed out after "+this.g+"ms, aborting",aa(this.b,Sa(this,this.h)),this.dispatchEvent("timeout"),this.abort(8))},e.abort=function(){this.a&amp;&amp;this.c&amp;&amp;(aa(this.b,Sa(this,"Aborting")),this.c=!1,this.f=!0,this.a.abort(),this.f=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),Ia(this))},e.Da=function(){this.a&amp;&amp;(this.c&amp;&amp;(this.c=!1,this.f=!0,this.a.abort(),this.f=!1),Ia(this,!0)),pa.$a.Da.call(this)},e.Ub=function(){this.xa||(this.N||this.i||this.f?_a(this):this.Ic())},e.Ic=function(){_a(this)},e.getResponse=function(){try{if(!this.a)return null;if("response"in this.a)return this.a.response;switch(this.m){case da:case"text":return this.a.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in this.a)return this.a.mozResponseArrayBuffer}var t=this.b;return t&amp;&amp;t.log(Zo,"Response type "+this.m+" is not supported on this browser",void 0),null}catch(t){return aa(this.b,"Can not get response: "+t.message),null}},Na.prototype.cancel=function(t){if(this.a)this.c instanceof Na&amp;&amp;this.c.cancel();else{if(this.b){var e=this.b;delete this.b,t?e.cancel(t):(e.l--,0&gt;=e.l&amp;&amp;e.cancel())}this.u?this.u.call(this.o,this):this.m=!0,this.a||(t=new Ca(this),ka(this),Oa(this,!1,t))}},Na.prototype.v=function(t,e){this.i=!1,Oa(this,t,e)},Na.prototype.then=function(t,e,n){var r,i,o=new we(function(t,e){r=t,i=e});return Da(this,r,function(t){t instanceof Ca?o.cancel():i(t)}),o.then(t,e,n)},Na.prototype.$goog_Thenable=!0,T(xa,x),xa.prototype.message="Deferred has already fired",xa.prototype.name="AlreadyCalledError",T(Ca,x),Ca.prototype.message="Deferred was canceled",Ca.prototype.name="CanceledError",La.prototype.c=function(){throw delete ja[this.a],this.b};var ja={};function Ma(t){var e={},n=e.document||document,r=Tt(t).toString(),i=le(document,"SCRIPT"),o={Vb:i,Ma:void 0},a=new Na(o),s=null,f=null!=e.timeout?e.timeout:5e3;return 0&lt;f&amp;&amp;(s=window.setTimeout(function(){Ua(i,!0);var t=new Ba(qa,"Timeout reached for loading script "+r);ka(a),Oa(a,!1,t)},f),o.Ma=s),i.onload=i.onreadystatechange=function(){i.readyState&amp;&amp;"loaded"!=i.readyState&amp;&amp;"complete"!=i.readyState||(Ua(i,e.wd||!1,s),ka(a),Oa(a,!0,null))},i.onerror=function(){Ua(i,!0,s);var t=new Ba(Fa,"Error while loading script "+r);ka(a),Oa(a,!1,t)},yt(o=e.attributes||{},{type:"text/javascript",charset:"UTF-8"}),se(i,o),function(t,e){gt(t,"HTMLScriptElement"),t.src=Tt(e),null===h&amp;&amp;(h=(e=(e=u.document).querySelector&amp;&amp;e.querySelector("script[nonce]"))&amp;&amp;(e=e.nonce||e.getAttribute("nonce"))&amp;&amp;c.test(e)?e:""),(e=h)&amp;&amp;t.setAttribute("nonce",e)}(i,t),function(t){var e;return(e=(t||document).getElementsByTagName("HEAD"))&amp;&amp;0!=e.length?e[0]:t.documentElement}(n).appendChild(i),a}function Va(){if(this&amp;&amp;this.Vb){var t=this.Vb;t&amp;&amp;"SCRIPT"==t.tagName&amp;&amp;Ua(t,!0,this.Ma)}}function Ua(t,e,n){null!=n&amp;&amp;u.clearTimeout(n),t.onload=f,t.onerror=f,t.onreadystatechange=f,e&amp;&amp;window.setTimeout(function(){t&amp;&amp;t.parentNode&amp;&amp;t.parentNode.removeChild(t)},0)}var Fa=0,qa=1;function Ba(t,e){var n="Jsloader error (code #"+t+")";e&amp;&amp;(n+=": "+e),x.call(this,n),this.code=t}function Ga(t){this.f=t}function za(t,e,n){if(this.c=t,t=e||{},this.l=t.secureTokenEndpoint||"https://securetoken.googleapis.com/v1/token",this.v=t.secureTokenTimeout||Wa,this.g=dt(t.secureTokenHeaders||Xa),this.h=t.firebaseEndpoint||"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",this.i=t.identityPlatformEndpoint||"https://identitytoolkit.googleapis.com/v2/",this.m=t.firebaseTimeout||Ja,this.a=dt(t.firebaseHeaders||Ya),n&amp;&amp;(this.a["X-Client-Version"]=n,this.g["X-Client-Version"]=n),n="Node"==gr(),!(n=u.XMLHttpRequest||n&amp;&amp;r.INTERNAL.node&amp;&amp;r.INTERNAL.node.XMLHttpRequest)&amp;&amp;!yr())throw new A("internal-error","The XMLHttpRequest compatibility library was not found.");this.f=void 0,yr()?this.f=new sa(self):mr()?this.f=new Ga(n):this.f=new Wo,this.b=null}T(Ba,x),T(Ga,Go),Ga.prototype.a=function(){return new this.f},Ga.prototype.b=function(){return{}};var Ka,Ha="idToken",Wa=new Mr(3e4,6e4),Xa={"Content-Type":"application/x-www-form-urlencoded"},Ja=new Mr(3e4,6e4),Ya={"Content-Type":"application/json"};function Qa(t,e){e?t.a["X-Firebase-Locale"]=e:delete t.a["X-Firebase-Locale"]}function $a(t,e){e&amp;&amp;(t.l=Za("https://securetoken.googleapis.com/v1/token",e),t.h=Za("https://www.googleapis.com/identitytoolkit/v3/relyingparty/",e),t.i=Za("https://identitytoolkit.googleapis.com/v2/",e))}function Za(t,e){return t=Mn(t),e=Mn(e.url),t.c=t.a+t.c,Rn(t,e.f),t.a=e.a,xn(t,e.g),t.toString()}function ts(t,e){e?(t.a["X-Client-Version"]=e,t.g["X-Client-Version"]=e):(delete t.a["X-Client-Version"],delete t.g["X-Client-Version"])}function es(t,e,n,r,i,o,a){(function(){var t=Tr();return!((t=_r(t)!=wr?null:(t=t.match(/\sChrome\/(\d+)/i))&amp;&amp;2==t.length?parseInt(t[1],10):null)&amp;&amp;30&gt;t||Wt&amp;&amp;ne&amp;&amp;!(9&lt;ne))})()||yr()?t=_(t.u,t):(Ka||(Ka=new we(function(t,e){!function(t,e){if(((window.gapi||{}).client||{}).request)t();else{u[rs]=function(){((window.gapi||{}).client||{}).request?t():e(Error("CORS_UNSUPPORTED"))};var n=At(ns,{onload:rs});!function(t,e){Da(t,null,e,void 0)}(Ma(n),function(){e(Error("CORS_UNSUPPORTED"))})}}(t,e)})),t=_(t.o,t)),t(e,n,r,i,o,a)}za.prototype.S=function(){return this.b},za.prototype.u=function(t,e,n,r,i,o){if(yr()&amp;&amp;(void 0===u.fetch||void 0===u.Headers||void 0===u.Request))throw new A("operation-not-supported-in-this-environment","fetch, Headers and Request native APIs or equivalent Polyfills must be available to support HTTP requests from a Worker environment.");var a=new pa(this.f);if(o){a.g=Math.max(0,o);var s=setTimeout(function(){a.dispatchEvent("timeout")},o)}wn(a,"complete",function(){s&amp;&amp;clearTimeout(s);var t=null;try{t=JSON.parse(function(t){try{return t.a?t.a.responseText:""}catch(e){return aa(t.b,"Can not get responseText: "+e.message),""}}(this))||null}catch(e){t=null}e&amp;&amp;e(t)}),_n(a,"ready",function(){s&amp;&amp;clearTimeout(s),ze(this)}),_n(a,"timeout",function(){s&amp;&amp;clearTimeout(s),ze(this),e&amp;&amp;e(null)}),ga(a,t,n,r,i)};var ns=new mt(_t,"https://apis.google.com/js/client.js?onload=%{onload}"),rs="__fcb"+Math.floor(1e6*Math.random()).toString();function is(t,e,n,r,i,o,a){var s=Mn(e+n);Ln(s,"key",t.c),a&amp;&amp;Ln(s,"cb",E().toString());var u="GET"==r;if(u)for(var c in i)i.hasOwnProperty(c)&amp;&amp;Ln(s,c,i[c]);return new we(function(e,n){es(t,s.toString(),function(t){t?t.error?n(Zs(t,o||{})):e(t):n(new A("network-request-failed"))},r,u?void 0:er(Rr(i)),t.a,t.m.get())})}function os(t){if("string"!=typeof(t=t.email)||!lr.test(t))throw new A("invalid-email")}function as(t){"email"in t&amp;&amp;os(t)}function ss(t){if(!t[Ha]){if(t.mfaPendingCredential)throw new A("multi-factor-auth-required",null,dt(t));throw new A("internal-error")}}function us(t){if(t.phoneNumber||t.temporaryProof){if(!t.phoneNumber||!t.temporaryProof)throw new A("internal-error")}else{if(!t.sessionInfo)throw new A("missing-verification-id");if(!t.code)throw new A("missing-verification-code")}}za.prototype.o=function(t,e,n,r,i){var o=this;Ka.then(function(){window.gapi.client.setApiKey(o.c);var a=window.gapi.auth.getToken();window.gapi.auth.setToken(null),window.gapi.client.request({path:t,method:n,body:r,headers:i,authType:"none",callback:function(t){window.gapi.auth.setToken(a),e&amp;&amp;e(t)}})}).s(function(t){e&amp;&amp;e({error:{message:t&amp;&amp;t.message||"CORS_UNSUPPORTED"}})})},za.prototype.yb=function(){return Qs(this,Us,{})},za.prototype.Ab=function(t,e){return Qs(this,Ms,{idToken:t,email:e})},za.prototype.Bb=function(t,e){return Qs(this,Vs,{idToken:t,password:e})};var cs={displayName:"DISPLAY_NAME",photoUrl:"PHOTO_URL"};function hs(t){if(!t.phoneVerificationInfo)throw new A("internal-error");if(!t.phoneVerificationInfo.sessionInfo)throw new A("missing-verification-id");if(!t.phoneVerificationInfo.code)throw new A("missing-verification-code")}function fs(t){if(!t.requestUri||!t.sessionId&amp;&amp;!t.postBody&amp;&amp;!t.pendingToken)throw new A("internal-error")}function ls(t,e){return e.oauthIdToken&amp;&amp;e.providerId&amp;&amp;0==e.providerId.indexOf("oidc.")&amp;&amp;!e.pendingToken&amp;&amp;(t.sessionId?e.nonce=t.sessionId:t.postBody&amp;&amp;(Qn(t=new Wn(t.postBody),"nonce")&amp;&amp;(e.nonce=t.get("nonce")))),e}function ps(t){var e=null;if(t.needConfirmation?(t.code="account-exists-with-different-credential",e=Bo(t)):"FEDERATED_USER_ID_ALREADY_LINKED"==t.errorMessage?(t.code="credential-already-in-use",e=Bo(t)):"EMAIL_EXISTS"==t.errorMessage?(t.code="email-already-in-use",e=Bo(t)):t.errorMessage&amp;&amp;(e=$s(t.errorMessage)),e)throw e;ss(t)}function ds(t,e){return e.returnIdpCredential=!0,Qs(t,Bs,e)}function vs(t,e){return e.returnIdpCredential=!0,Qs(t,zs,e)}function ys(t,e){return e.returnIdpCredential=!0,e.autoCreate=!1,Qs(t,Gs,e)}function gs(t){if(!t.oobCode)throw new A("invalid-action-code")}(e=za.prototype).Cb=function(t,e){var n={idToken:t},r=[];return lt(cs,function(t,i){var o=e[i];null===o?r.push(t):i in e&amp;&amp;(n[i]=o)}),r.length&amp;&amp;(n.deleteAttribute=r),Qs(this,Ms,n)},e.ub=function(t,e){return yt(t={requestType:"PASSWORD_RESET",email:t},e),Qs(this,Rs,t)},e.vb=function(t,e){return yt(t={requestType:"EMAIL_SIGNIN",email:t},e),Qs(this,ks,t)},e.tb=function(t,e){return yt(t={requestType:"VERIFY_EMAIL",idToken:t},e),Qs(this,Ds,t)},e.Db=function(t,e,n){return yt(t={requestType:"VERIFY_AND_CHANGE_EMAIL",idToken:t,newEmail:e},n),Qs(this,Ps,t)},e.eb=function(t){return Qs(this,Ws,t)},e.mb=function(t,e){return Qs(this,Ls,{oobCode:t,newPassword:e})},e.Qa=function(t){return Qs(this,bs,{oobCode:t})},e.ib=function(t){return Qs(this,ms,{oobCode:t})};var ms={endpoint:"setAccountInfo",B:gs,Z:"email",C:!0},bs={endpoint:"resetPassword",B:gs,F:function(t){var e=t.requestType;if(!e||!t.email&amp;&amp;"EMAIL_SIGNIN"!=e&amp;&amp;"VERIFY_AND_CHANGE_EMAIL"!=e)throw new A("internal-error")},C:!0},ws={endpoint:"signupNewUser",B:function(t){if(os(t),!t.password)throw new A("weak-password")},F:ss,U:!0,C:!0},_s={endpoint:"createAuthUri",C:!0},Is={endpoint:"deleteAccount",M:["idToken"]},Es={endpoint:"setAccountInfo",M:["idToken","deleteProvider"],B:function(t){if("array"!=l(t.deleteProvider))throw new A("internal-error")}},Ts={endpoint:"emailLinkSignin",M:["email","oobCode"],B:os,F:ss,U:!0,C:!0},As={endpoint:"emailLinkSignin",M:["idToken","email","oobCode"],B:os,F:ss,U:!0},Ss={endpoint:"accounts/mfaEnrollment:finalize",M:["idToken","phoneVerificationInfo"],B:hs,F:ss,C:!0,Na:!0},Ns={endpoint:"accounts/mfaSignIn:finalize",M:["mfaPendingCredential","phoneVerificationInfo"],B:hs,F:ss,C:!0,Na:!0},Os={endpoint:"getAccountInfo"},ks={endpoint:"getOobConfirmationCode",M:["requestType"],B:function(t){if("EMAIL_SIGNIN"!=t.requestType)throw new A("internal-error");os(t)},Z:"email",C:!0},Ds={endpoint:"getOobConfirmationCode",M:["idToken","requestType"],B:function(t){if("VERIFY_EMAIL"!=t.requestType)throw new A("internal-error")},Z:"email",C:!0},Ps={endpoint:"getOobConfirmationCode",M:["idToken","newEmail","requestType"],B:function(t){if("VERIFY_AND_CHANGE_EMAIL"!=t.requestType)throw new A("internal-error")},Z:"email",C:!0},Rs={endpoint:"getOobConfirmationCode",M:["requestType"],B:function(t){if("PASSWORD_RESET"!=t.requestType)throw new A("internal-error");os(t)},Z:"email",C:!0},xs={kb:!0,endpoint:"getProjectConfig",Tb:"GET"},Cs={kb:!0,endpoint:"getRecaptchaParam",Tb:"GET",F:function(t){if(!t.recaptchaSiteKey)throw new A("internal-error")}},Ls={endpoint:"resetPassword",B:gs,Z:"email",C:!0},js={endpoint:"sendVerificationCode",M:["phoneNumber","recaptchaToken"],Z:"sessionInfo",C:!0},Ms={endpoint:"setAccountInfo",M:["idToken"],B:as,U:!0},Vs={endpoint:"setAccountInfo",M:["idToken"],B:function(t){if(as(t),!t.password)throw new A("weak-password")},F:ss,U:!0},Us={endpoint:"signupNewUser",F:ss,U:!0,C:!0},Fs={endpoint:"accounts/mfaEnrollment:start",M:["idToken","phoneEnrollmentInfo"],B:function(t){if(!t.phoneEnrollmentInfo)throw new A("internal-error");if(!t.phoneEnrollmentInfo.phoneNumber)throw new A("missing-phone-number");if(!t.phoneEnrollmentInfo.recaptchaToken)throw new A("missing-app-credential")},F:function(t){if(!t.phoneSessionInfo||!t.phoneSessionInfo.sessionInfo)throw new A("internal-error")},C:!0,Na:!0},qs={endpoint:"accounts/mfaSignIn:start",M:["mfaPendingCredential","mfaEnrollmentId","phoneSignInInfo"],B:function(t){if(!t.phoneSignInInfo||!t.phoneSignInInfo.recaptchaToken)throw new A("missing-app-credential")},F:function(t){if(!t.phoneResponseInfo||!t.phoneResponseInfo.sessionInfo)throw new A("internal-error")},C:!0,Na:!0},Bs={endpoint:"verifyAssertion",B:fs,Xa:ls,F:ps,U:!0,C:!0},Gs={endpoint:"verifyAssertion",B:fs,Xa:ls,F:function(t){if(t.errorMessage&amp;&amp;"USER_NOT_FOUND"==t.errorMessage)throw new A("user-not-found");if(t.errorMessage)throw $s(t.errorMessage);ss(t)},U:!0,C:!0},zs={endpoint:"verifyAssertion",B:function(t){if(fs(t),!t.idToken)throw new A("internal-error")},Xa:ls,F:ps,U:!0},Ks={endpoint:"verifyCustomToken",B:function(t){if(!t.token)throw new A("invalid-custom-token")},F:ss,U:!0,C:!0},Hs={endpoint:"verifyPassword",B:function(t){if(os(t),!t.password)throw new A("wrong-password")},F:ss,U:!0,C:!0},Ws={endpoint:"verifyPhoneNumber",B:us,F:ss,C:!0},Xs={endpoint:"verifyPhoneNumber",B:function(t){if(!t.idToken)throw new A("internal-error");us(t)},F:function(t){if(t.temporaryProof)throw t.code="credential-already-in-use",Bo(t);ss(t)}},Js={Gb:{USER_NOT_FOUND:"user-not-found"},endpoint:"verifyPhoneNumber",B:us,F:ss,C:!0},Ys={endpoint:"accounts/mfaEnrollment:withdraw",M:["idToken","mfaEnrollmentId"],F:function(t){if(!!t[Ha]^!!t.refreshToken)throw new A("internal-error")},C:!0,Na:!0};function Qs(t,e,n){if(!function(t,e){if(!e||!e.length)return!0;if(!t)return!1;for(var n=0;n&lt;e.length;n++){var r=t[e[n]];if(void 0===r||null===r||""===r)return!1}return!0}(n,e.M))return Oe(new A("internal-error"));var r,i=!!e.Na,o=e.Tb||"POST";return Ne(n).then(e.B).then(function(){return e.U&amp;&amp;(n.returnSecureToken=!0),e.C&amp;&amp;t.b&amp;&amp;void 0===n.tenantId&amp;&amp;(n.tenantId=t.b),is(t,i?t.i:t.h,e.endpoint,o,n,e.Gb,e.kb||!1)}).then(function(t){return r=t,e.Xa?e.Xa(n,r):r}).then(e.F).then(function(){if(!e.Z)return r;if(!(e.Z in r))throw new A("internal-error");return r[e.Z]})}function $s(t){return Zs({error:{errors:[{message:t}],code:400,message:t}})}function Zs(t,e){var n=(t.error&amp;&amp;t.error.errors&amp;&amp;t.error.errors[0]||{}).reason||"",r={keyInvalid:"invalid-api-key",ipRefererBlocked:"app-not-authorized"};if(n=r[n]?new A(r[n]):null)return n;for(var i in n=t.error&amp;&amp;t.error.message||"",yt(r={INVALID_CUSTOM_TOKEN:"invalid-custom-token",CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_EMAIL:"invalid-email",INVALID_PASSWORD:"wrong-password",USER_DISABLED:"user-disabled",MISSING_PASSWORD:"internal-error",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_OR_INVALID_NONCE:"missing-or-invalid-nonce",INVALID_MESSAGE_PAYLOAD:"invalid-message-payload",INVALID_RECIPIENT_EMAIL:"invalid-recipient-email",INVALID_SENDER:"invalid-sender",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",INVALID_PROVIDER_ID:"invalid-provider-id",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",CORS_UNSUPPORTED:"cors-unsupported",DYNAMIC_LINK_NOT_ACTIVATED:"dynamic-link-not-activated",INVALID_APP_ID:"invalid-app-id",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",WEAK_PASSWORD:"weak-password",OPERATION_NOT_ALLOWED:"operation-not-allowed",USER_CANCELLED:"user-cancelled",CAPTCHA_CHECK_FAILED:"captcha-check-failed",INVALID_APP_CREDENTIAL:"invalid-app-credential",INVALID_CODE:"invalid-verification-code",INVALID_PHONE_NUMBER:"invalid-phone-number",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_APP_CREDENTIAL:"missing-app-credential",MISSING_CODE:"missing-verification-code",MISSING_PHONE_NUMBER:"missing-phone-number",MISSING_SESSION_INFO:"missing-verification-id",QUOTA_EXCEEDED:"quota-exceeded",SESSION_EXPIRED:"code-expired",REJECTED_CREDENTIAL:"rejected-credential",INVALID_CONTINUE_URI:"invalid-continue-uri",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",MISSING_IOS_BUNDLE_ID:"missing-ios-bundle-id",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_DYNAMIC_LINK_DOMAIN:"invalid-dynamic-link-domain",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",INVALID_CERT_HASH:"invalid-cert-hash",UNSUPPORTED_TENANT_OPERATION:"unsupported-tenant-operation",INVALID_TENANT_ID:"invalid-tenant-id",TENANT_ID_MISMATCH:"tenant-id-mismatch",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",EMAIL_CHANGE_NEEDS_VERIFICATION:"email-change-needs-verification",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",UNSUPPORTED_FIRST_FACTOR:"unsupported-first-factor",UNVERIFIED_EMAIL:"unverified-email"},e||{}),e=(e=n.match(/^[^\s]+\s*:\s*([\s\S]*)$/))&amp;&amp;1&lt;e.length?e[1]:void 0,r)if(0===n.indexOf(i))return new A(r[i],e);return!e&amp;&amp;t&amp;&amp;(e=Pr(t)),new A("internal-error",e)}function tu(t){this.b=t,this.a=null,this.qb=function(t){return(iu||(iu=new we(function(t,e){function n(){jr(),Ar("gapi.load")("gapi.iframes",{callback:t,ontimeout:function(){jr(),e(Error("Network Error"))},timeout:nu.get()})}if(Ar("gapi.iframes.Iframe"))t();else if(Ar("gapi.load"))n();else{var r="__iframefcb"+Math.floor(1e6*Math.random()).toString();u[r]=function(){Ar("gapi.load")?n():e(Error("Network Error"))},Ne(Ma(r=At(eu,{onload:r}))).s(function(){e(Error("Network Error"))})}}).s(function(t){throw iu=null,t}))).then(function(){return new we(function(e,n){Ar("gapi.iframes.getContext")().open({where:document.body,url:t.b,messageHandlersFilter:Ar("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"),attributes:{style:{position:"absolute",top:"-100px",width:"1px",height:"1px"}},dontclear:!0},function(r){function i(){clearTimeout(o),e()}t.a=r,t.a.restyle({setHideOnLeave:!1});var o=setTimeout(function(){n(Error("Network Error"))},ru.get());r.ping(i).then(i,function(){n(Error("Network Error"))})})})})}(this)}var eu=new mt(_t,"https://apis.google.com/js/api.js?onload=%{onload}"),nu=new Mr(3e4,6e4),ru=new Mr(5e3,15e3),iu=null;function ou(t,e,n,r){this.l=t,this.h=e,this.i=n,this.g=r,this.f=null,this.g?t=Vn((t=Mn(this.g.url)).f,t.a,t.g,"/emulator/auth/iframe"):t=Vn("https",this.l,null,"/__/auth/iframe"),this.a=t,Ln(this.a,"apiKey",this.h),Ln(this.a,"appName",this.i),this.b=null,this.c=[]}function au(t,e,n,r,i,o){this.u=t,this.o=e,this.c=n,this.v=r,this.m=o,this.i=this.g=this.l=null,this.a=i,this.h=this.f=null}function su(t){try{return r.app(t).auth().Ga()}catch(t){return[]}}function uu(t,e,n,r,i,o){this.o=t,this.g=e,this.b=n,this.f=o,this.c=r||null,this.i=i||null,this.l=this.u=this.A=null,this.h=[],this.v=this.a=null}function cu(t){var e=ar();return function(t){return Qs(t,xs,{}).then(function(t){return t.authorizedDomains||[]})}(t).then(function(t){t:{var n=Mn(e),r=n.f;n=n.a;for(var i=0;i&lt;t.length;i++){var o=t[i],a=n,s=r;if(0==o.indexOf("chrome-extension://")?a=Mn(o).a==a&amp;&amp;"chrome-extension"==s:"http"!=s&amp;&amp;"https"!=s?a=!1:fr.test(o)?a=a==o:(o=o.split(".").join("\\."),a=new RegExp("^(.+\\."+o+"|"+o+")$","i").test(a)),a){t=!0;break t}}t=!1}if(!t)throw new Fo(ar())})}function hu(t){return t.v?t.v:(t.v=pr().then(function(){if(!t.u){var e=t.c,n=t.i,r=su(t.b),i=new ou(t.o,t.g,t.b,t.f);i.f=e,i.b=n,i.c=Q(r||[]),t.u=i.toString()}t.m=new tu(t.u),function(t){if(!t.m)throw Error("IfcHandler must be initialized!");!function(t,e){t.qb.then(function(){t.a.register("authEvent",e,Ar("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))})}(t.m,function(e){var n={};if(e&amp;&amp;e.authEvent){var r=!1;for(e=Mo(e.authEvent),n=0;n&lt;t.h.length;n++)r=t.h[n](e)||r;return(n={}).status=r?"ACK":"ERROR",Ne(n)}return n.status="ERROR",Ne(n)})}(t)}),t.v)}function fu(t){return t.l||(t.A=t.c?Er(t.c,su(t.b)):null,t.l=new za(t.g,P(t.i),t.A),t.f&amp;&amp;$a(t.l,t.f)),t.l}function lu(t,e,n,r,i,o,a,s,u,c,h,f){return(t=new au(t,e,n,r,i,f)).l=o,t.g=a,t.i=s,t.b=dt(u||null),t.f=c,t.xb(h).toString()}function pu(t){if(this.a=t||r.INTERNAL.reactNative&amp;&amp;r.INTERNAL.reactNative.AsyncStorage,!this.a)throw new A("internal-error","The React Native compatibility library was not found.");this.type="asyncStorage"}function du(t){this.b=t,this.a={},this.f=_(this.c,this)}ou.prototype.toString=function(){return this.f?Ln(this.a,"v",this.f):Yn(this.a.b,"v"),this.b?Ln(this.a,"eid",this.b):Yn(this.a.b,"eid"),this.c.length?Ln(this.a,"fw",this.c.join(",")):Yn(this.a.b,"fw"),this.a.toString()},au.prototype.xb=function(t){return this.h=t,this},au.prototype.toString=function(){if(this.m){var t=Mn(this.m.url);t=Vn(t.f,t.a,t.g,"/emulator/auth/handler")}else t=Vn("https",this.u,null,"/__/auth/handler");if(Ln(t,"apiKey",this.o),Ln(t,"appName",this.c),Ln(t,"authType",this.v),this.a.isOAuthProvider){var e=this.a;try{var n=r.app(this.c).auth().ka()}catch(t){n=null}for(var i in e.nb=n,Ln(t,"providerId",this.a.providerId),e=Rr((n=this.a).Hb))e[i]=e[i].toString();i=n.Pc,e=dt(e);for(var o=0;o&lt;i.length;o++){var a=i[o];a in e&amp;&amp;delete e[a]}n.ob&amp;&amp;n.nb&amp;&amp;!e[n.ob]&amp;&amp;(e[n.ob]=n.nb),pt(e)||Ln(t,"customParameters",Pr(e))}if("function"==typeof this.a.Pb&amp;&amp;((n=this.a.Pb()).length&amp;&amp;Ln(t,"scopes",n.join(","))),this.l?Ln(t,"redirectUrl",this.l):Yn(t.b,"redirectUrl"),this.g?Ln(t,"eventId",this.g):Yn(t.b,"eventId"),this.i?Ln(t,"v",this.i):Yn(t.b,"v"),this.b)for(var s in this.b)this.b.hasOwnProperty(s)&amp;&amp;!jn(t,s)&amp;&amp;Ln(t,s,this.b[s]);return this.h?Ln(t,"tid",this.h):Yn(t.b,"tid"),this.f?Ln(t,"eid",this.f):Yn(t.b,"eid"),(s=su(this.c)).length&amp;&amp;Ln(t,"fw",s.join(",")),t.toString()},(e=uu.prototype).Nb=function(t,e,n){var r=new A("popup-closed-by-user"),i=new A("web-storage-unsupported"),o=this,a=!1;return this.la().then(function(){(function(t){var e={type:"webStorageSupport"};return hu(t).then(function(){return function(t,e){return t.qb.then(function(){return new we(function(n){t.a.send(e.type,e,n,Ar("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))})})}(t.m,e)}).then(function(t){if(t&amp;&amp;t.length&amp;&amp;void 0!==t[0].webStorageSupport)return t[0].webStorageSupport;throw Error()})})(o).then(function(n){n||(t&amp;&amp;cr(t),e(i),a=!0)})}).s(function(){}).then(function(){if(!a)return function(t){return new we(function(e){return function n(){Tn(2e3).then(function(){if(t&amp;&amp;!t.closed)return n();e()})}()})}(t)}).then(function(){if(!a)return Tn(n).then(function(){e(r)})})},e.Wb=function(){var t=Tr();return!Dr(t)&amp;&amp;!Lr(t)},e.Sb=function(){return!1},e.Lb=function(t,e,n,r,i,o,a,s){if(!t)return Oe(new A("popup-blocked"));if(a&amp;&amp;!Dr())return this.la().s(function(e){cr(t),i(e)}),r(),Ne();this.a||(this.a=cu(fu(this)));var u=this;return this.a.then(function(){var e=u.la().s(function(e){throw cr(t),i(e),e});return r(),e}).then(function(){(Lo(n),a)||sr(lu(u.o,u.g,u.b,e,n,null,o,u.c,void 0,u.i,s,u.f),t)}).s(function(t){throw"auth/network-request-failed"==t.code&amp;&amp;(u.a=null),t})},e.Mb=function(t,e,n,r){this.a||(this.a=cu(fu(this)));var i=this;return this.a.then(function(){Lo(e),sr(lu(i.o,i.g,i.b,t,e,ar(),n,i.c,void 0,i.i,r,i.f))}).s(function(t){throw"auth/network-request-failed"==t.code&amp;&amp;(i.a=null),t})},e.la=function(){var t=this;return hu(this).then(function(){return t.m.qb}).s(function(){throw t.a=null,new A("network-request-failed")})},e.Zb=function(){return!0},e.Ea=function(t){this.h.push(t)},e.Ra=function(t){J(this.h,function(e){return e==t})},(e=pu.prototype).get=function(t){return Ne(this.a.getItem(t)).then(function(t){return t&amp;&amp;xr(t)})},e.set=function(t,e){return Ne(this.a.setItem(t,Pr(e)))},e.T=function(t){return Ne(this.a.removeItem(t))},e.ca=function(){},e.ia=function(){};var vu,yu=[];function gu(t,e,n){pt(t.a)&amp;&amp;t.b.addEventListener("message",t.f),void 0===t.a[e]&amp;&amp;(t.a[e]=[]),t.a[e].push(n)}function mu(t){this.a=t}function bu(t){this.c=t,this.b=!1,this.a=[]}function wu(t,e,n,r){var i,o,a,s,u=n||{},c=null;if(t.b)return Oe(Error("connection_unavailable"));var h=r?800:50,f="undefined"!=typeof MessageChannel?new MessageChannel:null;return new we(function(n,r){f?(i=Math.floor(Math.random()*Math.pow(10,20)).toString(),f.port1.start(),a=setTimeout(function(){r(Error("unsupported_event"))},h),c={messageChannel:f,onMessage:o=function(t){t.data.eventId===i&amp;&amp;("ack"===t.data.status?(clearTimeout(a),s=setTimeout(function(){r(Error("timeout"))},3e3)):"done"===t.data.status?(clearTimeout(s),void 0!==t.data.response?n(t.data.response):r(Error("unknown_error"))):(clearTimeout(a),clearTimeout(s),r(Error("invalid_response"))))}},t.a.push(c),f.port1.addEventListener("message",o),t.c.postMessage({eventType:e,eventId:i,data:u},[f.port2])):r(Error("connection_unavailable"))}).then(function(e){return _u(t,c),e}).s(function(e){throw _u(t,c),e})}function _u(t,e){if(e){var n=e.messageChannel,r=e.onMessage;n&amp;&amp;(n.port1.removeEventListener("message",r),n.port1.close()),J(t.a,function(t){return t==e})}}function Iu(){if(!Au())throw new A("web-storage-unsupported");this.c={},this.a=[],this.b=0,this.m=u.indexedDB,this.type="indexedDB",this.g=this.l=this.f=this.i=null,this.o=!1,this.h=null;var t=this;yr()&amp;&amp;self?(this.l=function(){var t=yr()?self:null;if(G(yu,function(n){n.b==t&amp;&amp;(e=n)}),!e){var e=new du(t);yu.push(e)}return e}(),gu(this.l,"keyChanged",function(e,n){return Du(t).then(function(e){return 0&lt;e.length&amp;&amp;G(t.a,function(t){t(e)}),{keyProcessed:W(e,n.key)}})}),gu(this.l,"ping",function(){return Ne(["keyChanged"])})):function(){var t=u.navigator;return t&amp;&amp;t.serviceWorker?Ne().then(function(){return t.serviceWorker.ready}).then(function(t){return t.active||null}).s(function(){return null}):Ne(null)}().then(function(e){(t.h=e)&amp;&amp;(t.g=new bu(new mu(e)),wu(t.g,"ping",null,!0).then(function(e){e[0].fulfilled&amp;&amp;W(e[0].value,"keyChanged")&amp;&amp;(t.o=!0)}).s(function(){}))})}function Eu(t){return new we(function(e,n){var r=t.m.open("firebaseLocalStorageDb",1);r.onerror=function(t){try{t.preventDefault()}catch(t){}n(Error(t.target.error))},r.onupgradeneeded=function(t){t=t.target.result;try{t.createObjectStore("firebaseLocalStorage",{keyPath:"fbase_key"})}catch(t){n(t)}},r.onsuccess=function(r){(r=r.target.result).objectStoreNames.contains("firebaseLocalStorage")?e(r):function(t){return new we(function(e,n){var r=t.m.deleteDatabase("firebaseLocalStorageDb");r.onsuccess=function(){e()},r.onerror=function(t){n(Error(t.target.error))}})}(t).then(function(){return Eu(t)}).then(function(t){e(t)}).s(function(t){n(t)})}})}function Tu(t){return t.v||(t.v=Eu(t)),t.v}function Au(){try{return!!u.indexedDB}catch(t){return!1}}function Su(t){return t.objectStore("firebaseLocalStorage")}function Nu(t,e){return t.transaction(["firebaseLocalStorage"],e?"readwrite":"readonly")}function Ou(t){return new we(function(e,n){t.onsuccess=function(t){t&amp;&amp;t.target?e(t.target.result):e()},t.onerror=function(t){n(t.target.error)}})}function ku(t,e){return t.g&amp;&amp;t.h&amp;&amp;function(){var t=u.navigator;return t&amp;&amp;t.serviceWorker&amp;&amp;t.serviceWorker.controller||null}()===t.h?wu(t.g,"keyChanged",{key:e},t.o).then(function(){}).s(function(){}):Ne()}function Du(t){return Tu(t).then(function(t){var e=Su(Nu(t,!1));return e.getAll?Ou(e.getAll()):new we(function(t,n){var r=[],i=e.openCursor();i.onsuccess=function(e){(e=e.target.result)?(r.push(e.value),e.continue()):t(r)},i.onerror=function(t){n(t.target.error)}})}).then(function(e){var n={},r=[];if(0==t.b){for(r=0;r&lt;e.length;r++)n[e[r].fbase_key]=e[r].value;r=function t(e,n){var r,i=[];for(r in e)r in n?typeof e[r]!=typeof n[r]?i.push(r):"object"==typeof e[r]&amp;&amp;null!=e[r]&amp;&amp;null!=n[r]?0&lt;t(e[r],n[r]).length&amp;&amp;i.push(r):e[r]!==n[r]&amp;&amp;i.push(r):i.push(r);for(r in n)r in e||i.push(r);return i}(t.c,n),t.c=n}return r})}function Pu(t){t.i&amp;&amp;t.i.cancel("STOP_EVENT"),t.f&amp;&amp;(clearTimeout(t.f),t.f=null)}function Ru(t){var e=this,n=null;this.a=[],this.type="indexedDB",this.c=t,this.b=Ne().then(function(){if(Au()){var t=Cr(),r="__sak"+t;return vu||(vu=new Iu),(n=vu).set(r,t).then(function(){return n.get(r)}).then(function(e){if(e!==t)throw Error("indexedDB not supported!");return n.T(r)}).then(function(){return n}).s(function(){return e.c})}return e.c}).then(function(t){return e.type=t.type,t.ca(function(t){G(e.a,function(e){e(t)})}),t})}function xu(){this.a={},this.type="inMemory"}function Cu(){if(!function(){var t="Node"==gr();if(!(t=Lu()||t&amp;&amp;r.INTERNAL.node&amp;&amp;r.INTERNAL.node.localStorage))return!1;try{return t.setItem("__sak","1"),t.removeItem("__sak"),!0}catch(t){return!1}}()){if("Node"==gr())throw new A("internal-error","The LocalStorage compatibility library was not found.");throw new A("web-storage-unsupported")}this.a=Lu()||r.INTERNAL.node.localStorage,this.type="localStorage"}function Lu(){try{var t=u.localStorage,e=Cr();return t&amp;&amp;(t.setItem(e,"1"),t.removeItem(e)),t}catch(t){return null}}function ju(){this.type="nullStorage"}function Mu(){if(!function(){var t="Node"==gr();if(!(t=Vu()||t&amp;&amp;r.INTERNAL.node&amp;&amp;r.INTERNAL.node.sessionStorage))return!1;try{return t.setItem("__sak","1"),t.removeItem("__sak"),!0}catch(t){return!1}}()){if("Node"==gr())throw new A("internal-error","The SessionStorage compatibility library was not found.");throw new A("web-storage-unsupported")}this.a=Vu()||r.INTERNAL.node.sessionStorage,this.type="sessionStorage"}function Vu(){try{var t=u.sessionStorage,e=Cr();return t&amp;&amp;(t.setItem(e,"1"),t.removeItem(e)),t}catch(t){return null}}du.prototype.c=function(t){var e=t.data.eventType,n=t.data.eventId,r=this.a[e];if(r&amp;&amp;0&lt;r.length){t.ports[0].postMessage({status:"ack",eventId:n,eventType:e,response:null});var i=[];G(r,function(e){i.push(Ne().then(function(){return e(t.origin,t.data.data)}))}),De(i).then(function(r){var i=[];G(r,function(t){i.push({fulfilled:t.Ob,value:t.value,reason:t.reason?t.reason.message:void 0})}),G(i,function(t){for(var e in t)void 0===t[e]&amp;&amp;delete t[e]}),t.ports[0].postMessage({status:"done",eventId:n,eventType:e,response:i})})}},mu.prototype.postMessage=function(t,e){this.a.postMessage(t,e)},bu.prototype.close=function(){for(;0&lt;this.a.length;)_u(this,this.a[0]);this.b=!0},(e=Iu.prototype).set=function(t,e){var n,r=!1,i=this;return Tu(this).then(function(e){return Ou((e=Su(Nu(n=e,!0))).get(t))}).then(function(o){var a=Su(Nu(n,!0));return o?(o.value=e,Ou(a.put(o))):(i.b++,r=!0,(o={}).fbase_key=t,o.value=e,Ou(a.add(o)))}).then(function(){return i.c[t]=e,ku(i,t)}).na(function(){r&amp;&amp;i.b--})},e.get=function(t){return Tu(this).then(function(e){return Ou(Su(Nu(e,!1)).get(t))}).then(function(t){return t&amp;&amp;t.value})},e.T=function(t){var e=!1,n=this;return Tu(this).then(function(r){return e=!0,n.b++,Ou(Su(Nu(r,!0)).delete(t))}).then(function(){return delete n.c[t],ku(n,t)}).na(function(){e&amp;&amp;n.b--})},e.ca=function(t){0==this.a.length&amp;&amp;function(t){Pu(t),function e(){t.f=setTimeout(function(){t.i=Du(t).then(function(e){0&lt;e.length&amp;&amp;G(t.a,function(t){t(e)})}).then(function(){e()}).s(function(t){"STOP_EVENT"!=t.message&amp;&amp;e()})},800)}()}(this),this.a.push(t)},e.ia=function(t){J(this.a,function(e){return e==t}),0==this.a.length&amp;&amp;Pu(this)},(e=Ru.prototype).get=function(t){return this.b.then(function(e){return e.get(t)})},e.set=function(t,e){return this.b.then(function(n){return n.set(t,e)})},e.T=function(t){return this.b.then(function(e){return e.T(t)})},e.ca=function(t){this.a.push(t)},e.ia=function(t){J(this.a,function(e){return e==t})},(e=xu.prototype).get=function(t){return Ne(this.a[t])},e.set=function(t,e){return this.a[t]=e,Ne()},e.T=function(t){return delete this.a[t],Ne()},e.ca=function(){},e.ia=function(){},(e=Cu.prototype).get=function(t){var e=this;return Ne().then(function(){return xr(e.a.getItem(t))})},e.set=function(t,e){var n=this;return Ne().then(function(){var r=Pr(e);null===r?n.T(t):n.a.setItem(t,r)})},e.T=function(t){var e=this;return Ne().then(function(){e.a.removeItem(t)})},e.ca=function(t){u.window&amp;&amp;sn(u.window,"storage",t)},e.ia=function(t){u.window&amp;&amp;hn(u.window,"storage",t)},(e=ju.prototype).get=function(){return Ne(null)},e.set=function(){return Ne()},e.T=function(){return Ne()},e.ca=function(){},e.ia=function(){},(e=Mu.prototype).get=function(t){var e=this;return Ne().then(function(){return xr(e.a.getItem(t))})},e.set=function(t,e){var n=this;return Ne().then(function(){var r=Pr(e);null===r?n.T(t):n.a.setItem(t,r)})},e.T=function(t){var e=this;return Ne().then(function(){e.a.removeItem(t)})},e.ca=function(){},e.ia=function(){};var Uu,Fu,qu={D:Cu,ab:Mu},Bu={D:Cu,ab:Mu},Gu={D:pu,ab:ju},zu={D:Cu,ab:ju},Ku={qd:"local",NONE:"none",sd:"session"};function Hu(){var t=!(Lr(Tr())||!vr()),e=Dr(),n=Sr();this.v=t,this.h=e,this.l=n,this.a={},Uu||(Uu=new function(){var t={};t.Browser=qu,t.Node=Bu,t.ReactNative=Gu,t.Worker=zu,this.a=t[gr()]}),t=Uu;try{this.g=!or()&amp;&amp;qr()||!u.indexedDB?new t.a.D:new Ru(yr()?new xu:new t.a.D)}catch(t){this.g=new xu,this.h=!0}try{this.i=new t.a.ab}catch(t){this.i=new xu}this.m=new xu,this.f=_(this.Xb,this),this.b={}}function Wu(){return Fu||(Fu=new Hu),Fu}function Xu(t,e){switch(e){case"session":return t.i;case"none":return t.m;default:return t.g}}function Ju(t,e){return"firebase:"+t.name+(e?":"+e:"")}function Yu(t,e,n){return n=Ju(e,n),"local"==e.D&amp;&amp;(t.b[n]=null),Xu(t,e.D).T(n)}function Qu(t){t.c&amp;&amp;(clearInterval(t.c),t.c=null)}(e=Hu.prototype).get=function(t,e){return Xu(this,t.D).get(Ju(t,e))},e.set=function(t,e,n){var r=Ju(t,n),i=this,o=Xu(this,t.D);return o.set(r,e).then(function(){return o.get(r)}).then(function(e){"local"==t.D&amp;&amp;(i.b[r]=e)})},e.addListener=function(t,e,n){t=Ju(t,e),this.l&amp;&amp;(this.b[t]=u.localStorage.getItem(t)),pt(this.a)&amp;&amp;(Xu(this,"local").ca(this.f),this.h||(or()||!qr())&amp;&amp;u.indexedDB||!this.l||function(t){Qu(t),t.c=setInterval(function(){for(var e in t.a){var n=u.localStorage.getItem(e),r=t.b[e];n!=r&amp;&amp;(t.b[e]=n,n=new Ye({type:"storage",key:e,target:window,oldValue:r,newValue:n,a:!0}),t.Xb(n))}},1e3)}(this)),this.a[t]||(this.a[t]=[]),this.a[t].push(n)},e.removeListener=function(t,e,n){t=Ju(t,e),this.a[t]&amp;&amp;(J(this.a[t],function(t){return t==n}),0==this.a[t].length&amp;&amp;delete this.a[t]),pt(this.a)&amp;&amp;(Xu(this,"local").ia(this.f),Qu(this))},e.Xb=function(t){if(t&amp;&amp;t.g){var e=t.a.key;if(null==e)for(var n in this.a){var r=this.b[n];void 0===r&amp;&amp;(r=null);var i=u.localStorage.getItem(n);i!==r&amp;&amp;(this.b[n]=i,this.lb(n))}else if(0==e.indexOf("firebase:")&amp;&amp;this.a[e]){if(void 0!==t.a.a?Xu(this,"local").ia(this.f):Qu(this),this.v)if(n=u.localStorage.getItem(e),(r=t.a.newValue)!==n)null!==r?u.localStorage.setItem(e,r):u.localStorage.removeItem(e);else if(this.b[e]===r&amp;&amp;void 0===t.a.a)return;var o=this;n=function(){void 0===t.a.a&amp;&amp;o.b[e]===u.localStorage.getItem(e)||(o.b[e]=u.localStorage.getItem(e),o.lb(e))},Wt&amp;&amp;ne&amp;&amp;10==ne&amp;&amp;u.localStorage.getItem(e)!==t.a.newValue&amp;&amp;t.a.newValue!==t.a.oldValue?setTimeout(n,10):n()}}else G(t,_(this.lb,this))},e.lb=function(t){this.a[t]&amp;&amp;G(this.a[t],function(t){t()})};var $u,Zu={name:"authEvent",D:"local"};function tc(t,e){this.b=ec,this.f=u.Uint8Array?new Uint8Array(this.b):Array(this.b),this.g=this.c=0,this.a=[],this.i=t,this.h=e,this.l=u.Int32Array?new Int32Array(64):Array(64),void 0===$u&amp;&amp;($u=u.Int32Array?new Int32Array(uc):uc),this.reset()}T(tc,function(){this.b=-1});for(var ec=64,nc=ec-1,rc=[],ic=0;ic&lt;nc;ic++)rc[ic]=0;var oc=Y(128,rc);function ac(t){for(var e=t.f,n=t.l,r=0,i=0;i&lt;e.length;)n[r++]=e[i]&lt;&lt;24|e[i+1]&lt;&lt;16|e[i+2]&lt;&lt;8|e[i+3],i=4*r;for(e=16;64&gt;e;e++){i=0|n[e-15],r=0|n[e-2];var o=(0|n[e-16])+((i&gt;&gt;&gt;7|i&lt;&lt;25)^(i&gt;&gt;&gt;18|i&lt;&lt;14)^i&gt;&gt;&gt;3)|0,a=(0|n[e-7])+((r&gt;&gt;&gt;17|r&lt;&lt;15)^(r&gt;&gt;&gt;19|r&lt;&lt;13)^r&gt;&gt;&gt;10)|0;n[e]=o+a|0}r=0|t.a[0],i=0|t.a[1];var s=0|t.a[2],u=0|t.a[3],c=0|t.a[4],h=0|t.a[5],f=0|t.a[6];for(o=0|t.a[7],e=0;64&gt;e;e++){var l=((r&gt;&gt;&gt;2|r&lt;&lt;30)^(r&gt;&gt;&gt;13|r&lt;&lt;19)^(r&gt;&gt;&gt;22|r&lt;&lt;10))+(r&amp;i^r&amp;s^i&amp;s)|0;a=(o=o+((c&gt;&gt;&gt;6|c&lt;&lt;26)^(c&gt;&gt;&gt;11|c&lt;&lt;21)^(c&gt;&gt;&gt;25|c&lt;&lt;7))|0)+((a=(a=c&amp;h^~c&amp;f)+(0|$u[e])|0)+(0|n[e])|0)|0,o=f,f=h,h=c,c=u+a|0,u=s,s=i,i=r,r=a+l|0}t.a[0]=t.a[0]+r|0,t.a[1]=t.a[1]+i|0,t.a[2]=t.a[2]+s|0,t.a[3]=t.a[3]+u|0,t.a[4]=t.a[4]+c|0,t.a[5]=t.a[5]+h|0,t.a[6]=t.a[6]+f|0,t.a[7]=t.a[7]+o|0}function sc(t,e,n){void 0===n&amp;&amp;(n=e.length);var r=0,i=t.c;if("string"==typeof e)for(;r&lt;n;)t.f[i++]=e.charCodeAt(r++),i==t.b&amp;&amp;(ac(t),i=0);else{if(!p(e))throw Error("message must be string or array");for(;r&lt;n;){var o=e[r++];if(!("number"==typeof o&amp;&amp;0&lt;=o&amp;&amp;255&gt;=o&amp;&amp;o==(0|o)))throw Error("message must be a byte array");t.f[i++]=o,i==t.b&amp;&amp;(ac(t),i=0)}}t.c=i,t.g+=n}tc.prototype.reset=function(){this.g=this.c=0,this.a=u.Int32Array?new Int32Array(this.h):Q(this.h)};var uc=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function cc(){tc.call(this,8,hc)}T(cc,tc);var hc=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];function fc(t,e,n,r,i,o){this.m=t,this.i=e,this.l=n,this.v=r||null,this.u=i||null,this.o=o,this.h=e+":"+n,this.A=new function(){this.a=Wu()},this.g=new function(t){this.a=t,this.b=Wu()}(this.h),this.f=null,this.b=[],this.a=this.c=null}function lc(t){return new A("invalid-cordova-configuration",t)}function pc(t){var e=new cc;sc(e,t),t=[];var n=8*e.g;56&gt;e.c?sc(e,oc,56-e.c):sc(e,oc,e.b-(e.c-56));for(var r=63;56&lt;=r;r--)e.f[r]=255&amp;n,n/=256;for(ac(e),r=n=0;r&lt;e.i;r++)for(var i=24;0&lt;=i;i-=8)t[n++]=e.a[r]&gt;&gt;i&amp;255;return function(t){return K(t,function(t){return 1&lt;(t=t.toString(16)).length?t:"0"+t}).join("")}(t)}function dc(t,e){for(var n=0;n&lt;t.b.length;n++)try{t.b[n](e)}catch(t){}}function vc(t){return t.f||(t.f=t.la().then(function(){return new we(function(e){t.Ea(function n(r){return e(r),t.Ra(n),!1}),function(t){function e(e){r=!0,i&amp;&amp;i.cancel(),yc(t).then(function(r){var i=n;if(r&amp;&amp;e&amp;&amp;e.url){var o=null;-1!=(i=to(e.url)).indexOf("/__/auth/callback")&amp;&amp;(o=(o="object"==typeof(o=xr(jn(o=Mn(i),"firebaseError")||null))?S(o):null)?new jo(r.c,r.b,null,null,o,null,r.S()):new jo(r.c,r.b,i,r.f,null,null,r.S())),i=o||n}dc(t,i)})}var n=new jo("unknown",null,null,null,new A("no-auth-event")),r=!1,i=Tn(500).then(function(){return yc(t).then(function(){r||dc(t,n)})}),o=u.handleOpenURL;u.handleOpenURL=function(t){if(0==t.toLowerCase().indexOf(Ar("BuildInfo.packageName",u).toLowerCase()+"://")&amp;&amp;e({url:t}),"function"==typeof o)try{o(t)}catch(t){}},Uo||(Uo=new function(){this.b=null,this.a=[]}),function(t){var e=Uo;e.a.push(t),e.b||(e.b=function(t){for(var n=0;n&lt;e.a.length;n++)e.a[n](t)},"function"==typeof(t=Ar("universalLinks.subscribe",u))&amp;&amp;t(null,e.b))}(e)}(t)})})),t.f}function yc(t){var e=null;return function(t){return t.b.get(Zu,t.a).then(function(t){return Mo(t)})}(t.g).then(function(n){return e=n,Yu((n=t.g).b,Zu,n.a)}).then(function(){return e})}(e=fc.prototype).la=function(){return this.Ia?this.Ia:this.Ia=(dr(void 0)?pr().then(function(){return new we(function(t,e){var n=u.document,r=setTimeout(function(){e(Error("Cordova framework is not ready."))},1e3);n.addEventListener("deviceready",function(){clearTimeout(r),t()},!1)})}):Oe(Error("Cordova must run in an Android or iOS file scheme."))).then(function(){if("function"!=typeof Ar("universalLinks.subscribe",u))throw lc("cordova-universal-links-plugin-fix is not installed");if(void 0===Ar("BuildInfo.packageName",u))throw lc("cordova-plugin-buildinfo is not installed");if("function"!=typeof Ar("cordova.plugins.browsertab.openUrl",u))throw lc("cordova-plugin-browsertab is not installed");if("function"!=typeof Ar("cordova.InAppBrowser.open",u))throw lc("cordova-plugin-inappbrowser is not installed")},function(){throw new A("cordova-not-ready")})},e.Nb=function(t,e){return e(new A("operation-not-supported-in-this-environment")),Ne()},e.Lb=function(){return Oe(new A("operation-not-supported-in-this-environment"))},e.Zb=function(){return!1},e.Wb=function(){return!0},e.Sb=function(){return!0},e.Mb=function(t,e,n,r){if(this.c)return Oe(new A("redirect-operation-pending"));var i=this,o=u.document,a=null,s=null,c=null,h=null;return this.c=Ne().then(function(){return Lo(e),vc(i)}).then(function(){return function(t,e,n,r,i){var o=function(){for(var t=20,e=[];0&lt;t;)e.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()))),t--;return e.join("")}(),a=new jo(e,r,null,o,new A("no-auth-event"),null,i),s=Ar("BuildInfo.packageName",u);if("string"!=typeof s)throw new A("invalid-cordova-configuration");var c=Ar("BuildInfo.displayName",u),h={};if(Tr().toLowerCase().match(/iphone|ipad|ipod/))h.ibi=s;else{if(!Tr().toLowerCase().match(/android/))return Oe(new A("operation-not-supported-in-this-environment"));h.apn=s}c&amp;&amp;(h.appDisplayName=c),o=pc(o),h.sessionId=o;var f=lu(t.m,t.i,t.l,e,n,null,r,t.v,h,t.u,i,t.o);return t.la().then(function(){var e=t.h;return t.A.a.set(Zu,a.w(),e)}).then(function(){var e=Ar("cordova.plugins.browsertab.isAvailable",u);if("function"!=typeof e)throw new A("invalid-cordova-configuration");var n=null;e(function(e){if(e){if("function"!=typeof(n=Ar("cordova.plugins.browsertab.openUrl",u)))throw new A("invalid-cordova-configuration");n(f)}else{if("function"!=typeof(n=Ar("cordova.InAppBrowser.open",u)))throw new A("invalid-cordova-configuration");e=Tr(),t.a=n(f,e.match(/(iPad|iPhone|iPod).*OS 7_\d/i)||e.match(/(iPad|iPhone|iPod).*OS 8_\d/i)?"_blank":"_system","location=yes")}})})}(i,t,e,n,r)}).then(function(){return new we(function(t,e){s=function(){var e=Ar("cordova.plugins.browsertab.close",u);return t(),"function"==typeof e&amp;&amp;e(),i.a&amp;&amp;"function"==typeof i.a.close&amp;&amp;(i.a.close(),i.a=null),!1},i.Ea(s),c=function(){a||(a=Tn(2e3).then(function(){e(new A("redirect-cancelled-by-user"))}))},h=function(){Vr()&amp;&amp;c()},o.addEventListener("resume",c,!1),Tr().toLowerCase().match(/android/)||o.addEventListener("visibilitychange",h,!1)}).s(function(t){return yc(i).then(function(){throw t})})}).na(function(){c&amp;&amp;o.removeEventListener("resume",c,!1),h&amp;&amp;o.removeEventListener("visibilitychange",h,!1),a&amp;&amp;a.cancel(),s&amp;&amp;i.Ra(s),i.c=null})},e.Ea=function(t){this.b.push(t),vc(this).s(function(e){"auth/invalid-cordova-configuration"===e.code&amp;&amp;(e=new jo("unknown",null,null,null,new A("no-auth-event")),t(e))})},e.Ra=function(t){J(this.b,function(e){return e==t})};var gc={name:"pendingRedirect",D:"session"};function mc(t){return Yu(t.b,gc,t.a)}function bc(t,e,n,r){this.i={},this.u=0,this.O=t,this.m=e,this.v=n,this.G=r,this.h=[],this.f=!1,this.l=_(this.o,this),this.b=new Cc,this.A=new Uc,this.g=new function(t){this.a=t,this.b=Wu()}(Rc(this.m,this.v)),this.c={},this.c.unknown=this.b,this.c.signInViaRedirect=this.b,this.c.linkViaRedirect=this.b,this.c.reauthViaRedirect=this.b,this.c.signInViaPopup=this.A,this.c.linkViaPopup=this.A,this.c.reauthViaPopup=this.A,this.a=wc(this.O,this.m,this.v,N,this.G)}function wc(t,e,n,i,o){var a=r.SDK_VERSION||null;return dr()?new fc(t,e,n,a,i,o):new uu(t,e,n,a,i,o)}function _c(t){t.f||(t.f=!0,t.a.Ea(t.l));var e=t.a;return t.a.la().s(function(n){throw t.a==e&amp;&amp;t.reset(),n})}function Ic(t){t.a.Wb()&amp;&amp;_c(t).s(function(e){var n=new jo("unknown",null,null,null,new A("operation-not-supported-in-this-environment"));Oc(e)&amp;&amp;t.o(n)}),t.a.Sb()||Lc(t.b)}function Ec(t,e){W(t.h,e)||t.h.push(e),t.f||function(t){return t.b.get(gc,t.a).then(function(t){return"pending"==t})}(t.g).then(function(e){e?mc(t.g).then(function(){_c(t).s(function(e){var n=new jo("unknown",null,null,null,new A("operation-not-supported-in-this-environment"));Oc(e)&amp;&amp;t.o(n)})}):Ic(t)}).s(function(){Ic(t)})}function Tc(t,e){J(t.h,function(t){return t==e})}bc.prototype.reset=function(){this.f=!1,this.a.Ra(this.l),this.a=wc(this.O,this.m,this.v,null,this.G),this.i={}},bc.prototype.o=function(t){if(!t)throw new A("invalid-auth-event");if(6e5&lt;=E()-this.u&amp;&amp;(this.i={},this.u=0),t&amp;&amp;t.getUid()&amp;&amp;this.i.hasOwnProperty(t.getUid()))return!1;for(var e=!1,n=0;n&lt;this.h.length;n++){var r=this.h[n];if(r.Eb(t.c,t.b)){(e=this.c[t.c])&amp;&amp;(e.h(t,r),t&amp;&amp;(t.f||t.b)&amp;&amp;(this.i[t.getUid()]=!0,this.u=E())),e=!0;break}}return Lc(this.b),e};var Ac=new Mr(2e3,1e4),Sc=new Mr(3e4,6e4);function Nc(t,e,n,r,i,o,a){return t.a.Lb(e,n,r,function(){t.f||(t.f=!0,t.a.Ea(t.l))},function(){t.reset()},i,o,a)}function Oc(t){return!(!t||"auth/cordova-not-ready"!=t.code)}function kc(t,e,n,r,i){var o;return function(t){return t.b.set(gc,"pending",t.a)}(t.g).then(function(){return t.a.Mb(e,n,r,i).s(function(e){if(Oc(e))throw new A("operation-not-supported-in-this-environment");return o=e,mc(t.g).then(function(){throw o})}).then(function(){return t.a.Zb()?new we(function(){}):mc(t.g).then(function(){return t.qa()}).then(function(){}).s(function(){})})})}function Dc(t,e,n,r,i){return t.a.Nb(r,function(t){e.ma(n,null,t,i)},Ac.get())}bc.prototype.qa=function(){return this.b.qa()};var Pc={};function Rc(t,e,n){return t=t+":"+e,n&amp;&amp;(t=t+":"+n.url),t}function xc(t,e,n,r){var i=Rc(e,n,r);return Pc[i]||(Pc[i]=new bc(t,e,n,r)),Pc[i]}function Cc(){this.b=null,this.f=[],this.c=[],this.a=null,this.i=this.g=!1}function Lc(t){t.g||(t.g=!0,Vc(t,!1,null,null))}function jc(t){t.g&amp;&amp;!t.i&amp;&amp;Vc(t,!1,null,null)}function Mc(t,e){if(t.b=function(){return Ne(e)},t.f.length)for(var n=0;n&lt;t.f.length;n++)t.f[n](e)}function Vc(t,e,n,r){e?r?function(t,e){if(t.b=function(){return Oe(e)},t.c.length)for(var n=0;n&lt;t.c.length;n++)t.c[n](e)}(t,r):Mc(t,n):Mc(t,{user:null}),t.f=[],t.c=[]}function Uc(){}function Fc(){this.hb=!1,Object.defineProperty(this,"appVerificationDisabled",{get:function(){return this.hb},set:function(t){this.hb=t},enumerable:!1})}function qc(t,e){this.a=e,Hr(this,"verificationId",t)}function Bc(t,e,n,r){return new Ro(t).eb(e,n).then(function(t){return new qc(t,r)})}function Gc(t,e,n){var r=e&amp;&amp;e[Kc];if(!r)throw new A("argument-error","Internal assert: Invalid MultiFactorResolver");this.a=t,this.f=dt(e),this.g=n,this.c=new eo(null,r),this.b=[];var i=this;G(e[zc]||[],function(t){(t=Qr(t))&amp;&amp;i.b.push(t)}),Hr(this,"auth",this.a),Hr(this,"session",this.c),Hr(this,"hints",this.b)}Cc.prototype.reset=function(){this.b=null,this.a&amp;&amp;(this.a.cancel(),this.a=null)},Cc.prototype.h=function(t,e){if(t){this.reset(),this.g=!0;var n=t.c,r=t.b,i=t.a&amp;&amp;"auth/web-storage-unsupported"==t.a.code,o=t.a&amp;&amp;"auth/operation-not-supported-in-this-environment"==t.a.code;this.i=!(!i&amp;&amp;!o),"unknown"!=n||i||o?t.a?(Vc(this,!0,null,t.a),Ne()):e.Fa(n,r)?function(t,e,n){n=n.Fa(e.c,e.b);var r=e.g,i=e.f,o=e.i,a=e.S(),s=!!e.c.match(/Redirect$/);n(r,i,a,o).then(function(e){Vc(t,s,e,null)}).s(function(e){Vc(t,s,null,e)})}(this,t,e):Oe(new A("invalid-auth-event")):(Vc(this,!1,null,null),Ne())}else Oe(new A("invalid-auth-event"))},Cc.prototype.qa=function(){var t=this;return new we(function(e,n){t.b?t.b().then(e,n):(t.f.push(e),t.c.push(n),function(t){var e=new A("timeout");t.a&amp;&amp;t.a.cancel(),t.a=Tn(Sc.get()).then(function(){t.b||(t.g=!0,Vc(t,!0,null,e))})}(t))})},Uc.prototype.h=function(t,e){if(t){var n=t.c,r=t.b;t.a?(e.ma(t.c,null,t.a,t.b),Ne()):e.Fa(n,r)?function(t,e){var n=t.b,r=t.c;e.Fa(r,n)(t.g,t.f,t.S(),t.i).then(function(t){e.ma(r,t,null,n)}).s(function(t){e.ma(r,null,t,n)})}(t,e):Oe(new A("invalid-auth-event"))}else Oe(new A("invalid-auth-event"))},qc.prototype.confirm=function(t){return t=xo(this.verificationId,t),this.a(t)};var zc="mfaInfo",Kc="mfaPendingCredential";function Hc(t,e,n,r){A.call(this,"multi-factor-auth-required",r,e),this.b=new Gc(t,e,n),Hr(this,"resolver",this.b)}function Wc(t,e,n){if(t&amp;&amp;v(t.serverResponse)&amp;&amp;"auth/multi-factor-auth-required"===t.code)try{return new Hc(e,t.serverResponse,n,t.message)}catch(t){}return null}function Xc(){}function Jc(t){Hr(this,"factorId",t.fa),this.a=t}function Yc(t){if(Jc.call(this,t),this.a.fa!=Ro.PROVIDER_ID)throw new A("argument-error","firebase.auth.PhoneMultiFactorAssertion requires a valid firebase.auth.PhoneAuthCredential")}function Qc(t,e){for(var n in Je.call(this,t),e)this[n]=e[n]}function $c(t,e){this.a=t,this.b=[],this.c=_(this.xc,this),sn(this.a,"userReloaded",this.c);var n=[];e&amp;&amp;e.multiFactor&amp;&amp;e.multiFactor.enrolledFactors&amp;&amp;G(e.multiFactor.enrolledFactors,function(t){var e=null,r={};if(t){t.uid&amp;&amp;(r[ti]=t.uid),t.displayName&amp;&amp;(r[$r]=t.displayName),t.enrollmentTime&amp;&amp;(r[Zr]=new Date(t.enrollmentTime).toISOString()),t.phoneNumber&amp;&amp;(r[ei]=t.phoneNumber);try{e=new ni(r)}catch(t){}t=e}else t=null;t&amp;&amp;n.push(t)}),Zc(this,n)}function Zc(t,e){t.b=e,Hr(t,"enrolledFactors",e)}function th(t,e,n){if(this.h=t,this.i=e,this.g=n,this.c=3e4,this.f=96e4,this.b=null,this.a=this.c,this.f&lt;this.c)throw Error("Proactive refresh lower bound greater than upper bound!")}function eh(t){this.c=t,this.b=this.a=null}function nh(t){return t.b&amp;&amp;1e3*t.b.c||0}function rh(t,e){var n=e.refreshToken;t.b=Ui(e[Ha]||""),t.a=n}function ih(t,e){return function(t,e){return new we(function(n,r){"refresh_token"==e.grant_type&amp;&amp;e.refresh_token||"authorization_code"==e.grant_type&amp;&amp;e.code?es(t,t.l+"?key="+encodeURIComponent(t.c),function(t){t?t.error?r(Zs(t)):t.access_token&amp;&amp;t.refresh_token?n(t):r(new A("internal-error")):r(new A("network-request-failed"))},"POST",Jn(e).toString(),t.g,t.v.get()):r(new A("internal-error"))})}(t.c,e).then(function(e){return t.b=Ui(e.access_token),t.a=e.refresh_token,{accessToken:t.b.toString(),refreshToken:t.a}}).s(function(e){throw"auth/user-token-expired"==e.code&amp;&amp;(t.a=null),e})}function oh(t,e){this.a=t||null,this.b=e||null,Wr(this,{lastSignInTime:Fr(e||null),creationTime:Fr(t||null)})}function ah(t,e,n){this.G=[],this.l=t.apiKey,this.m=t.appName,this.o=t.authDomain||null;var i=r.SDK_VERSION?Er(r.SDK_VERSION):null;this.a=new za(this.l,P(N),i),t.emulatorConfig&amp;&amp;$a(this.a,t.emulatorConfig),this.b=new eh(this.a),dh(this,e[Ha]),rh(this.b,e),Hr(this,"refreshToken",this.b.a),gh(this,n||{}),bn.call(this),this.P=!1,this.o&amp;&amp;Nr()&amp;&amp;(this.i=xc(this.o,this.l,this.m)),this.R=[],this.f=null,this.u=function(t){return new th(function(){return t.I(!0)},function(t){return!(!t||"auth/network-request-failed"!=t.code)},function(){var e=nh(t.b)-E()-3e5;return 0&lt;e?e:0})}(this),this.$=_(this.gb,this);var o=this;this.pa=null,this.Ba=function(t){o.wa(t.h)},this.ba=null,this.za=function(t){$a(o.a,t.c)},this.W=null,this.X=[],this.Aa=function(t){ch(o,t.f)},this.aa=null,this.N=new $c(this,n),Hr(this,"multiFactor",this.N)}function sh(t,e){t.ba&amp;&amp;hn(t.ba,"languageCodeChanged",t.Ba),(t.ba=e)&amp;&amp;sn(e,"languageCodeChanged",t.Ba)}function uh(t,e){t.W&amp;&amp;hn(t.W,"emulatorConfigChanged",t.za),(t.W=e)&amp;&amp;sn(e,"emulatorConfigChanged",t.za)}function ch(t,e){t.X=e,ts(t.a,r.SDK_VERSION?Er(r.SDK_VERSION,t.X):null)}function hh(t,e){t.aa&amp;&amp;hn(t.aa,"frameworkChanged",t.Aa),(t.aa=e)&amp;&amp;sn(e,"frameworkChanged",t.Aa)}function fh(t){try{return r.app(t.m).auth()}catch(e){throw new A("internal-error","No firebase.auth.Auth instance is available for the Firebase App '"+t.m+"'!")}}function lh(t){t.A||t.u.b||(t.u.start(),hn(t,"tokenChanged",t.$),sn(t,"tokenChanged",t.$))}function ph(t){hn(t,"tokenChanged",t.$),t.u.stop()}function dh(t,e){t.ya=e,Hr(t,"_lat",e)}function vh(t){for(var e=[],n=0;n&lt;t.R.length;n++)e.push(t.R[n](t));return De(e).then(function(){return t})}function yh(t){t.i&amp;&amp;!t.P&amp;&amp;(t.P=!0,Ec(t.i,t))}function gh(t,e){Wr(t,{uid:e.uid,displayName:e.displayName||null,photoURL:e.photoURL||null,email:e.email||null,emailVerified:e.emailVerified||!1,phoneNumber:e.phoneNumber||null,isAnonymous:e.isAnonymous||!1,tenantId:e.tenantId||null,metadata:new oh(e.createdAt,e.lastLoginAt),providerData:[]}),t.a.b=t.tenantId}function mh(){}function bh(t){return Ne().then(function(){if(t.A)throw new A("app-deleted")})}function wh(t){return K(t.providerData,function(t){return t.providerId})}function _h(t,e){e&amp;&amp;(Ih(t,e.providerId),t.providerData.push(e))}function Ih(t,e){J(t.providerData,function(t){return t.providerId==e})}function Eh(t,e,n){("uid"!=e||n)&amp;&amp;t.hasOwnProperty(e)&amp;&amp;Hr(t,e,n)}function Th(t,e){t!=e&amp;&amp;(Wr(t,{uid:e.uid,displayName:e.displayName,photoURL:e.photoURL,email:e.email,emailVerified:e.emailVerified,phoneNumber:e.phoneNumber,isAnonymous:e.isAnonymous,tenantId:e.tenantId,providerData:[]}),e.metadata?Hr(t,"metadata",function(t){return new oh(t.a,t.b)}(e.metadata)):Hr(t,"metadata",new oh),G(e.providerData,function(e){_h(t,e)}),function(t,e){t.b=e.b,t.a=e.a}(t.b,e.b),Hr(t,"refreshToken",t.b.a),Zc(t.N,e.N.b))}function Ah(t){return t.I().then(function(e){var n=t.isAnonymous;return function(t,e){return Qs(t.a,Os,{idToken:e}).then(_(t.Jc,t))}(t,e).then(function(){return n||Eh(t,"isAnonymous",!1),e})})}function Sh(t,e){e[Ha]&amp;&amp;t.ya!=e[Ha]&amp;&amp;(rh(t.b,e),t.dispatchEvent(new Qc("tokenChanged")),dh(t,e[Ha]),Eh(t,"refreshToken",t.b.a))}function Nh(t,e){return Ah(t).then(function(){if(W(wh(t),e))return vh(t).then(function(){throw new A("provider-already-linked")})})}function Oh(t,e,n){return Xr({user:t,credential:Co(e),additionalUserInfo:e=Ki(e),operationType:n})}function kh(t,e){return Sh(t,e),t.reload().then(function(){return t})}function Dh(t,e,n,i,o){if(!Nr())return Oe(new A("operation-not-supported-in-this-environment"));if(t.f&amp;&amp;!o)return Oe(t.f);var a=zi(n.providerId),s=Cr(t.uid+":::"),u=null;(!Dr()||vr())&amp;&amp;t.o&amp;&amp;n.isOAuthProvider&amp;&amp;(u=lu(t.o,t.l,t.m,e,n,null,s,r.SDK_VERSION||null,null,null,t.tenantId));var c=hr(u,a&amp;&amp;a.ua,a&amp;&amp;a.ta);return i=i().then(function(){if(Rh(t),!o)return t.I().then(function(){})}).then(function(){return Nc(t.i,c,e,n,s,!!u,t.tenantId)}).then(function(){return new we(function(n,r){t.ma(e,null,new A("cancelled-popup-request"),t.h||null),t.g=n,t.O=r,t.h=s,t.c=Dc(t.i,t,e,c,s)})}).then(function(t){return c&amp;&amp;cr(c),t?Xr(t):null}).s(function(t){throw c&amp;&amp;cr(c),t}),xh(t,i,o)}function Ph(t,e,n,r,i){if(!Nr())return Oe(new A("operation-not-supported-in-this-environment"));if(t.f&amp;&amp;!i)return Oe(t.f);var o=null,a=Cr(t.uid+":::");return r=r().then(function(){if(Rh(t),!i)return t.I().then(function(){})}).then(function(){return t.ga=a,vh(t)}).then(function(e){return t.ha&amp;&amp;(e=(e=t.ha).b.set(Lh,t.w(),e.a)),e}).then(function(){return kc(t.i,e,n,a,t.tenantId)}).s(function(e){if(o=e,t.ha)return jh(t.ha);throw o}).then(function(){if(o)throw o}),xh(t,r,i)}function Rh(t){if(!t.i||!t.P){if(t.i&amp;&amp;!t.P)throw new A("internal-error");throw new A("auth-domain-config-required")}}function xh(t,e,n){var r=function(t,e,n){return t.f&amp;&amp;!n?(e.cancel(),Oe(t.f)):e.s(function(e){throw!e||"auth/user-disabled"!=e.code&amp;&amp;"auth/user-token-expired"!=e.code||(t.f||t.dispatchEvent(new Qc("userInvalidated")),t.f=e),e})}(t,e,n);return t.G.push(r),r.na(function(){X(t.G,r)}),r.s(function(e){var n=null;throw e&amp;&amp;"auth/multi-factor-auth-required"===e.code&amp;&amp;(n=Wc(e.w(),fh(t),_(t.ic,t))),n||e})}function Ch(t){if(!t.apiKey)return null;var e={apiKey:t.apiKey,authDomain:t.authDomain,appName:t.appName,emulatorConfig:t.emulatorConfig},n={};if(!t.stsTokenManager||!t.stsTokenManager.accessToken)return null;n[Ha]=t.stsTokenManager.accessToken,n.refreshToken=t.stsTokenManager.refreshToken||null;var r=new ah(e,n,t);return t.providerData&amp;&amp;G(t.providerData,function(t){t&amp;&amp;_h(r,Xr(t))}),t.redirectEventId&amp;&amp;(r.ga=t.redirectEventId),r}Gc.prototype.Qc=function(t){var e=this;return t.rb(this.a.a,this.c).then(function(t){var n=dt(e.f);return delete n[zc],delete n[Kc],yt(n,t),e.g(n)})},T(Hc,A),Xc.prototype.rb=function(t,e,n){return e.type==no?function(t,e,n,r){return n.Ha().then(function(n){return n={idToken:n},void 0!==r&amp;&amp;(n.displayName=r),yt(n,{phoneVerificationInfo:Po(t.a)}),Qs(e,Ss,n)})}(this,t,e,n):function(t,e,n){return n.Ha().then(function(n){return yt(n={mfaPendingCredential:n},{phoneVerificationInfo:Po(t.a)}),Qs(e,Ns,n)})}(this,t,e)},T(Jc,Xc),T(Yc,Jc),T(Qc,Je),(e=$c.prototype).xc=function(t){Zc(this,function(t){var e=[];return G(t.mfaInfo||[],function(t){(t=Qr(t))&amp;&amp;e.push(t)}),e}(t.gd))},e.Qb=function(){return this.a.I().then(function(t){return new eo(t,null)})},e.ec=function(t,e){var n=this,r=this.a.a;return this.Qb().then(function(n){return t.rb(r,n,e)}).then(function(t){return Sh(n.a,t),n.a.reload()})},e.ad=function(t){var e=this,n="string"==typeof t?t:t.uid,r=this.a.a;return this.a.I().then(function(t){return Qs(r,Ys,{idToken:t,mfaEnrollmentId:n})}).then(function(t){var r=z(e.b,function(t){return t.uid!=n});return Zc(e,r),Sh(e.a,t),e.a.reload().s(function(t){if("auth/user-token-expired"!=t.code)throw t})})},e.w=function(){return{multiFactor:{enrolledFactors:K(this.b,function(t){return t.w()})}}},th.prototype.start=function(){this.a=this.c,function t(e,n){e.stop();e.b=Tn(function(t,e){return e?(t.a=t.c,t.g()):(e=t.a,t.a*=2,t.a&gt;t.f&amp;&amp;(t.a=t.f),e)}(e,n)).then(function(){return t=u.document,e=null,Vr()||!t?Ne():new we(function(n){e=function(){Vr()&amp;&amp;(t.removeEventListener("visibilitychange",e,!1),n())},t.addEventListener("visibilitychange",e,!1)}).s(function(n){throw t.removeEventListener("visibilitychange",e,!1),n});var t,e}).then(function(){return e.h()}).then(function(){t(e,!0)}).s(function(n){e.i(n)&amp;&amp;t(e,!1)})}(this,!0)},th.prototype.stop=function(){this.b&amp;&amp;(this.b.cancel(),this.b=null)},eh.prototype.w=function(){return{apiKey:this.c.c,refreshToken:this.a,accessToken:this.b&amp;&amp;this.b.toString(),expirationTime:nh(this)}},eh.prototype.getToken=function(t){return t=!!t,this.b&amp;&amp;!this.a?Oe(new A("user-token-expired")):t||!this.b||E()&gt;nh(this)-3e4?this.a?ih(this,{grant_type:"refresh_token",refresh_token:this.a}):Ne(null):Ne({accessToken:this.b.toString(),refreshToken:this.a})},oh.prototype.w=function(){return{lastLoginAt:this.b,createdAt:this.a}},T(ah,bn),ah.prototype.wa=function(t){this.pa=t,Qa(this.a,t)},ah.prototype.ka=function(){return this.pa},ah.prototype.Ga=function(){return Q(this.X)},ah.prototype.gb=function(){this.u.b&amp;&amp;(this.u.stop(),this.u.start())},Hr(ah.prototype,"providerId","firebase"),(e=ah.prototype).reload=function(){var t=this;return xh(this,bh(this).then(function(){return Ah(t).then(function(){return vh(t)}).then(mh)}))},e.nc=function(t){return this.I(t).then(function(t){return new function(t){var e=Fi(t);if(!(e&amp;&amp;e.exp&amp;&amp;e.auth_time&amp;&amp;e.iat))throw new A("internal-error","An internal error occurred. The token obtained by Firebase appears to be malformed. Please retry the operation.");Wr(this,{token:t,expirationTime:Fr(1e3*e.exp),authTime:Fr(1e3*e.auth_time),issuedAtTime:Fr(1e3*e.iat),signInProvider:e.firebase&amp;&amp;e.firebase.sign_in_provider?e.firebase.sign_in_provider:null,signInSecondFactor:e.firebase&amp;&amp;e.firebase.sign_in_second_factor?e.firebase.sign_in_second_factor:null,claims:e})}(t)})},e.I=function(t){var e=this;return xh(this,bh(this).then(function(){return e.b.getToken(t)}).then(function(t){if(!t)throw new A("internal-error");return t.accessToken!=e.ya&amp;&amp;(dh(e,t.accessToken),e.dispatchEvent(new Qc("tokenChanged"))),Eh(e,"refreshToken",t.refreshToken),t.accessToken}))},e.Jc=function(t){if(!(t=t.users)||!t.length)throw new A("internal-error");gh(this,{uid:(t=t[0]).localId,displayName:t.displayName,photoURL:t.photoUrl,email:t.email,emailVerified:!!t.emailVerified,phoneNumber:t.phoneNumber,lastLoginAt:t.lastLoginAt,createdAt:t.createdAt,tenantId:t.tenantId});for(var e=function(t){return(t=t.providerUserInfo)&amp;&amp;t.length?K(t,function(t){return new function(t,e,n,r,i,o){Wr(this,{uid:t,displayName:r||null,photoURL:i||null,email:n||null,phoneNumber:o||null,providerId:e})}(t.rawId,t.providerId,t.email,t.displayName,t.photoUrl,t.phoneNumber)}):[]}(t),n=0;n&lt;e.length;n++)_h(this,e[n]);Eh(this,"isAnonymous",!(this.email&amp;&amp;t.passwordHash||this.providerData&amp;&amp;this.providerData.length)),this.dispatchEvent(new Qc("userReloaded",{gd:t}))},e.Kc=function(t){return zr("firebase.User.prototype.reauthenticateAndRetrieveDataWithCredential is deprecated. Please use firebase.User.prototype.reauthenticateWithCredential instead."),this.sb(t)},e.sb=function(t){var e=this,n=null;return xh(this,t.c(this.a,this.uid).then(function(t){return Sh(e,t),n=Oh(e,t,"reauthenticate"),e.f=null,e.reload()}).then(function(){return n}),!0)},e.Bc=function(t){return zr("firebase.User.prototype.linkAndRetrieveDataWithCredential is deprecated. Please use firebase.User.prototype.linkWithCredential instead."),this.pb(t)},e.pb=function(t){var e=this,n=null;return xh(this,Nh(this,t.providerId).then(function(){return e.I()}).then(function(n){return t.b(e.a,n)}).then(function(t){return n=Oh(e,t,"link"),kh(e,t)}).then(function(){return n}))},e.Cc=function(t,e){var n=this;return xh(this,Nh(this,"phone").then(function(){return Bc(fh(n),t,e,_(n.pb,n))}))},e.Lc=function(t,e){var n=this;return xh(this,Ne().then(function(){return Bc(fh(n),t,e,_(n.sb,n))}),!0)},e.Ab=function(t){var e=this;return xh(this,this.I().then(function(n){return e.a.Ab(n,t)}).then(function(t){return Sh(e,t),e.reload()}))},e.dd=function(t){var e=this;return xh(this,this.I().then(function(n){return t.b(e.a,n)}).then(function(t){return Sh(e,t),e.reload()}))},e.Bb=function(t){var e=this;return xh(this,this.I().then(function(n){return e.a.Bb(n,t)}).then(function(t){return Sh(e,t),e.reload()}))},e.Cb=function(t){if(void 0===t.displayName&amp;&amp;void 0===t.photoURL)return bh(this);var e=this;return xh(this,this.I().then(function(n){return e.a.Cb(n,{displayName:t.displayName,photoUrl:t.photoURL})}).then(function(t){return Sh(e,t),Eh(e,"displayName",t.displayName||null),Eh(e,"photoURL",t.photoUrl||null),G(e.providerData,function(t){"password"===t.providerId&amp;&amp;(Hr(t,"displayName",e.displayName),Hr(t,"photoURL",e.photoURL))}),vh(e)}).then(mh))},e.bd=function(t){var e=this;return xh(this,Ah(this).then(function(n){return W(wh(e),t)?function(t,e,n){return Qs(t,Es,{idToken:e,deleteProvider:n})}(e.a,n,[t]).then(function(t){var n={};return G(t.providerUserInfo||[],function(t){n[t.providerId]=!0}),G(wh(e),function(t){n[t]||Ih(e,t)}),n[Ro.PROVIDER_ID]||Hr(e,"phoneNumber",null),vh(e)}):vh(e).then(function(){throw new A("no-such-provider")})}))},e.delete=function(){var t=this;return xh(this,this.I().then(function(e){return Qs(t.a,Is,{idToken:e})}).then(function(){t.dispatchEvent(new Qc("userDeleted"))})).then(function(){for(var e=0;e&lt;t.G.length;e++)t.G[e].cancel("app-deleted");sh(t,null),uh(t,null),hh(t,null),t.G=[],t.A=!0,ph(t),Hr(t,"refreshToken",null),t.i&amp;&amp;Tc(t.i,t)})},e.Eb=function(t,e){return!!("linkViaPopup"==t&amp;&amp;(this.h||null)==e&amp;&amp;this.g||"reauthViaPopup"==t&amp;&amp;(this.h||null)==e&amp;&amp;this.g||"linkViaRedirect"==t&amp;&amp;(this.ga||null)==e||"reauthViaRedirect"==t&amp;&amp;(this.ga||null)==e)},e.ma=function(t,e,n,r){"linkViaPopup"!=t&amp;&amp;"reauthViaPopup"!=t||r!=(this.h||null)||(n&amp;&amp;this.O?this.O(n):e&amp;&amp;!n&amp;&amp;this.g&amp;&amp;this.g(e),this.c&amp;&amp;(this.c.cancel(),this.c=null),delete this.g,delete this.O)},e.Fa=function(t,e){return"linkViaPopup"==t&amp;&amp;e==(this.h||null)?_(this.Jb,this):"reauthViaPopup"==t&amp;&amp;e==(this.h||null)?_(this.Kb,this):"linkViaRedirect"==t&amp;&amp;(this.ga||null)==e?_(this.Jb,this):"reauthViaRedirect"==t&amp;&amp;(this.ga||null)==e?_(this.Kb,this):null},e.Dc=function(t){var e=this;return Dh(this,"linkViaPopup",t,function(){return Nh(e,t.providerId).then(function(){return vh(e)})},!1)},e.Mc=function(t){return Dh(this,"reauthViaPopup",t,function(){return Ne()},!0)},e.Ec=function(t){var e=this;return Ph(this,"linkViaRedirect",t,function(){return Nh(e,t.providerId)},!1)},e.Nc=function(t){return Ph(this,"reauthViaRedirect",t,function(){return Ne()},!0)},e.Jb=function(t,e,n,r){var i=this;this.c&amp;&amp;(this.c.cancel(),this.c=null);var o=null;return xh(this,this.I().then(function(n){return vs(i.a,{requestUri:t,postBody:r,sessionId:e,idToken:n})}).then(function(t){return o=Oh(i,t,"link"),kh(i,t)}).then(function(){return o}))},e.Kb=function(t,e,n,r){var i=this;this.c&amp;&amp;(this.c.cancel(),this.c=null);var o=null;return xh(this,Ne().then(function(){return oo(ys(i.a,{requestUri:t,sessionId:e,postBody:r,tenantId:n}),i.uid)}).then(function(t){return o=Oh(i,t,"reauthenticate"),Sh(i,t),i.f=null,i.reload()}).then(function(){return o}),!0)},e.tb=function(t){var e=this,n=null;return xh(this,this.I().then(function(e){return n=e,void 0===t||pt(t)?{}:Li(new Ai(t))}).then(function(t){return e.a.tb(n,t)}).then(function(t){if(e.email!=t)return e.reload()}).then(function(){}))},e.Db=function(t,e){var n=this,r=null;return xh(this,this.I().then(function(t){return r=t,void 0===e||pt(e)?{}:Li(new Ai(e))}).then(function(e){return n.a.Db(r,t,e)}).then(function(t){if(n.email!=t)return n.reload()}).then(function(){}))},e.ic=function(t){var e=null,n=this;return xh(this,t=oo(Ne(t),n.uid).then(function(t){return e=Oh(n,t,"reauthenticate"),Sh(n,t),n.f=null,n.reload()}).then(function(){return e}),!0)},e.toJSON=function(){return this.w()},e.w=function(){var t={uid:this.uid,displayName:this.displayName,photoURL:this.photoURL,email:this.email,emailVerified:this.emailVerified,phoneNumber:this.phoneNumber,isAnonymous:this.isAnonymous,tenantId:this.tenantId,providerData:[],apiKey:this.l,appName:this.m,authDomain:this.o,stsTokenManager:this.b.w(),redirectEventId:this.ga||null};return this.metadata&amp;&amp;yt(t,this.metadata.w()),G(this.providerData,function(e){t.providerData.push(function(t){var e,n={};for(e in t)t.hasOwnProperty(e)&amp;&amp;(n[e]=t[e]);return n}(e))}),yt(t,this.N.w()),t};var Lh={name:"redirectUser",D:"session"};function jh(t){return Yu(t.b,Lh,t.a)}function Mh(t){this.a=t,this.b=Wu(),this.c=null,this.f=function(t){var e=Fh("local"),n=Fh("session"),r=Fh("none");return function(t,e,n){var r=Ju(e,n),i=Xu(t,e.D);return t.get(e,n).then(function(o){var a=null;try{a=xr(u.localStorage.getItem(r))}catch(t){}if(a&amp;&amp;!o)return u.localStorage.removeItem(r),t.set(e,a,n);a&amp;&amp;o&amp;&amp;"localStorage"!=i.type&amp;&amp;u.localStorage.removeItem(r)})}(t.b,e,t.a).then(function(){return t.b.get(n,t.a)}).then(function(i){return i?n:t.b.get(r,t.a).then(function(n){return n?r:t.b.get(e,t.a).then(function(n){return n?e:t.b.get(Uh,t.a).then(function(t){return t?Fh(t):e})})})}).then(function(e){return t.c=e,Vh(t,e.D)}).s(function(){t.c||(t.c=e)})}(this),this.b.addListener(Fh("local"),this.a,_(this.g,this))}function Vh(t,e){var n,r=[];for(n in Ku)Ku[n]!==e&amp;&amp;r.push(Yu(t.b,Fh(Ku[n]),t.a));return r.push(Yu(t.b,Uh,t.a)),function(t){return new we(function(e,n){var r=t.length,i=[];if(r)for(var o=function(t,n){r--,i[t]=n,0==r&amp;&amp;e(i)},a=function(t){n(t)},s=0;s&lt;t.length;s++)ke(t[s],I(o,s),a);else e(i)})}(r)}Mh.prototype.g=function(){var t=this,e=Fh("local");zh(this,function(){return Ne().then(function(){return t.c&amp;&amp;"local"!=t.c.D?t.b.get(e,t.a):null}).then(function(n){if(n)return Vh(t,"local").then(function(){t.c=e})})})};var Uh={name:"persistence",D:"session"};function Fh(t){return{name:"authUser",D:t}}function qh(t,e){return zh(t,function(){return t.b.set(t.c,e.w(),t.a)})}function Bh(t){return zh(t,function(){return Yu(t.b,t.c,t.a)})}function Gh(t,e,n){return zh(t,function(){return t.b.get(t.c,t.a).then(function(t){return t&amp;&amp;e&amp;&amp;(t.authDomain=e),t&amp;&amp;n&amp;&amp;(t.emulatorConfig=n),Ch(t||{})})})}function zh(t,e){return t.f=t.f.then(e,e),t.f}function Kh(t){if(this.m=!1,Hr(this,"settings",new Fc),Hr(this,"app",t),!tf(this).options||!tf(this).options.apiKey)throw new A("invalid-api-key");t=r.SDK_VERSION?Er(r.SDK_VERSION):null,this.a=new za(tf(this).options&amp;&amp;tf(this).options.apiKey,P(N),t),this.R=[],this.u=[],this.P=[],this.ac=r.INTERNAL.createSubscribe(_(this.yc,this)),this.X=void 0,this.bc=r.INTERNAL.createSubscribe(_(this.zc,this)),$h(this,null),this.l=new Mh(tf(this).options.apiKey+":"+tf(this).name),this.G=new function(t){this.a=t,this.b=Wu()}(tf(this).options.apiKey+":"+tf(this).name),this.$=of(this,function(t){var e=tf(t).options.authDomain,n=function(t){var e=function(t,e){return t.b.get(Lh,t.a).then(function(t){return t&amp;&amp;e&amp;&amp;(t.authDomain=e),Ch(t||{})})}(t.G,tf(t).options.authDomain).then(function(e){return(t.o=e)&amp;&amp;(e.ha=t.G),jh(t.G)});return of(t,e)}(t).then(function(){return Gh(t.l,e,t.f)}).then(function(e){return e?(e.ha=t.G,t.o&amp;&amp;(t.o.ga||null)==(e.ga||null)?e:e.reload().then(function(){return qh(t.l,e).then(function(){return e})}).s(function(n){return"auth/network-request-failed"==n.code?e:Bh(t.l)})):null}).then(function(e){$h(t,e||null)});return of(t,n)}(this)),this.i=of(this,function(t){return t.$.then(function(){return Yh(t)}).s(function(){}).then(function(){if(!t.m)return t.pa()}).s(function(){}).then(function(){if(!t.m){t.ba=!0;var e=t.l;e.b.addListener(Fh("local"),e.a,t.pa)}})}(this)),this.ba=!1,this.pa=_(this.Yc,this),this.Ba=_(this.da,this),this.ya=_(this.kc,this),this.za=_(this.vc,this),this.Aa=_(this.wc,this),this.b=null,function(t){var e=tf(t).options.authDomain,n=tf(t).options.apiKey;e&amp;&amp;Nr()&amp;&amp;(t.gb=t.$.then(function(){if(!t.m){if(t.b=xc(e,n,tf(t).name,t.f),Ec(t.b,t),ef(t)&amp;&amp;yh(ef(t)),t.o){yh(t.o);var r=t.o;r.wa(t.ka()),sh(r,t),ch(r=t.o,t.N),hh(r,t),$a((r=t.o).a,t.f),uh(r,t),t.o=null}return t.b}}))}(this),this.INTERNAL={},this.INTERNAL.delete=_(this.delete,this),this.INTERNAL.logFramework=_(this.Fc,this),this.A=0,bn.call(this),function(t){Object.defineProperty(t,"lc",{get:function(){return this.ka()},set:function(t){this.wa(t)},enumerable:!1}),t.aa=null,Object.defineProperty(t,"ti",{get:function(){return this.S()},set:function(t){this.xb(t)},enumerable:!1}),t.W=null}(this),this.N=[],this.f=null}function Hh(t){Je.call(this,"languageCodeChanged"),this.h=t}function Wh(t){Je.call(this,"emulatorConfigChanged"),this.c=t}function Xh(t){Je.call(this,"frameworkChanged"),this.f=t}function Jh(t){return t.gb||Oe(new A("auth-domain-config-required"))}function Yh(t){if(!Nr())return Oe(new A("operation-not-supported-in-this-environment"));var e=Jh(t).then(function(){return t.b.qa()}).then(function(t){return t?Xr(t):null});return of(t,e)}function Qh(t,e){var n={};return n.apiKey=tf(t).options.apiKey,n.authDomain=tf(t).options.authDomain,n.appName=tf(t).name,t.f&amp;&amp;(n.emulatorConfig=t.f),t.$.then(function(){return function(t,e,n,r){var i=new ah(t,e);return n&amp;&amp;(i.ha=n),r&amp;&amp;ch(i,r),i.reload().then(function(){return i})}(n,e,t.G,t.Ga())}).then(function(e){return ef(t)&amp;&amp;e.uid==ef(t).uid?(Th(ef(t),e),t.da(e)):($h(t,e),yh(e),t.da(e))}).then(function(){rf(t)})}function $h(t,e){ef(t)&amp;&amp;(function(t,e){J(t.R,function(t){return t==e})}(ef(t),t.Ba),hn(ef(t),"tokenChanged",t.ya),hn(ef(t),"userDeleted",t.za),hn(ef(t),"userInvalidated",t.Aa),ph(ef(t))),e&amp;&amp;(e.R.push(t.Ba),sn(e,"tokenChanged",t.ya),sn(e,"userDeleted",t.za),sn(e,"userInvalidated",t.Aa),0&lt;t.A&amp;&amp;lh(e)),Hr(t,"currentUser",e),e&amp;&amp;(e.wa(t.ka()),sh(e,t),ch(e,t.N),hh(e,t),$a(e.a,t.f),uh(e,t))}function Zh(t,e){var n=null,r=null;return of(t,e.then(function(e){return n=Co(e),r=Ki(e),Qh(t,e)},function(e){var n=null;throw e&amp;&amp;"auth/multi-factor-auth-required"===e.code&amp;&amp;(n=Wc(e.w(),t,_(t.jc,t))),n||e}).then(function(){return Xr({user:ef(t),credential:n,additionalUserInfo:r,operationType:"signIn"})}))}function tf(t){return t.app}function ef(t){return t.currentUser}function nf(t){return ef(t)&amp;&amp;ef(t)._lat||null}function rf(t){if(t.ba){for(var e=0;e&lt;t.u.length;e++)t.u[e]&amp;&amp;t.u[e](nf(t));if(t.X!==t.getUid()&amp;&amp;t.P.length)for(t.X=t.getUid(),e=0;e&lt;t.P.length;e++)t.P[e]&amp;&amp;t.P[e](nf(t))}}function of(t,e){return t.R.push(e),e.na(function(){X(t.R,e)}),e}function af(){}function sf(){this.a={},this.b=1e12}Mh.prototype.wb=function(t){var e=null,n=this;return function(t){var e=new A("invalid-persistence-type"),n=new A("unsupported-persistence-type");t:{for(r in Ku)if(Ku[r]==t){var r=!0;break t}r=!1}if(!r||"string"!=typeof t)throw e;switch(gr()){case"ReactNative":if("session"===t)throw n;break;case"Node":if("none"!==t)throw n;break;case"Worker":if("session"===t||!Au()&amp;&amp;"none"!==t)throw n;break;default:if(!Sr()&amp;&amp;"none"!==t)throw n}}(t),zh(this,function(){return t!=n.c.D?n.b.get(n.c,n.a).then(function(r){return e=r,Vh(n,t)}).then(function(){if(n.c=Fh(t),e)return n.b.set(n.c,e,n.a)}):Ne()})},T(Kh,bn),T(Hh,Je),T(Wh,Je),T(Xh,Je),(e=Kh.prototype).wb=function(t){return of(this,t=this.l.wb(t))},e.wa=function(t){this.aa===t||this.m||(this.aa=t,Qa(this.a,this.aa),this.dispatchEvent(new Hh(this.ka())))},e.ka=function(){return this.aa},e.ed=function(){var t=u.navigator;this.wa(t&amp;&amp;(t.languages&amp;&amp;t.languages[0]||t.language||t.userLanguage)||null)},e.fd=function(t){if(!this.f){if(!/^https?:\/\//.test(t))throw new A("argument-error","Emulator URL must start with a valid scheme (http:// or https://).");Ur(),u.document&amp;&amp;pr().then(function(){var t=u.document.createElement("div");t.innerText="Running in emulator mode. Do not use with production credentials.",t.style.position="fixed",t.style.width="100%",t.style.backgroundColor="#ffffff",t.style.border=".1em solid #000000",t.style.color="#ff0000",t.style.bottom="0px",t.style.left="0px",t.style.margin="0px",t.style.zIndex=1e4,t.style.textAlign="center",t.classList.add("firebase-emulator-warning"),u.document.body.appendChild(t)}),this.f={url:t},this.settings.hb=!0,$a(this.a,this.f),this.dispatchEvent(new Wh(this.f))}},e.Fc=function(t){this.N.push(t),ts(this.a,r.SDK_VERSION?Er(r.SDK_VERSION,this.N):null),this.dispatchEvent(new Xh(this.N))},e.Ga=function(){return Q(this.N)},e.xb=function(t){this.W===t||this.m||(this.W=t,this.a.b=this.W)},e.S=function(){return this.W},e.toJSON=function(){return{apiKey:tf(this).options.apiKey,authDomain:tf(this).options.authDomain,appName:tf(this).name,currentUser:ef(this)&amp;&amp;ef(this).w()}},e.Eb=function(t,e){switch(t){case"unknown":case"signInViaRedirect":return!0;case"signInViaPopup":return this.h==e&amp;&amp;!!this.g;default:return!1}},e.ma=function(t,e,n,r){"signInViaPopup"==t&amp;&amp;this.h==r&amp;&amp;(n&amp;&amp;this.O?this.O(n):e&amp;&amp;!n&amp;&amp;this.g&amp;&amp;this.g(e),this.c&amp;&amp;(this.c.cancel(),this.c=null),delete this.g,delete this.O)},e.Fa=function(t,e){return"signInViaRedirect"==t||"signInViaPopup"==t&amp;&amp;this.h==e&amp;&amp;this.g?_(this.hc,this):null},e.hc=function(t,e,n,r){var i=this,o={requestUri:t,postBody:r,sessionId:e,tenantId:n};return this.c&amp;&amp;(this.c.cancel(),this.c=null),i.$.then(function(){return Zh(i,ds(i.a,o))})},e.Wc=function(t){if(!Nr())return Oe(new A("operation-not-supported-in-this-environment"));var e=this,n=zi(t.providerId),i=Cr(),o=null;(!Dr()||vr())&amp;&amp;tf(this).options.authDomain&amp;&amp;t.isOAuthProvider&amp;&amp;(o=lu(tf(this).options.authDomain,tf(this).options.apiKey,tf(this).name,"signInViaPopup",t,null,i,r.SDK_VERSION||null,null,null,this.S(),this.f));var a=hr(o,n&amp;&amp;n.ua,n&amp;&amp;n.ta);return of(this,n=Jh(this).then(function(n){return Nc(n,a,"signInViaPopup",t,i,!!o,e.S())}).then(function(){return new we(function(t,n){e.ma("signInViaPopup",null,new A("cancelled-popup-request"),e.h),e.g=t,e.O=n,e.h=i,e.c=Dc(e.b,e,"signInViaPopup",a,i)})}).then(function(t){return a&amp;&amp;cr(a),t?Xr(t):null}).s(function(t){throw a&amp;&amp;cr(a),t}))},e.Xc=function(t){if(!Nr())return Oe(new A("operation-not-supported-in-this-environment"));var e=this;return of(this,Jh(this).then(function(){return zh(t=e.l,function(){return t.b.set(Uh,t.c.D,t.a)});var t}).then(function(){return kc(e.b,"signInViaRedirect",t,void 0,e.S())}))},e.qa=function(){var t=this;return Yh(this).then(function(e){return t.b&amp;&amp;jc(t.b.b),e}).s(function(e){throw t.b&amp;&amp;jc(t.b.b),e})},e.cd=function(t){if(!t)return Oe(new A("null-user"));if(this.W!=t.tenantId)return Oe(new A("tenant-id-mismatch"));var e=this,n={};n.apiKey=tf(this).options.apiKey,n.authDomain=tf(this).options.authDomain,n.appName=tf(this).name;var r=function(t,e,n,r){var i=t.b,o={};return o[Ha]=i.b&amp;&amp;i.b.toString(),o.refreshToken=i.a,e=new ah(e||{apiKey:t.l,authDomain:t.o,appName:t.m},o),n&amp;&amp;(e.ha=n),r&amp;&amp;ch(e,r),Th(e,t),e}(t,n,e.G,e.Ga());return of(this,this.i.then(function(){if(tf(e).options.apiKey!=t.l)return r.reload()}).then(function(){return ef(e)&amp;&amp;t.uid==ef(e).uid?(Th(ef(e),t),e.da(t)):($h(e,r),yh(r),e.da(r))}).then(function(){rf(e)}))},e.zb=function(){var t=this;return of(this,this.i.then(function(){return t.b&amp;&amp;jc(t.b.b),ef(t)?($h(t,null),Bh(t.l).then(function(){rf(t)})):Ne()}))},e.Yc=function(){var t=this;return Gh(this.l,tf(this).options.authDomain).then(function(e){if(!t.m){var n;if(n=ef(t)&amp;&amp;e){n=ef(t).uid;var r=e.uid;n=void 0!==n&amp;&amp;null!==n&amp;&amp;""!==n&amp;&amp;void 0!==r&amp;&amp;null!==r&amp;&amp;""!==r&amp;&amp;n==r}if(n)return Th(ef(t),e),ef(t).I();(ef(t)||e)&amp;&amp;($h(t,e),e&amp;&amp;(yh(e),e.ha=t.G),t.b&amp;&amp;Ec(t.b,t),rf(t))}})},e.da=function(t){return qh(this.l,t)},e.kc=function(){rf(this),this.da(ef(this))},e.vc=function(){this.zb()},e.wc=function(){this.zb()},e.jc=function(t){var e=this;return this.i.then(function(){return Zh(e,Ne(t))})},e.yc=function(t){var e=this;this.addAuthTokenListener(function(){t.next(ef(e))})},e.zc=function(t){var e=this;!function(t,e){t.P.push(e),of(t,t.i.then(function(){!t.m&amp;&amp;W(t.P,e)&amp;&amp;t.X!==t.getUid()&amp;&amp;(t.X=t.getUid(),e(nf(t)))}))}(this,function(){t.next(ef(e))})},e.Hc=function(t,e,n){var r=this;return this.ba&amp;&amp;Promise.resolve().then(function(){"function"==typeof t?t(ef(r)):"function"==typeof t.next&amp;&amp;t.next(ef(r))}),this.ac(t,e,n)},e.Gc=function(t,e,n){var r=this;return this.ba&amp;&amp;Promise.resolve().then(function(){r.X=r.getUid(),"function"==typeof t?t(ef(r)):"function"==typeof t.next&amp;&amp;t.next(ef(r))}),this.bc(t,e,n)},e.mc=function(t){var e=this;return of(this,this.i.then(function(){return ef(e)?ef(e).I(t).then(function(t){return{accessToken:t}}):null}))},e.Sc=function(t){var e=this;return this.i.then(function(){return Zh(e,Qs(e.a,Ks,{token:t}))}).then(function(t){var n=t.user;return Eh(n,"isAnonymous",!1),e.da(n),t})},e.Tc=function(t,e){var n=this;return this.i.then(function(){return Zh(n,Qs(n.a,Hs,{email:t,password:e}))})},e.dc=function(t,e){var n=this;return this.i.then(function(){return Zh(n,Qs(n.a,ws,{email:t,password:e}))})},e.Za=function(t){var e=this;return this.i.then(function(){return Zh(e,t.ja(e.a))})},e.Rc=function(t){return zr("firebase.auth.Auth.prototype.signInAndRetrieveDataWithCredential is deprecated. Please use firebase.auth.Auth.prototype.signInWithCredential instead."),this.Za(t)},e.yb=function(){var t=this;return this.i.then(function(){var e=ef(t);return e&amp;&amp;e.isAnonymous?Xr({user:e,credential:null,additionalUserInfo:Xr({providerId:null,isNewUser:!1}),operationType:"signIn"}):Zh(t,t.a.yb()).then(function(e){var n=e.user;return Eh(n,"isAnonymous",!0),t.da(n),e})})},e.getUid=function(){return ef(this)&amp;&amp;ef(this).uid||null},e.cc=function(t){this.addAuthTokenListener(t),this.A++,0&lt;this.A&amp;&amp;ef(this)&amp;&amp;lh(ef(this))},e.Oc=function(t){var e=this;G(this.u,function(n){n==t&amp;&amp;e.A--}),0&gt;this.A&amp;&amp;(this.A=0),0==this.A&amp;&amp;ef(this)&amp;&amp;ph(ef(this)),this.removeAuthTokenListener(t)},e.addAuthTokenListener=function(t){var e=this;this.u.push(t),of(this,this.i.then(function(){e.m||W(e.u,t)&amp;&amp;t(nf(e))}))},e.removeAuthTokenListener=function(t){J(this.u,function(e){return e==t})},e.delete=function(){this.m=!0;for(var t=0;t&lt;this.R.length;t++)this.R[t].cancel("app-deleted");return this.R=[],this.l&amp;&amp;(t=this.l).b.removeListener(Fh("local"),t.a,this.pa),this.b&amp;&amp;(Tc(this.b,this),jc(this.b.b)),Promise.resolve()},e.gc=function(t){return of(this,function(t,e){return Qs(t,_s,{identifier:e,continueUri:Or()?ar():"http://localhost"}).then(function(t){return t.signinMethods||[]})}(this.a,t))},e.Ac=function(t){return!!Oo(t)},e.vb=function(t,e){var n=this;return of(this,Ne().then(function(){var t=new Ai(e);if(!t.c)throw new A("argument-error",Oi+" must be true when sending sign in link to email");return Li(t)}).then(function(e){return n.a.vb(t,e)}).then(function(){}))},e.hd=function(t){return this.Qa(t).then(function(t){return t.data.email})},e.mb=function(t,e){return of(this,this.a.mb(t,e).then(function(){}))},e.Qa=function(t){return of(this,this.a.Qa(t).then(function(t){return new function(t){var e={},n=t[ai],r=t[ui],i=t[ci];if(t=Qr(t[si]),!i||i!=ii&amp;&amp;i!=oi&amp;&amp;!n||i==oi&amp;&amp;!r||i==ri&amp;&amp;!t)throw Error("Invalid checkActionCode response!");i==oi?(e[fi]=n||null,e[pi]=n||null,e[hi]=r):(e[fi]=r||null,e[pi]=r||null,e[hi]=n||null),e[li]=t||null,Hr(this,vi,i),Hr(this,di,Jr(e))}(t)}))},e.ib=function(t){return of(this,this.a.ib(t).then(function(){}))},e.ub=function(t,e){var n=this;return of(this,Ne().then(function(){return void 0===e||pt(e)?{}:Li(new Ai(e))}).then(function(e){return n.a.ub(t,e)}).then(function(){}))},e.Vc=function(t,e){return of(this,Bc(this,t,e,_(this.Za,this)))},e.Uc=function(t,e){var n=this;return of(this,Ne().then(function(){var r=e||ar(),i=No(t,r);if(!(r=Oo(r)))throw new A("argument-error","Invalid email link!");if(r.tenantId!==n.S())throw new A("tenant-id-mismatch");return n.Za(i)}))},af.prototype.render=function(){},af.prototype.reset=function(){},af.prototype.getResponse=function(){},af.prototype.execute=function(){};var uf=null;function cf(t,e){return(e=hf(e))&amp;&amp;t.a[e]||null}function hf(t){return(t=void 0===t?1e12:t)?t.toString():null}function ff(t,e){this.g=!1,this.c=e,this.a=this.b=null,this.h="invisible"!==this.c.size,this.f=ae(t);var n=this;this.i=function(){n.execute()},this.h?this.execute():sn(this.f,"click",this.i)}function lf(t){if(t.g)throw Error("reCAPTCHA mock was already deleted!")}function pf(){}function df(){}sf.prototype.render=function(t,e){return this.a[this.b.toString()]=new ff(t,e),this.b++},sf.prototype.reset=function(t){var e=cf(this,t);t=hf(t),e&amp;&amp;t&amp;&amp;(e.delete(),delete this.a[t])},sf.prototype.getResponse=function(t){return(t=cf(this,t))?t.getResponse():null},sf.prototype.execute=function(t){(t=cf(this,t))&amp;&amp;t.execute()},ff.prototype.getResponse=function(){return lf(this),this.b},ff.prototype.execute=function(){lf(this);var t=this;this.a||(this.a=setTimeout(function(){t.b=function(){for(var t=50,e=[];0&lt;t;)e.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()))),t--;return e.join("")}();var e=t.c.callback,n=t.c["expired-callback"];if(e)try{e(t.b)}catch(t){}t.a=setTimeout(function(){if(t.a=null,t.b=null,n)try{n()}catch(t){}t.h&amp;&amp;t.execute()},6e4)},500))},ff.prototype.delete=function(){lf(this),this.g=!0,clearTimeout(this.a),this.a=null,hn(this.f,"click",this.i)},Hr(pf,"FACTOR_ID","phone"),df.prototype.g=function(){return uf||(uf=new sf),Ne(uf)},df.prototype.c=function(){};var vf=null;function yf(){this.b=u.grecaptcha?1/0:0,this.f=null,this.a="__rcb"+Math.floor(1e6*Math.random()).toString()}var gf=new mt(_t,"https://www.google.com/recaptcha/api.js?onload=%{onload}&amp;render=explicit&amp;hl=%{hl}"),mf=new Mr(3e4,6e4);yf.prototype.g=function(t){var e=this;return new we(function(n,r){var i=setTimeout(function(){r(new A("network-request-failed"))},mf.get());!u.grecaptcha||t!==e.f&amp;&amp;!e.b?(u[e.a]=function(){if(u.grecaptcha){e.f=t;var o=u.grecaptcha.render;u.grecaptcha.render=function(t,n){return t=o(t,n),e.b++,t},clearTimeout(i),n(u.grecaptcha)}else clearTimeout(i),r(new A("internal-error"));delete u[e.a]},Ne(Ma(At(gf,{onload:e.a,hl:t||""}))).s(function(){clearTimeout(i),r(new A("internal-error","Unable to load external reCAPTCHA dependencies!"))})):(clearTimeout(i),n(u.grecaptcha))})},yf.prototype.c=function(){this.b--};var bf=null;function wf(t,e,n,r,i,o,a){if(Hr(this,"type","recaptcha"),this.c=this.f=null,this.A=!1,this.m=e,this.g=null,a?(vf||(vf=new df),a=vf):(bf||(bf=new yf),a=bf),this.v=a,this.a=n||{theme:"light",type:"image"},this.h=[],this.a[Ef])throw new A("argument-error","sitekey should not be provided for reCAPTCHA as one is automatically provisioned for the current project.");if(this.i="invisible"===this.a[Tf],!u.document)throw new A("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment with DOM support.");if(!ae(e)||!this.i&amp;&amp;ae(e).hasChildNodes())throw new A("argument-error","reCAPTCHA container is either not found or already contains inner elements!");this.o=new za(t,o||null,i||null),this.u=r||function(){return null};var s=this;this.l=[];var c=this.a[_f];this.a[_f]=function(t){if(Af(s,t),"function"==typeof c)c(t);else if("string"==typeof c){var e=Ar(c,u);"function"==typeof e&amp;&amp;e(t)}};var h=this.a[If];this.a[If]=function(){if(Af(s,null),"function"==typeof h)h();else if("string"==typeof h){var t=Ar(h,u);"function"==typeof t&amp;&amp;t()}}}var _f="callback",If="expired-callback",Ef="sitekey",Tf="size";function Af(t,e){for(var n=0;n&lt;t.l.length;n++)try{t.l[n](e)}catch(t){}}function Sf(t,e){return t.h.push(e),e.na(function(){X(t.h,e)}),e}function Nf(t){if(t.A)throw new A("internal-error","RecaptchaVerifier instance has been destroyed.")}function Of(t,e,n){var i=!1;try{this.b=n||r.app()}catch(t){throw new A("argument-error","No firebase.app.App instance is currently initialized.")}if(!this.b.options||!this.b.options.apiKey)throw new A("invalid-api-key");n=this.b.options.apiKey;var o=this,a=null;try{a=this.b.auth().Ga()}catch(t){}try{i=this.b.auth().settings.appVerificationDisabledForTesting}catch(t){}a=r.SDK_VERSION?Er(r.SDK_VERSION,a):null,wf.call(this,n,t,e,function(){try{var t=o.b.auth().ka()}catch(e){t=null}return t},a,P(N),i)}function kf(t,e,n,r){t:{n=Array.prototype.slice.call(n);for(var i=0,o=!1,a=0;a&lt;e.length;a++)if(e[a].optional)o=!0;else{if(o)throw new A("internal-error","Argument validator encountered a required argument after an optional argument.");i++}if(o=e.length,n.length&lt;i||o&lt;n.length)r="Expected "+(i==o?1==i?"1 argument":i+" arguments":i+"-"+o+" arguments")+" but got "+n.length+".";else{for(i=0;i&lt;n.length;i++)if(o=e[i].optional&amp;&amp;void 0===n[i],!e[i].K(n[i])&amp;&amp;!o){if(e=e[i],0&gt;i||i&gt;=Df.length)throw new A("internal-error","Argument validator received an unsupported number of arguments.");n=Df[i],r=(r?"":n+" argument ")+(e.name?'"'+e.name+'" ':"")+"must be "+e.J+".";break t}r=null}}if(r)throw new A("argument-error",t+" failed: "+r)}(e=wf.prototype).Ia=function(){var t=this;return this.f?this.f:this.f=Sf(this,Ne().then(function(){if(Or()&amp;&amp;!yr())return pr();throw new A("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment.")}).then(function(){return t.v.g(t.u())}).then(function(e){return t.g=e,Qs(t.o,Cs,{})}).then(function(e){t.a[Ef]=e.recaptchaSiteKey}).s(function(e){throw t.f=null,e}))},e.render=function(){Nf(this);var t=this;return Sf(this,this.Ia().then(function(){if(null===t.c){var e=t.m;if(!t.i){var n=ae(e);e=fe("DIV"),n.appendChild(e)}t.c=t.g.render(e,t.a)}return t.c}))},e.verify=function(){Nf(this);var t=this;return Sf(this,this.render().then(function(e){return new we(function(n){var r=t.g.getResponse(e);if(r)n(r);else{var i=function(e){e&amp;&amp;(function(t,e){J(t.l,function(t){return t==e})}(t,i),n(e))};t.l.push(i),t.i&amp;&amp;t.g.execute(t.c)}})}))},e.reset=function(){Nf(this),null!==this.c&amp;&amp;this.g.reset(this.c)},e.clear=function(){Nf(this),this.A=!0,this.v.c();for(var t=0;t&lt;this.h.length;t++)this.h[t].cancel("RecaptchaVerifier instance has been destroyed.");if(!this.i){t=ae(this.m);for(var e;e=t.firstChild;)t.removeChild(e)}},T(Of,wf);var Df="First Second Third Fourth Fifth Sixth Seventh Eighth Ninth".split(" ");function Pf(t,e){return{name:t||"",J:"a valid string",optional:!!e,K:function(t){return"string"==typeof t}}}function Rf(t,e){return{name:t||"",J:"a boolean",optional:!!e,K:function(t){return"boolean"==typeof t}}}function xf(t,e){return{name:t||"",J:"a valid object",optional:!!e,K:v}}function Cf(t,e){return{name:t||"",J:"a function",optional:!!e,K:function(t){return"function"==typeof t}}}function Lf(t,e){return{name:t||"",J:"null",optional:!!e,K:function(t){return null===t}}}function jf(t){return{name:t?t+"Credential":"credential",J:t?"a valid "+t+" credential":"a valid credential",optional:!1,K:function(e){if(!e)return!1;var n=!t||e.providerId===t;return!(!e.ja||!n)}}}function Mf(t,e){return v(t)&amp;&amp;"string"==typeof t.type&amp;&amp;t.type===e&amp;&amp;"function"==typeof t.Ha}function Vf(t){return v(t)&amp;&amp;"string"==typeof t.uid}function Uf(t,e,n,r){return{name:n||"",J:t.J+" or "+e.J,optional:!!r,K:function(n){return t.K(n)||e.K(n)}}}function Ff(t,e){for(var n in e){var r=e[n].name;t[r]=Gf(r,t[n],e[n].j)}}function qf(t,e){for(var n in e){var r=e[n].name;r!==n&amp;&amp;Object.defineProperty(t,r,{get:I(function(t){return this[t]},n),set:I(function(t,e,n,r){kf(t,[n],[r],!0),this[e]=r},r,n,e[n].jb),enumerable:!0})}}function Bf(t,e,n,r){t[e]=Gf(e,n,r)}function Gf(t,e,n){function r(){var t=Array.prototype.slice.call(arguments);return kf(o,n,t),e.apply(this,t)}if(!n)return e;var i,o=function(t){return(t=t.split("."))[t.length-1]}(t);for(i in e)r[i]=e[i];for(i in e.prototype)r.prototype[i]=e.prototype[i];return r}Ff(Kh.prototype,{ib:{name:"applyActionCode",j:[Pf("code")]},Qa:{name:"checkActionCode",j:[Pf("code")]},mb:{name:"confirmPasswordReset",j:[Pf("code"),Pf("newPassword")]},dc:{name:"createUserWithEmailAndPassword",j:[Pf("email"),Pf("password")]},gc:{name:"fetchSignInMethodsForEmail",j:[Pf("email")]},qa:{name:"getRedirectResult",j:[]},Ac:{name:"isSignInWithEmailLink",j:[Pf("emailLink")]},Gc:{name:"onAuthStateChanged",j:[Uf(xf(),Cf(),"nextOrObserver"),Cf("opt_error",!0),Cf("opt_completed",!0)]},Hc:{name:"onIdTokenChanged",j:[Uf(xf(),Cf(),"nextOrObserver"),Cf("opt_error",!0),Cf("opt_completed",!0)]},ub:{name:"sendPasswordResetEmail",j:[Pf("email"),Uf(xf("opt_actionCodeSettings",!0),Lf(null,!0),"opt_actionCodeSettings",!0)]},vb:{name:"sendSignInLinkToEmail",j:[Pf("email"),xf("actionCodeSettings")]},wb:{name:"setPersistence",j:[Pf("persistence")]},Rc:{name:"signInAndRetrieveDataWithCredential",j:[jf()]},yb:{name:"signInAnonymously",j:[]},Za:{name:"signInWithCredential",j:[jf()]},Sc:{name:"signInWithCustomToken",j:[Pf("token")]},Tc:{name:"signInWithEmailAndPassword",j:[Pf("email"),Pf("password")]},Uc:{name:"signInWithEmailLink",j:[Pf("email"),Pf("emailLink",!0)]},Vc:{name:"signInWithPhoneNumber",j:[Pf("phoneNumber"),{name:"applicationVerifier",J:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,K:function(t){return!(!t||"string"!=typeof t.type||"function"!=typeof t.verify)}}]},Wc:{name:"signInWithPopup",j:[{name:"authProvider",J:"a valid Auth provider",optional:!1,K:function(t){return!!(t&amp;&amp;t.providerId&amp;&amp;t.hasOwnProperty&amp;&amp;t.hasOwnProperty("isOAuthProvider"))}}]},Xc:{name:"signInWithRedirect",j:[{name:"authProvider",J:"a valid Auth provider",optional:!1,K:function(t){return!!(t&amp;&amp;t.providerId&amp;&amp;t.hasOwnProperty&amp;&amp;t.hasOwnProperty("isOAuthProvider"))}}]},cd:{name:"updateCurrentUser",j:[Uf({name:"user",J:"an instance of Firebase User",optional:!1,K:function(t){return!!(t&amp;&amp;t instanceof ah)}},Lf(),"user")]},zb:{name:"signOut",j:[]},toJSON:{name:"toJSON",j:[Pf(null,!0)]},ed:{name:"useDeviceLanguage",j:[]},fd:{name:"useEmulator",j:[Pf("url")]},hd:{name:"verifyPasswordResetCode",j:[Pf("code")]}}),qf(Kh.prototype,{lc:{name:"languageCode",jb:Uf(Pf(),Lf(),"languageCode")},ti:{name:"tenantId",jb:Uf(Pf(),Lf(),"tenantId")}}),Kh.Persistence=Ku,Kh.Persistence.LOCAL="local",Kh.Persistence.SESSION="session",Kh.Persistence.NONE="none",Ff(ah.prototype,{delete:{name:"delete",j:[]},nc:{name:"getIdTokenResult",j:[Rf("opt_forceRefresh",!0)]},I:{name:"getIdToken",j:[Rf("opt_forceRefresh",!0)]},Bc:{name:"linkAndRetrieveDataWithCredential",j:[jf()]},pb:{name:"linkWithCredential",j:[jf()]},Cc:{name:"linkWithPhoneNumber",j:[Pf("phoneNumber"),{name:"applicationVerifier",J:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,K:function(t){return!(!t||"string"!=typeof t.type||"function"!=typeof t.verify)}}]},Dc:{name:"linkWithPopup",j:[{name:"authProvider",J:"a valid Auth provider",optional:!1,K:function(t){return!!(t&amp;&amp;t.providerId&amp;&amp;t.hasOwnProperty&amp;&amp;t.hasOwnProperty("isOAuthProvider"))}}]},Ec:{name:"linkWithRedirect",j:[{name:"authProvider",J:"a valid Auth provider",optional:!1,K:function(t){return!!(t&amp;&amp;t.providerId&amp;&amp;t.hasOwnProperty&amp;&amp;t.hasOwnProperty("isOAuthProvider"))}}]},Kc:{name:"reauthenticateAndRetrieveDataWithCredential",j:[jf()]},sb:{name:"reauthenticateWithCredential",j:[jf()]},Lc:{name:"reauthenticateWithPhoneNumber",j:[Pf("phoneNumber"),{name:"applicationVerifier",J:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,K:function(t){return!(!t||"string"!=typeof t.type||"function"!=typeof t.verify)}}]},Mc:{name:"reauthenticateWithPopup",j:[{name:"authProvider",J:"a valid Auth provider",optional:!1,K:function(t){return!!(t&amp;&amp;t.providerId&amp;&amp;t.hasOwnProperty&amp;&amp;t.hasOwnProperty("isOAuthProvider"))}}]},Nc:{name:"reauthenticateWithRedirect",j:[{name:"authProvider",J:"a valid Auth provider",optional:!1,K:function(t){return!!(t&amp;&amp;t.providerId&amp;&amp;t.hasOwnProperty&amp;&amp;t.hasOwnProperty("isOAuthProvider"))}}]},reload:{name:"reload",j:[]},tb:{name:"sendEmailVerification",j:[Uf(xf("opt_actionCodeSettings",!0),Lf(null,!0),"opt_actionCodeSettings",!0)]},toJSON:{name:"toJSON",j:[Pf(null,!0)]},bd:{name:"unlink",j:[Pf("provider")]},Ab:{name:"updateEmail",j:[Pf("email")]},Bb:{name:"updatePassword",j:[Pf("password")]},dd:{name:"updatePhoneNumber",j:[jf("phone")]},Cb:{name:"updateProfile",j:[xf("profile")]},Db:{name:"verifyBeforeUpdateEmail",j:[Pf("email"),Uf(xf("opt_actionCodeSettings",!0),Lf(null,!0),"opt_actionCodeSettings",!0)]}}),Ff(sf.prototype,{execute:{name:"execute"},render:{name:"render"},reset:{name:"reset"},getResponse:{name:"getResponse"}}),Ff(af.prototype,{execute:{name:"execute"},render:{name:"render"},reset:{name:"reset"},getResponse:{name:"getResponse"}}),Ff(we.prototype,{na:{name:"finally"},s:{name:"catch"},then:{name:"then"}}),qf(Fc.prototype,{appVerificationDisabled:{name:"appVerificationDisabledForTesting",jb:Rf("appVerificationDisabledForTesting")}}),Ff(qc.prototype,{confirm:{name:"confirm",j:[Pf("verificationCode")]}}),Bf(io,"fromJSON",function(t){t="string"==typeof t?JSON.parse(t):t;for(var e,n=[fo,Ao,Do,uo],r=0;r&lt;n.length;r++)if(e=n[r](t))return e;return null},[Uf(Pf(),xf(),"json")]),Bf(So,"credential",function(t,e){return new To(t,e)},[Pf("email"),Pf("password")]),Ff(To.prototype,{w:{name:"toJSON",j:[Pf(null,!0)]}}),Ff(yo.prototype,{Ca:{name:"addScope",j:[Pf("scope")]},Ka:{name:"setCustomParameters",j:[xf("customOAuthParameters")]}}),Bf(yo,"credential",go,[Uf(Pf(),xf(),"token")]),Bf(So,"credentialWithLink",No,[Pf("email"),Pf("emailLink")]),Ff(mo.prototype,{Ca:{name:"addScope",j:[Pf("scope")]},Ka:{name:"setCustomParameters",j:[xf("customOAuthParameters")]}}),Bf(mo,"credential",bo,[Uf(Pf(),xf(),"token")]),Ff(wo.prototype,{Ca:{name:"addScope",j:[Pf("scope")]},Ka:{name:"setCustomParameters",j:[xf("customOAuthParameters")]}}),Bf(wo,"credential",_o,[Uf(Pf(),Uf(xf(),Lf()),"idToken"),Uf(Pf(),Lf(),"accessToken",!0)]),Ff(Io.prototype,{Ka:{name:"setCustomParameters",j:[xf("customOAuthParameters")]}}),Bf(Io,"credential",Eo,[Uf(Pf(),xf(),"token"),Pf("secret",!0)]),Ff(vo.prototype,{Ca:{name:"addScope",j:[Pf("scope")]},credential:{name:"credential",j:[Uf(Pf(),Uf(xf(),Lf()),"optionsOrIdToken"),Uf(Pf(),Lf(),"accessToken",!0)]},Ka:{name:"setCustomParameters",j:[xf("customOAuthParameters")]}}),Ff(co.prototype,{w:{name:"toJSON",j:[Pf(null,!0)]}}),Ff(ao.prototype,{w:{name:"toJSON",j:[Pf(null,!0)]}}),Bf(Ro,"credential",xo,[Pf("verificationId"),Pf("verificationCode")]),Ff(Ro.prototype,{eb:{name:"verifyPhoneNumber",j:[Uf(Pf(),{name:"phoneInfoOptions",J:"valid phone info options",optional:!1,K:function(t){return!!t&amp;&amp;(t.session&amp;&amp;t.phoneNumber?Mf(t.session,no)&amp;&amp;"string"==typeof t.phoneNumber:t.session&amp;&amp;t.multiFactorHint?Mf(t.session,ro)&amp;&amp;Vf(t.multiFactorHint):t.session&amp;&amp;t.multiFactorUid?Mf(t.session,ro)&amp;&amp;"string"==typeof t.multiFactorUid:!!t.phoneNumber&amp;&amp;"string"==typeof t.phoneNumber)}},"phoneInfoOptions"),{name:"applicationVerifier",J:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,K:function(t){return!(!t||"string"!=typeof t.type||"function"!=typeof t.verify)}}]}}),Ff(ko.prototype,{w:{name:"toJSON",j:[Pf(null,!0)]}}),Ff(A.prototype,{toJSON:{name:"toJSON",j:[Pf(null,!0)]}}),Ff(qo.prototype,{toJSON:{name:"toJSON",j:[Pf(null,!0)]}}),Ff(Fo.prototype,{toJSON:{name:"toJSON",j:[Pf(null,!0)]}}),Ff(Hc.prototype,{toJSON:{name:"toJSON",j:[Pf(null,!0)]}}),Ff(Gc.prototype,{Qc:{name:"resolveSignIn",j:[{name:"multiFactorAssertion",J:"a valid multiFactorAssertion",optional:!1,K:function(t){return!!t&amp;&amp;!!t.rb}}]}}),Ff($c.prototype,{Qb:{name:"getSession",j:[]},ec:{name:"enroll",j:[{name:"multiFactorAssertion",J:"a valid multiFactorAssertion",optional:!1,K:function(t){return!!t&amp;&amp;!!t.rb}},Pf("displayName",!0)]},ad:{name:"unenroll",j:[Uf({name:"multiFactorInfo",J:"a valid multiFactorInfo",optional:!1,K:Vf},Pf(),"multiFactorInfoIdentifier")]}}),Ff(Of.prototype,{clear:{name:"clear",j:[]},render:{name:"render",j:[]},verify:{name:"verify",j:[]}}),Bf(yi,"parseLink",Ti,[Pf("link")]),Bf(pf,"assertion",function(t){return new Yc(t)},[jf("phone")]),function(){if(void 0===r||!r.INTERNAL||!r.INTERNAL.registerComponent)throw Error("Cannot find the firebase namespace; be sure to include firebase-app.js before this library.");var t={ActionCodeInfo:{Operation:{EMAIL_SIGNIN:ii,PASSWORD_RESET:"PASSWORD_RESET",RECOVER_EMAIL:"RECOVER_EMAIL",REVERT_SECOND_FACTOR_ADDITION:ri,VERIFY_AND_CHANGE_EMAIL:oi,VERIFY_EMAIL:"VERIFY_EMAIL"}},Auth:Kh,AuthCredential:io,Error:A};Bf(t,"EmailAuthProvider",So,[]),Bf(t,"FacebookAuthProvider",yo,[]),Bf(t,"GithubAuthProvider",mo,[]),Bf(t,"GoogleAuthProvider",wo,[]),Bf(t,"TwitterAuthProvider",Io,[]),Bf(t,"OAuthProvider",vo,[Pf("providerId")]),Bf(t,"SAMLAuthProvider",po,[Pf("providerId")]),Bf(t,"PhoneAuthProvider",Ro,[{name:"auth",J:"an instance of Firebase Auth",optional:!0,K:function(t){return!!(t&amp;&amp;t instanceof Kh)}}]),Bf(t,"RecaptchaVerifier",Of,[Uf(Pf(),{name:"",J:"an HTML element",optional:!1,K:function(t){return!!(t&amp;&amp;t instanceof Element)}},"recaptchaContainer"),xf("recaptchaParameters",!0),{name:"app",J:"an instance of Firebase App",optional:!0,K:function(t){return!!(t&amp;&amp;t instanceof r.app.App)}}]),Bf(t,"ActionCodeURL",yi,[]),Bf(t,"PhoneMultiFactorGenerator",pf,[]),r.INTERNAL.registerComponent({name:"auth",instanceFactory:function(t){return new Kh(t=t.getProvider("app").getImmediate())},multipleInstances:!1,serviceProps:t,instantiationMode:"LAZY",type:"PUBLIC"}),r.INTERNAL.registerComponent({name:"auth-internal",instanceFactory:function(t){return{getUid:_((t=t.getProvider("auth").getImmediate()).getUid,t),getToken:_(t.mc,t),addAuthTokenListener:_(t.cc,t),removeAuthTokenListener:_(t.Oc,t)}},multipleInstances:!1,instantiationMode:"LAZY",type:"PRIVATE"}),r.registerVersion("@firebase/auth","0.15.0"),r.INTERNAL.extendNamespace({User:ah})}()}).apply(void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})}).call(e,n("DuR2"))},"Wk+B":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var r=n("EEcg"),i=n("O4tu"),o=n("fjI4"),a=n("Pxmi"),s=n("GB/M"),u=n("l0SK");var c=function(t){return t&amp;&amp;"object"==typeof t&amp;&amp;"default"in t?t:{default:t}}(i),h={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"},f=function(t){function e(e,n){var r=this;return(r=t.call(this,n)||this).code=e,r.message=n,r.name="FirebaseError",r.toString=function(){return r.name+": [code="+r.code+"]: "+r.message},r}return r.__extends(e,t),e}(Error),l=new o.Logger("@firebase/firestore");
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function p(){return l.logLevel}function d(t){for(var e=[],n=1;n&lt;arguments.length;n++)e[n-1]=arguments[n];if(l.logLevel&lt;=o.LogLevel.DEBUG){var i=e.map(g);l.debug.apply(l,r.__spreadArrays(["Firestore (7.24.0): "+t],i))}}function v(t){for(var e=[],n=1;n&lt;arguments.length;n++)e[n-1]=arguments[n];if(l.logLevel&lt;=o.LogLevel.ERROR){var i=e.map(g);l.error.apply(l,r.__spreadArrays(["Firestore (7.24.0): "+t],i))}}function y(t){for(var e=[],n=1;n&lt;arguments.length;n++)e[n-1]=arguments[n];if(l.logLevel&lt;=o.LogLevel.WARN){var i=e.map(g);l.warn.apply(l,r.__spreadArrays(["Firestore (7.24.0): "+t],i))}}function g(t){if("string"==typeof t)return t;try{return e=t,JSON.stringify(e)}catch(e){return t}
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var e}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function m(t){void 0===t&amp;&amp;(t="Unexpected state");var e="FIRESTORE (7.24.0) INTERNAL ASSERTION FAILED: "+t;throw v(e),new Error(e)}function b(t,e){t||m()}function w(t,e){return t}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function _(t){var e=0;for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&amp;&amp;e++;return e}function I(t,e){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&amp;&amp;e(n,t[n])}function E(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var T=function(){function t(t,e,n){void 0===e?e=0:e&gt;t.length&amp;&amp;m(),void 0===n?n=t.length-e:n&gt;t.length-e&amp;&amp;m(),this.segments=t,this.offset=e,this.t=n}return Object.defineProperty(t.prototype,"length",{get:function(){return this.t},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(e){return 0===t.i(this,e)},t.prototype.child=function(e){var n=this.segments.slice(this.offset,this.limit());return e instanceof t?e.forEach(function(t){n.push(t)}):n.push(e),this.o(n)},t.prototype.limit=function(){return this.offset+this.length},t.prototype.u=function(t){return t=void 0===t?1:t,this.o(this.segments,this.offset+t,this.length-t)},t.prototype.h=function(){return this.o(this.segments,this.offset,this.length-1)},t.prototype.l=function(){return this.segments[this.offset]},t.prototype._=function(){return this.get(this.length-1)},t.prototype.get=function(t){return this.segments[this.offset+t]},t.prototype.m=function(){return 0===this.length},t.prototype.T=function(t){if(t.length&lt;this.length)return!1;for(var e=0;e&lt;this.length;e++)if(this.get(e)!==t.get(e))return!1;return!0},t.prototype.I=function(t){if(this.length+1!==t.length)return!1;for(var e=0;e&lt;this.length;e++)if(this.get(e)!==t.get(e))return!1;return!0},t.prototype.forEach=function(t){for(var e=this.offset,n=this.limit();e&lt;n;e++)t(this.segments[e])},t.prototype.A=function(){return this.segments.slice(this.offset,this.limit())},t.i=function(t,e){for(var n=Math.min(t.length,e.length),r=0;r&lt;n;r++){var i=t.get(r),o=e.get(r);if(i&lt;o)return-1;if(i&gt;o)return 1}return t.length&lt;e.length?-1:t.length&gt;e.length?1:0},t}(),A=function(t){function e(){return null!==t&amp;&amp;t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.o=function(t,n,r){return new e(t,n,r)},e.prototype.R=function(){return this.A().join("/")},e.prototype.toString=function(){return this.R()},e.g=function(){for(var t=[],n=0;n&lt;arguments.length;n++)t[n]=arguments[n];for(var r=[],i=0,o=t;i&lt;o.length;i++){var a=o[i];if(a.indexOf("//")&gt;=0)throw new f(h.INVALID_ARGUMENT,"Invalid segment ("+a+"). Paths must not contain // in them.");r.push.apply(r,a.split("/").filter(function(t){return t.length&gt;0}))}return new e(r)},e.P=function(){return new e([])},e}(T),S=/^[_a-zA-Z][_a-zA-Z0-9]*$/,N=function(t){function e(){return null!==t&amp;&amp;t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.o=function(t,n,r){return new e(t,n,r)},e.V=function(t){return S.test(t)},e.prototype.R=function(){return this.A().map(function(t){return t=t.replace("\\","\\\\").replace("`","\\`"),e.V(t)||(t="`"+t+"`"),t}).join(".")},e.prototype.toString=function(){return this.R()},e.prototype.p=function(){return 1===this.length&amp;&amp;"__name__"===this.get(0)},e.v=function(){return new e(["__name__"])},e.S=function(t){for(var n=[],r="",i=0,o=function(){if(0===r.length)throw new f(h.INVALID_ARGUMENT,"Invalid field path ("+t+"). Paths must not be empty, begin with '.', end with '.', or contain '..'");n.push(r),r=""},a=!1;i&lt;t.length;){var s=t[i];if("\\"===s){if(i+1===t.length)throw new f(h.INVALID_ARGUMENT,"Path has trailing escape character: "+t);var u=t[i+1];if("\\"!==u&amp;&amp;"."!==u&amp;&amp;"`"!==u)throw new f(h.INVALID_ARGUMENT,"Path has invalid escape sequence: "+t);r+=u,i+=2}else"`"===s?(a=!a,i++):"."!==s||a?(r+=s,i++):(o(),i++)}if(o(),a)throw new f(h.INVALID_ARGUMENT,"Unterminated ` in path: "+t);return new e(n)},e.P=function(){return new e([])},e}(T),O=function(){function t(t){this.path=t}return t.D=function(e){return new t(A.g(e))},t.C=function(e){return new t(A.g(e).u(5))},t.prototype.N=function(t){return this.path.length&gt;=2&amp;&amp;this.path.get(this.path.length-2)===t},t.prototype.isEqual=function(t){return null!==t&amp;&amp;0===A.i(this.path,t.path)},t.prototype.toString=function(){return this.path.toString()},t.i=function(t,e){return A.i(t.path,e.path)},t.F=function(t){return t.length%2==0},t.$=function(e){return new t(new A(e.slice()))},t}();
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function k(t,e){if(0!==e.length)throw new f(h.INVALID_ARGUMENT,"Function "+t+"() does not support arguments, but was called with "+W(e.length,"argument")+".")}function D(t,e,n){if(e.length!==n)throw new f(h.INVALID_ARGUMENT,"Function "+t+"() requires "+W(n,"argument")+", but was called with "+W(e.length,"argument")+".")}function P(t,e,n){if(e.length&lt;n)throw new f(h.INVALID_ARGUMENT,"Function "+t+"() requires at least "+W(n,"argument")+", but was called with "+W(e.length,"argument")+".")}function R(t,e,n,r){if(e.length&lt;n||e.length&gt;r)throw new f(h.INVALID_ARGUMENT,"Function "+t+"() requires between "+n+" and "+r+" arguments, but was called with "+W(e.length,"argument")+".")}function x(t,e,n,r){U(t,e,H(n)+" argument",r)}function C(t,e,n,r){void 0!==r&amp;&amp;x(t,e,n,r)}function L(t,e,n,r){U(t,e,n+" option",r)}function j(t,e,n,r){void 0!==r&amp;&amp;L(t,e,n,r)}function M(t,e,n,r,i){void 0!==r&amp;&amp;function(t,e,n,r,i){for(var o=[],a=0,s=i;a&lt;s.length;a++){var u=s[a];if(u===r)return;o.push(q(u))}var c=q(r);throw new f(h.INVALID_ARGUMENT,"Invalid value "+c+" provided to function "+t+'() for option "'+n+'". Acceptable values: '+o.join(", "))}(t,0,n,r,i)}function V(t,e,n,r){if(!e.some(function(t){return t===r}))throw new f(h.INVALID_ARGUMENT,"Invalid value "+q(r)+" provided to function "+t+"() for its "+H(n)+" argument. Acceptable values: "+e.join(", "));return r}function U(t,e,n,r){if(!("object"===e?F(r):"non-empty string"===e?"string"==typeof r&amp;&amp;""!==r:typeof r===e)){var i=q(r);throw new f(h.INVALID_ARGUMENT,"Function "+t+"() requires its "+n+" to be of type "+e+", but it was: "+i)}}function F(t){return"object"==typeof t&amp;&amp;null!==t&amp;&amp;(Object.getPrototypeOf(t)===Object.prototype||null===Object.getPrototypeOf(t))}function q(t){if(void 0===t)return"undefined";if(null===t)return"null";if("string"==typeof t)return t.length&gt;20&amp;&amp;(t=t.substring(0,20)+"..."),JSON.stringify(t);if("number"==typeof t||"boolean"==typeof t)return""+t;if("object"==typeof t){if(t instanceof Array)return"an array";var e=function(t){if(t.constructor){var e=/function\s+([^\s(]+)\s*\(/.exec(t.constructor.toString());if(e&amp;&amp;e.length&gt;1)return e[1]}return null}(t);return e?"a custom "+e+" object":"an object"}return"function"==typeof t?"a function":m()}function B(t,e,n){if(void 0===n)throw new f(h.INVALID_ARGUMENT,"Function "+t+"() requires a valid "+H(e)+" argument, but it was undefined.")}function G(t,e,n){I(e,function(e,r){if(n.indexOf(e)&lt;0)throw new f(h.INVALID_ARGUMENT,"Unknown option '"+e+"' passed to function "+t+"(). Available options: "+n.join(", "))})}function z(t,e,n,r){var i=q(r);return new f(h.INVALID_ARGUMENT,"Function "+t+"() requires its "+H(n)+" argument to be a "+e+", but it was: "+i)}function K(t,e,n){if(n&lt;=0)throw new f(h.INVALID_ARGUMENT,"Function "+t+"() requires its "+H(e)+" argument to be a positive number, but it was: "+n+".")}function H(t){switch(t){case 1:return"first";case 2:return"second";case 3:return"third";default:return t+"th"}}function W(t,e){return t+" "+e+(1===t?"":"s")}
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function X(t){var e="undefined"!=typeof self&amp;&amp;(self.crypto||self.msCrypto),n=new Uint8Array(t);if(e&amp;&amp;"function"==typeof e.getRandomValues)e.getRandomValues(n);else for(var r=0;r&lt;t;r++)n[r]=Math.floor(256*Math.random());return n}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var J=function(){function t(){}return t.k=function(){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",e=Math.floor(256/t.length)*t.length,n="";n.length&lt;20;)for(var r=X(40),i=0;i&lt;r.length;++i)n.length&lt;20&amp;&amp;r[i]&lt;e&amp;&amp;(n+=t.charAt(r[i]%t.length));return n},t}();function Y(t,e){return t&lt;e?-1:t&gt;e?1:0}function Q(t,e,n){return t.length===e.length&amp;&amp;t.every(function(t,r){return n(t,e[r])})}function $(t){return t+"\0"}
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var Z=function(){function t(t){this.M=t}return t.fromBase64String=function(e){return new t(atob(e))},t.fromUint8Array=function(e){return new t(function(t){for(var e="",n=0;n&lt;t.length;++n)e+=String.fromCharCode(t[n]);return e}(e))},t.prototype.toBase64=function(){return t=this.M,btoa(t);var t},t.prototype.toUint8Array=function(){return function(t){for(var e=new Uint8Array(t.length),n=0;n&lt;t.length;n++)e[n]=t.charCodeAt(n);return e}(this.M)},t.prototype.O=function(){return 2*this.M.length},t.prototype.L=function(t){return Y(this.M,t.M)},t.prototype.isEqual=function(t){return this.M===t.M},t}();Z.B=new Z("");var tt=function(){function t(t){this.q=t}return t.fromBase64String=function(e){try{return new t(Z.fromBase64String(e))}catch(e){throw new f(h.INVALID_ARGUMENT,"Failed to construct Bytes from Base64 string: "+e)}},t.fromUint8Array=function(e){return new t(Z.fromUint8Array(e))},t.prototype.toBase64=function(){return this.q.toBase64()},t.prototype.toUint8Array=function(){return this.q.toUint8Array()},t.prototype.toString=function(){return"Bytes(base64: "+this.toBase64()+")"},t.prototype.isEqual=function(t){return this.q.isEqual(t.q)},t}();
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function et(){if("undefined"==typeof Uint8Array)throw new f(h.UNIMPLEMENTED,"Uint8Arrays are not available in this environment.")}function nt(){if("undefined"==typeof atob)throw new f(h.UNIMPLEMENTED,"Blobs are unavailable in Firestore in this environment.")}var rt=function(t){function e(){return null!==t&amp;&amp;t.apply(this,arguments)||this}return r.__extends(e,t),e.fromBase64String=function(t){D("Blob.fromBase64String",arguments,1),x("Blob.fromBase64String","string",1,t),nt();try{return new e(Z.fromBase64String(t))}catch(t){throw new f(h.INVALID_ARGUMENT,"Failed to construct Blob from Base64 string: "+t)}},e.fromUint8Array=function(t){if(D("Blob.fromUint8Array",arguments,1),et(),!(t instanceof Uint8Array))throw z("Blob.fromUint8Array","Uint8Array",1,t);return new e(Z.fromUint8Array(t))},e.prototype.toBase64=function(){return D("Blob.toBase64",arguments,0),nt(),t.prototype.toBase64.call(this)},e.prototype.toUint8Array=function(){return D("Blob.toUint8Array",arguments,0),et(),t.prototype.toUint8Array.call(this)},e.prototype.toString=function(){return"Blob(base64: "+this.toBase64()+")"},e}(tt),it=function(){function t(t,e){this.projectId=t,this.database=e||"(default)"}return Object.defineProperty(t.prototype,"j",{get:function(){return"(default)"===this.database},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(e){return e instanceof t&amp;&amp;e.projectId===this.projectId&amp;&amp;e.database===this.database},t.prototype.L=function(t){return Y(this.projectId,t.projectId)||Y(this.database,t.database)},t}(),ot=function(){function t(t,e){this.K=t,this.G=e,this.H={}}return t.prototype.get=function(t){var e=this.K(t),n=this.H[e];if(void 0!==n)for(var r=0,i=n;r&lt;i.length;r++){var o=i[r],a=o[0],s=o[1];if(this.G(a,t))return s}},t.prototype.has=function(t){return void 0!==this.get(t)},t.prototype.set=function(t,e){var n=this.K(t),r=this.H[n];if(void 0!==r){for(var i=0;i&lt;r.length;i++)if(this.G(r[i][0],t))return void(r[i]=[t,e]);r.push([t,e])}else this.H[n]=[[t,e]]},t.prototype.delete=function(t){var e=this.K(t),n=this.H[e];if(void 0===n)return!1;for(var r=0;r&lt;n.length;r++)if(this.G(n[r][0],t))return 1===n.length?delete this.H[e]:n.splice(r,1),!0;return!1},t.prototype.forEach=function(t){I(this.H,function(e,n){for(var r=0,i=n;r&lt;i.length;r++){var o=i[r],a=o[0],s=o[1];t(a,s)}})},t.prototype.m=function(){return E(this.H)},t}(),at=function(){function t(t,e){if(this.seconds=t,this.nanoseconds=e,e&lt;0)throw new f(h.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(e&gt;=1e9)throw new f(h.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(t&lt;-62135596800)throw new f(h.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t);if(t&gt;=253402300800)throw new f(h.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t)}return t.now=function(){return t.fromMillis(Date.now())},t.fromDate=function(e){return t.fromMillis(e.getTime())},t.fromMillis=function(e){var n=Math.floor(e/1e3);return new t(n,1e6*(e-1e3*n))},t.prototype.toDate=function(){return new Date(this.toMillis())},t.prototype.toMillis=function(){return 1e3*this.seconds+this.nanoseconds/1e6},t.prototype.Y=function(t){return this.seconds===t.seconds?Y(this.nanoseconds,t.nanoseconds):Y(this.seconds,t.seconds)},t.prototype.isEqual=function(t){return t.seconds===this.seconds&amp;&amp;t.nanoseconds===this.nanoseconds},t.prototype.toString=function(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"},t.prototype.toJSON=function(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}},t.prototype.valueOf=function(){var t=this.seconds- -62135596800;return String(t).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")},t}(),st=function(){function t(t){this.timestamp=t}return t.J=function(e){return new t(e)},t.min=function(){return new t(new at(0,0))},t.prototype.L=function(t){return this.timestamp.Y(t.timestamp)},t.prototype.isEqual=function(t){return this.timestamp.isEqual(t.timestamp)},t.prototype.X=function(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3},t.prototype.toString=function(){return"SnapshotVersion("+this.timestamp.toString()+")"},t.prototype.Z=function(){return this.timestamp},t}();
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function ut(t){return null==t}function ct(t){return 0===t&amp;&amp;1/t==-1/0}function ht(t){return"number"==typeof t&amp;&amp;Number.isInteger(t)&amp;&amp;!ct(t)&amp;&amp;t&lt;=Number.MAX_SAFE_INTEGER&amp;&amp;t&gt;=Number.MIN_SAFE_INTEGER}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var ft=function(t,e,n,r,i,o,a){void 0===e&amp;&amp;(e=null),void 0===n&amp;&amp;(n=[]),void 0===r&amp;&amp;(r=[]),void 0===i&amp;&amp;(i=null),void 0===o&amp;&amp;(o=null),void 0===a&amp;&amp;(a=null),this.path=t,this.collectionGroup=e,this.orderBy=n,this.filters=r,this.limit=i,this.startAt=o,this.endAt=a,this.tt=null};function lt(t,e,n,r,i,o,a){return void 0===e&amp;&amp;(e=null),void 0===n&amp;&amp;(n=[]),void 0===r&amp;&amp;(r=[]),void 0===i&amp;&amp;(i=null),void 0===o&amp;&amp;(o=null),void 0===a&amp;&amp;(a=null),new ft(t,e,n,r,i,o,a)}function pt(t){var e=w(t);if(null===e.tt){var n=e.path.R();null!==e.collectionGroup&amp;&amp;(n+="|cg:"+e.collectionGroup),n+="|f:",n+=e.filters.map(function(t){return function(t){return t.field.R()+t.op.toString()+ne(t.value)}(t)}).join(","),n+="|ob:",n+=e.orderBy.map(function(t){return(e=t).field.R()+e.dir;var e}).join(","),ut(e.limit)||(n+="|l:",n+=e.limit),e.startAt&amp;&amp;(n+="|lb:",n+=$n(e.startAt)),e.endAt&amp;&amp;(n+="|ub:",n+=$n(e.endAt)),e.tt=n}return e.tt}function dt(t,e){if(t.limit!==e.limit)return!1;if(t.orderBy.length!==e.orderBy.length)return!1;for(var n=0;n&lt;t.orderBy.length;n++)if(!rr(t.orderBy[n],e.orderBy[n]))return!1;if(t.filters.length!==e.filters.length)return!1;for(var r=0;r&lt;t.filters.length;r++)if(i=t.filters[r],o=e.filters[r],i.op!==o.op||!i.field.isEqual(o.field)||!$t(i.value,o.value))return!1;var i,o;return t.collectionGroup===e.collectionGroup&amp;&amp;!!t.path.isEqual(e.path)&amp;&amp;!!tr(t.startAt,e.startAt)&amp;&amp;tr(t.endAt,e.endAt)}function vt(t){return O.F(t.path)&amp;&amp;null===t.collectionGroup&amp;&amp;0===t.filters.length}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var yt,gt,mt=function(){function t(t,e,n,r,i,o,a){void 0===i&amp;&amp;(i=st.min()),void 0===o&amp;&amp;(o=st.min()),void 0===a&amp;&amp;(a=Z.B),this.target=t,this.targetId=e,this.et=n,this.sequenceNumber=r,this.nt=i,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=a}return t.prototype.st=function(e){return new t(this.target,this.targetId,this.et,e,this.nt,this.lastLimboFreeSnapshotVersion,this.resumeToken)},t.prototype.it=function(e,n){return new t(this.target,this.targetId,this.et,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,e)},t.prototype.rt=function(e){return new t(this.target,this.targetId,this.et,this.sequenceNumber,this.nt,e,this.resumeToken)},t}();
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function bt(t){switch(t){case h.OK:return m();case h.CANCELLED:case h.UNKNOWN:case h.DEADLINE_EXCEEDED:case h.RESOURCE_EXHAUSTED:case h.INTERNAL:case h.UNAVAILABLE:case h.UNAUTHENTICATED:return!1;case h.INVALID_ARGUMENT:case h.NOT_FOUND:case h.ALREADY_EXISTS:case h.PERMISSION_DENIED:case h.FAILED_PRECONDITION:case h.ABORTED:case h.OUT_OF_RANGE:case h.UNIMPLEMENTED:case h.DATA_LOSS:return!0;default:return m()}}function wt(t){if(void 0===t)return v("GRPC error has no .code"),h.UNKNOWN;switch(t){case yt.OK:return h.OK;case yt.CANCELLED:return h.CANCELLED;case yt.UNKNOWN:return h.UNKNOWN;case yt.DEADLINE_EXCEEDED:return h.DEADLINE_EXCEEDED;case yt.RESOURCE_EXHAUSTED:return h.RESOURCE_EXHAUSTED;case yt.INTERNAL:return h.INTERNAL;case yt.UNAVAILABLE:return h.UNAVAILABLE;case yt.UNAUTHENTICATED:return h.UNAUTHENTICATED;case yt.INVALID_ARGUMENT:return h.INVALID_ARGUMENT;case yt.NOT_FOUND:return h.NOT_FOUND;case yt.ALREADY_EXISTS:return h.ALREADY_EXISTS;case yt.PERMISSION_DENIED:return h.PERMISSION_DENIED;case yt.FAILED_PRECONDITION:return h.FAILED_PRECONDITION;case yt.ABORTED:return h.ABORTED;case yt.OUT_OF_RANGE:return h.OUT_OF_RANGE;case yt.UNIMPLEMENTED:return h.UNIMPLEMENTED;case yt.DATA_LOSS:return h.DATA_LOSS;default:return m()}}(gt=yt||(yt={}))[gt.OK=0]="OK",gt[gt.CANCELLED=1]="CANCELLED",gt[gt.UNKNOWN=2]="UNKNOWN",gt[gt.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",gt[gt.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",gt[gt.NOT_FOUND=5]="NOT_FOUND",gt[gt.ALREADY_EXISTS=6]="ALREADY_EXISTS",gt[gt.PERMISSION_DENIED=7]="PERMISSION_DENIED",gt[gt.UNAUTHENTICATED=16]="UNAUTHENTICATED",gt[gt.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",gt[gt.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",gt[gt.ABORTED=10]="ABORTED",gt[gt.OUT_OF_RANGE=11]="OUT_OF_RANGE",gt[gt.UNIMPLEMENTED=12]="UNIMPLEMENTED",gt[gt.INTERNAL=13]="INTERNAL",gt[gt.UNAVAILABLE=14]="UNAVAILABLE",gt[gt.DATA_LOSS=15]="DATA_LOSS";
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
var _t=function(){function t(t,e){this.i=t,this.root=e||Et.EMPTY}return t.prototype.ot=function(e,n){return new t(this.i,this.root.ot(e,n,this.i).copy(null,null,Et.at,null,null))},t.prototype.remove=function(e){return new t(this.i,this.root.remove(e,this.i).copy(null,null,Et.at,null,null))},t.prototype.get=function(t){for(var e=this.root;!e.m();){var n=this.i(t,e.key);if(0===n)return e.value;n&lt;0?e=e.left:n&gt;0&amp;&amp;(e=e.right)}return null},t.prototype.indexOf=function(t){for(var e=0,n=this.root;!n.m();){var r=this.i(t,n.key);if(0===r)return e+n.left.size;r&lt;0?n=n.left:(e+=n.left.size+1,n=n.right)}return-1},t.prototype.m=function(){return this.root.m()},Object.defineProperty(t.prototype,"size",{get:function(){return this.root.size},enumerable:!1,configurable:!0}),t.prototype.ct=function(){return this.root.ct()},t.prototype.ut=function(){return this.root.ut()},t.prototype.ht=function(t){return this.root.ht(t)},t.prototype.forEach=function(t){this.ht(function(e,n){return t(e,n),!1})},t.prototype.toString=function(){var t=[];return this.ht(function(e,n){return t.push(e+":"+n),!1}),"{"+t.join(", ")+"}"},t.prototype.lt=function(t){return this.root.lt(t)},t.prototype._t=function(){return new It(this.root,null,this.i,!1)},t.prototype.ft=function(t){return new It(this.root,t,this.i,!1)},t.prototype.dt=function(){return new It(this.root,null,this.i,!0)},t.prototype.wt=function(t){return new It(this.root,t,this.i,!0)},t}(),It=function(){function t(t,e,n,r){this.Tt=r,this.Et=[];for(var i=1;!t.m();)if(i=e?n(t.key,e):1,r&amp;&amp;(i*=-1),i&lt;0)t=this.Tt?t.left:t.right;else{if(0===i){this.Et.push(t);break}this.Et.push(t),t=this.Tt?t.right:t.left}}return t.prototype.It=function(){var t=this.Et.pop(),e={key:t.key,value:t.value};if(this.Tt)for(t=t.left;!t.m();)this.Et.push(t),t=t.right;else for(t=t.right;!t.m();)this.Et.push(t),t=t.left;return e},t.prototype.At=function(){return this.Et.length&gt;0},t.prototype.Rt=function(){if(0===this.Et.length)return null;var t=this.Et[this.Et.length-1];return{key:t.key,value:t.value}},t}(),Et=function(){function t(e,n,r,i,o){this.key=e,this.value=n,this.color=null!=r?r:t.RED,this.left=null!=i?i:t.EMPTY,this.right=null!=o?o:t.EMPTY,this.size=this.left.size+1+this.right.size}return t.prototype.copy=function(e,n,r,i,o){return new t(null!=e?e:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=i?i:this.left,null!=o?o:this.right)},t.prototype.m=function(){return!1},t.prototype.ht=function(t){return this.left.ht(t)||t(this.key,this.value)||this.right.ht(t)},t.prototype.lt=function(t){return this.right.lt(t)||t(this.key,this.value)||this.left.lt(t)},t.prototype.min=function(){return this.left.m()?this:this.left.min()},t.prototype.ct=function(){return this.min().key},t.prototype.ut=function(){return this.right.m()?this.key:this.right.ut()},t.prototype.ot=function(t,e,n){var r=this,i=n(t,r.key);return(r=i&lt;0?r.copy(null,null,null,r.left.ot(t,e,n),null):0===i?r.copy(null,e,null,null,null):r.copy(null,null,null,null,r.right.ot(t,e,n))).gt()},t.prototype.Pt=function(){if(this.left.m())return t.EMPTY;var e=this;return e.left.yt()||e.left.left.yt()||(e=e.Vt()),(e=e.copy(null,null,null,e.left.Pt(),null)).gt()},t.prototype.remove=function(e,n){var r,i=this;if(n(e,i.key)&lt;0)i.left.m()||i.left.yt()||i.left.left.yt()||(i=i.Vt()),i=i.copy(null,null,null,i.left.remove(e,n),null);else{if(i.left.yt()&amp;&amp;(i=i.bt()),i.right.m()||i.right.yt()||i.right.left.yt()||(i=i.vt()),0===n(e,i.key)){if(i.right.m())return t.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.Pt())}i=i.copy(null,null,null,null,i.right.remove(e,n))}return i.gt()},t.prototype.yt=function(){return this.color},t.prototype.gt=function(){var t=this;return t.right.yt()&amp;&amp;!t.left.yt()&amp;&amp;(t=t.St()),t.left.yt()&amp;&amp;t.left.left.yt()&amp;&amp;(t=t.bt()),t.left.yt()&amp;&amp;t.right.yt()&amp;&amp;(t=t.Dt()),t},t.prototype.Vt=function(){var t=this.Dt();return t.right.left.yt()&amp;&amp;(t=(t=(t=t.copy(null,null,null,null,t.right.bt())).St()).Dt()),t},t.prototype.vt=function(){var t=this.Dt();return t.left.left.yt()&amp;&amp;(t=(t=t.bt()).Dt()),t},t.prototype.St=function(){var e=this.copy(null,null,t.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)},t.prototype.bt=function(){var e=this.copy(null,null,t.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)},t.prototype.Dt=function(){var t=this.left.copy(null,null,!this.left.color,null,null),e=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,e)},t.prototype.Ct=function(){var t=this.Nt();return Math.pow(2,t)&lt;=this.size+1},t.prototype.Nt=function(){if(this.yt()&amp;&amp;this.left.yt())throw m();if(this.right.yt())throw m();var t=this.left.Nt();if(t!==this.right.Nt())throw m();return t+(this.yt()?0:1)},t}();Et.EMPTY=null,Et.RED=!0,Et.at=!1,Et.EMPTY=new(function(){function t(){this.size=0}return Object.defineProperty(t.prototype,"key",{get:function(){throw m()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){throw m()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){throw m()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){throw m()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){throw m()},enumerable:!1,configurable:!0}),t.prototype.copy=function(t,e,n,r,i){return this},t.prototype.ot=function(t,e,n){return new Et(t,e)},t.prototype.remove=function(t,e){return this},t.prototype.m=function(){return!0},t.prototype.ht=function(t){return!1},t.prototype.lt=function(t){return!1},t.prototype.ct=function(){return null},t.prototype.ut=function(){return null},t.prototype.yt=function(){return!1},t.prototype.Ct=function(){return!0},t.prototype.Nt=function(){return 0},t}());
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
var Tt=function(){function t(t){this.i=t,this.data=new _t(this.i)}return t.prototype.has=function(t){return null!==this.data.get(t)},t.prototype.first=function(){return this.data.ct()},t.prototype.last=function(){return this.data.ut()},Object.defineProperty(t.prototype,"size",{get:function(){return this.data.size},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){return this.data.indexOf(t)},t.prototype.forEach=function(t){this.data.ht(function(e,n){return t(e),!1})},t.prototype.Ft=function(t,e){for(var n=this.data.ft(t[0]);n.At();){var r=n.It();if(this.i(r.key,t[1])&gt;=0)return;e(r.key)}},t.prototype.xt=function(t,e){var n;for(n=void 0!==e?this.data.ft(e):this.data._t();n.At();)if(!t(n.It().key))return},t.prototype.$t=function(t){var e=this.data.ft(t);return e.At()?e.It().key:null},t.prototype._t=function(){return new At(this.data._t())},t.prototype.ft=function(t){return new At(this.data.ft(t))},t.prototype.add=function(t){return this.copy(this.data.remove(t).ot(t,!0))},t.prototype.delete=function(t){return this.has(t)?this.copy(this.data.remove(t)):this},t.prototype.m=function(){return this.data.m()},t.prototype.kt=function(t){var e=this;return e.size&lt;t.size&amp;&amp;(e=t,t=this),t.forEach(function(t){e=e.add(t)}),e},t.prototype.isEqual=function(e){if(!(e instanceof t))return!1;if(this.size!==e.size)return!1;for(var n=this.data._t(),r=e.data._t();n.At();){var i=n.It().key,o=r.It().key;if(0!==this.i(i,o))return!1}return!0},t.prototype.A=function(){var t=[];return this.forEach(function(e){t.push(e)}),t},t.prototype.toString=function(){var t=[];return this.forEach(function(e){return t.push(e)}),"SortedSet("+t.toString()+")"},t.prototype.copy=function(e){var n=new t(this.i);return n.data=e,n},t}(),At=function(){function t(t){this.Mt=t}return t.prototype.It=function(){return this.Mt.It().key},t.prototype.At=function(){return this.Mt.At()},t}(),St=new _t(O.i);function Nt(){return St}function Ot(){return Nt()}var kt=new _t(O.i);function Dt(){return kt}var Pt=new _t(O.i),Rt=new Tt(O.i);function xt(){for(var t=[],e=0;e&lt;arguments.length;e++)t[e]=arguments[e];for(var n=Rt,r=0,i=t;r&lt;i.length;r++){var o=i[r];n=n.add(o)}return n}var Ct=new Tt(Y);function Lt(){return Ct}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var jt=function(){function t(t){this.i=t?function(e,n){return t(e,n)||O.i(e.key,n.key)}:function(t,e){return O.i(t.key,e.key)},this.Ot=Dt(),this.Lt=new _t(this.i)}return t.Bt=function(e){return new t(e.i)},t.prototype.has=function(t){return null!=this.Ot.get(t)},t.prototype.get=function(t){return this.Ot.get(t)},t.prototype.first=function(){return this.Lt.ct()},t.prototype.last=function(){return this.Lt.ut()},t.prototype.m=function(){return this.Lt.m()},t.prototype.indexOf=function(t){var e=this.Ot.get(t);return e?this.Lt.indexOf(e):-1},Object.defineProperty(t.prototype,"size",{get:function(){return this.Lt.size},enumerable:!1,configurable:!0}),t.prototype.forEach=function(t){this.Lt.ht(function(e,n){return t(e),!1})},t.prototype.add=function(t){var e=this.delete(t.key);return e.copy(e.Ot.ot(t.key,t),e.Lt.ot(t,null))},t.prototype.delete=function(t){var e=this.get(t);return e?this.copy(this.Ot.remove(t),this.Lt.remove(e)):this},t.prototype.isEqual=function(e){if(!(e instanceof t))return!1;if(this.size!==e.size)return!1;for(var n=this.Lt._t(),r=e.Lt._t();n.At();){var i=n.It().key,o=r.It().key;if(!i.isEqual(o))return!1}return!0},t.prototype.toString=function(){var t=[];return this.forEach(function(e){t.push(e.toString())}),0===t.length?"DocumentSet ()":"DocumentSet (\n  "+t.join("  \n")+"\n)"},t.prototype.copy=function(e,n){var r=new t;return r.i=this.i,r.Ot=e,r.Lt=n,r},t}(),Mt=function(){function t(){this.qt=new _t(O.i)}return t.prototype.track=function(t){var e=t.doc.key,n=this.qt.get(e);n?0!==t.type&amp;&amp;3===n.type?this.qt=this.qt.ot(e,t):3===t.type&amp;&amp;1!==n.type?this.qt=this.qt.ot(e,{type:n.type,doc:t.doc}):2===t.type&amp;&amp;2===n.type?this.qt=this.qt.ot(e,{type:2,doc:t.doc}):2===t.type&amp;&amp;0===n.type?this.qt=this.qt.ot(e,{type:0,doc:t.doc}):1===t.type&amp;&amp;0===n.type?this.qt=this.qt.remove(e):1===t.type&amp;&amp;2===n.type?this.qt=this.qt.ot(e,{type:1,doc:n.doc}):0===t.type&amp;&amp;1===n.type?this.qt=this.qt.ot(e,{type:2,doc:t.doc}):m():this.qt=this.qt.ot(e,t)},t.prototype.Ut=function(){var t=[];return this.qt.ht(function(e,n){t.push(n)}),t},t}(),Vt=function(){function t(t,e,n,r,i,o,a,s){this.query=t,this.docs=e,this.Qt=n,this.docChanges=r,this.Wt=i,this.fromCache=o,this.jt=a,this.Kt=s}return t.Gt=function(e,n,r,i){var o=[];return n.forEach(function(t){o.push({type:0,doc:t})}),new t(e,n,jt.Bt(n),o,r,i,!0,!1)},Object.defineProperty(t.prototype,"hasPendingWrites",{get:function(){return!this.Wt.m()},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(t){if(!(this.fromCache===t.fromCache&amp;&amp;this.jt===t.jt&amp;&amp;this.Wt.isEqual(t.Wt)&amp;&amp;Mn(this.query,t.query)&amp;&amp;this.docs.isEqual(t.docs)&amp;&amp;this.Qt.isEqual(t.Qt)))return!1;var e=this.docChanges,n=t.docChanges;if(e.length!==n.length)return!1;for(var r=0;r&lt;e.length;r++)if(e[r].type!==n[r].type||!e[r].doc.isEqual(n[r].doc))return!1;return!0},t}(),Ut=function(){function t(t,e,n,r,i){this.nt=t,this.zt=e,this.Ht=n,this.Yt=r,this.Jt=i}return t.Xt=function(e,n){var r=new Map;return r.set(e,Ft.Zt(e,n)),new t(st.min(),r,Lt(),Nt(),xt())},t}(),Ft=function(){function t(t,e,n,r,i){this.resumeToken=t,this.te=e,this.ee=n,this.ne=r,this.se=i}return t.Zt=function(e,n){return new t(Z.B,n,xt(),xt(),xt())},t}(),qt=function(t,e,n,r){this.ie=t,this.removedTargetIds=e,this.key=n,this.re=r},Bt=function(t,e){this.targetId=t,this.oe=e},Gt=function(t,e,n,r){void 0===n&amp;&amp;(n=Z.B),void 0===r&amp;&amp;(r=null),this.state=t,this.targetIds=e,this.resumeToken=n,this.cause=r},zt=function(){function t(){this.ae=0,this.ce=Wt(),this.ue=Z.B,this.he=!1,this.le=!0}return Object.defineProperty(t.prototype,"te",{get:function(){return this.he},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"resumeToken",{get:function(){return this.ue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_e",{get:function(){return 0!==this.ae},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fe",{get:function(){return this.le},enumerable:!1,configurable:!0}),t.prototype.de=function(t){t.O()&gt;0&amp;&amp;(this.le=!0,this.ue=t)},t.prototype.we=function(){var t=xt(),e=xt(),n=xt();return this.ce.forEach(function(r,i){switch(i){case 0:t=t.add(r);break;case 2:e=e.add(r);break;case 1:n=n.add(r);break;default:m()}}),new Ft(this.ue,this.he,t,e,n)},t.prototype.me=function(){this.le=!1,this.ce=Wt()},t.prototype.Te=function(t,e){this.le=!0,this.ce=this.ce.ot(t,e)},t.prototype.Ee=function(t){this.le=!0,this.ce=this.ce.remove(t)},t.prototype.Ie=function(){this.ae+=1},t.prototype.Ae=function(){this.ae-=1},t.prototype.Re=function(){this.le=!0,this.he=!0},t}(),Kt=function(){function t(t){this.ge=t,this.Pe=new Map,this.ye=Nt(),this.Ve=Ht(),this.pe=new Tt(Y)}return t.prototype.be=function(t){for(var e=0,n=t.ie;e&lt;n.length;e++){var r=n[e];t.re instanceof _n?this.ve(r,t.re):t.re instanceof In&amp;&amp;this.Se(r,t.key,t.re)}for(var i=0,o=t.removedTargetIds;i&lt;o.length;i++){var a=o[i];this.Se(a,t.key,t.re)}},t.prototype.De=function(t){var e=this;this.Ce(t,function(n){var r=e.Ne(n);switch(t.state){case 0:e.Fe(n)&amp;&amp;r.de(t.resumeToken);break;case 1:r.Ae(),r._e||r.me(),r.de(t.resumeToken);break;case 2:r.Ae(),r._e||e.removeTarget(n);break;case 3:e.Fe(n)&amp;&amp;(r.Re(),r.de(t.resumeToken));break;case 4:e.Fe(n)&amp;&amp;(e.xe(n),r.de(t.resumeToken));break;default:m()}})},t.prototype.Ce=function(t,e){var n=this;t.targetIds.length&gt;0?t.targetIds.forEach(e):this.Pe.forEach(function(t,r){n.Fe(r)&amp;&amp;e(r)})},t.prototype.$e=function(t){var e=t.targetId,n=t.oe.count,r=this.ke(e);if(r){var i=r.target;if(vt(i))if(0===n){var o=new O(i.path);this.Se(e,o,new In(o,st.min()))}else b(1===n);else this.Me(e)!==n&amp;&amp;(this.xe(e),this.pe=this.pe.add(e))}},t.prototype.Oe=function(t){var e=this,n=new Map;this.Pe.forEach(function(r,i){var o=e.ke(i);if(o){if(r.te&amp;&amp;vt(o.target)){var a=new O(o.target.path);null!==e.ye.get(a)||e.Le(i,a)||e.Se(i,a,new In(a,t))}r.fe&amp;&amp;(n.set(i,r.we()),r.me())}});var r=xt();this.Ve.forEach(function(t,n){var i=!0;n.xt(function(t){var n=e.ke(t);return!n||2===n.et||(i=!1,!1)}),i&amp;&amp;(r=r.add(t))});var i=new Ut(t,n,this.pe,this.ye,r);return this.ye=Nt(),this.Ve=Ht(),this.pe=new Tt(Y),i},t.prototype.ve=function(t,e){if(this.Fe(t)){var n=this.Le(t,e.key)?2:0;this.Ne(t).Te(e.key,n),this.ye=this.ye.ot(e.key,e),this.Ve=this.Ve.ot(e.key,this.Be(e.key).add(t))}},t.prototype.Se=function(t,e,n){if(this.Fe(t)){var r=this.Ne(t);this.Le(t,e)?r.Te(e,1):r.Ee(e),this.Ve=this.Ve.ot(e,this.Be(e).delete(t)),n&amp;&amp;(this.ye=this.ye.ot(e,n))}},t.prototype.removeTarget=function(t){this.Pe.delete(t)},t.prototype.Me=function(t){var e=this.Ne(t).we();return this.ge.qe(t).size+e.ee.size-e.se.size},t.prototype.Ie=function(t){this.Ne(t).Ie()},t.prototype.Ne=function(t){var e=this.Pe.get(t);return e||(e=new zt,this.Pe.set(t,e)),e},t.prototype.Be=function(t){var e=this.Ve.get(t);return e||(e=new Tt(Y),this.Ve=this.Ve.ot(t,e)),e},t.prototype.Fe=function(t){var e=null!==this.ke(t);return e||d("WatchChangeAggregator","Detected inactive target",t),e},t.prototype.ke=function(t){var e=this.Pe.get(t);return e&amp;&amp;e._e?null:this.ge.Ue(t)},t.prototype.xe=function(t){var e=this;this.Pe.set(t,new zt),this.ge.qe(t).forEach(function(n){e.Se(t,n,null)})},t.prototype.Le=function(t,e){return this.ge.qe(t).has(e)},t}();
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function Ht(){return new _t(O.i)}function Wt(){return new _t(O.i)}
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function Xt(t){var e,n;return"server_timestamp"===(null===(n=((null===(e=null==t?void 0:t.mapValue)||void 0===e?void 0:e.fields)||{}).__type__)||void 0===n?void 0:n.stringValue)}function Jt(t){var e=re(t.mapValue.fields.__local_write_time__.timestampValue);return new at(e.seconds,e.nanos)}
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var Yt=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function Qt(t){return"nullValue"in t?0:"booleanValue"in t?1:"integerValue"in t||"doubleValue"in t?2:"timestampValue"in t?3:"stringValue"in t?5:"bytesValue"in t?6:"referenceValue"in t?7:"geoPointValue"in t?8:"arrayValue"in t?9:"mapValue"in t?Xt(t)?4:10:m()}function $t(t,e){var n=Qt(t);if(n!==Qt(e))return!1;switch(n){case 0:return!0;case 1:return t.booleanValue===e.booleanValue;case 4:return Jt(t).isEqual(Jt(e));case 3:return function(t,e){if("string"==typeof t.timestampValue&amp;&amp;"string"==typeof e.timestampValue&amp;&amp;t.timestampValue.length===e.timestampValue.length)return t.timestampValue===e.timestampValue;var n=re(t.timestampValue),r=re(e.timestampValue);return n.seconds===r.seconds&amp;&amp;n.nanos===r.nanos}(t,e);case 5:return t.stringValue===e.stringValue;case 6:return function(t,e){return oe(t.bytesValue).isEqual(oe(e.bytesValue))}(t,e);case 7:return t.referenceValue===e.referenceValue;case 8:return function(t,e){return ie(t.geoPointValue.latitude)===ie(e.geoPointValue.latitude)&amp;&amp;ie(t.geoPointValue.longitude)===ie(e.geoPointValue.longitude)}(t,e);case 2:return function(t,e){if("integerValue"in t&amp;&amp;"integerValue"in e)return ie(t.integerValue)===ie(e.integerValue);if("doubleValue"in t&amp;&amp;"doubleValue"in e){var n=ie(t.doubleValue),r=ie(e.doubleValue);return n===r?ct(n)===ct(r):isNaN(n)&amp;&amp;isNaN(r)}return!1}(t,e);case 9:return Q(t.arrayValue.values||[],e.arrayValue.values||[],$t);case 10:return function(t,e){var n=t.mapValue.fields||{},r=e.mapValue.fields||{};if(_(n)!==_(r))return!1;for(var i in n)if(n.hasOwnProperty(i)&amp;&amp;(void 0===r[i]||!$t(n[i],r[i])))return!1;return!0}(t,e);default:return m()}}function Zt(t,e){return void 0!==(t.values||[]).find(function(t){return $t(t,e)})}function te(t,e){var n=Qt(t),r=Qt(e);if(n!==r)return Y(n,r);switch(n){case 0:return 0;case 1:return Y(t.booleanValue,e.booleanValue);case 2:return function(t,e){var n=ie(t.integerValue||t.doubleValue),r=ie(e.integerValue||e.doubleValue);return n&lt;r?-1:n&gt;r?1:n===r?0:isNaN(n)?isNaN(r)?0:-1:1}(t,e);case 3:return ee(t.timestampValue,e.timestampValue);case 4:return ee(Jt(t),Jt(e));case 5:return Y(t.stringValue,e.stringValue);case 6:return function(t,e){var n=oe(t),r=oe(e);return n.L(r)}(t.bytesValue,e.bytesValue);case 7:return function(t,e){for(var n=t.split("/"),r=e.split("/"),i=0;i&lt;n.length&amp;&amp;i&lt;r.length;i++){var o=Y(n[i],r[i]);if(0!==o)return o}return Y(n.length,r.length)}(t.referenceValue,e.referenceValue);case 8:return function(t,e){var n=Y(ie(t.latitude),ie(e.latitude));return 0!==n?n:Y(ie(t.longitude),ie(e.longitude))}(t.geoPointValue,e.geoPointValue);case 9:return function(t,e){for(var n=t.values||[],r=e.values||[],i=0;i&lt;n.length&amp;&amp;i&lt;r.length;++i){var o=te(n[i],r[i]);if(o)return o}return Y(n.length,r.length)}(t.arrayValue,e.arrayValue);case 10:return function(t,e){var n=t.fields||{},r=Object.keys(n),i=e.fields||{},o=Object.keys(i);r.sort(),o.sort();for(var a=0;a&lt;r.length&amp;&amp;a&lt;o.length;++a){var s=Y(r[a],o[a]);if(0!==s)return s;var u=te(n[r[a]],i[o[a]]);if(0!==u)return u}return Y(r.length,o.length)}(t.mapValue,e.mapValue);default:throw m()}}function ee(t,e){if("string"==typeof t&amp;&amp;"string"==typeof e&amp;&amp;t.length===e.length)return Y(t,e);var n=re(t),r=re(e),i=Y(n.seconds,r.seconds);return 0!==i?i:Y(n.nanos,r.nanos)}function ne(t){return function t(e){return"nullValue"in e?"null":"booleanValue"in e?""+e.booleanValue:"integerValue"in e?""+e.integerValue:"doubleValue"in e?""+e.doubleValue:"timestampValue"in e?function(t){var e=re(t);return"time("+e.seconds+","+e.nanos+")"}(e.timestampValue):"stringValue"in e?e.stringValue:"bytesValue"in e?oe(e.bytesValue).toBase64():"referenceValue"in e?(r=e.referenceValue,O.C(r).toString()):"geoPointValue"in e?"geo("+(n=e.geoPointValue).latitude+","+n.longitude+")":"arrayValue"in e?function(e){for(var n="[",r=!0,i=0,o=e.values||[];i&lt;o.length;i++)r?r=!1:n+=",",n+=t(o[i]);return n+"]"}(e.arrayValue):"mapValue"in e?function(e){for(var n="{",r=!0,i=0,o=Object.keys(e.fields||{}).sort();i&lt;o.length;i++){var a=o[i];r?r=!1:n+=",",n+=a+":"+t(e.fields[a])}return n+"}"}(e.mapValue):m();var n,r}(t)}function re(t){if(b(!!t),"string"==typeof t){var e=0,n=Yt.exec(t);if(b(!!n),n[1]){var r=n[1];r=(r+"000000000").substr(0,9),e=Number(r)}var i=new Date(t);return{seconds:Math.floor(i.getTime()/1e3),nanos:e}}return{seconds:ie(t.seconds),nanos:ie(t.nanos)}}function ie(t){return"number"==typeof t?t:"string"==typeof t?Number(t):0}function oe(t){return"string"==typeof t?Z.fromBase64String(t):Z.fromUint8Array(t)}function ae(t,e){return{referenceValue:"projects/"+t.projectId+"/databases/"+t.database+"/documents/"+e.path.R()}}function se(t){return!!t&amp;&amp;"integerValue"in t}function ue(t){return!!t&amp;&amp;"arrayValue"in t}function ce(t){return!!t&amp;&amp;"nullValue"in t}function he(t){return!!t&amp;&amp;"doubleValue"in t&amp;&amp;isNaN(Number(t.doubleValue))}function fe(t){return!!t&amp;&amp;"mapValue"in t}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var le={asc:"ASCENDING",desc:"DESCENDING"},pe={"&lt;":"LESS_THAN","&lt;=":"LESS_THAN_OR_EQUAL","&gt;":"GREATER_THAN","&gt;=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"},de=function(t,e){this.U=t,this.Qe=e};function ve(t){return{integerValue:""+t}}function ye(t,e){if(t.Qe){if(isNaN(e))return{doubleValue:"NaN"};if(e===1/0)return{doubleValue:"Infinity"};if(e===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:ct(e)?"-0":e}}function ge(t,e){return ht(e)?ve(e):ye(t,e)}function me(t,e){return t.Qe?new Date(1e3*e.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")+"."+("000000000"+e.nanoseconds).slice(-9)+"Z":{seconds:""+e.seconds,nanos:e.nanoseconds}}function be(t,e){return t.Qe?e.toBase64():e.toUint8Array()}function we(t){return b(!!t),st.J(function(t){var e=re(t);return new at(e.seconds,e.nanos)}(t))}function _e(t,e){return function(t){return new A(["projects",t.projectId,"databases",t.database])}(t).child("documents").child(e).R()}function Ie(t){var e=A.g(t);return b(Ue(e)),e}function Ee(t,e){return _e(t.U,e.path)}function Te(t,e){var n=Ie(e);return b(n.get(1)===t.U.projectId),b(!n.get(3)&amp;&amp;!t.U.database||n.get(3)===t.U.database),new O(Oe(n))}function Ae(t,e){return _e(t.U,e)}function Se(t){var e=Ie(t);return 4===e.length?A.P():Oe(e)}function Ne(t){return new A(["projects",t.U.projectId,"databases",t.U.database]).R()}function Oe(t){return b(t.length&gt;4&amp;&amp;"documents"===t.get(4)),t.u(5)}function ke(t,e,n){return{name:Ee(t,e),fields:n.proto.mapValue.fields}}function De(t,e){var n;if(e instanceof cn)n={update:ke(t,e.key,e.value)};else if(e instanceof vn)n={delete:Ee(t,e.key)};else if(e instanceof hn)n={update:ke(t,e.key,e.data),updateMask:function(t){var e=[];return t.fields.forEach(function(t){return e.push(t.R())}),{fieldPaths:e}}(e.We)};else if(e instanceof ln)n={transform:{document:Ee(t,e.key),fieldTransforms:e.fieldTransforms.map(function(t){return function(t,e){var n=e.transform;if(n instanceof ze)return{fieldPath:e.field.R(),setToServerValue:"REQUEST_TIME"};if(n instanceof Ke)return{fieldPath:e.field.R(),appendMissingElements:{values:n.elements}};if(n instanceof We)return{fieldPath:e.field.R(),removeAllFromArray:{values:n.elements}};if(n instanceof Je)return{fieldPath:e.field.R(),increment:n.je};throw m()}(0,t)})}};else{if(!(e instanceof yn))return m();n={verify:Ee(t,e.key)}}return e.Ge.Ke||(n.currentDocument=function(t,e){return void 0!==e.updateTime?{updateTime:function(t,e){return me(t,e.Z())}(t,e.updateTime)}:void 0!==e.exists?{exists:e.exists}:m()}(t,e.Ge)),n}function Pe(t,e){var n=e.currentDocument?function(t){return void 0!==t.updateTime?tn.updateTime(we(t.updateTime)):void 0!==t.exists?tn.exists(t.exists):tn.ze()}(e.currentDocument):tn.ze();if(e.update){e.update.name;var r=Te(t,e.update.name),i=new gn({mapValue:{fields:e.update.fields}});if(e.updateMask){var o=function(t){var e=t.fieldPaths||[];return new $e(e.map(function(t){return N.S(t)}))}(e.updateMask);return new hn(r,i,o,n)}return new cn(r,i,n)}if(e.delete){var a=Te(t,e.delete);return new vn(a,n)}if(e.transform){var s=Te(t,e.transform.document),u=e.transform.fieldTransforms.map(function(e){return function(t,e){var n=null;if("setToServerValue"in e)b("REQUEST_TIME"===e.setToServerValue),n=new ze;else if("appendMissingElements"in e){var r=e.appendMissingElements.values||[];n=new Ke(r)}else if("removeAllFromArray"in e){var i=e.removeAllFromArray.values||[];n=new We(i)}else"increment"in e?n=new Je(t,e.increment):m();var o=N.S(e.fieldPath);return new Ze(o,n)}(t,e)});return b(!0===n.exists),new ln(s,u)}if(e.verify){var c=Te(t,e.verify);return new yn(c,n)}return m()}function Re(t,e){return{documents:[Ae(t,e.path)]}}function xe(t,e){var n={structuredQuery:{}},r=e.path;null!==e.collectionGroup?(n.parent=Ae(t,r),n.structuredQuery.from=[{collectionId:e.collectionGroup,allDescendants:!0}]):(n.parent=Ae(t,r.h()),n.structuredQuery.from=[{collectionId:r._()}]);var i=function(t){if(0!==t.length){var e=t.map(function(t){return function(t){if("=="===t.op){if(he(t.value))return{unaryFilter:{field:Me(t.field),op:"IS_NAN"}};if(ce(t.value))return{unaryFilter:{field:Me(t.field),op:"IS_NULL"}}}else if("!="===t.op){if(he(t.value))return{unaryFilter:{field:Me(t.field),op:"IS_NOT_NAN"}};if(ce(t.value))return{unaryFilter:{field:Me(t.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:Me(t.field),op:function(t){return pe[t]}(t.op),value:t.value}}}(t)});return 1===e.length?e[0]:{compositeFilter:{op:"AND",filters:e}}}}(e.filters);i&amp;&amp;(n.structuredQuery.where=i);var o=function(t){if(0!==t.length)return t.map(function(t){return function(t){return{field:Me(t.field),direction:function(t){return le[t]}(t.dir)}}(t)})}(e.orderBy);o&amp;&amp;(n.structuredQuery.orderBy=o);var a=function(t,e){return t.Qe||ut(e)?e:{value:e}}(t,e.limit);return null!==a&amp;&amp;(n.structuredQuery.limit=a),e.startAt&amp;&amp;(n.structuredQuery.startAt=Le(e.startAt)),e.endAt&amp;&amp;(n.structuredQuery.endAt=Le(e.endAt)),n}function Ce(t){var e=Se(t.parent),n=t.structuredQuery,r=n.from?n.from.length:0,i=null;if(r&gt;0){b(1===r);var o=n.from[0];o.allDescendants?i=o.collectionId:e=e.child(o.collectionId)}var a=[];n.where&amp;&amp;(a=function t(e){return e?void 0!==e.unaryFilter?[function(t){switch(t.unaryFilter.op){case"IS_NAN":var e=Ve(t.unaryFilter.field);return Bn.create(e,"==",{doubleValue:NaN});case"IS_NULL":var n=Ve(t.unaryFilter.field);return Bn.create(n,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":var r=Ve(t.unaryFilter.field);return Bn.create(r,"!=",{doubleValue:NaN});case"IS_NOT_NULL":var i=Ve(t.unaryFilter.field);return Bn.create(i,"!=",{nullValue:"NULL_VALUE"});case"OPERATOR_UNSPECIFIED":default:return m()}}(e)]:void 0!==e.fieldFilter?[function(t){return Bn.create(Ve(t.fieldFilter.field),function(t){switch(t){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return"&gt;";case"GREATER_THAN_OR_EQUAL":return"&gt;=";case"LESS_THAN":return"&lt;";case"LESS_THAN_OR_EQUAL":return"&lt;=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";case"OPERATOR_UNSPECIFIED":default:return m()}}(t.fieldFilter.op),t.fieldFilter.value)}(e)]:void 0!==e.compositeFilter?e.compositeFilter.filters.map(function(e){return t(e)}).reduce(function(t,e){return t.concat(e)}):m():[]}(n.where));var s=[];n.orderBy&amp;&amp;(s=n.orderBy.map(function(t){return function(t){return new er(Ve(t.field),function(t){switch(t){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(t.direction))}(t)}));var u=null;n.limit&amp;&amp;(u=function(t){var e;return ut(e="object"==typeof t?t.value:t)?null:e}(n.limit));var c=null;n.startAt&amp;&amp;(c=je(n.startAt));var h=null;return n.endAt&amp;&amp;(h=je(n.endAt)),xn(An(e,i,s,a,u,"F",c,h))}function Le(t){return{before:t.before,values:t.position}}function je(t){var e=!!t.before,n=t.values||[];return new Qn(n,e)}function Me(t){return{fieldPath:t.R()}}function Ve(t){return N.S(t.fieldPath)}function Ue(t){return t.length&gt;=4&amp;&amp;"projects"===t.get(0)&amp;&amp;"databases"===t.get(2)}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var Fe=function(){this.He=void 0};function qe(t,e,n){return t instanceof ze?function(t,e){var n={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:t.seconds,nanos:t.nanoseconds}}}};return e&amp;&amp;(n.fields.__previous_value__=e),{mapValue:n}}(n,e):t instanceof Ke?He(t,e):t instanceof We?Xe(t,e):function(t,e){var n=Ge(t,e),r=Ye(n)+Ye(t.je);return se(n)&amp;&amp;se(t.je)?ve(r):ye(t.serializer,r)}(t,e)}function Be(t,e,n){return t instanceof Ke?He(t,e):t instanceof We?Xe(t,e):n}function Ge(t,e){return t instanceof Je?se(n=e)||n&amp;&amp;"doubleValue"in n?e:{integerValue:0}:null;var n}var ze=function(t){function e(){return null!==t&amp;&amp;t.apply(this,arguments)||this}return r.__extends(e,t),e}(Fe),Ke=function(t){function e(e){var n;return(n=t.call(this)||this).elements=e,n}return r.__extends(e,t),e}(Fe);function He(t,e){for(var n=Qe(e),r=function(t){n.some(function(e){return $t(e,t)})||n.push(t)},i=0,o=t.elements;i&lt;o.length;i++)r(o[i]);return{arrayValue:{values:n}}}var We=function(t){function e(e){var n;return(n=t.call(this)||this).elements=e,n}return r.__extends(e,t),e}(Fe);function Xe(t,e){for(var n=Qe(e),r=function(t){n=n.filter(function(e){return!$t(e,t)})},i=0,o=t.elements;i&lt;o.length;i++)r(o[i]);return{arrayValue:{values:n}}}var Je=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).serializer=e,r.je=n,r}return r.__extends(e,t),e}(Fe);function Ye(t){return ie(t.integerValue||t.doubleValue)}function Qe(t){return ue(t)&amp;&amp;t.arrayValue.values?t.arrayValue.values.slice():[]}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var $e=function(){function t(t){this.fields=t,t.sort(N.i)}return t.prototype.Ye=function(t){for(var e=0,n=this.fields;e&lt;n.length;e++)if(n[e].T(t))return!0;return!1},t.prototype.isEqual=function(t){return Q(this.fields,t.fields,function(t,e){return t.isEqual(e)})},t}(),Ze=function(t,e){this.field=t,this.transform=e},tn=function(){function t(t,e){this.updateTime=t,this.exists=e}return t.ze=function(){return new t},t.exists=function(e){return new t(void 0,e)},t.updateTime=function(e){return new t(e)},Object.defineProperty(t.prototype,"Ke",{get:function(){return void 0===this.updateTime&amp;&amp;void 0===this.exists},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(t){return this.exists===t.exists&amp;&amp;(this.updateTime?!!t.updateTime&amp;&amp;this.updateTime.isEqual(t.updateTime):!t.updateTime)},t}();function en(t,e){return void 0!==t.updateTime?e instanceof _n&amp;&amp;e.version.isEqual(t.updateTime):void 0===t.exists||t.exists===e instanceof _n}var nn=function(){};function rn(t,e,n){return t instanceof cn?function(t,e,n){return new _n(t.key,n.version,t.value,{hasCommittedMutations:!0})}(t,0,n):t instanceof hn?function(t,e,n){if(!en(t.Ge,e))return new En(t.key,n.version);var r=fn(t,e);return new _n(t.key,n.version,r,{hasCommittedMutations:!0})}(t,e,n):t instanceof ln?function(t,e,n){if(b(null!=n.transformResults),!en(t.Ge,e))return new En(t.key,n.version);var r=pn(t,e),i=function(t,e,n){var r=[];b(t.length===n.length);for(var i=0;i&lt;n.length;i++){var o=t[i],a=o.transform,s=null;e instanceof _n&amp;&amp;(s=e.field(o.field)),r.push(Be(a,s,n[i]))}return r}(t.fieldTransforms,e,n.transformResults),o=n.version,a=dn(t,r.data(),i);return new _n(t.key,o,a,{hasCommittedMutations:!0})}(t,e,n):function(t,e,n){return new In(t.key,n.version,{hasCommittedMutations:!0})}(t,0,n)}function on(t,e,n,r){return t instanceof cn?function(t,e){if(!en(t.Ge,e))return e;var n=un(e);return new _n(t.key,n,t.value,{Je:!0})}(t,e):t instanceof hn?function(t,e){if(!en(t.Ge,e))return e;var n=un(e),r=fn(t,e);return new _n(t.key,n,r,{Je:!0})}(t,e):t instanceof ln?function(t,e,n,r){if(!en(t.Ge,e))return e;var i=pn(t,e),o=function(t,e,n,r){for(var i=[],o=0,a=t;o&lt;a.length;o++){var s=a[o],u=s.transform,c=null;n instanceof _n&amp;&amp;(c=n.field(s.field)),null===c&amp;&amp;r instanceof _n&amp;&amp;(c=r.field(s.field)),i.push(qe(u,c,e))}return i}(t.fieldTransforms,n,e,r),a=dn(t,i.data(),o);return new _n(t.key,i.version,a,{Je:!0})}(t,e,r,n):function(t,e){return en(t.Ge,e)?new In(t.key,st.min()):e}(t,e)}function an(t,e){return t instanceof ln?function(t,e){for(var n=null,r=0,i=t.fieldTransforms;r&lt;i.length;r++){var o=i[r],a=e instanceof _n?e.field(o.field):void 0,s=Ge(o.transform,a||null);null!=s&amp;&amp;(n=null==n?(new mn).set(o.field,s):n.set(o.field,s))}return n?n.Xe():null}(t,e):null}function sn(t,e){return t.type===e.type&amp;&amp;!!t.key.isEqual(e.key)&amp;&amp;!!t.Ge.isEqual(e.Ge)&amp;&amp;(0===t.type?t.value.isEqual(e.value):1===t.type?t.data.isEqual(e.data)&amp;&amp;t.We.isEqual(e.We):2!==t.type||Q(t.fieldTransforms,t.fieldTransforms,function(t,e){return function(t,e){return t.field.isEqual(e.field)&amp;&amp;function(t,e){return t instanceof Ke&amp;&amp;e instanceof Ke||t instanceof We&amp;&amp;e instanceof We?Q(t.elements,e.elements,$t):t instanceof Je&amp;&amp;e instanceof Je?$t(t.je,e.je):t instanceof ze&amp;&amp;e instanceof ze}(t.transform,e.transform)}(t,e)}))}function un(t){return t instanceof _n?t.version:st.min()}var cn=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).key=e,i.value=n,i.Ge=r,i.type=0,i}return r.__extends(e,t),e}(nn),hn=function(t){function e(e,n,r,i){var o=this;return(o=t.call(this)||this).key=e,o.data=n,o.We=r,o.Ge=i,o.type=1,o}return r.__extends(e,t),e}(nn);function fn(t,e){return function(t,e){var n=new mn(e);return t.We.fields.forEach(function(e){if(!e.m()){var r=t.data.field(e);null!==r?n.set(e,r):n.delete(e)}}),n.Xe()}(t,e instanceof _n?e.data():gn.empty())}var ln=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).key=e,r.fieldTransforms=n,r.type=2,r.Ge=tn.exists(!0),r}return r.__extends(e,t),e}(nn);function pn(t,e){return e}function dn(t,e,n){for(var r=new mn(e),i=0;i&lt;t.fieldTransforms.length;i++){var o=t.fieldTransforms[i];r.set(o.field,n[i])}return r.Xe()}var vn=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).key=e,r.Ge=n,r.type=3,r}return r.__extends(e,t),e}(nn),yn=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).key=e,r.Ge=n,r.type=4,r}return r.__extends(e,t),e}(nn),gn=function(){function t(t){this.proto=t}return t.empty=function(){return new t({mapValue:{}})},t.prototype.field=function(t){if(t.m())return this.proto;for(var e=this.proto,n=0;n&lt;t.length-1;++n){if(!e.mapValue.fields)return null;if(!fe(e=e.mapValue.fields[t.get(n)]))return null}return(e=(e.mapValue.fields||{})[t._()])||null},t.prototype.isEqual=function(t){return $t(this.proto,t.proto)},t}(),mn=function(){function t(t){void 0===t&amp;&amp;(t=gn.empty()),this.Ze=t,this.tn=new Map}return t.prototype.set=function(t,e){return this.en(t,e),this},t.prototype.delete=function(t){return this.en(t,null),this},t.prototype.en=function(t,e){for(var n=this.tn,r=0;r&lt;t.length-1;++r){var i=t.get(r),o=n.get(i);o instanceof Map?n=o:o&amp;&amp;10===Qt(o)?(o=new Map(Object.entries(o.mapValue.fields||{})),n.set(i,o),n=o):(o=new Map,n.set(i,o),n=o)}n.set(t._(),e)},t.prototype.Xe=function(){var t=this.nn(N.P(),this.tn);return null!=t?new gn(t):this.Ze},t.prototype.nn=function(t,e){var n=this,r=!1,i=this.Ze.field(t),o=fe(i)?Object.assign({},i.mapValue.fields):{};return e.forEach(function(e,i){if(e instanceof Map){var a=n.nn(t.child(i),e);null!=a&amp;&amp;(o[i]=a,r=!0)}else null!==e?(o[i]=e,r=!0):o.hasOwnProperty(i)&amp;&amp;(delete o[i],r=!0)}),r?{mapValue:{fields:o}}:null},t}();function bn(t){var e=[];return I(t.fields||{},function(t,n){var r=new N([t]);if(fe(n)){var i=bn(n.mapValue).fields;if(0===i.length)e.push(r);else for(var o=0,a=i;o&lt;a.length;o++){var s=a[o];e.push(r.child(s))}}else e.push(r)}),new $e(e)
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */}var wn=function(t,e){this.key=t,this.version=e},_n=function(t){function e(e,n,r,i){var o=this;return(o=t.call(this,e,n)||this).sn=r,o.Je=!!i.Je,o.hasCommittedMutations=!!i.hasCommittedMutations,o}return r.__extends(e,t),e.prototype.field=function(t){return this.sn.field(t)},e.prototype.data=function(){return this.sn},e.prototype.rn=function(){return this.sn.proto},e.prototype.isEqual=function(t){return t instanceof e&amp;&amp;this.key.isEqual(t.key)&amp;&amp;this.version.isEqual(t.version)&amp;&amp;this.Je===t.Je&amp;&amp;this.hasCommittedMutations===t.hasCommittedMutations&amp;&amp;this.sn.isEqual(t.sn)},e.prototype.toString=function(){return"Document("+this.key+", "+this.version+", "+this.sn.toString()+", {hasLocalMutations: "+this.Je+"}), {hasCommittedMutations: "+this.hasCommittedMutations+"})"},Object.defineProperty(e.prototype,"hasPendingWrites",{get:function(){return this.Je||this.hasCommittedMutations},enumerable:!1,configurable:!0}),e}(wn),In=function(t){function e(e,n,r){var i;return(i=t.call(this,e,n)||this).hasCommittedMutations=!(!r||!r.hasCommittedMutations),i}return r.__extends(e,t),e.prototype.toString=function(){return"NoDocument("+this.key+", "+this.version+")"},Object.defineProperty(e.prototype,"hasPendingWrites",{get:function(){return this.hasCommittedMutations},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(t){return t instanceof e&amp;&amp;t.hasCommittedMutations===this.hasCommittedMutations&amp;&amp;t.version.isEqual(this.version)&amp;&amp;t.key.isEqual(this.key)},e}(wn),En=function(t){function e(){return null!==t&amp;&amp;t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.toString=function(){return"UnknownDocument("+this.key+", "+this.version+")"},Object.defineProperty(e.prototype,"hasPendingWrites",{get:function(){return!0},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(t){return t instanceof e&amp;&amp;t.version.isEqual(this.version)&amp;&amp;t.key.isEqual(this.key)},e}(wn),Tn=function(t,e,n,r,i,o,a,s){void 0===e&amp;&amp;(e=null),void 0===n&amp;&amp;(n=[]),void 0===r&amp;&amp;(r=[]),void 0===i&amp;&amp;(i=null),void 0===o&amp;&amp;(o="F"),void 0===a&amp;&amp;(a=null),void 0===s&amp;&amp;(s=null),this.path=t,this.collectionGroup=e,this.on=n,this.filters=r,this.limit=i,this.an=o,this.startAt=a,this.endAt=s,this.cn=null,this.un=null,this.startAt,this.endAt};function An(t,e,n,r,i,o,a,s){return new Tn(t,e,n,r,i,o,a,s)}function Sn(t){return new Tn(t)}function Nn(t){return!ut(t.limit)&amp;&amp;"F"===t.an}function On(t){return!ut(t.limit)&amp;&amp;"L"===t.an}function kn(t){return t.on.length&gt;0?t.on[0].field:null}function Dn(t){for(var e=0,n=t.filters;e&lt;n.length;e++){var r=n[e];if(r.hn())return r.field}return null}function Pn(t){return null!==t.collectionGroup}function Rn(t){var e=w(t);if(null===e.cn){e.cn=[];var n=Dn(e),r=kn(e);if(null!==n&amp;&amp;null===r)n.p()||e.cn.push(new er(n)),e.cn.push(new er(N.v(),"asc"));else{for(var i=!1,o=0,a=e.on;o&lt;a.length;o++){var s=a[o];e.cn.push(s),s.field.p()&amp;&amp;(i=!0)}if(!i){var u=e.on.length&gt;0?e.on[e.on.length-1].dir:"asc";e.cn.push(new er(N.v(),u))}}}return e.cn}function xn(t){var e=w(t);if(!e.un)if("F"===e.an)e.un=lt(e.path,e.collectionGroup,Rn(e),e.filters,e.limit,e.startAt,e.endAt);else{for(var n=[],r=0,i=Rn(e);r&lt;i.length;r++){var o=i[r],a="desc"===o.dir?"asc":"desc";n.push(new er(o.field,a))}var s=e.endAt?new Qn(e.endAt.position,!e.endAt.before):null,u=e.startAt?new Qn(e.startAt.position,!e.startAt.before):null;e.un=lt(e.path,e.collectionGroup,n,e.filters,e.limit,s,u)}return e.un}function Cn(t,e,n){return new Tn(t.path,t.collectionGroup,t.on.slice(),t.filters.slice(),e,n,t.startAt,t.endAt)}function Ln(t,e){return new Tn(t.path,t.collectionGroup,t.on.slice(),t.filters.slice(),t.limit,t.an,e,t.endAt)}function jn(t,e){return new Tn(t.path,t.collectionGroup,t.on.slice(),t.filters.slice(),t.limit,t.an,t.startAt,e)}function Mn(t,e){return dt(xn(t),xn(e))&amp;&amp;t.an===e.an}function Vn(t){return pt(xn(t))+"|lt:"+t.an}function Un(t){return"Query(target="+function(t){var e=t.path.R();return null!==t.collectionGroup&amp;&amp;(e+=" collectionGroup="+t.collectionGroup),t.filters.length&gt;0&amp;&amp;(e+=", filters: ["+t.filters.map(function(t){return(e=t).field.R()+" "+e.op+" "+ne(e.value);var e}).join(", ")+"]"),ut(t.limit)||(e+=", limit: "+t.limit),t.orderBy.length&gt;0&amp;&amp;(e+=", orderBy: ["+t.orderBy.map(function(t){return(e=t).field.R()+" ("+e.dir+")";var e}).join(", ")+"]"),t.startAt&amp;&amp;(e+=", startAt: "+$n(t.startAt)),t.endAt&amp;&amp;(e+=", endAt: "+$n(t.endAt)),"Target("+e+")"}(xn(t))+"; limitType="+t.an+")"}function Fn(t,e){return function(t,e){var n=e.key.path;return null!==t.collectionGroup?e.key.N(t.collectionGroup)&amp;&amp;t.path.T(n):O.F(t.path)?t.path.isEqual(n):t.path.I(n)}(t,e)&amp;&amp;function(t,e){for(var n=0,r=t.on;n&lt;r.length;n++){var i=r[n];if(!i.field.p()&amp;&amp;null===e.field(i.field))return!1}return!0}(t,e)&amp;&amp;function(t,e){for(var n=0,r=t.filters;n&lt;r.length;n++)if(!r[n].matches(e))return!1;return!0}(t,e)&amp;&amp;function(t,e){return!(t.startAt&amp;&amp;!Zn(t.startAt,Rn(t),e)||t.endAt&amp;&amp;Zn(t.endAt,Rn(t),e))}(t,e)}function qn(t){return function(e,n){for(var r=!1,i=0,o=Rn(t);i&lt;o.length;i++){var a=o[i],s=nr(a,e,n);if(0!==s)return s;r=r||a.field.p()}return 0}}var Bn=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).field=e,i.op=n,i.value=r,i}return r.__extends(e,t),e.create=function(t,n,r){if(t.p())return"in"===n||"not-in"===n?this.ln(t,n,r):new Gn(t,n,r);if(ce(r)){if("=="!==n&amp;&amp;"!="!==n)throw new f(h.INVALID_ARGUMENT,"Invalid query. Null only supports '==' and '!=' comparisons.");return new e(t,n,r)}if(he(r)){if("=="!==n&amp;&amp;"!="!==n)throw new f(h.INVALID_ARGUMENT,"Invalid query. NaN only supports '==' and '!=' comparisons.");return new e(t,n,r)}return"array-contains"===n?new Wn(t,r):"in"===n?new Xn(t,r):"not-in"===n?new Jn(t,r):"array-contains-any"===n?new Yn(t,r):new e(t,n,r)},e.ln=function(t,e,n){return"in"===e?new zn(t,n):new Kn(t,n)},e.prototype.matches=function(t){var e=t.field(this.field);return"!="===this.op?null!==e&amp;&amp;this._n(te(e,this.value)):null!==e&amp;&amp;Qt(this.value)===Qt(e)&amp;&amp;this._n(te(e,this.value))},e.prototype._n=function(t){switch(this.op){case"&lt;":return t&lt;0;case"&lt;=":return t&lt;=0;case"==":return 0===t;case"!=":return 0!==t;case"&gt;":return t&gt;0;case"&gt;=":return t&gt;=0;default:return m()}},e.prototype.hn=function(){return["&lt;","&lt;=","&gt;","&gt;=","!=","not-in"].indexOf(this.op)&gt;=0},e}(function(){}),Gn=function(t){function e(e,n,r){var i;return(i=t.call(this,e,n,r)||this).key=O.C(r.referenceValue),i}return r.__extends(e,t),e.prototype.matches=function(t){var e=O.i(t.key,this.key);return this._n(e)},e}(Bn),zn=function(t){function e(e,n){var r;return(r=t.call(this,e,"in",n)||this).keys=Hn("in",n),r}return r.__extends(e,t),e.prototype.matches=function(t){return this.keys.some(function(e){return e.isEqual(t.key)})},e}(Bn),Kn=function(t){function e(e,n){var r;return(r=t.call(this,e,"not-in",n)||this).keys=Hn("not-in",n),r}return r.__extends(e,t),e.prototype.matches=function(t){return!this.keys.some(function(e){return e.isEqual(t.key)})},e}(Bn);function Hn(t,e){var n;return((null===(n=e.arrayValue)||void 0===n?void 0:n.values)||[]).map(function(t){return O.C(t.referenceValue)})}var Wn=function(t){function e(e,n){return t.call(this,e,"array-contains",n)||this}return r.__extends(e,t),e.prototype.matches=function(t){var e=t.field(this.field);return ue(e)&amp;&amp;Zt(e.arrayValue,this.value)},e}(Bn),Xn=function(t){function e(e,n){return t.call(this,e,"in",n)||this}return r.__extends(e,t),e.prototype.matches=function(t){var e=t.field(this.field);return null!==e&amp;&amp;Zt(this.value.arrayValue,e)},e}(Bn),Jn=function(t){function e(e,n){return t.call(this,e,"not-in",n)||this}return r.__extends(e,t),e.prototype.matches=function(t){if(Zt(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;var e=t.field(this.field);return null!==e&amp;&amp;!Zt(this.value.arrayValue,e)},e}(Bn),Yn=function(t){function e(e,n){return t.call(this,e,"array-contains-any",n)||this}return r.__extends(e,t),e.prototype.matches=function(t){var e=this,n=t.field(this.field);return!(!ue(n)||!n.arrayValue.values)&amp;&amp;n.arrayValue.values.some(function(t){return Zt(e.value.arrayValue,t)})},e}(Bn),Qn=function(t,e){this.position=t,this.before=e};function $n(t){return(t.before?"b":"a")+":"+t.position.map(function(t){return ne(t)}).join(",")}function Zn(t,e,n){for(var r=0,i=0;i&lt;t.position.length;i++){var o=e[i],a=t.position[i];if(r=o.field.p()?O.i(O.C(a.referenceValue),n.key):te(a,n.field(o.field)),"desc"===o.dir&amp;&amp;(r*=-1),0!==r)break}return t.before?r&lt;=0:r&lt;0}function tr(t,e){if(null===t)return null===e;if(null===e)return!1;if(t.before!==e.before||t.position.length!==e.position.length)return!1;for(var n=0;n&lt;t.position.length;n++)if(!$t(t.position[n],e.position[n]))return!1;return!0}var er=function(t,e){void 0===e&amp;&amp;(e="asc"),this.field=t,this.dir=e};function nr(t,e,n){var r=t.field.p()?O.i(e.key,n.key):function(t,e,n){var r=e.field(t),i=n.field(t);return null!==r&amp;&amp;null!==i?te(r,i):m()}(t.field,e,n);switch(t.dir){case"asc":return r;case"desc":return-1*r;default:return m()}}function rr(t,e){return t.dir===e.dir&amp;&amp;t.field.isEqual(e.field)}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var ir=function(){var t=this;this.promise=new Promise(function(e,n){t.resolve=e,t.reject=n})},or=function(){function t(t,e,n,r,i){void 0===n&amp;&amp;(n=1e3),void 0===r&amp;&amp;(r=1.5),void 0===i&amp;&amp;(i=6e4),this.fn=t,this.dn=e,this.wn=n,this.mn=r,this.Tn=i,this.En=0,this.In=null,this.An=Date.now(),this.reset()}return t.prototype.reset=function(){this.En=0},t.prototype.Rn=function(){this.En=this.Tn},t.prototype.gn=function(t){var e=this;this.cancel();var n=Math.floor(this.En+this.Pn()),r=Math.max(0,Date.now()-this.An),i=Math.max(0,n-r);i&gt;0&amp;&amp;d("ExponentialBackoff","Backing off for "+i+" ms (base delay: "+this.En+" ms, delay with jitter: "+n+" ms, last attempt: "+r+" ms ago)"),this.In=this.fn.yn(this.dn,i,function(){return e.An=Date.now(),t()}),this.En*=this.mn,this.En&lt;this.wn&amp;&amp;(this.En=this.wn),this.En&gt;this.Tn&amp;&amp;(this.En=this.Tn)},t.prototype.Vn=function(){null!==this.In&amp;&amp;(this.In.pn(),this.In=null)},t.prototype.cancel=function(){null!==this.In&amp;&amp;(this.In.cancel(),this.In=null)},t.prototype.Pn=function(){return(Math.random()-.5)*this.En},t}(),ar=function(){function t(t){var e=this;this.bn=null,this.vn=null,this.result=void 0,this.error=void 0,this.Sn=!1,this.Dn=!1,t(function(t){e.Sn=!0,e.result=t,e.bn&amp;&amp;e.bn(t)},function(t){e.Sn=!0,e.error=t,e.vn&amp;&amp;e.vn(t)})}return t.prototype.catch=function(t){return this.next(void 0,t)},t.prototype.next=function(e,n){var r=this;return this.Dn&amp;&amp;m(),this.Dn=!0,this.Sn?this.error?this.Cn(n,this.error):this.Nn(e,this.result):new t(function(t,i){r.bn=function(n){r.Nn(e,n).next(t,i)},r.vn=function(e){r.Cn(n,e).next(t,i)}})},t.prototype.Fn=function(){var t=this;return new Promise(function(e,n){t.next(e,n)})},t.prototype.xn=function(e){try{var n=e();return n instanceof t?n:t.resolve(n)}catch(e){return t.reject(e)}},t.prototype.Nn=function(e,n){return e?this.xn(function(){return e(n)}):t.resolve(n)},t.prototype.Cn=function(e,n){return e?this.xn(function(){return e(n)}):t.reject(n)},t.resolve=function(e){return new t(function(t,n){t(e)})},t.reject=function(e){return new t(function(t,n){n(e)})},t.$n=function(e){return new t(function(t,n){var r=0,i=0,o=!1;e.forEach(function(e){++r,e.next(function(){++i,o&amp;&amp;i===r&amp;&amp;t()},function(t){return n(t)})}),o=!0,i===r&amp;&amp;t()})},t.kn=function(e){for(var n=t.resolve(!1),r=function(e){n=n.next(function(n){return n?t.resolve(n):e()})},i=0,o=e;i&lt;o.length;i++)r(o[i]);return n},t.forEach=function(t,e){var n=this,r=[];return t.forEach(function(t,i){r.push(e.call(n,t,i))}),this.$n(r)},t}(),sr=function(){function e(t,n,r){this.name=t,this.version=n,this.Mn=r,12.2===e.On(a.getUA())&amp;&amp;v("Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.")}return e.delete=function(t){return d("SimpleDb","Removing database:",t),pr(window.indexedDB.deleteDatabase(t)).Fn()},e.Ln=function(){if("undefined"==typeof indexedDB)return!1;if(e.Bn())return!0;var t=a.getUA(),n=e.On(t),r=0&lt;n&amp;&amp;n&lt;10,i=e.qn(t),o=0&lt;i&amp;&amp;i&lt;4.5;return!(t.indexOf("MSIE ")&gt;0||t.indexOf("Trident/")&gt;0||t.indexOf("Edge/")&gt;0||r||o)},e.Bn=function(){var e;return void 0!==t&amp;&amp;"YES"===(null===(e=Object({NODE_ENV:"production"}))||void 0===e?void 0:e.Un)},e.Qn=function(t,e){return t.store(e)},e.On=function(t){var e=t.match(/i(?:phone|pad|pod) os ([\d_]+)/i),n=e?e[1].split("_").slice(0,2).join("."):"-1";return Number(n)},e.qn=function(t){var e=t.match(/Android ([\d.]+)/i),n=e?e[1].split(".").slice(0,2).join("."):"-1";return Number(n)},e.prototype.Wn=function(t){return r.__awaiter(this,void 0,void 0,function(){var e,n=this;return r.__generator(this,function(r){switch(r.label){case 0:return this.db?[3,2]:(d("SimpleDb","Opening database:",this.name),e=this,[4,new Promise(function(e,r){var i=indexedDB.open(n.name,n.version);i.onsuccess=function(t){var n=t.target.result;e(n)},i.onblocked=function(){r(new cr(t,"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},i.onerror=function(e){var n=e.target.error;"VersionError"===n.name?r(new f(h.FAILED_PRECONDITION,"A newer version of the Firestore SDK was previously used and so the persisted data is not compatible with the version of the SDK you are now using. The SDK will operate with persistence disabled. If you need persistence, please re-upgrade to a newer version of the SDK or else clear the persisted IndexedDB data for your app to start fresh.")):r(new cr(t,n))},i.onupgradeneeded=function(t){d("SimpleDb",'Database "'+n.name+'" requires upgrade from version:',t.oldVersion);var e=t.target.result;n.Mn.createOrUpgrade(e,i.transaction,t.oldVersion,n.version).next(function(){d("SimpleDb","Database upgrade to version "+n.version+" complete")})}})]);case 1:e.db=r.sent(),r.label=2;case 2:return[2,(this.jn&amp;&amp;(this.db.onversionchange=function(t){return n.jn(t)}),this.db)]}})})},e.prototype.Kn=function(t){this.jn=t,this.db&amp;&amp;(this.db.onversionchange=function(e){return t(e)})},e.prototype.runTransaction=function(t,e,n,i){return r.__awaiter(this,void 0,void 0,function(){var o,a,s,u,c;return r.__generator(this,function(h){switch(h.label){case 0:o="readonly"===e,a=0,s=function(){var e,s,c,h,f;return r.__generator(this,function(r){switch(r.label){case 0:++a,r.label=1;case 1:return r.trys.push([1,4,,5]),[4,u.Wn(t)];case 2:return u.db=r.sent(),e=fr.open(u.db,t,o?"readonly":"readwrite",n),s=i(e).catch(function(t){return e.abort(t),ar.reject(t)}).Fn(),c={},s.catch(function(){}),[4,e.Gn];case 3:return[2,(c.value=(r.sent(),s),c)];case 4:return h=r.sent(),f="FirebaseError"!==h.name&amp;&amp;a&lt;3,d("SimpleDb","Transaction failed with error:",h.message,"Retrying:",f),u.close(),f?[3,5]:[2,{value:Promise.reject(h)}];case 5:return[2]}})},u=this,h.label=1;case 1:return[5,s()];case 2:if("object"==typeof(c=h.sent()))return[2,c.value];h.label=3;case 3:return[3,1];case 4:return[2]}})})},e.prototype.close=function(){this.db&amp;&amp;this.db.close(),this.db=void 0},e}(),ur=function(){function t(t){this.zn=t,this.Hn=!1,this.Yn=null}return Object.defineProperty(t.prototype,"Sn",{get:function(){return this.Hn},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Jn",{get:function(){return this.Yn},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cursor",{set:function(t){this.zn=t},enumerable:!1,configurable:!0}),t.prototype.done=function(){this.Hn=!0},t.prototype.Xn=function(t){this.Yn=t},t.prototype.delete=function(){return pr(this.zn.delete())},t}(),cr=function(t){function e(e,n){var r;return(r=t.call(this,h.UNAVAILABLE,"IndexedDB transaction '"+e+"' failed: "+n)||this).name="IndexedDbTransactionError",r}return r.__extends(e,t),e}(f);
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function hr(t){return"IndexedDbTransactionError"===t.name}var fr=function(){function t(t,e){var n=this;this.action=t,this.transaction=e,this.aborted=!1,this.Zn=new ir,this.transaction.oncomplete=function(){n.Zn.resolve()},this.transaction.onabort=function(){e.error?n.Zn.reject(new cr(t,e.error)):n.Zn.resolve()},this.transaction.onerror=function(e){var r=vr(e.target.error);n.Zn.reject(new cr(t,r))}}return t.open=function(e,n,r,i){try{return new t(n,e.transaction(i,r))}catch(e){throw new cr(n,e)}},Object.defineProperty(t.prototype,"Gn",{get:function(){return this.Zn.promise},enumerable:!1,configurable:!0}),t.prototype.abort=function(t){t&amp;&amp;this.Zn.reject(t),this.aborted||(d("SimpleDb","Aborting transaction:",t?t.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())},t.prototype.store=function(t){var e=this.transaction.objectStore(t);return new lr(e)},t}(),lr=function(){function t(t){this.store=t}return t.prototype.put=function(t,e){var n;return void 0!==e?(d("SimpleDb","PUT",this.store.name,t,e),n=this.store.put(e,t)):(d("SimpleDb","PUT",this.store.name,"&lt;auto-key&gt;",t),n=this.store.put(t)),pr(n)},t.prototype.add=function(t){return d("SimpleDb","ADD",this.store.name,t,t),pr(this.store.add(t))},t.prototype.get=function(t){var e=this;return pr(this.store.get(t)).next(function(n){return void 0===n&amp;&amp;(n=null),d("SimpleDb","GET",e.store.name,t,n),n})},t.prototype.delete=function(t){return d("SimpleDb","DELETE",this.store.name,t),pr(this.store.delete(t))},t.prototype.count=function(){return d("SimpleDb","COUNT",this.store.name),pr(this.store.count())},t.prototype.ts=function(t,e){var n=this.cursor(this.options(t,e)),r=[];return this.es(n,function(t,e){r.push(e)}).next(function(){return r})},t.prototype.ns=function(t,e){d("SimpleDb","DELETE ALL",this.store.name);var n=this.options(t,e);n.ss=!1;var r=this.cursor(n);return this.es(r,function(t,e,n){return n.delete()})},t.prototype.rs=function(t,e){var n;e?n=t:(n={},e=t);var r=this.cursor(n);return this.es(r,e)},t.prototype.os=function(t){var e=this.cursor({});return new ar(function(n,r){e.onerror=function(t){var e=vr(t.target.error);r(e)},e.onsuccess=function(e){var r=e.target.result;r?t(r.primaryKey,r.value).next(function(t){t?r.continue():n()}):n()}})},t.prototype.es=function(t,e){var n=[];return new ar(function(r,i){t.onerror=function(t){i(t.target.error)},t.onsuccess=function(t){var i=t.target.result;if(i){var o=new ur(i),a=e(i.primaryKey,i.value,o);if(a instanceof ar){var s=a.catch(function(t){return o.done(),ar.reject(t)});n.push(s)}o.Sn?r():null===o.Jn?i.continue():i.continue(o.Jn)}else r()}}).next(function(){return ar.$n(n)})},t.prototype.options=function(t,e){var n=void 0;return void 0!==t&amp;&amp;("string"==typeof t?n=t:e=t),{index:n,range:e}},t.prototype.cursor=function(t){var e="next";if(t.reverse&amp;&amp;(e="prev"),t.index){var n=this.store.index(t.index);return t.ss?n.openKeyCursor(t.range,e):n.openCursor(t.range,e)}return this.store.openCursor(t.range,e)},t}();function pr(t){return new ar(function(e,n){t.onsuccess=function(t){var n=t.target.result;e(n)},t.onerror=function(t){var e=vr(t.target.error);n(e)}})}var dr=!1;function vr(t){var e=sr.On(a.getUA());if(e&gt;=12.2&amp;&amp;e&lt;13){var n="An internal error was encountered in the Indexed Database server";if(t.message.indexOf(n)&gt;=0){var r=new f("internal","IOS_INDEXEDDB_BUG1: IndexedDb has thrown '"+n+"'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.");return dr||(dr=!0,setTimeout(function(){throw r},0)),r}}return t}
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function yr(){return"undefined"!=typeof window?window:null}function gr(){return"undefined"!=typeof document?document:null}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var mr=function(){function t(t,e,n,r,i){this.cs=t,this.dn=e,this.us=n,this.op=r,this.hs=i,this.ls=new ir,this.then=this.ls.promise.then.bind(this.ls.promise),this.ls.promise.catch(function(t){})}return t._s=function(e,n,r,i,o){var a=new t(e,n,Date.now()+r,i,o);return a.start(r),a},t.prototype.start=function(t){var e=this;this.fs=setTimeout(function(){return e.ds()},t)},t.prototype.pn=function(){return this.ds()},t.prototype.cancel=function(t){null!==this.fs&amp;&amp;(this.clearTimeout(),this.ls.reject(new f(h.CANCELLED,"Operation cancelled"+(t?": "+t:""))))},t.prototype.ds=function(){var t=this;this.cs.ws(function(){return null!==t.fs?(t.clearTimeout(),t.op().then(function(e){return t.ls.resolve(e)})):Promise.resolve()})},t.prototype.clearTimeout=function(){null!==this.fs&amp;&amp;(this.hs(this),clearTimeout(this.fs),this.fs=null)},t}(),br=function(){function t(){var t=this;this.Ts=Promise.resolve(),this.Es=[],this.Is=!1,this.As=[],this.Rs=null,this.gs=!1,this.Ps=[],this.ys=new or(this,"async_queue_retry"),this.Vs=function(){var e=gr();e&amp;&amp;d("AsyncQueue","Visibility state changed to  ",e.visibilityState),t.ys.Vn()};var e=gr();e&amp;&amp;"function"==typeof e.addEventListener&amp;&amp;e.addEventListener("visibilitychange",this.Vs)}return Object.defineProperty(t.prototype,"ps",{get:function(){return this.Is},enumerable:!1,configurable:!0}),t.prototype.ws=function(t){this.enqueue(t)},t.prototype.bs=function(t){this.vs(),this.Ss(t)},t.prototype.Ds=function(){if(!this.Is){this.Is=!0;var t=gr();t&amp;&amp;"function"==typeof t.removeEventListener&amp;&amp;t.removeEventListener("visibilitychange",this.Vs)}},t.prototype.enqueue=function(t){return this.vs(),this.Is?new Promise(function(t){}):this.Ss(t)},t.prototype.Cs=function(t){var e=this;this.ws(function(){return e.Es.push(t),e.Ns()})},t.prototype.Ns=function(){return r.__awaiter(this,void 0,void 0,function(){var t,e=this;return r.__generator(this,function(n){switch(n.label){case 0:if(0===this.Es.length)return[3,5];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.Es[0]()];case 2:return n.sent(),this.Es.shift(),this.ys.reset(),[3,4];case 3:if(!hr(t=n.sent()))throw t;return d("AsyncQueue","Operation failed with retryable error: "+t),[3,4];case 4:this.Es.length&gt;0&amp;&amp;this.ys.gn(function(){return e.Ns()}),n.label=5;case 5:return[2]}})})},t.prototype.Ss=function(t){var e=this,n=this.Ts.then(function(){return e.gs=!0,t().catch(function(t){throw e.Rs=t,e.gs=!1,v("INTERNAL UNHANDLED ERROR: ",function(t){var e=t.message||"";return t.stack&amp;&amp;(e=t.stack.includes(t.message)?t.stack:t.message+"\n"+t.stack),e}(t)),t}).then(function(t){return e.gs=!1,t})});return this.Ts=n,n},t.prototype.yn=function(t,e,n){var r=this;this.vs(),this.Ps.indexOf(t)&gt;-1&amp;&amp;(e=0);var i=mr._s(this,t,e,n,function(t){return r.Fs(t)});return this.As.push(i),i},t.prototype.vs=function(){this.Rs&amp;&amp;m()},t.prototype.xs=function(){},t.prototype.$s=function(){return r.__awaiter(this,void 0,void 0,function(){var t;return r.__generator(this,function(e){switch(e.label){case 0:return[4,t=this.Ts];case 1:e.sent(),e.label=2;case 2:if(t!==this.Ts)return[3,0];e.label=3;case 3:return[2]}})})},t.prototype.ks=function(t){for(var e=0,n=this.As;e&lt;n.length;e++)if(n[e].dn===t)return!0;return!1},t.prototype.Ms=function(t){var e=this;return this.$s().then(function(){e.As.sort(function(t,e){return t.us-e.us});for(var n=0,r=e.As;n&lt;r.length;n++){var i=r[n];if(i.pn(),"all"!==t&amp;&amp;i.dn===t)break}return e.$s()})},t.prototype.Os=function(t){this.Ps.push(t)},t.prototype.Fs=function(t){var e=this.As.indexOf(t);this.As.splice(e,1)},t}();function wr(t,e){if(v("AsyncQueue",e+": "+t),hr(t))return new f(h.UNAVAILABLE,e+": "+t);throw t}var _r=function(){this.Ls=void 0,this.listeners=[]};function Ir(t,e){return r.__awaiter(this,void 0,void 0,function(){var n,i,o,a,s,u,c;return r.__generator(this,function(r){switch(r.label){case 0:if(n=w(t),i=e.query,o=!1,(a=n.Bs.get(i))||(o=!0,a=new _r),!o)return[3,4];r.label=1;case 1:return r.trys.push([1,3,,4]),s=a,[4,n.Us(i)];case 2:return s.Ls=r.sent(),[3,4];case 3:return u=r.sent(),c=wr(u,"Initialization of query '"+Un(e.query)+"' failed"),[2,void e.onError(c)];case 4:return n.Bs.set(i,a),a.listeners.push(e),e.Qs(n.onlineState),a.Ls&amp;&amp;e.Ws(a.Ls)&amp;&amp;Tr(n),[2]}})})}function Er(t,e){return r.__awaiter(this,void 0,void 0,function(){var n,i,o,a,s;return r.__generator(this,function(r){return n=w(t),i=e.query,o=!1,(a=n.Bs.get(i))&amp;&amp;(s=a.listeners.indexOf(e))&gt;=0&amp;&amp;(a.listeners.splice(s,1),o=0===a.listeners.length),o?[2,(n.Bs.delete(i),n.js(i))]:[2]})})}function Tr(t){t.qs.forEach(function(t){t.next()})}var Ar=function(){function t(t,e,n){this.query=t,this.Ks=e,this.Gs=!1,this.zs=null,this.onlineState="Unknown",this.options=n||{}}return t.prototype.Ws=function(t){if(!this.options.includeMetadataChanges){for(var e=[],n=0,r=t.docChanges;n&lt;r.length;n++){var i=r[n];3!==i.type&amp;&amp;e.push(i)}t=new Vt(t.query,t.docs,t.Qt,e,t.Wt,t.fromCache,t.jt,!0)}var o=!1;return this.Gs?this.Hs(t)&amp;&amp;(this.Ks.next(t),o=!0):this.Ys(t,this.onlineState)&amp;&amp;(this.Js(t),o=!0),this.zs=t,o},t.prototype.onError=function(t){this.Ks.error(t)},t.prototype.Qs=function(t){this.onlineState=t;var e=!1;return this.zs&amp;&amp;!this.Gs&amp;&amp;this.Ys(this.zs,t)&amp;&amp;(this.Js(this.zs),e=!0),e},t.prototype.Ys=function(t,e){if(!t.fromCache)return!0;var n="Offline"!==e;return!(this.options.Xs&amp;&amp;n||t.docs.m()&amp;&amp;"Offline"!==e)},t.prototype.Hs=function(t){if(t.docChanges.length&gt;0)return!0;var e=this.zs&amp;&amp;this.zs.hasPendingWrites!==t.hasPendingWrites;return!(!t.jt&amp;&amp;!e)&amp;&amp;!0===this.options.includeMetadataChanges},t.prototype.Js=function(t){t=Vt.Gt(t.query,t.docs,t.Wt,t.fromCache),this.Gs=!0,this.Ks.next(t)},t}(),Sr=function(){function t(t){this.uid=t}return t.prototype.Zs=function(){return null!=this.uid},t.prototype.ti=function(){return this.Zs()?"uid:"+this.uid:"anonymous-user"},t.prototype.isEqual=function(t){return t.uid===this.uid},t}();
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */Sr.UNAUTHENTICATED=new Sr(null),Sr.ei=new Sr("google-credentials-uid"),Sr.ni=new Sr("first-party-uid");
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
var Nr=function(){function t(t,e){var n=this;this.previousValue=t,e&amp;&amp;(e.si=function(t){return n.ii(t)},this.ri=function(t){return e.oi(t)})}return t.prototype.ii=function(t){return this.previousValue=Math.max(t,this.previousValue),this.previousValue},t.prototype.next=function(){var t=++this.previousValue;return this.ri&amp;&amp;this.ri(t),t},t}();function Or(t,e){return"firestore_clients_"+t+"_"+e}function kr(t,e,n){var r="firestore_mutations_"+t+"_"+n;return e.Zs()&amp;&amp;(r+="_"+e.uid),r}function Dr(t,e){return"firestore_targets_"+t+"_"+e}Nr.ai=-1;var Pr=function(){function t(t,e,n,r){this.user=t,this.batchId=e,this.state=n,this.error=r}return t.ci=function(e,n,r){var i=JSON.parse(r),o="object"==typeof i&amp;&amp;-1!==["pending","acknowledged","rejected"].indexOf(i.state)&amp;&amp;(void 0===i.error||"object"==typeof i.error),a=void 0;return o&amp;&amp;i.error&amp;&amp;(o="string"==typeof i.error.message&amp;&amp;"string"==typeof i.error.code)&amp;&amp;(a=new f(i.error.code,i.error.message)),o?new t(e,n,i.state,a):(v("SharedClientState","Failed to parse mutation state for ID '"+n+"': "+r),null)},t.prototype.ui=function(){var t={state:this.state,updateTimeMs:Date.now()};return this.error&amp;&amp;(t.error={code:this.error.code,message:this.error.message}),JSON.stringify(t)},t}(),Rr=function(){function t(t,e,n){this.targetId=t,this.state=e,this.error=n}return t.ci=function(e,n){var r=JSON.parse(n),i="object"==typeof r&amp;&amp;-1!==["not-current","current","rejected"].indexOf(r.state)&amp;&amp;(void 0===r.error||"object"==typeof r.error),o=void 0;return i&amp;&amp;r.error&amp;&amp;(i="string"==typeof r.error.message&amp;&amp;"string"==typeof r.error.code)&amp;&amp;(o=new f(r.error.code,r.error.message)),i?new t(e,r.state,o):(v("SharedClientState","Failed to parse target state for ID '"+e+"': "+n),null)},t.prototype.ui=function(){var t={state:this.state,updateTimeMs:Date.now()};return this.error&amp;&amp;(t.error={code:this.error.code,message:this.error.message}),JSON.stringify(t)},t}(),xr=function(){function t(t,e){this.clientId=t,this.activeTargetIds=e}return t.ci=function(e,n){for(var r=JSON.parse(n),i="object"==typeof r&amp;&amp;r.activeTargetIds instanceof Array,o=Lt(),a=0;i&amp;&amp;a&lt;r.activeTargetIds.length;++a)i=ht(r.activeTargetIds[a]),o=o.add(r.activeTargetIds[a]);return i?new t(e,o):(v("SharedClientState","Failed to parse client data for instance '"+e+"': "+n),null)},t}(),Cr=function(){function t(t,e){this.clientId=t,this.onlineState=e}return t.ci=function(e){var n=JSON.parse(e);return"object"==typeof n&amp;&amp;-1!==["Unknown","Online","Offline"].indexOf(n.onlineState)&amp;&amp;"string"==typeof n.clientId?new t(n.clientId,n.onlineState):(v("SharedClientState","Failed to parse online state: "+e),null)},t}(),Lr=function(){function t(){this.activeTargetIds=Lt()}return t.prototype.hi=function(t){this.activeTargetIds=this.activeTargetIds.add(t)},t.prototype.li=function(t){this.activeTargetIds=this.activeTargetIds.delete(t)},t.prototype.ui=function(){var t={activeTargetIds:this.activeTargetIds.A(),updateTimeMs:Date.now()};return JSON.stringify(t)},t}(),jr=function(){function t(t,e,n,r,i){this.window=t,this.fn=e,this.persistenceKey=n,this._i=r,this.fi=null,this.di=null,this.si=null,this.wi=this.mi.bind(this),this.Ti=new _t(Y),this.Ei=!1,this.Ii=[];var o=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&amp;");this.storage=this.window.localStorage,this.currentUser=i,this.Ai=Or(this.persistenceKey,this._i),this.Ri=function(t){return"firestore_sequence_number_"+t}(this.persistenceKey),this.Ti=this.Ti.ot(this._i,new Lr),this.gi=new RegExp("^firestore_clients_"+o+"_([^_]*)$"),this.Pi=new RegExp("^firestore_mutations_"+o+"_(\\d+)(?:_(.*))?$"),this.yi=new RegExp("^firestore_targets_"+o+"_(\\d+)$"),this.Vi=function(t){return"firestore_online_state_"+t}(this.persistenceKey),this.window.addEventListener("storage",this.wi)}return t.Ln=function(t){return!(!t||!t.localStorage)},t.prototype.start=function(){return r.__awaiter(this,void 0,void 0,function(){var t,e,n,i,o,a,s,u,c,h,f,l=this;return r.__generator(this,function(r){switch(r.label){case 0:return[4,this.fi.pi()];case 1:for(t=r.sent(),e=0,n=t;e&lt;n.length;e++)(i=n[e])!==this._i&amp;&amp;(o=this.getItem(Or(this.persistenceKey,i)))&amp;&amp;(a=xr.ci(i,o))&amp;&amp;(this.Ti=this.Ti.ot(a.clientId,a));for(this.bi(),(s=this.storage.getItem(this.Vi))&amp;&amp;(u=this.vi(s))&amp;&amp;this.Si(u),c=0,h=this.Ii;c&lt;h.length;c++)f=h[c],this.mi(f);return this.Ii=[],this.window.addEventListener("unload",function(){return l.Di()}),this.Ei=!0,[2]}})})},t.prototype.oi=function(t){this.setItem(this.Ri,JSON.stringify(t))},t.prototype.Ci=function(){return this.Ni(this.Ti)},t.prototype.Fi=function(t){var e=!1;return this.Ti.forEach(function(n,r){r.activeTargetIds.has(t)&amp;&amp;(e=!0)}),e},t.prototype.xi=function(t){this.$i(t,"pending")},t.prototype.ki=function(t,e,n){this.$i(t,e,n),this.Mi(t)},t.prototype.Oi=function(t){var e="not-current";if(this.Fi(t)){var n=this.storage.getItem(Dr(this.persistenceKey,t));if(n){var r=Rr.ci(t,n);r&amp;&amp;(e=r.state)}}return this.Li.hi(t),this.bi(),e},t.prototype.Bi=function(t){this.Li.li(t),this.bi()},t.prototype.qi=function(t){return this.Li.activeTargetIds.has(t)},t.prototype.Ui=function(t){this.removeItem(Dr(this.persistenceKey,t))},t.prototype.Qi=function(t,e,n){this.Wi(t,e,n)},t.prototype.ji=function(t,e,n){var r=this;e.forEach(function(t){r.Mi(t)}),this.currentUser=t,n.forEach(function(t){r.xi(t)})},t.prototype.Ki=function(t){this.Gi(t)},t.prototype.Di=function(){this.Ei&amp;&amp;(this.window.removeEventListener("storage",this.wi),this.removeItem(this.Ai),this.Ei=!1)},t.prototype.getItem=function(t){var e=this.storage.getItem(t);return d("SharedClientState","READ",t,e),e},t.prototype.setItem=function(t,e){d("SharedClientState","SET",t,e),this.storage.setItem(t,e)},t.prototype.removeItem=function(t){d("SharedClientState","REMOVE",t),this.storage.removeItem(t)},t.prototype.mi=function(t){var e=this,n=t;if(n.storageArea===this.storage){if(d("SharedClientState","EVENT",n.key,n.newValue),n.key===this.Ai)return void v("Received WebStorage notification for local change. Another client might have garbage-collected our state");this.fn.Cs(function(){return r.__awaiter(e,void 0,void 0,function(){var t,e,i,o,a,s;return r.__generator(this,function(r){if(this.Ei){if(null!==n.key)if(this.gi.test(n.key)){if(null==n.newValue)return t=this.zi(n.key),[2,this.Hi(t,null)];if(e=this.Yi(n.key,n.newValue))return[2,this.Hi(e.clientId,e)]}else if(this.Pi.test(n.key)){if(null!==n.newValue&amp;&amp;(i=this.Ji(n.key,n.newValue)))return[2,this.Xi(i)]}else if(this.yi.test(n.key)){if(null!==n.newValue&amp;&amp;(o=this.Zi(n.key,n.newValue)))return[2,this.tr(o)]}else if(n.key===this.Vi){if(null!==n.newValue&amp;&amp;(a=this.vi(n.newValue)))return[2,this.Si(a)]}else n.key===this.Ri&amp;&amp;(s=function(t){var e=Nr.ai;if(null!=t)try{var n=JSON.parse(t);b("number"==typeof n),e=n}catch(t){v("SharedClientState","Failed to read sequence number from WebStorage",t)}return e}(n.newValue))!==Nr.ai&amp;&amp;this.si(s)}else this.Ii.push(n);return[2]})})})}},Object.defineProperty(t.prototype,"Li",{get:function(){return this.Ti.get(this._i)},enumerable:!1,configurable:!0}),t.prototype.bi=function(){this.setItem(this.Ai,this.Li.ui())},t.prototype.$i=function(t,e,n){var r=new Pr(this.currentUser,t,e,n),i=kr(this.persistenceKey,this.currentUser,t);this.setItem(i,r.ui())},t.prototype.Mi=function(t){var e=kr(this.persistenceKey,this.currentUser,t);this.removeItem(e)},t.prototype.Gi=function(t){var e={clientId:this._i,onlineState:t};this.storage.setItem(this.Vi,JSON.stringify(e))},t.prototype.Wi=function(t,e,n){var r=Dr(this.persistenceKey,t),i=new Rr(t,e,n);this.setItem(r,i.ui())},t.prototype.zi=function(t){var e=this.gi.exec(t);return e?e[1]:null},t.prototype.Yi=function(t,e){var n=this.zi(t);return xr.ci(n,e)},t.prototype.Ji=function(t,e){var n=this.Pi.exec(t),r=Number(n[1]),i=void 0!==n[2]?n[2]:null;return Pr.ci(new Sr(i),r,e)},t.prototype.Zi=function(t,e){var n=this.yi.exec(t),r=Number(n[1]);return Rr.ci(r,e)},t.prototype.vi=function(t){return Cr.ci(t)},t.prototype.Xi=function(t){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(e){return t.user.uid===this.currentUser.uid?[2,this.fi.er(t.batchId,t.state,t.error)]:(d("SharedClientState","Ignoring mutation for non-active user "+t.user.uid),[2])})})},t.prototype.tr=function(t){return this.fi.nr(t.targetId,t.state,t.error)},t.prototype.Hi=function(t,e){var n=this,r=e?this.Ti.ot(t,e):this.Ti.remove(t),i=this.Ni(this.Ti),o=this.Ni(r),a=[],s=[];return o.forEach(function(t){i.has(t)||a.push(t)}),i.forEach(function(t){o.has(t)||s.push(t)}),this.fi.sr(a,s).then(function(){n.Ti=r})},t.prototype.Si=function(t){this.Ti.get(t.clientId)&amp;&amp;this.di(t.onlineState)},t.prototype.Ni=function(t){var e=Lt();return t.forEach(function(t,n){e=e.kt(n.activeTargetIds)}),e},t}(),Mr=function(){function t(){this.ir=new Lr,this.rr={},this.di=null,this.si=null}return t.prototype.xi=function(t){},t.prototype.ki=function(t,e,n){},t.prototype.Oi=function(t){return this.ir.hi(t),this.rr[t]||"not-current"},t.prototype.Qi=function(t,e,n){this.rr[t]=e},t.prototype.Bi=function(t){this.ir.li(t)},t.prototype.qi=function(t){return this.ir.activeTargetIds.has(t)},t.prototype.Ui=function(t){delete this.rr[t]},t.prototype.Ci=function(){return this.ir.activeTargetIds},t.prototype.Fi=function(t){return this.ir.activeTargetIds.has(t)},t.prototype.start=function(){return this.ir=new Lr,Promise.resolve()},t.prototype.ji=function(t,e,n){},t.prototype.Ki=function(t){},t.prototype.Di=function(){},t.prototype.oi=function(t){},t}(),Vr=function(){function t(t,e,n,r){this.batchId=t,this.ar=e,this.baseMutations=n,this.mutations=r}return t.prototype.cr=function(t,e,n){for(var r=n.ur,i=0;i&lt;this.mutations.length;i++){var o=this.mutations[i];o.key.isEqual(t)&amp;&amp;(e=rn(o,e,r[i]))}return e},t.prototype.hr=function(t,e){for(var n=0,r=this.baseMutations;n&lt;r.length;n++){var i=r[n];i.key.isEqual(t)&amp;&amp;(e=on(i,e,e,this.ar))}for(var o=e,a=0,s=this.mutations;a&lt;s.length;a++){var u=s[a];u.key.isEqual(t)&amp;&amp;(e=on(u,e,o,this.ar))}return e},t.prototype.lr=function(t){var e=this,n=t;return this.mutations.forEach(function(r){var i=e.hr(r.key,t.get(r.key));i&amp;&amp;(n=n.ot(r.key,i))}),n},t.prototype.keys=function(){return this.mutations.reduce(function(t,e){return t.add(e.key)},xt())},t.prototype.isEqual=function(t){return this.batchId===t.batchId&amp;&amp;Q(this.mutations,t.mutations,function(t,e){return sn(t,e)})&amp;&amp;Q(this.baseMutations,t.baseMutations,function(t,e){return sn(t,e)})},t}(),Ur=function(){function t(t,e,n,r){this.batch=t,this._r=e,this.ur=n,this.dr=r}return t.from=function(e,n,r){b(e.mutations.length===r.length);for(var i=Pt,o=e.mutations,a=0;a&lt;o.length;a++)i=i.ot(o[a].key,r[a].version);return new t(e,n,r,i)},t}(),Fr=function(){function t(){this.wr=new ot(function(t){return t.toString()},function(t,e){return t.isEqual(e)}),this.mr=!1}return Object.defineProperty(t.prototype,"readTime",{get:function(){return this.Tr},set:function(t){this.Tr=t},enumerable:!1,configurable:!0}),t.prototype.Er=function(t,e){this.Ir(),this.readTime=e,this.wr.set(t.key,t)},t.prototype.Ar=function(t,e){this.Ir(),e&amp;&amp;(this.readTime=e),this.wr.set(t,null)},t.prototype.Rr=function(t,e){this.Ir();var n=this.wr.get(e);return void 0!==n?ar.resolve(n):this.gr(t,e)},t.prototype.getEntries=function(t,e){return this.Pr(t,e)},t.prototype.apply=function(t){return this.Ir(),this.mr=!0,this.yr(t)},t.prototype.Ir=function(){},t}(),qr="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.",Br=function(){function t(){this.Vr=[]}return t.prototype.pr=function(t){this.Vr.push(t)},t.prototype.br=function(){this.Vr.forEach(function(t){return t()})},t}(),Gr=function(){function t(t,e,n){this.vr=t,this.Sr=e,this.Dr=n}return t.prototype.Cr=function(t,e){var n=this;return this.Sr.Nr(t,e).next(function(r){return n.Fr(t,e,r)})},t.prototype.Fr=function(t,e,n){return this.vr.Rr(t,e).next(function(t){for(var r=0,i=n;r&lt;i.length;r++)t=i[r].hr(e,t);return t})},t.prototype.$r=function(t,e,n){var r=Ot();return e.forEach(function(t,e){for(var i=0,o=n;i&lt;o.length;i++)e=o[i].hr(t,e);r=r.ot(t,e)}),r},t.prototype.kr=function(t,e){var n=this;return this.vr.getEntries(t,e).next(function(e){return n.Mr(t,e)})},t.prototype.Mr=function(t,e){var n=this;return this.Sr.Or(t,e).next(function(r){var i=n.$r(t,e,r),o=Nt();return i.forEach(function(t,e){e||(e=new In(t,st.min())),o=o.ot(t,e)}),o})},t.prototype.Lr=function(t,e,n){return function(t){return O.F(t.path)&amp;&amp;null===t.collectionGroup&amp;&amp;0===t.filters.length}(e)?this.Br(t,e.path):Pn(e)?this.qr(t,e,n):this.Ur(t,e,n)},t.prototype.Br=function(t,e){return this.Cr(t,new O(e)).next(function(t){var e=Dt();return t instanceof _n&amp;&amp;(e=e.ot(t.key,t)),e})},t.prototype.qr=function(t,e,n){var r=this,i=e.collectionGroup,o=Dt();return this.Dr.Qr(t,i).next(function(a){return ar.forEach(a,function(a){var s=function(t,e){return new Tn(e,null,t.on.slice(),t.filters.slice(),t.limit,t.an,t.startAt,t.endAt)}(e,a.child(i));return r.Ur(t,s,n).next(function(t){t.forEach(function(t,e){o=o.ot(t,e)})})}).next(function(){return o})})},t.prototype.Ur=function(t,e,n){var r,i,o=this;return this.vr.Lr(t,e,n).next(function(n){return r=n,o.Sr.Wr(t,e)}).next(function(e){return i=e,o.jr(t,i,r).next(function(t){r=t;for(var e=0,n=i;e&lt;n.length;e++)for(var o=n[e],a=0,s=o.mutations;a&lt;s.length;a++){var u=s[a],c=u.key,h=r.get(c),f=on(u,h,h,o.ar);r=f instanceof _n?r.ot(c,f):r.remove(c)}})}).next(function(){return r.forEach(function(t,n){Fn(e,n)||(r=r.remove(t))}),r})},t.prototype.jr=function(t,e,n){for(var r=xt(),i=0,o=e;i&lt;o.length;i++)for(var a=0,s=o[i].mutations;a&lt;s.length;a++){var u=s[a];u instanceof hn&amp;&amp;null===n.get(u.key)&amp;&amp;(r=r.add(u.key))}var c=n;return this.vr.getEntries(t,r).next(function(t){return t.forEach(function(t,e){null!==e&amp;&amp;e instanceof _n&amp;&amp;(c=c.ot(t,e))}),c})},t}(),zr=function(){function t(t,e,n,r){this.targetId=t,this.fromCache=e,this.Kr=n,this.Gr=r}return t.zr=function(e,n){for(var r=xt(),i=xt(),o=0,a=n.docChanges;o&lt;a.length;o++){var s=a[o];switch(s.type){case 0:r=r.add(s.doc.key);break;case 1:i=i.add(s.doc.key)}}return new t(e,n.fromCache,r,i)},t}();
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function Kr(t,e){var n=t[0],r=t[1],i=e[0],o=e[1],a=Y(n,i);return 0===a?Y(r,o):a}var Hr=function(){function t(t){this.Hr=t,this.buffer=new Tt(Kr),this.Yr=0}return t.prototype.Jr=function(){return++this.Yr},t.prototype.Xr=function(t){var e=[t,this.Jr()];if(this.buffer.size&lt;this.Hr)this.buffer=this.buffer.add(e);else{var n=this.buffer.last();Kr(e,n)&lt;0&amp;&amp;(this.buffer=this.buffer.delete(n).add(e))}},Object.defineProperty(t.prototype,"maxValue",{get:function(){return this.buffer.last()[0]},enumerable:!1,configurable:!0}),t}(),Wr={Zr:!1,eo:0,no:0,so:0},Xr=function(){function t(t,e,n){this.io=t,this.ro=e,this.oo=n}return t.ao=function(e){return new t(e,t.co,t.uo)},t}();Xr.ho=-1,Xr.lo=1048576,Xr._o=41943040,Xr.co=10,Xr.uo=1e3,Xr.fo=new Xr(Xr._o,Xr.co,Xr.uo),Xr.do=new Xr(Xr.ho,0,0);var Jr=function(){function t(t,e){this.wo=t,this.cs=e,this.mo=!1,this.To=null}return t.prototype.start=function(t){this.wo.params.io!==Xr.ho&amp;&amp;this.Eo(t)},t.prototype.stop=function(){this.To&amp;&amp;(this.To.cancel(),this.To=null)},Object.defineProperty(t.prototype,"Ei",{get:function(){return null!==this.To},enumerable:!1,configurable:!0}),t.prototype.Eo=function(t){var e=this,n=this.mo?3e5:6e4;d("LruGarbageCollector","Garbage collection scheduled in "+n+"ms"),this.To=this.cs.yn("lru_garbage_collection",n,function(){return r.__awaiter(e,void 0,void 0,function(){var e;return r.__generator(this,function(n){switch(n.label){case 0:this.To=null,this.mo=!0,n.label=1;case 1:return n.trys.push([1,3,,7]),[4,t.Io(this.wo)];case 2:return n.sent(),[3,7];case 3:return hr(e=n.sent())?(d("LruGarbageCollector","Ignoring IndexedDB error during garbage collection: ",e),[3,6]):[3,4];case 4:return[4,ho(e)];case 5:n.sent(),n.label=6;case 6:return[3,7];case 7:return[4,this.Eo(t)];case 8:return n.sent(),[2]}})})})},t}(),Yr=function(){function t(t,e){this.Ao=t,this.params=e}return t.prototype.Ro=function(t,e){return this.Ao.Po(t).next(function(t){return Math.floor(e/100*t)})},t.prototype.yo=function(t,e){var n=this;if(0===e)return ar.resolve(Nr.ai);var r=new Hr(e);return this.Ao.Ce(t,function(t){return r.Xr(t.sequenceNumber)}).next(function(){return n.Ao.Vo(t,function(t){return r.Xr(t)})}).next(function(){return r.maxValue})},t.prototype.po=function(t,e,n){return this.Ao.po(t,e,n)},t.prototype.bo=function(t,e){return this.Ao.bo(t,e)},t.prototype.vo=function(t,e){var n=this;return this.params.io===Xr.ho?(d("LruGarbageCollector","Garbage collection skipped; disabled"),ar.resolve(Wr)):this.So(t).next(function(r){return r&lt;n.params.io?(d("LruGarbageCollector","Garbage collection skipped; Cache size "+r+" is lower than threshold "+n.params.io),Wr):n.Do(t,e)})},t.prototype.So=function(t){return this.Ao.So(t)},t.prototype.Do=function(t,e){var n,r,i,a,s,u,c,h=this,f=Date.now();return this.Ro(t,this.params.ro).next(function(e){return e&gt;h.params.oo?(d("LruGarbageCollector","Capping sequence numbers to collect down to the maximum of "+h.params.oo+" from "+e),r=h.params.oo):r=e,a=Date.now(),h.yo(t,r)}).next(function(r){return n=r,s=Date.now(),h.po(t,n,e)}).next(function(e){return i=e,u=Date.now(),h.bo(t,n)}).next(function(t){return c=Date.now(),p()&lt;=o.LogLevel.DEBUG&amp;&amp;d("LruGarbageCollector","LRU Garbage Collection\n\tCounted targets in "+(a-f)+"ms\n\tDetermined least recently used "+r+" in "+(s-a)+"ms\n\tRemoved "+i+" targets in "+(u-s)+"ms\n\tRemoved "+t+" documents in "+(c-u)+"ms\nTotal Duration: "+(c-f)+"ms"),ar.resolve({Zr:!0,eo:r,no:i,so:t})})},t}();
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function Qr(t){for(var e="",n=0;n&lt;t.length;n++)e.length&gt;0&amp;&amp;(e=Zr(e)),e=$r(t.get(n),e);return Zr(e)}function $r(t,e){for(var n=e,r=t.length,i=0;i&lt;r;i++){var o=t.charAt(i);switch(o){case"\0":n+="";break;case"":n+="";break;default:n+=o}}return n}function Zr(t){return t+""}function ti(t){var e=t.length;if(b(e&gt;=2),2===e)return b(""===t.charAt(0)&amp;&amp;""===t.charAt(1)),A.P();for(var n=e-2,r=[],i="",o=0;o&lt;e;){var a=t.indexOf("",o);switch((a&lt;0||a&gt;n)&amp;&amp;m(),t.charAt(a+1)){case"":var s=t.substring(o,a),u=void 0;0===i.length?u=s:(u=i+=s,i=""),r.push(u);break;case"":i+=t.substring(o,a),i+="\0";break;case"":i+=t.substring(o,a+1);break;default:m()}o=a+2}return new A(r)}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var ei=function(t){this.Co=t};function ni(t,e){if(e.document)return function(t,e,n){var r=Te(t,e.name),i=we(e.updateTime),o=new gn({mapValue:{fields:e.fields}});return new _n(r,i,o,{hasCommittedMutations:!!n})}(t.Co,e.document,!!e.hasCommittedMutations);if(e.noDocument){var n=O.$(e.noDocument.path),r=si(e.noDocument.readTime);return new In(n,r,{hasCommittedMutations:!!e.hasCommittedMutations})}if(e.unknownDocument){var i=O.$(e.unknownDocument.path),o=si(e.unknownDocument.version);return new En(i,o)}return m()}function ri(t,e,n){var r=ii(n),i=e.key.path.h().A();if(e instanceof _n){var o=function(t,e){return{name:Ee(t,e.key),fields:e.rn().mapValue.fields,updateTime:me(t,e.version.Z())}}(t.Co,e),a=e.hasCommittedMutations;return new xi(null,null,o,a,r,i)}if(e instanceof In){var s=e.key.path.A(),u=ai(e.version),c=e.hasCommittedMutations;return new xi(null,new Pi(s,u),null,c,r,i)}if(e instanceof En){var h=e.key.path.A(),f=ai(e.version);return new xi(new Ri(h,f),null,null,!0,r,i)}return m()}function ii(t){var e=t.Z();return[e.seconds,e.nanoseconds]}function oi(t){var e=new at(t[0],t[1]);return st.J(e)}function ai(t){var e=t.Z();return new Si(e.seconds,e.nanoseconds)}function si(t){var e=new at(t.seconds,t.nanoseconds);return st.J(e)}function ui(t,e){var n=(e.baseMutations||[]).map(function(e){return Pe(t.Co,e)}),r=e.mutations.map(function(e){return Pe(t.Co,e)}),i=at.fromMillis(e.localWriteTimeMs);return new Vr(e.batchId,i,n,r)}function ci(t){var e,n,r=si(t.readTime),i=void 0!==t.lastLimboFreeSnapshotVersion?si(t.lastLimboFreeSnapshotVersion):st.min();return void 0!==t.query.documents?(b(1===(n=t.query).documents.length),e=xn(Sn(Se(n.documents[0])))):e=Ce(t.query),new mt(e,t.targetId,0,t.lastListenSequenceNumber,r,i,Z.fromBase64String(t.resumeToken))}function hi(t,e){var n,r=ai(e.nt),i=ai(e.lastLimboFreeSnapshotVersion);n=vt(e.target)?Re(t.Co,e.target):xe(t.Co,e.target);var o=e.resumeToken.toBase64();return new Li(e.targetId,pt(e.target),r,o,e.sequenceNumber,i,n)}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var fi=function(){function t(t,e,n,r){this.userId=t,this.serializer=e,this.Dr=n,this.No=r,this.Fo={}}return t.xo=function(e,n,r,i){return b(""!==e.uid),new t(e.Zs()?e.uid:"",n,r,i)},t.prototype.$o=function(t){var e=!0,n=IDBKeyRange.bound([this.userId,Number.NEGATIVE_INFINITY],[this.userId,Number.POSITIVE_INFINITY]);return di(t).rs({index:ki.userMutationsIndex,range:n},function(t,n,r){e=!1,r.done()}).next(function(){return e})},t.prototype.ko=function(t,e,n,r){var i=this,o=vi(t),a=di(t);return a.add({}).next(function(s){b("number"==typeof s);for(var u=new Vr(s,e,n,r),c=function(t,e,n){var r=n.baseMutations.map(function(e){return De(t.Co,e)}),i=n.mutations.map(function(e){return De(t.Co,e)});return new ki(e,n.batchId,n.ar.toMillis(),r,i)}(i.serializer,i.userId,u),h=[],f=new Tt(function(t,e){return Y(t.R(),e.R())}),l=0,p=r;l&lt;p.length;l++){var d=p[l],v=Di.key(i.userId,d.key.path,s);f=f.add(d.key.path.h()),h.push(a.put(c)),h.push(o.put(v,Di.PLACEHOLDER))}return f.forEach(function(e){h.push(i.Dr.Mo(t,e))}),t.pr(function(){i.Fo[s]=u.keys()}),ar.$n(h).next(function(){return u})})},t.prototype.Oo=function(t,e){var n=this;return di(t).get(e).next(function(t){return t?(b(t.userId===n.userId),ui(n.serializer,t)):null})},t.prototype.Lo=function(t,e){var n=this;return this.Fo[e]?ar.resolve(this.Fo[e]):this.Oo(t,e).next(function(t){if(t){var r=t.keys();return n.Fo[e]=r,r}return null})},t.prototype.Bo=function(t,e){var n=this,r=e+1,i=IDBKeyRange.lowerBound([this.userId,r]),o=null;return di(t).rs({index:ki.userMutationsIndex,range:i},function(t,e,i){e.userId===n.userId&amp;&amp;(b(e.batchId&gt;=r),o=ui(n.serializer,e)),i.done()}).next(function(){return o})},t.prototype.qo=function(t){var e=IDBKeyRange.upperBound([this.userId,Number.POSITIVE_INFINITY]),n=-1;return di(t).rs({index:ki.userMutationsIndex,range:e,reverse:!0},function(t,e,r){n=e.batchId,r.done()}).next(function(){return n})},t.prototype.Uo=function(t){var e=this,n=IDBKeyRange.bound([this.userId,-1],[this.userId,Number.POSITIVE_INFINITY]);return di(t).ts(ki.userMutationsIndex,n).next(function(t){return t.map(function(t){return ui(e.serializer,t)})})},t.prototype.Nr=function(t,e){var n=this,r=Di.prefixForPath(this.userId,e.path),i=IDBKeyRange.lowerBound(r),o=[];return vi(t).rs({range:i},function(r,i,a){var s=r[0],u=r[1],c=r[2],h=ti(u);if(s===n.userId&amp;&amp;e.path.isEqual(h))return di(t).get(c).next(function(t){if(!t)throw m();b(t.userId===n.userId),o.push(ui(n.serializer,t))});a.done()}).next(function(){return o})},t.prototype.Or=function(t,e){var n=this,r=new Tt(Y),i=[];return e.forEach(function(e){var o=Di.prefixForPath(n.userId,e.path),a=IDBKeyRange.lowerBound(o),s=vi(t).rs({range:a},function(t,i,o){var a=t[0],s=t[1],u=t[2],c=ti(s);a===n.userId&amp;&amp;e.path.isEqual(c)?r=r.add(u):o.done()});i.push(s)}),ar.$n(i).next(function(){return n.Qo(t,r)})},t.prototype.Wr=function(t,e){var n=this,r=e.path,i=r.length+1,o=Di.prefixForPath(this.userId,r),a=IDBKeyRange.lowerBound(o),s=new Tt(Y);return vi(t).rs({range:a},function(t,e,o){var a=t[0],u=t[1],c=t[2],h=ti(u);a===n.userId&amp;&amp;r.T(h)?h.length===i&amp;&amp;(s=s.add(c)):o.done()}).next(function(){return n.Qo(t,s)})},t.prototype.Qo=function(t,e){var n=this,r=[],i=[];return e.forEach(function(e){i.push(di(t).get(e).next(function(t){if(null===t)throw m();b(t.userId===n.userId),r.push(ui(n.serializer,t))}))}),ar.$n(i).next(function(){return r})},t.prototype.Wo=function(t,e){var n=this;return pi(t.jo,this.userId,e).next(function(r){return t.pr(function(){n.Ko(e.batchId)}),ar.forEach(r,function(e){return n.No.Go(t,e)})})},t.prototype.Ko=function(t){delete this.Fo[t]},t.prototype.zo=function(t){var e=this;return this.$o(t).next(function(n){if(!n)return ar.resolve();var r=IDBKeyRange.lowerBound(Di.prefixForUser(e.userId)),i=[];return vi(t).rs({range:r},function(t,n,r){if(t[0]===e.userId){var o=ti(t[1]);i.push(o)}else r.done()}).next(function(){b(0===i.length)})})},t.prototype.Ho=function(t,e){return li(t,this.userId,e)},t.prototype.Yo=function(t){var e=this;return yi(t).get(this.userId).next(function(t){return t||new Oi(e.userId,-1,"")})},t}();function li(t,e,n){var r=Di.prefixForPath(e,n.path),i=r[1],o=IDBKeyRange.lowerBound(r),a=!1;return vi(t).rs({range:o,ss:!0},function(t,n,r){var o=t[0],s=t[1];t[2],o===e&amp;&amp;s===i&amp;&amp;(a=!0),r.done()}).next(function(){return a})}function pi(t,e,n){var r=t.store(ki.store),i=t.store(Di.store),o=[],a=IDBKeyRange.only(n.batchId),s=0,u=r.rs({range:a},function(t,e,n){return s++,n.delete()});o.push(u.next(function(){b(1===s)}));for(var c=[],h=0,f=n.mutations;h&lt;f.length;h++){var l=f[h],p=Di.key(e,l.key.path,n.batchId);o.push(i.delete(p)),c.push(l.key)}return ar.$n(o).next(function(){return c})}function di(t){return Qi.Qn(t,ki.store)}function vi(t){return Qi.Qn(t,Di.store)}function yi(t){return Qi.Qn(t,Oi.store)}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var gi=function(){function t(t,e){this.serializer=t,this.Dr=e}return t.prototype.Er=function(t,e,n){return wi(t).put(_i(e),n)},t.prototype.Ar=function(t,e){var n=wi(t),r=_i(e);return n.delete(r)},t.prototype.updateMetadata=function(t,e){var n=this;return this.getMetadata(t).next(function(r){return r.byteSize+=e,n.Jo(t,r)})},t.prototype.Rr=function(t,e){var n=this;return wi(t).get(_i(e)).next(function(t){return n.Xo(t)})},t.prototype.Zo=function(t,e){var n=this;return wi(t).get(_i(e)).next(function(t){var e=n.Xo(t);return e?{ta:e,size:Ii(t)}:null})},t.prototype.getEntries=function(t,e){var n=this,r=Ot();return this.ea(t,e,function(t,e){var i=n.Xo(e);r=r.ot(t,i)}).next(function(){return r})},t.prototype.na=function(t,e){var n=this,r=Ot(),i=new _t(O.i);return this.ea(t,e,function(t,e){var o=n.Xo(e);o?(r=r.ot(t,o),i=i.ot(t,Ii(e))):(r=r.ot(t,null),i=i.ot(t,0))}).next(function(){return{sa:r,ia:i}})},t.prototype.ea=function(t,e,n){if(e.m())return ar.resolve();var r=IDBKeyRange.bound(e.first().path.A(),e.last().path.A()),i=e._t(),o=i.It();return wi(t).rs({range:r},function(t,e,r){for(var a=O.$(t);o&amp;&amp;O.i(o,a)&lt;0;)n(o,null),o=i.It();o&amp;&amp;o.isEqual(a)&amp;&amp;(n(o,e),o=i.At()?i.It():null),o?r.Xn(o.path.A()):r.done()}).next(function(){for(;o;)n(o,null),o=i.At()?i.It():null})},t.prototype.Lr=function(t,e,n){var r=this,i=Dt(),o=e.path.length+1,a={};if(n.isEqual(st.min())){var s=e.path.A();a.range=IDBKeyRange.lowerBound(s)}else{var u=e.path.A(),c=ii(n);a.range=IDBKeyRange.lowerBound([u,c],!0),a.index=xi.collectionReadTimeIndex}return wi(t).rs(a,function(t,n,a){if(t.length===o){var s=ni(r.serializer,n);e.path.T(s.key.path)?s instanceof _n&amp;&amp;Fn(e,s)&amp;&amp;(i=i.ot(s.key,s)):a.done()}}).next(function(){return i})},t.prototype.ra=function(t){return new mi(this,!!t&amp;&amp;t.oa)},t.prototype.aa=function(t){return this.getMetadata(t).next(function(t){return t.byteSize})},t.prototype.getMetadata=function(t){return bi(t).get(Ci.key).next(function(t){return b(!!t),t})},t.prototype.Jo=function(t,e){return bi(t).put(Ci.key,e)},t.prototype.Xo=function(t){if(t){var e=ni(this.serializer,t);return e instanceof In&amp;&amp;e.version.isEqual(st.min())?null:e}return null},t}(),mi=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).ca=e,r.oa=n,r.ua=new ot(function(t){return t.toString()},function(t,e){return t.isEqual(e)}),r}return r.__extends(e,t),e.prototype.yr=function(t){var e=this,n=[],r=0,i=new Tt(function(t,e){return Y(t.R(),e.R())});return this.wr.forEach(function(o,a){var s=e.ua.get(o);if(a){var u=ri(e.ca.serializer,a,e.readTime);i=i.add(o.path.h());var c=Ii(u);r+=c-s,n.push(e.ca.Er(t,o,u))}else if(r-=s,e.oa){var h=ri(e.ca.serializer,new In(o,st.min()),e.readTime);n.push(e.ca.Er(t,o,h))}else n.push(e.ca.Ar(t,o))}),i.forEach(function(r){n.push(e.ca.Dr.Mo(t,r))}),n.push(this.ca.updateMetadata(t,r)),ar.$n(n)},e.prototype.gr=function(t,e){var n=this;return this.ca.Zo(t,e).next(function(t){return null===t?(n.ua.set(e,0),null):(n.ua.set(e,t.size),t.ta)})},e.prototype.Pr=function(t,e){var n=this;return this.ca.na(t,e).next(function(t){var e=t.sa;return t.ia.forEach(function(t,e){n.ua.set(t,e)}),e})},e}(Fr);function bi(t){return Qi.Qn(t,Ci.store)}function wi(t){return Qi.Qn(t,xi.store)}function _i(t){return t.path.A()}function Ii(t){var e;if(t.document)e=t.document;else if(t.unknownDocument)e=t.unknownDocument;else{if(!t.noDocument)throw m();e=t.noDocument}return JSON.stringify(e).length}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var Ei=function(){function t(){this.ha=new Ti}return t.prototype.Mo=function(t,e){return this.ha.add(e),ar.resolve()},t.prototype.Qr=function(t,e){return ar.resolve(this.ha.getEntries(e))},t}(),Ti=function(){function t(){this.index={}}return t.prototype.add=function(t){var e=t._(),n=t.h(),r=this.index[e]||new Tt(A.i),i=!r.has(n);return this.index[e]=r.add(n),i},t.prototype.has=function(t){var e=t._(),n=t.h(),r=this.index[e];return r&amp;&amp;r.has(n)},t.prototype.getEntries=function(t){return(this.index[t]||new Tt(A.i)).A()},t}(),Ai=function(){function t(t){this.serializer=t}return t.prototype.createOrUpgrade=function(t,e,n,r){var i=this;b(n&lt;r&amp;&amp;n&gt;=0&amp;&amp;r&lt;=10);var o=new fr("createOrUpgrade",e);n&lt;1&amp;&amp;r&gt;=1&amp;&amp;(function(t){t.createObjectStore(Ni.store)}(t),function(t){t.createObjectStore(Oi.store,{keyPath:Oi.keyPath}),t.createObjectStore(ki.store,{keyPath:ki.keyPath,autoIncrement:!0}).createIndex(ki.userMutationsIndex,ki.userMutationsKeyPath,{unique:!0}),t.createObjectStore(Di.store)}(t),Ui(t),function(t){t.createObjectStore(xi.store)}(t));var a=ar.resolve();return n&lt;3&amp;&amp;r&gt;=3&amp;&amp;(0!==n&amp;&amp;(function(t){t.deleteObjectStore(ji.store),t.deleteObjectStore(Li.store),t.deleteObjectStore(Mi.store)}(t),Ui(t)),a=a.next(function(){return t=o.store(Mi.store),e=new Mi(0,0,st.min().Z(),0),t.put(Mi.key,e);var t,e})),n&lt;4&amp;&amp;r&gt;=4&amp;&amp;(0!==n&amp;&amp;(a=a.next(function(){return function(t,e){return e.store(ki.store).ts().next(function(n){t.deleteObjectStore(ki.store),t.createObjectStore(ki.store,{keyPath:ki.keyPath,autoIncrement:!0}).createIndex(ki.userMutationsIndex,ki.userMutationsKeyPath,{unique:!0});var r=e.store(ki.store),i=n.map(function(t){return r.put(t)});return ar.$n(i)})}(t,o)})),a=a.next(function(){!function(t){t.createObjectStore(Fi.store,{keyPath:Fi.keyPath})}(t)})),n&lt;5&amp;&amp;r&gt;=5&amp;&amp;(a=a.next(function(){return i.removeAcknowledgedMutations(o)})),n&lt;6&amp;&amp;r&gt;=6&amp;&amp;(a=a.next(function(){return function(t){t.createObjectStore(Ci.store)}(t),i.addDocumentGlobal(o)})),n&lt;7&amp;&amp;r&gt;=7&amp;&amp;(a=a.next(function(){return i.ensureSequenceNumbers(o)})),n&lt;8&amp;&amp;r&gt;=8&amp;&amp;(a=a.next(function(){return i.createCollectionParentIndex(t,o)})),n&lt;9&amp;&amp;r&gt;=9&amp;&amp;(a=a.next(function(){!function(t){t.objectStoreNames.contains("remoteDocumentChanges")&amp;&amp;t.deleteObjectStore("remoteDocumentChanges")}(t),function(t){var e=t.objectStore(xi.store);e.createIndex(xi.readTimeIndex,xi.readTimeIndexPath,{unique:!1}),e.createIndex(xi.collectionReadTimeIndex,xi.collectionReadTimeIndexPath,{unique:!1})}(e)})),n&lt;10&amp;&amp;r&gt;=10&amp;&amp;(a=a.next(function(){return i.rewriteCanonicalIds(o)})),a},t.prototype.addDocumentGlobal=function(t){var e=0;return t.store(xi.store).rs(function(t,n){e+=Ii(n)}).next(function(){var n=new Ci(e);return t.store(Ci.store).put(Ci.key,n)})},t.prototype.removeAcknowledgedMutations=function(t){var e=this,n=t.store(Oi.store),r=t.store(ki.store);return n.ts().next(function(n){return ar.forEach(n,function(n){var i=IDBKeyRange.bound([n.userId,-1],[n.userId,n.lastAcknowledgedBatchId]);return r.ts(ki.userMutationsIndex,i).next(function(r){return ar.forEach(r,function(r){b(r.userId===n.userId);var i=ui(e.serializer,r);return pi(t,n.userId,i).next(function(){})})})})})},t.prototype.ensureSequenceNumbers=function(t){var e=t.store(ji.store),n=t.store(xi.store);return t.store(Mi.store).get(Mi.key).next(function(t){var r=[];return n.rs(function(n,i){var o=new A(n),a=[0,Qr(o)];r.push(e.get(a).next(function(n){return n?ar.resolve():function(n){return e.put(new ji(0,Qr(n),t.highestListenSequenceNumber))}(o)}))}).next(function(){return ar.$n(r)})})},t.prototype.createCollectionParentIndex=function(t,e){t.createObjectStore(Vi.store,{keyPath:Vi.keyPath});var n=e.store(Vi.store),r=new Ti,i=function(t){if(r.add(t)){var e=t._(),i=t.h();return n.put({collectionId:e,parent:Qr(i)})}};return e.store(xi.store).rs({ss:!0},function(t,e){var n=new A(t);return i(n.h())}).next(function(){return e.store(Di.store).rs({ss:!0},function(t,e){t[0];var n=t[1],r=(t[2],ti(n));return i(r.h())})})},t.prototype.rewriteCanonicalIds=function(t){var e=this,n=t.store(Li.store);return n.rs(function(t,r){var i=ci(r),o=hi(e.serializer,i);return n.put(o)})},t}(),Si=function(t,e){this.seconds=t,this.nanoseconds=e},Ni=function(t,e,n){this.ownerId=t,this.allowTabSynchronization=e,this.leaseTimestampMs=n};Ni.store="owner",Ni.key="owner";var Oi=function(t,e,n){this.userId=t,this.lastAcknowledgedBatchId=e,this.lastStreamToken=n};Oi.store="mutationQueues",Oi.keyPath="userId";var ki=function(t,e,n,r,i){this.userId=t,this.batchId=e,this.localWriteTimeMs=n,this.baseMutations=r,this.mutations=i};ki.store="mutations",ki.keyPath="batchId",ki.userMutationsIndex="userMutationsIndex",ki.userMutationsKeyPath=["userId","batchId"];var Di=function(){function t(){}return t.prefixForUser=function(t){return[t]},t.prefixForPath=function(t,e){return[t,Qr(e)]},t.key=function(t,e,n){return[t,Qr(e),n]},t}();Di.store="documentMutations",Di.PLACEHOLDER=new Di;var Pi=function(t,e){this.path=t,this.readTime=e},Ri=function(t,e){this.path=t,this.version=e},xi=function(t,e,n,r,i,o){this.unknownDocument=t,this.noDocument=e,this.document=n,this.hasCommittedMutations=r,this.readTime=i,this.parentPath=o};xi.store="remoteDocuments",xi.readTimeIndex="readTimeIndex",xi.readTimeIndexPath="readTime",xi.collectionReadTimeIndex="collectionReadTimeIndex",xi.collectionReadTimeIndexPath=["parentPath","readTime"];var Ci=function(t){this.byteSize=t};Ci.store="remoteDocumentGlobal",Ci.key="remoteDocumentGlobalKey";var Li=function(t,e,n,r,i,o,a){this.targetId=t,this.canonicalId=e,this.readTime=n,this.resumeToken=r,this.lastListenSequenceNumber=i,this.lastLimboFreeSnapshotVersion=o,this.query=a};Li.store="targets",Li.keyPath="targetId",Li.queryTargetsIndexName="queryTargetsIndex",Li.queryTargetsKeyPath=["canonicalId","targetId"];var ji=function(t,e,n){this.targetId=t,this.path=e,this.sequenceNumber=n};ji.store="targetDocuments",ji.keyPath=["targetId","path"],ji.documentTargetsIndex="documentTargetsIndex",ji.documentTargetsKeyPath=["path","targetId"];var Mi=function(t,e,n,r){this.highestTargetId=t,this.highestListenSequenceNumber=e,this.lastRemoteSnapshotVersion=n,this.targetCount=r};Mi.key="targetGlobalKey",Mi.store="targetGlobal";var Vi=function(t,e){this.collectionId=t,this.parent=e};function Ui(t){t.createObjectStore(ji.store,{keyPath:ji.keyPath}).createIndex(ji.documentTargetsIndex,ji.documentTargetsKeyPath,{unique:!0}),t.createObjectStore(Li.store,{keyPath:Li.keyPath}).createIndex(Li.queryTargetsIndexName,Li.queryTargetsKeyPath,{unique:!0}),t.createObjectStore(Mi.store)}Vi.store="collectionParents",Vi.keyPath=["collectionId","parent"];var Fi=function(t,e,n,r){this.clientId=t,this.updateTimeMs=e,this.networkEnabled=n,this.inForeground=r};Fi.store="clientMetadata",Fi.keyPath="clientId";var qi=r.__spreadArrays(r.__spreadArrays(r.__spreadArrays([Oi.store,ki.store,Di.store,xi.store,Li.store,Ni.store,Mi.store,ji.store],[Fi.store]),[Ci.store]),[Vi.store]),Bi=function(){function t(){this.la=new Ti}return t.prototype.Mo=function(t,e){var n=this;if(!this.la.has(e)){var r=e._(),i=e.h();t.pr(function(){n.la.add(e)});var o={collectionId:r,parent:Qr(i)};return Gi(t).put(o)}return ar.resolve()},t.prototype.Qr=function(t,e){var n=[],r=IDBKeyRange.bound([e,""],[$(e),""],!1,!0);return Gi(t).ts(r).next(function(t){for(var r=0,i=t;r&lt;i.length;r++){var o=i[r];if(o.collectionId!==e)break;n.push(ti(o.parent))}return n})},t}();
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function Gi(t){return Qi.Qn(t,Vi.store)}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var zi=function(){function t(t){this._a=t}return t.prototype.next=function(){return this._a+=2,this._a},t.fa=function(){return new t(0)},t.da=function(){return new t(-1)},t}(),Ki=function(){function t(t,e){this.No=t,this.serializer=e}return t.prototype.wa=function(t){var e=this;return this.ma(t).next(function(n){var r=new zi(n.highestTargetId);return n.highestTargetId=r.next(),e.Ta(t,n).next(function(){return n.highestTargetId})})},t.prototype.Ea=function(t){return this.ma(t).next(function(t){return st.J(new at(t.lastRemoteSnapshotVersion.seconds,t.lastRemoteSnapshotVersion.nanoseconds))})},t.prototype.Ia=function(t){return this.ma(t).next(function(t){return t.highestListenSequenceNumber})},t.prototype.Aa=function(t,e,n){var r=this;return this.ma(t).next(function(i){return i.highestListenSequenceNumber=e,n&amp;&amp;(i.lastRemoteSnapshotVersion=n.Z()),e&gt;i.highestListenSequenceNumber&amp;&amp;(i.highestListenSequenceNumber=e),r.Ta(t,i)})},t.prototype.Ra=function(t,e){var n=this;return this.ga(t,e).next(function(){return n.ma(t).next(function(r){return r.targetCount+=1,n.Pa(e,r),n.Ta(t,r)})})},t.prototype.ya=function(t,e){return this.ga(t,e)},t.prototype.Va=function(t,e){var n=this;return this.pa(t,e.targetId).next(function(){return Hi(t).delete(e.targetId)}).next(function(){return n.ma(t)}).next(function(e){return b(e.targetCount&gt;0),e.targetCount-=1,n.Ta(t,e)})},t.prototype.po=function(t,e,n){var r=this,i=0,o=[];return Hi(t).rs(function(a,s){var u=ci(s);u.sequenceNumber&lt;=e&amp;&amp;null===n.get(u.targetId)&amp;&amp;(i++,o.push(r.Va(t,u)))}).next(function(){return ar.$n(o)}).next(function(){return i})},t.prototype.Ce=function(t,e){return Hi(t).rs(function(t,n){var r=ci(n);e(r)})},t.prototype.ma=function(t){return Wi(t).get(Mi.key).next(function(t){return b(null!==t),t})},t.prototype.Ta=function(t,e){return Wi(t).put(Mi.key,e)},t.prototype.ga=function(t,e){return Hi(t).put(hi(this.serializer,e))},t.prototype.Pa=function(t,e){var n=!1;return t.targetId&gt;e.highestTargetId&amp;&amp;(e.highestTargetId=t.targetId,n=!0),t.sequenceNumber&gt;e.highestListenSequenceNumber&amp;&amp;(e.highestListenSequenceNumber=t.sequenceNumber,n=!0),n},t.prototype.ba=function(t){return this.ma(t).next(function(t){return t.targetCount})},t.prototype.va=function(t,e){var n=pt(e),r=IDBKeyRange.bound([n,Number.NEGATIVE_INFINITY],[n,Number.POSITIVE_INFINITY]),i=null;return Hi(t).rs({range:r,index:Li.queryTargetsIndexName},function(t,n,r){var o=ci(n);dt(e,o.target)&amp;&amp;(i=o,r.done())}).next(function(){return i})},t.prototype.Sa=function(t,e,n){var r=this,i=[],o=Xi(t);return e.forEach(function(e){var a=Qr(e.path);i.push(o.put(new ji(n,a))),i.push(r.No.Da(t,n,e))}),ar.$n(i)},t.prototype.Ca=function(t,e,n){var r=this,i=Xi(t);return ar.forEach(e,function(e){var o=Qr(e.path);return ar.$n([i.delete([n,o]),r.No.Na(t,n,e)])})},t.prototype.pa=function(t,e){var n=Xi(t),r=IDBKeyRange.bound([e],[e+1],!1,!0);return n.delete(r)},t.prototype.Fa=function(t,e){var n=IDBKeyRange.bound([e],[e+1],!1,!0),r=Xi(t),i=xt();return r.rs({range:n,ss:!0},function(t,e,n){var r=ti(t[1]),o=new O(r);i=i.add(o)}).next(function(){return i})},t.prototype.Ho=function(t,e){var n=Qr(e.path),r=IDBKeyRange.bound([n],[$(n)],!1,!0),i=0;return Xi(t).rs({index:ji.documentTargetsIndex,ss:!0,range:r},function(t,e,n){var r=t[0];t[1],0!==r&amp;&amp;(i++,n.done())}).next(function(){return i&gt;0})},t.prototype.Ue=function(t,e){return Hi(t).get(e).next(function(t){return t?ci(t):null})},t}();
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function Hi(t){return Qi.Qn(t,Li.store)}function Wi(t){return Qi.Qn(t,Mi.store)}function Xi(t){return Qi.Qn(t,ji.store)}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var Ji="Failed to obtain exclusive access to the persistence layer. To allow shared access, make sure to invoke `enablePersistence()` with `synchronizeTabs:true` in all tabs. If you are using `experimentalForceOwningTab:true`, make sure that only one tab has persistence enabled at any given time.",Yi=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).jo=e,r.xa=n,r}return r.__extends(e,t),e}(Br),Qi=function(){function t(e,n,r,i,o,a,s,u,c,l){if(this.allowTabSynchronization=e,this.persistenceKey=n,this.clientId=r,this.fn=o,this.window=a,this.document=s,this.$a=c,this.ka=l,this.Ma=null,this.Oa=!1,this.isPrimary=!1,this.networkEnabled=!0,this.La=null,this.inForeground=!1,this.Ba=null,this.qa=null,this.Ua=Number.NEGATIVE_INFINITY,this.Qa=function(t){return Promise.resolve()},!t.Ln())throw new f(h.UNIMPLEMENTED,"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");this.No=new to(this,i),this.Wa=n+"main",this.serializer=new ei(u),this.ja=new sr(this.Wa,10,new Ai(this.serializer)),this.Ka=new Ki(this.No,this.serializer),this.Dr=new Bi,this.vr=function(t,e){return new gi(t,e)}(this.serializer,this.Dr),this.window&amp;&amp;this.window.localStorage?this.Ga=this.window.localStorage:(this.Ga=null,!1===l&amp;&amp;v("IndexedDbPersistence","LocalStorage is unavailable. As a result, persistence may not work reliably. In particular enablePersistence() could fail immediately after refreshing the page."))}return t.Qn=function(t,e){if(t instanceof Yi)return sr.Qn(t.jo,e);throw m()},t.prototype.start=function(){var t=this;return this.za().then(function(){if(!t.isPrimary&amp;&amp;!t.allowTabSynchronization)throw new f(h.FAILED_PRECONDITION,Ji);return t.Ha(),t.Ya(),t.Ja(),t.runTransaction("getHighestListenSequenceNumber","readonly",function(e){return t.Ka.Ia(e)})}).then(function(e){t.Ma=new Nr(e,t.$a)}).then(function(){t.Oa=!0}).catch(function(e){return t.ja&amp;&amp;t.ja.close(),Promise.reject(e)})},t.prototype.Xa=function(t){var e=this;return this.Qa=function(n){return r.__awaiter(e,void 0,void 0,function(){return r.__generator(this,function(e){return this.Ei?[2,t(n)]:[2]})})},t(this.isPrimary)},t.prototype.Za=function(t){var e=this;this.ja.Kn(function(n){return r.__awaiter(e,void 0,void 0,function(){return r.__generator(this,function(e){switch(e.label){case 0:return null===n.newVersion?[4,t()]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})})},t.prototype.tc=function(t){var e=this;this.networkEnabled!==t&amp;&amp;(this.networkEnabled=t,this.fn.ws(function(){return r.__awaiter(e,void 0,void 0,function(){return r.__generator(this,function(t){switch(t.label){case 0:return this.Ei?[4,this.za()]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})}))},t.prototype.za=function(){var t=this;return this.runTransaction("updateClientMetadataAndTryBecomePrimary","readwrite",function(e){return Zi(e).put(new Fi(t.clientId,Date.now(),t.networkEnabled,t.inForeground)).next(function(){if(t.isPrimary)return t.ec(e).next(function(e){e||(t.isPrimary=!1,t.fn.Cs(function(){return t.Qa(!1)}))})}).next(function(){return t.nc(e)}).next(function(n){return t.isPrimary&amp;&amp;!n?t.sc(e).next(function(){return!1}):!!n&amp;&amp;t.ic(e).next(function(){return!0})})}).catch(function(e){if(hr(e))return d("IndexedDbPersistence","Failed to extend owner lease: ",e),t.isPrimary;if(!t.allowTabSynchronization)throw e;return d("IndexedDbPersistence","Releasing owner lease after error during lease refresh",e),!1}).then(function(e){t.isPrimary!==e&amp;&amp;t.fn.Cs(function(){return t.Qa(e)}),t.isPrimary=e})},t.prototype.ec=function(t){var e=this;return $i(t).get(Ni.key).next(function(t){return ar.resolve(e.rc(t))})},t.prototype.oc=function(t){return Zi(t).delete(this.clientId)},t.prototype.ac=function(){return r.__awaiter(this,void 0,void 0,function(){var e,n,i,o,a=this;return r.__generator(this,function(r){switch(r.label){case 0:return!this.isPrimary||this.cc(this.Ua,18e5)?[3,2]:(this.Ua=Date.now(),[4,this.runTransaction("maybeGarbageCollectMultiClientState","readwrite-primary",function(e){var n=t.Qn(e,Fi.store);return n.ts().next(function(t){var e=a.uc(t,18e5),r=t.filter(function(t){return-1===e.indexOf(t)});return ar.forEach(r,function(t){return n.delete(t.clientId)}).next(function(){return r})})}).catch(function(){return[]})]);case 1:if(e=r.sent(),this.Ga)for(n=0,i=e;n&lt;i.length;n++)o=i[n],this.Ga.removeItem(this.hc(o.clientId));r.label=2;case 2:return[2]}})})},t.prototype.Ja=function(){var t=this;this.qa=this.fn.yn("client_metadata_refresh",4e3,function(){return t.za().then(function(){return t.ac()}).then(function(){return t.Ja()})})},t.prototype.rc=function(t){return!!t&amp;&amp;t.ownerId===this.clientId},t.prototype.nc=function(t){var e=this;return this.ka?ar.resolve(!0):$i(t).get(Ni.key).next(function(n){if(null!==n&amp;&amp;e.cc(n.leaseTimestampMs,5e3)&amp;&amp;!e.lc(n.ownerId)){if(e.rc(n)&amp;&amp;e.networkEnabled)return!0;if(!e.rc(n)){if(!n.allowTabSynchronization)throw new f(h.FAILED_PRECONDITION,Ji);return!1}}return!(!e.networkEnabled||!e.inForeground)||Zi(t).ts().next(function(t){return void 0===e.uc(t,5e3).find(function(t){if(e.clientId!==t.clientId){var n=!e.networkEnabled&amp;&amp;t.networkEnabled,r=!e.inForeground&amp;&amp;t.inForeground,i=e.networkEnabled===t.networkEnabled;if(n||r&amp;&amp;i)return!0}return!1})})}).next(function(t){return e.isPrimary!==t&amp;&amp;d("IndexedDbPersistence","Client "+(t?"is":"is not")+" eligible for a primary lease."),t})},t.prototype.Di=function(){return r.__awaiter(this,void 0,void 0,function(){var t=this;return r.__generator(this,function(e){switch(e.label){case 0:return this.Oa=!1,this._c(),this.qa&amp;&amp;(this.qa.cancel(),this.qa=null),this.fc(),this.dc(),[4,this.ja.runTransaction("shutdown","readwrite",[Ni.store,Fi.store],function(e){var n=new Yi(e,Nr.ai);return t.sc(n).next(function(){return t.oc(n)})})];case 1:return e.sent(),this.ja.close(),this.wc(),[2]}})})},t.prototype.uc=function(t,e){var n=this;return t.filter(function(t){return n.cc(t.updateTimeMs,e)&amp;&amp;!n.lc(t.clientId)})},t.prototype.pi=function(){var t=this;return this.runTransaction("getActiveClients","readonly",function(e){return Zi(e).ts().next(function(e){return t.uc(e,18e5).map(function(t){return t.clientId})})})},Object.defineProperty(t.prototype,"Ei",{get:function(){return this.Oa},enumerable:!1,configurable:!0}),t.prototype.mc=function(t){return fi.xo(t,this.serializer,this.Dr,this.No)},t.prototype.Tc=function(){return this.Ka},t.prototype.Ec=function(){return this.vr},t.prototype.Ic=function(){return this.Dr},t.prototype.runTransaction=function(t,e,n){var r=this;d("IndexedDbPersistence","Starting transaction:",t);var i,o="readonly"===e?"readonly":"readwrite";return this.ja.runTransaction(t,o,qi,function(o){return i=new Yi(o,r.Ma?r.Ma.next():Nr.ai),"readwrite-primary"===e?r.ec(i).next(function(t){return!!t||r.nc(i)}).next(function(e){if(!e)throw v("Failed to obtain primary lease for action '"+t+"'."),r.isPrimary=!1,r.fn.Cs(function(){return r.Qa(!1)}),new f(h.FAILED_PRECONDITION,qr);return n(i)}).next(function(t){return r.ic(i).next(function(){return t})}):r.Ac(i).next(function(){return n(i)})}).then(function(t){return i.br(),t})},t.prototype.Ac=function(t){var e=this;return $i(t).get(Ni.key).next(function(t){if(null!==t&amp;&amp;e.cc(t.leaseTimestampMs,5e3)&amp;&amp;!e.lc(t.ownerId)&amp;&amp;!e.rc(t)&amp;&amp;!(e.ka||e.allowTabSynchronization&amp;&amp;t.allowTabSynchronization))throw new f(h.FAILED_PRECONDITION,Ji)})},t.prototype.ic=function(t){var e=new Ni(this.clientId,this.allowTabSynchronization,Date.now());return $i(t).put(Ni.key,e)},t.Ln=function(){return sr.Ln()},t.prototype.sc=function(t){var e=this,n=$i(t);return n.get(Ni.key).next(function(t){return e.rc(t)?(d("IndexedDbPersistence","Releasing primary lease."),n.delete(Ni.key)):ar.resolve()})},t.prototype.cc=function(t,e){var n=Date.now();return!(t&lt;n-e||t&gt;n&amp;&amp;(v("Detected an update time that is in the future: "+t+" &gt; "+n),1))},t.prototype.Ha=function(){var t=this;null!==this.document&amp;&amp;"function"==typeof this.document.addEventListener&amp;&amp;(this.Ba=function(){t.fn.ws(function(){return t.inForeground="visible"===t.document.visibilityState,t.za()})},this.document.addEventListener("visibilitychange",this.Ba),this.inForeground="visible"===this.document.visibilityState)},t.prototype.fc=function(){this.Ba&amp;&amp;(this.document.removeEventListener("visibilitychange",this.Ba),this.Ba=null)},t.prototype.Ya=function(){var t,e=this;"function"==typeof(null===(t=this.window)||void 0===t?void 0:t.addEventListener)&amp;&amp;(this.La=function(){e._c(),e.fn.ws(function(){return e.Di()})},this.window.addEventListener("unload",this.La))},t.prototype.dc=function(){this.La&amp;&amp;(this.window.removeEventListener("unload",this.La),this.La=null)},t.prototype.lc=function(t){var e;try{var n=null!==(null===(e=this.Ga)||void 0===e?void 0:e.getItem(this.hc(t)));return d("IndexedDbPersistence","Client '"+t+"' "+(n?"is":"is not")+" zombied in LocalStorage"),n}catch(t){return v("IndexedDbPersistence","Failed to get zombied client id.",t),!1}},t.prototype._c=function(){if(this.Ga)try{this.Ga.setItem(this.hc(this.clientId),String(Date.now()))}catch(t){v("Failed to set zombie client id.",t)}},t.prototype.wc=function(){if(this.Ga)try{this.Ga.removeItem(this.hc(this.clientId))}catch(t){}},t.prototype.hc=function(t){return"firestore_zombie_"+this.persistenceKey+"_"+t},t}();function $i(t){return Qi.Qn(t,Ni.store)}function Zi(t){return Qi.Qn(t,Fi.store)}var to=function(){function t(t,e){this.db=t,this.wo=new Yr(this,e)}return t.prototype.Po=function(t){var e=this.Rc(t);return this.db.Tc().ba(t).next(function(t){return e.next(function(e){return t+e})})},t.prototype.Rc=function(t){var e=0;return this.Vo(t,function(t){e++}).next(function(){return e})},t.prototype.Ce=function(t,e){return this.db.Tc().Ce(t,e)},t.prototype.Vo=function(t,e){return this.gc(t,function(t,n){return e(n)})},t.prototype.Da=function(t,e,n){return eo(t,n)},t.prototype.Na=function(t,e,n){return eo(t,n)},t.prototype.po=function(t,e,n){return this.db.Tc().po(t,e,n)},t.prototype.Go=function(t,e){return eo(t,e)},t.prototype.Pc=function(t,e){return function(t,e){var n=!1;return yi(t).os(function(r){return li(t,r,e).next(function(t){return t&amp;&amp;(n=!0),ar.resolve(!t)})}).next(function(){return n})}(t,e)},t.prototype.bo=function(t,e){var n=this,r=this.db.Ec().ra(),i=[],o=0;return this.gc(t,function(a,s){if(s&lt;=e){var u=n.Pc(t,a).next(function(e){if(!e)return o++,r.Rr(t,a).next(function(){return r.Ar(a),Xi(t).delete([0,Qr(a.path)])})});i.push(u)}}).next(function(){return ar.$n(i)}).next(function(){return r.apply(t)}).next(function(){return o})},t.prototype.removeTarget=function(t,e){var n=e.st(t.xa);return this.db.Tc().ya(t,n)},t.prototype.yc=function(t,e){return eo(t,e)},t.prototype.gc=function(t,e){var n,r=Xi(t),i=Nr.ai;return r.rs({index:ji.documentTargetsIndex},function(t,r){var o=t[0],a=(t[1],r.path),s=r.sequenceNumber;0===o?(i!==Nr.ai&amp;&amp;e(new O(ti(n)),i),i=s,n=a):i=Nr.ai}).next(function(){i!==Nr.ai&amp;&amp;e(new O(ti(n)),i)})},t.prototype.So=function(t){return this.db.Ec().aa(t)},t}();function eo(t,e){return Xi(t).put(function(t,e){return new ji(0,Qr(t.path),e)}(e,t.xa))}function no(t,e){var n=t.projectId;return t.j||(n+="."+t.database),"firestore/"+e+"/"+n+"/"}var ro=function(){function t(t,e,n){this.persistence=t,this.Vc=e,this.bc=new _t(Y),this.vc=new ot(function(t){return pt(t)},dt),this.Sc=st.min(),this.Sr=t.mc(n),this.Dc=t.Ec(),this.Ka=t.Tc(),this.Cc=new Gr(this.Dc,this.Sr,this.persistence.Ic()),this.Vc.Nc(this.Cc)}return t.prototype.Io=function(t){var e=this;return this.persistence.runTransaction("Collect garbage","readwrite-primary",function(n){return t.vo(n,e.bc)})},t}();function io(t){var e=w(t);return e.persistence.runTransaction("Get last remote snapshot version","readonly",function(t){return e.Ka.Ea(t)})}function oo(t,e){var n=w(t);return n.persistence.runTransaction("Allocate target","readwrite",function(t){var r;return n.Ka.va(t,e).next(function(i){return i?(r=i,ar.resolve(r)):n.Ka.wa(t).next(function(i){return r=new mt(e,i,0,t.xa),n.Ka.Ra(t,r).next(function(){return r})})})}).then(function(t){var r=n.bc.get(t.targetId);return(null===r||t.nt.L(r.nt)&gt;0)&amp;&amp;(n.bc=n.bc.ot(t.targetId,t),n.vc.set(e,t.targetId)),t})}function ao(t,e,n){return r.__awaiter(this,void 0,void 0,function(){var i,o,a,s;return r.__generator(this,function(r){switch(r.label){case 0:i=w(t),o=i.bc.get(e),a=n?"readwrite":"readwrite-primary",r.label=1;case 1:return r.trys.push([1,4,,5]),n?[3,3]:[4,i.persistence.runTransaction("Release target",a,function(t){return i.persistence.No.removeTarget(t,o)})];case 2:r.sent(),r.label=3;case 3:return[3,5];case 4:if(!hr(s=r.sent()))throw s;return d("LocalStore","Failed to update sequence numbers for target "+e+": "+s),[3,5];case 5:return i.bc=i.bc.remove(e),i.vc.delete(o.target),[2]}})})}function so(t,e,n){var r=w(t),i=st.min(),o=xt();return r.persistence.runTransaction("Execute query","readonly",function(t){return function(t,e,n){var r=w(t),i=r.vc.get(n);return void 0!==i?ar.resolve(r.bc.get(i)):r.Ka.va(e,n)}(r,t,xn(e)).next(function(e){if(e)return i=e.lastLimboFreeSnapshotVersion,r.Ka.Fa(t,e.targetId).next(function(t){o=t})}).next(function(){return r.Vc.Lr(t,e,n?i:st.min(),n?o:xt())}).next(function(t){return{documents:t,Fc:o}})})}function uo(t,e){var n=w(t),r=w(n.Ka),i=n.bc.get(e);return i?Promise.resolve(i.target):n.persistence.runTransaction("Get target data","readonly",function(t){return r.Ue(t,e).next(function(t){return t?t.target:null})})}function co(t){return r.__awaiter(this,void 0,void 0,function(){var e;return r.__generator(this,function(n){return[2,(e=w(t)).persistence.runTransaction("Synchronize last document change read time","readonly",function(t){return function(t){var e=wi(t),n=st.min();return e.rs({index:xi.readTimeIndex,reverse:!0},function(t,e,r){e.readTime&amp;&amp;(n=oi(e.readTime)),r.done()}).next(function(){return n})}(t)}).then(function(t){e.Sc=t})]})})}function ho(t){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(e){if(t.code!==h.FAILED_PRECONDITION||t.message!==qr)throw t;return d("LocalStore","Unexpectedly lost primary lease"),[2]})})}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var fo=function(){function t(){this.$c=new Tt(lo.kc),this.Mc=new Tt(lo.Oc)}return t.prototype.m=function(){return this.$c.m()},t.prototype.Da=function(t,e){var n=new lo(t,e);this.$c=this.$c.add(n),this.Mc=this.Mc.add(n)},t.prototype.Lc=function(t,e){var n=this;t.forEach(function(t){return n.Da(t,e)})},t.prototype.Na=function(t,e){this.Bc(new lo(t,e))},t.prototype.qc=function(t,e){var n=this;t.forEach(function(t){return n.Na(t,e)})},t.prototype.Uc=function(t){var e=this,n=new O(new A([])),r=new lo(n,t),i=new lo(n,t+1),o=[];return this.Mc.Ft([r,i],function(t){e.Bc(t),o.push(t.key)}),o},t.prototype.Qc=function(){var t=this;this.$c.forEach(function(e){return t.Bc(e)})},t.prototype.Bc=function(t){this.$c=this.$c.delete(t),this.Mc=this.Mc.delete(t)},t.prototype.Wc=function(t){var e=new O(new A([])),n=new lo(e,t),r=new lo(e,t+1),i=xt();return this.Mc.Ft([n,r],function(t){i=i.add(t.key)}),i},t.prototype.Ho=function(t){var e=new lo(t,0),n=this.$c.$t(e);return null!==n&amp;&amp;t.isEqual(n.key)},t}(),lo=function(){function t(t,e){this.key=t,this.jc=e}return t.kc=function(t,e){return O.i(t.key,e.key)||Y(t.jc,e.jc)},t.Oc=function(t,e){return Y(t.jc,e.jc)||O.i(t.key,e.key)},t}(),po=function(){function t(){this.Gc=null}return t.prototype.getToken=function(){return Promise.resolve(null)},t.prototype.zc=function(){},t.prototype.Hc=function(t){this.Gc=t,t(Sr.UNAUTHENTICATED)},t.prototype.Yc=function(){this.Gc=null},t}(),vo=function(){function t(t){var e=this;this.Jc=null,this.currentUser=Sr.UNAUTHENTICATED,this.Xc=!1,this.Zc=0,this.Gc=null,this.forceRefresh=!1,this.Jc=function(){e.Zc++,e.currentUser=e.tu(),e.Xc=!0,e.Gc&amp;&amp;e.Gc(e.currentUser)},this.Zc=0,this.auth=t.getImmediate({optional:!0}),this.auth?this.auth.addAuthTokenListener(this.Jc):(this.Jc(null),t.get().then(function(t){e.auth=t,e.Jc&amp;&amp;e.auth.addAuthTokenListener(e.Jc)},function(){}))}return t.prototype.getToken=function(){var t=this,e=this.Zc,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then(function(n){return t.Zc!==e?(d("FirebaseCredentialsProvider","getToken aborted due to token change."),t.getToken()):n?(b("string"==typeof n.accessToken),new function(t,e){this.user=e,this.type="OAuth",this.Kc={},this.Kc.Authorization="Bearer "+t}(n.accessToken,t.currentUser)):null}):Promise.resolve(null)},t.prototype.zc=function(){this.forceRefresh=!0},t.prototype.Hc=function(t){this.Gc=t,this.Xc&amp;&amp;t(this.currentUser)},t.prototype.Yc=function(){this.auth&amp;&amp;this.auth.removeAuthTokenListener(this.Jc),this.Jc=null,this.Gc=null},t.prototype.tu=function(){var t=this.auth&amp;&amp;this.auth.getUid();return b(null===t||"string"==typeof t),new Sr(t)},t}(),yo=function(){function t(t,e){this.eu=t,this.nu=e,this.type="FirstParty",this.user=Sr.ni}return Object.defineProperty(t.prototype,"Kc",{get:function(){var t={"X-Goog-AuthUser":this.nu},e=this.eu.auth.getAuthHeaderValueForFirstParty([]);return e&amp;&amp;(t.Authorization=e),t},enumerable:!1,configurable:!0}),t}(),go=function(){function t(t,e){this.eu=t,this.nu=e}return t.prototype.getToken=function(){return Promise.resolve(new yo(this.eu,this.nu))},t.prototype.Hc=function(t){t(Sr.ni)},t.prototype.Yc=function(){},t.prototype.zc=function(){},t}(),mo=function(){function t(t,e,n,r,i,o){this.fn=t,this.su=n,this.iu=r,this.ru=i,this.listener=o,this.state=0,this.ou=0,this.au=null,this.stream=null,this.ys=new or(t,e)}return t.prototype.cu=function(){return 1===this.state||2===this.state||4===this.state},t.prototype.uu=function(){return 2===this.state},t.prototype.start=function(){3!==this.state?this.auth():this.hu()},t.prototype.stop=function(){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(t){switch(t.label){case 0:return this.cu()?[4,this.close(0)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})},t.prototype.lu=function(){this.state=0,this.ys.reset()},t.prototype._u=function(){var t=this;this.uu()&amp;&amp;null===this.au&amp;&amp;(this.au=this.fn.yn(this.su,6e4,function(){return t.fu()}))},t.prototype.du=function(t){this.wu(),this.stream.send(t)},t.prototype.fu=function(){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(t){return this.uu()?[2,this.close(0)]:[2]})})},t.prototype.wu=function(){this.au&amp;&amp;(this.au.cancel(),this.au=null)},t.prototype.close=function(t,e){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(n){switch(n.label){case 0:return this.wu(),this.ys.cancel(),this.ou++,3!==t?this.ys.reset():e&amp;&amp;e.code===h.RESOURCE_EXHAUSTED?(v(e.toString()),v("Using maximum backoff delay to prevent overloading the backend."),this.ys.Rn()):e&amp;&amp;e.code===h.UNAUTHENTICATED&amp;&amp;this.ru.zc(),null!==this.stream&amp;&amp;(this.mu(),this.stream.close(),this.stream=null),this.state=t,[4,this.listener.Tu(e)];case 1:return n.sent(),[2]}})})},t.prototype.mu=function(){},t.prototype.auth=function(){var t=this;this.state=1;var e=this.Eu(this.ou),n=this.ou;this.ru.getToken().then(function(e){t.ou===n&amp;&amp;t.Iu(e)},function(n){e(function(){var e=new f(h.UNKNOWN,"Fetching auth token failed: "+n.message);return t.Au(e)})})},t.prototype.Iu=function(t){var e=this,n=this.Eu(this.ou);this.stream=this.Ru(t),this.stream.gu(function(){n(function(){return e.state=2,e.listener.gu()})}),this.stream.Tu(function(t){n(function(){return e.Au(t)})}),this.stream.onMessage(function(t){n(function(){return e.onMessage(t)})})},t.prototype.hu=function(){var t=this;this.state=4,this.ys.gn(function(){return r.__awaiter(t,void 0,void 0,function(){return r.__generator(this,function(t){return this.state=0,this.start(),[2]})})})},t.prototype.Au=function(t){return d("PersistentStream","close with error: "+t),this.stream=null,this.close(3,t)},t.prototype.Eu=function(t){var e=this;return function(n){e.fn.ws(function(){return e.ou===t?n():(d("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())})}},t}(),bo=function(t){function e(e,n,r,i,o){var a;return(a=t.call(this,e,"listen_stream_connection_backoff","listen_stream_idle",n,r,o)||this).serializer=i,a}return r.__extends(e,t),e.prototype.Ru=function(t){return this.iu.Pu("Listen",t)},e.prototype.onMessage=function(t){this.ys.reset();var e=function(t,e){var n;if("targetChange"in e){e.targetChange;var r=function(t){return"NO_CHANGE"===t?0:"ADD"===t?1:"REMOVE"===t?2:"CURRENT"===t?3:"RESET"===t?4:m()}(e.targetChange.targetChangeType||"NO_CHANGE"),i=e.targetChange.targetIds||[],o=function(t,e){return t.Qe?(b(void 0===e||"string"==typeof e),Z.fromBase64String(e||"")):(b(void 0===e||e instanceof Uint8Array),Z.fromUint8Array(e||new Uint8Array))}(t,e.targetChange.resumeToken),a=e.targetChange.cause,s=a&amp;&amp;function(t){var e=void 0===t.code?h.UNKNOWN:wt(t.code);return new f(e,t.message||"")}(a);n=new Gt(r,i,o,s||null)}else if("documentChange"in e){e.documentChange;var u=e.documentChange;u.document,u.document.name,u.document.updateTime;var c=Te(t,u.document.name),l=we(u.document.updateTime),p=new gn({mapValue:{fields:u.document.fields}}),d=new _n(c,l,p,{}),v=u.targetIds||[],y=u.removedTargetIds||[];n=new qt(v,y,d.key,d)}else if("documentDelete"in e){e.documentDelete;var g=e.documentDelete;g.document;var w=Te(t,g.document),_=g.readTime?we(g.readTime):st.min(),I=new In(w,_),E=g.removedTargetIds||[];n=new qt([],E,I.key,I)}else if("documentRemove"in e){e.documentRemove;var T=e.documentRemove;T.document;var A=Te(t,T.document),S=T.removedTargetIds||[];n=new qt([],S,A,null)}else{if(!("filter"in e))return m();e.filter;var N=e.filter;N.targetId;var O=new function(t){this.count=t}(N.count||0),k=N.targetId;n=new Bt(k,O)}return n}(this.serializer,t),n=function(t){if(!("targetChange"in t))return st.min();var e=t.targetChange;return e.targetIds&amp;&amp;e.targetIds.length?st.min():e.readTime?we(e.readTime):st.min()}(t);return this.listener.yu(e,n)},e.prototype.Vu=function(t){var e={};e.database=Ne(this.serializer),e.addTarget=function(t,e){var n,r=e.target;return(n=vt(r)?{documents:Re(t,r)}:{query:xe(t,r)}).targetId=e.targetId,e.resumeToken.O()&gt;0&amp;&amp;(n.resumeToken=be(t,e.resumeToken)),n}(this.serializer,t);var n=function(t,e){var n=function(t,e){switch(e){case 0:return null;case 1:return"existence-filter-mismatch";case 2:return"limbo-document";default:return m()}}(0,e.et);return null==n?null:{"goog-listen-tags":n}}(this.serializer,t);n&amp;&amp;(e.labels=n),this.du(e)},e.prototype.pu=function(t){var e={};e.database=Ne(this.serializer),e.removeTarget=t,this.du(e)},e}(mo),wo=function(t){function e(e,n,r,i,o){var a=this;return(a=t.call(this,e,"write_stream_connection_backoff","write_stream_idle",n,r,o)||this).serializer=i,a.bu=!1,a}return r.__extends(e,t),Object.defineProperty(e.prototype,"vu",{get:function(){return this.bu},enumerable:!1,configurable:!0}),e.prototype.start=function(){this.bu=!1,this.lastStreamToken=void 0,t.prototype.start.call(this)},e.prototype.mu=function(){this.bu&amp;&amp;this.Su([])},e.prototype.Ru=function(t){return this.iu.Pu("Write",t)},e.prototype.onMessage=function(t){if(b(!!t.streamToken),this.lastStreamToken=t.streamToken,this.bu){this.ys.reset();var e=function(t,e){return t&amp;&amp;t.length&gt;0?(b(void 0!==e),t.map(function(t){return function(t,e){var n=t.updateTime?we(t.updateTime):we(e);n.isEqual(st.min())&amp;&amp;(n=we(e));var r=null;return t.transformResults&amp;&amp;t.transformResults.length&gt;0&amp;&amp;(r=t.transformResults),new function(t,e){this.version=t,this.transformResults=e}(n,r)}(t,e)})):[]}(t.writeResults,t.commitTime),n=we(t.commitTime);return this.listener.Du(n,e)}return b(!t.writeResults||0===t.writeResults.length),this.bu=!0,this.listener.Cu()},e.prototype.Nu=function(){var t={};t.database=Ne(this.serializer),this.du(t)},e.prototype.Su=function(t){var e=this,n={streamToken:this.lastStreamToken,writes:t.map(function(t){return De(e.serializer,t)})};this.du(n)},e}(mo),_o=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).credentials=e,i.iu=n,i.serializer=r,i.Fu=!1,i}return r.__extends(e,t),e.prototype.xu=function(){if(this.Fu)throw new f(h.FAILED_PRECONDITION,"The client has already been terminated.")},e.prototype.$u=function(t,e,n){var r=this;return this.xu(),this.credentials.getToken().then(function(i){return r.iu.$u(t,e,n,i)}).catch(function(t){throw t.code===h.UNAUTHENTICATED&amp;&amp;r.credentials.zc(),t})},e.prototype.ku=function(t,e,n){var r=this;return this.xu(),this.credentials.getToken().then(function(i){return r.iu.ku(t,e,n,i)}).catch(function(t){throw t.code===h.UNAUTHENTICATED&amp;&amp;r.credentials.zc(),t})},e.prototype.terminate=function(){this.Fu=!1},e}(function(){}),Io=function(){function t(t,e){this.cs=t,this.di=e,this.state="Unknown",this.Mu=0,this.Ou=null,this.Lu=!0}return t.prototype.Bu=function(){var t=this;0===this.Mu&amp;&amp;(this.qu("Unknown"),this.Ou=this.cs.yn("online_state_timeout",1e4,function(){return t.Ou=null,t.Uu("Backend didn't respond within 10 seconds."),t.qu("Offline"),Promise.resolve()}))},t.prototype.Qu=function(t){"Online"===this.state?this.qu("Unknown"):(this.Mu++,this.Mu&gt;=1&amp;&amp;(this.Wu(),this.Uu("Connection failed 1 times. Most recent error: "+t.toString()),this.qu("Offline")))},t.prototype.set=function(t){this.Wu(),this.Mu=0,"Online"===t&amp;&amp;(this.Lu=!1),this.qu(t)},t.prototype.qu=function(t){t!==this.state&amp;&amp;(this.state=t,this.di(t))},t.prototype.Uu=function(t){var e="Could not reach Cloud Firestore backend. "+t+"\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.";this.Lu?(v(e),this.Lu=!1):d("OnlineStateTracker",e)},t.prototype.Wu=function(){null!==this.Ou&amp;&amp;(this.Ou.cancel(),this.Ou=null)},t}(),Eo=function(t,e,n,i,o){var a=this;this.ju=t,this.Ku=e,this.cs=n,this.Gu={},this.zu=[],this.Hu=new Map,this.Yu=new Set,this.Ju=[],this.Xu=o,this.Xu.Zu(function(t){n.ws(function(){return r.__awaiter(a,void 0,void 0,function(){return r.__generator(this,function(t){switch(t.label){case 0:return xo(this)?(d("RemoteStore","Restarting streams for network reachability change."),[4,function(t){return r.__awaiter(this,void 0,void 0,function(){var e;return r.__generator(this,function(n){switch(n.label){case 0:return(e=w(t)).Yu.add(4),[4,Ao(e)];case 1:return n.sent(),e.th.set("Unknown"),e.Yu.delete(4),[4,To(e)];case 2:return n.sent(),[2]}})})}(this)]):[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})})}),this.th=new Io(n,i)};function To(t){return r.__awaiter(this,void 0,void 0,function(){var e,n;return r.__generator(this,function(r){switch(r.label){case 0:if(!xo(t))return[3,4];e=0,n=t.Ju,r.label=1;case 1:return e&lt;n.length?[4,(0,n[e])(!0)]:[3,4];case 2:r.sent(),r.label=3;case 3:return e++,[3,1];case 4:return[2]}})})}function Ao(t){return r.__awaiter(this,void 0,void 0,function(){var e,n;return r.__generator(this,function(r){switch(r.label){case 0:e=0,n=t.Ju,r.label=1;case 1:return e&lt;n.length?[4,(0,n[e])(!1)]:[3,4];case 2:r.sent(),r.label=3;case 3:return e++,[3,1];case 4:return[2]}})})}function So(t){return r.__awaiter(this,void 0,void 0,function(){var e;return r.__generator(this,function(n){switch(n.label){case 0:return e=w(t),d("RemoteStore","RemoteStore shutting down."),e.Yu.add(5),[4,Ao(e)];case 1:return n.sent(),e.Xu.Di(),e.th.set("Unknown"),[2]}})})}function No(t,e){var n=w(t);n.Hu.has(e.targetId)||(n.Hu.set(e.targetId,e),Ro(n)?Po(n):qo(n).uu()&amp;&amp;ko(n,e))}function Oo(t,e){var n=w(t),r=qo(n);n.Hu.delete(e),r.uu()&amp;&amp;Do(n,e),0===n.Hu.size&amp;&amp;(r.uu()?r._u():xo(n)&amp;&amp;n.th.set("Unknown"))}function ko(t,e){t.eh.Ie(e.targetId),qo(t).Vu(e)}function Do(t,e){t.eh.Ie(e),qo(t).pu(e)}function Po(t){t.eh=new Kt({qe:function(e){return t.Gu.qe(e)},Ue:function(e){return t.Hu.get(e)||null}}),qo(t).start(),t.th.Bu()}function Ro(t){return xo(t)&amp;&amp;!qo(t).cu()&amp;&amp;t.Hu.size&gt;0}function xo(t){return 0===w(t).Yu.size}function Co(t){t.eh=void 0}function Lo(t,e,n){return r.__awaiter(this,void 0,void 0,function(){var i=this;return r.__generator(this,function(o){switch(o.label){case 0:if(!hr(e))throw e;return t.Yu.add(1),[4,Ao(t)];case 1:return o.sent(),t.th.set("Offline"),n||(n=function(){return io(t.ju)}),t.cs.Cs(function(){return r.__awaiter(i,void 0,void 0,function(){return r.__generator(this,function(e){switch(e.label){case 0:return d("RemoteStore","Retrying IndexedDB access"),[4,n()];case 1:return e.sent(),t.Yu.delete(1),[4,To(t)];case 2:return e.sent(),[2]}})})}),[2]}})})}function jo(t,e){return e().catch(function(n){return Lo(t,n,e)})}function Mo(t){return r.__awaiter(this,void 0,void 0,function(){var e,n,i,o,a;return r.__generator(this,function(r){switch(r.label){case 0:e=w(t),n=Bo(e),i=e.zu.length&gt;0?e.zu[e.zu.length-1].batchId:-1,r.label=1;case 1:if(!function(t){return xo(t)&amp;&amp;t.zu.length&lt;10}(e))return[3,7];r.label=2;case 2:return r.trys.push([2,4,,6]),[4,function(t,e){var n=w(t);return n.persistence.runTransaction("Get next mutation batch","readonly",function(t){return void 0===e&amp;&amp;(e=-1),n.Sr.Bo(t,e)})}(e.ju,i)];case 3:return null===(o=r.sent())?(0===e.zu.length&amp;&amp;n._u(),[3,7]):(i=o.batchId,function(t,e){t.zu.push(e);var n=Bo(t);n.uu()&amp;&amp;n.vu&amp;&amp;n.Su(e.mutations)}(e,o),[3,6]);case 4:return a=r.sent(),[4,Lo(e,a)];case 5:return r.sent(),[3,6];case 6:return[3,1];case 7:return Vo(e)&amp;&amp;Uo(e),[2]}})})}function Vo(t){return xo(t)&amp;&amp;!Bo(t).cu()&amp;&amp;t.zu.length&gt;0}function Uo(t){Bo(t).start()}function Fo(t,e){return r.__awaiter(this,void 0,void 0,function(){var n;return r.__generator(this,function(r){switch(r.label){case 0:return n=w(t),e?(n.Yu.delete(2),[4,To(n)]):[3,2];case 1:return r.sent(),[3,5];case 2:return e?[3,4]:(n.Yu.add(2),[4,Ao(n)]);case 3:r.sent(),n.th.set("Unknown"),r.label=4;case 4:r.label=5;case 5:return[2]}})})}function qo(t){var e=this;return t.oh||(t.oh=function(t,e,n){var r=w(t);return r.xu(),new bo(e,r.iu,r.credentials,r.serializer,n)}(t.Ku,t.cs,{gu:function(t){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(e){return t.Hu.forEach(function(e,n){ko(t,e)}),[2]})})}.bind(null,t),Tu:function(t,e){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(n){return Co(t),Ro(t)?(t.th.Qu(e),Po(t)):t.th.set("Unknown"),[2]})})}.bind(null,t),yu:function(t,e,n){return r.__awaiter(this,void 0,void 0,function(){var i,o,a;return r.__generator(this,function(s){switch(s.label){case 0:if(t.th.set("Online"),!(e instanceof Gt&amp;&amp;2===e.state&amp;&amp;e.cause))return[3,6];s.label=1;case 1:return s.trys.push([1,3,,5]),[4,function(t,e){return r.__awaiter(this,void 0,void 0,function(){var n,i,o,a;return r.__generator(this,function(r){switch(r.label){case 0:n=e.cause,i=0,o=e.targetIds,r.label=1;case 1:return i&lt;o.length?(a=o[i],t.Hu.has(a)?[4,t.Gu.nh(a,n)]:[3,3]):[3,5];case 2:r.sent(),t.Hu.delete(a),t.eh.removeTarget(a),r.label=3;case 3:r.label=4;case 4:return i++,[3,1];case 5:return[2]}})})}(t,e)];case 2:return s.sent(),[3,5];case 3:return i=s.sent(),d("RemoteStore","Failed to remove targets %s: %s ",e.targetIds.join(","),i),[4,Lo(t,i)];case 4:return s.sent(),[3,5];case 5:return[3,13];case 6:if(e instanceof qt?t.eh.be(e):e instanceof Bt?t.eh.$e(e):t.eh.De(e),n.isEqual(st.min()))return[3,13];s.label=7;case 7:return s.trys.push([7,11,,13]),[4,io(t.ju)];case 8:return o=s.sent(),n.L(o)&gt;=0?[4,function(t,e){var n=t.eh.Oe(e);return n.zt.forEach(function(n,r){if(n.resumeToken.O()&gt;0){var i=t.Hu.get(r);i&amp;&amp;t.Hu.set(r,i.it(n.resumeToken,e))}}),n.Ht.forEach(function(e){var n=t.Hu.get(e);if(n){t.Hu.set(e,n.it(Z.B,n.nt)),Do(t,e);var r=new mt(n.target,e,1,n.sequenceNumber);ko(t,r)}}),t.Gu.sh(n)}(t,n)]:[3,10];case 9:s.sent(),s.label=10;case 10:return[3,13];case 11:return d("RemoteStore","Failed to raise snapshot:",a=s.sent()),[4,Lo(t,a)];case 12:return s.sent(),[3,13];case 13:return[2]}})})}.bind(null,t)}),t.Ju.push(function(n){return r.__awaiter(e,void 0,void 0,function(){return r.__generator(this,function(e){switch(e.label){case 0:return n?(t.oh.lu(),Ro(t)?Po(t):t.th.set("Unknown"),[3,3]):[3,1];case 1:return[4,t.oh.stop()];case 2:e.sent(),Co(t),e.label=3;case 3:return[2]}})})})),t.oh}function Bo(t){var e=this;return t.ah||(t.ah=function(t,e,n){var r=w(t);return r.xu(),new wo(e,r.iu,r.credentials,r.serializer,n)}(t.Ku,t.cs,{gu:function(t){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(e){return Bo(t).Nu(),[2]})})}.bind(null,t),Tu:function(t,e){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(n){switch(n.label){case 0:return e&amp;&amp;Bo(t).vu?[4,function(t,e){return r.__awaiter(this,void 0,void 0,function(){var n,i;return r.__generator(this,function(r){switch(r.label){case 0:return bt(i=e.code)&amp;&amp;i!==h.ABORTED?(n=t.zu.shift(),Bo(t).lu(),[4,jo(t,function(){return t.Gu.rh(n.batchId,e)})]):[3,3];case 1:return r.sent(),[4,Mo(t)];case 2:r.sent(),r.label=3;case 3:return[2]}})})}(t,e)]:[3,2];case 1:n.sent(),n.label=2;case 2:return Vo(t)&amp;&amp;Uo(t),[2]}})})}.bind(null,t),Cu:function(t){return r.__awaiter(this,void 0,void 0,function(){var e,n,i,o;return r.__generator(this,function(r){for(e=Bo(t),n=0,i=t.zu;n&lt;i.length;n++)o=i[n],e.Su(o.mutations);return[2]})})}.bind(null,t),Du:function(t,e,n){return r.__awaiter(this,void 0,void 0,function(){var i,o;return r.__generator(this,function(r){switch(r.label){case 0:return i=t.zu.shift(),o=Ur.from(i,e,n),[4,jo(t,function(){return t.Gu.ih(o)})];case 1:return r.sent(),[4,Mo(t)];case 2:return r.sent(),[2]}})})}.bind(null,t)}),t.Ju.push(function(n){return r.__awaiter(e,void 0,void 0,function(){return r.__generator(this,function(e){switch(e.label){case 0:return n?(t.ah.lu(),[4,Mo(t)]):[3,2];case 1:return e.sent(),[3,4];case 2:return[4,t.ah.stop()];case 3:e.sent(),t.zu.length&gt;0&amp;&amp;(d("RemoteStore","Stopping write stream with "+t.zu.length+" pending writes"),t.zu=[]),e.label=4;case 4:return[2]}})})})),t.ah
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */}var Go=function(t){this.key=t},zo=function(t){this.key=t},Ko=function(){function t(t,e){this.query=t,this.uh=e,this.hh=null,this.te=!1,this.lh=xt(),this.Wt=xt(),this._h=qn(t),this.fh=new jt(this._h)}return Object.defineProperty(t.prototype,"dh",{get:function(){return this.uh},enumerable:!1,configurable:!0}),t.prototype.wh=function(t,e){var n=this,r=e?e.mh:new Mt,i=e?e.fh:this.fh,o=e?e.Wt:this.Wt,a=i,s=!1,u=Nn(this.query)&amp;&amp;i.size===this.query.limit?i.last():null,c=On(this.query)&amp;&amp;i.size===this.query.limit?i.first():null;if(t.ht(function(t,e){var h=i.get(t),f=e instanceof _n?e:null;f&amp;&amp;(f=Fn(n.query,f)?f:null);var l=!!h&amp;&amp;n.Wt.has(h.key),p=!!f&amp;&amp;(f.Je||n.Wt.has(f.key)&amp;&amp;f.hasCommittedMutations),d=!1;h&amp;&amp;f?h.data().isEqual(f.data())?l!==p&amp;&amp;(r.track({type:3,doc:f}),d=!0):n.Th(h,f)||(r.track({type:2,doc:f}),d=!0,(u&amp;&amp;n._h(f,u)&gt;0||c&amp;&amp;n._h(f,c)&lt;0)&amp;&amp;(s=!0)):!h&amp;&amp;f?(r.track({type:0,doc:f}),d=!0):h&amp;&amp;!f&amp;&amp;(r.track({type:1,doc:h}),d=!0,(u||c)&amp;&amp;(s=!0)),d&amp;&amp;(f?(a=a.add(f),o=p?o.add(t):o.delete(t)):(a=a.delete(t),o=o.delete(t)))}),Nn(this.query)||On(this.query))for(;a.size&gt;this.query.limit;){var h=Nn(this.query)?a.last():a.first();a=a.delete(h.key),o=o.delete(h.key),r.track({type:1,doc:h})}return{fh:a,mh:r,Eh:s,Wt:o}},t.prototype.Th=function(t,e){return t.Je&amp;&amp;e.hasCommittedMutations&amp;&amp;!e.Je},t.prototype.yr=function(t,e,n){var r=this,i=this.fh;this.fh=t.fh,this.Wt=t.Wt;var o=t.mh.Ut();o.sort(function(t,e){return function(t,e){var n=function(t){switch(t){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return m()}};return n(t)-n(e)}(t.type,e.type)||r._h(t.doc,e.doc)}),this.Ih(n);var a=e?this.Ah():[],s=0===this.lh.size&amp;&amp;this.te?1:0,u=s!==this.hh;return this.hh=s,0!==o.length||u?{snapshot:new Vt(this.query,t.fh,i,o,t.Wt,0===s,u,!1),Rh:a}:{Rh:a}},t.prototype.Qs=function(t){return this.te&amp;&amp;"Offline"===t?(this.te=!1,this.yr({fh:this.fh,mh:new Mt,Wt:this.Wt,Eh:!1},!1)):{Rh:[]}},t.prototype.gh=function(t){return!this.uh.has(t)&amp;&amp;!!this.fh.has(t)&amp;&amp;!this.fh.get(t).Je},t.prototype.Ih=function(t){var e=this;t&amp;&amp;(t.ee.forEach(function(t){return e.uh=e.uh.add(t)}),t.ne.forEach(function(t){}),t.se.forEach(function(t){return e.uh=e.uh.delete(t)}),this.te=t.te)},t.prototype.Ah=function(){var t=this;if(!this.te)return[];var e=this.lh;this.lh=xt(),this.fh.forEach(function(e){t.gh(e.key)&amp;&amp;(t.lh=t.lh.add(e.key))});var n=[];return e.forEach(function(e){t.lh.has(e)||n.push(new zo(e))}),this.lh.forEach(function(t){e.has(t)||n.push(new Go(t))}),n},t.prototype.Ph=function(t){this.uh=t.Fc,this.lh=xt();var e=this.wh(t.documents);return this.yr(e,!0)},t.prototype.yh=function(){return Vt.Gt(this.query,this.fh,this.Wt,0===this.hh)},t}(),Ho=function(t,e,n){this.query=t,this.targetId=e,this.view=n},Wo=function(t){this.key=t,this.Vh=!1},Xo=function(){function t(t,e,n,r,i,o){this.ju=t,this.ph=e,this.bh=n,this.Sh=r,this.currentUser=i,this.Dh=o,this.Ch={},this.Nh=new ot(function(t){return Vn(t)},Mn),this.Fh=new Map,this.xh=[],this.$h=new _t(O.i),this.kh=new Map,this.Mh=new fo,this.Oh={},this.Lh=new Map,this.Bh=zi.da(),this.onlineState="Unknown",this.qh=void 0}return Object.defineProperty(t.prototype,"Uh",{get:function(){return!0===this.qh},enumerable:!1,configurable:!0}),t}();function Jo(t,e,n,i){return r.__awaiter(this,void 0,void 0,function(){var o,a,s,u,c,h;return r.__generator(this,function(f){switch(f.label){case 0:return t.Qh=function(e,n,i){return function(t,e,n,i){return r.__awaiter(this,void 0,void 0,function(){var o,a,s;return r.__generator(this,function(r){switch(r.label){case 0:return(o=e.view.wh(n)).Eh?[4,so(t.ju,e.query,!1).then(function(t){var n=t.documents;return e.view.wh(n,o)})]:[3,2];case 1:o=r.sent(),r.label=2;case 2:return a=i&amp;&amp;i.zt.get(e.targetId),s=e.view.yr(o,t.Uh,a),[2,(oa(t,e.targetId,s.Rh),s.snapshot)]}})})}(t,e,n,i)},[4,so(t.ju,e,!0)];case 1:return o=f.sent(),a=new Ko(e,o.Fc),s=a.wh(o.documents),u=Ft.Zt(n,i&amp;&amp;"Offline"!==t.onlineState),c=a.yr(s,t.Uh,u),oa(t,n,c.Rh),h=new Ho(e,n,a),[2,(t.Nh.set(e,h),t.Fh.has(n)?t.Fh.get(n).push(e):t.Fh.set(n,[e]),c.snapshot)]}})})}function Yo(t,e){return r.__awaiter(this,void 0,void 0,function(){var n,i;return r.__generator(this,function(r){switch(r.label){case 0:n=w(t),r.label=1;case 1:return r.trys.push([1,4,,6]),[4,function(t,e){var n=w(t),r=e.nt,i=n.bc;return n.persistence.runTransaction("Apply remote event","readwrite-primary",function(t){var o=n.Dc.ra({oa:!0});i=n.bc;var a=[];e.zt.forEach(function(e,o){var s=i.get(o);if(s){a.push(n.Ka.Ca(t,e.se,o).next(function(){return n.Ka.Sa(t,e.ee,o)}));var u=e.resumeToken;if(u.O()&gt;0){var c=s.it(u,r).st(t.xa);i=i.ot(o,c),function(t,e,n){return b(e.resumeToken.O()&gt;0),0===t.resumeToken.O()||e.nt.X()-t.nt.X()&gt;=3e8||n.ee.size+n.ne.size+n.se.size&gt;0}(s,c,e)&amp;&amp;a.push(n.Ka.ya(t,c))}}});var s=Nt(),u=xt();if(e.Yt.forEach(function(t,e){u=u.add(t)}),a.push(o.getEntries(t,u).next(function(i){e.Yt.forEach(function(u,c){var h=i.get(u);c instanceof In&amp;&amp;c.version.isEqual(st.min())?(o.Ar(u,r),s=s.ot(u,c)):null==h||c.version.L(h.version)&gt;0||0===c.version.L(h.version)&amp;&amp;h.hasPendingWrites?(o.Er(c,r),s=s.ot(u,c)):d("LocalStore","Ignoring outdated watch update for ",u,". Current version:",h.version," Watch version:",c.version),e.Jt.has(u)&amp;&amp;a.push(n.persistence.No.yc(t,u))})})),!r.isEqual(st.min())){var c=n.Ka.Ea(t).next(function(e){return n.Ka.Aa(t,t.xa,r)});a.push(c)}return ar.$n(a).next(function(){return o.apply(t)}).next(function(){return n.Cc.Mr(t,s)})}).then(function(t){return n.bc=i,t})}(n.ju,e)];case 2:return i=r.sent(),e.zt.forEach(function(t,e){var r=n.kh.get(e);r&amp;&amp;(b(t.ee.size+t.ne.size+t.se.size&lt;=1),t.ee.size&gt;0?r.Vh=!0:t.ne.size&gt;0?b(r.Vh):t.se.size&gt;0&amp;&amp;(b(r.Vh),r.Vh=!1))}),[4,ua(n,i,e)];case 3:return r.sent(),[3,6];case 4:return[4,ho(r.sent())];case 5:return r.sent(),[3,6];case 6:return[2]}})})}function Qo(t,e,n){var r=w(t);if(r.Uh&amp;&amp;0===n||!r.Uh&amp;&amp;1===n){var i=[];r.Nh.forEach(function(t,n){var r=n.view.Qs(e);r.snapshot&amp;&amp;i.push(r.snapshot)}),function(t,e){var n=w(t);n.onlineState=e;var r=!1;n.Bs.forEach(function(t,n){for(var i=0,o=n.listeners;i&lt;o.length;i++)o[i].Qs(e)&amp;&amp;(r=!0)}),r&amp;&amp;Tr(n)}(r.bh,e),i.length&amp;&amp;r.Ch.yu(i),r.onlineState=e,r.Uh&amp;&amp;r.Sh.Ki(e)}}function $o(t,e,n){return r.__awaiter(this,void 0,void 0,function(){var i,o,a,s,u,c;return r.__generator(this,function(r){switch(r.label){case 0:return(i=w(t)).Sh.Qi(e,"rejected",n),o=i.kh.get(e),(a=o&amp;&amp;o.key)?(s=(s=new _t(O.i)).ot(a,new In(a,st.min())),u=xt().add(a),c=new Ut(st.min(),new Map,new Tt(Y),s,u),[4,Yo(i,c)]):[3,2];case 1:return r.sent(),i.$h=i.$h.remove(a),i.kh.delete(e),sa(i),[3,4];case 2:return[4,ao(i.ju,e,!1).then(function(){return ra(i,e,n)}).catch(ho)];case 3:r.sent(),r.label=4;case 4:return[2]}})})}function Zo(t,e){return r.__awaiter(this,void 0,void 0,function(){var n,i,o;return r.__generator(this,function(r){switch(r.label){case 0:n=w(t),i=e.batch.batchId,r.label=1;case 1:return r.trys.push([1,4,,6]),[4,function(t,e){var n=w(t);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",function(t){var r=e.batch.keys(),i=n.Dc.ra({oa:!0});return function(t,e,n,r){var i=n.batch,o=i.keys(),a=ar.resolve();return o.forEach(function(t){a=a.next(function(){return r.Rr(e,t)}).next(function(e){var o=e,a=n.dr.get(t);b(null!==a),(!o||o.version.L(a)&lt;0)&amp;&amp;(o=i.cr(t,o,n))&amp;&amp;r.Er(o,n._r)})}),a.next(function(){return t.Sr.Wo(e,i)})}(n,t,e,i).next(function(){return i.apply(t)}).next(function(){return n.Sr.zo(t)}).next(function(){return n.Cc.kr(t,r)})})}(n.ju,e)];case 2:return o=r.sent(),na(n,i,null),ea(n,i),n.Sh.ki(i,"acknowledged"),[4,ua(n,o)];case 3:return r.sent(),[3,6];case 4:return[4,ho(r.sent())];case 5:return r.sent(),[3,6];case 6:return[2]}})})}function ta(t,e,n){return r.__awaiter(this,void 0,void 0,function(){var i,o;return r.__generator(this,function(r){switch(r.label){case 0:i=w(t),r.label=1;case 1:return r.trys.push([1,4,,6]),[4,function(t,e){var n=w(t);return n.persistence.runTransaction("Reject batch","readwrite-primary",function(t){var r;return n.Sr.Oo(t,e).next(function(e){return b(null!==e),r=e.keys(),n.Sr.Wo(t,e)}).next(function(){return n.Sr.zo(t)}).next(function(){return n.Cc.kr(t,r)})})}(i.ju,e)];case 2:return o=r.sent(),na(i,e,n),ea(i,e),i.Sh.ki(e,"rejected",n),[4,ua(i,o)];case 3:return r.sent(),[3,6];case 4:return[4,ho(r.sent())];case 5:return r.sent(),[3,6];case 6:return[2]}})})}function ea(t,e){(t.Lh.get(e)||[]).forEach(function(t){t.resolve()}),t.Lh.delete(e)}function na(t,e,n){var r=w(t),i=r.Oh[r.currentUser.ti()];if(i){var o=i.get(e);o&amp;&amp;(n?o.reject(n):o.resolve(),i=i.remove(e)),r.Oh[r.currentUser.ti()]=i}}function ra(t,e,n){void 0===n&amp;&amp;(n=null),t.Sh.Bi(e);for(var r=0,i=t.Fh.get(e);r&lt;i.length;r++){var o=i[r];t.Nh.delete(o),n&amp;&amp;t.Ch.Wh(o,n)}t.Fh.delete(e),t.Uh&amp;&amp;t.Mh.Uc(e).forEach(function(e){t.Mh.Ho(e)||ia(t,e)})}function ia(t,e){var n=t.$h.get(e);null!==n&amp;&amp;(Oo(t.ph,n),t.$h=t.$h.remove(e),t.kh.delete(n),sa(t))}function oa(t,e,n){for(var r=0,i=n;r&lt;i.length;r++){var o=i[r];o instanceof Go?(t.Mh.Da(o.key,e),aa(t,o)):o instanceof zo?(d("SyncEngine","Document no longer in limbo: "+o.key),t.Mh.Na(o.key,e),t.Mh.Ho(o.key)||ia(t,o.key)):m()}}function aa(t,e){var n=e.key;t.$h.get(n)||(d("SyncEngine","New document in limbo: "+n),t.xh.push(n),sa(t))}function sa(t){for(;t.xh.length&gt;0&amp;&amp;t.$h.size&lt;t.Dh;){var e=t.xh.shift(),n=t.Bh.next();t.kh.set(n,new Wo(e)),t.$h=t.$h.ot(e,n),No(t.ph,new mt(xn(Sn(e.path)),n,2,Nr.ai))}}function ua(t,e,n){return r.__awaiter(this,void 0,void 0,function(){var i,o,a,s;return r.__generator(this,function(u){switch(u.label){case 0:return i=w(t),o=[],a=[],s=[],i.Nh.m()?[3,3]:(i.Nh.forEach(function(t,r){s.push(i.Qh(r,e,n).then(function(t){if(t){i.Uh&amp;&amp;i.Sh.Qi(r.targetId,t.fromCache?"not-current":"current"),o.push(t);var e=zr.zr(r.targetId,t);a.push(e)}}))}),[4,Promise.all(s)]);case 1:return u.sent(),i.Ch.yu(o),[4,function(t,e){return r.__awaiter(this,void 0,void 0,function(){var n,i,o,a,s,u,c,h,f;return r.__generator(this,function(r){switch(r.label){case 0:n=w(t),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,n.persistence.runTransaction("notifyLocalViewChanges","readwrite",function(t){return ar.forEach(e,function(e){return ar.forEach(e.Kr,function(r){return n.persistence.No.Da(t,e.targetId,r)}).next(function(){return ar.forEach(e.Gr,function(r){return n.persistence.No.Na(t,e.targetId,r)})})})})];case 2:return r.sent(),[3,4];case 3:if(!hr(i=r.sent()))throw i;return d("LocalStore","Failed to update sequence numbers: "+i),[3,4];case 4:for(o=0,a=e;o&lt;a.length;o++)s=a[o],u=s.targetId,s.fromCache||(c=n.bc.get(u),h=c.nt,f=c.rt(h),n.bc=n.bc.ot(u,f));return[2]}})})}(i.ju,a)];case 2:u.sent(),u.label=3;case 3:return[2]}})})}function ca(t,e){return r.__awaiter(this,void 0,void 0,function(){var n,i;return r.__generator(this,function(o){switch(o.label){case 0:return(n=w(t)).currentUser.isEqual(e)?[3,3]:(d("SyncEngine","User change. New user:",e.ti()),[4,function(t,e){return r.__awaiter(this,void 0,void 0,function(){var n,i,o,a;return r.__generator(this,function(r){switch(r.label){case 0:return n=w(t),i=n.Sr,o=n.Cc,[4,n.persistence.runTransaction("Handle user change","readonly",function(t){var r;return n.Sr.Uo(t).next(function(a){return r=a,i=n.persistence.mc(e),o=new Gr(n.Dc,i,n.persistence.Ic()),i.Uo(t)}).next(function(e){for(var n=[],i=[],a=xt(),s=0,u=r;s&lt;u.length;s++){var c=u[s];n.push(c.batchId);for(var h=0,f=c.mutations;h&lt;f.length;h++){var l=f[h];a=a.add(l.key)}}for(var p=0,d=e;p&lt;d.length;p++){var v=d[p];i.push(v.batchId);for(var y=0,g=v.mutations;y&lt;g.length;y++){var m=g[y];a=a.add(m.key)}}return o.kr(t,a).next(function(t){return{jh:t,Kh:n,Gh:i}})})})];case 1:return a=r.sent(),[2,(n.Sr=i,n.Cc=o,n.Vc.Nc(n.Cc),a)]}})})}(n.ju,e)]);case 1:return i=o.sent(),n.currentUser=e,function(t,e){t.Lh.forEach(function(t){t.forEach(function(t){t.reject(new f(h.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))})}),t.Lh.clear()}(n),n.Sh.ji(e,i.Kh,i.Gh),[4,ua(n,i.jh)];case 2:o.sent(),o.label=3;case 3:return[2]}})})}function ha(t,e){return r.__awaiter(this,void 0,void 0,function(){var n,i,o;return r.__generator(this,function(r){switch(r.label){case 0:return[4,so((n=w(t)).ju,e.query,!0)];case 1:return i=r.sent(),o=e.view.Ph(i),[2,(n.Uh&amp;&amp;oa(n,e.targetId,o.Rh),o)]}})})}function fa(t,e){return r.__awaiter(this,void 0,void 0,function(){var n,i,o,a,s,u,c,h;return r.__generator(this,function(r){switch(r.label){case 0:return va(n=w(t)),ya(n),!0!==e||!0===n.qh?[3,3]:(i=n.Sh.Ci(),[4,la(n,i.A())]);case 1:return o=r.sent(),n.qh=!0,[4,Fo(n.ph,!0)];case 2:for(r.sent(),a=0,s=o;a&lt;s.length;a++)u=s[a],No(n.ph,u);return[3,7];case 3:return!1!==e||!1===n.qh?[3,7]:(c=[],h=Promise.resolve(),n.Fh.forEach(function(t,e){n.Sh.qi(e)?c.push(e):h=h.then(function(){return ra(n,e),ao(n.ju,e,!0)}),Oo(n.ph,e)}),[4,h]);case 4:return r.sent(),[4,la(n,c)];case 5:return r.sent(),function(t){var e=w(n);e.kh.forEach(function(t,n){Oo(e.ph,n)}),e.Mh.Qc(),e.kh=new Map,e.$h=new _t(O.i)}(),n.qh=!1,[4,Fo(n.ph,!1)];case 6:r.sent(),r.label=7;case 7:return[2]}})})}function la(t,e,n){return r.__awaiter(this,void 0,void 0,function(){var n,i,o,a,s,u,c,h,f,l,p,d,v,y;return r.__generator(this,function(r){switch(r.label){case 0:n=w(t),i=[],o=[],a=0,s=e,r.label=1;case 1:return a&lt;s.length?(u=s[a],c=void 0,(h=n.Fh.get(u))&amp;&amp;0!==h.length?[4,oo(n.ju,xn(h[0]))]:[3,7]):[3,13];case 2:c=r.sent(),f=0,l=h,r.label=3;case 3:return f&lt;l.length?(p=l[f],d=n.Nh.get(p),[4,ha(n,d)]):[3,6];case 4:(v=r.sent()).snapshot&amp;&amp;o.push(v.snapshot),r.label=5;case 5:return f++,[3,3];case 6:return[3,11];case 7:return[4,uo(n.ju,u)];case 8:return y=r.sent(),[4,oo(n.ju,y)];case 9:return c=r.sent(),[4,Jo(n,pa(y),u,!1)];case 10:r.sent(),r.label=11;case 11:i.push(c),r.label=12;case 12:return a++,[3,1];case 13:return[2,(n.Ch.yu(o),i)]}})})}function pa(t){return An(t.path,t.collectionGroup,t.orderBy,t.filters,t.limit,"F",t.startAt,t.endAt)}function da(t,e,n,i){return r.__awaiter(this,void 0,void 0,function(){var o,a,s;return r.__generator(this,function(r){switch(r.label){case 0:return(o=w(t)).qh?(d("SyncEngine","Ignoring unexpected query state notification."),[3,8]):[3,1];case 1:if(!o.Fh.has(e))return[3,8];switch(n){case"current":case"not-current":return[3,2];case"rejected":return[3,5]}return[3,7];case 2:return[4,function(t){var e=w(t);return e.persistence.runTransaction("Get new document changes","readonly",function(t){return function(t,e,n){var r=w(t),i=Nt(),o=ii(n),a=wi(e),s=IDBKeyRange.lowerBound(o,!0);return a.rs({index:xi.readTimeIndex,range:s},function(t,e){var n=ni(r.serializer,e);i=i.ot(n.key,n),o=e.readTime}).next(function(){return{xc:i,readTime:oi(o)}})}(e.Dc,t,e.Sc)}).then(function(t){var n=t.xc,r=t.readTime;return e.Sc=r,n})}(o.ju)];case 3:return a=r.sent(),s=Ut.Xt(e,"current"===n),[4,ua(o,a,s)];case 4:return r.sent(),[3,8];case 5:return[4,ao(o.ju,e,!0)];case 6:return r.sent(),ra(o,e,i),[3,8];case 7:m(),r.label=8;case 8:return[2]}})})}function va(t){var e=w(t);return e.ph.Gu.sh=Yo.bind(null,e),e.ph.Gu.qe=function(t,e){var n=w(t),r=n.kh.get(e);if(r&amp;&amp;r.Vh)return xt().add(r.key);var i=xt(),o=n.Fh.get(e);if(!o)return i;for(var a=0,s=o;a&lt;s.length;a++){var u=s[a],c=n.Nh.get(u);i=i.kt(c.view.dh)}return i}.bind(null,e),e.ph.Gu.nh=$o.bind(null,e),e.Ch.yu=function(t,e){for(var n=w(t),r=!1,i=0,o=e;i&lt;o.length;i++){var a=o[i],s=a.query,u=n.Bs.get(s);if(u){for(var c=0,h=u.listeners;c&lt;h.length;c++)h[c].Ws(a)&amp;&amp;(r=!0);u.Ls=a}}r&amp;&amp;Tr(n)}.bind(null,e.bh),e.Ch.Wh=function(t,e,n){var r=w(t),i=r.Bs.get(e);if(i)for(var o=0,a=i.listeners;o&lt;a.length;o++)a[o].onError(n);r.Bs.delete(e)}.bind(null,e.bh),e}function ya(t){var e=w(t);return e.ph.Gu.ih=Zo.bind(null,e),e.ph.Gu.rh=ta.bind(null,e),e}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var ga=function(){function t(){}return t.prototype.Nc=function(t){this.zh=t},t.prototype.Lr=function(t,e,n,r){var i=this;return function(t){return 0===t.filters.length&amp;&amp;null===t.limit&amp;&amp;null==t.startAt&amp;&amp;null==t.endAt&amp;&amp;(0===t.on.length||1===t.on.length&amp;&amp;t.on[0].field.p())}(e)||n.isEqual(st.min())?this.Hh(t,e):this.zh.kr(t,r).next(function(a){var s=i.Yh(e,a);return(Nn(e)||On(e))&amp;&amp;i.Eh(e.an,s,r,n)?i.Hh(t,e):(p()&lt;=o.LogLevel.DEBUG&amp;&amp;d("IndexFreeQueryEngine","Re-using previous result from %s to execute query: %s",n.toString(),Un(e)),i.zh.Lr(t,e,n).next(function(t){return s.forEach(function(e){t=t.ot(e.key,e)}),t}))})},t.prototype.Yh=function(t,e){var n=new Tt(qn(t));return e.forEach(function(e,r){r instanceof _n&amp;&amp;Fn(t,r)&amp;&amp;(n=n.add(r))}),n},t.prototype.Eh=function(t,e,n,r){if(n.size!==e.size)return!0;var i="F"===t?e.last():e.first();return!!i&amp;&amp;(i.hasPendingWrites||i.version.L(r)&gt;0)},t.prototype.Hh=function(t,e){return p()&lt;=o.LogLevel.DEBUG&amp;&amp;d("IndexFreeQueryEngine","Using full collection scan to execute query:",Un(e)),this.zh.Lr(t,e,st.min())},t}(),ma=function(){function t(t,e){this.Dr=t,this.No=e,this.Sr=[],this.Jh=1,this.Xh=new Tt(lo.kc)}return t.prototype.$o=function(t){return ar.resolve(0===this.Sr.length)},t.prototype.ko=function(t,e,n,r){var i=this.Jh;this.Jh++,this.Sr.length&gt;0&amp;&amp;this.Sr[this.Sr.length-1];var o=new Vr(i,e,n,r);this.Sr.push(o);for(var a=0,s=r;a&lt;s.length;a++){var u=s[a];this.Xh=this.Xh.add(new lo(u.key,i)),this.Dr.Mo(t,u.key.path.h())}return ar.resolve(o)},t.prototype.Oo=function(t,e){return ar.resolve(this.Zh(e))},t.prototype.Bo=function(t,e){var n=e+1,r=this.tl(n),i=r&lt;0?0:r;return ar.resolve(this.Sr.length&gt;i?this.Sr[i]:null)},t.prototype.qo=function(){return ar.resolve(0===this.Sr.length?-1:this.Jh-1)},t.prototype.Uo=function(t){return ar.resolve(this.Sr.slice())},t.prototype.Nr=function(t,e){var n=this,r=new lo(e,0),i=new lo(e,Number.POSITIVE_INFINITY),o=[];return this.Xh.Ft([r,i],function(t){var e=n.Zh(t.jc);o.push(e)}),ar.resolve(o)},t.prototype.Or=function(t,e){var n=this,r=new Tt(Y);return e.forEach(function(t){var e=new lo(t,0),i=new lo(t,Number.POSITIVE_INFINITY);n.Xh.Ft([e,i],function(t){r=r.add(t.jc)})}),ar.resolve(this.el(r))},t.prototype.Wr=function(t,e){var n=e.path,r=n.length+1,i=n;O.F(i)||(i=i.child(""));var o=new lo(new O(i),0),a=new Tt(Y);return this.Xh.xt(function(t){var e=t.key.path;return!!n.T(e)&amp;&amp;(e.length===r&amp;&amp;(a=a.add(t.jc)),!0)},o),ar.resolve(this.el(a))},t.prototype.el=function(t){var e=this,n=[];return t.forEach(function(t){var r=e.Zh(t);null!==r&amp;&amp;n.push(r)}),n},t.prototype.Wo=function(t,e){var n=this;b(0===this.nl(e.batchId,"removed")),this.Sr.shift();var r=this.Xh;return ar.forEach(e.mutations,function(i){var o=new lo(i.key,e.batchId);return r=r.delete(o),n.No.Go(t,i.key)}).next(function(){n.Xh=r})},t.prototype.Ko=function(t){},t.prototype.Ho=function(t,e){var n=new lo(e,0),r=this.Xh.$t(n);return ar.resolve(e.isEqual(r&amp;&amp;r.key))},t.prototype.zo=function(t){return this.Sr.length,ar.resolve()},t.prototype.nl=function(t,e){return this.tl(t)},t.prototype.tl=function(t){return 0===this.Sr.length?0:t-this.Sr[0].batchId},t.prototype.Zh=function(t){var e=this.tl(t);return e&lt;0||e&gt;=this.Sr.length?null:this.Sr[e]},t}(),ba=function(){function t(t,e){this.Dr=t,this.sl=e,this.docs=new _t(O.i),this.size=0}return t.prototype.Er=function(t,e,n){var r=e.key,i=this.docs.get(r),o=i?i.size:0,a=this.sl(e);return this.docs=this.docs.ot(r,{ta:e,size:a,readTime:n}),this.size+=a-o,this.Dr.Mo(t,r.path.h())},t.prototype.Ar=function(t){var e=this.docs.get(t);e&amp;&amp;(this.docs=this.docs.remove(t),this.size-=e.size)},t.prototype.Rr=function(t,e){var n=this.docs.get(e);return ar.resolve(n?n.ta:null)},t.prototype.getEntries=function(t,e){var n=this,r=Ot();return e.forEach(function(t){var e=n.docs.get(t);r=r.ot(t,e?e.ta:null)}),ar.resolve(r)},t.prototype.Lr=function(t,e,n){for(var r=Dt(),i=new O(e.path.child("")),o=this.docs.ft(i);o.At();){var a=o.It(),s=a.key,u=a.value,c=u.ta,h=u.readTime;if(!e.path.T(s.path))break;h.L(n)&lt;=0||c instanceof _n&amp;&amp;Fn(e,c)&amp;&amp;(r=r.ot(c.key,c))}return ar.resolve(r)},t.prototype.il=function(t,e){return ar.forEach(this.docs,function(t){return e(t)})},t.prototype.ra=function(t){return new wa(this)},t.prototype.aa=function(t){return ar.resolve(this.size)},t}(),wa=function(t){function e(e){var n;return(n=t.call(this)||this).ca=e,n}return r.__extends(e,t),e.prototype.yr=function(t){var e=this,n=[];return this.wr.forEach(function(r,i){i?n.push(e.ca.Er(t,i,e.readTime)):e.ca.Ar(r)}),ar.$n(n)},e.prototype.gr=function(t,e){return this.ca.Rr(t,e)},e.prototype.Pr=function(t,e){return this.ca.getEntries(t,e)},e}(Fr),_a=function(){function t(t){this.persistence=t,this.rl=new ot(function(t){return pt(t)},dt),this.lastRemoteSnapshotVersion=st.min(),this.highestTargetId=0,this.ol=0,this.al=new fo,this.targetCount=0,this.cl=zi.fa()}return t.prototype.Ce=function(t,e){return this.rl.forEach(function(t,n){return e(n)}),ar.resolve()},t.prototype.Ea=function(t){return ar.resolve(this.lastRemoteSnapshotVersion)},t.prototype.Ia=function(t){return ar.resolve(this.ol)},t.prototype.wa=function(t){return this.highestTargetId=this.cl.next(),ar.resolve(this.highestTargetId)},t.prototype.Aa=function(t,e,n){return n&amp;&amp;(this.lastRemoteSnapshotVersion=n),e&gt;this.ol&amp;&amp;(this.ol=e),ar.resolve()},t.prototype.ga=function(t){this.rl.set(t.target,t);var e=t.targetId;e&gt;this.highestTargetId&amp;&amp;(this.cl=new zi(e),this.highestTargetId=e),t.sequenceNumber&gt;this.ol&amp;&amp;(this.ol=t.sequenceNumber)},t.prototype.Ra=function(t,e){return this.ga(e),this.targetCount+=1,ar.resolve()},t.prototype.ya=function(t,e){return this.ga(e),ar.resolve()},t.prototype.Va=function(t,e){return this.rl.delete(e.target),this.al.Uc(e.targetId),this.targetCount-=1,ar.resolve()},t.prototype.po=function(t,e,n){var r=this,i=0,o=[];return this.rl.forEach(function(a,s){s.sequenceNumber&lt;=e&amp;&amp;null===n.get(s.targetId)&amp;&amp;(r.rl.delete(a),o.push(r.pa(t,s.targetId)),i++)}),ar.$n(o).next(function(){return i})},t.prototype.ba=function(t){return ar.resolve(this.targetCount)},t.prototype.va=function(t,e){var n=this.rl.get(e)||null;return ar.resolve(n)},t.prototype.Sa=function(t,e,n){return this.al.Lc(e,n),ar.resolve()},t.prototype.Ca=function(t,e,n){this.al.qc(e,n);var r=this.persistence.No,i=[];return r&amp;&amp;e.forEach(function(e){i.push(r.Go(t,e))}),ar.$n(i)},t.prototype.pa=function(t,e){return this.al.Uc(e),ar.resolve()},t.prototype.Fa=function(t,e){var n=this.al.Wc(e);return ar.resolve(n)},t.prototype.Ho=function(t,e){return ar.resolve(this.al.Ho(e))},t}(),Ia=function(){function t(t){var e=this;this.ul={},this.Ma=new Nr(0),this.Oa=!1,this.Oa=!0,this.No=t(this),this.Ka=new _a(this),this.Dr=new Ei,this.vr=function(t,n){return new ba(t,function(t){return e.No.hl(t)})}(this.Dr)}return t.prototype.start=function(){return Promise.resolve()},t.prototype.Di=function(){return this.Oa=!1,Promise.resolve()},Object.defineProperty(t.prototype,"Ei",{get:function(){return this.Oa},enumerable:!1,configurable:!0}),t.prototype.Za=function(){},t.prototype.tc=function(){},t.prototype.Ic=function(){return this.Dr},t.prototype.mc=function(t){var e=this.ul[t.ti()];return e||(e=new ma(this.Dr,this.No),this.ul[t.ti()]=e),e},t.prototype.Tc=function(){return this.Ka},t.prototype.Ec=function(){return this.vr},t.prototype.runTransaction=function(t,e,n){var r=this;d("MemoryPersistence","Starting transaction:",t);var i=new Ea(this.Ma.next());return this.No.ll(),n(i).next(function(t){return r.No._l(i).next(function(){return t})}).Fn().then(function(t){return i.br(),t})},t.prototype.fl=function(t,e){return ar.kn(Object.values(this.ul).map(function(n){return function(){return n.Ho(t,e)}}))},t}(),Ea=function(t){function e(e){var n;return(n=t.call(this)||this).xa=e,n}return r.__extends(e,t),e}(Br),Ta=function(){function t(t){this.persistence=t,this.dl=new fo,this.wl=null}return t.ml=function(e){return new t(e)},Object.defineProperty(t.prototype,"Tl",{get:function(){if(this.wl)return this.wl;throw m()},enumerable:!1,configurable:!0}),t.prototype.Da=function(t,e,n){return this.dl.Da(n,e),this.Tl.delete(n.toString()),ar.resolve()},t.prototype.Na=function(t,e,n){return this.dl.Na(n,e),this.Tl.add(n.toString()),ar.resolve()},t.prototype.Go=function(t,e){return this.Tl.add(e.toString()),ar.resolve()},t.prototype.removeTarget=function(t,e){var n=this;this.dl.Uc(e.targetId).forEach(function(t){return n.Tl.add(t.toString())});var r=this.persistence.Tc();return r.Fa(t,e.targetId).next(function(t){t.forEach(function(t){return n.Tl.add(t.toString())})}).next(function(){return r.Va(t,e)})},t.prototype.ll=function(){this.wl=new Set},t.prototype._l=function(t){var e=this,n=this.persistence.Ec().ra();return ar.forEach(this.Tl,function(r){var i=O.D(r);return e.El(t,i).next(function(t){t||n.Ar(i)})}).next(function(){return e.wl=null,n.apply(t)})},t.prototype.yc=function(t,e){var n=this;return this.El(t,e).next(function(t){t?n.Tl.delete(e.toString()):n.Tl.add(e.toString())})},t.prototype.hl=function(t){return 0},t.prototype.El=function(t,e){var n=this;return ar.kn([function(){return ar.resolve(n.dl.Ho(e))},function(){return n.persistence.Tc().Ho(t,e)},function(){return n.persistence.fl(t,e)}])},t}(),Aa=function(){function t(t){this.Il=t.Il,this.Al=t.Al}return t.prototype.gu=function(t){this.Rl=t},t.prototype.Tu=function(t){this.gl=t},t.prototype.onMessage=function(t){this.Pl=t},t.prototype.close=function(){this.Al()},t.prototype.send=function(t){this.Il(t)},t.prototype.yl=function(){this.Rl()},t.prototype.Vl=function(t){this.gl(t)},t.prototype.pl=function(t){this.Pl(t)},t}(),Sa={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery"},Na=function(t){function e(e){var n=this;return(n=t.call(this,e)||this).forceLongPolling=e.forceLongPolling,n.W=e.W,n}return r.__extends(e,t),e.prototype.Nl=function(t,e,n,r){return new Promise(function(i,o){var a=new s.XhrIo;a.listenOnce(s.EventType.COMPLETE,function(){try{switch(a.getLastErrorCode()){case s.ErrorCode.NO_ERROR:var e=a.getResponseJson();d("Connection","XHR received:",JSON.stringify(e)),i(e);break;case s.ErrorCode.TIMEOUT:d("Connection",'RPC "'+t+'" timed out'),o(new f(h.DEADLINE_EXCEEDED,"Request time out"));break;case s.ErrorCode.HTTP_ERROR:var n=a.getStatus();if(d("Connection",'RPC "'+t+'" failed with status:',n,"response text:",a.getResponseText()),n&gt;0){var r=a.getResponseJson().error;if(r&amp;&amp;r.status&amp;&amp;r.message){var u=function(t){var e=r.status.toLowerCase().replace("_","-");return Object.values(h).indexOf(e)&gt;=0?e:h.UNKNOWN}();o(new f(u,r.message))}else o(new f(h.UNKNOWN,"Server responded with status "+a.getStatus()))}else o(new f(h.UNAVAILABLE,"Connection failed."));break;default:m()}}finally{d("Connection",'RPC "'+t+'" completed.')}});var u=JSON.stringify(r);a.send(e,"POST",u,n,15)})},e.prototype.Pu=function(t,e){var n=[this.vl,"/","google.firestore.v1.Firestore","/",t,"/channel"],r=s.createWebChannelTransport(),i={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:"projects/"+this.U.projectId+"/databases/"+this.U.database},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.W};this.Cl(i.initMessageHeaders,e),a.isMobileCordova()||a.isReactNative()||a.isElectron()||a.isIE()||a.isUWP()||a.isBrowserExtension()||(i.httpHeadersOverwriteParam="$httpHeaders");var o=n.join("");d("Connection","Creating WebChannel: "+o,i);var u=r.createWebChannel(o,i),c=!1,l=!1,p=new Aa({Il:function(t){l?d("Connection","Not sending because WebChannel is closed:",t):(c||(d("Connection","Opening WebChannel transport."),u.open(),c=!0),d("Connection","WebChannel sending:",t),u.send(t))},Al:function(){return u.close()}}),v=function(t,e){u.listen(t,function(t){try{e(t)}catch(t){setTimeout(function(){throw t},0)}})};return v(s.WebChannel.EventType.OPEN,function(){l||d("Connection","WebChannel transport opened.")}),v(s.WebChannel.EventType.CLOSE,function(){l||(l=!0,d("Connection","WebChannel transport closed"),p.Vl())}),v(s.WebChannel.EventType.ERROR,function(t){l||(l=!0,y("Connection","WebChannel transport errored:",t),p.Vl(new f(h.UNAVAILABLE,"The operation could not be completed")))}),v(s.WebChannel.EventType.MESSAGE,function(t){var e;if(!l){var n=t.data[0];b(!!n);var r=n,i=r.error||(null===(e=r[0])||void 0===e?void 0:e.error);if(i){d("Connection","WebChannel received error:",i);var o=i.status,a=function(t){var e=yt[o];if(void 0!==e)return wt(e)}(),s=i.message;void 0===a&amp;&amp;(a=h.INTERNAL,s="Unknown error status: "+o+" with message "+i.message),l=!0,p.Vl(new f(a,s)),u.close()}else d("Connection","WebChannel received:",n),p.pl(n)}}),setTimeout(function(){p.yl()},0),p},e}(function(){function t(t){this.bl=t,this.U=t.U;var e=t.ssl?"https":"http";this.vl=e+"://"+t.host,this.Sl="projects/"+this.U.projectId+"/databases/"+this.U.database+"/documents"}return t.prototype.$u=function(t,e,n,r){var i=this.Dl(t,e);d("RestConnection","Sending: ",i,n);var o={};return this.Cl(o,r),this.Nl(t,i,o,n).then(function(t){return d("RestConnection","Received: ",t),t},function(e){throw y("RestConnection",t+" failed with error: ",e,"url: ",i,"request:",n),e})},t.prototype.ku=function(t,e,n,r){return this.$u(t,e,n,r)},t.prototype.Cl=function(t,e){if(t["X-Goog-Api-Client"]="gl-js/ fire/7.24.0",t["Content-Type"]="text/plain",e)for(var n in e.Kc)e.Kc.hasOwnProperty(n)&amp;&amp;(t[n]=e.Kc[n])},t.prototype.Dl=function(t,e){var n=Sa[t];return this.vl+"/v1/"+e+":"+n},t}()),Oa=function(){function t(){var t=this;this.Fl=function(){return t.xl()},this.$l=function(){return t.kl()},this.Ml=[],this.Ol()}return t.prototype.Zu=function(t){this.Ml.push(t)},t.prototype.Di=function(){window.removeEventListener("online",this.Fl),window.removeEventListener("offline",this.$l)},t.prototype.Ol=function(){window.addEventListener("online",this.Fl),window.addEventListener("offline",this.$l)},t.prototype.xl=function(){d("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(var t=0,e=this.Ml;t&lt;e.length;t++)(0,e[t])(0)},t.prototype.kl=function(){d("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(var t=0,e=this.Ml;t&lt;e.length;t++)(0,e[t])(1)},t.Ln=function(){return"undefined"!=typeof window&amp;&amp;void 0!==window.addEventListener&amp;&amp;void 0!==window.removeEventListener},t}(),ka=function(){function t(){}return t.prototype.Zu=function(t){},t.prototype.Di=function(){},t}();
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function Da(t){return new de(t,!0)}
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var Pa="You are using the memory-only build of Firestore. Persistence support is only available via the @firebase/firestore bundle or the firebase-firestore.js build.",Ra=function(){function t(){}return t.prototype.initialize=function(t){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(e){switch(e.label){case 0:return this.Sh=this.Ll(t),this.persistence=this.Bl(t),[4,this.persistence.start()];case 1:return e.sent(),this.ql=this.Ul(t),this.ju=this.Ql(t),[2]}})})},t.prototype.Ul=function(t){return null},t.prototype.Ql=function(t){return e=this.persistence,n=new ga,r=t.Wl,new ro(e,n,r);var e,n,r},t.prototype.Bl=function(t){if(t.persistenceSettings.jl)throw new f(h.FAILED_PRECONDITION,Pa);return new Ia(Ta.ml)},t.prototype.Ll=function(t){return new Mr},t.prototype.terminate=function(){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(t){switch(t.label){case 0:return this.ql&amp;&amp;this.ql.stop(),[4,this.Sh.Di()];case 1:return t.sent(),[4,this.persistence.Di()];case 2:return t.sent(),[2]}})})},t.prototype.clearPersistence=function(t,e){throw new f(h.FAILED_PRECONDITION,Pa)},t}(),xa=function(t){function e(){return null!==t&amp;&amp;t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.initialize=function(e){return r.__awaiter(this,void 0,void 0,function(){var n,i=this;return r.__generator(this,function(o){switch(o.label){case 0:return[4,t.prototype.initialize.call(this,e)];case 1:return o.sent(),n=this.Kl.fi,this.Sh instanceof jr?(this.Sh.fi={er:function(t,e,n,i){return r.__awaiter(this,void 0,void 0,function(){var o,a;return r.__generator(this,function(r){switch(r.label){case 0:return[4,function(t,e){var n=w(t),r=w(n.Sr);return n.persistence.runTransaction("Lookup mutation documents","readonly",function(t){return r.Lo(t,e).next(function(e){return e?n.Cc.kr(t,e):ar.resolve(null)})})}((o=w(t)).ju,e)];case 1:return null===(a=r.sent())?[3,6]:"pending"!==n?[3,3]:[4,Mo(o.ph)];case 2:return r.sent(),[3,4];case 3:"acknowledged"===n||"rejected"===n?(na(o,e,i||null),ea(o,e),function(t,e){w(w(t).Sr).Ko(e)}(o.ju,e)):m(),r.label=4;case 4:return[4,ua(o,a)];case 5:return r.sent(),[3,7];case 6:d("SyncEngine","Cannot apply mutation batch with id: "+e),r.label=7;case 7:return[2]}})})}.bind(null,n),nr:da.bind(null,n),sr:function(t,e,n){return r.__awaiter(this,void 0,void 0,function(){var i,o,a,s,u,c,h,f,l,p;return r.__generator(this,function(v){switch(v.label){case 0:if(!(i=va(t)).qh)return[3,10];o=0,a=e,v.label=1;case 1:return o&lt;a.length?(s=a[o],i.Fh.has(s)?(d("SyncEngine","Adding an already active target "+s),[3,5]):[4,uo(i.ju,s)]):[3,6];case 2:return u=v.sent(),[4,oo(i.ju,u)];case 3:return c=v.sent(),[4,Jo(i,pa(u),c.targetId,!1)];case 4:v.sent(),No(i.ph,c),v.label=5;case 5:return o++,[3,1];case 6:h=function(t){return r.__generator(this,function(e){switch(e.label){case 0:return i.Fh.has(t)?[4,ao(i.ju,t,!1).then(function(){Oo(i.ph,t),ra(i,t)}).catch(ho)]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})},f=0,l=n,v.label=7;case 7:return f&lt;l.length?(p=l[f],[5,h(p)]):[3,10];case 8:v.sent(),v.label=9;case 9:return f++,[3,7];case 10:return[2]}})})}.bind(null,n),pi:function(t){return w(w(w(t).ju).persistence).pi()}.bind(null,n)},[4,this.Sh.start()]):[3,3];case 2:o.sent(),o.label=3;case 3:return[4,this.persistence.Xa(function(t){return r.__awaiter(i,void 0,void 0,function(){return r.__generator(this,function(e){switch(e.label){case 0:return[4,fa(this.Kl.fi,t)];case 1:return e.sent(),this.ql&amp;&amp;(t&amp;&amp;!this.ql.Ei?this.ql.start(this.ju):t||this.ql.stop()),[2]}})})})];case 4:return o.sent(),[2]}})})},e.prototype.Ll=function(t){if(t.persistenceSettings.jl&amp;&amp;t.persistenceSettings.synchronizeTabs){var e=yr();if(!jr.Ln(e))throw new f(h.UNIMPLEMENTED,"IndexedDB persistence is only available on platforms that support LocalStorage.");var n=no(t.bl.U,t.bl.persistenceKey);return new jr(e,t.cs,n,t.clientId,t.Wl)}return new Mr},e}(function(t){function e(e){var n;return(n=t.call(this)||this).Kl=e,n}return r.__extends(e,t),e.prototype.initialize=function(e){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(n){switch(n.label){case 0:return[4,t.prototype.initialize.call(this,e)];case 1:return n.sent(),[4,co(this.ju)];case 2:return n.sent(),[4,this.Kl.initialize(this,e)];case 3:return n.sent(),[4,ya(this.Kl.fi)];case 4:return n.sent(),[4,Mo(this.Kl.ph)];case 5:return n.sent(),[2]}})})},e.prototype.Ul=function(t){var e=this.persistence.No.wo;return new Jr(e,t.cs)},e.prototype.Bl=function(t){var e=no(t.bl.U,t.bl.persistenceKey),n=Da(t.bl.U);return new Qi(t.persistenceSettings.synchronizeTabs,e,t.clientId,Xr.ao(t.persistenceSettings.cacheSizeBytes),t.cs,yr(),gr(),n,this.Sh,t.persistenceSettings.ka)},e.prototype.Ll=function(t){return new Mr},e.prototype.clearPersistence=function(t,e){return function(t){return r.__awaiter(this,void 0,void 0,function(){var e;return r.__generator(this,function(n){switch(n.label){case 0:return sr.Ln()?(e=t+"main",[4,sr.delete(e)]):[2,Promise.resolve()];case 1:return n.sent(),[2]}})})}(no(t,e))},e}(Ra)),Ca=function(){function t(){}return t.prototype.initialize=function(t,e){return r.__awaiter(this,void 0,void 0,function(){var n=this;return r.__generator(this,function(r){switch(r.label){case 0:return this.ju?[3,2]:(this.ju=t.ju,this.Sh=t.Sh,this.Ku=this.Gl(e),this.ph=this.zl(e),this.bh=this.Hl(e),this.fi=this.Yl(e),this.Sh.di=function(t){return Qo(n.fi,t,1)},this.ph.Gu.Jl=ca.bind(null,this.fi),[4,Fo(this.ph,this.fi.Uh)]);case 1:r.sent(),r.label=2;case 2:return[2]}})})},t.prototype.Hl=function(t){return new function(){this.Bs=new ot(function(t){return Vn(t)},Mn),this.onlineState="Unknown",this.qs=new Set}},t.prototype.Gl=function(t){var e,n=Da(t.bl.U),r=(e=t.bl,new Na(e));return function(t,e,n){return new _o(t,r,n)}(t.credentials,0,n)},t.prototype.zl=function(t){var e,n,r,i,o,a=this;return e=this.ju,n=this.Ku,r=t.cs,i=function(t){return Qo(a.fi,t,0)},o=Oa.Ln()?new Oa:new ka,new Eo(e,n,r,i,o)},t.prototype.Yl=function(t){return function(t,e,n,r,i,o,a){var s=new Xo(t,e,n,r,i,o);return a&amp;&amp;(s.qh=!0),s}(this.ju,this.ph,this.bh,this.Sh,t.Wl,t.Dh,!t.persistenceSettings.jl||!t.persistenceSettings.synchronizeTabs)},t.prototype.terminate=function(){return So(this.ph)},t}(),La=function(){function t(t){this.observer=t,this.muted=!1}return t.prototype.next=function(t){this.observer.next&amp;&amp;this.Xl(this.observer.next,t)},t.prototype.error=function(t){this.observer.error&amp;&amp;this.Xl(this.observer.error,t)},t.prototype.Zl=function(){this.muted=!0},t.prototype.Xl=function(t,e){var n=this;this.muted||setTimeout(function(){n.muted||t(e)},0)},t}(),ja=function(t){!function(t,e,n,r){if(!(e instanceof Array)||e.length&lt;1)throw new f(h.INVALID_ARGUMENT,"Function FieldPath() requires its fieldNames argument to be an array with at least "+W(1,"element")+".")}(0,t);for(var e=0;e&lt;t.length;++e)if(x("FieldPath","string",e,t[e]),0===t[e].length)throw new f(h.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this.t_=new N(t)},Ma=function(t){function e(){for(var e=[],n=0;n&lt;arguments.length;n++)e[n]=arguments[n];return t.call(this,e)||this}return r.__extends(e,t),e.documentId=function(){return new e(N.v().R())},e.prototype.isEqual=function(t){if(!(t instanceof e))throw z("isEqual","FieldPath",1,t);return this.t_.isEqual(t.t_)},e}(ja),Va=new RegExp("[~\\*/\\[\\]]"),Ua=function(t){this.e_=t},Fa=function(t){function e(){return null!==t&amp;&amp;t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.n_=function(t){if(2!==t.s_)throw 1===t.s_?t.i_(this.e_+"() can only appear at the top level of your update data"):t.i_(this.e_+"() cannot be used with set() unless you pass {merge:true}");return t.We.push(t.path),null},e.prototype.isEqual=function(t){return t instanceof e},e}(Ua);function qa(t,e,n){return new Za({s_:3,r_:e.settings.r_,methodName:t.e_,o_:n},e.U,e.serializer,e.ignoreUndefinedProperties)}var Ba=function(t){function e(){return null!==t&amp;&amp;t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.n_=function(t){return new Ze(t.path,new ze)},e.prototype.isEqual=function(t){return t instanceof e},e}(Ua),Ga=function(t){function e(e,n){var r;return(r=t.call(this,e)||this).a_=n,r}return r.__extends(e,t),e.prototype.n_=function(t){var e=qa(this,t,!0),n=this.a_.map(function(t){return os(t,e)}),r=new Ke(n);return new Ze(t.path,r)},e.prototype.isEqual=function(t){return this===t},e}(Ua),za=function(t){function e(e,n){var r;return(r=t.call(this,e)||this).a_=n,r}return r.__extends(e,t),e.prototype.n_=function(t){var e=qa(this,t,!0),n=this.a_.map(function(t){return os(t,e)}),r=new We(n);return new Ze(t.path,r)},e.prototype.isEqual=function(t){return this===t},e}(Ua),Ka=function(t){function e(e,n){var r;return(r=t.call(this,e)||this).c_=n,r}return r.__extends(e,t),e.prototype.n_=function(t){var e=new Je(t.serializer,ge(t.serializer,this.c_));return new Ze(t.path,e)},e.prototype.isEqual=function(t){return this===t},e}(Ua),Ha=function(){function t(t,e){if(D("GeoPoint",arguments,2),x("GeoPoint","number",1,t),x("GeoPoint","number",2,e),!isFinite(t)||t&lt;-90||t&gt;90)throw new f(h.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+t);if(!isFinite(e)||e&lt;-180||e&gt;180)throw new f(h.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+e);this.u_=t,this.h_=e}return Object.defineProperty(t.prototype,"latitude",{get:function(){return this.u_},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"longitude",{get:function(){return this.h_},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(t){return this.u_===t.u_&amp;&amp;this.h_===t.h_},t.prototype.toJSON=function(){return{latitude:this.u_,longitude:this.h_}},t.prototype.Y=function(t){return Y(this.u_,t.u_)||Y(this.h_,t.h_)},t}(),Wa=function(t){this.l_=t},Xa=/^__.*__$/,Ja=function(t,e,n){this.__=t,this.f_=e,this.d_=n},Ya=function(){function t(t,e,n){this.data=t,this.We=e,this.fieldTransforms=n}return t.prototype.w_=function(t,e){var n=[];return null!==this.We?n.push(new hn(t,this.data,this.We,e)):n.push(new cn(t,this.data,e)),this.fieldTransforms.length&gt;0&amp;&amp;n.push(new ln(t,this.fieldTransforms)),n},t}(),Qa=function(){function t(t,e,n){this.data=t,this.We=e,this.fieldTransforms=n}return t.prototype.w_=function(t,e){var n=[new hn(t,this.data,this.We,e)];return this.fieldTransforms.length&gt;0&amp;&amp;n.push(new ln(t,this.fieldTransforms)),n},t}();function $a(t){switch(t){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw m()}}var Za=function(){function t(t,e,n,r,i,o){this.settings=t,this.U=e,this.serializer=n,this.ignoreUndefinedProperties=r,void 0===i&amp;&amp;this.m_(),this.fieldTransforms=i||[],this.We=o||[]}return Object.defineProperty(t.prototype,"path",{get:function(){return this.settings.path},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"s_",{get:function(){return this.settings.s_},enumerable:!1,configurable:!0}),t.prototype.T_=function(e){return new t(Object.assign(Object.assign({},this.settings),e),this.U,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.We)},t.prototype.E_=function(t){var e,n=null===(e=this.path)||void 0===e?void 0:e.child(t),r=this.T_({path:n,o_:!1});return r.I_(t),r},t.prototype.A_=function(t){var e,n=null===(e=this.path)||void 0===e?void 0:e.child(t),r=this.T_({path:n,o_:!1});return r.m_(),r},t.prototype.R_=function(t){return this.T_({path:void 0,o_:!0})},t.prototype.i_=function(t){return fs(t,this.settings.methodName,this.settings.g_||!1,this.path,this.settings.r_)},t.prototype.contains=function(t){return void 0!==this.We.find(function(e){return t.T(e)})||void 0!==this.fieldTransforms.find(function(e){return t.T(e.field)})},t.prototype.m_=function(){if(this.path)for(var t=0;t&lt;this.path.length;t++)this.I_(this.path.get(t))},t.prototype.I_=function(t){if(0===t.length)throw this.i_("Document fields must not be empty");if($a(this.s_)&amp;&amp;Xa.test(t))throw this.i_('Document fields cannot begin and end with "__"')},t}(),ts=function(){function t(t,e,n){this.U=t,this.ignoreUndefinedProperties=e,this.serializer=n||Da(t)}return t.prototype.P_=function(t,e,n,r){return void 0===r&amp;&amp;(r=!1),new Za({s_:t,methodName:e,r_:n,path:N.P(),o_:!1,g_:r},this.U,this.serializer,this.ignoreUndefinedProperties)},t}();function es(t,e,n,r,i,o){void 0===o&amp;&amp;(o={});var a=t.P_(o.merge||o.mergeFields?2:0,e,n,i);us("Data must be an object, but it was:",a,r);var s,u,c=as(r,a);if(o.merge)s=new $e(a.We),u=a.fieldTransforms;else if(o.mergeFields){for(var l=[],p=0,d=o.mergeFields;p&lt;d.length;p++){var v=d[p],y=void 0;if(v instanceof ja)y=v.t_;else{if("string"!=typeof v)throw m();y=hs(e,v,n)}if(!a.contains(y))throw new f(h.INVALID_ARGUMENT,"Field '"+y+"' is specified in your field mask but missing from your input data.");ls(l,y)||l.push(y)}s=new $e(l),u=a.fieldTransforms.filter(function(t){return s.Ye(t.field)})}else s=null,u=a.fieldTransforms;return new Ya(new gn(c),s,u)}function ns(t,e,n,r){var i=t.P_(1,e,n);us("Data must be an object, but it was:",i,r);var o=[],a=new mn;I(r,function(t,r){var s=hs(e,t,n),u=i.A_(s);if(r instanceof Fa||r instanceof Wa&amp;&amp;r.l_ instanceof Fa)o.push(s);else{var c=os(r,u);null!=c&amp;&amp;(o.push(s),a.set(s,c))}});var s=new $e(o);return new Qa(a.Xe(),s,i.fieldTransforms)}function rs(t,e,n,r,i,o){var a=t.P_(1,e,n),s=[cs(e,r,n)],u=[i];if(o.length%2!=0)throw new f(h.INVALID_ARGUMENT,"Function "+e+"() needs to be called with an even number of arguments that alternate between field names and values.");for(var c=0;c&lt;o.length;c+=2)s.push(cs(e,o[c])),u.push(o[c+1]);for(var l=[],p=new mn,d=s.length-1;d&gt;=0;--d)if(!ls(l,s[d])){var v=s[d],y=u[d],g=a.A_(v);if(y instanceof Fa||y instanceof Wa&amp;&amp;y.l_ instanceof Fa)l.push(v);else{var m=os(y,g);null!=m&amp;&amp;(l.push(v),p.set(v,m))}}var b=new $e(l);return new Qa(p.Xe(),b,a.fieldTransforms)}function is(t,e,n,r){return void 0===r&amp;&amp;(r=!1),os(n,t.P_(r?4:3,e))}function os(t,e){if(t instanceof Wa&amp;&amp;(t=t.l_),ss(t))return us("Unsupported field value:",e,t),as(t,e);if(t instanceof Ua)return function(t,e){if(!$a(e.s_))throw e.i_(t.e_+"() can only be used with update() and set()");if(!e.path)throw e.i_(t.e_+"() is not currently supported inside arrays");var n=t.n_(e);n&amp;&amp;e.fieldTransforms.push(n)}(t,e),null;if(e.path&amp;&amp;e.We.push(e.path),t instanceof Array){if(e.settings.o_&amp;&amp;4!==e.s_)throw e.i_("Nested arrays are not supported");return function(t,e){for(var n=[],r=0,i=0,o=t;i&lt;o.length;i++){var a=os(o[i],e.R_(r));null==a&amp;&amp;(a={nullValue:"NULL_VALUE"}),n.push(a),r++}return{arrayValue:{values:n}}}(t,e)}return function(t,e){if(null===t)return{nullValue:"NULL_VALUE"};if("number"==typeof t)return ge(e.serializer,t);if("boolean"==typeof t)return{booleanValue:t};if("string"==typeof t)return{stringValue:t};if(t instanceof Date){var n=at.fromDate(t);return{timestampValue:me(e.serializer,n)}}if(t instanceof at){var r=new at(t.seconds,1e3*Math.floor(t.nanoseconds/1e3));return{timestampValue:me(e.serializer,r)}}if(t instanceof Ha)return{geoPointValue:{latitude:t.latitude,longitude:t.longitude}};if(t instanceof tt)return{bytesValue:be(e.serializer,t.q)};if(t instanceof Ja){var i=e.U,o=t.__;if(!o.isEqual(i))throw e.i_("Document reference is for database "+o.projectId+"/"+o.database+" but should be for database "+i.projectId+"/"+i.database);return{referenceValue:_e(t.__||e.U,t.f_.path)}}if(void 0===t&amp;&amp;e.ignoreUndefinedProperties)return null;throw e.i_("Unsupported field value: "+q(t))}(t,e)}function as(t,e){var n={};return E(t)?e.path&amp;&amp;e.path.length&gt;0&amp;&amp;e.We.push(e.path):I(t,function(t,r){var i=os(r,e.E_(t));null!=i&amp;&amp;(n[t]=i)}),{mapValue:{fields:n}}}function ss(t){return!("object"!=typeof t||null===t||t instanceof Array||t instanceof Date||t instanceof at||t instanceof Ha||t instanceof tt||t instanceof Ja||t instanceof Ua)}function us(t,e,n){if(!ss(n)||!F(n)){var r=q(n);throw"an object"===r?e.i_(t+" a custom object"):e.i_(t+" "+r)}}function cs(t,e,n){if(e instanceof ja)return e.t_;if("string"==typeof e)return hs(t,e);throw fs("Field path arguments must be of type string or FieldPath.",t,!1,void 0,n)}function hs(t,e,n){try{return function(t){if(t.search(Va)&gt;=0)throw new f(h.INVALID_ARGUMENT,"Invalid field path ("+t+"). Paths must not contain '~', '*', '/', '[', or ']'");try{return new(Ma.bind.apply(Ma,r.__spreadArrays([void 0],t.split("."))))}catch(e){throw new f(h.INVALID_ARGUMENT,"Invalid field path ("+t+"). Paths must not be empty, begin with '.', end with '.', or contain '..'")}}(e).t_}catch(e){throw fs((i=e)instanceof Error?i.message:i.toString(),t,!1,void 0,n)}var i}function fs(t,e,n,r,i){var o=r&amp;&amp;!r.m(),a=void 0!==i,s="Function "+e+"() called with invalid data";n&amp;&amp;(s+=" (via `toFirestore()`)");var u="";return(o||a)&amp;&amp;(u+=" (found",o&amp;&amp;(u+=" in field "+r),a&amp;&amp;(u+=" in document "+i),u+=")"),new f(h.INVALID_ARGUMENT,(s+=". ")+t+u)}function ls(t,e){return t.some(function(t){return t.isEqual(e)})}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var ps=function(){function t(t){this.Ku=t,this.y_=new Map,this.mutations=[],this.V_=!1,this.p_=null,this.b_=new Set}return t.prototype.v_=function(t){return r.__awaiter(this,void 0,void 0,function(){var e,n=this;return r.__generator(this,function(i){switch(i.label){case 0:if(this.S_(),this.mutations.length&gt;0)throw new f(h.INVALID_ARGUMENT,"Firestore transactions require all reads to be executed before all writes.");return[4,function(t,e){return r.__awaiter(this,void 0,void 0,function(){var n,i,o,a,s,u;return r.__generator(this,function(r){switch(r.label){case 0:return n=w(t),i=Ne(n.serializer)+"/documents",o={documents:e.map(function(t){return Ee(n.serializer,t)})},[4,n.ku("BatchGetDocuments",i,o)];case 1:return a=r.sent(),s=new Map,a.forEach(function(t){var e=function(t,e){return"found"in e?function(t,e){b(!!e.found),e.found.name,e.found.updateTime;var n=Te(t,e.found.name),r=we(e.found.updateTime),i=new gn({mapValue:{fields:e.found.fields}});return new _n(n,r,i,{})}(t,e):"missing"in e?function(t,e){b(!!e.missing),b(!!e.readTime);var n=Te(t,e.missing),r=we(e.readTime);return new In(n,r)}(t,e):m()}(n.serializer,t);s.set(e.key.toString(),e)}),u=[],[2,(e.forEach(function(t){var e=s.get(t.toString());b(!!e),u.push(e)}),u)]}})})}(this.Ku,t)];case 1:return[2,((e=i.sent()).forEach(function(t){t instanceof In||t instanceof _n?n.D_(t):m()}),e)]}})})},t.prototype.set=function(t,e){this.write(e.w_(t,this.Ge(t))),this.b_.add(t.toString())},t.prototype.update=function(t,e){try{this.write(e.w_(t,this.C_(t)))}catch(t){this.p_=t}this.b_.add(t.toString())},t.prototype.delete=function(t){this.write([new vn(t,this.Ge(t))]),this.b_.add(t.toString())},t.prototype.commit=function(){return r.__awaiter(this,void 0,void 0,function(){var t,e=this;return r.__generator(this,function(n){switch(n.label){case 0:if(this.S_(),this.p_)throw this.p_;return t=this.y_,this.mutations.forEach(function(e){t.delete(e.key.toString())}),t.forEach(function(t,n){var r=O.D(n);e.mutations.push(new yn(r,e.Ge(r)))}),[4,function(t,e){return r.__awaiter(this,void 0,void 0,function(){var n,i,o;return r.__generator(this,function(r){switch(r.label){case 0:return n=w(t),i=Ne(n.serializer)+"/documents",o={writes:e.map(function(t){return De(n.serializer,t)})},[4,n.$u("Commit",i,o)];case 1:return r.sent(),[2]}})})}(this.Ku,this.mutations)];case 1:return n.sent(),this.V_=!0,[2]}})})},t.prototype.D_=function(t){var e;if(t instanceof _n)e=t.version;else{if(!(t instanceof In))throw m();e=st.min()}var n=this.y_.get(t.key.toString());if(n){if(!e.isEqual(n))throw new f(h.ABORTED,"Document version changed between two reads.")}else this.y_.set(t.key.toString(),e)},t.prototype.Ge=function(t){var e=this.y_.get(t.toString());return!this.b_.has(t.toString())&amp;&amp;e?tn.updateTime(e):tn.ze()},t.prototype.C_=function(t){var e=this.y_.get(t.toString());if(!this.b_.has(t.toString())&amp;&amp;e){if(e.isEqual(st.min()))throw new f(h.INVALID_ARGUMENT,"Can't update a document that doesn't exist.");return tn.updateTime(e)}return tn.exists(!0)},t.prototype.write=function(t){this.S_(),this.mutations=this.mutations.concat(t)},t.prototype.S_=function(){},t}(),ds=function(){function t(t,e,n,r){this.cs=t,this.Ku=e,this.updateFunction=n,this.ls=r,this.N_=5,this.ys=new or(this.cs,"transaction_retry")}return t.prototype.run=function(){this.F_()},t.prototype.F_=function(){var t=this;this.ys.gn(function(){return r.__awaiter(t,void 0,void 0,function(){var t,e,n=this;return r.__generator(this,function(r){return t=new ps(this.Ku),(e=this.x_(t))&amp;&amp;e.then(function(e){n.cs.ws(function(){return t.commit().then(function(){n.ls.resolve(e)}).catch(function(t){n.k_(t)})})}).catch(function(t){n.k_(t)}),[2]})})})},t.prototype.x_=function(t){try{var e=this.updateFunction(t);return!ut(e)&amp;&amp;e.catch&amp;&amp;e.then?e:(this.ls.reject(Error("Transaction callback must return a Promise")),null)}catch(t){return this.ls.reject(t),null}},t.prototype.k_=function(t){var e=this;this.N_&gt;0&amp;&amp;this.M_(t)?(this.N_-=1,this.cs.ws(function(){return e.F_(),Promise.resolve()})):this.ls.reject(t)},t.prototype.M_=function(t){if("FirebaseError"===t.name){var e=t.code;return"aborted"===e||"failed-precondition"===e||!bt(e)}return!1},t}(),vs=function(){function t(t,e){this.credentials=t,this.cs=e,this.clientId=J.k(),this.O_=new ir}return t.prototype.start=function(t,e,n,i){var o=this;this.L_(),this.bl=t;var a=new ir,s=!1;return this.credentials.Hc(function(t){if(!s)return s=!0,d("FirestoreClient","Initializing. user=",t.uid),o.B_(e,n,i,t,a).then(o.O_.resolve,o.O_.reject);o.cs.Cs(function(){return function(t,e){return r.__awaiter(this,void 0,void 0,function(){var n,i;return r.__generator(this,function(r){switch(r.label){case 0:return(n=w(t)).cs.xs(),d("RemoteStore","RemoteStore received new credentials"),i=xo(n),n.Yu.add(3),[4,Ao(n)];case 1:return r.sent(),i&amp;&amp;n.th.set("Unknown"),[4,n.Gu.Jl(e)];case 2:return r.sent(),n.Yu.delete(3),[4,To(n)];case 3:return r.sent(),[2]}})})}(o.ph,t)})}),this.cs.ws(function(){return o.O_.promise}),a.promise},t.prototype.enableNetwork=function(){var t=this;return this.L_(),this.cs.enqueue(function(){return t.persistence.tc(!0),function(t){var e=w(t);return e.Yu.delete(0),To(e)}(t.ph)})},t.prototype.B_=function(t,e,n,i,o){return r.__awaiter(this,void 0,void 0,function(){var a,s,u=this;return r.__generator(this,function(c){switch(c.label){case 0:return c.trys.push([0,3,,4]),a={cs:this.cs,bl:this.bl,clientId:this.clientId,credentials:this.credentials,Wl:i,Dh:100,persistenceSettings:n},[4,t.initialize(a)];case 1:return c.sent(),[4,e.initialize(t,a)];case 2:return c.sent(),this.persistence=t.persistence,this.Sh=t.Sh,this.ju=t.ju,this.ql=t.ql,this.Ku=e.Ku,this.ph=e.ph,this.fi=e.fi,this.q_=e.bh,this.q_.Us=function(t,e){return r.__awaiter(this,void 0,void 0,function(){var n,i,o,a,s,u;return r.__generator(this,function(r){switch(r.label){case 0:return n=va(t),(a=n.Nh.get(e))?(i=a.targetId,n.Sh.Oi(i),o=a.view.yh(),[3,4]):[3,1];case 1:return[4,oo(n.ju,xn(e))];case 2:return s=r.sent(),u=n.Sh.Oi(s.targetId),i=s.targetId,[4,Jo(n,e,i,"current"===u)];case 3:o=r.sent(),n.Uh&amp;&amp;No(n.ph,s),r.label=4;case 4:return[2,o]}})})}.bind(null,this.fi),this.q_.js=function(t,e){return r.__awaiter(this,void 0,void 0,function(){var n,i,o;return r.__generator(this,function(r){switch(r.label){case 0:return n=w(t),i=n.Nh.get(e),(o=n.Fh.get(i.targetId)).length&gt;1?[2,(n.Fh.set(i.targetId,o.filter(function(t){return!Mn(t,e)})),void n.Nh.delete(e))]:n.Uh?(n.Sh.Bi(i.targetId),n.Sh.Fi(i.targetId)?[3,2]:[4,ao(n.ju,i.targetId,!1).then(function(){n.Sh.Ui(i.targetId),Oo(n.ph,i.targetId),ra(n,i.targetId)}).catch(ho)]):[3,3];case 1:r.sent(),r.label=2;case 2:return[3,5];case 3:return ra(n,i.targetId),[4,ao(n.ju,i.targetId,!0)];case 4:r.sent(),r.label=5;case 5:return[2]}})})}.bind(null,this.fi),this.persistence.Za(function(){return r.__awaiter(u,void 0,void 0,function(){return r.__generator(this,function(t){switch(t.label){case 0:return[4,this.terminate()];case 1:return t.sent(),[2]}})})}),o.resolve(),[3,4];case 3:if(s=c.sent(),o.reject(s),!this.U_(s))throw s;return[2,this.B_(new Ra,new Ca,{jl:!1},i,o)];case 4:return[2]}})})},t.prototype.U_=function(t){return"FirebaseError"===t.name?t.code===h.FAILED_PRECONDITION||t.code===h.UNIMPLEMENTED:!("undefined"!=typeof DOMException&amp;&amp;t instanceof DOMException)||22===t.code||20===t.code||11===t.code},t.prototype.L_=function(){if(this.cs.ps)throw new f(h.FAILED_PRECONDITION,"The client has already been terminated.")},t.prototype.disableNetwork=function(){var t=this;return this.L_(),this.cs.enqueue(function(){return t.persistence.tc(!1),function(t){return r.__awaiter(this,void 0,void 0,function(){var e;return r.__generator(this,function(n){switch(n.label){case 0:return(e=w(t)).Yu.add(0),[4,Ao(e)];case 1:return n.sent(),e.th.set("Offline"),[2]}})})}(t.ph)})},t.prototype.terminate=function(){var t=this;this.cs.Ds();var e=new ir;return this.cs.bs(function(){return r.__awaiter(t,void 0,void 0,function(){var t,n;return r.__generator(this,function(r){switch(r.label){case 0:return r.trys.push([0,4,,5]),this.ql&amp;&amp;this.ql.stop(),[4,So(this.ph)];case 1:return r.sent(),[4,this.Sh.Di()];case 2:return r.sent(),[4,this.persistence.Di()];case 3:return r.sent(),this.credentials.Yc(),e.resolve(),[3,5];case 4:return t=r.sent(),n=wr(t,"Failed to shutdown persistence"),e.reject(n),[3,5];case 5:return[2]}})})}),e.promise},t.prototype.waitForPendingWrites=function(){var t=this;this.L_();var e=new ir;return this.cs.ws(function(){return function(t,e){return r.__awaiter(this,void 0,void 0,function(){var n,i,o,a,s;return r.__generator(this,function(r){switch(r.label){case 0:xo((n=w(t)).ph)||d("SyncEngine","The network is disabled. The task returned by 'awaitPendingWrites()' will not complete until the network is enabled."),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,function(t){var e=w(n.ju);return e.persistence.runTransaction("Get highest unacknowledged batch id","readonly",function(t){return e.Sr.qo(t)})}()];case 2:return-1===(i=r.sent())?[2,void e.resolve()]:((o=n.Lh.get(i)||[]).push(e),n.Lh.set(i,o),[3,4]);case 3:return a=r.sent(),s=wr(a,"Initialization of waitForPendingWrites() operation failed"),e.reject(s),[3,4];case 4:return[2]}})})}(t.fi,e)}),e.promise},t.prototype.listen=function(t,e,n){var r=this;this.L_();var i=new La(n),o=new Ar(t,i,e);return this.cs.ws(function(){return Ir(r.q_,o)}),function(){i.Zl(),r.cs.ws(function(){return Er(r.q_,o)})}},t.prototype.Q_=function(t){return r.__awaiter(this,void 0,void 0,function(){var e,n=this;return r.__generator(this,function(i){switch(i.label){case 0:return this.L_(),[4,this.O_.promise];case 1:return i.sent(),e=new ir,[2,(this.cs.ws(function(){return function(t,e,n){return r.__awaiter(this,void 0,void 0,function(){var i,o,a;return r.__generator(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,function(t,e){var n=w(t);return n.persistence.runTransaction("read document","readonly",function(t){return n.Cc.Cr(t,e)})}(t,e)];case 1:return(i=r.sent())instanceof _n?n.resolve(i):i instanceof In?n.resolve(null):n.reject(new f(h.UNAVAILABLE,"Failed to get document from cache. (However, this document may exist on the server. Run again without setting 'source' in the GetOptions to attempt to retrieve the document from the server.)")),[3,3];case 2:return o=r.sent(),a=wr(o,"Failed to get document '"+e+" from cache"),n.reject(a),[3,3];case 3:return[2]}})})}(n.ju,t,e)}),e.promise)]}})})},t.prototype.W_=function(t,e){return void 0===e&amp;&amp;(e={}),r.__awaiter(this,void 0,void 0,function(){var n,i=this;return r.__generator(this,function(r){switch(r.label){case 0:return this.L_(),[4,this.O_.promise];case 1:return r.sent(),n=new ir,[2,(this.cs.ws(function(){return function(t,e,n,r,i){var o=new La({next:function(o){e.ws(function(){return Er(t,a)});var s=o.docs.has(n);!s&amp;&amp;o.fromCache?i.reject(new f(h.UNAVAILABLE,"Failed to get document because the client is offline.")):s&amp;&amp;o.fromCache&amp;&amp;r&amp;&amp;"server"===r.source?i.reject(new f(h.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):i.resolve(o)},error:function(t){return i.reject(t)}}),a=new Ar(Sn(n.path),o,{includeMetadataChanges:!0,Xs:!0});return Ir(t,a)}(i.q_,i.cs,t,e,n)}),n.promise)]}})})},t.prototype.j_=function(t){return r.__awaiter(this,void 0,void 0,function(){var e,n=this;return r.__generator(this,function(i){switch(i.label){case 0:return this.L_(),[4,this.O_.promise];case 1:return i.sent(),e=new ir,[2,(this.cs.ws(function(){return function(t,e,n){return r.__awaiter(this,void 0,void 0,function(){var i,o,a,s,u,c;return r.__generator(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,so(t,e,!0)];case 1:return i=r.sent(),o=new Ko(e,i.Fc),a=o.wh(i.documents),s=o.yr(a,!1),n.resolve(s.snapshot),[3,3];case 2:return u=r.sent(),c=wr(u,"Failed to execute query '"+e+" against cache"),n.reject(c),[3,3];case 3:return[2]}})})}(n.ju,t,e)}),e.promise)]}})})},t.prototype.K_=function(t,e){return void 0===e&amp;&amp;(e={}),r.__awaiter(this,void 0,void 0,function(){var n,i=this;return r.__generator(this,function(r){switch(r.label){case 0:return this.L_(),[4,this.O_.promise];case 1:return r.sent(),n=new ir,[2,(this.cs.ws(function(){return function(t,e,n,r,i){var o=new La({next:function(n){e.ws(function(){return Er(t,a)}),n.fromCache&amp;&amp;"server"===r.source?i.reject(new f(h.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):i.resolve(n)},error:function(t){return i.reject(t)}}),a=new Ar(n,o,{includeMetadataChanges:!0,Xs:!0});return Ir(t,a)}(i.q_,i.cs,t,e,n)}),n.promise)]}})})},t.prototype.write=function(t){var e=this;this.L_();var n=new ir;return this.cs.ws(function(){return function(t,e,n){return r.__awaiter(this,void 0,void 0,function(){var i,o,a,s;return r.__generator(this,function(r){switch(r.label){case 0:i=ya(t),r.label=1;case 1:return r.trys.push([1,5,,6]),[4,function(t,e){var n,r=w(t),i=at.now(),o=e.reduce(function(t,e){return t.add(e.key)},xt());return r.persistence.runTransaction("Locally write mutations","readwrite",function(t){return r.Cc.kr(t,o).next(function(o){n=o;for(var a=[],s=0,u=e;s&lt;u.length;s++){var c=u[s],h=an(c,n.get(c.key));null!=h&amp;&amp;a.push(new hn(c.key,h,bn(h.proto.mapValue),tn.exists(!0)))}return r.Sr.ko(t,i,a,e)})}).then(function(t){var e=t.lr(n);return{batchId:t.batchId,wr:e}})}(i.ju,e)];case 2:return o=r.sent(),i.Sh.xi(o.batchId),function(t,e,n){var r=t.Oh[t.currentUser.ti()];r||(r=new _t(Y)),r=r.ot(e,n),t.Oh[t.currentUser.ti()]=r}(i,o.batchId,n),[4,ua(i,o.wr)];case 3:return r.sent(),[4,Mo(i.ph)];case 4:return r.sent(),[3,6];case 5:return a=r.sent(),s=wr(a,"Failed to persist write"),n.reject(s),[3,6];case 6:return[2]}})})}(e.fi,t,n)}),n.promise},t.prototype.U=function(){return this.bl.U},t.prototype.G_=function(t){var e=this;this.L_();var n=new La(t);return this.cs.ws(function(){return r.__awaiter(e,void 0,void 0,function(){return r.__generator(this,function(t){return[2,function(t,e){w(t).qs.add(e),e.next()}(this.q_,n)]})})}),function(){n.Zl(),e.cs.ws(function(){return r.__awaiter(e,void 0,void 0,function(){return r.__generator(this,function(t){return[2,function(t,e){w(t).qs.delete(e)}(this.q_,n)]})})})}},Object.defineProperty(t.prototype,"z_",{get:function(){return this.cs.ps},enumerable:!1,configurable:!0}),t.prototype.transaction=function(t){var e=this;this.L_();var n=new ir;return this.cs.ws(function(){return new ds(e.cs,e.Ku,t,n).run(),Promise.resolve()}),n.promise},t}();
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function ys(t){return function(t,e){if("object"!=typeof t||null===t)return!1;for(var n=t,r=0,i=["next","error","complete"];r&lt;i.length;r++){var o=i[r];if(o in n&amp;&amp;"function"==typeof n[o])return!0}return!1}(t)}var gs=function(){function t(t,e,n,r,i){this.U=t,this.timestampsInSnapshots=e,this.H_=n,this.Y_=r,this.J_=i}return t.prototype.X_=function(t){switch(Qt(t)){case 0:return null;case 1:return t.booleanValue;case 2:return ie(t.integerValue||t.doubleValue);case 3:return this.Z_(t.timestampValue);case 4:return this.tf(t);case 5:return t.stringValue;case 6:return this.J_(oe(t.bytesValue));case 7:return this.ef(t.referenceValue);case 8:return this.nf(t.geoPointValue);case 9:return this.sf(t.arrayValue);case 10:return this.if(t.mapValue);default:throw m()}},t.prototype.if=function(t){var e=this,n={};return I(t.fields||{},function(t,r){n[t]=e.X_(r)}),n},t.prototype.nf=function(t){return new Ha(ie(t.latitude),ie(t.longitude))},t.prototype.sf=function(t){var e=this;return(t.values||[]).map(function(t){return e.X_(t)})},t.prototype.tf=function(t){switch(this.H_){case"previous":var e=function t(e){var n=e.mapValue.fields.__previous_value__;return Xt(n)?t(n):n}(t);return null==e?null:this.X_(e);case"estimate":return this.Z_(Jt(t));default:return null}},t.prototype.Z_=function(t){var e=re(t),n=new at(e.seconds,e.nanos);return this.timestampsInSnapshots?n:n.toDate()},t.prototype.ef=function(t){var e=A.g(t);b(Ue(e));var n=new it(e.get(1),e.get(3)),r=new O(e.u(5));return n.isEqual(this.U)||v("Document "+r+" contains a document reference within a different database ("+n.projectId+"/"+n.database+") which is not supported. It will be treated as a reference in the current database ("+this.U.projectId+"/"+this.U.database+") instead."),this.Y_(r)},t}(),ms=Xr.ho,bs=function(){function t(t){var e,n,r,i,o;if(void 0===t.host){if(void 0!==t.ssl)throw new f(h.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else L("settings","non-empty string","host",t.host),this.host=t.host,j("settings","boolean","ssl",t.ssl),this.ssl=null===(e=t.ssl)||void 0===e||e;if(G("settings",t,["host","ssl","credentials","timestampsInSnapshots","cacheSizeBytes","experimentalForceLongPolling","experimentalAutoDetectLongPolling","ignoreUndefinedProperties"]),j("settings","object","credentials",t.credentials),this.credentials=t.credentials,j("settings","boolean","timestampsInSnapshots",t.timestampsInSnapshots),j("settings","boolean","ignoreUndefinedProperties",t.ignoreUndefinedProperties),!0===t.timestampsInSnapshots?v("The setting 'timestampsInSnapshots: true' is no longer required and should be removed."):!1===t.timestampsInSnapshots&amp;&amp;v("Support for 'timestampsInSnapshots: false' will be removed soon. You must update your code to handle Timestamp objects."),this.timestampsInSnapshots=null===(n=t.timestampsInSnapshots)||void 0===n||n,this.ignoreUndefinedProperties=null!==(r=t.ignoreUndefinedProperties)&amp;&amp;void 0!==r&amp;&amp;r,j("settings","number","cacheSizeBytes",t.cacheSizeBytes),void 0===t.cacheSizeBytes)this.cacheSizeBytes=Xr._o;else{if(t.cacheSizeBytes!==ms&amp;&amp;t.cacheSizeBytes&lt;Xr.lo)throw new f(h.INVALID_ARGUMENT,"cacheSizeBytes must be at least "+Xr.lo);this.cacheSizeBytes=t.cacheSizeBytes}j("settings","boolean","experimentalForceLongPolling",t.experimentalForceLongPolling),this.experimentalForceLongPolling=null!==(i=t.experimentalForceLongPolling)&amp;&amp;void 0!==i&amp;&amp;i,j("settings","boolean","experimentalAutoDetectLongPolling",t.experimentalAutoDetectLongPolling),this.experimentalAutoDetectLongPolling=null!==(o=t.experimentalAutoDetectLongPolling)&amp;&amp;void 0!==o&amp;&amp;o,function(t,e,n,r){if(!0===e&amp;&amp;!0===r)throw new f(h.INVALID_ARGUMENT,"experimentalForceLongPolling and experimentalAutoDetectLongPolling cannot be used together.")}(0,t.experimentalForceLongPolling,0,t.experimentalAutoDetectLongPolling)}return t.prototype.isEqual=function(t){return this.host===t.host&amp;&amp;this.ssl===t.ssl&amp;&amp;this.timestampsInSnapshots===t.timestampsInSnapshots&amp;&amp;this.credentials===t.credentials&amp;&amp;this.cacheSizeBytes===t.cacheSizeBytes&amp;&amp;this.experimentalForceLongPolling===t.experimentalForceLongPolling&amp;&amp;this.experimentalAutoDetectLongPolling===t.experimentalAutoDetectLongPolling&amp;&amp;this.ignoreUndefinedProperties===t.ignoreUndefinedProperties},t}(),ws=function(){function t(e,n,i,o){var a=this;if(void 0===i&amp;&amp;(i=new Ra),void 0===o&amp;&amp;(o=new Ca),this.rf=i,this.af=o,this.cf=null,this.uf=new br,this.INTERNAL={delete:function(){return r.__awaiter(a,void 0,void 0,function(){return r.__generator(this,function(t){switch(t.label){case 0:return this.hf(),[4,this.lf.terminate()];case 1:return t.sent(),[2]}})})}},"object"==typeof e.options){var s=e;this.cf=s,this.__=t._f(s),this.ff=s.name,this.df=new vo(n)}else{var u=e;if(!u.projectId)throw new f(h.INVALID_ARGUMENT,"Must provide projectId");this.__=new it(u.projectId,u.database),this.ff="[DEFAULT]",this.df=new po}this.wf=new bs({})}return Object.defineProperty(t.prototype,"mf",{get:function(){return this.Tf||(this.Tf=new ts(this.__,this.wf.ignoreUndefinedProperties)),this.Tf},enumerable:!1,configurable:!0}),t.prototype.settings=function(t){D("Firestore.settings",arguments,1),x("Firestore.settings","object",1,t),t.merge&amp;&amp;delete(t=Object.assign(Object.assign({},this.wf),t)).merge;var e=new bs(t);if(this.lf&amp;&amp;!this.wf.isEqual(e))throw new f(h.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only call settings() before calling any other methods on a Firestore object.");this.wf=e,void 0!==e.credentials&amp;&amp;(this.df=function(t){if(!t)return new po;switch(t.type){case"gapi":var e=t.client;return b(!("object"!=typeof e||null===e||!e.auth||!e.auth.getAuthHeaderValueForFirstParty)),new go(e,t.sessionIndex||"0");case"provider":return t.client;default:throw new f(h.INVALID_ARGUMENT,"makeCredentialsProvider failed due to invalid credential type")}}(e.credentials))},t.prototype.enableNetwork=function(){return this.hf(),this.lf.enableNetwork()},t.prototype.disableNetwork=function(){return this.hf(),this.lf.disableNetwork()},t.prototype.enablePersistence=function(t){var e,n;if(this.lf)throw new f(h.FAILED_PRECONDITION,"Firestore has already been started and persistence can no longer be enabled. You can only call enablePersistence() before calling any other methods on a Firestore object.");var r=!1,i=!1;if(t&amp;&amp;(void 0!==t.experimentalTabSynchronization&amp;&amp;v("The 'experimentalTabSynchronization' setting will be removed. Use 'synchronizeTabs' instead."),r=null!==(n=null!==(e=t.synchronizeTabs)&amp;&amp;void 0!==e?e:t.experimentalTabSynchronization)&amp;&amp;void 0!==n&amp;&amp;n,i=!!t.experimentalForceOwningTab&amp;&amp;t.experimentalForceOwningTab,r&amp;&amp;i))throw new f(h.INVALID_ARGUMENT,"The 'experimentalForceOwningTab' setting cannot be used with 'synchronizeTabs'.");return this.Ef(this.rf,this.af,{jl:!0,cacheSizeBytes:this.wf.cacheSizeBytes,synchronizeTabs:r,ka:i})},t.prototype.clearPersistence=function(){return r.__awaiter(this,void 0,void 0,function(){var t,e=this;return r.__generator(this,function(n){if(void 0!==this.lf&amp;&amp;!this.lf.z_)throw new f(h.FAILED_PRECONDITION,"Persistence can only be cleared before a Firestore instance is initialized or after it is terminated.");return t=new ir,[2,(this.uf.bs(function(){return r.__awaiter(e,void 0,void 0,function(){var e;return r.__generator(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.rf.clearPersistence(this.__,this.ff)];case 1:return n.sent(),t.resolve(),[3,3];case 2:return e=n.sent(),t.reject(e),[3,3];case 3:return[2]}})})}),t.promise)]})})},t.prototype.terminate=function(){return this.app._removeServiceInstance("firestore"),this.INTERNAL.delete()},Object.defineProperty(t.prototype,"If",{get:function(){return this.hf(),this.lf.z_},enumerable:!1,configurable:!0}),t.prototype.waitForPendingWrites=function(){return this.hf(),this.lf.waitForPendingWrites()},t.prototype.onSnapshotsInSync=function(t){if(this.hf(),ys(t))return this.lf.G_(t);x("Firestore.onSnapshotsInSync","function",1,t);var e={next:t};return this.lf.G_(e)},t.prototype.hf=function(){return this.lf||this.Ef(new Ra,new Ca,{jl:!1}),this.lf},t.prototype.Af=function(){return new function(t,e,n,r,i,o){this.U=t,this.persistenceKey=e,this.host=n,this.ssl=r,this.forceLongPolling=i,this.W=o}(this.__,this.ff,this.wf.host,this.wf.ssl,this.wf.experimentalForceLongPolling,this.wf.experimentalAutoDetectLongPolling)},t.prototype.Ef=function(t,e,n){var r=this.Af();return this.lf=new vs(this.df,this.uf),this.lf.start(r,t,e,n)},t._f=function(t){if(e=t.options,!Object.prototype.hasOwnProperty.call(e,"projectId"))throw new f(h.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');var e,n=t.options.projectId;if(!n||"string"!=typeof n)throw new f(h.INVALID_ARGUMENT,"projectId must be a string in FirebaseApp.options");return new it(n)},Object.defineProperty(t.prototype,"app",{get:function(){if(!this.cf)throw new f(h.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this.cf},enumerable:!1,configurable:!0}),t.prototype.collection=function(t){return D("Firestore.collection",arguments,1),x("Firestore.collection","non-empty string",1,t),this.hf(),new xs(A.g(t),this,null)},t.prototype.doc=function(t){return D("Firestore.doc",arguments,1),x("Firestore.doc","non-empty string",1,t),this.hf(),Es.Rf(A.g(t),this,null)},t.prototype.collectionGroup=function(t){if(D("Firestore.collectionGroup",arguments,1),x("Firestore.collectionGroup","non-empty string",1,t),t.indexOf("/")&gt;=0)throw new f(h.INVALID_ARGUMENT,"Invalid collection ID '"+t+"' passed to function Firestore.collectionGroup(). Collection IDs must not contain '/'.");return this.hf(),new Ps(function(t){return new Tn(A.P(),t)}(t),this,null)},t.prototype.runTransaction=function(t){var e=this;return D("Firestore.runTransaction",arguments,1),x("Firestore.runTransaction","function",1,t),this.hf().transaction(function(n){return t(new _s(e,n))})},t.prototype.batch=function(){return this.hf(),new Is(this)},Object.defineProperty(t,"logLevel",{get:function(){switch(p()){case o.LogLevel.DEBUG:return"debug";case o.LogLevel.ERROR:return"error";case o.LogLevel.SILENT:return"silent";case o.LogLevel.WARN:return"warn";case o.LogLevel.INFO:return"info";case o.LogLevel.VERBOSE:return"verbose";default:return"error"}},enumerable:!1,configurable:!0}),t.setLogLevel=function(t){var e;D("Firestore.setLogLevel",arguments,1),V("setLogLevel",["debug","error","silent","warn","info","verbose"],1,t),e=t,l.setLogLevel(e)},t.prototype.gf=function(){return this.wf.timestampsInSnapshots},t.prototype.Pf=function(){return this.wf},t}(),_s=function(){function t(t,e){this.yf=t,this.Vf=e}return t.prototype.get=function(t){var e=this;D("Transaction.get",arguments,1);var n=Ms("Transaction.get",t,this.yf);return this.Vf.v_([n.f_]).then(function(t){if(!t||1!==t.length)return m();var r=t[0];if(r instanceof In)return new As(e.yf,n.f_,null,!1,!1,n.d_);if(r instanceof _n)return new As(e.yf,n.f_,r,!1,!1,n.d_);throw m()})},t.prototype.set=function(t,e,n){R("Transaction.set",arguments,2,3);var r=Ms("Transaction.set",t,this.yf);n=Cs("Transaction.set",n);var i=Vs(r.d_,e,n),o=es(this.yf.mf,"Transaction.set",r.f_,i,null!==r.d_,n);return this.Vf.set(r.f_,o),this},t.prototype.update=function(t,e,n){for(var r,i,o=[],a=3;a&lt;arguments.length;a++)o[a-3]=arguments[a];return"string"==typeof e||e instanceof Ma?(P("Transaction.update",arguments,3),r=Ms("Transaction.update",t,this.yf),i=rs(this.yf.mf,"Transaction.update",r.f_,e,n,o)):(D("Transaction.update",arguments,2),r=Ms("Transaction.update",t,this.yf),i=ns(this.yf.mf,"Transaction.update",r.f_,e)),this.Vf.update(r.f_,i),this},t.prototype.delete=function(t){D("Transaction.delete",arguments,1);var e=Ms("Transaction.delete",t,this.yf);return this.Vf.delete(e.f_),this},t}(),Is=function(){function t(t){this.yf=t,this.pf=[],this.bf=!1}return t.prototype.set=function(t,e,n){R("WriteBatch.set",arguments,2,3),this.vf();var r=Ms("WriteBatch.set",t,this.yf);n=Cs("WriteBatch.set",n);var i=Vs(r.d_,e,n),o=es(this.yf.mf,"WriteBatch.set",r.f_,i,null!==r.d_,n);return this.pf=this.pf.concat(o.w_(r.f_,tn.ze())),this},t.prototype.update=function(t,e,n){for(var r,i,o=[],a=3;a&lt;arguments.length;a++)o[a-3]=arguments[a];return this.vf(),"string"==typeof e||e instanceof Ma?(P("WriteBatch.update",arguments,3),r=Ms("WriteBatch.update",t,this.yf),i=rs(this.yf.mf,"WriteBatch.update",r.f_,e,n,o)):(D("WriteBatch.update",arguments,2),r=Ms("WriteBatch.update",t,this.yf),i=ns(this.yf.mf,"WriteBatch.update",r.f_,e)),this.pf=this.pf.concat(i.w_(r.f_,tn.exists(!0))),this},t.prototype.delete=function(t){D("WriteBatch.delete",arguments,1),this.vf();var e=Ms("WriteBatch.delete",t,this.yf);return this.pf=this.pf.concat(new vn(e.f_,tn.ze())),this},t.prototype.commit=function(){return this.vf(),this.bf=!0,this.pf.length&gt;0?this.yf.hf().write(this.pf):Promise.resolve()},t.prototype.vf=function(){if(this.bf)throw new f(h.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")},t}(),Es=function(t){function e(e,n,r){var i=this;return(i=t.call(this,n.__,e,r)||this).f_=e,i.firestore=n,i.d_=r,i.lf=i.firestore.hf(),i}return r.__extends(e,t),e.Rf=function(t,n,r){if(t.length%2!=0)throw new f(h.INVALID_ARGUMENT,"Invalid document reference. Document references must have an even number of segments, but "+t.R()+" has "+t.length);return new e(new O(t),n,r)},Object.defineProperty(e.prototype,"id",{get:function(){return this.f_.path._()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return new xs(this.f_.path.h(),this.firestore,this.d_)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this.f_.path.R()},enumerable:!1,configurable:!0}),e.prototype.collection=function(t){if(D("DocumentReference.collection",arguments,1),x("DocumentReference.collection","non-empty string",1,t),!t)throw new f(h.INVALID_ARGUMENT,"Must provide a non-empty collection name to collection()");var e=A.g(t);return new xs(this.f_.path.child(e),this.firestore,null)},e.prototype.isEqual=function(t){if(!(t instanceof e))throw z("isEqual","DocumentReference",1,t);return this.firestore===t.firestore&amp;&amp;this.f_.isEqual(t.f_)&amp;&amp;this.d_===t.d_},e.prototype.set=function(t,e){R("DocumentReference.set",arguments,1,2),e=Cs("DocumentReference.set",e);var n=Vs(this.d_,t,e),r=es(this.firestore.mf,"DocumentReference.set",this.f_,n,null!==this.d_,e);return this.lf.write(r.w_(this.f_,tn.ze()))},e.prototype.update=function(t,e){for(var n,r=[],i=2;i&lt;arguments.length;i++)r[i-2]=arguments[i];return"string"==typeof t||t instanceof Ma?(P("DocumentReference.update",arguments,2),n=rs(this.firestore.mf,"DocumentReference.update",this.f_,t,e,r)):(D("DocumentReference.update",arguments,1),n=ns(this.firestore.mf,"DocumentReference.update",this.f_,t)),this.lf.write(n.w_(this.f_,tn.exists(!0)))},e.prototype.delete=function(){return D("DocumentReference.delete",arguments,0),this.lf.write([new vn(this.f_,tn.ze())])},e.prototype.onSnapshot=function(){for(var t,e,n,r=this,i=[],o=0;o&lt;arguments.length;o++)i[o]=arguments[o];R("DocumentReference.onSnapshot",arguments,1,4);var a={includeMetadataChanges:!1},s=0;"object"!=typeof i[s]||ys(i[s])||(G("DocumentReference.onSnapshot",a=i[s],["includeMetadataChanges"]),j("DocumentReference.onSnapshot","boolean","includeMetadataChanges",a.includeMetadataChanges),s++);var u={includeMetadataChanges:a.includeMetadataChanges};if(ys(i[s])){var c=i[s];i[s]=null===(t=c.next)||void 0===t?void 0:t.bind(c),i[s+1]=null===(e=c.error)||void 0===e?void 0:e.bind(c),i[s+2]=null===(n=c.complete)||void 0===n?void 0:n.bind(c)}else x("DocumentReference.onSnapshot","function",s,i[s]),C("DocumentReference.onSnapshot","function",s+1,i[s+1]),C("DocumentReference.onSnapshot","function",s+2,i[s+2]);var h={next:function(t){i[s]&amp;&amp;i[s](r.Sf(t))},error:i[s+1],complete:i[s+2]};return this.lf.listen(Sn(this.f_.path),u,h)},e.prototype.get=function(t){var e=this;R("DocumentReference.get",arguments,0,1),js("DocumentReference.get",t);var n=this.firestore.hf();return t&amp;&amp;"cache"===t.source?n.Q_(this.f_).then(function(t){return new As(e.firestore,e.f_,t,!0,t instanceof _n&amp;&amp;t.Je,e.d_)}):n.W_(this.f_,t).then(function(t){return e.Sf(t)})},e.prototype.withConverter=function(t){return new e(this.f_,this.firestore,t)},e.prototype.Sf=function(t){var e=t.docs.get(this.f_);return new As(this.firestore,this.f_,e,t.fromCache,t.hasPendingWrites,this.d_)},e}(Ja),Ts=function(){function t(t,e){this.hasPendingWrites=t,this.fromCache=e}return t.prototype.isEqual=function(t){return this.hasPendingWrites===t.hasPendingWrites&amp;&amp;this.fromCache===t.fromCache},t}(),As=function(){function t(t,e,n,r,i,o){this.yf=t,this.f_=e,this.Df=n,this.Cf=r,this.Nf=i,this.d_=o}return t.prototype.data=function(t){var e=this;if(R("DocumentSnapshot.data",arguments,0,1),t=Ls("DocumentSnapshot.data",t),this.Df){if(this.d_){var n=new Ss(this.yf,this.f_,this.Df,this.Cf,this.Nf,null);return this.d_.fromFirestore(n,t)}return new gs(this.yf.__,this.yf.gf(),t.serverTimestamps||"none",function(t){return new Es(t,e.yf,null)},function(t){return new rt(t)}).X_(this.Df.rn())}},t.prototype.get=function(t,e){var n=this;if(R("DocumentSnapshot.get",arguments,1,2),e=Ls("DocumentSnapshot.get",e),this.Df){var r=this.Df.data().field(cs("DocumentSnapshot.get",t,this.f_));if(null!==r)return new gs(this.yf.__,this.yf.gf(),e.serverTimestamps||"none",function(t){return new Es(t,n.yf,n.d_)},function(t){return new rt(t)}).X_(r)}},Object.defineProperty(t.prototype,"id",{get:function(){return this.f_.path._()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ref",{get:function(){return new Es(this.f_,this.yf,this.d_)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"exists",{get:function(){return null!==this.Df},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"metadata",{get:function(){return new Ts(this.Nf,this.Cf)},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(e){if(!(e instanceof t))throw z("isEqual","DocumentSnapshot",1,e);return this.yf===e.yf&amp;&amp;this.Cf===e.Cf&amp;&amp;this.f_.isEqual(e.f_)&amp;&amp;(null===this.Df?null===e.Df:this.Df.isEqual(e.Df))&amp;&amp;this.d_===e.d_},t}(),Ss=function(t){function e(){return null!==t&amp;&amp;t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.data=function(e){return t.prototype.data.call(this,e)},e}(As);
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function Ns(t,e,n){if("string"==typeof n){if(""===n)throw new f(h.INVALID_ARGUMENT,"Invalid query. When querying with FieldPath.documentId(), you must provide a valid document ID, but it was an empty string.");if(!Pn(e)&amp;&amp;-1!==n.indexOf("/"))throw new f(h.INVALID_ARGUMENT,"Invalid query. When querying a collection by FieldPath.documentId(), you must provide a plain document ID, but '"+n+"' contains a '/' character.");var r=e.path.child(A.g(n));if(!O.F(r))throw new f(h.INVALID_ARGUMENT,"Invalid query. When querying a collection group by FieldPath.documentId(), the value provided must result in a valid document path, but '"+r+"' is not because it has an odd number of segments ("+r.length+").");return ae(t,new O(r))}if(n instanceof Ja)return ae(t,n.f_);throw new f(h.INVALID_ARGUMENT,"Invalid query. When querying with FieldPath.documentId(), you must provide a valid string or a DocumentReference, but it was: "+q(n)+".")}function Os(t,e){if(!Array.isArray(t)||0===t.length)throw new f(h.INVALID_ARGUMENT,"Invalid Query. A non-empty array is required for '"+e.toString()+"' filters.");if(t.length&gt;10)throw new f(h.INVALID_ARGUMENT,"Invalid Query. '"+e.toString()+"' filters support a maximum of 10 elements in the value array.");if("in"===e||"array-contains-any"===e){if(t.indexOf(null)&gt;=0)throw new f(h.INVALID_ARGUMENT,"Invalid Query. '"+e.toString()+"' filters cannot contain 'null' in the value array.");if(t.filter(function(t){return Number.isNaN(t)}).length&gt;0)throw new f(h.INVALID_ARGUMENT,"Invalid Query. '"+e.toString()+"' filters cannot contain 'NaN' in the value array.")}}function ks(t,e,n){if(!n.isEqual(e))throw new f(h.INVALID_ARGUMENT,"Invalid query. You have a where filter with an inequality (&lt;, &lt;=, &gt;, or &gt;=) on field '"+e.toString()+"' and so you must also use '"+e.toString()+"' as your first orderBy(), but your first orderBy() is on field '"+n.toString()+"' instead.")}function Ds(t){if(On(t)&amp;&amp;0===t.on.length)throw new f(h.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}var Ps=function(){function t(t,e,n){this.Ff=t,this.firestore=e,this.d_=n}return t.prototype.where=function(e,n,r){D("Query.where",arguments,3),B("Query.where",3,r);var i=V("Query.where",["&lt;","&lt;=","==","!=","&gt;=","&gt;","array-contains","in","array-contains-any","not-in"],2,n),o=cs("Query.where",e),a=function(t,e,n,r,i,o,a){var s;if(i.p()){if("array-contains"===o||"array-contains-any"===o)throw new f(h.INVALID_ARGUMENT,"Invalid Query. You can't perform '"+o+"' queries on FieldPath.documentId().");if("in"===o||"not-in"===o){Os(a,o);for(var u=[],c=0,l=a;c&lt;l.length;c++){var p=l[c];u.push(Ns(r,t,p))}s={arrayValue:{values:u}}}else s=Ns(r,t,a)}else"in"!==o&amp;&amp;"not-in"!==o&amp;&amp;"array-contains-any"!==o||Os(a,o),s=is(n,e,a,"in"===o||"not-in"===o);var d=Bn.create(i,o,s);return function(t,e){if(e.hn()){var n=Dn(t);if(null!==n&amp;&amp;!n.isEqual(e.field))throw new f(h.INVALID_ARGUMENT,"Invalid query. All where filters with an inequality (&lt;, &lt;=, &gt;, or &gt;=) must be on the same field. But you have inequality filters on '"+n.toString()+"' and '"+e.field.toString()+"'");var r=kn(t);null!==r&amp;&amp;ks(0,e.field,r)}var i=function(t,e){for(var n=0,r=t.filters;n&lt;r.length;n++){var i=r[n];if(e.indexOf(i.op)&gt;=0)return i.op}return null}(t,function(t){switch(e.op){case"!=":return["!=","not-in"];case"array-contains":return["array-contains","array-contains-any","not-in"];case"in":return["array-contains-any","in","not-in"];case"array-contains-any":return["array-contains","array-contains-any","in","not-in"];case"not-in":return["array-contains","array-contains-any","in","not-in","!="];default:return[]}}());if(null!==i)throw i===e.op?new f(h.INVALID_ARGUMENT,"Invalid query. You cannot use more than one '"+e.op.toString()+"' filter."):new f(h.INVALID_ARGUMENT,"Invalid query. You cannot use '"+e.op.toString()+"' filters with '"+i.toString()+"' filters.")}(t,d),d}(this.Ff,"Query.where",this.firestore.mf,this.firestore.__,o,i,r);return new t(function(t,e){var n=t.filters.concat([e]);return new Tn(t.path,t.collectionGroup,t.on.slice(),n,t.limit,t.an,t.startAt,t.endAt)}(this.Ff,a),this.firestore,this.d_)},t.prototype.orderBy=function(e,n){var r;if(R("Query.orderBy",arguments,1,2),C("Query.orderBy","non-empty string",2,n),void 0===n||"asc"===n)r="asc";else{if("desc"!==n)throw new f(h.INVALID_ARGUMENT,"Function Query.orderBy() has unknown direction '"+n+"', expected 'asc' or 'desc'.");r="desc"}var i=cs("Query.orderBy",e),o=function(t,e,n){if(null!==t.startAt)throw new f(h.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(null!==t.endAt)throw new f(h.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");var r=new er(e,n);return function(t,e){if(null===kn(t)){var n=Dn(t);null!==n&amp;&amp;ks(0,n,e.field)}}(t,r),r}(this.Ff,i,r);return new t(function(t,e){var n=t.on.concat([e]);return new Tn(t.path,t.collectionGroup,n,t.filters.slice(),t.limit,t.an,t.startAt,t.endAt)}(this.Ff,o),this.firestore,this.d_)},t.prototype.limit=function(e){return D("Query.limit",arguments,1),x("Query.limit","number",1,e),K("Query.limit",1,e),new t(Cn(this.Ff,e,"F"),this.firestore,this.d_)},t.prototype.limitToLast=function(e){return D("Query.limitToLast",arguments,1),x("Query.limitToLast","number",1,e),K("Query.limitToLast",1,e),new t(Cn(this.Ff,e,"L"),this.firestore,this.d_)},t.prototype.startAt=function(e){for(var n=[],r=1;r&lt;arguments.length;r++)n[r-1]=arguments[r];P("Query.startAt",arguments,1);var i=this.xf("Query.startAt",e,n,!0);return new t(Ln(this.Ff,i),this.firestore,this.d_)},t.prototype.startAfter=function(e){for(var n=[],r=1;r&lt;arguments.length;r++)n[r-1]=arguments[r];P("Query.startAfter",arguments,1);var i=this.xf("Query.startAfter",e,n,!1);return new t(Ln(this.Ff,i),this.firestore,this.d_)},t.prototype.endBefore=function(e){for(var n=[],r=1;r&lt;arguments.length;r++)n[r-1]=arguments[r];P("Query.endBefore",arguments,1);var i=this.xf("Query.endBefore",e,n,!0);return new t(jn(this.Ff,i),this.firestore,this.d_)},t.prototype.endAt=function(e){for(var n=[],r=1;r&lt;arguments.length;r++)n[r-1]=arguments[r];P("Query.endAt",arguments,1);var i=this.xf("Query.endAt",e,n,!1);return new t(jn(this.Ff,i),this.firestore,this.d_)},t.prototype.isEqual=function(e){if(!(e instanceof t))throw z("isEqual","Query",1,e);return this.firestore===e.firestore&amp;&amp;Mn(this.Ff,e.Ff)&amp;&amp;this.d_===e.d_},t.prototype.withConverter=function(e){return new t(this.Ff,this.firestore,e)},t.prototype.xf=function(t,e,n,i){if(B(t,1,e),e instanceof As)return D(t,r.__spreadArrays([e],n),1),function(t,e,n,r,i){if(!r)throw new f(h.NOT_FOUND,"Can't use a DocumentSnapshot that doesn't exist for "+n+"().");for(var o=[],a=0,s=Rn(t);a&lt;s.length;a++){var u=s[a];if(u.field.p())o.push(ae(e,r.key));else{var c=r.field(u.field);if(Xt(c))throw new f(h.INVALID_ARGUMENT,'Invalid query. You are trying to start or end a query using a document for which the field "'+u.field+'" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');if(null===c){var l=u.field.R();throw new f(h.INVALID_ARGUMENT,"Invalid query. You are trying to start or end a query using a document for which the field '"+l+"' (used as the orderBy) does not exist.")}o.push(c)}}return new Qn(o,i)}(this.Ff,this.firestore.__,t,e.Df,i);var o=[e].concat(n);return function(t,e,n,r,i,o){var a=t.on;if(i.length&gt;a.length)throw new f(h.INVALID_ARGUMENT,"Too many arguments provided to "+r+"(). The number of arguments must be less than or equal to the number of orderBy() clauses");for(var s=[],u=0;u&lt;i.length;u++){var c=i[u];if(a[u].field.p()){if("string"!=typeof c)throw new f(h.INVALID_ARGUMENT,"Invalid query. Expected a string for document ID in "+r+"(), but got a "+typeof c);if(!Pn(t)&amp;&amp;-1!==c.indexOf("/"))throw new f(h.INVALID_ARGUMENT,"Invalid query. When querying a collection and ordering by FieldPath.documentId(), the value passed to "+r+"() must be a plain document ID, but '"+c+"' contains a slash.");var l=t.path.child(A.g(c));if(!O.F(l))throw new f(h.INVALID_ARGUMENT,"Invalid query. When querying a collection group and ordering by FieldPath.documentId(), the value passed to "+r+"() must result in a valid document path, but '"+l+"' is not because it contains an odd number of segments.");var p=new O(l);s.push(ae(e,p))}else{var d=is(n,r,c);s.push(d)}}return new Qn(s,o)}(this.Ff,this.firestore.__,this.firestore.mf,t,o,i)},t.prototype.onSnapshot=function(){for(var t,e,n,r=this,i=[],o=0;o&lt;arguments.length;o++)i[o]=arguments[o];R("Query.onSnapshot",arguments,1,4);var a={},s=0;if("object"!=typeof i[s]||ys(i[s])||(G("Query.onSnapshot",a=i[s],["includeMetadataChanges"]),j("Query.onSnapshot","boolean","includeMetadataChanges",a.includeMetadataChanges),s++),ys(i[s])){var u=i[s];i[s]=null===(t=u.next)||void 0===t?void 0:t.bind(u),i[s+1]=null===(e=u.error)||void 0===e?void 0:e.bind(u),i[s+2]=null===(n=u.complete)||void 0===n?void 0:n.bind(u)}else x("Query.onSnapshot","function",s,i[s]),C("Query.onSnapshot","function",s+1,i[s+1]),C("Query.onSnapshot","function",s+2,i[s+2]);var c={next:function(t){i[s]&amp;&amp;i[s](new Rs(r.firestore,r.Ff,t,r.d_))},error:i[s+1],complete:i[s+2]};return Ds(this.Ff),this.firestore.hf().listen(this.Ff,a,c)},t.prototype.get=function(t){var e=this;R("Query.get",arguments,0,1),js("Query.get",t),Ds(this.Ff);var n=this.firestore.hf();return(t&amp;&amp;"cache"===t.source?n.j_(this.Ff):n.K_(this.Ff,t)).then(function(t){return new Rs(e.firestore,e.Ff,t,e.d_)})},t}(),Rs=function(){function t(t,e,n,r){this.yf=t,this.$f=e,this.kf=n,this.d_=r,this.Mf=null,this.Of=null,this.metadata=new Ts(n.hasPendingWrites,n.fromCache)}return Object.defineProperty(t.prototype,"docs",{get:function(){var t=[];return this.forEach(function(e){return t.push(e)}),t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"empty",{get:function(){return this.kf.docs.m()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this.kf.docs.size},enumerable:!1,configurable:!0}),t.prototype.forEach=function(t,e){var n=this;R("QuerySnapshot.forEach",arguments,1,2),x("QuerySnapshot.forEach","function",1,t),this.kf.docs.forEach(function(r){t.call(e,n.Lf(r,n.metadata.fromCache,n.kf.Wt.has(r.key)))})},Object.defineProperty(t.prototype,"query",{get:function(){return new Ps(this.$f,this.yf,this.d_)},enumerable:!1,configurable:!0}),t.prototype.docChanges=function(t){t&amp;&amp;(G("QuerySnapshot.docChanges",t,["includeMetadataChanges"]),j("QuerySnapshot.docChanges","boolean","includeMetadataChanges",t.includeMetadataChanges));var e=!(!t||!t.includeMetadataChanges);if(e&amp;&amp;this.kf.Kt)throw new f(h.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this.Mf&amp;&amp;this.Of===e||(this.Mf=function(t,e,n){if(t.Qt.m()){var r=0;return t.docChanges.map(function(e){var i=n(e.doc,t.fromCache,t.Wt.has(e.doc.key));return e.doc,{type:"added",doc:i,oldIndex:-1,newIndex:r++}})}var i=t.Qt;return t.docChanges.filter(function(t){return e||3!==t.type}).map(function(e){var r=n(e.doc,t.fromCache,t.Wt.has(e.doc.key)),o=-1,a=-1;return 0!==e.type&amp;&amp;(o=i.indexOf(e.doc.key),i=i.delete(e.doc.key)),1!==e.type&amp;&amp;(a=(i=i.add(e.doc)).indexOf(e.doc.key)),{type:function(t){switch(t){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return m()}}(e.type),doc:r,oldIndex:o,newIndex:a}})}(this.kf,e,this.Lf.bind(this)),this.Of=e),this.Mf},t.prototype.isEqual=function(e){if(!(e instanceof t))throw z("isEqual","QuerySnapshot",1,e);return this.yf===e.yf&amp;&amp;Mn(this.$f,e.$f)&amp;&amp;this.kf.isEqual(e.kf)&amp;&amp;this.d_===e.d_},t.prototype.Lf=function(t,e,n){return new Ss(this.yf,t.key,t,e,n,this.d_)},t}(),xs=function(t){function e(e,n,r){var i;if((i=t.call(this,Sn(e),n,r)||this).Bf=e,e.length%2!=1)throw new f(h.INVALID_ARGUMENT,"Invalid collection reference. Collection references must have an odd number of segments, but "+e.R()+" has "+e.length);return i}return r.__extends(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this.Ff.path._()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){var t=this.Ff.path.h();return t.m()?null:new Es(new O(t),this.firestore,null)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this.Ff.path.R()},enumerable:!1,configurable:!0}),e.prototype.doc=function(t){R("CollectionReference.doc",arguments,0,1),0===arguments.length&amp;&amp;(t=J.k()),x("CollectionReference.doc","non-empty string",1,t);var e=A.g(t);return Es.Rf(this.Ff.path.child(e),this.firestore,this.d_)},e.prototype.add=function(t){D("CollectionReference.add",arguments,1);var e=this.d_?this.d_.toFirestore(t):t;x("CollectionReference.add","object",1,e);var n=this.doc();return new Es(n.f_,this.firestore,null).set(e).then(function(){return n})},e.prototype.withConverter=function(t){return new e(this.Bf,this.firestore,t)},e}(Ps);function Cs(t,e){if(void 0===e)return{merge:!1};if(G(t,e,["merge","mergeFields"]),j(t,"boolean","merge",e.merge),function(t,e,n,r,i){void 0!==r&amp;&amp;function(t,e,n,r,i){if(!(r instanceof Array))throw new f(h.INVALID_ARGUMENT,"Function "+t+"() requires its "+e+" option to be an array, but it was: "+q(r));for(var o=0;o&lt;r.length;++o)if(!i(r[o]))throw new f(h.INVALID_ARGUMENT,"Function "+t+"() requires all "+e+" elements to be a string or a FieldPath, but the value at index "+o+" was: "+q(r[o]))}(t,"mergeFields",0,r,function(t){return"string"==typeof t||t instanceof Ma})}(t,0,0,e.mergeFields),void 0!==e.mergeFields&amp;&amp;void 0!==e.merge)throw new f(h.INVALID_ARGUMENT,"Invalid options passed to function "+t+'(): You cannot specify both "merge" and "mergeFields".');return e}function Ls(t,e){return void 0===e?{}:(G(t,e,["serverTimestamps"]),M(t,0,"serverTimestamps",e.serverTimestamps,["estimate","previous","none"]),e)}function js(t,e){C(t,"object",1,e),e&amp;&amp;(G(t,e,["source"]),M(t,0,"source",e.source,["default","server","cache"]))}function Ms(t,e,n){if(e instanceof Ja){if(e.firestore!==n)throw new f(h.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return e}throw z(t,"DocumentReference",1,e)}function Vs(t,e,n){return t?n&amp;&amp;(n.merge||n.mergeFields)?t.toFirestore(e,n):t.toFirestore(e):e}
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var Us=function(t){function e(){return null!==t&amp;&amp;t.apply(this,arguments)||this}return r.__extends(e,t),e.serverTimestamp=function(){k("FieldValue.serverTimestamp",arguments);var t=new Ba("serverTimestamp");return t.e_="FieldValue.serverTimestamp",new e(t)},e.delete=function(){k("FieldValue.delete",arguments);var t=new Fa("deleteField");return t.e_="FieldValue.delete",new e(t)},e.arrayUnion=function(){for(var t=[],n=0;n&lt;arguments.length;n++)t[n]=arguments[n];P("FieldValue.arrayUnion",arguments,1);var r=function(){for(var t=[],e=0;e&lt;arguments.length;e++)t[e]=arguments[e];return P("arrayUnion()",arguments,1),new Ga("arrayUnion",t)}.apply(void 0,t);return r.e_="FieldValue.arrayUnion",new e(r)},e.arrayRemove=function(){for(var t=[],n=0;n&lt;arguments.length;n++)t[n]=arguments[n];P("FieldValue.arrayRemove",arguments,1);var r=function(){for(var t=[],e=0;e&lt;arguments.length;e++)t[e]=arguments[e];return P("arrayRemove()",arguments,1),new za("arrayRemove",t)}.apply(void 0,t);return r.e_="FieldValue.arrayRemove",new e(r)},e.increment=function(t){x("FieldValue.increment","number",1,t),D("FieldValue.increment",arguments,1);var n=function(t){return new Ka("increment",t)}(t);return n.e_="FieldValue.increment",new e(n)},e.prototype.isEqual=function(t){return this.l_.isEqual(t.l_)},e}(Wa),Fs={Firestore:ws,GeoPoint:Ha,Timestamp:at,Blob:rt,Transaction:_s,WriteBatch:Is,DocumentReference:Es,DocumentSnapshot:As,Query:Ps,QueryDocumentSnapshot:Ss,QuerySnapshot:Rs,CollectionReference:xs,FieldPath:Ma,FieldValue:Us,setLogLevel:ws.setLogLevel,CACHE_SIZE_UNLIMITED:ms};
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function qs(t){!function(t,e){t.INTERNAL.registerComponent(new u.Component("firestore",function(t){return function(t,e){var n=new Ca,r=new xa(n);return new ws(t,e,r,n)}(t.getProvider("app").getImmediate(),t.getProvider("auth-internal"))},"PUBLIC").setServiceProps(Object.assign({},Fs)))}(t),t.registerVersion("@firebase/firestore","1.18.0")}qs(c.default),e.__PRIVATE_registerFirestore=qs}).call(e,n("lNQ5"))},ZKbr:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.__extends=function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},n.d(e,"__assign",function(){return i}),e.__rest=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&amp;&amp;e.indexOf(r)&lt;0&amp;&amp;(n[r]=t[r]);if(null!=t&amp;&amp;"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i&lt;r.length;i++)e.indexOf(r[i])&lt;0&amp;&amp;Object.prototype.propertyIsEnumerable.call(t,r[i])&amp;&amp;(n[r[i]]=t[r[i]]);return n},e.__decorate=function(t,e,n,r){var i,o=arguments.length,a=o&lt;3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&amp;&amp;"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s&gt;=0;s--)(i=t[s])&amp;&amp;(a=(o&lt;3?i(a):o&gt;3?i(e,n,a):i(e,n))||a);return o&gt;3&amp;&amp;a&amp;&amp;Object.defineProperty(e,n,a),a},e.__param=function(t,e){return function(n,r){e(n,r,t)}},e.__metadata=function(t,e){if("object"==typeof Reflect&amp;&amp;"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},e.__awaiter=function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,s)}u((r=r.apply(t,e||[])).next())})},e.__generator=function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&amp;i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&amp;&amp;(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&amp;&amp;(i=2&amp;o[0]?r.return:o[0]?r.throw||((i=r.return)&amp;&amp;i.call(r),0):r.next)&amp;&amp;!(i=i.call(r,o[1])).done)return i;switch(r=0,i&amp;&amp;(o=[2&amp;o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length&gt;0&amp;&amp;i[i.length-1])&amp;&amp;(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&amp;&amp;(!i||o[1]&gt;i[0]&amp;&amp;o[1]&lt;i[3])){a.label=o[1];break}if(6===o[0]&amp;&amp;a.label&lt;i[1]){a.label=i[1],i=o;break}if(i&amp;&amp;a.label&lt;i[2]){a.label=i[2],a.ops.push(o);break}i[2]&amp;&amp;a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&amp;o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},e.__createBinding=function(t,e,n,r){void 0===r&amp;&amp;(r=n);t[r]=e[n]},e.__exportStar=function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||(e[n]=t[n])},e.__values=o,e.__read=a,e.__spread=function(){for(var t=[],e=0;e&lt;arguments.length;e++)t=t.concat(a(arguments[e]));return t},e.__spreadArrays=function(){for(var t=0,e=0,n=arguments.length;e&lt;n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e&lt;n;e++)for(var o=arguments[e],a=0,s=o.length;a&lt;s;a++,i++)r[i]=o[a];return r},e.__await=s,e.__asyncGenerator=function(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(t,e||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(t){i[t]&amp;&amp;(r[t]=function(e){return new Promise(function(n,r){o.push([t,e,n,r])&gt;1||u(t,e)})})}function u(t,e){try{(n=i[t](e)).value instanceof s?Promise.resolve(n.value.v).then(c,h):f(o[0][2],n)}catch(t){f(o[0][3],t)}var n}function c(t){u("next",t)}function h(t){u("throw",t)}function f(t,e){t(e),o.shift(),o.length&amp;&amp;u(o[0][0],o[0][1])}},e.__asyncDelegator=function(t){var e,n;return e={},r("next"),r("throw",function(t){throw t}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){e[r]=t[r]?function(e){return(n=!n)?{value:s(t[r](e)),done:"return"===r}:i?i(e):e}:i}},e.__asyncValues=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=o(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&amp;&amp;function(e){return new Promise(function(r,i){e=t[n](e),function(t,e,n,r){Promise.resolve(r).then(function(e){t({value:e,done:n})},e)}(r,i,e.done,e.value)})}}},e.__makeTemplateObject=function(t,e){Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e;return t},e.__importStar=function(t){if(t&amp;&amp;t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&amp;&amp;(e[n]=t[n]);return e.default=t,e},e.__importDefault=function(t){return t&amp;&amp;t.__esModule?t:{default:t}},e.__classPrivateFieldGet=function(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)},e.__classPrivateFieldSet=function(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n};
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&amp;&amp;(t[n]=e[n])})(t,e)};var i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n&lt;r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&amp;&amp;(t[i]=e[i]);return t}).apply(this,arguments)};function o(t){var e="function"==typeof Symbol&amp;&amp;Symbol.iterator,n=e&amp;&amp;t[e],r=0;if(n)return n.call(t);if(t&amp;&amp;"number"==typeof t.length)return{next:function(){return t&amp;&amp;r&gt;=t.length&amp;&amp;(t=void 0),{value:t&amp;&amp;t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(t,e){var n="function"==typeof Symbol&amp;&amp;t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- &gt;0)&amp;&amp;!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&amp;&amp;!r.done&amp;&amp;(n=o.return)&amp;&amp;n.call(o)}finally{if(i)throw i.error}}return a}function s(t){return this instanceof s?(this.v=t,this):new s(t)}},fjI4:function(t,e,n){"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
function r(){for(var t=0,e=0,n=arguments.length;e&lt;n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e&lt;n;e++)for(var o=arguments[e],a=0,s=o.length;a&lt;s;a++,i++)r[i]=o[a];return r}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var i;Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"LogLevel",function(){return o}),n.d(e,"Logger",function(){return f}),n.d(e,"setLogLevel",function(){return l}),n.d(e,"setUserLogHandler",function(){return p});var o,a=[];!function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"}(o||(o={}));var s={debug:o.DEBUG,verbose:o.VERBOSE,info:o.INFO,warn:o.WARN,error:o.ERROR,silent:o.SILENT},u=o.INFO,c=((i={})[o.DEBUG]="log",i[o.VERBOSE]="log",i[o.INFO]="info",i[o.WARN]="warn",i[o.ERROR]="error",i),h=function(t,e){for(var n=[],r=2;r&lt;arguments.length;r++)n[r-2]=arguments[r];if(!(e&lt;t.logLevel)){(new Date).toISOString();var i=c[e];if(!i)throw new Error("Attempted to log a message with an invalid logType (value: "+e+")")}},f=function(){function t(t){this.name=t,this._logLevel=u,this._logHandler=h,this._userLogHandler=null,a.push(this)}return Object.defineProperty(t.prototype,"logLevel",{get:function(){return this._logLevel},set:function(t){if(!(t in o))throw new TypeError('Invalid value "'+t+'" assigned to `logLevel`');this._logLevel=t},enumerable:!1,configurable:!0}),t.prototype.setLogLevel=function(t){this._logLevel="string"==typeof t?s[t]:t},Object.defineProperty(t.prototype,"logHandler",{get:function(){return this._logHandler},set:function(t){if("function"!=typeof t)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userLogHandler",{get:function(){return this._userLogHandler},set:function(t){this._userLogHandler=t},enumerable:!1,configurable:!0}),t.prototype.debug=function(){for(var t=[],e=0;e&lt;arguments.length;e++)t[e]=arguments[e];this._userLogHandler&amp;&amp;this._userLogHandler.apply(this,r([this,o.DEBUG],t)),this._logHandler.apply(this,r([this,o.DEBUG],t))},t.prototype.log=function(){for(var t=[],e=0;e&lt;arguments.length;e++)t[e]=arguments[e];this._userLogHandler&amp;&amp;this._userLogHandler.apply(this,r([this,o.VERBOSE],t)),this._logHandler.apply(this,r([this,o.VERBOSE],t))},t.prototype.info=function(){for(var t=[],e=0;e&lt;arguments.length;e++)t[e]=arguments[e];this._userLogHandler&amp;&amp;this._userLogHandler.apply(this,r([this,o.INFO],t)),this._logHandler.apply(this,r([this,o.INFO],t))},t.prototype.warn=function(){for(var t=[],e=0;e&lt;arguments.length;e++)t[e]=arguments[e];this._userLogHandler&amp;&amp;this._userLogHandler.apply(this,r([this,o.WARN],t)),this._logHandler.apply(this,r([this,o.WARN],t))},t.prototype.error=function(){for(var t=[],e=0;e&lt;arguments.length;e++)t[e]=arguments[e];this._userLogHandler&amp;&amp;this._userLogHandler.apply(this,r([this,o.ERROR],t)),this._logHandler.apply(this,r([this,o.ERROR],t))},t}();function l(t){a.forEach(function(e){e.setLogLevel(t)})}function p(t,e){for(var n=function(n){var r=null;e&amp;&amp;e.level&amp;&amp;(r=s[e.level]),n.userLogHandler=null===t?null:function(e,n){for(var i=[],a=2;a&lt;arguments.length;a++)i[a-2]=arguments[a];var s=i.map(function(t){if(null==t)return null;if("string"==typeof t)return t;if("number"==typeof t||"boolean"==typeof t)return t.toString();if(t instanceof Error)return t.message;try{return JSON.stringify(t)}catch(t){return null}}).filter(function(t){return t}).join(" ");n&gt;=(null!==r&amp;&amp;void 0!==r?r:e.logLevel)&amp;&amp;t({level:o[n].toLowerCase(),message:s,args:i,type:e.name})}},r=0,i=a;r&lt;i.length;r++){n(i[r])}}},l0SK:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("8tJR"),i=n("Pxmi"),o=function(){function t(t,e,n){this.name=t,this.instanceFactory=e,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY"}return t.prototype.setInstantiationMode=function(t){return this.instantiationMode=t,this},t.prototype.setMultipleInstances=function(t){return this.multipleInstances=t,this},t.prototype.setServiceProps=function(t){return this.serviceProps=t,this},t}(),a="[DEFAULT]",s=function(){function t(t,e){this.name=t,this.container=e,this.component=null,this.instances=new Map,this.instancesDeferred=new Map}return t.prototype.get=function(t){void 0===t&amp;&amp;(t=a);var e=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(e)){var n=new i.Deferred;this.instancesDeferred.set(e,n);try{var r=this.getOrInitializeService(e);r&amp;&amp;n.resolve(r)}catch(t){}}return this.instancesDeferred.get(e).promise},t.prototype.getImmediate=function(t){var e=r.__assign({identifier:a,optional:!1},t),n=e.identifier,i=e.optional,o=this.normalizeInstanceIdentifier(n);try{var s=this.getOrInitializeService(o);if(!s){if(i)return null;throw Error("Service "+this.name+" is not available")}return s}catch(t){if(i)return null;throw t}},t.prototype.getComponent=function(){return this.component},t.prototype.setComponent=function(t){var e,n;if(t.name!==this.name)throw Error("Mismatching Component "+t.name+" for Provider "+this.name+".");if(this.component)throw Error("Component for "+this.name+" has already been provided");if(this.component=t,function(t){return"EAGER"===t.instantiationMode}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */(t))try{this.getOrInitializeService(a)}catch(t){}try{for(var i=r.__values(this.instancesDeferred.entries()),o=i.next();!o.done;o=i.next()){var s=r.__read(o.value,2),u=s[0],c=s[1],h=this.normalizeInstanceIdentifier(u);try{var f=this.getOrInitializeService(h);c.resolve(f)}catch(t){}}}catch(t){e={error:t}}finally{try{o&amp;&amp;!o.done&amp;&amp;(n=i.return)&amp;&amp;n.call(i)}finally{if(e)throw e.error}}},t.prototype.clearInstance=function(t){void 0===t&amp;&amp;(t=a),this.instancesDeferred.delete(t),this.instances.delete(t)},t.prototype.delete=function(){return r.__awaiter(this,void 0,void 0,function(){var t;return r.__generator(this,function(e){switch(e.label){case 0:return t=Array.from(this.instances.values()),[4,Promise.all(r.__spread(t.filter(function(t){return"INTERNAL"in t}).map(function(t){return t.INTERNAL.delete()}),t.filter(function(t){return"_delete"in t}).map(function(t){return t._delete()})))];case 1:return e.sent(),[2]}})})},t.prototype.isComponentSet=function(){return null!=this.component},t.prototype.getOrInitializeService=function(t){var e=this.instances.get(t);return!e&amp;&amp;this.component&amp;&amp;(e=this.component.instanceFactory(this.container,function(t){return t===a?void 0:t}(t)),this.instances.set(t,e)),e||null},t.prototype.normalizeInstanceIdentifier=function(t){return this.component?this.component.multipleInstances?t:a:t},t}();var u=function(){function t(t){this.name=t,this.providers=new Map}return t.prototype.addComponent=function(t){var e=this.getProvider(t.name);if(e.isComponentSet())throw new Error("Component "+t.name+" has already been registered with "+this.name);e.setComponent(t)},t.prototype.addOrOverwriteComponent=function(t){this.getProvider(t.name).isComponentSet()&amp;&amp;this.providers.delete(t.name),this.addComponent(t)},t.prototype.getProvider=function(t){if(this.providers.has(t))return this.providers.get(t);var e=new s(t,this);return this.providers.set(t,e),e},t.prototype.getProviders=function(){return Array.from(this.providers.values())},t}();e.Component=o,e.ComponentContainer=u,e.Provider=s},l7Gt:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.__extends=function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},n.d(e,"__assign",function(){return i}),e.__rest=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&amp;&amp;e.indexOf(r)&lt;0&amp;&amp;(n[r]=t[r]);if(null!=t&amp;&amp;"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i&lt;r.length;i++)e.indexOf(r[i])&lt;0&amp;&amp;Object.prototype.propertyIsEnumerable.call(t,r[i])&amp;&amp;(n[r[i]]=t[r[i]]);return n},e.__decorate=function(t,e,n,r){var i,o=arguments.length,a=o&lt;3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&amp;&amp;"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s&gt;=0;s--)(i=t[s])&amp;&amp;(a=(o&lt;3?i(a):o&gt;3?i(e,n,a):i(e,n))||a);return o&gt;3&amp;&amp;a&amp;&amp;Object.defineProperty(e,n,a),a},e.__param=function(t,e){return function(n,r){e(n,r,t)}},e.__metadata=function(t,e){if("object"==typeof Reflect&amp;&amp;"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},e.__awaiter=function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,s)}u((r=r.apply(t,e||[])).next())})},e.__generator=function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&amp;i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&amp;&amp;(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&amp;&amp;(i=2&amp;o[0]?r.return:o[0]?r.throw||((i=r.return)&amp;&amp;i.call(r),0):r.next)&amp;&amp;!(i=i.call(r,o[1])).done)return i;switch(r=0,i&amp;&amp;(o=[2&amp;o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length&gt;0&amp;&amp;i[i.length-1])&amp;&amp;(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&amp;&amp;(!i||o[1]&gt;i[0]&amp;&amp;o[1]&lt;i[3])){a.label=o[1];break}if(6===o[0]&amp;&amp;a.label&lt;i[1]){a.label=i[1],i=o;break}if(i&amp;&amp;a.label&lt;i[2]){a.label=i[2],a.ops.push(o);break}i[2]&amp;&amp;a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&amp;o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},e.__createBinding=function(t,e,n,r){void 0===r&amp;&amp;(r=n);t[r]=e[n]},e.__exportStar=function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||(e[n]=t[n])},e.__values=o,e.__read=a,e.__spread=function(){for(var t=[],e=0;e&lt;arguments.length;e++)t=t.concat(a(arguments[e]));return t},e.__spreadArrays=function(){for(var t=0,e=0,n=arguments.length;e&lt;n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e&lt;n;e++)for(var o=arguments[e],a=0,s=o.length;a&lt;s;a++,i++)r[i]=o[a];return r},e.__await=s,e.__asyncGenerator=function(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(t,e||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(t){i[t]&amp;&amp;(r[t]=function(e){return new Promise(function(n,r){o.push([t,e,n,r])&gt;1||u(t,e)})})}function u(t,e){try{(n=i[t](e)).value instanceof s?Promise.resolve(n.value.v).then(c,h):f(o[0][2],n)}catch(t){f(o[0][3],t)}var n}function c(t){u("next",t)}function h(t){u("throw",t)}function f(t,e){t(e),o.shift(),o.length&amp;&amp;u(o[0][0],o[0][1])}},e.__asyncDelegator=function(t){var e,n;return e={},r("next"),r("throw",function(t){throw t}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){e[r]=t[r]?function(e){return(n=!n)?{value:s(t[r](e)),done:"return"===r}:i?i(e):e}:i}},e.__asyncValues=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=o(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&amp;&amp;function(e){return new Promise(function(r,i){e=t[n](e),function(t,e,n,r){Promise.resolve(r).then(function(e){t({value:e,done:n})},e)}(r,i,e.done,e.value)})}}},e.__makeTemplateObject=function(t,e){Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e;return t},e.__importStar=function(t){if(t&amp;&amp;t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&amp;&amp;(e[n]=t[n]);return e.default=t,e},e.__importDefault=function(t){return t&amp;&amp;t.__esModule?t:{default:t}},e.__classPrivateFieldGet=function(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)},e.__classPrivateFieldSet=function(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n};
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&amp;&amp;(t[n]=e[n])})(t,e)};var i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n&lt;r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&amp;&amp;(t[i]=e[i]);return t}).apply(this,arguments)};function o(t){var e="function"==typeof Symbol&amp;&amp;Symbol.iterator,n=e&amp;&amp;t[e],r=0;if(n)return n.call(t);if(t&amp;&amp;"number"==typeof t.length)return{next:function(){return t&amp;&amp;r&gt;=t.length&amp;&amp;(t=void 0),{value:t&amp;&amp;t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(t,e){var n="function"==typeof Symbol&amp;&amp;t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- &gt;0)&amp;&amp;!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&amp;&amp;!r.done&amp;&amp;(n=o.return)&amp;&amp;n.call(o)}finally{if(i)throw i.error}}return a}function s(t){return this instanceof s?(this.v=t,this):new s(t)}}});</pre></body></html>