1/*! For license information please see 2.5aa73c77.chunk.js.LICENSE.txt */ 2(this["webpackJsonpslack-chat-web-app"]=this["webpackJsonpslack-chat-web-app"]||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(72)},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return i})),n.d(t,"__assign",(function(){return o})),n.d(t,"__rest",(function(){return a})),n.d(t,"__decorate",(function(){return s})),n.d(t,"__param",(function(){return u})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return l})),n.d(t,"__generator",(function(){return h})),n.d(t,"__createBinding",(function(){return f})),n.d(t,"__exportStar",(function(){return p})),n.d(t,"__values",(function(){return d})),n.d(t,"__read",(function(){return v})),n.d(t,"__spread",(function(){return g})),n.d(t,"__spreadArrays",(function(){return y})),n.d(t,"__await",(function(){return m})),n.d(t,"__asyncGenerator",(function(){return b})),n.d(t,"__asyncDelegator",(function(){return _})),n.d(t,"__asyncValues",(function(){return w}
2)),n.d(t,"__makeTemplateObject",(function(){return E})),n.d(t,"__importStar",(function(){return T})),n.d(t,"__importDefault",(function(){return S})),n.d(t,"__classPrivateFieldGet",(function(){return I})),n.d(t,"__classPrivateFieldSet",(function(){return C}));var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function s(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function s(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function h(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(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&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&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>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function f(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function d(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function y(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function b(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=i[e](t)).value instanceof m?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(r){l(o[0][3],r)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function _(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function w(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=d(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
2function T(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function S(e){return e&&e.__esModule?e:{default:e}}function I(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function C(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(14);function i(e,t){if(null==e)return{};var n,i,o=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},o=function(e,t){if(!e)throw a(t)},a=function(e){return new Error("Firebase Database ("+i.SDK_VERSION+") INTERNAL ASSERT FAILED: "+e)},s=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var i=e.charCodeAt(r);i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):55296===(64512&i)&&r+1<e.length&&56320===(64512&e.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r)),t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t},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(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[],i=0;i<e.length;i+=3){var o=e[i],a=i+1<e.length,s=a?e[i+1]:0,u=i+2<e.length,c=u?e[i+2]:0,l=o>>2,h=(3&o)<<4|s>>4,f=(15&s)<<2|c>>6,p=63&c;u||(p=64,a||(f=64)),r.push(n[l],n[h],n[f],n[p])}return r.join("")},encodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(s(e),t)},decodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){for(var t=[],n=0,r=0;n<e.length;){var i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){var o=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){var a=((7&i)<<18|(63&(o=e[n++]))<<12|(63&(s=e[n++]))<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(a>>10)),t[r++]=String.fromCharCode(56320+(1023&a))}else{o=e[n++];var s=e[n++];t[r++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&s)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray:function(e,t){this.init_();for(var n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],i=0;i<e.length;){var o=n[e.charAt(i++)],a=i<e.length?n[e.charAt(i)]:0,s=++i<e.length?n[e.charAt(i)]:64,u=++i<e.length?n[e.charAt(i)]:64;if(++i,null==o||null==a||null==s||null==u)throw Error();var c=o<<2|a>>4;if(r.push(c),64!==s){var l=a<<4&240|s>>2;if(r.push(l),64!==u){var h=s<<6&192|u;r.push(h)}}}return r},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}},c=function(e){try{return u.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};function l(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:return new Date(t.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return t}for(var n in t)t.hasOwnProperty(n)&&(e[n]=l(e[n],t[n]));return e}var h=function(){function e(){var e=this;this.reject=function(){},this.resolve=function(){},this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))}return e.prototype.wrapCallback=function(e){var t=this;return function(n,r){n?t.reject(n):t.resolve(r),"function"===typeof e&&(t.promise.catch((function(){})),1===e.length?e(n):e(n,r))}},e}();function f(){return"undefined"!==typeof navigator&&"string"===typeof navigator.userAgent?navigator.userAgent:""}function p(){try{return"[object process]"===Object.prototype.toString.call(e.process)}catch(t){return!1}}var d=function(e){function t(n,r){var i=e.call(this,r)||this;return i.code=n,i.name="FirebaseError",Object.setPrototypeOf(i,t.prototype),Error.captureStackTrace&&Error.captureStackTrace(i,v.prototype.create),i}return r.__extends(t,e),t}(Error),v=function(){function e(e,t,n){this.service=e,this.serviceName=t,this.errors=n}return e.prototype.create=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=t[0]||{},i=this.service+"/"+e,o=this.errors[e],a=o?g(o,r):"Error",s=this.serviceName+": "+a+" ("+i+").",u=new d(i,s),c=0,l=Object.keys(r);c<l.length;c++){var h=l[c];"_"!==h.slice(-1)&&(h in u&&console.warn('Overwriting FirebaseError base field "'+h+'" can cause unexpected behavior.'),u[h]=r[h])}return u},e}();function g(e,t){return e.replace(y,(function(e,n){var r=t[n];return null!=r?String(r):"<"+n+"?>"}))}var y=/\{\$([^}]+)}/g;function m(e){return JSON.parse(e)}var b=function(e){var t={},n={},r={},i="";try{var o=e.split(".");t=m(c(o[0])||""),n=m(c(o[1])||""),i=o[2],r=n.d||{},delete n.d}catch(a){}return{header:t,claims:n,data:r,signature:i}};var _=function(){function e(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=64,this.pad_[0]=128;for(var e=1;e<this.blockSize;++e)this.pad_[e]=0;this.reset()}return e.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},e.prototype.compress_=function(e,t){t||(t=0);var n=this.W_;if("string"===typeof e)for(var r=0;r<16;r++)n[r]=e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|e.charCodeAt(t+3),t+=4;else for(r=0;r<16;r++)n[r]=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3],t+=4;for(r=16;r<80;r++){var i=n[r-3]^n[r-8]^n[r-14]^n[r-16];n[r]=4294967295&(i<<1|i>>>31)}var o,a,s=this.chain_[0],u=this.chain_[1],c=this.chain_[2],l=this.chain_[3],h=this.chain_[4];for(r=0;r<80;r++){r<40?r<20?(o=l^u&(c^l),a=1518500249):(o=u^c^l,a=1859775393):r<60?(o=u&c|l&(u|c),a=2400959708):(o=u^c^l,a=3395469782);i=(s<<5|s>>>27)+o+h+a+n[r]&4294967295;h=l,l=c,c=4294967295&(u<<30|u>>>2),u=s,s=i}this.chain_[0]=this.chain_[0]+s&4294967295,this.chain_[1]=this.chain_[1]+u&4294967295,this.chain_[2]=this.chain_[2]+c&4294967295,this.chain_[3]=this.chain_[3]+l&4294967295,this.chain_[4]=this.chain_[4]+h&4294967295},e.prototype.update=function(e,t){if(null!=e){void 0===t&&(t=e.length);for(var n=t-this.blockSize,r=0,i=this.buf_,o=this.inbuf_;r<t;){if(0===o)for(;r<=n;)this.compress_(e,r),r+=this.blockSize;if("string"===typeof e){for(;r<t;)if(i[o]=e.charCodeAt(r),++r,++o===this.blockSize){this.compress_(i),o=0;break}}else for(;r<t;)if(i[o]=e[r],++r,++o===this.blockSize){this.compress_(i),o=0;break}}this.inbuf_=o,this.total_+=t}},e.prototype.digest=function(){var e=[],t=8*this.total_;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var n=this.blockSize-1;n>=56;n--)this.buf_[n]=255&t,t/=256;this.compress_(this.buf_);var r=0;for(n=0;n<5;n++)for(var i=24;i>=0;i-=8)e[r]=this.chain_[n]>>i&255,++r;return e},e}();var w=function(){function e(e,t){var n=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Prom
2ise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then((function(){e(n)})).catch((function(e){n.error(e)}))}return e.prototype.next=function(e){this.forEachObserver((function(t){t.next(e)}))},e.prototype.error=function(e){this.forEachObserver((function(t){t.error(e)})),this.close(e)},e.prototype.complete=function(){this.forEachObserver((function(e){e.complete()})),this.close()},e.prototype.subscribe=function(e,t,n){var r,i=this;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");void 0===(r=function(e,t){if("object"!==typeof e||null===e)return!1;for(var n=0,r=t;n<r.length;n++){var i=r[n];if(i in e&&"function"===typeof e[i])return!0}return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:n}).next&&(r.next=E),void 0===r.error&&(r.error=E),void 0===r.complete&&(r.complete=E);var o=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then((function(){try{i.finalError?r.error(i.finalError):r.complete()}catch(e){}})),this.observers.push(r),o},e.prototype.unsubscribeOne=function(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},e.prototype.forEachObserver=function(e){if(!this.finalized)for(var t=0;t<this.observers.length;t++)this.sendOne(t,e)},e.prototype.sendOne=function(e,t){var n=this;this.task.then((function(){if(void 0!==n.observers&&void 0!==n.observers[e])try{t(n.observers[e])}catch(r){"undefined"!==typeof console&&console.error&&console.error(r)}}))},e.prototype.close=function(e){var t=this;this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then((function(){t.observers=void 0,t.onNoObservers=void 0})))},e}();function E(){}function T(e,t,n){var r="";switch(t){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 > 4. Need to update it?")}var i=e+" failed: ";return i+=r+" argument "}t.CONSTANTS=i,t.Deferred=h,t.ErrorFactory=v,t.FirebaseError=d,t.MAX_VALUE_MILLIS=144e5,t.RANDOM_FACTOR=.5,t.Sha1=_,t.areCookiesEnabled=function(){return!(!navigator||!navigator.cookieEnabled)},t.assert=o,t.assertionError=a,t.async=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];Promise.resolve(!0).then((function(){e.apply(void 0,n)})).catch((function(e){t&&t(e)}))}},t.base64=u,t.base64Decode=c,t.base64Encode=function(e){var t=s(e);return u.encodeByteArray(t,!0)},t.calculateBackoffMillis=function(e,t,n){void 0===t&&(t=1e3),void 0===n&&(n=2);var r=t*Math.pow(n,e),i=Math.round(.5*r*(Math.random()-.5)*2);return Math.min(144e5,r+i)},t.contains=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.createSubscribe=function(e,t){var n=new w(e,t);return n.subscribe.bind(n)},t.decode=b,t.deepCopy=function(e){return l(void 0,e)},t.deepExtend=l,t.errorPrefix=T,t.getUA=f,t.isAdmin=function(e){var t=b(e).claims;return"object"===typeof t&&!0===t.admin},t.isBrowser=function(){return"object"===typeof self&&self.self===self},t.isBrowserExtension=function(){var e="object"===typeof chrome?chrome.runtime:"object"===typeof browser?browser.runtime:void 0;return"object"===typeof e&&void 0!==e.id},t.isElectron=function(){return f().indexOf("Electron/")>=0},t.isEmpty=function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0},t.isIE=function(){var e=f();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0},t.isIndexedDBAvailable=function(){return"indexedDB"in self&&null!=indexedDB},t.isMobileCordova=function(){return"undefined"!==typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(f())},t.isNode=p,t.isNodeSdk=function(){return!0===i.NODE_CLIENT||!0===i.NODE_ADMIN},t.isReactNative=function(){return"object"===typeof navigator&&"ReactNative"===navigator.product},t.isSafari=function(){return!p()&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")},t.isUWP=function(){return f().indexOf("MSAppHost/")>=0},t.isValidFormat=function(e){var t=b(e).claims;return!!t&&"object"===typeof t&&t.hasOwnProperty("iat")},t.isValidTimestamp=function(e){var t=b(e).claims,n=Math.floor((new Date).getTime()/1e3),r=0,i=0;return"object"===typeof t&&(t.hasOwnProperty("nbf")?r=t.nbf:t.hasOwnProperty("iat")&&(r=t.iat),i=t.hasOwnProperty("exp")?t.exp:r+86400),!!n&&!!r&&!!i&&n>=r&&n<=i},t.issuedAtTime=function(e){var t=b(e).claims;return"object"===typeof t&&t.hasOwnProperty("iat")?t.iat:null},t.jsonEval=m,t.map=function(e,t,n){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=t.call(n,e[i],i,e));return r},t.querystring=function(e){for(var t=[],n=function(e,n){Array.isArray(n)?n.forEac
2h((function(n){t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))})):t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))},r=0,i=Object.entries(e);r<i.length;r++){var o=i[r];n(o[0],o[1])}return t.length?"&"+t.join("&"):""},t.querystringDecode=function(e){var t={};return e.replace(/^\?/,"").split("&").forEach((function(e){if(e){var n=e.split("=");t[n[0]]=n[1]}})),t},t.safeGet=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0},t.stringLength=function(e){for(var t=0,n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t++:r<2048?t+=2:r>=55296&&r<=56319?(t+=4,n++):t+=3}return t},t.stringToByteArray=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var i=e.charCodeAt(r);if(i>=55296&&i<=56319){var a=i-55296;r++,o(r<e.length,"Surrogate pair missing trail surrogate."),i=65536+(a<<10)+(e.charCodeAt(r)-56320)}i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):i<65536?(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t},t.stringify=function(e){return JSON.stringify(e)},t.validateArgCount=function(e,t,n,r){var i;if(r<t?i="at least "+t:r>n&&(i=0===n?"none":"no more than "+n),i)throw new Error(e+" failed: Was called with "+r+(1===r?" argument.":" arguments.")+" Expects "+i+".")},t.validateCallback=function(e,t,n,r){if((!r||n)&&"function"!==typeof n)throw new Error(T(e,t,r)+"must be a valid function.")},t.validateContextObject=function(e,t,n,r){if((!r||n)&&("object"!==typeof n||null===n))throw new Error(T(e,t,r)+"must be a valid context object.")},t.validateIndexedDBOpenable=function(){return new Promise((function(e,t){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),e(!0)},i.onupgradeneeded=function(){n=!1},i.onerror=function(){var e;t((null===(e=i.error)||void 0===e?void 0:e.message)||"")}}catch(o){t(o)}}))},t.validateNamespace=function(e,t,n,r){if((!r||n)&&"string"!==typeof n)throw new Error(T(e,t,r)+"must be a valid firebase namespace.")}}).call(this,n(32))},function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return v})),n.d(t,"c",(function(){return I})),n.d(t,"d",(function(){return d})),n.d(t,"e",(function(){return m})),n.d(t,"f",(function(){return k})),n.d(t,"g",(function(){return x}));var r=n(6),i=n(0),o=n.n(i),a=(n(12),n(17)),s=n(38),u=n(15),c=n(2),l=n(39),h=n.n(l),f=(n(43),n(14)),p=(n(36),function(e){var t=Object(s.a)();return t.displayName=e,t}("Router-History")),d=function(e){var t=Object(s.a)();return t.displayName=e,t}("Router"),v=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}Object(r.a)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return o.a.createElement(d.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},o.a.createElement(p.Provider,{children:this.props.children||null,value:this.props.history}))},t}(o.a.Component);o.a.Component;o.a.Component;var g={},y=0;function m(e,t){void 0===t&&(t={}),("string"===typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,i=n.exact,o=void 0!==i&&i,a=n.strict,s=void 0!==a&&a,u=n.sensitive,c=void 0!==u&&u;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=g[n]||(g[n]={});if(r[e])return r[e];var i=[],o={regexp:h()(e,i,t),keys:i};return y<1e4&&(r[e]=o,y++),o}(n,{end:o,strict:s,sensitive:c}),i=r.regexp,a=r.keys,u=i.exec(e);if(!u)return null;var l=u[0],f=u.slice(1),p=e===l;return o&&!p?null:{path:n,url:"/"===n&&""===l?"/":l,isExact:p,params:a.reduce((function(e,t,n){return e[t.name]=f[n],e}),{})}}),null)}var b=function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.render=function(){var e=this;return o.a.createElement(d.Consumer,null,(function(t){t||Object(u.a)(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?m(n.pathname,e.props):t.match,i=Object(c.a)({},t,{location:n,match:r}),a=e.props,s=a.children,l=a.component,h=a.render;return Array.isArray(s)&&0===s.length&&(s=null),o.a.createElement(d.Provider,{value:i},i.match?s?"function"===typeof s?s(i):s:l?o.a.createElement(l,i):h?h(i):null:"function"===typeof s?s(i):null)}))},t}(o.a.Component);function _(e){return"/"===e.charAt(0)?e:"/"+e}function w(e,t){if(!e)return t;var n=_(e);return 0!==t.pathname.indexOf(n)?t:Object(c.a)({},t,{pathname:t.pathname.substr(n.length)})}function E(e){return"string"===typeof e?e:Object(a.e)(e)}function T(e){return function(){Object(u.a)(!1)}}function S(){}o.a.Component;var I=function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.render=function(){var e=this;return o.a.createElement(d.Consumer,null,(function(t){t||Object(u.a)(!1);var n,r,i=e.props.location||t.location;
2return o.a.Children.forEach(e.props.children,(function(e){if(null==r&&o.a.isValidElement(e)){n=e;var a=e.props.path||e.props.from;r=a?m(i.pathname,Object(c.a)({},e.props,{path:a})):t.match}})),r?o.a.cloneElement(n,{location:i,computedMatch:r}):null}))},t}(o.a.Component);var C=o.a.useContext;function k(){return C(p)}function x(){var e=C(d).match;return e?e.params:{}}},function(e,t,n){"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i,o=n(1),a=n(4),s=n(13),u=n(23),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),l=new a.ErrorFactory("app","Firebase",c),h=((i={})["@firebase/app"]="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),f=new u.Logger("@firebase/app"),p=function(){function e(e,t,n){var r,i,u=this;this.firebase_=n,this.isDeleted_=!1,this.name_=t.name,this.automaticDataCollectionEnabled_=t.automaticDataCollectionEnabled||!1,this.options_=a.deepCopy(e),this.container=new s.ComponentContainer(t.name),this._addComponent(new s.Component("app",(function(){return u}),"PUBLIC"));try{for(var c=o.__values(this.firebase_.INTERNAL.components.values()),l=c.next();!l.done;l=c.next()){var h=l.value;this._addComponent(h)}}catch(f){r={error:f}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}}return Object.defineProperty(e.prototype,"automaticDataCollectionEnabled",{get:function(){return this.checkDestroyed_(),this.automaticDataCollectionEnabled_},set:function(e){this.checkDestroyed_(),this.automaticDataCollectionEnabled_=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this.checkDestroyed_(),this.name_},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this.checkDestroyed_(),this.options_},enumerable:!1,configurable:!0}),e.prototype.delete=function(){var e=this;return new Promise((function(t){e.checkDestroyed_(),t()})).then((function(){return e.firebase_.INTERNAL.removeApp(e.name_),Promise.all(e.container.getProviders().map((function(e){return e.delete()})))})).then((function(){e.isDeleted_=!0}))},e.prototype._getService=function(e,t){return void 0===t&&(t="[DEFAULT]"),this.checkDestroyed_(),this.container.getProvider(e).getImmediate({identifier:t})},e.prototype._removeServiceInstance=function(e,t){void 0===t&&(t="[DEFAULT]"),this.container.getProvider(e).clearInstance(t)},e.prototype._addComponent=function(e){try{this.container.addComponent(e)}catch(t){f.debug("Component "+e.name+" failed to register with FirebaseApp "+this.name,t)}},e.prototype._addOrOverwriteComponent=function(e){this.container.addOrOverwriteComponent(e)},e.prototype.checkDestroyed_=function(){if(this.isDeleted_)throw l.create("app-deleted",{appName:this.name_})},e}();p.prototype.name&&p.prototype.options||p.prototype.delete||console.log("dc");var d=function e(){var t=function(e){var t={},n=new Map,r={__esModule:!0,initializeApp:function(n,i){void 0===i&&(i={});if("object"!==typeof i||null===i){i={name:i}}var o=i;void 0===o.name&&(o.name="[DEFAULT]");var s=o.name;if("string"!==typeof s||!s)throw l.create("bad-app-name",{appName:String(s)});if(a.contains(t,s))throw l.create("duplicate-app",{appName:s});var u=new e(n,o,r);return t[s]=u,u},app:i,registerVersion:function(e,t,n){var r,i=null!==(r=h[e])&&void 0!==r?r:e;n&&(i+="-"+n);var o=i.match(/\s|\//),a=t.match(/\s|\//);if(o||a){var u=['Unable to register library "'+i+'" with version "'+t+'":'];return o&&u.push('library name "'+i+'" contains illegal characters (whitespace or "/")'),o&&a&&u.push("and"),a&&u.push('version name "'+t+'" contains illegal characters (whitespace or "/")'),void f.warn(u.join(" "))}c(new s.Component(i+"-version",(function(){return{library:i,version:t}}),"VERSION"))},setLogLevel:u.setLogLevel,onLog:function(e,t){if(null!==e&&"function"!==typeof e)throw l.create("invalid-log-argument",{appName:name});u.setUserLogHandler(e,t)},apps:null,SDK_VERSION:"7.20.0",INTERNAL:{registerComponent:c,removeApp:function(e){delete t[e]}
2,components:n,useAsService:function(e,t){if("serverAuth"===t)return null;return t}}};function i(e){if(e=e||"[DEFAULT]",!a.contains(t,e))throw l.create("no-app",{appName:e});return t[e]}function c(s){var u,c,h=s.name;if(n.has(h))return f.debug("There were multiple attempts to register component "+h+"."),"PUBLIC"===s.type?r[h]:null;if(n.set(h,s),"PUBLIC"===s.type){var p=function(e){if(void 0===e&&(e=i()),"function"!==typeof e[h])throw l.create("invalid-app-argument",{appName:h});return e[h]()};void 0!==s.serviceProps&&a.deepExtend(p,s.serviceProps),r[h]=p,e.prototype[h]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this._getService.bind(this,h);return n.apply(this,s.multipleInstances?e:[])}}try{for(var d=o.__values(Object.keys(t)),v=d.next();!v.done;v=d.next()){var g=v.value;t[g]._addComponent(s)}}catch(y){u={error:y}}finally{try{v&&!v.done&&(c=d.return)&&c.call(d)}finally{if(u)throw u.error}}return"PUBLIC"===s.type?r[h]:null}return r.default=r,Object.defineProperty(r,"apps",{get:function(){return Object.keys(t).map((function(e){return t[e]}))}}),i.App=e,r}(p);return t.INTERNAL=o.__assign(o.__assign({},t.INTERNAL),{createFirebaseNamespace:e,extendNamespace:function(e){a.deepExtend(t,e)},createSubscribe:a.createSubscribe,ErrorFactory:a.ErrorFactory,deepExtend:a.deepExtend}),t}(),v=function(){function e(e){this.container=e}return e.prototype.getPlatformInfoString=function(){return this.container.getProviders().map((function(e){if(function(e){var t=e.getComponent();return"VERSION"===(null===t||void 0===t?void 0:t.type)}(e)){var t=e.getImmediate();return t.library+"/"+t.version}return null})).filter((function(e){return e})).join(" ")},e}();if(a.isBrowser()&&void 0!==self.firebase){f.warn("\n Warning: Firebase is already defined in the global scope. Please make sure\n Firebase library is only loaded once.\n ");var g=self.firebase.SDK_VERSION;g&&g.indexOf("LITE")>=0&&f.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 y=d.initializeApp;d.initializeApp=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return a.isNode()&&f.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 '),y.apply(void 0,e)};var m=d;!function(e,t){e.INTERNAL.registerComponent(new s.Component("platform-logger",(function(e){return new v(e)}),"PRIVATE")),e.registerVersion("@firebase/app","0.6.11",t),e.registerVersion("fire-js","")}(m),t.default=m,t.firebase=m},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(46);var i=n(35),o=n(47);function a(e,t){return Object(r.a)(e)||function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||Object(i.a)(e,t)||Object(o.a)()}},function(e,t,n){"use strict";var r=n(7);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=o.default.memo(o.default.forwardRef((function(t,n){return o.default.createElement(a.default,(0,i.default)({ref:n},t),e)})));0;return n.muiName=a.default.muiName,n};var i=r(n(83)),o=r(n(0)),a=r(n(44))},function(e,t,n){"use strict";function r(e){var t,n,i="";if("string"===typeof e||"number"===typeof e)i+=e;else if("object"===typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=r(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}t.a=function(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=r(e))&&(i&&(i+=" "),i+=t);return i}},function(e,t,n){e.exports=n(80)()},function(e,t,n){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n(4),o=function(){function e(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY"}return e.prototype.setInstantiationMode=function(e){return this.instantiationMode=e,this},e.prototype.setMultipleInstances=function(e){return this.multipleInstances=e,this},e.prototype.setServiceProps=function(e){return this.serviceProps=e,this},e}(),a=function(){function e(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map}return e.prototype.get=function(e){void 0===e&&(e="[DEFAULT]");var t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){var n=new i.Deferred;this.instancesDeferred.set(t,n);try{var r=this.getOrInitializeService(t);r&&n.resolve(r)}catch(o){}}return this.instancesDeferred.get(t).promise},e.prototype.getImmediate=function(e){var t=r.__assign({identifier:"[DEFAULT]",optional:!1},e),n=t.identifier,i=t.optional,o=this.normalizeInstanceIdentifier(n);try{var a=this.getOrInitializeService(o);if(!a){if(i)return null;throw Error("Service "+this.name+" is not available")}return a}catch(s){if(i)return null;throw s}},e.prototype.getComponent=function(){return this.component},e.prototype.setComponent=function(e){var t,n;if(e.name!==this.name)throw Error("Mismatching Component "+e.name+" for Provider "+this.name+".");if(this.component)throw Error("Component for "+this.name+" has already been provided");if(this.component=e,function(e){return"EAGER"===e.instantiationMode}(e))try{this.getOrInitializeService("[DEFAULT]")}catch(h){}try{for(var i=r.__values(this.instancesDeferred.entries()),o=i.next();!o.done;o=i.next()){var a=r.__read(o.value,2),s=a[0],u=a[1],c=this.normalizeInstanceIdentifier(s);try{var l=this.getOrInitializeService(c);u.resolve(l)}catch(h){}}}catch(f){t={error:f}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},e.prototype.clearInstance=function(e){void 0===e&&(e="[DEFAULT]"),this.instancesDeferred.delete(e),this.instances.delete(e)},e.prototype.delete=function(){return r.__awaiter(this,void 0,void 0,(function(){var e;return r.__generator(this,(function(t){switch(t.label){case 0:return e=Array.from(this.instances.values()),[4,Promise.all(r.__spread(e.filter((function(e){return"INTERNAL"in e})).map((function(e){return e.INTERNAL.delete()})),e.filter((function(e){return"_delete"in e})).map((function(e){return e._delete()}))))];case 1:return t.sent(),[2]}}))}))},e.prototype.isComponentSet=function(){return null!=this.component},e.prototype.getOrInitializeService=function(e){var t=this.instances.get(e);return!t&&this.component&&(t=this.component.instanceFactory(this.container,function(e){return"[DEFAULT]"===e?void 0:e}(e)),this.instances.set(e,t)),t||null},e.prototype.normalizeInstanceIdentifier=function(e){return this.component?this.component.multipleInstances?e:"[DEFAULT]":e},e}();var s=function(){function e(e){this.name=e,this.providers=new Map}return e.prototype.addComponent=function(e){var t=this.getProvider(e.name);if(t.isComponentSet())throw new Error("Component "+e.name+" has already been registered with "+this.name);t.setComponent(e)},e.prototype.addOrOverwriteComponent=function(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)},e.prototype.getProvider=function(e){if(this.providers.has(e))return this.providers.get(e);var t=new a(e,this);return this.providers.set(e,t),t},e.prototype.getProviders=function(){return Array.from(this.providers.values())},e}();t.Component=o,t.ComponentContainer=s,t.Provider=a},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";t.a=function(e,t){if(!e)throw new Error("Invariant failed")}},function(e,t,n){"use strict";n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return l})),n.d(t,"d",(function(){return h}));var r=n(68);function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function o(e){if(e.type)return e;if("#"===e.charAt(0))return o(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(Object(r.a)(3,e));var i=e.substring(t+1,e.length-1).split(",");return{type:n,values:i=i.map((function(e){return parseFloat(e)}))}}function a(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function s(e,t){var n=u(e),r=u(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function u(e){var t="hsl"===(e=o(e)).type?o(function(e){var t=(e=o(e)).values,n=t[0],r=t[1]/100,i=t[2]/100,s=r*Math.min(i,1-i),u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-s*Math.max(Math.min(t-3,9-t,1),-1)},c="rgb",l=[Math.round(255*u(0)),Math.round(255*u(8)),Math.round(255*u(4))];return"hsla"===e.type&&(c+="a",l.push(t[3])),a({type:c,values:l})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}
2)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function c(e,t){return e=o(e),t=i(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,a(e)}function l(e,t){if(e=o(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return a(e)}function h(e,t){if(e=o(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return a(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return w})),n.d(t,"b",(function(){return C})),n.d(t,"d",(function(){return x})),n.d(t,"c",(function(){return v})),n.d(t,"f",(function(){return g})),n.d(t,"e",(function(){return d}));var r=n(2);function i(e){return"/"===e.charAt(0)}function o(e,t){for(var n=t,r=n+1,i=e.length;r<i;n+=1,r+=1)e[n]=e[r];e.pop()}var a=function(e,t){void 0===t&&(t="");var n,r=e&&e.split("/")||[],a=t&&t.split("/")||[],s=e&&i(e),u=t&&i(t),c=s||u;if(e&&i(e)?a=r:r.length&&(a.pop(),a=a.concat(r)),!a.length)return"/";if(a.length){var l=a[a.length-1];n="."===l||".."===l||""===l}else n=!1;for(var h=0,f=a.length;f>=0;f--){var p=a[f];"."===p?o(a,f):".."===p?(o(a,f),h++):h&&(o(a,f),h--)}if(!c)for(;h--;h)a.unshift("..");!c||""===a[0]||a[0]&&i(a[0])||a.unshift("");var d=a.join("/");return n&&"/"!==d.substr(-1)&&(d+="/"),d};function s(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var u=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"===typeof t||"object"===typeof n){var r=s(t),i=s(n);return r!==t||i!==n?e(r,i):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},c=n(15);function l(e){return"/"===e.charAt(0)?e:"/"+e}function h(e){return"/"===e.charAt(0)?e.substr(1):e}function f(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function p(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function d(e){var t=e.pathname,n=e.search,r=e.hash,i=t||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}function v(e,t,n,i){var o;"string"===typeof e?(o=function(e){var t=e||"/",n="",r="",i=t.indexOf("#");-1!==i&&(r=t.substr(i),t=t.substr(0,i));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(o=Object(r.a)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return n&&(o.key=n),i?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=a(o.pathname,i.pathname)):o.pathname=i.pathname:o.pathname||(o.pathname="/"),o}function g(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&u(e.state,t.state)}function y(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,i){if(null!=e){var o="function"===typeof e?e(t,n):e;"string"===typeof o?"function"===typeof r?r(o,i):i(!0):i(!1!==o)}else i(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}}var m=!("undefined"===typeof window||!window.document||!window.document.createElement);function b(e,t){t(window.confirm(e))}function _(){try{return window.history.state||{}}catch(e){return{}}}function w(e){void 0===e&&(e={}),m||Object(c.a)(!1);var t=window.history,n=function(){var e=window.navigator.userAgent;return(-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&(window.history&&"pushState"in window.history)}(),i=!(-1===window.navigator.userAgent.indexOf("Trident")),o=e,a=o.forceRefresh,s=void 0!==a&&a,u=o.getUserConfirmation,h=void 0===u?b:u,g=o.keyLength,w=void 0===g?6:g,E=e.basename?p(l(e.basename)):"";function T(e){var t=e||{},n=t.key,r=t.state,i=window.location,o=i.pathname+i.search+i.hash;return E&&(o=f(o,E)),v(o,r,n)}function S(){return Math.random().toString(36).substr(2,w)}var I=y();function C(e){Object(r.a)(F,e),F.length=t.length,I.notifyListeners(F.location,F.action)}function k(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||N(T(e.state))}function x(){N(T(_()))}var O=!1;function N(e){if(O)O=!1,C();else{I.confirmTransitionTo(e,"POP",h,(function(t){t?C({action:"POP",location:e}):function(e){var t=F.location,n=P.indexOf(t.key);-1===n&&(n=0);var r=P.indexOf(e.key);-1===r&&(r=0);var i=n-r;i&&(O=!0,D(i))}(e)}))}}var A=T(_()),P=[A.key];function R(e){return E+d(e)}function D(e){t.go(e)}var L=0;function M(e){1===(L+=e)&&1===e?(window.addEventListener("popstate",k),i&&window.addEventListener("hashchange",x)):0===L&&(window.removeEventListener("popstate",k),i&&window.removeEventListener("hashchange",x))}var j=!1;var F={length:t.length,action:"POP",location:A,createHref:R,push:function(e,r){var i=v(e,r,S(),F.location);I.confirmTransitionTo(i,"PUSH",h,(function(e){if(e){var r=R(i),o=i.key,a=i.state;if(n)if(t.pushState({key:o,state:a},null,r),s)window.location.href=r;else{var u=P.indexOf(F.location.key),c=P.slice(0,u+1);c.push(i.key),P=c,C({action:"PUSH",location:i})}else window.location.href=r}}))},replace:function(e,r){var i=v(e,r,S(),F.location);I.confirmTransitionTo(i,"REPLACE",h,(function(e){if(e){var r=R(i),o=i.key,a=i.state;if(n)if(t.replaceState({key:o,state:a},null,r),s)window.location.replace(r);else{var u=P.indexOf(F.location.key);
2-1!==u&&(P[u]=i.key),C({action:"REPLACE",location:i})}else window.location.replace(r)}}))},go:D,goBack:function(){D(-1)},goForward:function(){D(1)},block:function(e){void 0===e&&(e=!1);var t=I.setPrompt(e);return j||(M(1),j=!0),function(){return j&&(j=!1,M(-1)),t()}},listen:function(e){var t=I.appendListener(e);return M(1),function(){M(-1),t()}}};return F}var E={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+h(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:h,decodePath:l},slash:{encodePath:l,decodePath:l}};function T(e){var t=e.indexOf("#");return-1===t?e:e.slice(0,t)}function S(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}function I(e){window.location.replace(T(window.location.href)+"#"+e)}function C(e){void 0===e&&(e={}),m||Object(c.a)(!1);var t=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),e),i=n.getUserConfirmation,o=void 0===i?b:i,a=n.hashType,s=void 0===a?"slash":a,u=e.basename?p(l(e.basename)):"",h=E[s],g=h.encodePath,_=h.decodePath;function w(){var e=_(S());return u&&(e=f(e,u)),v(e)}var C=y();function k(e){Object(r.a)(U,e),U.length=t.length,C.notifyListeners(U.location,U.action)}var x=!1,O=null;function N(){var e,t,n=S(),r=g(n);if(n!==r)I(r);else{var i=w(),a=U.location;if(!x&&(t=i,(e=a).pathname===t.pathname&&e.search===t.search&&e.hash===t.hash))return;if(O===d(i))return;O=null,function(e){if(x)x=!1,k();else{C.confirmTransitionTo(e,"POP",o,(function(t){t?k({action:"POP",location:e}):function(e){var t=U.location,n=D.lastIndexOf(d(t));-1===n&&(n=0);var r=D.lastIndexOf(d(e));-1===r&&(r=0);var i=n-r;i&&(x=!0,L(i))}(e)}))}}(i)}}var A=S(),P=g(A);A!==P&&I(P);var R=w(),D=[d(R)];function L(e){t.go(e)}var M=0;function j(e){1===(M+=e)&&1===e?window.addEventListener("hashchange",N):0===M&&window.removeEventListener("hashchange",N)}var F=!1;var U={length:t.length,action:"POP",location:R,createHref:function(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&(n=T(window.location.href)),n+"#"+g(u+d(e))},push:function(e,t){var n=v(e,void 0,void 0,U.location);C.confirmTransitionTo(n,"PUSH",o,(function(e){if(e){var t=d(n),r=g(u+t);if(S()!==r){O=t,function(e){window.location.hash=e}(r);var i=D.lastIndexOf(d(U.location)),o=D.slice(0,i+1);o.push(t),D=o,k({action:"PUSH",location:n})}else k()}}))},replace:function(e,t){var n=v(e,void 0,void 0,U.location);C.confirmTransitionTo(n,"REPLACE",o,(function(e){if(e){var t=d(n),r=g(u+t);S()!==r&&(O=t,I(r));var i=D.indexOf(d(U.location));-1!==i&&(D[i]=t),k({action:"REPLACE",location:n})}}))},go:L,goBack:function(){L(-1)},goForward:function(){L(1)},block:function(e){void 0===e&&(e=!1);var t=C.setPrompt(e);return F||(j(1),F=!0),function(){return F&&(F=!1,j(-1)),t()}},listen:function(e){var t=C.appendListener(e);return j(1),function(){j(-1),t()}}};return U}function k(e,t,n){return Math.min(Math.max(e,t),n)}function x(e){void 0===e&&(e={});var t=e,n=t.getUserConfirmation,i=t.initialEntries,o=void 0===i?["/"]:i,a=t.initialIndex,s=void 0===a?0:a,u=t.keyLength,c=void 0===u?6:u,l=y();function h(e){Object(r.a)(_,e),_.length=_.entries.length,l.notifyListeners(_.location,_.action)}function f(){return Math.random().toString(36).substr(2,c)}var p=k(s,0,o.length-1),g=o.map((function(e){return v(e,void 0,"string"===typeof e?f():e.key||f())})),m=d;function b(e){var t=k(_.index+e,0,_.entries.length-1),r=_.entries[t];l.confirmTransitionTo(r,"POP",n,(function(e){e?h({action:"POP",location:r,index:t}):h()}))}var _={length:g.length,action:"POP",location:g[p],index:p,entries:g,createHref:m,push:function(e,t){var r=v(e,t,f(),_.location);l.confirmTransitionTo(r,"PUSH",n,(function(e){if(e){var t=_.index+1,n=_.entries.slice(0);n.length>t?n.splice(t,n.length-t,r):n.push(r),h({action:"PUSH",location:r,index:t,entries:n})}}))},replace:function(e,t){var r=v(e,t,f(),_.location);l.confirmTransitionTo(r,"REPLACE",n,(function(e){e&&(_.entries[_.index]=r,h({action:"REPLACE",location:r}))}))},go:b,goBack:function(){b(-1)},goForward:function(){b(1)},canGo:function(e){var t=_.index+e;return t>=0&&t<_.entries.length},block:function(e){return void 0===e&&(e=!1),l.setPrompt(e)},listen:function(e){return l.appendListener(e)}};return _}},,function(e,t,n){"use strict";var r=n(2),i=n(3),o=n(0),a=n.n(o),s=(n(12),n(36)),u=n.n(s),c="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l="object"===("undefined"===typeof window?"undefined":c(window))&&"object"===("undefined"===typeof document?"undefined":c(document))&&9===document.nodeType,h=(n(20),n(29)),f=n(6),p=n(25),d=n(14),v={}.constructor;function g(e){if(null==e||"object"!==typeof e)return e;if(Array.isArray(e))return e.map(g);if(e.constructor!==v)return e;var t={};for(var n in e)t[n]=g(e[n]);return t}function y(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,i=g(t),o=r.plugins.onCreateRule(e,i,n);return o||(e[0],null)}var m=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n};function b(e,t){if(void 0===t&&(t=!1),!Array.isArray(e))return e;var n="";if(Array.isArray(e[0]))for(var r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=", "),n+=m(e[r]," ");else n=m(e,", ");return t||"!important"!==e[e.length-1]||(n+=" !important"),n}function _(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}function w(e,t,n){void 0===n&&(n={});var r="";if(!t)return r;var i=n.indent,o=void 0===i?0:i,a=t.fallbacks;
vendor: 6,150 bytes, line 2
2if(e&&o++,a)if(Array.isArray(a))for(var s=0;s<a.length;s++){var u=a[s];for(var c in u){var l=u[c];null!=l&&(r&&(r+="\n"),r+=""+_(c+": "+b(l)+";",o))}}else for(var h in a){var f=a[h];null!=f&&(r&&(r+="\n"),r+=""+_(h+": "+b(f)+";",o))}for(var p in t){var d=t[p];null!=d&&"fallbacks"!==p&&(r&&(r+="\n"),r+=""+_(p+": "+b(d)+";",o))}return(r||n.allowEmpty)&&e?(r&&(r="\n"+r+"\n"),_(e+" {"+r,--o)+_("}",o)):r}var E=/([[\].#*$><+~=|^:(),"'`\s])/g,T="undefined"!==typeof CSS&&CSS.escape,S=function(e){return T?T(e):e.replace(E,"\\$1")},I=function(){function e(e,t,n){this.type="style",this.key=void 0,this.isProcessed=!1,this.style=void 0,this.renderer=void 0,this.renderable=void 0,this.options=void 0;var r=n.sheet,i=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:i&&(this.renderer=new i)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var i=t;n&&!1===n.process||(i=this.options.jss.plugins.onChangeValue(t,e,this));var o=null==i||!1===i,a=e in this.style;if(o&&!a&&!r)return this;var s=o&&a;if(s?delete this.style[e]:this.style[e]=i,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,i),this;var u=this.options.sheet;return u&&u.attached,this},e}(),C=function(e){function t(t,n,r){var i;(i=e.call(this,t,n,r)||this).selectorText=void 0,i.id=void 0,i.renderable=void 0;var o=r.selector,a=r.scoped,s=r.sheet,u=r.generateId;return o?i.selectorText=o:!1!==a&&(i.id=u(Object(p.a)(Object(p.a)(i)),s),i.selectorText="."+S(i.id)),i}Object(f.a)(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!==typeof n?e[t]=n:Array.isArray(n)&&(e[t]=b(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?Object(r.a)({},e,{allowEmpty:!0}):e;return w(this.selectorText,this.style,n)},Object(h.a)(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(I),k={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new C(e,t,n)}},x={indent:1,children:!0},O=/@([\w-]+)/,N=function(){function e(e,t,n){this.type="conditional",this.at=void 0,this.key=void 0,this.query=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.query=n.name;var i=e.match(O);for(var o in this.at=i?i[1]:"unknown",this.options=n,this.rules=new Z(Object(r.a)({},n,{parent:this})),t)this.rules.add(o,t[o]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.toString=function(e){if(void 0===e&&(e=x),null==e.indent&&(e.indent=x.indent),null==e.children&&(e.children=x.children),!1===e.children)return this.query+" {}";var t=this.rules.toString(e);return t?this.query+" {\n"+t+"\n}":""},e}(),A=/@media|@supports\s+/,P={onCreateRule:function(e,t,n){return A.test(e)?new N(e,t,n):null}},R={indent:1,children:!0},D=/@keyframes\s+([\w-]+)/,L=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.key=void 0,this.name=void 0,this.id=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0;var i=e.match(D);i&&i[1]?this.name=i[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var o=n.scoped,a=n.sheet,s=n.generateId;for(var u in this.id=!1===o?this.name:S(s(this,a)),this.rules=new Z(Object(r.a)({},n,{parent:this})),t)this.rules.add(u,t[u],Object(r.a)({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){if(void 0===e&&(e=R),null==e.indent&&(e.indent=R.indent),null==e.children&&(e.children=R.children),!1===e.children)return this.at+" "+this.id+" {}";var t=this.rules.toString(e);return t&&(t="\n"+t+"\n"),this.at+" "+this.id+" {"+t+"}"},e}(),M=/@keyframes\s+/,j=/\$([\w-]+)/g,F=function(e,t){return"string"===typeof e?e.replace(j,(function(e,n){return n in t?t[n]:e})):e},U=function(e,t,n){var r=e[t],i=F(r,n);i!==r&&(e[t]=i)},V={onCreateRule:function(e,t,n){return"string"===typeof e&&M.test(e)?new L(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&U(e,"animation-name",n.keyframes),"animation"in e&&U(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return F(e,r.keyframes);default:return e}}},q=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).renderable=void 0,t}return Object(f.a)(t,e),t.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?Object(r.a)({},e,{allowEmpty:!0}):e;return w(this.key,this.style,n)},t}(I),B={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new q(e,t,n):null}},z=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.key=void 0,this.style=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.style)){for(var t="",n=0;n<this.style.length;n++)t+=w(this.at,this.style[n]),this.style[n+1]&&(t+="\n");return t}return w(this.at,this.style,e)},e}(),W=/@font-face/,H={onCreateRule:function(e,t,n){return W.test(e)?new z(e,t,n):null}},G=function(){function e(e,t,n){this.type="viewport",this.at="@viewport",this.key=void 0,this.style=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){return w(this.key,this.style,e)},e}(),K={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-v
2iewport"===e?new G(e,t,n):null}},Q=function(){function e(e,t,n){this.type="simple",this.key=void 0,this.value=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.value=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"},e}(),$={"@charset":!0,"@import":!0,"@namespace":!0},Y=[k,P,V,B,H,K,{onCreateRule:function(e,t,n){return e in $?new Q(e,t,n):null}}],X={process:!0},J={force:!0,process:!0},Z=function(){function e(e){this.map={},this.raw={},this.index=[],this.counter=0,this.options=void 0,this.classes=void 0,this.keyframes=void 0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var t=e.prototype;return t.add=function(e,t,n){var i=this.options,o=i.parent,a=i.sheet,s=i.jss,u=i.Renderer,c=i.generateId,l=i.scoped,h=Object(r.a)({classes:this.classes,parent:o,sheet:a,jss:s,Renderer:u,generateId:c,scoped:l,name:e,keyframes:this.keyframes,selector:void 0},n),f=e;e in this.raw&&(f=e+"-d"+this.counter++),this.raw[f]=t,f in this.classes&&(h.selector="."+S(this.classes[f]));var p=y(f,t,h);if(!p)return null;this.register(p);var d=void 0===h.index?this.index.length:h.index;return this.index.splice(d,0,p),p},t.get=function(e){return this.map[e]},t.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.index.indexOf(e),1)},t.indexOf=function(e){return this.index.indexOf(e)},t.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},t.register=function(e){this.map[e.key]=e,e instanceof C?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof L&&this.keyframes&&(this.keyframes[e.name]=e.id)},t.unregister=function(e){delete this.map[e.key],e instanceof C?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof L&&delete this.keyframes[e.name]},t.update=function(){var e,t,n;if("string"===typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],e=null),e)this.updateOne(this.map[e],t,n);else for(var r=0;r<this.index.length;r++)this.updateOne(this.index[r],t,n)},t.updateOne=function(t,n,r){void 0===r&&(r=X);var i=this.options,o=i.jss.plugins,a=i.sheet;if(t.rules instanceof e)t.rules.update(n,r);else{var s=t,u=s.style;if(o.onUpdate(n,t,a,r),r.process&&u&&u!==s.style){for(var c in o.onProcessStyle(s.style,s,a),s.style){var l=s.style[c];l!==u[c]&&s.prop(c,l,J)}for(var h in u){var f=s.style[h],p=u[h];null==f&&f!==p&&s.prop(h,null,J)}}}},t.toString=function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,i=0;i<this.index.length;i++){var o=this.index[i].toString(e);(o||r)&&(t&&(t+="\n"),t+=o)}return t},e}(),ee=function(){function e(e,t){for(var n in this.options=void 0,this.deployed=void 0,this.attached=void 0,this.rules=void 0,this.renderer=void 0,this.classes=void 0,this.keyframes=void 0,this.queue=void 0,this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=Object(r.a)({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),t.Renderer&&(this.renderer=new t.Renderer(this)),this.rules=new Z(this.options),e)this.rules.add(n,e[n]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var i=this.rules.add(e,t,n);return i?(this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(r?r.push(i):(this.insertRule(i),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),i):i:(this.deployed=!1,i)):null},t.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},t.addRules=function(e,t){var n=[];for(var r in e){var i=this.addRule(r,e[r],t);i&&n.push(i)}return n},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t="object"===typeof e?e:this.rules.get(e);return!!t&&(this.rules.remove(t),!(this.attached&&t.renderable&&this.renderer)||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.updateOne=function(e,t,n){return this.rules.updateOne(e,t,n),this},t.toString=function(e){return this.rules.toString(e)},e}(),te=function(){function e(){this.plugins={internal:[],external:[]},this.registry=void 0}var t=e.prototype;return t.onCreateRule=function(e,t,n){for(var r=0;r<this.registry.onCreateRule.length;r++){var i=this.registry.onCreateRule[r](e,t,n);if(i)return i}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,n){for(var r=0;r<this.registry.onProcessStyle.length;r++)t.style=this.registry.onProcessStyle[r](t.style,t,n)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,n,r){for(var i=0;i<this.registry.onUpdate.length;i++)this.registry.onUpdate[i](e,t,n,r)},t.onChangeValue=function(e,t,n){for(var r=e,i=0;i<this.registry.onChangeValue.length;i++)r=this.registry.onChangeValue[i](r,t,n);return r},t.use=function(e,t){void 0===t&&(t={queue:"external"});var n=this.plugins[t.queue];-1===n.indexOf(e)&&(n.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce((function(e,t){for(var n in t)n in e&&e[n].push(t[n]);return e}),{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),ne=new(function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=Object(d.a)(t,["attached"]),i="",o=0;o<this.registry.length;o++){var a=this.registry[o];null!=n&&a.attached!==n||(i&&(i+="\n"),i+=a.toString(r))}return i}
2,Object(h.a)(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}()),re="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),ie="2f1acc6c3a606b082e5eef5e54414ffb";null==re[ie]&&(re[ie]=0);var oe=re[ie]++,ae=function(e){void 0===e&&(e={});var t=0;return function(n,r){t+=1;var i="",o="";return r&&(r.options.classNamePrefix&&(o=r.options.classNamePrefix),null!=r.options.jss.id&&(i=String(r.options.jss.id))),e.minify?""+(o||"c")+oe+i+t:o+n.key+"-"+oe+(i?"-"+i:"")+"-"+t}},se=function(e){var t;return function(){return t||(t=e()),t}};function ue(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(n){return""}}function ce(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=b(n,!0),"!important"===n[n.length-1]))return e.style.setProperty(t,r,"important"),!0;e.attributeStyleMap?e.attributeStyleMap.set(t,r):e.style.setProperty(t,r)}catch(i){return!1}return!0}function le(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(n){}}function he(e,t){return e.selectorText=t,e.selectorText===t}var fe=se((function(){return document.querySelector("head")}));function pe(e){var t=ne.registry;if(t.length>0){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if((n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e))&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"===typeof r){var i=function(e){for(var t=fe(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}var de=se((function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null})),ve=function(e,t,n){var r=e.cssRules.length;(void 0===n||n>r)&&(n=r);try{if("insertRule"in e)e.insertRule(t,n);else if("appendRule"in e){e.appendRule(t)}}catch(i){return!1}return e.cssRules[n]},ge=function(){function e(e){this.getPropertyValue=ue,this.setProperty=ce,this.removeProperty=le,this.setSelector=he,this.element=void 0,this.sheet=void 0,this.hasInsertedRules=!1,e&&ne.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,i=t.element;this.element=i||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var o=de();o&&this.element.setAttribute("nonce",o)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=pe(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"===typeof n.nodeType){var i=n,o=i.parentNode;o&&o.insertBefore(e,i.nextSibling)}else fe().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){var e=this.element.parentNode;e&&e.removeChild(this.element)},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n<e.index.length;n++)this.insertRule(e.index[n],n,t)},t.insertRule=function(e,t,n){if(void 0===n&&(n=this.element.sheet),e.rules){var r=e,i=n;return("conditional"!==e.type&&"keyframes"!==e.type||!1!==(i=ve(n,r.toString({children:!1}),t)))&&(this.insertRules(r.rules,i),i)}if(e.renderable&&e.renderable.parentStyleSheet===this.element.sheet)return e.renderable;var o=e.toString();if(!o)return!1;var a=ve(n,o,t);return!1!==a&&(this.hasInsertedRules=!0,e.renderable=a,a)},t.deleteRule=function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),!0)},t.indexOf=function(e){for(var t=this.element.sheet.cssRules,n=0;n<t.length;n++)if(e===t[n])return n;return-1},t.replaceRule=function(e,t){var n=this.indexOf(e);return-1!==n&&(this.element.sheet.deleteRule(n),this.insertRule(t,n))},t.getRules=function(){return this.element.sheet.cssRules},e}(),ye=0,me=function(){function e(e){this.id=ye++,this.version="10.4.0",this.plugins=new te,this.options={id:{minify:!1},createGenerateId:ae,Renderer:l?ge:null,plugins:[]},this.generateId=ae({minify:!1});for(var t=0;t<Y.length;t++)this.plugins.use(Y[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=Object(r.a)({}
2,this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var n=t.index;"number"!==typeof n&&(n=0===ne.index?0:ne.index+1);var i=new ee(e,Object(r.a)({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(i),i},t.removeStyleSheet=function(e){return e.detach(),ne.remove(e),this},t.createRule=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n={}),"object"===typeof e)return this.createRule(void 0,e,t);var i=Object(r.a)({},n,{name:e,jss:this,Renderer:this.options.Renderer});i.generateId||(i.generateId=this.generateId),i.classes||(i.classes={}),i.keyframes||(i.keyframes={});var o=y(e,t,i);return o&&this.plugins.onProcessRule(o),o},t.use=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){e.plugins.use(t)})),this},e}();var be="undefined"!==typeof CSS&&CSS&&"number"in CSS,_e=function(e){return new me(e)};_e();function we(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;e.Component;if(!n)return t;var i=Object(r.a)({},t);return Object.keys(n).forEach((function(e){n[e]&&(i[e]="".concat(t[e]," ").concat(n[e]))})),i}var Ee={set:function(e,t,n,r){var i=e.get(t);i||(i=new Map,e.set(t,i)),i.set(n,r)},get:function(e,t,n){var r=e.get(t);return r?r.get(n):void 0},delete:function(e,t,n){e.get(t).delete(n)}};var Te=a.a.createContext(null);function Se(){return a.a.useContext(Te)}var Ie="function"===typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__",Ce=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];var ke=Date.now(),xe="fnValues"+ke,Oe="fnStyle"+ ++ke;var Ne=function(){return{onCreateRule:function(e,t,n){if("function"!==typeof t)return null;var r=y(e,{},n);return r[Oe]=t,r},onProcessStyle:function(e,t){if(xe in t||Oe in t)return e;var n={};for(var r in e){var i=e[r];"function"===typeof i&&(delete e[r],n[r]=i)}return t[xe]=n,e},onUpdate:function(e,t,n,r){var i=t,o=i[Oe];o&&(i.style=o(e)||{});var a=i[xe];if(a)for(var s in a)i.prop(s,a[s](e),r)}}},Ae="@global",Pe=function(){function e(e,t,n){for(var i in this.type="global",this.at=Ae,this.rules=void 0,this.options=void 0,this.key=void 0,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new Z(Object(r.a)({},n,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(){return this.rules.toString()},e}(),Re=function(){function e(e,t,n){this.type="global",this.at=Ae,this.options=void 0,this.rule=void 0,this.isProcessed=!1,this.key=void 0,this.key=e,this.options=n;var i=e.substr("@global ".length);this.rule=n.jss.createRule(i,t,Object(r.a)({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),De=/\s*,\s*/g;function Le(e,t){for(var n=e.split(De),r="",i=0;i<n.length;i++)r+=t+" "+n[i].trim(),n[i+1]&&(r+=", ");return r}var Me=function(){return{onCreateRule:function(e,t,n){if(!e)return null;if(e===Ae)return new Pe(e,t,n);if("@"===e[0]&&"@global "===e.substr(0,"@global ".length))return new Re(e,t,n);var r=n.parent;return r&&("global"===r.type||r.options.parent&&"global"===r.options.parent.type)&&(n.scoped=!1),!1===n.scoped&&(n.selector=e),null},onProcessRule:function(e){"style"===e.type&&(function(e){var t=e.options,n=e.style,i=n?n[Ae]:null;if(i){for(var o in i)t.sheet.addRule(o,i[o],Object(r.a)({},t,{selector:Le(o,e.selector)}));delete n[Ae]}}(e),function(e){var t=e.options,n=e.style;for(var i in n)if("@"===i[0]&&i.substr(0,Ae.length)===Ae){var o=Le(i.substr(Ae.length),e.selector);t.sheet.addRule(o,n[i],Object(r.a)({},t,{selector:o})),delete n[i]}}(e))}}},je=/\s*,\s*/g,Fe=/&/g,Ue=/\$([\w-]+)/g;var Ve=function(){function e(e,t){return function(n,r){var i=e.getRule(r)||t&&t.getRule(r);return i?(i=i).selector:r}}function t(e,t){for(var n=t.split(je),r=e.split(je),i="",o=0;o<n.length;o++)for(var a=n[o],s=0;s<r.length;s++){var u=r[s];i&&(i+=", "),i+=-1!==u.indexOf("&")?u.replace(Fe,a):a+" "+u}return i}function n(e,t,n){if(n)return Object(r.a)({},n,{index:n.index+1});var i=e.options.nestingLevel;i=void 0===i?1:i+1;var o=Object(r.a)({},e.options,{nestingLevel:i,index:t.indexOf(e)+1});return delete o.name,o}return{onProcessStyle:function(i,o,a){if("style"!==o.type)return i;var s,u,c=o,l=c.options.parent;for(var h in i){var f=-1!==h.indexOf("&"),p="@"===h[0];if(f||p){if(s=n(c,l,s),f){var d=t(h,c.selector);u||(u=e(l,a)),d=d.replace(Ue,u),l.addRule(d,i[h],Object(r.a)({},s,{selector:d}))}else p&&l.addRule(h,{},s).addRule(c.key,i[h],{selector:c.selector});delete i[h]}}return i}}},qe=/[A-Z]/g,Be=/^ms-/,ze={};function We(e){return"-"+e.toLowerCase()}
2var He=function(e){if(ze.hasOwnProperty(e))return ze[e];var t=e.replace(qe,We);return ze[e]=Be.test(t)?"-"+t:t};function Ge(e){var t={};for(var n in e){t[0===n.indexOf("--")?n:He(n)]=e[n]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(Ge):t.fallbacks=Ge(e.fallbacks)),t}var Ke=function(){return{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=Ge(e[t]);return e}return Ge(e)},onChangeValue:function(e,t,n){if(0===t.indexOf("--"))return e;var r=He(t);return t===r?e:(n.prop(r,e),null)}}},Qe=be&&CSS?CSS.px:"px",$e=be&&CSS?CSS.ms:"ms",Ye=be&&CSS?CSS.percent:"%";function Xe(e){var t=/(-[a-z])/g,n=function(e){return e[1].toUpperCase()},r={};for(var i in e)r[i]=e[i],r[i.replace(t,n)]=e[i];return r}var Je=Xe({"animation-delay":$e,"animation-duration":$e,"background-position":Qe,"background-position-x":Qe,"background-position-y":Qe,"background-size":Qe,border:Qe,"border-bottom":Qe,"border-bottom-left-radius":Qe,"border-bottom-right-radius":Qe,"border-bottom-width":Qe,"border-left":Qe,"border-left-width":Qe,"border-radius":Qe,"border-right":Qe,"border-right-width":Qe,"border-top":Qe,"border-top-left-radius":Qe,"border-top-right-radius":Qe,"border-top-width":Qe,"border-width":Qe,margin:Qe,"margin-bottom":Qe,"margin-left":Qe,"margin-right":Qe,"margin-top":Qe,padding:Qe,"padding-bottom":Qe,"padding-left":Qe,"padding-right":Qe,"padding-top":Qe,"mask-position-x":Qe,"mask-position-y":Qe,"mask-size":Qe,height:Qe,width:Qe,"min-height":Qe,"max-height":Qe,"min-width":Qe,"max-width":Qe,bottom:Qe,left:Qe,top:Qe,right:Qe,"box-shadow":Qe,"text-shadow":Qe,"column-gap":Qe,"column-rule":Qe,"column-rule-width":Qe,"column-width":Qe,"font-size":Qe,"font-size-delta":Qe,"letter-spacing":Qe,"text-indent":Qe,"text-stroke":Qe,"text-stroke-width":Qe,"word-spacing":Qe,motion:Qe,"motion-offset":Qe,outline:Qe,"outline-offset":Qe,"outline-width":Qe,perspective:Qe,"perspective-origin-x":Ye,"perspective-origin-y":Ye,"transform-origin":Ye,"transform-origin-x":Ye,"transform-origin-y":Ye,"transform-origin-z":Ye,"transition-delay":$e,"transition-duration":$e,"vertical-align":Qe,"flex-basis":Qe,"shape-margin":Qe,size:Qe,grid:Qe,"grid-gap":Qe,"grid-row-gap":Qe,"grid-column-gap":Qe,"grid-template-rows":Qe,"grid-template-columns":Qe,"grid-auto-rows":Qe,"grid-auto-columns":Qe,"box-shadow-x":Qe,"box-shadow-y":Qe,"box-shadow-blur":Qe,"box-shadow-spread":Qe,"font-line-height":Qe,"text-shadow-x":Qe,"text-shadow-y":Qe,"text-shadow-blur":Qe});function Ze(e,t,n){if(!t)return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]=Ze(e,t[r],n);else if("object"===typeof t)if("fallbacks"===e)for(var i in t)t[i]=Ze(i,t[i],n);else for(var o in t)t[o]=Ze(e+"-"+o,t[o],n);else if("number"===typeof t){var a=n[e]||Je[e];return a?"function"===typeof a?a(t).toString():""+t+a:t.toString()}return t}var et=function(e){void 0===e&&(e={});var t=Xe(e);return{onProcessStyle:function(e,n){if("style"!==n.type)return e;for(var r in e)e[r]=Ze(r,e[r],t);return e},onChangeValue:function(e,n){return Ze(n,e,t)}}},tt=n(28),nt="",rt="",it="",ot="",at=l&&"ontouchstart"in document.documentElement;if(l){var st={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},ut=document.createElement("p").style;for(var ct in st)if(ct+"Transform"in ut){nt=ct,rt=st[ct];break}"Webkit"===nt&&"msHyphens"in ut&&(nt="ms",rt=st.ms,ot="edge"),"Webkit"===nt&&"-apple-trailing-word"in ut&&(it="apple")}var lt=nt,ht=rt,ft=it,pt=ot,dt=at;var vt={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===lt?"-webkit-"+e:ht+e)}},gt={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===lt?ht+"print-"+e:e)}},yt=/[-\s]+(.)?/g;function mt(e,t){return t?t.toUpperCase():""}function bt(e){return e.replace(yt,mt)}function _t(e){return bt("-"+e)}var wt,Et={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===lt){if(bt("mask-image")in t)return e;if(lt+_t("mask-image")in t)return ht+e}return e}},Tt={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==ft||dt?e:ht+e)}},St={noPrefill:["transform"],supportedProperty:function(e,t,n){return"transform"===e&&(n.transform?e:ht+e)}},It={noPrefill:["transition"],supportedProperty:function(e,t,n){return"transition"===e&&(n.transition?e:ht+e)}},Ct={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===lt||"ms"===lt&&"edge"!==pt?ht+e:e)}},kt={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===lt||"ms"===lt||"apple"===ft?ht+e:e)}},xt={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===lt?"WebkitColumn"+_t(e)in t&&ht+"column-"+e:"Moz"===lt&&("page"+_t(e)in t&&"page-"+e))}},Ot={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===lt)return e;var n=e.replace("-inline","");return lt+_t(n)in t&&ht+n}},Nt={supportedProperty:function(e,t){return bt(e)in t&&e}}
2,At={supportedProperty:function(e,t){var n=_t(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:lt+n in t?ht+e:"Webkit"!==lt&&"Webkit"+n in t&&"-webkit-"+e}},Pt={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===lt?""+ht+e:e)}},Rt={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===lt?ht+"scroll-chaining":e)}},Dt={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},Lt={supportedProperty:function(e,t){var n=Dt[e];return!!n&&(lt+_t(n)in t&&ht+n)}},Mt={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},jt=Object.keys(Mt),Ft=function(e){return ht+e},Ut=[vt,gt,Et,Tt,St,It,Ct,kt,xt,Ot,Nt,At,Pt,Rt,Lt,{supportedProperty:function(e,t,n){var r=n.multiple;if(jt.indexOf(e)>-1){var i=Mt[e];if(!Array.isArray(i))return lt+_t(i)in t&&ht+i;if(!r)return!1;for(var o=0;o<i.length;o++)if(!(lt+_t(i[0])in t))return!1;return i.map(Ft)}return!1}}],Vt=Ut.filter((function(e){return e.supportedProperty})).map((function(e){return e.supportedProperty})),qt=Ut.filter((function(e){return e.noPrefill})).reduce((function(e,t){return e.push.apply(e,Object(tt.a)(t.noPrefill)),e}),[]),Bt={};if(l){wt=document.createElement("p");var zt=window.getComputedStyle(document.documentElement,"");for(var Wt in zt)isNaN(Wt)||(Bt[zt[Wt]]=zt[Wt]);qt.forEach((function(e){return delete Bt[e]}))}function Ht(e,t){if(void 0===t&&(t={}),!wt)return e;if(null!=Bt[e])return Bt[e];"transition"!==e&&"transform"!==e||(t[e]=e in wt.style);for(var n=0;n<Vt.length&&(Bt[e]=Vt[n](e,wt.style,t),!Bt[e]);n++);try{wt.style[e]=""}catch(r){return!1}return Bt[e]}var Gt,Kt={},Qt={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},$t=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function Yt(e,t,n){if("var"===t)return"var";if("all"===t)return"all";if("all"===n)return", all";var r=t?Ht(t):", "+Ht(n);return r||(t||n)}function Xt(e,t){var n=t;if(!Gt||"content"===e)return t;if("string"!==typeof n||!isNaN(parseInt(n,10)))return n;var r=e+n;if(null!=Kt[r])return Kt[r];try{Gt.style[e]=n}catch(i){return Kt[r]=!1,!1}if(Qt[e])n=n.replace($t,Yt);else if(""===Gt.style[e]&&("-ms-flex"===(n=ht+n)&&(Gt.style[e]="-ms-flexbox"),Gt.style[e]=n,""===Gt.style[e]))return Kt[r]=!1,!1;return Gt.style[e]="",Kt[r]=n,Kt[r]}l&&(Gt=document.createElement("p"));var Jt=function(){function e(t){for(var n in t){var r=t[n];if("fallbacks"===n&&Array.isArray(r))t[n]=r.map(e);else{var i=!1,o=Ht(n);o&&o!==n&&(i=!0);var a=!1,s=Xt(o,b(r));s&&s!==r&&(a=!0),(i||a)&&(i&&delete t[n],t[o||n]=s||r)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at="-"===(n=t.at)[1]||"ms"===lt?n:"@"+ht+"keyframes"+n.substr(10)}var n},onProcessStyle:function(t,n){return"style"!==n.type?t:e(t)},onChangeValue:function(e,t){return Xt(t,b(e))||e}}};var Zt=function(){var e=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},i=Object.keys(t).sort(e),o=0;o<i.length;o++)r[i[o]]=t[i[o]];return r}}};function en(){return{plugins:[Ne(),Me(),Ve(),Ke(),et(),"undefined"===typeof window?null:Jt(),Zt()]}}var tn=_e(en()),nn={disableGeneration:!1,generateClassName:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,r=e.productionPrefix,i=void 0===r?"jss":r,o=e.seed,a=void 0===o?"":o,s=""===a?"":"".concat(a,"-"),u=0,c=function(){return u+=1};return function(e,t){var r=t.options.name;if(r&&0===r.indexOf("Mui")&&!t.options.link&&!n){if(-1!==Ce.indexOf(e.key))return"Mui-".concat(e.key);var o="".concat(s).concat(r,"-").concat(e.key);return t.options.theme[Ie]&&""===a?"".concat(o,"-").concat(c()):o}return"".concat(s).concat(i).concat(c())}}(),jss:tn,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},rn=a.a.createContext(nn);var on=-1e9;function an(){return on+=1}var sn=n(24);function un(e){return e&&"object"===Object(sn.a)(e)&&e.constructor===Object}function cn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},i=n.clone?Object(r.a)({},e):e;return un(e)&&un(t)&&Object.keys(t).forEach((function(r){"__proto__"!==r&&(un(t[r])&&r in e?i[r]=cn(e[r],t[r],n):i[r]=t[r])})),i}function ln(e){var t="function"===typeof e;return{create:function(n,i){var o;try{o=t?e(n):e}catch(u){throw u}if(!i||!n.overrides||!n.overrides[i])return o;var a=n.overrides[i],s=Object(r.a)({},o);
2return Object.keys(a).forEach((function(e){s[e]=cn(s[e],a[e])})),s},options:{}}}var hn={};function fn(e,t,n){var r=e.state;if(e.stylesOptions.disableGeneration)return t||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});var i=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,i=!0),t!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=t,i=!0),i&&(r.cacheClasses.value=we({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:n})),r.cacheClasses.value}function pn(e,t){var n=e.state,i=e.theme,o=e.stylesOptions,a=e.stylesCreator,s=e.name;if(!o.disableGeneration){var u=Ee.get(o.sheetsManager,a,i);u||(u={refs:0,staticSheet:null,dynamicStyles:null},Ee.set(o.sheetsManager,a,i,u));var c=Object(r.a)(Object(r.a)(Object(r.a)({},a.options),o),{},{theme:i,flip:"boolean"===typeof o.flip?o.flip:"rtl"===i.direction});c.generateId=c.serverGenerateClassName||c.generateClassName;var l=o.sheetsRegistry;if(0===u.refs){var h;o.sheetsCache&&(h=Ee.get(o.sheetsCache,a,i));var f=a.create(i,s);h||((h=o.jss.createStyleSheet(f,Object(r.a)({link:!1},c))).attach(),o.sheetsCache&&Ee.set(o.sheetsCache,a,i,h)),l&&l.add(h),u.staticSheet=h,u.dynamicStyles=function e(t){var n=null;for(var r in t){var i=t[r],o=typeof i;if("function"===o)n||(n={}),n[r]=i;else if("object"===o&&null!==i&&!Array.isArray(i)){var a=e(i);a&&(n||(n={}),n[r]=a)}}return n}(f)}if(u.dynamicStyles){var p=o.jss.createStyleSheet(u.dynamicStyles,Object(r.a)({link:!0},c));p.update(t),p.attach(),n.dynamicSheet=p,n.classes=we({baseClasses:u.staticSheet.classes,newClasses:p.classes}),l&&l.add(p)}else n.classes=u.staticSheet.classes;u.refs+=1}}function dn(e,t){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(t)}function vn(e){var t=e.state,n=e.theme,r=e.stylesOptions,i=e.stylesCreator;if(!r.disableGeneration){var o=Ee.get(r.sheetsManager,i,n);o.refs-=1;var a=r.sheetsRegistry;0===o.refs&&(Ee.delete(r.sheetsManager,i,n),r.jss.removeStyleSheet(o.staticSheet),a&&a.remove(o.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),a&&a.remove(t.dynamicSheet))}}function gn(e,t){var n,r=a.a.useRef([]),i=a.a.useMemo((function(){return{}}),t);r.current!==i&&(r.current=i,n=e()),a.a.useEffect((function(){return function(){n&&n()}}),[i])}function yn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,o=t.classNamePrefix,s=t.Component,u=t.defaultTheme,c=void 0===u?hn:u,l=Object(i.a)(t,["name","classNamePrefix","Component","defaultTheme"]),h=ln(e),f=n||o||"makeStyles";h.options={index:an(),name:n,meta:f,classNamePrefix:f};var p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Se()||c,i=Object(r.a)(Object(r.a)({},a.a.useContext(rn)),l),o=a.a.useRef(),u=a.a.useRef();
2gn((function(){var r={name:n,state:{},stylesCreator:h,stylesOptions:i,theme:t};return pn(r,e),u.current=!1,o.current=r,function(){vn(r)}}),[t,h]),a.a.useEffect((function(){u.current&&dn(o.current,e),u.current=!0}));var f=fn(o.current,e.classes,s);return f};return p}function mn(e){var t=e.theme,n=e.name,r=e.props;if(!t||!t.props||!t.props[n])return r;var i,o=t.props[n];for(i in o)void 0===r[i]&&(r[i]=o[i]);return r}var bn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var o=t.defaultTheme,s=t.withTheme,c=void 0!==s&&s,l=t.name,h=Object(i.a)(t,["defaultTheme","withTheme","name"]);var f=l,p=yn(e,Object(r.a)({defaultTheme:o,Component:n,name:l||n.displayName,classNamePrefix:f},h)),d=a.a.forwardRef((function(e,t){e.classes;var s,u=e.innerRef,h=Object(i.a)(e,["classes","innerRef"]),f=p(Object(r.a)(Object(r.a)({},n.defaultProps),e)),d=h;return("string"===typeof l||c)&&(s=Se()||o,l&&(d=mn({theme:s,name:l,props:h})),c&&!d.theme&&(d.theme=s)),a.a.createElement(n,Object(r.a)({ref:u||t,classes:f},d))}));return u()(d,n),d}},_n=n(26),wn=["xs","sm","md","lg","xl"];function En(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,o=e.unit,a=void 0===o?"px":o,s=e.step,u=void 0===s?5:s,c=Object(i.a)(e,["values","unit","step"]);function l(e){var t="number"===typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(a,")")}function h(e,t){var r=wn.indexOf(t);return r===wn.length-1?l(e):"@media (min-width:".concat("number"===typeof n[e]?n[e]:e).concat(a,") and ")+"(max-width:".concat((-1!==r&&"number"===typeof n[wn[r+1]]?n[wn[r+1]]:t)-u/100).concat(a,")")}return Object(r.a)({keys:wn,values:n,up:l,down:function(e){var t=wn.indexOf(e)+1,r=n[wn[t]];return t===wn.length?l("xs"):"@media (max-width:".concat(("number"===typeof r&&t>0?r:e)-u/100).concat(a,")")},between:h,only:function(e){return h(e,e)},width:function(e){return n[e]}},c)}function Tn(e,t,n){var i;return Object(r.a)({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(r.a)({paddingLeft:t(2),paddingRight:t(2)},n,Object(_n.a)({},e.up("sm"),Object(r.a)({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(i={minHeight:56},Object(_n.a)(i,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Object(_n.a)(i,e.up("sm"),{minHeight:64}),i)},n)}var Sn=n(68),In={black:"#000",white:"#fff"},Cn={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},kn={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},xn={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},On={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Nn={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},An={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Pn={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Rn=n(16),Dn={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:In.white,default:Cn[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackgroun
2d:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},Ln={text:{primary:In.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:Cn[800],default:"#303030"},action:{active:In.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function Mn(e,t,n,r){var i=r.light||r,o=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=Object(Rn.d)(e.main,i):"dark"===t&&(e.dark=Object(Rn.a)(e.main,o)))}function jn(e){var t=e.primary,n=void 0===t?{light:kn[300],main:kn[500],dark:kn[700]}:t,o=e.secondary,a=void 0===o?{light:xn.A200,main:xn.A400,dark:xn.A700}:o,s=e.error,u=void 0===s?{light:On[300],main:On[500],dark:On[700]}:s,c=e.warning,l=void 0===c?{light:Nn[300],main:Nn[500],dark:Nn[700]}:c,h=e.info,f=void 0===h?{light:An[300],main:An[500],dark:An[700]}:h,p=e.success,d=void 0===p?{light:Pn[300],main:Pn[500],dark:Pn[700]}:p,v=e.type,g=void 0===v?"light":v,y=e.contrastThreshold,m=void 0===y?3:y,b=e.tonalOffset,_=void 0===b?.2:b,w=Object(i.a)(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function E(e){return Object(Rn.c)(e,Ln.text.primary)>=m?Ln.text.primary:Dn.text.primary}var T=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=Object(r.a)({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error(Object(Sn.a)(4,t));if("string"!==typeof e.main)throw new Error(Object(Sn.a)(5,JSON.stringify(e.main)));return Mn(e,"light",n,_),Mn(e,"dark",i,_),e.contrastText||(e.contrastText=E(e.main)),e},S={dark:Ln,light:Dn};return cn(Object(r.a)({common:In,type:g,primary:T(n),secondary:T(a,"A400","A200","A700"),error:T(u),warning:T(l),info:T(f),success:T(d),grey:Cn,contrastThreshold:m,getContrastText:E,augmentColor:T,tonalOffset:_},S[g]),w)}function Fn(e){return Math.round(1e5*e)/1e5}var Un={textTransform:"uppercase"};function Vn(e,t){var n="function"===typeof t?t(e):t,o=n.fontFamily,a=void 0===o?'"Roboto", "Helvetica", "Arial", sans-serif':o,s=n.fontSize,u=void 0===s?14:s,c=n.fontWeightLight,l=void 0===c?300:c,h=n.fontWeightRegular,f=void 0===h?400:h,p=n.fontWeightMedium,d=void 0===p?500:p,v=n.fontWeightBold,g=void 0===v?700:v,y=n.htmlFontSize,m=void 0===y?16:y,b=n.allVariants,_=n.pxToRem,w=Object(i.a)(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);var E=u/14,T=_||function(e){return"".concat(e/m*E,"rem")},S=function(e,t,n,i,o){return Object(r.a)({fontFamily:a,fontWeight:e,fontSize:T(t),lineHeight:n},'"Roboto", "Helvetica", "Arial", sans-serif'===a?{letterSpacing:"".concat(Fn(i/t),"em")}:{},o,b)},I={h1:S(l,96,1.167,-1.5),h2:S(l,60,1.2,-.5),h3:S(f,48,1.167,0),h4:S(f,34,1.235,.25),h5:S(f,24,1.334,0),h6:S(d,20,1.6,.15),subtitle1:S(f,16,1.75,.15),subtitle2:S(d,14,1.57,.1),body1:S(f,16,1.5,.15),body2:S(f,14,1.43,.15),button:S(d,14,1.75,.4,Un),caption:S(f,12,1.66,.4),overline:S(f,12,2.66,1,Un)};return cn(Object(r.a)({htmlFontSize:m,pxToRem:T,round:Fn,fontFamily:a,fontSize:u,fontWeightLight:l,fontWeightRegular:f,fontWeightMedium:d,fontWeightBold:g},I),w,{clone:!1})}function qn(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var Bn=["none",qn(0,2,1,-1,0,1,1,0,0,1,3,0),qn(0,3,1,-2,0,2,2,0,0,1,5,0),qn(0,3,3,-2,0,3,4,0,0,1,8,0),qn(0,2,4,-1,0,4,5,0,0,1,10,0),qn(0,3,5,-1,0,5,8,0,0,1,14,0),qn(0,3,5,-1,0,6,10,0,0,1,18,0),qn(0,4,5,-2,0,7,10,1,0,2,16,1),qn(0,5,5,-3,0,8,10,1,0,3,14,2),qn(0,5,6,-3,0,9,12,1,0,3,16,2),qn(0,6,6,-3,0,10,14,1,0,4,18,3),qn(0,6,7,-4,0,11,15,1,0,4,20,3),qn(0,7,8,-4,0,12,17,2,0,5,22,4),qn(0,7,8,-4,0,13,19,2,0,5,24,4),qn(0,7,9,-4,0,14,21,2,0,5,26,4),qn(0,8,9,-5,0,15,22,2,0,6,28,5),qn(0,8,10,-5,0,16,24,2,0,6,30,5),qn(0,8,11,-5,0,17,26,2,0,6,32,5),qn(0,9,11,-5,0,18,28,2,0,7,34,6),qn(0,9,12,-6,0,19,29,2,0,7,36,6
2),qn(0,10,13,-6,0,20,31,3,0,8,38,7),qn(0,10,13,-6,0,21,33,3,0,8,40,7),qn(0,10,14,-6,0,22,35,3,0,8,42,7),qn(0,11,14,-7,0,23,36,3,0,9,44,8),qn(0,11,15,-7,0,24,38,3,0,9,46,8)],zn={borderRadius:4},Wn=n(9);var Hn=function(e,t){return t?cn(e,t,{clone:!1}):e},Gn={xs:0,sm:600,md:960,lg:1280,xl:1920},Kn={keys:["xs","sm","md","lg","xl"],up:function(e){return"@media (min-width:".concat(Gn[e],"px)")}};var Qn={m:"margin",p:"padding"},$n={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Yn={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Xn=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){if(e.length>2){if(!Yn[e])return[e];e=Yn[e]}var t=e.split(""),n=Object(Wn.a)(t,2),r=n[0],i=n[1],o=Qn[r],a=$n[i]||"";return Array.isArray(a)?a.map((function(e){return o+e})):[o+a]})),Jn=["m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY"];function Zn(e){var t=e.spacing||8;return"number"===typeof t?function(e){return t*e}:Array.isArray(t)?function(e){return t[e]}:"function"===typeof t?t:function(){}}function er(e,t){return function(n){return e.reduce((function(e,r){return e[r]=function(e,t){if("string"===typeof t)return t;var n=e(Math.abs(t));return t>=0?n:"number"===typeof n?-n:"-".concat(n)}(t,n),e}),{})}}function tr(e){var t=Zn(e.theme);return Object.keys(e).map((function(n){if(-1===Jn.indexOf(n))return null;var r=er(Xn(n),t),i=e[n];return function(e,t,n){if(Array.isArray(t)){var r=e.theme.breakpoints||Kn;return t.reduce((function(e,i,o){return e[r.up(r.keys[o])]=n(t[o]),e}),{})}if("object"===Object(sn.a)(t)){var i=e.theme.breakpoints||Kn;return Object.keys(t).reduce((function(e,r){return e[i.up(r)]=n(t[r]),e}),{})}return n(t)}(e,i,r)})).reduce(Hn,{})}tr.propTypes={},tr.filterProps=Jn;function nr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=Zn({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return 0===n.length?t(1):1===n.length?t(n[0]):n.map((function(e){if("string"===typeof e)return e;var n=t(e);return"number"===typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return e}}),n.mui=!0,n}var rr={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},ir={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function or(e){return"".concat(Math.round(e),"ms")}var ar={easing:rr,duration:ir,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,r=void 0===n?ir.standard:n,o=t.easing,a=void 0===o?rr.easeInOut:o,s=t.delay,u=void 0===s?0:s;Object(i.a)(t,["duration","easing","delay"]);return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"===typeof r?r:or(r)," ").concat(a," ").concat("string"===typeof u?u:or(u))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}},sr={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};var ur=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,o=void 0===r?{}:r,a=e.palette,s=void 0===a?{}:a,u=e.spacing,c=e.typography,l=void 0===c?{}:c,h=Object(i.a)(e,["breakpoints","mixins","palette","spacing","typography"]),f=jn(s),p=En(n),d=nr(u),v=cn({breakpoints:p,direction:"ltr",mixins:Tn(p,d,o),overrides:{},palette:f,props:{},shadows:Bn,typography:Vn(f,l),spacing:d,shape:zn,transitions:ar,zIndex:sr},h),g=arguments.length,y=new Array(g>1?g-1:0),m=1;m<g;m++)y[m-1]=arguments[m];return v=y.reduce((function(e,t){return cn(e,t)}),v)}();t.a=function(e,t){return bn(e,Object(r.a)({defaultTheme:ur},t))}},function(e,t,n){"use strict";t.a=function(e,t){}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(68);function i(e){if("string"!==typeof e)throw new Error(Object(r.a)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},function(e,t,n){!function(e){"use strict";function t(e){return Array.prototype.slice.call(e)}function n(e){return new Promise((function(t,n){e.onsuccess=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function r(e,t,r){var i,o=new Promise((function(o,a){n(i=e[t].apply(e,r)).then(o,a)}));return o.request=i,o}function i(e,t,n){var i=r(e,t,n);return i.then((function(e){if(e)return new l(e,i.request)}))}
2function o(e,t,n){n.forEach((function(n){Object.defineProperty(e.prototype,n,{get:function(){return this[t][n]},set:function(e){this[t][n]=e}})}))}function a(e,t,n,i){i.forEach((function(i){i in n.prototype&&(e.prototype[i]=function(){return r(this[t],i,arguments)})}))}function s(e,t,n,r){r.forEach((function(r){r in n.prototype&&(e.prototype[r]=function(){return this[t][r].apply(this[t],arguments)})}))}function u(e,t,n,r){r.forEach((function(r){r in n.prototype&&(e.prototype[r]=function(){return i(this[t],r,arguments)})}))}function c(e){this._index=e}function l(e,t){this._cursor=e,this._request=t}function h(e){this._store=e}function f(e){this._tx=e,this.complete=new Promise((function(t,n){e.oncomplete=function(){t()},e.onerror=function(){n(e.error)},e.onabort=function(){n(e.error)}}))}function p(e,t,n){this._db=e,this.oldVersion=t,this.transaction=new f(n)}function d(e){this._db=e}o(c,"_index",["name","keyPath","multiEntry","unique"]),a(c,"_index",IDBIndex,["get","getKey","getAll","getAllKeys","count"]),u(c,"_index",IDBIndex,["openCursor","o
2penKeyCursor"]),o(l,"_cursor",["direction","key","primaryKey","value"]),a(l,"_cursor",IDBCursor,["update","delete"]),["advance","continue","continuePrimaryKey"].forEach((function(e){e in IDBCursor.prototype&&(l.prototype[e]=function(){var t=this,r=arguments;return Promise.resolve().then((function(){return t._cursor[e].apply(t._cursor,r),n(t._request).then((function(e){if(e)return new l(e,t._request)}))}))})})),h.prototype.createIndex=function(){return new c(this._store.createIndex.apply(this._store,arguments))},h.prototype.index=function(){return new c(this._store.index.apply(this._store,arguments))},o(h,"_store",["name","keyPath","indexNames","autoIncrement"]),a(h,"_store",IDBObjectStore,["put","add","delete","clear","get","getAll","getKey","getAllKeys","count"]),u(h,"_store",IDBObjectStore,["openCursor","openKeyCursor"]),s(h,"_store",IDBObjectStore,["deleteIndex"]),f.prototype.objectStore=function(){return new h(this._tx.objectStore.apply(this._tx,arguments))},o(f,"_tx",["objectStoreNames","mode"]),s(f,"_tx",IDBTransaction,["abort"]),p.prototype.createObjectStore=function(){return new h(this._db.createObjectStore.apply(this._db,arguments))},o(p,"_db",["name","version","objectStoreNames"]),s(p,"_db",IDBDatabase,["deleteObjectStore","close"]),d.prototype.transaction=function(){return new f(this._db.transaction.apply(this._db,arguments))},o(d,"_db",["name","version","objectStoreNames"]),s(d,"_db",IDBDatabase,["close"]),["openCursor","o
2penKeyCursor"].forEach((function(e){[h,c].forEach((function(n){e in n.prototype&&(n.prototype[e.replace("open","iterate")]=function(){var n=t(arguments),r=n[n.length-1],i=this._store||this._index,o=i[e].apply(i,n.slice(0,-1));o.onsuccess=function(){r(o.result)}})}))})),[c,h].forEach((function(e){e.prototype.getAll||(e.prototype.getAll=function(e,t){var n=this,r=[];return new Promise((function(i){n.iterateCursor(e,(function(e){e?(r.push(e.value),void 0===t||r.length!=t?e.continue():i(r)):i(r)}))}))})})),e.openDb=function(e,t,n){var i=r(indexedDB,"open",[e,t]),o=i.request;return o&&(o.onupgradeneeded=function(e){n&&n(new p(o.result,e.oldVersion,o.transaction))}),i.then((function(e){return new d(e)}))},e.deleteDb=function(e){return r(indexedDB,"deleteDatabase",[e])},Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t,n){"use strict";function r(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}var i;n.r(t),n.d(t,"LogLevel",(function(){return o})),n.d(t,"Logger",(function(){return h})),n.d(t,"setLogLevel",(function(){return f})),n.d(t,"setUserLogHandler",(function(){return p}));var o,a=[];!function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.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),l=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];if(!(t<e.logLevel)){var o=(new Date).toISOString(),a=c[t];if(!a)throw new Error("Attempted to log a message with an invalid logType (value: "+t+")");console[a].apply(console,r(["["+o+"] "+e.name+":"],n))}},h=function(){function e(e){this.name=e,this._logLevel=u,this._logHandler=l,this._userLogHandler=null,a.push(this)}return Object.defineProperty(e.prototype,"logLevel",{get:function(){return this._logLevel},set:function(e){if(!(e in o))throw new TypeError('Invalid value "'+e+'" assigned to `logLevel`');this._logLevel=e},enumerable:!1,configurable:!0}),e.prototype.setLogLevel=function(e){this._logLevel="string"===typeof e?s[e]:e},Object.defineProperty(e.prototype,"logHandler",{get:function(){return this._logHandler},set:function(e){if("function"!==typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"userLogHandler",{get:function(){return this._userLogHandler},set:function(e){this._userLogHandler=e},enumerable:!1,configurable:!0}),e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.DEBUG],e)),this._logHandler.apply(this,r([this,o.DEBUG],e))},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.VERBOSE],e)),this._logHandler.apply(this,r([this,o.VERBOSE],e))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.INFO],e)),this._logHandler.apply(this,r([this,o.INFO],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.WARN],e)),this._logHandler.apply(this,r([this,o.WARN],e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.ERROR],e)),this._logHandler.apply(this,r([this,o.ERROR],e))},e}();function f(e){a.forEach((function(t){t.setLogLevel(e)}))}function p(e,t){for(var n=function(n){var r=null;t&&t.level&&(r=s[t.level]),n.userLogHandler=null===e?null:function(t,n){for(var i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];var s=i.map((function(e){if(null==e)return null;if("string"===typeof e)return e;if("number"===typeof e||"boolean"===typeof e)return e.toString();if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch(t){return null}})).filter((function(e){return e})).join(" ");n>=(null!==r&&void 0!==r?r:t.logLevel)&&e({level:o[n].toLowerCase(),message:s,args:i,type:t.name})}},r=0,i=a;r<i.length;r++){n(i[r])}}},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}}(),e.exports=n(73)},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(31);var i=n(49),o=n(35);function a(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(i.a)(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";var r=n(8);function i(e){return e&&"object"===typeof e&&"default"in e?e:{default:e}}n(86),n(87),n(88),n(90),n(91),n(92),n(93),n(94),n(95);var o=i(r);o.default.registerVersion("firebase","7.22.1","app");console.warn("\nIt looks like you're using the development build of the Firebase JS SDK.\nWhen deploying Firebase apps to production, it is advisable to only import\nthe individual SDK components you intend to use.\n\nFor the module builds, these are available in the following manner\n(replace <PACKAGE> with the name of a component - i.e. auth, database, etc):\n\nCommonJS Modules:\nconst firebase = require('firebase/app');\nrequire('firebase/<PACKAGE>');\n\nES Modules:\nimport firebase from 'firebase/app';\nimport 'firebase/<PACKAGE>';\n\nTypescript:\nimport * as firebase from 'firebase/app';\nimport 'firebase/<PACKAGE>';\n"),o.default.registerVersion("firebase","7.22.1"),e.exports=o.default},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";n.r(t),n.d(t,"registerInstallations",(function(){return Q}));var r,i=n(8),o=n.n(i),a=n(13),s=n(1),u=n(4),c=n(22),l=((r={})["missing-app-config-values"]='Missing App configuration value: "{$valueName}"',r["not-registered"]="Firebase Installation is not registered.",r["installation-not-found"]="Firebase Installation not found.",r["request-failed"]='{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',r["app-offline"]="Could not process request. Application offline.",r["delete-pending-registration"]="Can't delete installation while there is a pending registration request.",r),h=new u.ErrorFactory("installations","Installations",l);function f(e){return e instanceof u.FirebaseError&&e.code.includes("request-failed")}function p(e){return"https://firebaseinstallations.googleapis.com/v1/projects/"+e.projectId+"/installations"}
2function d(e){return{token:e.token,requestStatus:2,expiresIn:(t=e.expiresIn,Number(t.replace("s","000"))),creationTime:Date.now()};var t}function v(e,t){return Object(s.__awaiter)(this,void 0,void 0,(function(){var n,r;return Object(s.__generator)(this,(function(i){switch(i.label){case 0:return[4,t.json()];case 1:return n=i.sent(),r=n.error,[2,h.create("request-failed",{requestName:e,serverCode:r.code,serverMessage:r.message,serverStatus:r.status})]}}))}))}function g(e){var t=e.apiKey;return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t})}function y(e,t){var n=t.refreshToken,r=g(e);return r.append("Authorization",function(e){return"FIS_v2 "+e}(n)),r}function m(e){return Object(s.__awaiter)(this,void 0,void 0,(function(){var t;return Object(s.__generator)(this,(function(n){switch(n.label){case 0:return[4,e()];case 1:return(t=n.sent()).status>=500&&t.status<600?[2,e()]:[2,t]}}))}))}function b(e,t){var n=t.fid;return Object(s.__awaiter)(this,void 0,void 0,(function(){var t,r,i,o,a,u;return Object(s.__generator)(this,(function(s){switch(s.label){case 0:return t=p(e),r=g(e),i={fid:n,authVersion:"FIS_v2",appId:e.appId,sdkVersion:"w:0.4.17"},o={method:"POST",headers:r,body:JSON.stringify(i)},[4,m((function(){return fetch(t,o)}))];case 1:return(a=s.sent()).ok?[4,a.json()]:[3,3];case 2:return u=s.sent(),[2,{fid:u.fid||n,registrationStatus:2,refreshToken:u.refreshToken,authToken:d(u.authToken)}];case 3:return[4,v("Create Installation",a)];case 4:throw s.sent()}}))}))}function _(e){return new Promise((function(t){setTimeout(t,e)}))}var w=/^[cdef][\w-]{21}$/;function E(){try{var e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;var t=function(e){return(t=e,btoa(String.fromCharCode.apply(String,Object(s.__spread)(t))).replace(/\+/g,"-").replace(/\//g,"_")).substr(0,22);var t}(e);return w.test(t)?t:""}catch(r){return""}}function T(e){return e.appName+"!"+e.appId}var S=new Map;function I(e,t){var n=T(e);C(n,t),function(e,t){var n=x();n&&n.postMessage({key:e,fid:t});O()}(n,t)}function C(e,t){var n,r,i=S.get(e);if(i)try{for(var o=Object(s.__values)(i),a=o.next();!a.done;a=o.next()){(0,a.value)(t)}}catch(u){n={error:u}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}var k=null;function x(){return!k&&"BroadcastChannel"in self&&((k=new BroadcastChannel("[Firebase] FID Change")).onmessage=function(e){C(e.data.key,e.data.fid)}),k}function O(){0===S.size&&k&&(k.close(),k=null)}var N="firebase-installations-store",A=null;function P(){return A||(A=Object(c.openDb)("firebase-installations-database",1,(function(e){switch(e.oldVersion){case 0:e.createObjectStore(N)}}))),A}function R(e,t){return Object(s.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o,a;return Object(s.__generator)(this,(function(s){switch(s.label){case 0:return n=T(e),[4,P()];case 1:return r=s.sent(),i=r.transaction(N,"readwrite"),[4,(o=i.objectStore(N)).get(n)];case 2:return a=s.sent(),[4,o.put(t,n)];case 3:return s.sent(),[4,i.complete];case 4:return s.sent(),a&&a.fid===t.fid||I(e,t.fid),[2,t]}}))}))}function D(e){return Object(s.__awaiter)(this,void 0,void 0,(function(){var t,n,r;return Object(s.__generator)(this,(function(i){switch(i.label){case 0:return t=T(e),[4,P()];case 1:return n=i.sent(),[4,(r=n.transaction(N,"readwrite")).objectStore(N).delete(t)];case 2:return i.sent(),[4,r.complete];case 3:return i.sent(),[2]}}))}))}function L(e,t){return Object(s.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o,a,u;return Object(s.__generator)(this,(function(s){switch(s.label){case 0:return n=T(e),[4,P()];case 1:return r=s.sent(),i=r.transaction(N,"readwrite"),[4,(o=i.objectStore(N)).get(n)];case 2:return a=s.sent(),void 0!==(u=t(a))?[3,4]:[4,o.delete(n)];case 3:return s.sent(),[3,6];case 4:return[4,o.put(u,n)];case 5:s.sent(),s.label=6;case 6:return[4,i.complete];case 7:return s.sent(),!u||a&&a.fid===u.fid||I(e,u.fid),[2,u]}}))}))}function M(e){return Object(s.__awaiter)(this,void 0,void 0,(function(){var t,n,r;return Object(s.__generator)(this,(function(i){switch(i.label){case 0:return[4,L(e,(function(n){var r=function(e){return U(e||{fid:E(),registrationStatus:0})}(n),i=function(e,t){if(0===t.registrationStatus){if(!navigator.onLine){var n=Promise.reject(h.create("app-offline"));return{installationEntry:t,registrationPromise:n}}var r={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},i=function(e,t){return Object(s.__awaiter)(this,void 0,void 0,(function(){var n,r;return Object(s.__generator)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,7]),[4,b(e,t)];case 1:return n=i.sent(),[2,R(e,n)];case 2:return f(r=i.sent())&&409===r.serverCode?[4,D(e)]:[3,4];case 3:return i.sent(),[3,6];case 4:return[4,R(e,{fid:t.fid,registrationStatus:0})];case 5:i.sent(),i.label=6;case 6:throw r;case 7:return[2]}}
2))}))}(e,r);return{installationEntry:r,registrationPromise:i}}return 1===t.registrationStatus?{installationEntry:t,registrationPromise:j(e)}:{installationEntry:t}}(e,r);return t=i.registrationPromise,i.installationEntry}))];case 1:return""!==(n=i.sent()).fid?[3,3]:(r={},[4,t]);case 2:return[2,(r.installationEntry=i.sent(),r)];case 3:return[2,{installationEntry:n,registrationPromise:t}]}}))}))}function j(e){return Object(s.__awaiter)(this,void 0,void 0,(function(){var t,n,r,i;return Object(s.__generator)(this,(function(o){switch(o.label){case 0:return[4,F(e)];case 1:t=o.sent(),o.label=2;case 2:return 1!==t.registrationStatus?[3,5]:[4,_(100)];case 3:return o.sent(),[4,F(e)];case 4:return t=o.sent(),[3,2];case 5:return 0!==t.registrationStatus?[3,7]:[4,M(e)];case 6:return n=o.sent(),r=n.installationEntry,(i=n.registrationPromise)?[2,i]:[2,r];case 7:return[2,t]}}))}))}function F(e){return L(e,(function(e){if(!e)throw h.create("installation-not-found");return U(e)}))}function U(e){return 1===(t=e).registrationStatus&&t.registrationTime+1e4<Date.now()?{fid:e.fid,registrationStatus:0}:e;var t}function V(e,t){var n=e.appConfig,r=e.platformLoggerProvider;return Object(s.__awaiter)(this,void 0,void 0,(function(){var e,i,o,a,u,c,l;return Object(s.__generator)(this,(function(s){switch(s.label){case 0:return e=function(e,t){var n=t.fid;return p(e)+"/"+n+"/authTokens:generate"}(n,t),i=y(n,t),(o=r.getImmediate({optional:!0}))&&i.append("x-firebase-client",o.getPlatformInfoString()),a={installation:{sdkVersion:"w:0.4.17"}},u={method:"POST",headers:i,body:JSON.stringify(a)},[4,m((function(){return fetch(e,u)}))];case 1:return(c=s.sent()).ok?[4,c.json()]:[3,3];case 2:return l=s.sent(),[2,d(l)];case 3:return[4,v("Generate Auth Token",c)];case 4:throw s.sent()}}))}))}function q(e,t){return void 0===t&&(t=!1),Object(s.__awaiter)(this,void 0,void 0,(function(){var n,r,i;return Object(s.__generator)(this,(function(o){switch(o.label){case 0:return[4,L(e.appConfig,(function(r){if(!z(r))throw h.create("not-registered");var i=r.authToken;if(!t&&function(e){return 2===e.requestStatus&&!function(e){var t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+36e5}(e)}(i))return r;if(1===i.requestStatus)return n=function(e,t){return Object(s.__awaiter)(this,void 0,void 0,(function(){var n,r;return Object(s.__generator)(this,(function(i){switch(i.label){case 0:return[4,B(e.appConfig)];case 1:n=i.sent(),i.label=2;case 2:return 1!==n.authToken.requestStatus?[3,5]:[4,_(100)];case 3:return i.sent(),[4,B(e.appConfig)];case 4:return n=i.sent(),[3,2];case 5:return 0===(r=n.authToken).requestStatus?[2,q(e,t)]:[2,r]}}))}))}(e,t),r;if(!navigator.onLine)throw h.create("app-offline");var o=function(e){var t={requestStatus:1,requestTime:Date.now()};return Object(s.__assign)(Object(s.__assign)({},e),{authToken:t})}(r);return n=function(e,t){return Object(s.__awaiter)(this,void 0,void 0,(function(){var n,r,i;return Object(s.__generator)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,8]),[4,V(e,t)];case 1:return n=o.sent(),i=Object(s.__assign)(Object(s.__assign)({},t),{authToken:n}),[4,R(e.appConfig,i)];case 2:return o.sent(),[2,n];case 3:return!f(r=o.sent())||401!==r.serverCode&&404!==r.serverCode?[3,5]:[4,D(e.appConfig)];case 4:return o.sent(),[3,7];case 5:return i=Object(s.__assign)(Object(s.__assign)({},t),{authToken:{requestStatus:0}}),[4,R(e.appConfig,i)];case 6:o.sent(),o.label=7;case 7:throw r;case 8:return[2]}}
2))}))}(e,o),o}))];case 1:return r=o.sent(),n?[4,n]:[3,3];case 2:return i=o.sent(),[3,4];case 3:i=r.authToken,o.label=4;case 4:return[2,i]}}))}))}function B(e){return L(e,(function(e){if(!z(e))throw h.create("not-registered");var t,n=e.authToken;return 1===(t=n).requestStatus&&t.requestTime+1e4<Date.now()?Object(s.__assign)(Object(s.__assign)({},e),{authToken:{requestStatus:0}}):e}))}function z(e){return void 0!==e&&2===e.registrationStatus}function W(e){return Object(s.__awaiter)(this,void 0,void 0,(function(){var t;return Object(s.__generator)(this,(function(n){switch(n.label){case 0:return[4,M(e)];case 1:return(t=n.sent().registrationPromise)?[4,t]:[3,3];case 2:n.sent(),n.label=3;case 3:return[2]}}))}))}function H(e,t){return Object(s.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o;return Object(s.__generator)(this,(function(a){switch(a.label){case 0:return n=function(e,t){var n=t.fid;return p(e)+"/"+n}(e,t),r=y(e,t),i={method:"DELETE",headers:r},[4,m((function(){return fetch(n,i)}))];case 1:return(o=a.sent()).ok?[3,3]:[4,v("Delete Installation",o)];case 2:throw a.sent();case 3:return[2]}}
2))}))}function G(e,t){var n=e.appConfig;return function(e,t){x();var n=T(e),r=S.get(n);r||(r=new Set,S.set(n,r)),r.add(t)}(n,t),function(){!function(e,t){var n=T(e),r=S.get(n);r&&(r.delete(t),0===r.size&&S.delete(n),O())}(n,t)}}function K(e){return h.create("missing-app-config-values",{valueName:e})}function Q(e){e.INTERNAL.registerComponent(new a.Component("installations",(function(e){var t=e.getProvider("app").getImmediate(),n={appConfig:function(e){var t,n;if(!e||!e.options)throw K("App Configuration");if(!e.name)throw K("App Name");try{for(var r=Object(s.__values)(["projectId","apiKey","appId"]),i=r.next();!i.done;i=r.next()){var o=i.value;if(!e.options[o])throw K(o)}}catch(a){t={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t),platformLoggerProvider:e.getProvider("platform-logger")};return{app:t,getId:function(){return function(e){return Object(s.__awaiter)(this,void 0,void 0,(function(){var t,n,r;return Object(s.__generator)(this,(function(i){switch(i.label){case 0:return[4,M(e.appConfig)];case 1:return t=i.sent(),n=t.installationEntry,(r=t.registrationPromise)?r.catch(console.error):q(e).catch(console.error),[2,n.fid]}}))}))}(n)},getToken:function(e){return function(e,t){return void 0===t&&(t=!1),Object(s.__awaiter)(this,void 0,void 0,(function(){return Object(s.__generator)(this,(function(n){switch(n.label){case 0:return[4,W(e.appConfig)];case 1:return n.sent(),[4,q(e,t)];case 2:return[2,n.sent().token]}}))}))}(n,e)},delete:function(){return function(e){return Object(s.__awaiter)(this,void 0,void 0,(function(){var t,n;return Object(s.__generator)(this,(function(r){switch(r.label){case 0:return[4,L(t=e.appConfig,(function(e){if(!e||0!==e.registrationStatus)return e}))];case 1:if(!(n=r.sent()))return[3,6];if(1!==n.registrationStatus)return[3,2];throw h.create("delete-pending-registration");case 2:if(2!==n.registrationStatus)return[3,6];if(navigator.onLine)return[3,3];throw h.create("app-offline");case 3:return[4,H(t,n)];case 4:return r.sent(),[4,D(t)];case 5:r.sent(),r.label=6;case 6:return[2]}}
2))}))}(n)},onIdChange:function(e){return G(n,e)}}}),"PUBLIC")),e.registerVersion("@firebase/installations","0.4.17")}Q(o.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(5),i=n(6),o=n(0),a=n.n(o),s=n(17),u=(n(12),n(2)),c=n(14),l=n(15),h=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).history=Object(s.a)(t.props),t}return Object(i.a)(t,e),t.prototype.render=function(){return a.a.createElement(r.b,{history:this.history,children:this.props.children})},t}(a.a.Component);a.a.Component;var f=function(e,t){return"function"===typeof e?e(t):e},p=function(e,t){return"string"===typeof e?Object(s.c)(e,null,null,t):e},d=function(e){return e},v=a.a.forwardRef;"undefined"===typeof v&&(v=d);var g=v((function(e,t){var n=e.innerRef,r=e.navigate,i=e.onClick,o=Object(c.a)(e,["innerRef","navigate","onClick"]),s=o.target,l=Object(u.a)({},o,{onClick:function(e){try{i&&i(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||s&&"_self"!==s||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return l.ref=d!==v&&t||n,a.a.createElement("a",l)}));var y=v((function(e,t){var n=e.component,i=void 0===n?g:n,o=e.replace,s=e.to,h=e.innerRef,y=Object(c.a)(e,["component","replace","to","innerRef"]);return a.a.createElement(r.d.Consumer,null,(function(e){e||Object(l.a)(!1);var n=e.history,r=p(f(s,e.location),e.location),c=r?n.createHref(r):"",g=Object(u.a)({},y,{href:c,navigate:function(){var t=f(s,e.location);(o?n.replace:n.push)(t)}});return d!==v?g.ref=t||h:g.innerRef=h,a.a.createElement(i,g)}))})),m=function(e){return e},b=a.a.forwardRef;"undefined"===typeof b&&(b=m);b((function(e,t){var n=e["aria-current"],i=void 0===n?"page":n,o=e.activeClassName,s=void 0===o?"active":o,h=e.activeStyle,d=e.className,v=e.exact,g=e.isActive,_=e.location,w=e.sensitive,E=e.strict,T=e.style,S=e.to,I=e.innerRef,C=Object(c.a)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return a.a.createElement(r.d.Consumer,null,(function(e){e||Object(l.a)(!1);var n=_||e.location,o=p(f(S,n),n),c=o.pathname,k=c&&c.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),x=k?Object(r.e)(n.pathname,{path:k,exact:v,sensitive:w,strict:E}):null,O=!!(g?g(x,n):x),N=O?function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return e})).join(" ")}(d,s):d,A=O?Object(u.a)({},T,{},h):T,P=Object(u.a)({"aria-current":O&&i||null,className:N,style:A,to:o},C);return m!==b?P.ref=t||I:P.innerRef=I,a.a.createElement(y,P)}))}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(31);function i(e,t){if(e){if("string"===typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";var r=n(43),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,l=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,d=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(d){var i=p(n);i&&i!==d&&e(t,i,r)}var a=l(n);h&&(a=a.concat(h(n)));for(var s=u(t),v=u(n),g=0;g<a.length;++g){var y=a[g];if(!o[y]&&(!r||!r[y])&&(!v||!v[y])&&(!s||!s[y])){var m=f(n,y);try{c(t,y,m)}catch(b){}}}}return t}},function(e,t,n){"use strict";var r=n(7);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(0)),o=(0,r(n(10)).default)(i.default.createElement("path",{d:"M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2zm0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19v10z"}),"Inbox");t.default=o},function(e,t,n){"use strict";(function(e){var r=n(0),i=n.n(r),o=n(6),a=n(12),s=n.n(a),u="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e?e:{};function c(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,r){e=n,t.forEach((function(t){return t(e,r)}))}}}var l=i.a.createContext||function(e,t){var n,i,a="__create-react-context-"+function(){var e="__global_unique_id__";return u[e]=(u[e]||0)+1}()+"__",l=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).emitter=c(t.props.value),t}Object(o.a)(n,e);var r=n.prototype;return r.getChildContext=function(){var e;return(e={})[a]=this.emitter,e},r.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,i=e.value;((o=r)===(a=i)?0!==o||1/o===1/a:o!==o&&a!==a)?n=0:(n="function"===typeof t?t(r,i):1073741823,0!==(n|=0)&&this.emitter.set(e.value,n))}var o,a},r.render=function(){return this.props.children},n}(r.Component);l.childContextTypes=((n={})[a]=s.a.object.isRequired,n);var h=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).state={value:e.getValue()},e.onUpdate=function(t,n){0!==((0|e.observedBits)&n)&&e.setState({value:e.getValue()})},e}Object(o.a)(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=void 0===t||null===t?1073741823:t},r.componentDidMount=function(){this.context[a]&&this.context[a].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=void 0===e||null===e?1073741823:e},r.componentWillUnmount=function(){this.context[a]&&this.context[a].off(this.onUpdate)},r.getValue=function(){return this.context[a]?this.context[a].get():e},r.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(r.Component);return h.contextTypes=((i={})[a]=s.a.object,i),{Provider:l,Consumer:h}};t.a=l}).call(this,n(32))},function(e,t,n){var r=n(96);e.exports=p,e.exports.parse=o,e.exports.compile=function(e,t){return s(o(e,t),t)},e.exports.tokensToFunction=s,e.exports.tokensToRegExp=f;var i=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(e,t){for(var n,r=[],o=0,a=0,s="",l=t&&t.delimiter||"/";null!=(n=i.exec(e));){var h=n[0],f=n[1],p=n.index;if(s+=e.slice(a,p),a=p+h.length,f)s+=f[1];else{var d=e[a],v=n[2],g=n[3],y=n[4],m=n[5],b=n[6],_=n[7];s&&(r.push(s),s="");var w=null!=v&&null!=d&&d!==v,E="+"===b||"*"===b,T="?"===b||"*"===b,S=n[2]||l,I=y||m;r.push({name:g||o++,prefix:v||"",delimiter:S,optional:T,repeat:E,partial:w,asterisk:!!_,pattern:I?c(I):_?".*":"[^"+u(S)+"]+?"})}}return a<e.length&&(s+=e.substr(a)),s&&r.push(s),r}function a(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function s(e,t){for(var n=new Array(e.length),i=0;i<e.length;i++)"object"===typeof e[i]&&(n[i]=new RegExp("^(?:"+e[i].pattern+")$",h(t)));return function(t,i){for(var o="",s=t||{},u=(i||{}).pretty?a:encodeURIComponent,c=0;c<e.length;c++){var l=e[c];if("string"!==typeof l){var h,f=s[l.name];if(null==f){if(l.optional){l.partial&&(o+=l.prefix);continue}throw new TypeError('Expected "'+l.name+'" to be defined')}if(r(f)){if(!l.repeat)throw new TypeError('Expected "'+l.name+'" to not repeat, but received `'+JSON.stringify(f)+"`");if(0===f.length){if(l.optional)continue;throw new TypeError('Expected "'+l.name+'" to not be empty')}for(var p=0;p<f.length;p++){if(h=u(f[p]),!n[c].test(h))throw new TypeError('Expected all "'+l.name+'" to match "'+l.pattern+'", but received `'+JSON.stringify(h)+"`");o+=(0===p?l.prefix:l.delimiter)+h}}else{if(h=l.asterisk?encodeURI(f).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):u(f),!n[c].test(h))throw new TypeError('Expected "'+l.name+'" to match "'+l.pattern+'", but received "'+h+'"');o+=l.prefix+h}}else o+=l}return o}}function u(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function c(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function l(e,t){return e.keys=t,e}function h(e){return e&&e.sensitive?"":"i"}function f(e,t,n){r(t)||(n=t||n,t=[]);for(var i=(n=n||{}).strict,o=!1!==n.end,a="",s=0;s<e.length;s++){var c=e[s];if("string"===typeof c)a+=u(c);else{var f=u(c.prefix),p="(?:"+c.pattern+")";t.push(c),c.repeat&&(p+="(?:"+f+p+")*"),a+=p=c.optional?c.partial?f+"("+p+")?":"(?:"+f+"("+p+"))?":f+"("+p+")"}}var d=u(n.delimiter||"/"),v=a.slice(-d.length)===d;
2return i||(a=(v?a.slice(0,-d.length):a)+"(?:"+d+"(?=$))?"),a+=o?"$":i&&v?"":"(?="+d+"|$)",l(new RegExp("^"+a,h(n)),t)}function p(e,t,n){return r(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return l(e,t)}(e,t):r(e)?function(e,t,n){for(var r=[],i=0;i<e.length;i++)r.push(p(e[i],t,n).source);return l(new RegExp("(?:"+r.join("|")+")",h(n)),t)}(e,t,n):function(e,t,n){return f(o(e,n),t,n)}(e,t,n)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(26);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,t){for(var n,s,u=a(e),c=1;c<arguments.length;c++){for(var l in n=Object(arguments[c]))i.call(n,l)&&(u[l]=n[l]);if(r){s=r(n);for(var h=0;h<s.length;h++)o.call(n,s[h])&&(u[s[h]]=n[s[h]])}}return u}},function(e,t,n){"use strict";var r=n(2),i=n(3),o=n(0),a=(n(12),n(11)),s=n(19),u=n(21),c=o.forwardRef((function(e,t){var n=e.children,s=e.classes,c=e.className,l=e.color,h=void 0===l?"inherit":l,f=e.component,p=void 0===f?"svg":f,d=e.fontSize,v=void 0===d?"default":d,g=e.htmlColor,y=e.titleAccess,m=e.viewBox,b=void 0===m?"0 0 24 24":m,_=Object(i.a)(e,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return o.createElement(p,Object(r.a)({className:Object(a.a)(s.root,c,"inherit"!==h&&s["color".concat(Object(u.a)(h))],"default"!==v&&s["fontSize".concat(Object(u.a)(v))]),focusable:"false",viewBox:b,color:g,"aria-hidden":!y||void 0,role:y?"img":void 0,ref:t},_),n,y?o.createElement("title",null,y):null)}));c.muiName="SvgIcon",t.a=Object(s.a)((function(e){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:e.typography.pxToRem(24),transition:e.transitions.create("fill",{duration:e.transitions.duration.shorter})},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(35)}}}),{name:"MuiSvgIcon"})(c)},function(e,t,n){"use strict";e.exports=n(82)},function(e,t,n){"use strict";n.r(t);var r=n(42);n.d(t,"default",(function(){return r.a}))},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"===typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,c=[],l=!1,h=-1;function f(){l&&u&&(l=!1,u.length?c=u.concat(c):h=-1,c.length&&p())}function p(){if(!l){var e=s(f);l=!0;for(var t=c.length;t;){for(u=c,c=[];++h<t;)u&&u[h].run();h=-1,t=c.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);
2if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function v(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new d(e,t)),1!==c.length||l||s(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(7);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(0)),o=(0,r(n(10)).default)(i.default.createElement(i.default.Fragment,null,i.default.createElement("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),i.default.createElement("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})),"AccessTime");t.default=o},function(e,t,n){"use strict";var r=n(7);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(0)),o=(0,r(n(10)).default)(i.default.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search");t.default=o},function(e,t,n){"use strict";var r=n(7);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(0)),o=(0,r(n(10)).default)(i.default.createElement("path",{d:"M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4z"}),"HelpOutline");t.default=o},function(e,t,n){"use strict";var r=n(7);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(0)),o=(0,r(n(10)).default)(i.default.createElement("circle",{cx:"12",cy:"12",r:"8"}),"FiberManualRecord");t.default=o},function(e,t,n){"use strict";var r=n(7);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(0)),o=(0,r(n(10)).default)(i.default.createElement("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Create");t.default=o},function(e,t,n){"use strict";var r=n(7);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(0)),o=(0,r(n(10)).default)(i.default.createElement("path",{d:"M20 2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"}),"InsertComment");t.default=o},function(e,t,n){"use strict";var r=n(7);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(0)),o=(0,r(n(10)).default)(i.default.createElement("path",{d:"M21.99 8c0-.72-.37-1.35-.94-1.7L12 1 2.95 6.3C2.38 6.65 2 7.28 2 8v10c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2l-.01-10zM12 13L3.74 7.84 12 3l8.26 4.84L12 13z"}),"Drafts");t.default=o},function(e,t,n){"use strict";var r=n(7);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(0)),o=(0,r(n(10)).default)(i.default.createElement("path",{d:"M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2zm0 15l-5-2.18L7 18V5h10v13z"}),"BookmarkBorder");t.default=o},function(e,t,n){"use strict";var r=n(7);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(0)),o=(0,r(n(10)).default)(i.default.createElement("path",{d:"M4 8h4V4H4v4zm6 12h4v-4h-4v4zm-6 0h4v-4H4v4zm0-6h4v-4H4v4zm6 0h4v-4h-4v4zm6-10v4h4V4h-4zm-6 4h4V4h-4v4zm6 6h4v-4h-4v4zm0 6h4v-4h-4v4z"}),"Apps");t.default=o},function(e,t,n){"use strict";var r=n(7);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(0)),o=(0,r(n(10)).default)(i.default.createElement("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4l6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h7zm-1 7h5.5L14 6.5V12z"}),"FileCopy");t.default=o},function(e,t,n){"use strict";var r=n(7);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(0)),o=(0,r(n(10)).default)(i.default.createElement("path",{d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess");t.default=o},function(e,t,n){"use strict";var r=n(7);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(0)),o=(0,r(n(10)).default)(i.default.createElement("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");t.default=o},function(e,t,n){"use strict";var r=n(7);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(0)),o=(0,r(n(10)).default)(i.default.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");t.default=o},function(e,t,n){"use strict";var r=n(7);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(0)),o=(0,r(n(10)).default)(i.default.createElement("path",{d:"M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}),"StarBorderOutlined");t.default=o},function(e,t,n){"use strict";var r=n(7);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(0)),o=(0,r(n(10)).default)(i.default.createElement("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"InfoOutlined");t.default=o},function(e,t,n){"use strict";function r(e){if(null==e)throw new TypeError("Cannot destructure undefined")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function i(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}n.d(t,"a",(function(){return u}));var o=n(24),a=n(25);function s(e,t){return!t||"object"!==Object(o.a)(t)&&"function"!==typeof t?Object(a.a)(e):t}function u(e){return function(){var t,n=r(e);if(i()){var o=r(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return s(this,t)}}},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";function r(e){for(var t="https://material-ui.com/production-error/?code="+e,n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified Material-UI error #"+e+"; visit "+t+" for the full message."}n.d(t,"a",(function(){return r}))},,,,function(e,t,n){"use strict";var r=n(41),i="function"===typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,u=i?Symbol.for("react.strict_mode"):60108,c=i?Symbol.for("react.profiler"):60114,l=i?Symbol.for("react.provider"):60109,h=i?Symbol.for("react.context"):60110,f=i?Symbol.for("react.forward_ref"):60112,p=i?Symbol.for("react.suspense"):60113,d=i?Symbol.for("react.memo"):60115,v=i?Symbol.for("react.lazy"):60116,g="function"===typeof Symbol&&Symbol.iterator;function y(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b={};function _(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||m}function w(){}function E(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||m}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(y(85));this.updater.enqueueSetState(this,e,t,"setState")},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},w.prototype=_.prototype;var T=E.prototype=new w;T.constructor=E,r(T,_.prototype),T.isPureReactComponent=!0;var S={current:null},I=Object.prototype.hasOwnProperty,C={key:!0,ref:!0,__self:!0,__source:!0};
2function k(e,t,n){var r,i={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)I.call(t,r)&&!C.hasOwnProperty(r)&&(i[r]=t[r]);var u=arguments.length-2;if(1===u)i.children=n;else if(1<u){for(var c=Array(u),l=0;l<u;l++)c[l]=arguments[l+2];i.children=c}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===i[r]&&(i[r]=u[r]);return{$$typeof:o,type:e,key:a,ref:s,props:i,_owner:S.current}}function x(e){return"object"===typeof e&&null!==e&&e.$$typeof===o}var O=/\/+/g,N=[];function A(e,t,n,r){if(N.length){var i=N.pop();return i.result=e,i.keyPrefix=t,i.func=n,i.context=r,i.count=0,i}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function P(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>N.length&&N.push(e)}function R(e,t,n){return null==e?0:function e(t,n,r,i){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var u=!1;if(null===t)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case o:case a:u=!0}}if(u)return r(i,t,""===n?"."+D(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;c<t.length;c++){var l=n+D(s=t[c],c);u+=e(s,l,r,i)}else if(null===t||"object"!==typeof t?l=null:l="function"===typeof(l=g&&t[g]||t["@@iterator"])?l:null,"function"===typeof l)for(t=l.call(t),c=0;!(s=t.next()).done;)u+=e(s=s.value,l=n+D(s,c++),r,i);else if("object"===s)throw r=""+t,Error(y(31,"[object Object]"===r?"object with keys {"+Object.keys(t).join(", ")+"}":r,""));return u}
vendor: 4,222 bytes, line 2
2(e,"",t,n)}function D(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function L(e,t){e.func.call(e.context,t,e.count++)}function M(e,t,n){var r=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?j(e,r,n,(function(e){return e})):null!=e&&(x(e)&&(e=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,i+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(O,"$&/")+"/")+n)),r.push(e))}function j(e,t,n,r,i){var o="";null!=n&&(o=(""+n).replace(O,"$&/")+"/"),R(e,M,t=A(t,o,r,i)),P(t)}var F={current:null};function U(){var e=F.current;if(null===e)throw Error(y(321));return e}var V={ReactCurrentDispatcher:F,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:S,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:function(e,t,n){if(null==e)return e;var r=[];return j(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;R(e,L,t=A(null,null,t,n)),P(t)},count:function(e){return R(e,(function(){return null}),null)},toArray:function(e){var t=[];return j(e,t,null,(function(e){return e})),t},only:function(e){if(!x(e))throw Error(y(143));return e}},t.Component=_,t.Fragment=s,t.Profiler=c,t.PureComponent=E,t.StrictMode=u,t.Suspense=p,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=V,t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error(y(267,e));var i=r({},e.props),a=e.key,s=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,u=S.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in t)I.call(t,l)&&!C.hasOwnProperty(l)&&(i[l]=void 0===t[l]&&void 0!==c?c[l]:t[l])}var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){c=Array(l);for(var h=0;h<l;h++)c[h]=arguments[h+2];i.children=c}return{$$typeof:o,type:e.type,key:a,ref:s,props:i,_owner:u}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:h,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:l,_context:e},e.Consumer=e},t.createElement=k,t.createFactory=function(e){var t=k.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:f,render:e}},t.isValidElement=x,t.lazy=function(e){return{$$typeof:v,_ctor:e,_status:-1,_result:null}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return U().useCallback(e,t)},t.useContext=function(e,t){return U().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return U().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return U().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return U().useLayoutEffect(e,t)},t.useMemo=function(e,t){return U().useMemo(e,t)},t.useReducer=function(e,t,n){return U().useReducer(e,t,n)},t.useRef=function(e){return U().useRef(e)},t.useState=function(e){return U().useState(e)},t.version="16.13.1"},function(e,t,n){"use strict";var r=n(0),i=n(41),o=n(74);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));function s(e,t,n,r,i,o,a,s,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(l){this.onError(l)}}var u=!1,c=null,l=!1,h=null,f={onError:function(e){u=!0,c=e}};function p(e,t,n,r,i,o,a,l,h){u=!1,c=null,s.apply(f,arguments)}var d=null,v=null,g=null;function y(e,t,n){var r=e.type||"unknown-event";e.currentTarget=g(n),function(e,t,n,r,i,o,s,f,d){if(p.apply(this,arguments),u){if(!u)throw Error(a(198));var v=c;u=!1,c=null,l||(l=!0,h=v)}}(r,t,void 0,e),e.currentTarget=null}var m=null,b={};function _(){if(m)for(var e in b){var t=b[e],n=m.indexOf(e);if(!(-1<n))throw Error(a(96,e));if(!E[n]){if(!t.extractEvents)throw Error(a(97,e));for(var r in E[n]=t,n=t.eventTypes){var i=void 0,o=n[r],s=t,u=r;if(T.hasOwnProperty(u))throw Error(a(99,u));T[u]=o;
vendor: 4,751 bytes, line 2
2var c=o.phasedRegistrationNames;if(c){for(i in c)c.hasOwnProperty(i)&&w(c[i],s,u);i=!0}else o.registrationName?(w(o.registrationName,s,u),i=!0):i=!1;if(!i)throw Error(a(98,r,e))}}}}function w(e,t,n){if(S[e])throw Error(a(100,e));S[e]=t,I[e]=t.eventTypes[n].dependencies}var E=[],T={},S={},I={};function C(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];if(!b.hasOwnProperty(t)||b[t]!==r){if(b[t])throw Error(a(102,t));b[t]=r,n=!0}}n&&_()}var k=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),x=null,O=null,N=null;function A(e){if(e=v(e)){if("function"!==typeof x)throw Error(a(280));var t=e.stateNode;t&&(t=d(t),x(e.stateNode,e.type,t))}}function P(e){O?N?N.push(e):N=[e]:O=e}function R(){if(O){var e=O,t=N;if(N=O=null,A(e),t)for(e=0;e<t.length;e++)A(t[e])}}function D(e,t){return e(t)}function L(e,t,n,r,i){return e(t,n,r,i)}function M(){}var j=D,F=!1,U=!1;function V(){null===O&&null===N||(M(),R())}function q(e,t,n){if(U)return e(t,n);U=!0;try{return j(e,t,n)}finally{U=!1,V()}}var B=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,z=Object.prototype.hasOwnProperty,W={},H={};function G(e,t,n,r,i,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o}var K={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){K[e]=new G(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];K[t]=new G(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){K[e]=new G(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){K[e]=new G(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){K[e]=new G(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(e){K[e]=new G(e,3,!0,e,null,!1)})),["capture","download"].forEach((function(e){K[e]=new G(e,4,!1,e,null,!1)})),["cols","rows","size","span"].forEach((function(e){K[e]=new G(e,6,!1,e,null,!1)})),["rowSpan","start"].forEach((function(e){K[e]=new G(e,5,!1,e.toLowerCase(),null,!1)}));var Q=/[\-:]([a-z])/g;function $(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(Q,$);K[t]=new G(t,1,!1,e,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(Q,$);K[t]=new G(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(Q,$);K[t]=new G(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(e){K[e]=new G(e,1,!1,e.toLowerCase(),null,!1)})),K.xlinkHref=new G("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(e){K[e]=new G(e,1,!1,e.toLowerCase(),null,!0)}));
vendor: 4,251 bytes, line 2
2var Y=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function X(e,t,n,r){var i=K.hasOwnProperty(t)?K[t]:null;(null!==i?0===i.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!z.call(H,e)||!z.call(W,e)&&(B.test(e)?H[e]=!0:(W[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}Y.hasOwnProperty("ReactCurrentDispatcher")||(Y.ReactCurrentDispatcher={current:null}),Y.hasOwnProperty("ReactCurrentBatchConfig")||(Y.ReactCurrentBatchConfig={suspense:null});var J=/^(.*)[\\\/]/,Z="function"===typeof Symbol&&Symbol.for,ee=Z?Symbol.for("react.element"):60103,te=Z?Symbol.for("react.portal"):60106,ne=Z?Symbol.for("react.fragment"):60107,re=Z?Symbol.for("react.strict_mode"):60108,ie=Z?Symbol.for("react.profiler"):60114,oe=Z?Symbol.for("react.provider"):60109,ae=Z?Symbol.for("react.context"):60110,se=Z?Symbol.for("react.concurrent_mode"):60111,ue=Z?Symbol.for("react.forward_ref"):60112,ce=Z?Symbol.for("react.suspense"):60113,le=Z?Symbol.for("react.suspense_list"):60120,he=Z?Symbol.for("react.memo"):60115,fe=Z?Symbol.for("react.lazy"):60116,pe=Z?Symbol.for("react.block"):60121,de="function"===typeof Symbol&&Symbol.iterator;function ve(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=de&&e[de]||e["@@iterator"])?e:null}function ge(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case ne:return"Fragment";case te:return"Portal";case ie:return"Profiler";case re:return"StrictMode";case ce:return"Suspense";case le:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case ae:return"Context.Consumer";case oe:return"Context.Provider";case ue:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case he:return ge(e.type);case pe:return ge(e.render);case fe:if(e=1===e._status?e._result:null)return ge(e)}return null}function ye(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,i=e._debugSource,o=ge(e.type);n=null,r&&(n=ge(r.type)),r=o,o="",i?o=" (at "+i.fileName.replace(J,"")+":"+i.lineNumber+")":n&&(o=" (created by "+n+")"),n="\n in "+(r||"Unknown")+o}t+=n,e=e.return}while(e);return t}function me(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function be(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function _e(e){e._valueTracker||(e._valueTracker=function(e){var t=be(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function we(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=be(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Ee(e,t){var n=t.checked;return i({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Te(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;
vendor: 14,629 bytes, line 2
2n=me(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Se(e,t){null!=(t=t.checked)&&X(e,"checked",t,!1)}function Ie(e,t){Se(e,t);var n=me(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ke(e,t.type,n):t.hasOwnProperty("defaultValue")&&ke(e,t.type,me(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Ce(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ke(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function xe(e,t){return e=i({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function Oe(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+me(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function Ne(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return i({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ae(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:me(n)}}function Pe(e,t){var n=me(t.value),r=me(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function Re(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var De="http://www.w3.org/1999/xhtml",Le="http://www.w3.org/2000/svg";function Me(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function je(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Me(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Fe,Ue=function(e){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if(e.namespaceURI!==Le||"innerHTML"in e)e.innerHTML=t;else{for((Fe=Fe||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Fe.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function Ve(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function qe(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Be={animationend:qe("Animation","AnimationEnd"),animationiteration:qe("Animation","AnimationIteration"),animationstart:qe("Animation","AnimationStart"),transitionend:qe("Transition","TransitionEnd")},ze={},We={};function He(e){if(ze[e])return ze[e];if(!Be[e])return e;var t,n=Be[e];for(t in n)if(n.hasOwnProperty(t)&&t in We)return ze[e]=n[t];return e}k&&(We=document.createElement("div").style,"AnimationEvent"in window||(delete Be.animationend.animation,delete Be.animationiteration.animation,delete Be.animationstart.animation),"TransitionEvent"in window||delete Be.transitionend.transition);var Ge=He("animationend"),Ke=He("animationiteration"),Qe=He("animationstart"),$e=He("transitionend"),Ye="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Xe=new("function"===typeof WeakMap?WeakMap:Map);function Je(e){var t=Xe.get(e);return void 0===t&&(t=new Map,Xe.set(e,t)),t}function Ze(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(1026&(t=e).effectTag)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function et(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function tt(e){if(Ze(e)!==e)throw Error(a(188))}function nt(e){if(!(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ze(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return tt(i),e;if(o===r)return tt(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,u=i.child;u;){if(u===n){s=!0,n=i,r=o;break}if(u===r){s=!0,r=i,n=o;break}u=u.sibling}if(!s){for(u=o.child;u;){if(u===n){s=!0,n=o,r=i;break}if(u===r){s=!0,r=o,n=i;break}u=u.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function rt(e,t){if(null==t)throw Error(a(30));return null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function it(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var ot=null;function at(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var r=0;r<t.length&&!e.isPropagationStopped();r++)y(e,t[r],n[r]);else t&&y(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function st(e){if(null!==e&&(ot=rt(ot,e)),e=ot,ot=null,e){if(it(e,at),ot)throw Error(a(95));if(l)throw e=h,l=!1,h=null,e}}function ut(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function ct(e){if(!k)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"===typeof t[e]),t}var lt=[];function ht(e){e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>lt.length&<.push(e)}function ft(e,t,n,r){if(lt.length){var i=lt.pop();return i.topLevelType=e,i.eventSystemFlags=r,i.nativeEvent=t,i.targetInst=n,i}return{topLevelType:e,eventSystemFlags:r,nativeEvent:t,targetInst:n,ancestors:[]}}function pt(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r=n;if(3===r.tag)r=r.stateNode.containerInfo;else{for(;r.return;)r=r.return;r=3!==r.tag?null:r.stateNode.containerInfo}if(!r)break;5!==(t=n.tag)&&6!==t||e.ancestors.push(n),n=kn(r)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var i=ut(e.nativeEvent);r=e.topLevelType;var o=e.nativeEvent,a=e.eventSystemFlags;0===n&&(a|=64);for(var s=null,u=0;u<E.length;u++){var c=E[u];c&&(c=c.extractEvents(r,t,o,i,a))&&(s=rt(s,c))}st(s)}}function dt(e,t,n){if(!n.has(e)){switch(e){case"scroll":Qt(t,"scroll",!0);break;case"focus":case"blur":Qt(t,"focus",!0),Qt(t,"blur",!0),n.set("blur",null),n.set("focus",null);break;case"cancel":case"close":ct(e)&&Qt(t,e,!0);break;case"invalid":case"submit":case"reset":break;default:-1===Ye.indexOf(e)&&Kt(e,t)}n.set(e,null)}}var vt,gt,yt,mt=!1,bt=[],_t=null,wt=null,Et=null,Tt=new Map,St=new Map,It=[],Ct="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),kt="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function xt(e,t,n,r,i){return{blockedOn:e,topLevelType:t,eventSystemFlags:32|n,nativeEvent:i,container:r}}function Ot(e,t){switch(e){case"focus":case"blur":_t=null;break;case"dragenter":case"dragleave":wt=null;break;case"mouseover":case"mouseout":Et=null;break;case"pointerover":case"pointerout":Tt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":St.delete(t.pointerId)}}function Nt(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e=xt(t,n,r,i,o),null!==t&&(null!==(t=xn(t))&>(t)),e):(e.eventSystemFlags|=r,e)}function At(e){var t=kn(e.target);if(null!==t){var n=Ze(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=et(n)))return e.blockedOn=t,void o.unstable_runWithPriority(e.priority,(function(){yt(n)}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Pt(e){if(null!==e.blockedOn)return!1;var t=Jt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);if(null!==t){var n=xn(t);return null!==n&>(n),e.blockedOn=t,!1}return!0}function Rt(e,t,n){Pt(e)&&n.delete(t)}function Dt(){for(mt=!1;0<bt.length;){var e=bt[0];if(null!==e.blockedOn){null!==(e=xn(e.blockedOn))&&vt(e);break}var t=Jt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);null!==t?e.blockedOn=t:bt.shift()}null!==_t&&Pt(_t)&&(_t=null),null!==wt&&Pt(wt)&&(wt=null),null!==Et&&Pt(Et)&&(Et=null),Tt.forEach(Rt),St.forEach(Rt)}function Lt(e,t){e.blockedOn===t&&(e.blockedOn=null,mt||(mt=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Dt)))}function Mt(e){function t(t){return Lt(t,e)}if(0<bt.length){Lt(bt[0],e);for(var n=1;n<bt.length;n++){var r=bt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==_t&&Lt(_t,e),null!==wt&&Lt(wt,e),null!==Et&&Lt(Et,e),Tt.forEach(t),St.forEach(t),n=0;n<It.length;n++)(r=It[n]).blockedOn===e&&(r.blockedOn=null);for(;0<It.length&&null===(n=It[0]).blockedOn;)At(n),null===n.blockedOn&&It.shift()}var jt={},Ft=new Map,Ut=new Map,Vt=["abort","abort",Ge,"animationEnd",Ke,"animationIteration",Qe,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",$e,"transitionEnd","waiting","waiting"];function qt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],i=e[n+1],o="on"+(i[0].toUpperCase()+i.slice(1));o={phasedRegistrationNames:{bubbled:o,captured:o+"Capture"},dependencies:[r],eventPriority:t},Ut.set(r,t),Ft.set(r,o),jt[i]=o}}qt("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),qt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),qt(Vt,2);for(var Bt="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),zt=0;zt<Bt.length;zt++)Ut.set(Bt[zt],0);var Wt=o.unstable_UserBlockingPriority,Ht=o.unstable_runWithPriority,Gt=!0;function Kt(e,t){Qt(t,e,!1)}function Qt(e,t,n){var r=Ut.get(t);switch(void 0===r?2:r){case 0:r=$t.bind(null,t,1,e);break;case 1:r=Yt.bind(null,t,1,e);break;default:r=Xt.bind(null,t,1,e)}n?e.addEventListener(t,r,!0):e.addEventListener(t,r,!1)}function $t(e,t,n,r){F||M();var i=Xt,o=F;F=!0;try{L(i,e,t,n,r)}finally{(F=o)||V()}}function Yt(e,t,n,r){Ht(Wt,Xt.bind(null,e,t,n,r))}function Xt(e,t,n,r){if(Gt)if(0<bt.length&&-1<Ct.indexOf(e))e=xt(null,e,t,n,r),bt.push(e);else{var i=Jt(e,t,n,r);if(null===i)Ot(e,r);else if(-1<Ct.indexOf(e))e=xt(i,e,t,n,r),bt.push(e);else if(!function(e,t,n,r,i){switch(t){case"focus":return _t=Nt(_t,e,t,n,r,i),!0;case"dragenter":return wt=Nt(wt,e,t,n,r,i),!0;case"mouseover":return Et=Nt(Et,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Tt.set(o,Nt(Tt.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,St.set(o,Nt(St.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r)){Ot(e,r),e=ft(e,r,null,t);try{q(pt,e)}finally{ht(e)}}}}function Jt(e,t,n,r){if(null!==(n=kn(n=ut(r)))){var i=Ze(n);if(null===i)n=null;else{var o=i.tag;if(13===o){if(null!==(n=et(i)))return n;n=null}else if(3===o){if(i.stateNode.hydrate)return 3===i.tag?i.stateNode.containerInfo:null;n=null}else i!==n&&(n=null)}}e=ft(e,r,n,t);try{q(pt,e)}finally{ht(e)}return null}var Zt={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},en=["Webkit","ms","Moz","O"];function tn(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||Zt.hasOwnProperty(e)&&Zt[e]?(""+t).trim():t+"px"}function nn(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=tn(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}
2Object.keys(Zt).forEach((function(e){en.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Zt[t]=Zt[e]}))}));var rn=i({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function on(e,t){if(t){if(rn[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e,""));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(a(62,""))}}function an(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var sn=De;function un(e,t){var n=Je(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=I[t];for(var r=0;r<t.length;r++)dt(t[r],e,n)}function cn(){}function ln(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function hn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fn(e,t){var n,r=hn(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=hn(r)}}function pn(){for(var e=window,t=ln();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=ln((e=t.contentWindow).document)}return t}function dn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var vn=null,gn=null;function yn(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function mn(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var bn="function"===typeof setTimeout?setTimeout:void 0,_n="function"===typeof clearTimeout?clearTimeout:void 0;function wn(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function En(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Tn=Math.random().toString(36).slice(2),Sn="__reactInternalInstance$"+Tn,In="__reactEventHandlers$"+Tn,Cn="__reactContainere$"+Tn;function kn(e){var t=e[Sn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Cn]||n[Sn]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=En(e);null!==e;){if(n=e[Sn])return n;e=En(e)}return t}n=(e=n).parentNode}return null}function xn(e){return!(e=e[Sn]||e[Cn])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function On(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function Nn(e){return e[In]||null}function An(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function Pn(e,t){var n=e.stateNode;if(!n)return null;var r=d(n);if(!r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(a(231,t,typeof n));return n}
vendor: 3,018 bytes, line 2
2function Rn(e,t,n){(t=Pn(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=rt(n._dispatchListeners,t),n._dispatchInstances=rt(n._dispatchInstances,e))}function Dn(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=An(t);for(t=n.length;0<t--;)Rn(n[t],"captured",e);for(t=0;t<n.length;t++)Rn(n[t],"bubbled",e)}}function Ln(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=Pn(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=rt(n._dispatchListeners,t),n._dispatchInstances=rt(n._dispatchInstances,e))}function Mn(e){e&&e.dispatchConfig.registrationName&&Ln(e._targetInst,null,e)}function jn(e){it(e,Dn)}var Fn=null,Un=null,Vn=null;function qn(){if(Vn)return Vn;var e,t,n=Un,r=n.length,i="value"in Fn?Fn.value:Fn.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return Vn=i.slice(e,1<t?1-t:void 0)}function Bn(){return!0}function zn(){return!1}function Wn(e,t,n,r){for(var i in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(i)&&((t=e[i])?this[i]=t(n):"target"===i?this.target=r:this[i]=n[i]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Bn:zn,this.isPropagationStopped=zn,this}function Hn(e,t,n,r){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,e,t,n,r),i}return new this(e,t,n,r)}function Gn(e){if(!(e instanceof this))throw Error(a(279));e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function Kn(e){e.eventPool=[],e.getPooled=Hn,e.release=Gn}i(Wn.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Bn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Bn)},persist:function(){this.isPersistent=Bn},isPersistent:zn,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=zn,this._dispatchInstances=this._dispatchListeners=null}}),Wn.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},Wn.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var o=new t;return i(o,n.prototype),n.prototype=o,n.prototype.constructor=n,n.Interface=i({},r.Interface,e),n.extend=r.extend,Kn(n),n},Kn(Wn);var Qn=Wn.extend({data:null}),$n=Wn.extend({data:null}),Yn=[9,13,27,32],Xn=k&&"CompositionEvent"in window,Jn=null;k&&"documentMode"in document&&(Jn=document.documentMode);var Zn=k&&"TextEvent"in window&&!Jn,er=k&&(!Xn||Jn&&8<Jn&&11>
vendor: 9,393 bytes, line 2
2=Jn),tr=String.fromCharCode(32),nr={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},rr=!1;function ir(e,t){switch(e){case"keyup":return-1!==Yn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function or(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var ar=!1;var sr={eventTypes:nr,extractEvents:function(e,t,n,r){var i;if(Xn)e:{switch(e){case"compositionstart":var o=nr.compositionStart;break e;case"compositionend":o=nr.compositionEnd;break e;case"compositionupdate":o=nr.compositionUpdate;break e}o=void 0}else ar?ir(e,n)&&(o=nr.compositionEnd):"keydown"===e&&229===n.keyCode&&(o=nr.compositionStart);return o?(er&&"ko"!==n.locale&&(ar||o!==nr.compositionStart?o===nr.compositionEnd&&ar&&(i=qn()):(Un="value"in(Fn=r)?Fn.value:Fn.textContent,ar=!0)),o=Qn.getPooled(o,t,n,r),i?o.data=i:null!==(i=or(n))&&(o.data=i),jn(o),i=o):i=null,(e=Zn?function(e,t){switch(e){case"compositionend":return or(t);case"keypress":return 32!==t.which?null:(rr=!0,tr);case"textInput":return(e=t.data)===tr&&rr?null:e;default:return null}}(e,n):function(e,t){if(ar)return"compositionend"===e||!Xn&&ir(e,t)?(e=qn(),Vn=Un=Fn=null,ar=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return er&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))?((t=$n.getPooled(nr.beforeInput,t,n,r)).data=e,jn(t)):t=null,null===i?t:null===t?i:[i,t]}},ur={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function cr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!ur[e.type]:"textarea"===t}var lr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function hr(e,t,n){return(e=Wn.getPooled(lr.change,e,t,n)).type="change",P(n),jn(e),e}var fr=null,pr=null;function dr(e){st(e)}function vr(e){if(we(On(e)))return e}function gr(e,t){if("change"===e)return t}var yr=!1;function mr(){fr&&(fr.detachEvent("onpropertychange",br),pr=fr=null)}function br(e){if("value"===e.propertyName&&vr(pr))if(e=hr(pr,e,ut(e)),F)st(e);else{F=!0;try{D(dr,e)}finally{F=!1,V()}}}function _r(e,t,n){"focus"===e?(mr(),pr=n,(fr=t).attachEvent("onpropertychange",br)):"blur"===e&&mr()}function wr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return vr(pr)}function Er(e,t){if("click"===e)return vr(t)}function Tr(e,t){if("input"===e||"change"===e)return vr(t)}k&&(yr=ct("input")&&(!document.documentMode||9<document.documentMode));var Sr={eventTypes:lr,_isInputEventSupported:yr,extractEvents:function(e,t,n,r){var i=t?On(t):window,o=i.nodeName&&i.nodeName.toLowerCase();if("select"===o||"input"===o&&"file"===i.type)var a=gr;else if(cr(i))if(yr)a=Tr;else{a=wr;var s=_r}else(o=i.nodeName)&&"input"===o.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(a=Er);if(a&&(a=a(e,t)))return hr(a,n,r);s&&s(e,i,t),"blur"===e&&(e=i._wrapperState)&&e.controlled&&"number"===i.type&&ke(i,"number",i.value)}},Ir=Wn.extend({view:null,detail:null}),Cr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Cr[e])&&!!t[e]}function xr(){return kr}var Or=0,Nr=0,Ar=!1,Pr=!1,Rr=Ir.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:xr,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=Or;return Or=e.screenX,Ar?"mousemove"===e.type?e.screenX-t:0:(Ar=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=Nr;return Nr=e.screenY,Pr?"mousemove"===e.type?e.screenY-t:0:(Pr=!0,0)}}),Dr=Rr.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Lr={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Mr={eventTypes:Lr,extractEvents:function(e,t,n,r,i){var o="mouseover"===e||"pointerover"===e,a="mouseout"===e||"pointerout"===e;if(o&&0===(32&i)&&(n.relatedTarget||n.fromElement)||!a&&!o)return null;(o=r.window===r?r:(o=r.ownerDocument)?o.defaultView||o.parentWindow:window,a)?(a=t,null!==(t=(t=n.relatedTarget||n.toElement)?kn(t):null)&&(t!==Ze(t)||5!==t.tag&&6!==t.tag)&&(t=null)):a=null;if(a===t)return null;if("mouseout"===e||"mouseover"===e)var s=Rr,u=Lr.mouseLeave,c=Lr.mouseEnter,l="mouse";else"pointerout"!==e&&"pointerover"!==e||(s=Dr,u=Lr.pointerLeave,c=Lr.pointerEnter,l="pointer");if(e=null==a?o:On(a),o=null==t?o:On(t),(u=s.getPooled(u,a,n,r)).type=l+"leave",u.target=e,u.relatedTarget=o,(n=s.getPooled(c,t,n,r)).type=l+"enter",n.target=o,n.relatedTarget=e,l=t,(r=a)&&l)e:{for(c=l,a=0,e=s=r;e;e=An(e))a++;for(e=0,t=c;t;t=An(t))e++;for(;0<a-e;)s=An(s),a--;for(;0<e-a;)c=An(c),e--;for(;a--;){if(s===c||s===c.alternate)break e;s=An(s),c=An(c)}s=null}else s=null;for(c=s,s=[];r&&r!==c&&(null===(a=r.alternate)||a!==c);)s.push(r),r=An(r);for(r=[];l&&l!==c&&(null===(a=l.alternate)||a!==c);)r.push(l),l=An(l);for(l=0;l<s.length;l++)Ln(s[l],"bubbled",u);for(l=r.length;0<l--;)Ln(r[l],"captured",n);return 0===(64&i)?[u]:[u,n]}};var jr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},Fr=Object.prototype.hasOwnProperty;function Ur(e,t){if(jr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!Fr.call(t,n[r])||!jr(e[n[r]],t[n[r]]))return!1;return!0}var Vr=k&&"documentMode"in document&&11>=document.documentMode,qr={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Br=null,zr=null,Wr=null,Hr=!1;function Gr(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return Hr||null==Br||Br!==ln(n)?null:("selectionStart"in(n=Br)&&dn(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},Wr&&Ur(Wr,n)?null:(Wr=n,(e=Wn.getPooled(qr.select,zr,e,t)).type="select",e.target=Br,jn(e),e))}var Kr={eventTypes:qr,extractEvents:function(e,t,n,r,i,o){if(!(o=!(i=o||(r.window===r?r.document:9===r.nodeType?r:r.ownerDocument)))){e:{i=Je(i),o=I.onSelect;for(var a=0;a<o.length;a++)if(!i.has(o[a])){i=!1;break e}i=!0}o=!i}if(o)return null;switch(i=t?On(t):window,e){case"focus":(cr(i)||"true"===i.contentEditable)&&(Br=i,zr=t,Wr=null);break;case"blur":Wr=zr=Br=null;break;case"mousedown":Hr=!0;break;case"contextmenu":case"mouseup":case"dragend":return Hr=!1,Gr(n,r);case"selectionchange":if(Vr)break;case"keydown":case"keyup":return Gr(n,r)}return null}},Qr=Wn.extend({animationName:null,elapsedTime:null,pseudoElement:null}),$r=Wn.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Yr=Ir.extend({relatedTarget:null});function Xr(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}var Jr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Zr={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ei=Ir.extend({key:function(e){if(e.key){var t=Jr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Xr(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"ke
2yup"===e.type?Zr[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:xr,charCode:function(e){return"keypress"===e.type?Xr(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Xr(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),ti=Rr.extend({dataTransfer:null}),ni=Ir.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:xr}),ri=Wn.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),ii=Rr.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),oi={eventTypes:jt,extractEvents:function(e,t,n,r){var i=Ft.get(e);if(!i)return null;switch(e){case"keypress":if(0===Xr(n))return null;case"keydown":case"keyup":e=ei;break;case"blur":case"focus":e=Yr;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=Rr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=ti;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=ni;break;case Ge:case Ke:case Qe:e=Qr;break;case $e:e=ri;break;case"scroll":e=Ir;break;case"wheel":e=ii;break;case"copy":case"cut":case"paste":e=$r;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=Dr;break;default:e=Wn}return jn(t=e.getPooled(i,t,n,r)),t}};if(m)throw Error(a(101));m=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),_(),d=Nn,v=xn,g=On,C({SimpleEventPlugin:oi,EnterLeaveEventPlugin:Mr,ChangeEventPlugin:Sr,SelectEventPlugin:Kr,BeforeInputEventPlugin:sr});var ai=[],si=-1;function ui(e){0>si||(e.current=ai[si],ai[si]=null,si--)}function ci(e,t){si++,ai[si]=e.current,e.current=t}var li={},hi={current:li},fi={current:!1},pi=li;function di(e,t){var n=e.type.contextTypes;if(!n)return li;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function vi(e){return null!==(e=e.childContextTypes)&&void 0!==e}function gi(){ui(fi),ui(hi)}function yi(e,t,n){if(hi.current!==li)throw Error(a(168));ci(hi,t),ci(fi,n)}function mi(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in e))throw Error(a(108,ge(t)||"Unknown",o));return i({},n,{},r)}function bi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||li,pi=hi.current,ci(hi,e),ci(fi,fi.current),!0}function _i(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=mi(e,t,pi),r.__reactInternalMemoizedMergedChildContext=e,ui(fi),ui(hi),ci(hi,e)):ui(fi),ci(fi,n)}var wi=o.unstable_runWithPriority,Ei=o.unstable_scheduleCallback,Ti=o.unstable_cancelCallback,Si=o.unstable_requestPaint,Ii=o.unstable_now,Ci=o.unstable_getCurrentPriorityLevel,ki=o.unstable_ImmediatePriority,xi=o.unstable_UserBlockingPriority,Oi=o.unstable_NormalPriority,Ni=o.unstable_LowPriority,Ai=o.unstable_IdlePriority,Pi={},Ri=o.unstable_shouldYield,Di=void 0!==Si?Si:function(){},Li=null,Mi=null,ji=!1,Fi=Ii(),Ui=1e4>Fi?Ii:function(){return Ii()-Fi};function Vi(){switch(Ci()){case ki:return 99;case xi:return 98;case Oi:return 97;case Ni:return 96;case Ai:return 95;default:throw Error(a(332))}}function qi(e){switch(e){case 99:return ki;case 98:return xi;case 97:return Oi;case 96:return Ni;case 95:return Ai;default:throw Error(a(332))}}function Bi(e,t){return e=qi(e),wi(e,t)}function zi(e,t,n){return e=qi(e),Ei(e,t,n)}function Wi(e){return null===Li?(Li=[e],Mi=Ei(ki,Gi)):Li.push(e),Pi}function Hi(){if(null!==Mi){var e=Mi;Mi=null,Ti(e)}Gi()}
2function Gi(){if(!ji&&null!==Li){ji=!0;var e=0;try{var t=Li;Bi(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Li=null}catch(n){throw null!==Li&&(Li=Li.slice(e+1)),Ei(ki,Hi),n}finally{ji=!1}}}function Ki(e,t,n){return 1073741821-(1+((1073741821-e+t/10)/(n/=10)|0))*n}function Qi(e,t){if(e&&e.defaultProps)for(var n in t=i({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}var $i={current:null},Yi=null,Xi=null,Ji=null;function Zi(){Ji=Xi=Yi=null}function eo(e){var t=$i.current;ui($i),e.type._context._currentValue=t}function to(e,t){for(;null!==e;){var n=e.alternate;if(e.childExpirationTime<t)e.childExpirationTime=t,null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t);else{if(!(null!==n&&n.childExpirationTime<t))break;n.childExpirationTime=t}e=e.return}}function no(e,t){Yi=e,Ji=Xi=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(e.expirationTime>=t&&(Na=!0),e.firstContext=null)}function ro(e,t){if(Ji!==e&&!1!==t&&0!==t)if("number"===typeof t&&1073741823!==t||(Ji=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Xi){if(null===Yi)throw Error(a(308));Xi=t,Yi.dependencies={expirationTime:0,firstContext:t,responders:null}}else Xi=Xi.next=t;return e._currentValue}var io=!1;function oo(e){e.updateQueue={baseState:e.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function ao(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,baseQueue:e.baseQueue,shared:e.shared,effects:e.effects})}function so(e,t){return(e={expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null}).next=e}function uo(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function co(e,t){var n=e.alternate;null!==n&&ao(n,e),null===(n=(e=e.updateQueue).baseQueue)?(e.baseQueue=t.next=t,t.next=t):(t.next=n.next,n.next=t)}function lo(e,t,n,r){var o=e.updateQueue;io=!1;var a=o.baseQueue,s=o.shared.pending;if(null!==s){if(null!==a){var u=a.next;a.next=s.next,s.next=u}a=s,o.shared.pending=null,null!==(u=e.alternate)&&(null!==(u=u.updateQueue)&&(u.baseQueue=s))}if(null!==a){u=a.next;var c=o.baseState,l=0,h=null,f=null,p=null;if(null!==u)for(var d=u;;){if((s=d.expirationTime)<r){var v={expirationTime:d.expirationTime,suspenseConfig:d.suspenseConfig,tag:d.tag,payload:d.payload,callback:d.callback,next:null};null===p?(f=p=v,h=c):p=p.next=v,s>l&&(l=s)}else{null!==p&&(p=p.next={expirationTime:1073741823,suspenseConfig:d.suspenseConfig,tag:d.tag,payload:d.payload,callback:d.callback,next:null}),ou(s,d.suspenseConfig);e:{var g=e,y=d;switch(s=t,v=n,y.tag){case 1:if("function"===typeof(g=y.payload)){c=g.call(v,c,s);break e}c=g;break e;case 3:g.effectTag=-4097&g.effectTag|64;case 0:if(null===(s="function"===typeof(g=y.payload)?g.call(v,c,s):g)||void 0===s)break e;c=i({},c,s);break e;case 2:io=!0}}null!==d.callback&&(e.effectTag|=32,null===(s=o.effects)?o.effects=[d]:s.push(d))}if(null===(d=d.next)||d===u){if(null===(s=o.shared.pending))break;d=a.next=s.next,s.next=u,o.baseQueue=a=s,o.shared.pending=null}}null===p?h=c:p.next=f,o.baseState=h,o.baseQueue=p,au(l),e.expirationTime=l,e.memoizedState=c}}function ho(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=i,i=n,"function"!==typeof r)throw Error(a(191,r));r.call(i)}}}var fo=Y.ReactCurrentBatchConfig,po=(new r.Component).refs;function vo(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:i({},t,n),e.memoizedState=n,0===e.expirationTime&&(e.updateQueue.baseState=n)}var go={isMounted:function(e){return!!(e=e._reactInternalFiber)&&Ze(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=Gs(),i=fo.suspense;(i=so(r=Ks(r,e,i),i)).payload=t,void 0!==n&&null!==n&&(i.callback=n),uo(e,i),Qs(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=Gs(),i=fo.suspense;(i=so(r=Ks(r,e,i),i)).tag=1,i.payload=t,void 0!==n&&null!==n&&(i.callback=n),uo(e,i),Qs(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=Gs(),r=fo.suspense;(r=so(n=Ks(n,e,r),r)).tag=2,void 0!==t&&null!==t&&(r.callback=t),uo(e,r),Qs(e,n)}};function yo(e,t,n,r,i,o,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!Ur(n,r)||!Ur(i,o))}function mo(e,t,n){var r=!1,i=li,o=t.contextType;return"object"===typeof o&&null!==o?o=ro(o):(i=vi(t)?pi:hi.current,o=(r=null!==(r=t.contextTypes)&&void 0!==r)?di(e,i):li),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=go,e.stateNode=t,t._reactInternalFiber=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function bo(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&go.enqueueReplaceState(t,t.state,null)}function _o(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=po,oo(e);var o=t.contextType;"object"===typeof o&&null!==o?i.context=ro(o):(o=vi(t)?pi:hi.current,i.context=di(e,o)),lo(e,n,i,r),i.state=e.memoizedState,"function"===typeof(o=t.getDerivedStateFromProps)&&(vo(e,t,o,n),i.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(t=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&go.enqueueReplaceState(i,i.state,null),lo(e,n,i,r),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.effectTag|=4)}var wo=Array.isArray;function Eo(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var i=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=r.refs;
vendor: 38,035 bytes, line 2
2t===po&&(t=r.refs={}),null===e?delete t[i]:t[i]=e})._stringRef=i,t)}if("string"!==typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function To(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,""))}function So(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Cu(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function s(t){return e&&null===t.alternate&&(t.effectTag=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Ou(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){return null!==t&&t.elementType===n.type?((r=i(t,n.props)).ref=Eo(e,t,n),r.return=e,r):((r=ku(n.type,n.key,n.props,null,e.mode,r)).ref=Eo(e,t,n),r.return=e,r)}function l(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Nu(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function h(e,t,n,r,o){return null===t||7!==t.tag?((t=xu(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function f(e,t,n){if("string"===typeof t||"number"===typeof t)return(t=Ou(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case ee:return(n=ku(t.type,t.key,t.props,null,e.mode,n)).ref=Eo(e,null,t),n.return=e,n;case te:return(t=Nu(t,e.mode,n)).return=e,t}if(wo(t)||ve(t))return(t=xu(t,e.mode,n,null)).return=e,t;To(e,t)}return null}function p(e,t,n,r){var i=null!==t?t.key:null;if("string"===typeof n||"number"===typeof n)return null!==i?null:u(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case ee:return n.key===i?n.type===ne?h(e,t,n.props.children,r,i):c(e,t,n,r):null;case te:return n.key===i?l(e,t,n,r):null}if(wo(n)||ve(n))return null!==i?null:h(e,t,n,r,null);To(e,n)}return null}function d(e,t,n,r,i){if("string"===typeof r||"number"===typeof r)return u(t,e=e.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case ee:return e=e.get(null===r.key?n:r.key)||null,r.type===ne?h(t,e,r.props.children,i,r.key):c(t,e,r,i);case te:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(wo(r)||ve(r))return h(t,e=e.get(n)||null,r,i,null);To(t,r)}return null}function v(i,a,s,u){for(var c=null,l=null,h=a,v=a=0,g=null;null!==h&&v<s.length;v++){h.index>v?(g=h,h=null):g=h.sibling;var y=p(i,h,s[v],u);if(null===y){null===h&&(h=g);break}e&&h&&null===y.alternate&&t(i,h),a=o(y,a,v),null===l?c=y:l.sibling=y,l=y,h=g}if(v===s.length)return n(i,h),c;if(null===h){for(;v<s.length;v++)null!==(h=f(i,s[v],u))&&(a=o(h,a,v),null===l?c=h:l.sibling=h,l=h);return c}for(h=r(i,h);v<s.length;v++)null!==(g=d(h,i,v,s[v],u))&&(e&&null!==g.alternate&&h.delete(null===g.key?v:g.key),a=o(g,a,v),null===l?c=g:l.sibling=g,l=g);return e&&h.forEach((function(e){return t(i,e)})),c}function g(i,s,u,c){var l=ve(u);if("function"!==typeof l)throw Error(a(150));if(null==(u=l.call(u)))throw Error(a(151));for(var h=l=null,v=s,g=s=0,y=null,m=u.next();null!==v&&!m.done;g++,m=u.next()){v.index>g?(y=v,v=null):y=v.sibling;var b=p(i,v,m.value,c);if(null===b){null===v&&(v=y);break}e&&v&&null===b.alternate&&t(i,v),s=o(b,s,g),null===h?l=b:h.sibling=b,h=b,v=y}if(m.done)return n(i,v),l;if(null===v){for(;!m.done;g++,m=u.next())null!==(m=f(i,m.value,c))&&(s=o(m,s,g),null===h?l=m:h.sibling=m,h=m);return l}for(v=r(i,v);!m.done;g++,m=u.next())null!==(m=d(v,i,g,m.value,c))&&(e&&null!==m.alternate&&v.delete(null===m.key?g:m.key),s=o(m,s,g),null===h?l=m:h.sibling=m,h=m);return e&&v.forEach((function(e){return t(i,e)})),l}return function(e,r,o,u){var c="object"===typeof o&&null!==o&&o.type===ne&&null===o.key;c&&(o=o.props.children);var l="object"===typeof o&&null!==o;if(l)switch(o.$$typeof){case ee:e:{for(l=o.key,c=r;null!==c;){if(c.key===l){switch(c.tag){case 7:if(o.type===ne){n(e,c.sibling),(r=i(c,o.props.children)).return=e,e=r;break e}break;default:if(c.elementType===o.type){n(e,c.sibling),(r=i(c,o.props)).ref=Eo(e,c,o),r.return=e,e=r;break e}}n(e,c);break}t(e,c),c=c.sibling}o.type===ne?((r=xu(o.props.children,e.mode,u,o.key)).return=e,e=r):((u=ku(o.type,o.key,o.props,null,e.mode,u)).ref=Eo(e,r,o),u.return=e,e=u)}return s(e);case te:e:{for(c=o.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),(r=i(r,o.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Nu(o,e.mode,u)).return=e,e=r}return s(e)}if("string"===typeof o||"number"===typeof o)return o=""+o,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,o)).return=e,e=r):(n(e,r),(r=Ou(o,e.mode,u)).return=e,e=r),s(e);if(wo(o))return v(e,r,o,u);if(ve(o))return g(e,r,o,u);if(l&&To(e,o),"undefined"===typeof o&&!c)switch(e.tag){case 1:case 0:throw e=e.type,Error(a(152,e.displayName||e.name||"Component"))}return n(e,r)}}var Io=So(!0),Co=So(!1),ko={},xo={current:ko},Oo={current:ko},No={current:ko};function Ao(e){if(e===ko)throw Error(a(174));return e}function Po(e,t){switch(ci(No,t),ci(Oo,e),ci(xo,ko),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:je(null,"");break;default:t=je(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ui(xo),ci(xo,t)}function Ro(){ui(xo),ui(Oo),ui(No)}function Do(e){Ao(No.current);var t=Ao(xo.current),n=je(t,e.type);t!==n&&(ci(Oo,e),ci(xo,n))}function Lo(e){Oo.current===e&&(ui(xo),ui(Oo))}var Mo={current:0};function jo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function Fo(e,t){return{responder:e,props:t}}var Uo=Y.ReactCurrentDispatcher,Vo=Y.ReactCurrentBatchConfig,qo=0,Bo=null,zo=null,Wo=null,Ho=!1;function Go(){throw Error(a(321))}function Ko(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!jr(e[n],t[n]))return!1;return!0}function Qo(e,t,n,r,i,o){if(qo=o,Bo=t,t.memoizedState=null,t.updateQueue=null,t.expirationTime=0,Uo.current=null===e||null===e.memoizedState?ya:ma,e=n(r,i),t.expirationTime===qo){o=0;do{if(t.expirationTime=0,!(25>o))throw Error(a(301));o+=1,Wo=zo=null,t.updateQueue=null,Uo.current=ba,e=n(r,i)}while(t.expirationTime===qo)}if(Uo.current=ga,t=null!==zo&&null!==zo.next,qo=0,Wo=zo=Bo=null,Ho=!1,t)throw Error(a(300));return e}function $o(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Wo?Bo.memoizedState=Wo=e:Wo=Wo.next=e,Wo}function Yo(){if(null===zo){var e=Bo.alternate;e=null!==e?e.memoizedState:null}else e=zo.next;var t=null===Wo?Bo.memoizedState:Wo.next;if(null!==t)Wo=t,zo=e;else{if(null===e)throw Error(a(310));e={memoizedState:(zo=e).memoizedState,baseState:zo.baseState,baseQueue:zo.baseQueue,queue:zo.queue,next:null},null===Wo?Bo.memoizedState=Wo=e:Wo=Wo.next=e}return Wo}function Xo(e,t){return"function"===typeof t?t(e):t}function Jo(e){var t=Yo(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=zo,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var u=s=o=null,c=i;do{var l=c.expirationTime;if(l<qo){var h={expirationTime:c.expirationTime,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===u?(s=u=h,o=r):u=u.next=h,l>Bo.expirationTime&&(Bo.expirationTime=l,au(l))}else null!==u&&(u=u.next={expirationTime:1073741823,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),ou(l,c.suspenseConfig),r=c.eagerReducer===e?c.eagerState:e(r,c.action);c=c.next}while(null!==c&&c!==i);null===u?o=r:u.next=s,jr(r,t.memoizedState)||(Na=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=u,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function Zo(e){var t=Yo(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=e(o,s.action),s=s.next}while(s!==i);jr(o,t.memoizedState)||(Na=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ea(e){var t=$o();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Xo,lastRenderedState:e}).dispatch=va.bind(null,Bo,e),[t.memoizedState,e]}function ta(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Bo.updateQueue)?(t={lastEffect:null},Bo.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function na(){return Yo().memoizedState}function ra(e,t,n,r){var i=$o();Bo.effectTag|=e,i.memoizedState=ta(1|t,n,void 0,void 0===r?null:r)}function ia(e,t,n,r){var i=Yo();r=void 0===r?null:r;var o=void 0;if(null!==zo){var a=zo.memoizedState;if(o=a.destroy,null!==r&&Ko(r,a.deps))return void ta(t,n,o,r)}Bo.effectTag|=e,i.memoizedState=ta(1|t,n,o,r)}function oa(e,t){return ra(516,4,e,t)}function aa(e,t){return ia(516,4,e,t)}function sa(e,t){return ia(4,2,e,t)}function ua(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function ca(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,ia(4,2,ua.bind(null,t,e),n)}function la(){}function ha(e,t){return $o().memoizedState=[e,void 0===t?null:t],e}function fa(e,t){var n=Yo();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Ko(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function pa(e,t){var n=Yo();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Ko(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function da(e,t,n){var r=Vi();Bi(98>r?98:r,(function(){e(!0)})),Bi(97<r?97:r,(function(){var r=Vo.suspense;Vo.suspense=void 0===t?null:t;try{e(!1),n()}finally{Vo.suspense=r}}))}function va(e,t,n){var r=Gs(),i=fo.suspense;i={expirationTime:r=Ks(r,e,i),suspenseConfig:i,action:n,eagerReducer:null,eagerState:null,next:null};var o=t.pending;if(null===o?i.next=i:(i.next=o.next,o.next=i),t.pending=i,o=e.alternate,e===Bo||null!==o&&o===Bo)Ho=!0,i.expirationTime=qo,Bo.expirationTime=qo;else{if(0===e.expirationTime&&(null===o||0===o.expirationTime)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.eagerReducer=o,i.eagerState=s,jr(s,a))return}catch(u){}Qs(e,r)}}var ga={readContext:ro,useCallback:Go,useContext:Go,useEffect:Go,useImperativeHandle:Go,useLayoutEffect:Go,useMemo:Go,useReducer:Go,useRef:Go,useState:Go,useDebugValue:Go,useResponder:Go,useDeferredValue:Go,useTransition:Go},ya={readContext:ro,useCallback:ha,useContext:ro,useEffect:oa,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,ra(4,2,ua.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ra(4,2,e,t)},useMemo:function(e,t){var n=$o();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=$o();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=va.bind(null,Bo,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},$o().memoizedState=e},useState:ea,useDebugValue:la,useResponder:Fo,useDeferredValue:function(e,t){var n=ea(e),r=n[0],i=n[1];return oa((function(){var n=Vo.suspense;Vo.suspense=void 0===t?null:t;try{i(e)}finally{Vo.suspense=n}}),[e,t]),r},useTransition:function(e){var t=ea(!1),n=t[0];return t=t[1],[ha(da.bind(null,t,e),[t,e]),n]}},ma={readContext:ro,useCallback:fa,useContext:ro,useEffect:aa,useImperativeHandle:ca,useLayoutEffect:sa,useMemo:pa,useReducer:Jo,useRef:na,useState:function(){return Jo(Xo)},useDebugValue:la,useResponder:Fo,useDeferredValue:function(e,t){var n=Jo(Xo),r=n[0],i=n[1];return aa((function(){var n=Vo.suspense;Vo.suspense=void 0===t?null:t;try{i(e)}finally{Vo.suspense=n}}),[e,t]),r},useTransition:function(e){var t=Jo(Xo),n=t[0];return t=t[1],[fa(da.bind(null,t,e),[t,e]),n]}},ba={readContext:ro,useCallback:fa,useContext:ro,useEffect:aa,useImperativeHandle:ca,useLayoutEffect:sa,useMemo:pa,useReducer:Zo,useRef:na,useState:function(){return Zo(Xo)},useDebugValue:la,useResponder:Fo,useDeferredValue:function(e,t){var n=Zo(Xo),r=n[0],i=n[1];return aa((function(){var n=Vo.suspense;Vo.suspense=void 0===t?null:t;try{i(e)}finally{Vo.suspense=n}}),[e,t]),r},useTransition:function(e){var t=Zo(Xo),n=t[0];return t=t[1],[fa(da.bind(null,t,e),[t,e]),n]}},_a=null,wa=null,Ea=!1;function Ta(e,t){var n=Su(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Sa(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function Ia(e){if(Ea){var t=wa;if(t){var n=t;if(!Sa(e,t)){if(!(t=wn(n.nextSibling))||!Sa(e,t))return e.effectTag=-1025&e.effectTag|2,Ea=!1,void(_a=e);Ta(_a,n)}_a=e,wa=wn(t.firstChild)}else e.effectTag=-1025&e.effectTag|2,Ea=!1,_a=e}}function Ca(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;_a=e}function ka(e){if(e!==_a)return!1;if(!Ea)return Ca(e),Ea=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!mn(t,e.memoizedProps))for(t=wa;t;)Ta(e,t),t=wn(t.nextSibling);if(Ca(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){wa=wn(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}wa=null}}else wa=_a?wn(e.stateNode.nextSibling):null;return!0}function xa(){wa=_a=null,Ea=!1}var Oa=Y.ReactCurrentOwner,Na=!1;function Aa(e,t,n,r){t.child=null===e?Co(t,null,n,r):Io(t,e.child,n,r)}function Pa(e,t,n,r,i){n=n.render;var o=t.ref;return no(t,i),r=Qo(e,t,n,r,o,i),null===e||Na?(t.effectTag|=1,Aa(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),Qa(e,t,i))}function Ra(e,t,n,r,i,o){if(null===e){var a=n.type;return"function"!==typeof a||Iu(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=ku(n.type,null,r,null,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Da(e,t,a,r,i,o))}return a=e.child,i<o&&(i=a.memoizedProps,(n=null!==(n=n.compare)?n:Ur)(i,r)&&e.ref===t.ref)?Qa(e,t,o):(t.effectTag|=1,(e=Cu(a,r)).ref=t.ref,e.return=t,t.child=e)}function Da(e,t,n,r,i,o){return null!==e&&Ur(e.memoizedProps,r)&&e.ref===t.ref&&(Na=!1,i<o)?(t.expirationTime=e.expirationTime,Qa(e,t,o)):Ma(e,t,n,r,o)}function La(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Ma(e,t,n,r,i){var o=vi(n)?pi:hi.current;return o=di(t,o),no(t,i),n=Qo(e,t,n,r,o,i),null===e||Na?(t.effectTag|=1,Aa(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),Qa(e,t,i))}function ja(e,t,n,r,i){if(vi(n)){var o=!0;bi(t)}else o=!1;if(no(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),mo(t,n,r),_o(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var u=a.context,c=n.contextType;"object"===typeof c&&null!==c?c=ro(c):c=di(t,c=vi(n)?pi:hi.current);var l=n.getDerivedStateFromProps,h="function"===typeof l||"function"===typeof a.getSnapshotBeforeUpdate;h||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||u!==c)&&bo(t,a,r,c),io=!1;var f=t.memoizedState;a.state=f,lo(t,r,a,i),u=t.memoizedState,s!==r||f!==u||fi.current||io?("function"===typeof l&&(vo(t,n,l,r),u=t.memoizedState),(s=io||yo(t,n,s,r,f,u,c))?(h||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.effectTag|=4)):("function"===typeof a.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=c,r=s):("function"===typeof a.componentDidMount&&(t.effectTag|=4),r=!1)}else a=t.stateNode,ao(e,t),s=t.memoizedProps,a.props=t.type===t.elementType?s:Qi(t.type,s),u=a.context,"object"===typeof(c=n.contextType)&&null!==c?c=ro(c):c=di(t,c=vi(n)?pi:hi.current),(h="function"===typeof(l=n.getDerivedStateFromProps)||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||u!==c)&&bo(t,a,r,c),io=!1,u=t.memoizedState,a.state=u,lo(t,r,a,i),f=t.memoizedState,s!==r||u!==f||fi.current||io?("function"===typeof l&&(vo(t,n,l,r),f=t.memoizedState),(l=io||yo(t,n,s,r,u,f,c))?(h||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,f,c),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,f,c)),"function"===typeof a.componentDidUpdate&&(t.effectTag|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=f),a.props=r,a.state=f,a.context=c,r=l):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),r=!1);return Fa(e,t,n,r,o,i)}function Fa(e,t,n,r,i,o){La(e,t);var a=0!==(64&t.effectTag);if(!r&&!a)return i&&_i(t,n,!1),Qa(e,t,o);r=t.stateNode,Oa.current=t;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.effectTag|=1,null!==e&&a?(t.child=Io(t,e.child,null,o),t.child=Io(t,null,s,o)):Aa(e,t,s,o),t.memoizedState=r.state,i&&_i(t,n,!0),t.child}function Ua(e){var t=e.stateNode;t.pendingContext?yi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&yi(0,t.context,!1),Po(e,t.containerInfo)}var Va,qa,Ba,za={dehydrated:null,retryTime:0};function Wa(e,t,n){var r,i=t.mode,o=t.pendingProps,a=Mo.current,s=!1;if((r=0!==(64&t.effectTag))||(r=0!==(2&a)&&(null===e||null!==e.memoizedState)),r?(s=!0,t.effectTag&=-65):null!==e&&null===e.memoizedState||void 0===o.fallback||!0===o.unstable_avoidThisFallback||(a|=1),ci(Mo,1&a),null===e){if(void 0!==o.fallback&&Ia(t),s){if(s=o.fallback,(o=xu(null,i,0,null)).return=t,0===(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,o.child=e;null!==e;)e.return=o,e=e.sibling;return(n=xu(s,i,n,null)).return=t,o.sibling=n,t.memoizedState=za,t.child=o,n}return i=o.children,t.memoizedState=null,t.child=Co(t,null,i,n)}if(null!==e.memoizedState){if(i=(e=e.child).sibling,s){if(o=o.fallback,(n=Cu(e,e.pendingProps)).return=t,0===(2&t.mode)&&(s=null!==t.memoizedState?t.child.child:t.child)!==e.child)for(n.child=s;null!==s;)s.return=n,s=s.sibling;return(i=Cu(i,o)).return=t,n.sibling=i,n.childExpirationTime=0,t.memoizedState=za,t.child=n,i}return n=Io(t,e.child,o.children,n),t.memoizedState=null,t.child=n}if(e=e.child,s){if(s=o.fallback,(o=xu(null,i,0,null)).return=t,o.child=e,null!==e&&(e.return=o),0===(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,o.child=e;null!==e;)e.return=o,e=e.sibling;return(n=xu(s,i,n,null)).return=t,o.sibling=n,n.effectTag|=2,o.childExpirationTime=0,t.memoizedState=za,t.child=o,n}return t.memoizedState=null,t.child=Io(t,e,o.children,n)}function Ha(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t),to(e.return,t)}function Ga(e,t,n,r,i,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailExpiration:0,tailMode:i,lastEffect:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailExpiration=0,a.tailMode=i,a.lastEffect=o)}function Ka(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Aa(e,t,r.children,n),0!==(2&(r=Mo.current)))r=1&r|2,t.effectTag|=64;else{if(null!==e&&0!==(64&e.effectTag))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ha(e,n);else if(19===e.tag)Ha(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ci(Mo,r),0===(2&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===jo(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ga(t,!1,i,n,o,t.lastEffect);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===jo(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ga(t,!0,n,null,o,t.lastEffect);break;case"together":Ga(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function Qa(e,t,n){null!==e&&(t.dependencies=e.dependencies);var r=t.expirationTime;if(0!==r&&au(r),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Cu(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Cu(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function $a(e,t){switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ya(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return vi(t.type)&&gi(),null;case 3:return Ro(),ui(fi),ui(hi),(n=t.stateNode).pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||!ka(t)||(t.effectTag|=4),null;case 5:Lo(t),n=Ao(No.current);var o=t.type;if(null!==e&&null!=t.stateNode)qa(e,t,o,r,n),e.ref!==t.ref&&(t.effectTag|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=Ao(xo.current),ka(t)){r=t.stateNode,o=t.type;var s=t.memoizedProps;switch(r[Sn]=t,r[In]=s,o){case"iframe":case"object":case"embed":Kt("load",r);break;case"video":case"audio":for(e=0;e<Ye.length;e++)Kt(Ye[e],r);break;case"source":Kt("error",r);break;case"img":case"image":case"link":Kt("error",r),Kt("load",r);break;case"form":Kt("reset",r),Kt("submit",r);break;case"details":Kt("toggle",r);break;case"input":Te(r,s),Kt("invalid",r),un(n,"onChange");break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Kt("invalid",r),un(n,"onChange");break;case"textarea":Ae(r,s),Kt("invalid",r),un(n,"onChange")}for(var u in on(o,s),e=null,s)if(s.hasOwnProperty(u)){var c=s[u];"children"===u?"string"===typeof c?r.textContent!==c&&(e=["children",c]):"number"===typeof c&&r.textContent!==""+c&&(e=["children",""+c]):S.hasOwnProperty(u)&&null!=c&&un(n,u)}switch(o){case"input":_e(r),Ce(r,s,!0);break;case"textarea":_e(r),Re(r);break;case"select":case"option":break;default:"function"===typeof s.onClick&&(r.onclick=cn)}n=e,t.updateQueue=n,null!==n&&(t.effectTag|=4)}else{switch(u=9===n.nodeType?n:n.ownerDocument,e===sn&&(e=Me(o)),e===sn?"script"===o?((e=u.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=u.createElement(o,{is:r.is}):(e=u.createElement(o),"select"===o&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,o),e[Sn]=t,e[In]=r,Va(e,t),t.stateNode=e,u=an(o,r),o){case"iframe":case"object":case"embed":Kt("load",e),c=r;break;case"video":case"audio":for(c=0;c<Ye.length;c++)Kt(Ye[c],e);c=r;break;case"source":Kt("error",e),c=r;break;case"img":case"image":case"link":Kt("error",e),Kt("load",e),c=r;break;case"form":Kt("reset",e),Kt("submit",e),c=r;break;case"details":Kt("toggle",e),c=r;break;case"input":Te(e,r),c=Ee(e,r),Kt("invalid",e),un(n,"onChange");break;case"option":c=xe(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},c=i({},r,{value:void 0}),Kt("invalid",e),un(n,"onChange");break;case"textarea":Ae(e,r),c=Ne(e,r),Kt("invalid",e),un(n,"onChange");break;default:c=r}on(o,c);var l=c;for(s in l)if(l.hasOwnProperty(s)){var h=l[s];"style"===s?nn(e,h):"dangerouslySetInnerHTML"===s?null!=(h=h?h.__html:void 0)&&Ue(e,h):"children"===s?"string"===typeof h?("textarea"!==o||""!==h)&&Ve(e,h):"number"===typeof h&&Ve(e,""+h):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(S.hasOwnProperty(s)?null!=h&&un(n,s):null!=h&&X(e,s,h,u))}switch(o){case"input":_e(e),Ce(e,r,!1);break;case"textarea":_e(e),Re(e);break;case"option":null!=r.value&&e.setAttribute("value",""+me(r.value));break;case"select":e.multiple=!!r.multiple,null!=(n=r.value)?Oe(e,!!r.multiple,n,!1):null!=r.defaultValue&&Oe(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof c.onClick&&(e.onclick=cn)}yn(o,r)&&(t.effectTag|=4)}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)Ba(0,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(a(166));n=Ao(No.current),Ao(xo.current),ka(t)?(n=t.stateNode,r=t.memoizedProps,n[Sn]=t,n.nodeValue!==r&&(t.effectTag|=4)):((n=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Sn]=t,t.stateNode=n)}return null;case 13:return ui(Mo),r=t.memoizedState,0!==(64&t.effectTag)?(t.expirationTime=n,t):(n=null!==r,r=!1,null===e?void 0!==t.memoizedProps.fallback&&ka(t):(r=null!==(o=e.memoizedState),n||null===o||null!==(o=e.child.sibling)&&(null!==(s=t.firstEffect)?(t.firstEffect=o,o.nextEffect=s):(t.firstEffect=t.lastEffect=o,o.nextEffect=null),o.effectTag=8)),n&&!r&&0!==(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!==(1&Mo.current)?ks===_s&&(ks=ws):(ks!==_s&&ks!==ws||(ks=Es),0!==Ps&&null!==Ss&&(Ru(Ss,Cs),Du(Ss,Ps)))),(n||r)&&(t.effectTag|=4),null);case 4:return Ro(),null;case 10:return eo(t),null;case 17:return vi(t.type)&&gi(),null;case 19:if(ui(Mo),null===(r=t.memoizedState))return null;if(o=0!==(64&t.effectTag),null===(s=r.rendering)){if(o)$a(r,!1);else if(ks!==_s||null!==e&&0!==(64&e.effectTag))for(s=t.child;null!==s;){if(null!==(e=jo(s))){for(t.effectTag|=64,$a(r,!1),null!==(o=e.updateQueue)&&(t.updateQueue=o,t.effectTag|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=t.child;null!==r;)s=n,(o=r).effectTag&=2,o.nextEffect=null,o.firstEffect=null,o.lastEffect=null,null===(e=o.alternate)?(o.childExpirationTime=0,o.expirationTime=s,o.child=null,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null):(o.childExpirationTime=e.childExpirationTime,o.expirationTime=e.expirationTime,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,s=e.dependencies,o.dependencies=null===s?null:{expirationTime:s.expirationTime,firstContext:s.firstContext,responders:s.responders}),r=r.sibling;return ci(Mo,1&Mo.current|2),t.child}s=s.sibling}}else{if(!o)if(null!==(e=jo(s))){if(t.effectTag|=64,o=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.effectTag|=4),$a(r,!0),null===r.tail&&"hidden"===r.tailMode&&!s.alternate)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Ui()-r.renderingStartTime>r.tailExpiration&&1<n&&(t.effectTag|=64,o=!0,$a(r,!1),t.expirationTime=t.childExpirationTime=n-1);r.isBackwards?(s.sibling=t.child,t.child=s):(null!==(n=r.last)?n.sibling=s:t.child=s,r.last=s)}return null!==r.tail?(0===r.tailExpiration&&(r.tailExpiration=Ui()+500),n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Ui(),n.sibling=null,t=Mo.current,ci(Mo,o?1&t|2:1&t),n):null}throw Error(a(156,t.tag))}function Xa(e){switch(e.tag){case 1:vi(e.type)&&gi();var t=e.effectTag;return 4096&t?(e.effectTag=-4097&t|64,e):null;case 3:if(Ro(),ui(fi),ui(hi),0!==(64&(t=e.effectTag)))throw Error(a(285));return e.effectTag=-4097&t|64,e;case 5:return Lo(e),null;case 13:return ui(Mo),4096&(t=e.effectTag)?(e.effectTag=-4097&t|64,e):null;case 19:return ui(Mo),null;case 4:return Ro(),null;case 10:return eo(e),null;default:return null}}function Ja(e,t){return{value:e,source:t,stack:ye(t)}}Va=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},qa=function(e,t,n,r,o){var a=e.memoizedProps;if(a!==r){var s,u,c=t.stateNode;switch(Ao(xo.current),e=null,n){case"input":a=Ee(c,a),r=Ee(c,r),e=[];break;case"option":a=xe(c,a),r=xe(c,r),e=[];break;case"select":a=i({},a,{value:void 0}),r=i({},r,{value:void 0}),e=[];break;case"textarea":a=Ne(c,a),r=Ne(c,r),e=[];break;default:"function"!==typeof a.onClick&&"function"===typeof r.onClick&&(c.onclick=cn)}for(s in on(n,r),n=null,a)if(!r.hasOwnProperty(s)&&a.hasOwnProperty(s)&&null!=a[s])if("style"===s)for(u in c=a[s])c.hasOwnProperty(u)&&(n||(n={}),n[u]="");else"dangerouslySetInnerHTML"!==s&&"children"!==s&&"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(S.hasOwnProperty(s)?e||(e=[]):(e=e||[]).push(s,null));for(s in r){var l=r[s];if(c=null!=a?a[s]:void 0,r.hasOwnProperty(s)&&l!==c&&(null!=l||null!=c))if("style"===s)if(c){for(u in c)!c.hasOwnProperty(u)||l&&l.hasOwnProperty(u)||(n||(n={}),n[u]="");for(u in l)l.hasOwnProperty(u)&&c[u]!==l[u]&&(n||(n={}),n[u]=l[u])}else n||(e||(e=[]),e.push(s,n)),n=l;else"dangerouslySetInnerHTML"===s?(l=l?l.__html:void 0,c=c?c.__html:void 0,null!=l&&c!==l&&(e=e||[]).push(s,l)):"children"===s?c===l||"string"!==typeof l&&"number"!==typeof l||(e=e||[]).push(s,""+l):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&(S.hasOwnProperty(s)?(null!=l&&un(o,s),e||c===l||(e=[])):(e=e||[]).push(s,l))}n&&(e=e||[]).push("style",n),o=e,(t.updateQueue=o)&&(t.effectTag|=4)}},Ba=function(e,t,n,r){n!==r&&(t.effectTag|=4)};var Za="function"===typeof WeakSet?WeakSet:Set;function es(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=ye(n)),null!==n&&ge(n.type),t=t.value,null!==e&&1===e.tag&&ge(e.type);try{console.error(t)}catch(i){setTimeout((function(){throw i}))}}function ts(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(n){mu(e,n)}else t.current=null}function ns(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.effectTag&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Qi(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:case 5:case 6:case 4:case 17:return}throw Error(a(163))}function rs(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}n=n.next}while(n!==t)}}function is(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function os(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:return void is(3,n);case 1:if(e=n.stateNode,4&n.effectTag)if(null===t)e.componentDidMount();else{var r=n.elementType===n.type?t.memoizedProps:Qi(n.type,t.memoizedProps);e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate)}return void(null!==(t=n.updateQueue)&&ho(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}ho(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.effectTag&&yn(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&Mt(n)))));case 19:case 17:case 20:case 21:return}throw Error(a(163))}function as(e,t,n){switch("function"===typeof Eu&&Eu(t),t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e.next;Bi(97<n?97:n,(function(){var e=r;do{var n=e.destroy;if(void 0!==n){var i=t;try{n()}catch(o){mu(i,o)}}e=e.next}while(e!==r)}))}break;case 1:ts(t),"function"===typeof(n=t.stateNode).componentWillUnmount&&function(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(n){mu(e,n)}}(t,n);break;case 5:ts(t);break;case 4:ls(e,t,n)}}function ss(e){var t=e.alternate;e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.alternate=null,e.firstEffect=null,e.lastEffect=null,e.pendingProps=null,e.memoizedProps=null,e.stateNode=null,null!==t&&ss(t)}function us(e){return 5===e.tag||3===e.tag||4===e.tag}function cs(e){e:{for(var t=e.return;null!==t;){if(us(t)){var n=t;break e}t=t.return}throw Error(a(160))}switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.effectTag&&(Ve(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||us(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}r?function e(t,n,r){var i=t.tag,o=5===i||6===i;if(o)t=o?t.stateNode:t.stateNode.instance,n?8===r.nodeType?r.parentNode.insertBefore(t,n):r.insertBefore(t,n):(8===r.nodeType?(n=r.parentNode).insertBefore(t,r):(n=r).appendChild(t),null!==(r=r._reactRootContainer)&&void 0!==r||null!==n.onclick||(n.onclick=cn));else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t):function e(t,n,r){var i=t.tag,o=5===i||6===i;if(o)t=o?t.stateNode:t.stateNode.instance,n?r.insertBefore(t,n):r.appendChild(t);else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t)}function ls(e,t,n){for(var r,i,o=t,s=!1;;){if(!s){s=o.return;e:for(;;){if(null===s)throw Error(a(160));switch(r=s.stateNode,s.tag){case 5:i=!1;break e;case 3:case 4:r=r.containerInfo,i=!0;break e}s=s.return}s=!0}if(5===o.tag||6===o.tag){e:for(var u=e,c=o,l=n,h=c;;)if(as(u,h,l),null!==h.child&&4!==h.tag)h.child.return=h,h=h.child;else{if(h===c)break e;for(;null===h.sibling;){if(null===h.return||h.return===c)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}i?(u=r,c=o.stateNode,8===u.nodeType?u.parentNode.removeChild(c):u.removeChild(c)):r.removeChild(o.stateNode)}else if(4===o.tag){if(null!==o.child){r=o.stateNode.containerInfo,i=!0,o.child.return=o,o=o.child;continue}}else if(as(e,o,n),null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return;4===(o=o.return).tag&&(s=!1)}o.sibling.return=o.return,o=o.sibling}}function hs(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void rs(3,t);case 1:return;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps,i=null!==e?e.memoizedProps:r;e=t.type;var o=t.updateQueue;if(t.updateQueue=null,null!==o){for(n[In]=r,"input"===e&&"radio"===r.type&&null!=r.name&&Se(n,r),an(e,i),t=an(e,r),i=0;i<o.length;i+=2){var s=o[i],u=o[i+1];"style"===s?nn(n,u):"dangerouslySetInnerHTML"===s?Ue(n,u):"children"===s?Ve(n,u):X(n,s,u,t)}switch(e){case"input":Ie(n,r);break;case"textarea":Pe(n,r);break;case"select":t=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(e=r.value)?Oe(n,!!r.multiple,e,!1):t!==!!r.multiple&&(null!=r.defaultValue?Oe(n,!!r.multiple,r.defaultValue,!0):Oe(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((t=t.stateNode).hydrate&&(t.hydrate=!1,Mt(t.containerInfo)));case 12:return;case 13:if(n=t,null===t.memoizedState?r=!1:(r=!0,n=t.child,Ds=Ui()),null!==n)e:for(e=n;;){if(5===e.tag)o=e.stateNode,r?"function"===typeof(o=o.style).setProperty?o.setProperty("display","none","important"):o.display="none":(o=e.stateNode,i=void 0!==(i=e.memoizedProps.style)&&null!==i&&i.hasOwnProperty("display")?i.display:null,o.style.display=tn("display",i));else if(6===e.tag)e.stateNode.nodeValue=r?"":e.memoizedProps;else{if(13===e.tag&&null!==e.memoizedState&&null===e.memoizedState.dehydrated){(o=e.child.sibling).return=e,e=o;continue}if(null!==e.child){e.child.return=e,e=e.child;continue}}if(e===n)break;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}return void fs(t);case 19:return void fs(t);case 17:return}throw Error(a(163))}function fs(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Za),t.forEach((function(t){var r=_u.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}var ps="function"===typeof WeakMap?WeakMap:Map;function ds(e,t,n){(n=so(n,null)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ms||(Ms=!0,js=r),es(e,t)},n}
vendor: 7,594 bytes, line 2
2function vs(e,t,n){(n=so(n,null)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var i=t.value;n.payload=function(){return es(e,t),r(i)}}var o=e.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(n.callback=function(){"function"!==typeof r&&(null===Fs?Fs=new Set([this]):Fs.add(this),es(e,t));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}var gs,ys=Math.ceil,ms=Y.ReactCurrentDispatcher,bs=Y.ReactCurrentOwner,_s=0,ws=3,Es=4,Ts=0,Ss=null,Is=null,Cs=0,ks=_s,xs=null,Os=1073741823,Ns=1073741823,As=null,Ps=0,Rs=!1,Ds=0,Ls=null,Ms=!1,js=null,Fs=null,Us=!1,Vs=null,qs=90,Bs=null,zs=0,Ws=null,Hs=0;function Gs(){return 0!==(48&Ts)?1073741821-(Ui()/10|0):0!==Hs?Hs:Hs=1073741821-(Ui()/10|0)}function Ks(e,t,n){if(0===(2&(t=t.mode)))return 1073741823;var r=Vi();if(0===(4&t))return 99===r?1073741823:1073741822;if(0!==(16&Ts))return Cs;if(null!==n)e=Ki(e,0|n.timeoutMs||5e3,250);else switch(r){case 99:e=1073741823;break;case 98:e=Ki(e,150,100);break;case 97:case 96:e=Ki(e,5e3,250);break;case 95:e=2;break;default:throw Error(a(326))}return null!==Ss&&e===Cs&&--e,e}function Qs(e,t){if(50<zs)throw zs=0,Ws=null,Error(a(185));if(null!==(e=$s(e,t))){var n=Vi();1073741823===t?0!==(8&Ts)&&0===(48&Ts)?Zs(e):(Xs(e),0===Ts&&Hi()):Xs(e),0===(4&Ts)||98!==n&&99!==n||(null===Bs?Bs=new Map([[e,t]]):(void 0===(n=Bs.get(e))||n>t)&&Bs.set(e,t))}}function $s(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var r=e.return,i=null;if(null===r&&3===e.tag)i=e.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<t&&(r.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===r.return&&3===r.tag){i=r.stateNode;break}r=r.return}return null!==i&&(Ss===i&&(au(t),ks===Es&&Ru(i,Cs)),Du(i,t)),i}function Ys(e){var t=e.lastExpiredTime;if(0!==t)return t;if(!Pu(e,t=e.firstPendingTime))return t;var n=e.lastPingedTime;return 2>=(e=n>(e=e.nextKnownPendingLevel)?n:e)&&t!==e?0:e}function Xs(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=Wi(Zs.bind(null,e));else{var t=Ys(e),n=e.callbackNode;if(0===t)null!==n&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var r=Gs();if(1073741823===t?r=99:1===t||2===t?r=95:r=0>=(r=10*(1073741821-t)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==n){var i=e.callbackPriority;if(e.callbackExpirationTime===t&&i>=r)return;n!==Pi&&Ti(n)}e.callbackExpirationTime=t,e.callbackPriority=r,t=1073741823===t?Wi(Zs.bind(null,e)):zi(r,Js.bind(null,e),{timeout:10*(1073741821-t)-Ui()}),e.callbackNode=t}}}function Js(e,t){if(Hs=0,t)return Lu(e,t=Gs()),Xs(e),null;var n=Ys(e);if(0!==n){if(t=e.callbackNode,0!==(48&Ts))throw Error(a(327));if(vu(),e===Ss&&n===Cs||nu(e,n),null!==Is){var r=Ts;Ts|=16;for(var i=iu();;)try{uu();break}catch(u){ru(e,u)}if(Zi(),Ts=r,ms.current=i,1===ks)throw t=xs,nu(e,n),Ru(e,n),Xs(e),t;if(null===Is)switch(i=e.finishedWork=e.current.alternate,e.finishedExpirationTime=n,r=ks,Ss=null,r){case _s:case 1:throw Error(a(345));case 2:Lu(e,2<n?2:n);break;case ws:if(Ru(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=hu(i)),1073741823===Os&&10<(i=Ds+500-Ui())){if(Rs){var o=e.lastPingedTime;if(0===o||o>=n){e.lastPingedTime=n,nu(e,n);break}}if(0!==(o=Ys(e))&&o!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}e.timeoutHandle=bn(fu.bind(null,e),i);break}fu(e);break;case Es:if(Ru(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=hu(i)),Rs&&(0===(i=e.lastPingedTime)||i>=n)){e.lastPingedTime=n,nu(e,n);break}if(0!==(i=Ys(e))&&i!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}if(1073741823!==Ns?r=10*(1073741821-Ns)-Ui():1073741823===Os?r=0:(r=10*(1073741821-Os)-5e3,0>(r=(i=Ui())-r)&&(r=0),(n=10*(1073741821-n)-i)<(r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ys(r/1960))-r)&&(r=n)),10<r){e.timeoutHandle=bn(fu.bind(null,e),r);break}fu(e);break;case 5:if(1073741823!==Os&&null!==As){o=Os;var s=As;if(0>=(r=0|s.busyMinDurationMs)?r=0:(i=0|s.busyDelayMs,r=(o=Ui()-(10*(1073741821-o)-(0|s.timeoutMs||5e3)))<=i?0:i+r-o),10<r){Ru(e,n),e.timeoutHandle=bn(fu.bind(null,e),r);break}}fu(e);break;default:throw Error(a(329))}if(Xs(e),e.callbackNode===t)return Js.bind(null,e)}}return null}function Zs(e){var t=e.lastExpiredTime;if(t=0!==t?t:1073741823,0!==(48&Ts))throw Error(a(327));if(vu(),e===Ss&&t===Cs||nu(e,t),null!==Is){var n=Ts;Ts|=16;for(var r=iu();;)try{su();break}catch(i){ru(e,i)}if(Zi(),Ts=n,ms.current=r,1===ks)throw n=xs,nu(e,t),Ru(e,t),Xs(e),n;if(null!==Is)throw Error(a(261));e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,Ss=null,fu(e),Xs(e)}return null}function eu(e,t){var n=Ts;Ts|=1;try{return e(t)}finally{0===(Ts=n)&&Hi()}}function tu(e,t){var n=Ts;Ts&=-2,Ts|=8;try{return e(t)}finally{0===(Ts=n)&&Hi()}}function nu(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,_n(n)),null!==Is)for(n=Is.return;null!==n;){var r=n;switch(r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&gi();break;case 3:Ro(),ui(fi),ui(hi);break;case 5:Lo(r);break;case 4:Ro();break;case 13:case 19:ui(Mo);break;case 10:eo(r)}n=n.return}Ss=e,Is=Cu(e.current,null),Cs=t,ks=_s,xs=null,Ns=Os=1073741823,As=null,Ps=0,Rs=!1}function ru(e,t){for(;;){try{if(Zi(),Uo.current=ga,Ho)for(var n=Bo.memoizedState;null!==n;){var r=n.queue;null!==r&&(r.pending=null),n=n.next}if(qo=0,Wo=zo=Bo=null,Ho=!1,null===Is||null===Is.return)return ks=1,xs=t,Is=null;e:{var i=e,o=Is.return,a=Is,s=t;if(t=Cs,a.effectTag|=2048,a.firstEffect=a.lastEffect=null,null!==s&&"object"===typeof s&&"function"===typeof s.then){var u=s;if(0===(2&a.mode)){var c=a.alternate;c?(a.updateQueue=c.updateQueue,a.memoizedState=c.memoizedState,a.expirationTime=c.expirationTime):(a.updateQueue=null,a.memoizedState=null)}var l=0!==(1&Mo.current),h=o;do{var f;if(f=13===h.tag){var p=h.memoizedState;if(null!==p)f=null!==p.dehydrated;else{var d=h.memoizedProps;f=void 0!==d.fallback&&(!0!==d.unstable_avoidThisFallback||!l)}}if(f){var v=h.updateQueue;if(null===v){var g=new Set;g.add(u),h.updateQueue=g}else v.add(u);if(0===(2&h.mode)){if(h.effectTag|=64,a.effectTag&=-2981,1===a.tag)if(null===a.alternate)a.tag=17;else{var y=so(1073741823,null);y.tag=2,uo(a,y)}a.expirationTime=1073741823;break e}s=void 0,a=t;var m=i.pingCache;if(null===m?(m=i.pingCache=new ps,s=new Set,m.set(u,s)):void 0===(s=m.get(u))&&(s=new Set,m.set(u,s)),!s.has(a)){s.add(a);var b=bu.bind(null,i,u,a);u.then(b,b)}h.effectTag|=4096,h.expirationTime=t;break e}h=h.return}while(null!==h);s=Error((ge(a.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+ye(a))}5!==ks&&(ks=2),s=Ja(s,a),h=o;do{switch(h.tag){case 3:u=s,h.effectTag|=4096,h.expirationTime=t,co(h,ds(h,u,t));break e;case 1:u=s;var _=h.type,w=h.stateNode;if(0===(64&h.effectTag)&&("function"===typeof _.getDerivedStateFromError||null!==w&&"function"===typeof w.componentDidCatch&&(null===Fs||!Fs.has(w)))){h.effectTag|=4096,h.expirationTime=t,co(h,vs(h,u,t));break e}}h=h.return}while(null!==h)}Is=lu(Is)}catch(E){t=E;continue}break}}function iu(){var e=ms.current;return ms.current=ga,null===e?ga:e}function ou(e,t){e<Os&&2<e&&(Os=e),null!==t&&e<Ns&&2<e&&(Ns=e,As=t)}function au(e){e>Ps&&(Ps=e)}function su(){for(;null!==Is;)Is=cu(Is)}function uu(){for(;null!==Is&&!Ri();)Is=cu(Is)}function cu(e){var t=gs(e.alternate,e,Cs);
vendor: 17,585 bytes, line 2
2return e.memoizedProps=e.pendingProps,null===t&&(t=lu(e)),bs.current=null,t}function lu(e){Is=e;do{var t=Is.alternate;if(e=Is.return,0===(2048&Is.effectTag)){if(t=Ya(t,Is,Cs),1===Cs||1!==Is.childExpirationTime){for(var n=0,r=Is.child;null!==r;){var i=r.expirationTime,o=r.childExpirationTime;i>n&&(n=i),o>n&&(n=o),r=r.sibling}Is.childExpirationTime=n}if(null!==t)return t;null!==e&&0===(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=Is.firstEffect),null!==Is.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=Is.firstEffect),e.lastEffect=Is.lastEffect),1<Is.effectTag&&(null!==e.lastEffect?e.lastEffect.nextEffect=Is:e.firstEffect=Is,e.lastEffect=Is))}else{if(null!==(t=Xa(Is)))return t.effectTag&=2047,t;null!==e&&(e.firstEffect=e.lastEffect=null,e.effectTag|=2048)}if(null!==(t=Is.sibling))return t;Is=e}while(null!==Is);return ks===_s&&(ks=5),null}function hu(e){var t=e.expirationTime;return t>(e=e.childExpirationTime)?t:e}function fu(e){var t=Vi();return Bi(99,pu.bind(null,e,t)),null}function pu(e,t){do{vu()}while(null!==Vs);if(0!==(48&Ts))throw Error(a(327));var n=e.finishedWork,r=e.finishedExpirationTime;if(null===n)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var i=hu(n);if(e.firstPendingTime=i,r<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:r<=e.firstSuspendedTime&&(e.firstSuspendedTime=r-1),r<=e.lastPingedTime&&(e.lastPingedTime=0),r<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===Ss&&(Is=Ss=null,Cs=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,i=n.firstEffect):i=n:i=n.firstEffect,null!==i){var o=Ts;Ts|=32,bs.current=null,vn=Gt;var s=pn();if(dn(s)){if("selectionStart"in s)var u={start:s.selectionStart,end:s.selectionEnd};else e:{var c=(u=(u=s.ownerDocument)&&u.defaultView||window).getSelection&&u.getSelection();if(c&&0!==c.rangeCount){u=c.anchorNode;var l=c.anchorOffset,h=c.focusNode;c=c.focusOffset;try{u.nodeType,h.nodeType}catch(C){u=null;break e}var f=0,p=-1,d=-1,v=0,g=0,y=s,m=null;t:for(;;){for(var b;y!==u||0!==l&&3!==y.nodeType||(p=f+l),y!==h||0!==c&&3!==y.nodeType||(d=f+c),3===y.nodeType&&(f+=y.nodeValue.length),null!==(b=y.firstChild);)m=y,y=b;for(;;){if(y===s)break t;if(m===u&&++v===l&&(p=f),m===h&&++g===c&&(d=f),null!==(b=y.nextSibling))break;m=(y=m).parentNode}y=b}u=-1===p||-1===d?null:{start:p,end:d}}else u=null}u=u||{start:0,end:0}}else u=null;gn={activeElementDetached:null,focusedElem:s,selectionRange:u},Gt=!1,Ls=i;do{try{du()}catch(C){if(null===Ls)throw Error(a(330));mu(Ls,C),Ls=Ls.nextEffect}}while(null!==Ls);Ls=i;do{try{for(s=e,u=t;null!==Ls;){var _=Ls.effectTag;if(16&_&&Ve(Ls.stateNode,""),128&_){var w=Ls.alternate;if(null!==w){var E=w.ref;null!==E&&("function"===typeof E?E(null):E.current=null)}}switch(1038&_){case 2:cs(Ls),Ls.effectTag&=-3;break;case 6:cs(Ls),Ls.effectTag&=-3,hs(Ls.alternate,Ls);break;case 1024:Ls.effectTag&=-1025;break;case 1028:Ls.effectTag&=-1025,hs(Ls.alternate,Ls);break;case 4:hs(Ls.alternate,Ls);break;case 8:ls(s,l=Ls,u),ss(l)}Ls=Ls.nextEffect}}catch(C){if(null===Ls)throw Error(a(330));mu(Ls,C),Ls=Ls.nextEffect}}while(null!==Ls);if(E=gn,w=pn(),_=E.focusedElem,u=E.selectionRange,w!==_&&_&&_.ownerDocument&&function e(t,n){return!(!t||!n)&&(t===n||(!t||3!==t.nodeType)&&(n&&3===n.nodeType?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(_.ownerDocument.documentElement,_)){null!==u&&dn(_)&&(w=u.start,void 0===(E=u.end)&&(E=w),"selectionStart"in _?(_.selectionStart=w,_.selectionEnd=Math.min(E,_.value.length)):(E=(w=_.ownerDocument||document)&&w.defaultView||window).getSelection&&(E=E.getSelection(),l=_.textContent.length,s=Math.min(u.start,l),u=void 0===u.end?s:Math.min(u.end,l),!E.extend&&s>u&&(l=u,u=s,s=l),l=fn(_,s),h=fn(_,u),l&&h&&(1!==E.rangeCount||E.anchorNode!==l.node||E.anchorOffset!==l.offset||E.focusNode!==h.node||E.focusOffset!==h.offset)&&((w=w.createRange()).setStart(l.node,l.offset),E.removeAllRanges(),s>u?(E.addRange(w),E.extend(h.node,h.offset)):(w.setEnd(h.node,h.offset),E.addRange(w))))),w=[];for(E=_;E=E.parentNode;)1===E.nodeType&&w.push({element:E,left:E.scrollLeft,top:E.scrollTop});for("function"===typeof _.focus&&_.focus(),_=0;_<w.length;_++)(E=w[_]).element.scrollLeft=E.left,E.element.scrollTop=E.top}Gt=!!vn,gn=vn=null,e.current=n,Ls=i;do{try{for(_=e;null!==Ls;){var T=Ls.effectTag;if(36&T&&os(_,Ls.alternate,Ls),128&T){w=void 0;var S=Ls.ref;if(null!==S){var I=Ls.stateNode;switch(Ls.tag){case 5:w=I;break;default:w=I}"function"===typeof S?S(w):S.current=w}}Ls=Ls.nextEffect}}catch(C){if(null===Ls)throw Error(a(330));mu(Ls,C),Ls=Ls.nextEffect}}while(null!==Ls);Ls=null,Di(),Ts=o}else e.current=n;if(Us)Us=!1,Vs=e,qs=t;else for(Ls=i;null!==Ls;)t=Ls.nextEffect,Ls.nextEffect=null,Ls=t;if(0===(t=e.firstPendingTime)&&(Fs=null),1073741823===t?e===Ws?zs++:(zs=0,Ws=e):zs=0,"function"===typeof wu&&wu(n.stateNode,r),Xs(e),Ms)throw Ms=!1,e=js,js=null,e;return 0!==(8&Ts)||Hi(),null}function du(){for(;null!==Ls;){var e=Ls.effectTag;0!==(256&e)&&ns(Ls.alternate,Ls),0===(512&e)||Us||(Us=!0,zi(97,(function(){return vu(),null}))),Ls=Ls.nextEffect}}function vu(){if(90!==qs){var e=97<qs?97:qs;return qs=90,Bi(e,gu)}}function gu(){if(null===Vs)return!1;var e=Vs;if(Vs=null,0!==(48&Ts))throw Error(a(331));var t=Ts;for(Ts|=32,e=e.current.firstEffect;null!==e;){try{var n=e;if(0!==(512&n.effectTag))switch(n.tag){case 0:case 11:case 15:case 22:rs(5,n),is(5,n)}}catch(r){if(null===e)throw Error(a(330));mu(e,r)}n=e.nextEffect,e.nextEffect=null,e=n}return Ts=t,Hi(),!0}function yu(e,t,n){uo(e,t=ds(e,t=Ja(n,t),1073741823)),null!==(e=$s(e,1073741823))&&Xs(e)}function mu(e,t){if(3===e.tag)yu(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){yu(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Fs||!Fs.has(r))){uo(n,e=vs(n,e=Ja(t,e),1073741823)),null!==(n=$s(n,1073741823))&&Xs(n);break}}n=n.return}}function bu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),Ss===e&&Cs===n?ks===Es||ks===ws&&1073741823===Os&&Ui()-Ds<500?nu(e,Cs):Rs=!0:Pu(e,n)&&(0!==(t=e.lastPingedTime)&&t<n||(e.lastPingedTime=n,Xs(e)))}function _u(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(t=Ks(t=Gs(),e,null)),null!==(e=$s(e,t))&&Xs(e)}gs=function(e,t,n){var r=t.expirationTime;if(null!==e){var i=t.pendingProps;if(e.memoizedProps!==i||fi.current)Na=!0;else{if(r<n){switch(Na=!1,t.tag){case 3:Ua(t),xa();break;case 5:if(Do(t),4&t.mode&&1!==n&&i.hidden)return t.expirationTime=t.childExpirationTime=1,null;break;case 1:vi(t.type)&&bi(t);break;case 4:Po(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value,i=t.type._context,ci($i,i._currentValue),i._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(r=t.child.childExpirationTime)&&r>=n?Wa(e,t,n):(ci(Mo,1&Mo.current),null!==(t=Qa(e,t,n))?t.sibling:null);ci(Mo,1&Mo.current);break;case 19:if(r=t.childExpirationTime>=n,0!==(64&e.effectTag)){if(r)return Ka(e,t,n);t.effectTag|=64}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null),ci(Mo,Mo.current),!r)return null}return Qa(e,t,n)}Na=!1}}else Na=!1;switch(t.expirationTime=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,i=di(t,hi.current),no(t,n),i=Qo(null,t,r,e,i,n),t.effectTag|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,vi(r)){var o=!0;bi(t)}else o=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,oo(t);var s=r.getDerivedStateFromProps;"function"===typeof s&&vo(t,r,s,e),i.updater=go,t.stateNode=i,i._reactInternalFiber=t,_o(t,r,e,n),t=Fa(null,t,r,!0,o,n)}else t.tag=0,Aa(null,t,i,n),t=t.child;return t;case 16:e:{if(i=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,function(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}}(i),1!==i._status)throw i._result;switch(i=i._result,t.type=i,o=t.tag=function(e){if("function"===typeof e)return Iu(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===ue)return 11;if(e===he)return 14}return 2}(i),e=Qi(i,e),o){case 0:t=Ma(null,t,i,e,n);break e;case 1:t=ja(null,t,i,e,n);break e;case 11:t=Pa(null,t,i,e,n);break e;case 14:t=Ra(null,t,i,Qi(i.type,e),r,n);break e}throw Error(a(306,i,""))}return t;case 0:return r=t.type,i=t.pendingProps,Ma(e,t,r,i=t.elementType===r?i:Qi(r,i),n);case 1:return r=t.type,i=t.pendingProps,ja(e,t,r,i=t.elementType===r?i:Qi(r,i),n);case 3:if(Ua(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,ao(e,t),lo(t,r,null,n),(r=t.memoizedState.element)===i)xa(),t=Qa(e,t,n);else{if((i=t.stateNode.hydrate)&&(wa=wn(t.stateNode.containerInfo.firstChild),_a=t,i=Ea=!0),i)for(n=Co(t,null,r,n),t.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else Aa(e,t,r,n),xa();t=t.child}return t;case 5:return Do(t),null===e&&Ia(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,s=i.children,mn(r,i)?s=null:null!==o&&mn(r,o)&&(t.effectTag|=16),La(e,t),4&t.mode&&1!==n&&i.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(Aa(e,t,s,n),t=t.child),t;case 6:return null===e&&Ia(t),null;case 13:return Wa(e,t,n);case 4:return Po(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Io(t,null,r,n):Aa(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Pa(e,t,r,i=t.elementType===r?i:Qi(r,i),n);case 7:return Aa(e,t,t.pendingProps,n),t.child;case 8:case 12:return Aa(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value;var u=t.type._context;if(ci($i,u._currentValue),u._currentValue=o,null!==s)if(u=s.value,0===(o=jr(u,o)?0:0|("function"===typeof r._calculateChangedBits?r._calculateChangedBits(u,o):1073741823))){if(s.children===i.children&&!fi.current){t=Qa(e,t,n);break e}}else for(null!==(u=t.child)&&(u.return=t);null!==u;){var c=u.dependencies;if(null!==c){s=u.child;for(var l=c.firstContext;null!==l;){if(l.context===r&&0!==(l.observedBits&o)){1===u.tag&&((l=so(n,null)).tag=2,uo(u,l)),u.expirationTime<n&&(u.expirationTime=n),null!==(l=u.alternate)&&l.expirationTime<n&&(l.expirationTime=n),to(u.return,n),c.expirationTime<n&&(c.expirationTime=n);break}l=l.next}}else s=10===u.tag&&u.type===t.type?null:u.child;if(null!==s)s.return=u;else for(s=u;null!==s;){if(s===t){s=null;break}if(null!==(u=s.sibling)){u.return=s.return,s=u;break}s=s.return}u=s}Aa(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=(o=t.pendingProps).children,no(t,n),r=r(i=ro(i,o.unstable_observedBits)),t.effectTag|=1,Aa(e,t,r,n),t.child;case 14:return o=Qi(i=t.type,t.pendingProps),Ra(e,t,i,o=Qi(i.type,o),r,n);case 15:return Da(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Qi(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,vi(r)?(e=!0,bi(t)):e=!1,no(t,n),mo(t,r,i),_o(t,r,i,n),Fa(null,t,r,!0,e,n);case 19:return Ka(e,t,n)}throw Error(a(156,t.tag))};var wu=null,Eu=null;function Tu(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function Su(e,t,n,r){return new Tu(e,t,n,r)}function Iu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Cu(e,t){var n=e.alternate;return null===n?((n=Su(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{expirationTime:t.expirationTime,firstContext:t.firstContext,responders:t.responders},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ku(e,t,n,r,i,o){var s=2;if(r=e,"function"===typeof e)Iu(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case ne:return xu(n.children,i,o,t);case se:s=8,i|=7;break;case re:s=8,i|=1;break;case ie:return(e=Su(12,n,t,8|i)).elementType=ie,e.type=ie,e.expirationTime=o,e;case ce:return(e=Su(13,n,t,i)).type=ce,e.elementType=ce,e.expirationTime=o,e;case le:return(e=Su(19,n,t,i)).elementType=le,e.expirationTime=o,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case oe:s=10;break e;case ae:s=9;break e;case ue:s=11;break e;case he:s=14;break e;case fe:s=16,r=null;break e;case pe:s=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Su(s,n,t,i)).elementType=e,t.type=r,t.expirationTime=o,t}function xu(e,t,n,r){return(e=Su(7,e,r,t)).expirationTime=n,e}function Ou(e,t,n){return(e=Su(6,e,null,t)).expirationTime=n,e}function Nu(e,t,n){return(t=Su(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Au(e,t,n){this.tag=t,this.current=null,this.containerInfo=e,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function Pu(e,t){var n=e.firstSuspendedTime;return e=e.lastSuspendedTime,0!==n&&n>=t&&e<=t}function Ru(e,t){var n=e.firstSuspendedTime,r=e.lastSuspendedTime;n<t&&(e.firstSuspendedTime=t),(r>t||0===n)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0)}function Du(e,t){t>e.firstPendingTime&&(e.firstPendingTime=t);var n=e.firstSuspendedTime;0!==n&&(t>=n?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t))}function Lu(e,t){var n=e.lastExpiredTime;(0===n||n>t)&&(e.lastExpiredTime=t)}function Mu(e,t,n,r){var i=t.current,o=Gs(),s=fo.suspense;o=Ks(o,i,s);e:if(n){t:{if(Ze(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(a(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break t;case 1:if(vi(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break t}}u=u.return}while(null!==u);throw Error(a(171))}if(1===n.tag){var c=n.type;if(vi(c)){n=mi(n,c,u);break e}}n=u}else n=li;return null===t.context?t.context=n:t.pendingContext=n,(t=so(o,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),uo(i,t),Qs(i,o),o}function ju(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function Fu(e,t){null!==(e=e.memoizedState)&&null!==e.dehydrated&&e.retryTime<t&&(e.retryTime=t)}function Uu(e,t){Fu(e,t),(e=e.alternate)&&Fu(e,t)}function Vu(e,t,n){var r=new Au(e,t,n=null!=n&&!0===n.hydrate),i=Su(3,null,null,2===t?7:1===t?3:0);r.current=i,i.stateNode=r,oo(i),e[Cn]=r.current,n&&0!==t&&function(e,t){var n=Je(t);Ct.forEach((function(e){dt(e,t,n)})),kt.forEach((function(e){dt(e,t,n)}))}(0,9===e.nodeType?e:e.ownerDocument),this._internalRoot=r}function qu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Bu(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o._internalRoot;if("function"===typeof i){var s=i;i=function(){var e=ju(a);s.call(e)}}Mu(t,a,e,i)}else{if(o=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Vu(e,0,t?{hydrate:!0}:void 0)}(n,r),a=o._internalRoot,"function"===typeof i){var u=i;i=function(){var e=ju(a);u.call(e)}}tu((function(){Mu(t,a,e,i)}))}return ju(a)}function zu(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:te,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Wu(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!qu(t))throw Error(a(200));return zu(e,t,null,n)}Vu.prototype.render=function(e){Mu(e,this._internalRoot,null,null)},Vu.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Mu(null,e,null,(function(){t[Cn]=null}))},vt=function(e){if(13===e.tag){var t=Ki(Gs(),150,100);Qs(e,t),Uu(e,t)}},gt=function(e){13===e.tag&&(Qs(e,3),Uu(e,3))},yt=function(e){if(13===e.tag){var t=Gs();Qs(e,t=Ks(t,e,null)),Uu(e,t)}},x=function(e,t,n){switch(t){case"input":if(Ie(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Nn(r);if(!i)throw Error(a(90));we(r),Ie(r,i)}}}break;case"textarea":Pe(e,n);break;case"select":null!=(t=n.value)&&Oe(e,!!n.multiple,t,!1)}},D=eu,L=function(e,t,n,r,i){var o=Ts;Ts|=4;
2try{return Bi(98,e.bind(null,t,n,r,i))}finally{0===(Ts=o)&&Hi()}},M=function(){0===(49&Ts)&&(function(){if(null!==Bs){var e=Bs;Bs=null,e.forEach((function(e,t){Lu(t,e),Xs(t)})),Hi()}}(),vu())},j=function(e,t){var n=Ts;Ts|=2;try{return e(t)}finally{0===(Ts=n)&&Hi()}};var Hu={Events:[xn,On,Nn,C,T,jn,function(e){it(e,Mn)},P,R,Xt,st,vu,{current:!1}]};!function(e){var t=e.findFiberByHostInstance;(function(e){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);wu=function(e){try{t.onCommitFiberRoot(n,e,void 0,64===(64&e.current.effectTag))}catch(r){}},Eu=function(e){try{t.onCommitFiberUnmount(n,e)}catch(r){}}}catch(r){}})(i({},e,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Y.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=nt(e))?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))}({findFiberByHostInstance:kn,bundleType:0,version:"16.13.1",rendererPackageName:"react-dom"}),t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Hu,t.createPortal=Wu,t.f
vendor: 6,152 bytes, line 2
2indDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;if(void 0===t){if("function"===typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return e=null===(e=nt(t))?null:e.stateNode},t.flushSync=function(e,t){if(0!==(48&Ts))throw Error(a(187));var n=Ts;Ts|=1;try{return Bi(99,e.bind(null,t))}finally{Ts=n,Hi()}},t.hydrate=function(e,t,n){if(!qu(t))throw Error(a(200));return Bu(null,e,t,!0,n)},t.render=function(e,t,n){if(!qu(t))throw Error(a(200));return Bu(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!qu(e))throw Error(a(40));return!!e._reactRootContainer&&(tu((function(){Bu(null,null,e,!1,(function(){e._reactRootContainer=null,e[Cn]=null}))})),!0)},t.unstable_batchedUpdates=eu,t.unstable_createPortal=function(e,t){return Wu(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!qu(n))throw Error(a(200));if(null==e||void 0===e._reactInternalFiber)throw Error(a(38));return Bu(e,t,n,!1,r)},t.version="16.13.1"},function(e,t,n){"use strict";e.exports=n(75)},function(e,t,n){"use strict";var r,i,o,a,s;if("undefined"===typeof window||"function"!==typeof MessageChannel){var u=null,c=null,l=function e(){if(null!==u)try{var n=t.unstable_now();u(!0,n),u=null}catch(r){throw setTimeout(e,0),r}},h=Date.now();t.unstable_now=function(){return Date.now()-h},r=function(e){null!==u?setTimeout(r,0,e):(u=e,setTimeout(l,0))},i=function(e,t){c=setTimeout(e,t)},o=function(){clearTimeout(c)},a=function(){return!1},s=t.unstable_forceFrameRate=function(){}}else{var f=window.performance,p=window.Date,d=window.setTimeout,v=window.clearTimeout;if("undefined"!==typeof console){var g=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!==typeof g&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"===typeof f&&"function"===typeof f.now)t.unstable_now=function(){return f.now()};else{var y=p.now();t.unstable_now=function(){return p.now()-y}}var m=!1,b=null,_=-1,w=5,E=0;a=function(){return t.unstable_now()>=E},s=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):w=0<e?Math.floor(1e3/e):5};var T=new MessageChannel,S=T.port2;T.port1.onmessage=function(){if(null!==b){var e=t.unstable_now();E=e+w;try{b(!0,e)?S.postMessage(null):(m=!1,b=null)}catch(n){throw S.postMessage(null),n}}else m=!1},r=function(e){b=e,m||(m=!0,S.postMessage(null))},i=function(e,n){_=d((function(){e(t.unstable_now())}),n)},o=function(){v(_),_=-1}}function I(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,i=e[r];if(!(void 0!==i&&0<x(i,t)))break e;e[r]=t,e[n]=i,n=r}}function C(e){return void 0===(e=e[0])?null:e}function k(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length;r<i;){var o=2*(r+1)-1,a=e[o],s=o+1,u=e[s];if(void 0!==a&&0>x(a,n))void 0!==u&&0>x(u,a)?(e[r]=u,e[s]=n,r=s):(e[r]=a,e[o]=n,r=o);else{if(!(void 0!==u&&0>x(u,n)))break e;e[r]=u,e[s]=n,r=s}}}return t}return null}function x(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var O=[],N=[],A=1,P=null,R=3,D=!1,L=!1,M=!1;function j(e){for(var t=C(N);null!==t;){if(null===t.callback)k(N);else{if(!(t.startTime<=e))break;k(N),t.sortIndex=t.expirationTime,I(O,t)}t=C(N)}}function F(e){if(M=!1,j(e),!L)if(null!==C(O))L=!0,r(U);else{var t=C(N);null!==t&&i(F,t.startTime-e)}}function U(e,n){L=!1,M&&(M=!1,o()),D=!0;var r=R;try{for(j(n),P=C(O);null!==P&&(!(P.expirationTime>n)||e&&!a());){var s=P.callback;if(null!==s){P.callback=null,R=P.priorityLevel;var u=s(P.expirationTime<=n);n=t.unstable_now(),"function"===typeof u?P.callback=u:P===C(O)&&k(O),j(n)}else k(O);P=C(O)}if(null!==P)var c=!0;else{var l=C(N);null!==l&&i(F,l.startTime-n),c=!1}return c}finally{P=null,R=r,D=!1}}function V(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var q=s;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){L||D||(L=!0,r(U))},t.unstable_getCurrentPriorityLevel=function(){return R},t.unstable_getFirstCallbackNode=function(){return C(O)},t.unstable_next=function(e){switch(R){case 1:case 2:case 3:var t=3;break;default:t=R}var n=R;R=t;try{return e()}finally{R=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=q,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=R;R=e;try{return t()}finally{R=n}},t.unstable_scheduleCallback=function(e,n,a){var s=t.unstable_now();if("object"===typeof a&&null!==a){var u=a.delay;u="number"===typeof u&&0<u?s+u:s,a="number"===typeof a.timeout?a.timeout:V(e)}else a=V(e),u=s;return e={id:A++,callback:n,priorityLevel:e,startTime:u,expirationTime:a=u+a,sortIndex:-1},u>s?(e.sortIndex=u,I(N,e),null===C(O)&&e===C(N)&&(M?o():M=!0,i(F,u-s))):(e.sortIndex=a,I(O,e),L||D||(L=!0,r(U))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();j(e);var n=C(O);return n!==P&&null!==P&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<P.expirationTime||a()},t.unstable_wrapCallback=function(e){var t=R;return function(){var n=R;R=t;try{return e.apply(this,arguments)}finally{R=n}}}},,,,,function(e,t,n){"use strict";var r=n(81);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;
2var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,h=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,v=r?Symbol.for("react.suspense_list"):60120,g=r?Symbol.for("react.memo"):60115,y=r?Symbol.for("react.lazy"):60116,m=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,_=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function E(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case h:case f:case a:case u:case s:case d:return e;default:switch(e=e&&e.$$typeof){case l:case p:case y:case g:case c:return e;default:return t}}case o:return t}}}function T(e){return E(e)===f}t.AsyncMode=h,t.ConcurrentMode=f,t.ContextConsumer=l,t.ContextProvider=c,t.Element=i,t.ForwardRef=p,t.Fragment=a,t.Lazy=y,t.Memo=g,t.Portal=o,t.Profiler=u,t.StrictMode=s,t.Suspense=d,t.isAsyncMode=function(e){return T(e)||E(e)===h},t.isConcurrentMode=T,t.isContextConsumer=function(e){return E(e)===l},t.isContextProvider=function(e){return E(e)===c},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return E(e)===p},t.isFragment=function(e){return E(e)===a},t.isLazy=function(e){return E(e)===y},t.isMemo=function(e){return E(e)===g},t.isPortal=function(e){return E(e)===o},t.isProfiler=function(e){return E(e)===u},t.isStrictMode=function(e){return E(e)===s},t.isSuspense=function(e){return E(e)===d},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===a||e===f||e===u||e===s||e===d||e===v||"object"===typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===g||e.$$typeof===c||e.$$typeof===l||e.$$typeof===p||e.$$typeof===b||e.$$typeof===_||e.$$typeof===w||e.$$typeof===m)},t.typeOf=E},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},,,function(e,t,n){(function(e){(function(){var t,r=n(8).default,i="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){e!=Array.prototype&&e!=Object.prototype&&(e[t]=n.value)};var o=function(t){t=["object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof e&&e,t];for(var n=0;n<t.length;++n){var r=t[n];if(r&&r.Math==Math)return r}return globalThis}(this);function a(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}function s(e){var t="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return t?t.call(e):{next:a(e)}}!function(e,t){if(t){var n=o;e=e.split(".");for(var r=0;r<e.length-1;r++){var a=e[r];a in n||(n[a]={}),n=n[a]}(t=t(r=n[e=e[e.length-1]]))!=r&&null!=t&&i(n,e,{configurable:!0,writable:!0,value:t})}}("Promise",(function(e){function t(e){this.b=0,this.c=void 0,this.a=[];var t=this.f();try{e(t.resolve,t.reject)}catch(n){t.reject(n)}}function n(){this.a=null}function r(e){return e instanceof t?e:new t((function(t){t(e)}))}if(e)return e;n.prototype.b=function(e){if(null==this.a){this.a=[];var t=this;this.c((function(){t.g()}))}this.a.push(e)};var i=o.setTimeout;n.prototype.c=function(e){i(e,0)},n.prototype.g=function(){for(;this.a&&this.a.length;){var e=this.a;this.a=[];for(var t=0;t<e.length;++t){var n=e[t];e[t]=null;try{n()}catch(r){this.f(r)}}}this.a=null},n.prototype.f=function(e){this.c((function(){throw e}))},t.prototype.f=function(){function e(e){return function(r){n||(n=!0,e.call(t,r))}}var t=this,n=!1;return{resolve:e(this.m),reject:e(this.g)}}
2,t.prototype.m=function(e){if(e===this)this.g(new TypeError("A Promise cannot resolve to itself"));else if(e instanceof t)this.s(e);else{e:switch(typeof e){case"object":var n=null!=e;break e;case"function":n=!0;break e;default:n=!1}n?this.u(e):this.h(e)}},t.prototype.u=function(e){var t=void 0;try{t=e.then}catch(n){return void this.g(n)}"function"==typeof t?this.w(t,e):this.h(e)},t.prototype.g=function(e){this.i(2,e)},t.prototype.h=function(e){this.i(1,e)},t.prototype.i=function(e,t){if(0!=this.b)throw Error("Cannot settle("+e+", "+t+"): Promise already settled in state"+this.b);this.b=e,this.c=t,this.l()},t.prototype.l=function(){if(null!=this.a){for(var e=0;e<this.a.length;++e)a.b(this.a[e]);this.a=null}};var a=new n;return t.prototype.s=function(e){var t=this.f();e.Oa(t.resolve,t.reject)},t.prototype.w=function(e,t){var n=this.f();try{e.call(t,n.resolve,n.reject)}catch(r){n.reject(r)}},t.prototype.then=function(e,n){function r(e,t){return"function"==typeof e?function(t){try{i(e(t))}catch(n){o(n)}}:t}var i,o,a=new t((function(e,t){i=e,o=t}));return this.Oa(r(e,i),r(n,o)),a},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype.Oa=function(e,t){function n(){switch(r.b){case 1:e(r.c);break;case 2:t(r.c);break;default:throw Error("Unexpected state: "+r.b)}}var r=this;null==this.a?a.b(n):this.a.push(n)},t.resolve=r,t.reject=function(e){return new t((function(t,n){n(e)}))},t.race=function(e){return new t((function(t,n){for(var i=s(e),o=i.next();!o.done;o=i.next())r(o.value).Oa(t,n)}))},t.all=function(e){var n=s(e),i=n.next();return i.done?r([]):new t((function(e,t){function o(t){return function(n){a[t]=n,0==--s&&e(a)}}var a=[],s=0;do{a.push(void 0),s++,r(i.value).Oa(o(a.length-1),t),i=n.next()}while(!i.done)}))},t}));var u=u||{},c=this||self,l=/^[\w+/_-]+[=]{0,2}$/,h=null;function f(){}function p(e){var t=typeof e;if("object"==t){if(!e)return"null";if(e instanceof Array)return"array";if(e instanceof Object)return t;var n=Object.prototype.toString.call(e);if("[object Window]"==n)return"object";if("[object Array]"==n||"number"==typeof e.length&&"undefined"!=typeof e.splice&&"undefined"!=typeof e.propertyIsEnumerable&&!e.propertyIsEnumerable("splice"))return"array";if("[object Function]"==n||"undefined"!=typeof e.call&&"undefined"!=typeof e.propertyIsEnumerable&&!e.propertyIsEnumerable("call"))return"function"}else if("function"==t&&"undefined"==typeof e.call)return"object";return t}function d(e){var t=p(e);return"array"==t||"object"==t&&"number"==typeof e.length}function v(e){return"function"==p(e)}function g(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}function y(e){return Object.prototype.hasOwnProperty.call(e,m)&&e[m]||(e[m]=++b)}var m="closure_uid_"+(1e9*Math.random()>>>0),b=0;function _(e,t,n){return e.call.apply(e.bind,arguments)}function w(e,t,n){if(!e)throw Error();if(2<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),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function E(e,t,n){return(E=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?_:w).apply(null,arguments)}function T(e,t){var n=Array.prototype.slice.call(arguments,1);return function(){var t=n.slice();return t.push.apply(t,arguments),e.apply(this,t)}}var S=Date.now||function(){return+new Date};function I(e,t){function n(){}n.prototype=t.prototype,e.Za=t.prototype,e.prototype=new n,e.prototype.constructor=e}function C(e,t,n){this.code=O+e,this.message=t||N[e]||"",this.a=n||null}function k(e){var t=e&&e.code;return t?new C(t.substring(O.length),e.message,e.serverResponse):null}I(C,Error),C.prototype.v=function(){var e={code:this.code,message:this.message};return this.a&&(e.serverResponse=this.a),e},C.prototype.toJSON=function(){return this.v()};var x,O="auth/",N={"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 al
2ways 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.","invali
2d-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."},A={hd:{Ra:"https://staging-identitytoolkit.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/",Xa:"https://staging-securetoken.sandbox.googleapis.com/v1/token",Ua:"https://staging-identitytoolkit.sandbox.googleapis.com/v2/",id:"b"},pd:{Ra:"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",Xa:"https://securetoken.googleapis.com/v1/token",Ua:"https://identitytoolkit.googleapis.com/v2/",id:"p"},rd:{Ra:"https://staging-www.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/",Xa:"https://staging-securetoken.sandbox.googleapis.com/v1/token",Ua:"https://staging-identitytoolkit.sandbox.googleapis.com/v2/",id:"s"},sd:{Ra:"https://www-googleapis-test.sandbox.google.com/identitytoolkit/v3/relyingparty/",Xa:"https://test-securetoken.sandbox.googleapis.com/v1/token",Ua:"https://test-identitytoolkit.sandbox.googleapis.com/v2/",id:"t"}};function P(e){for(var t in A)if(A[t].id===e)return{firebaseEndpoint:(e=A[t]).Ra,secureTokenEndpoint:e.Xa,identityPlatformEndpoint:e.Ua};return null}function R(e){if(!e)return!1;
2try{return!!e.$goog_Thenable}catch(t){return!1}}function D(e){if(Error.captureStackTrace)Error.captureStackTrace(this,D);else{var t=Error().stack;t&&(this.stack=t)}e&&(this.message=String(e))}function L(e,t){for(var n="",r=(e=e.split("%s")).length-1,i=0;i<r;i++)n+=e[i]+(i<t.length?t[i]:"%s");D.call(this,n+e[r])}function M(e,t){throw new L("Failure"+(e?": "+e:""),Array.prototype.slice.call(arguments,1))}function j(e,t){this.c=e,this.f=t,this.b=0,this.a=null}function F(e,t){e.f(t),100>e.b&&(e.b++,t.next=e.a,e.a=t)}function U(){this.b=this.a=null}x=P("__EID__")?"__EID__":void 0,I(D,Error),D.prototype.name="CustomError",I(L,D),L.prototype.name="AssertionError",j.prototype.get=function(){if(0<this.b){this.b--;var e=this.a;this.a=e.next,e.next=null}else e=this.c();return e};var V=new j((function(){return new B}),(function(e){e.reset()}));function q(){var e=mt,t=null;return e.a&&(t=e.a,e.a=e.a.next,e.a||(e.b=null),t.next=null),t}function B(){this.next=this.b=this.a=null}U.prototype.add=function(e,t){var n=V.get();n.set(e,t),this.b?this.b.next=n:this.a=n,this.b=n},B.prototype.set=function(e,t){this.a=e,this.b=t,this.next=null},B.prototype.reset=function(){this.next=this.b=this.a=null};var z=Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t,void 0)}:function(e,t){if("string"===typeof e)return"string"!==typeof t||1!=t.length?-1:e.indexOf(t,0);for(var n=0;n<e.length;n++)if(n in e&&e[n]===t)return n;return-1},W=Array.prototype.forEach?function(e,t,n){Array.prototype.forEach.call(e,t,n)}:function(e,t,n){for(var r=e.length,i="string"===typeof e?e.split(""):e,o=0;o<r;o++)o in i&&t.call(n,i[o],o,e)};var H=Array.prototype.filter?function(e,t){return Array.prototype.filter.call(e,t,void 0)}:function(e,t){for(var n=e.length,r=[],i=0,o="string"===typeof e?e.split(""):e,a=0;a<n;a++)if(a in o){var s=o[a];t.call(void 0,s,a,e)&&(r[i++]=s)}return r},G=Array.prototype.map?function(e,t){return Array.prototype.map.call(e,t,void 0)}:function(e,t){for(var n=e.length,r=Array(n),i="string"===typeof e?e.split(""):e,o=0;o<n;o++)o in i&&(r[o]=t.call(void 0,i[o],o,e));return r},K=Array.prototype.some?function(e,t){return Array.prototype.some.call(e,t,void 0)}:function(e,t){for(var n=e.length,r="string"===typeof e?e.split(""):e,i=0;i<n;i++)if(i in r&&t.call(void 0,r[i],i,e))return!0;return!1};function Q(e,t){return 0<=z(e,t)}function $(e,t){var n;return(n=0<=(t=z(e,t)))&&Array.prototype.splice.call(e,t,1),n}function Y(e,t){!function(e,t){for(var n="string"===typeof e?e.split(""):e,r=e.length-1;0<=r;--r)r in n&&t.call(void 0,n[r],r,e)}(e,(function(n,r){t.call(void 0,n,r,e)&&1==Array.prototype.splice.call(e,r,1).length&&0}))}function X(e){return Array.prototype.concat.apply([],arguments)}function J(e){var t=e.length;if(0<t){for(var n=Array(t),r=0;r<t;r++)n[r]=e[r];return n}return[]}var Z,ee=String.prototype.trim?function(e){return e.trim()}:function(e){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(e)[1]},te=/&/g,ne=/</g,re=/>/g,ie=/"/g,oe=/'/g,ae=/\x00/g,se=/[\x00&<>"']/;function ue(e,t){return-1!=e.indexOf(t)}function ce(e,t){return e<t?-1:e>t?1:0}e:{var le=c.navigator;if(le){var he=le.userAgent;if(he){Z=he;break e}}Z=""}function fe(e){return ue(Z,e)}function pe(e,t){for(var n in e)t.call(void 0,e[n],n,e)}function de(e){for(var t in e)return!1;return!0}function ve(e){var t,n={};for(t in e)n[t]=e[t];return n}var ge="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function ye(e,t){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i])e[n]=r[n];for(var o=0;o<ge.length;o++)n=ge[o],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}function me(e,t){e:{try{var n=e&&e.ownerDocument,r=n&&(n.defaultView||n.parentWindow);if((r=r||c).Element&&r.Location){var i=r;break e}}catch(a){}i=null}if(i&&"undefined"!=typeof i[t]&&(!e||!(e instanceof i[t])&&(e instanceof i.Location||e instanceof i.Element))){if(g(e))try{var o=e.constructor.displayName||e.constructor.name||Object.prototype.toString.call(e)}catch(a){o="<object could not be stringified>"}else o=void 0===e?"undefined":null===e?"null":typeof e;M("Argument is not a %s (or a non-Element, non-Location mock); got: %s",t,o)}}function be(e,t){this.a=e===Ee&&t||"",this.b=we}function _e(e){return e instanceof be&&e.constructor===be&&e.b===we?e.a:(M("expected object of type Const, got '"+e+"'"),"type_error:Const")}be.prototype.ra=!0,be.prototype.qa=function(){return this.a},be.prototype.toString=function(){return"Const{"+this.a+"}"};var we={},Ee={},Te=new be(Ee,"");function Se(e,t){this.a=e===Ne&&t||"",this.b=Oe}function Ie(e){return e instanceof Se&&e.constructor===Se&&e.b===Oe?e.a:(M("expected object of type TrustedResourceUrl, got '"+e+"' of type "+p(e)),"type_error:TrustedResourceUrl")}function Ce(e,t){var n=_e(e);
2if(!xe.test(n))throw Error("Invalid TrustedResourceUrl format: "+n);return e=n.replace(ke,(function(e,r){if(!Object.prototype.hasOwnProperty.call(t,r))throw Error('Found marker, "'+r+'", in format string, "'+n+'", but no valid label mapping found in args: '+JSON.stringify(t));return(e=t[r])instanceof be?_e(e):encodeURIComponent(String(e))})),new Se(Ne,e)}Se.prototype.ra=!0,Se.prototype.qa=function(){return this.a.toString()},Se.prototype.toString=function(){return"TrustedResourceUrl{"+this.a+"}"};var ke=/%{(\w+)}/g,xe=/^((https:)?\/\/[0-9a-z.:[\]-]+\/|\/[^/\\]|[^:/\\%]+\/|[^:/\\%]*[?#]|about:blank#)/i,Oe={},Ne={};function Ae(e,t){this.a=e===Me&&t||"",this.b=Le}function Pe(e){return e instanceof Ae&&e.constructor===Ae&&e.b===Le?e.a:(M("expected object of type SafeUrl, got '"+e+"' of type "+p(e)),"type_error:SafeUrl")}Ae.prototype.ra=!0,Ae.prototype.qa=function(){return this.a.toString()},Ae.prototype.toString=function(){return"SafeUrl{"+this.a+"}"};var Re=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;function De(e){return e instanceof Ae?e:(e="object"==typeof e&&e.ra?e.qa():String(e),Re.test(e)||(e="about:invalid#zClosurez"),new Ae(Me,e))}var Le={},Me={};function je(){this.a="",this.b=Ue}function Fe(e){return e instanceof je&&e.constructor===je&&e.b===Ue?e.a:(M("expected object of type SafeHtml, got '"+e+"' of type "+p(e)),"type_error:SafeHtml")}je.prototype.ra=!0,je.prototype.qa=function(){return this.a.toString()},je.prototype.toString=function(){return"SafeHtml{"+this.a+"}"};var Ue={};function Ve(e){var t=new je;return t.a=e,t}Ve("<!DOCTYPE html>");var qe=Ve("");function Be(e,t){for(var n=e.split("%s"),r="",i=Array.prototype.slice.call(arguments,1);i.length&&1<n.length;)r+=n.shift()+i.shift();return r+n.join("%s")}function ze(e){return se.test(e)&&(-1!=e.indexOf("&")&&(e=e.replace(te,"&")),-1!=e.indexOf("<")&&(e=e.replace(ne,"<")),-1!=e.indexOf(">")&&(e=e.replace(re,">")),-1!=e.indexOf('"')&&(e=e.replace(ie,""")),-1!=e.indexOf("'")&&(e=e.replace(oe,"'")),-1!=e.indexOf("\0")&&(e=e.replace(ae,"�"))),e}function We(e){return We[" "](e),e}Ve("<br>"),We[" "]=f;var He,Ge=fe("Opera"),Ke=fe("Trident")||fe("MSIE"),Qe=fe("Edge"),$e=Qe||Ke,Ye=fe("Gecko")&&!(ue(Z.toLowerCase(),"webkit")&&!fe("Edge"))&&!(fe("Trident")||fe("MSIE"))&&!fe("Edge"),Xe=ue(Z.toLowerCase(),"webkit")&&!fe("Edge");function Je(){var e=c.document;return e?e.documentMode:void 0}e:{var Ze="",et=function(){var e=Z;return Ye?/rv:([^\);]+)(\)|;)/.exec(e):Qe?/Edge\/([\d\.]+)/.exec(e):Ke?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e):Xe?/WebKit\/(\S+)/.exec(e):Ge?/(?:Version)[ \/]?(\S+)/.exec(e):void 0}();if(et&&(Ze=et?et[1]:""),Ke){var tt=Je();if(null!=tt&&tt>parseFloat(Ze)){He=String(tt);break e}}He=Ze}var nt,rt={};function it(e){return function(e,t){var n=rt;return Object.prototype.hasOwnProperty.call(n,e)?n[e]:n[e]=t(e)}(e,(function(){for(var t=0,n=ee(String(He)).split("."),r=ee(String(e)).split("."),i=Math.max(n.length,r.length),o=0;0==t&&o<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&&0==s[0].length)break;t=ce(0==a[1].length?0:parseInt(a[1],10),0==s[1].length?0:parseInt(s[1],10))||ce(0==a[2].length,0==s[2].length)||ce(a[2],s[2]),a=a[3],s=s[3]}while(0==t)}return 0<=t}))}nt=c.document&&Ke?Je():void 0;try{new self.OffscreenCanvas(0,0).getContext("2d")}catch(aa){}var ot=!Ke||9<=Number(nt);function at(e){var t=document;return"string"===typeof e?t.getElementById(e):e}function st(e,t){pe(t,(function(t,n){t&&"object"==typeof t&&t.ra&&(t=t.qa()),"style"==n?e.style.cssText=t:"class"==n?e.className=t:"for"==n?e.htmlFor=t:lt.hasOwnProperty(n)?e.setAttribute(lt[n],t):0==n.lastIndexOf("aria-",0)||0==n.lastIndexOf("data-",0)?e.setAttribute(n,t):e[n]=t}))}var ut,ct,lt={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 ht(e,t,n){function r(n){n&&t.appendChild("string"===typeof n?e.createTextNode(n):n)}for(var i=2;i<n.length;i++){var o=n[i];!d(o)||g(o)&&0<o.nodeType?r(o):W(pt(o)?J(o):o,r)}}function ft(e,t){return t=String(t),"application/xhtml+xml"===e.contentType&&(t=t.toLowerCase()),e.createElement(t)}function pt(e){if(e&&"number"==typeof e.length){if(g(e))return"function"==typeof e.item||"string"==typeof e.item;if(v(e))return"function"==typeof e.item}return!1}function dt(e){c.setTimeout((function(){throw e}
2),0)}function vt(){var e=c.MessageChannel;if("undefined"===typeof e&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!fe("Presto")&&(e=function(){var e=ft(document,"IFRAME");e.style.display="none",function(e){var t=new Se(Ne,_e(Te));me(e,"HTMLIFrameElement"),e.src=Ie(t).toString()}(e),document.documentElement.appendChild(e);var t=e.contentWindow;(e=t.document).open(),e.write(Fe(qe)),e.close();var n="callImmediate"+Math.random(),r="file:"==t.location.protocol?"*":t.location.protocol+"//"+t.location.host;e=E((function(e){"*"!=r&&e.origin!=r||e.data!=n||this.port1.onmessage()}),this),t.addEventListener("message",e,!1),this.port1={},this.port2={postMessage:function(){t.postMessage(n,r)}}}),"undefined"!==typeof e&&!fe("Trident")&&!fe("MSIE")){var t=new e,n={},r=n;return t.port1.onmessage=function(){if(void 0!==n.next){var e=(n=n.next).Db;n.Db=null,e()}},function(e){r.next={Db:e},r=r.next,t.port2.postMessage(0)}}return function(e){c.setTimeout(e,0)}}function gt(e,t){ct||function(){if(c.Promise&&c.Promise.resolve){var e=c.Promise.resolve(void 0);ct=function(){e.then(bt)}}else ct=function(){var e=bt;!v(c.setImmediate)||c.Window&&c.Window.prototype&&!fe("Edge")&&c.Window.prototype.setImmediate==c.setImmediate?(ut||(ut=vt()),ut(e)):c.setImmediate(e)}}(),yt||(ct(),yt=!0),mt.add(e,t)}var yt=!1,mt=new U;function bt(){for(var e;e=q();){try{e.a.call(e.b)}catch(t){dt(t)}F(V,e)}yt=!1}function _t(e,t){if(this.a=wt,this.i=void 0,this.f=this.b=this.c=null,this.g=this.h=!1,e!=f)try{var n=this;e.call(t,(function(e){Rt(n,Et,e)}),(function(e){if(!(e instanceof Vt))try{if(e instanceof Error)throw e;throw Error("Promise rejected.")}catch(t){}Rt(n,Tt,e)}))}catch(r){Rt(this,Tt,r)}}var wt=0,Et=2,Tt=3;function St(){this.next=this.f=this.b=this.g=this.a=null,this.c=!1}St.prototype.reset=function(){this.f=this.b=this.g=this.a=null,this.c=!1};var It=new j((function(){return new St}),(function(e){e.reset()}));function Ct(e,t,n){var r=It.get();return r.g=e,r.b=t,r.f=n,r}function kt(e){if(e instanceof _t)return e;var t=new _t(f);return Rt(t,Et,e),t}function xt(e){return new _t((function(t,n){n(e)}))}function Ot(e,t,n){Dt(e,t,n,null)||gt(T(t,e))}function Nt(e){return new _t((function(t){var n=e.length,r=[];if(n)for(var i=function(e,i,o){n--,r[e]=i?{Mb:!0,value:o}:{Mb:!1,reason:o},0==n&&t(r)},o=0;o<e.length;o++)Ot(e[o],T(i,o,!0),T(i,o,!1));else t(r)}))}function At(e,t){e.b||e.a!=Et&&e.a!=Tt||Lt(e),e.f?e.f.next=t:e.b=t,e.f=t}function Pt(e,t,n,r){var i=Ct(null,null,null);return i.a=new _t((function(e,o){i.g=t?function(n){try{var i=t.call(r,n);e(i)}catch(a){o(a)}}:e,i.b=n?function(t){try{var i=n.call(r,t);void 0===i&&t instanceof Vt?o(t):e(i)}catch(a){o(a)}}:o})),i.a.c=e,At(e,i),i.a}function Rt(e,t,n){e.a==wt&&(e===n&&(t=Tt,n=new TypeError("Promise cannot resolve to itself")),e.a=1,Dt(n,e.Yc,e.Zc,e)||(e.i=n,e.a=t,e.c=null,Lt(e),t!=Tt||n instanceof Vt||function(e,t){e.g=!0,gt((function(){e.g&&Ut.call(null,t)}))}(e,n)))}function Dt(e,t,n,r){if(e instanceof _t)return At(e,Ct(t||f,n||null,r)),!0;if(R(e))return e.then(t,n,r),!0;if(g(e))try{var i=e.then;if(v(i))return function(e,t,n,r,i){function o(e){a||(a=!0,r.call(i,e))}var a=!1;try{t.call(e,(function(e){a||(a=!0,n.call(i,e))}),o)}catch(s){o(s)}}(e,i,t,n,r),!0}catch(o){return n.call(r,o),!0}return!1}function Lt(e){e.h||(e.h=!0,gt(e.ec,e))}function Mt(e){var t=null;return e.b&&(t=e.b,e.b=t.next,t.next=null),e.b||(e.f=null),t}function jt(e,t,n,r){if(n==Tt&&t.b&&!t.c)for(;e&&e.g;e=e.c)e.g=!1;if(t.a)t.a.c=null,Ft(t,n,r);else try{t.c?t.g.call(t.f):Ft(t,n,r)}catch(i){Ut.call(null,i)}F(It,t)}function Ft(e,t,n){t==Et?e.g.call(e.f,n):e.b&&e.b.call(e.f,n)}_t.prototype.then=function(e,t,n){return Pt(this,v(e)?e:null,v(t)?t:null,n)},_t.prototype.$goog_Thenable=!0,(t=_t.prototype).ma=function(e,t){return(e=Ct(e,e,t)).c=!0,At(this,e),this},t.o=function(e,t){return Pt(this,null,e,t)},t.cancel=function(e){if(this.a==wt){var t=new Vt(e);gt((function(){!function e(t,n){if(t.a==wt)if(t.c){var r=t.c;if(r.b){for(var i=0,o=null,a=null,s=r.b;s&&(s.c||(i++,s.a==t&&(o=s),!(o&&1<i)));s=s.next)o||(a=s);
2o&&(r.a==wt&&1==i?e(r,n):(a?((i=a).next==r.f&&(r.f=i),i.next=i.next.next):Mt(r),jt(r,o,Tt,n)))}t.c=null}else Rt(t,Tt,n)}(this,t)}),this)}},t.Yc=function(e){this.a=wt,Rt(this,Et,e)},t.Zc=function(e){this.a=wt,Rt(this,Tt,e)},t.ec=function(){for(var e;e=Mt(this);)jt(this,e,this.a,this.i);this.h=!1};var Ut=dt;function Vt(e){D.call(this,e)}function qt(){0!=Bt&&(zt[y(this)]=this),this.wa=this.wa,this.na=this.na}I(Vt,D),Vt.prototype.name="cancel";var Bt=0,zt={};function Wt(e){if(!e.wa&&(e.wa=!0,e.Ba(),0!=Bt)){var t=y(e);if(0!=Bt&&e.na&&0<e.na.length)throw Error(e+" did not empty its onDisposeCallbacks queue. This probably means it overrode dispose() or disposeInternal() without calling the superclass' method.");delete zt[t]}}qt.prototype.wa=!1,qt.prototype.Ba=function(){if(this.na)for(;this.na.length;)this.na.shift()()};var Ht=Object.freeze||function(e){return e},Gt=!Ke||9<=Number(nt),Kt=Ke&&!it("9"),Qt=function(){if(!c.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{c.addEventListener("test",f,t),c.removeEventListener("test",f,t)}catch(n){}return e}();function $t(e,t){this.type=e,this.b=this.target=t,this.defaultPrevented=!1}function Yt(e,t){if($t.call(this,e?e.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,e){var n=this.type=e.type,r=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:null;if(this.target=e.target||e.srcElement,this.b=t,t=e.relatedTarget){if(Ye){e:{try{We(t.nodeName);var i=!0;break e}catch(o){}i=!1}i||(t=null)}}else"mouseover"==n?t=e.fromElement:"mouseout"==n&&(t=e.toElement);this.relatedTarget=t,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!==e.clientX?e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0),this.button=e.button,this.key=e.key||"",this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.pointerId=e.pointerId||0,this.pointerType="string"===typeof e.pointerType?e.pointerType:Xt[e.pointerType]||"",this.a=e,e.defaultPrevented&&this.preventDefault()}}$t.prototype.preventDefault=function(){this.defaultPrevented=!0},I(Yt,$t);var Xt=Ht({2:"touch",3:"pen",4:"mouse"});Yt.prototype.preventDefault=function(){Yt.Za.preventDefault.call(this);var e=this.a;if(e.preventDefault)e.preventDefault();else if(e.returnValue=!1,Kt)try{(e.ctrlKey||112<=e.keyCode&&123>=e.keyCode)&&(e.keyCode=-1)}catch(t){}},Yt.prototype.f=function(){return this.a};var Jt="closure_listenable_"+(1e6*Math.random()|0),Zt=0;function en(e,t,n,r,i){this.listener=e,this.proxy=null,this.src=t,this.type=n,this.capture=!!r,this.Ta=i,this.key=++Zt,this.ua=this.Na=!1}function tn(e){e.ua=!0,e.listener=null,e.proxy=null,e.src=null,e.Ta=null}function nn(e){this.src=e,this.a={},this.b=0}function rn(e,t){var n=t.type;n in e.a&&$(e.a[n],t)&&(tn(t),0==e.a[n].length&&(delete e.a[n],e.b--))}function on(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i];if(!o.ua&&o.listener==t&&o.capture==!!n&&o.Ta==r)return i}return-1}nn.prototype.add=function(e,t,n,r,i){var o=e.toString();(e=this.a[o])||(e=this.a[o]=[],this.b++);var a=on(e,t,r,i);return-1<a?(t=e[a],n||(t.Na=!1)):((t=new en(t,this.src,o,!!r,i)).Na=n,e.push(t)),t};var an="closure_lm_"+(1e6*Math.random()|0),sn={};function un(e,t,n,r,i){if(r&&r.once)ln(e,t,n,r,i);else if(Array.isArray(t))for(var o=0;o<t.length;o++)un(e,t[o],n,r,i);else n=bn(n),e&&e[Jt]?wn(e,t,n,g(r)?!!r.capture:!!r,i):cn(e,t,n,!1,r,i)}function cn(e,t,n,r,i,o){if(!t)throw Error("Invalid event type");var a=g(i)?!!i.capture:!!i,s=yn(e);if(s||(e[an]=s=new nn(e)),!(n=s.add(t,n,r,a,o)).proxy){if(r=function(){var e=gn,t=Gt?function(n){return e.call(t.src,t.listener,n)}:function(n){if(!(n=e.call(t.src,t.listener,n)))return n};return t}(),n.proxy=r,r.src=e,r.listener=n,e.addEventListener)Qt||(i=a),void 0===i&&(i=!1),e.addEventListener(t.toString(),r,i);else if(e.attachEvent)e.attachEvent(pn(t.toString()),r);else{if(!e.addListener||!e.removeListener)throw Error("addEventListener and attachEvent are unavailable.");e.addListener(r)}0}}function ln(e,t,n,r,i){if(Array.isArray(t))for(var o=0;o<t.length;o++)ln(e,t[o],n,r,i);else n=bn(n),e&&e[Jt]?En(e,t,n,g(r)?!!r.capture:!!r,i):cn(e,t,n,!0,r,i)}function hn(e,t,n,r,i){if(Array.isArray(t))for(var o=0;o<t.length;o++)hn(e,t[o],n,r,i);else r=g(r)?!!r.capture:!!r,n=bn(n),e&&e[Jt]?(e=e.u,(t=String(t).toString())in e.a&&(-1<(n=on(o=e.a[t],n,r,i))&&(tn(o[n]),Array.prototype.splice.call(o,n,1),0==o.length&&(delete e.a[t],e.b--)))):e&&(e=yn(e))&&(t=e.a[t.toString()],e=-1,t&&(e=on(t,n,r,i)),(n=-1<e?t[e]:null)&&fn(n))}function fn(e){if("number"!==typeof e&&e&&!e.ua){var t=e.src;if(t&&t[Jt])rn(t.u,e);else{var n=e.type,r=e.proxy;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent?t.detachEvent(pn(n),r):t.addListener&&t.removeListener&&t.removeListener(r),(n=yn(t))?(rn(n,e),0==n.b&&(n.src=null,t[an]=null)):tn(e)}}}function pn(e){return e in sn?sn[e]:sn[e]="on"+e}function dn(e,t,n,r){var i=!0;if((e=yn(e))&&(t=e.a[t.toString()]))for(t=t.concat(),e=0;e<t.length;e++){var o=t[e];o&&o.capture==n&&!o.ua&&(o=vn(o,r),i=i&&!1!==o)}return i}function vn(e,t){var n=e.listener,r=e.Ta||e.src;return e.Na&&fn(e),n.call(r,t)}function gn(e,t){if(e.ua)return!0;
2if(!Gt){if(!t)e:{t=["window","event"];for(var n=c,r=0;r<t.length;r++)if(null==(n=n[t[r]])){t=null;break e}t=n}if(t=new Yt(r=t,this),n=!0,!(0>r.keyCode||void 0!=r.returnValue)){e:{var i=!1;if(0==r.keyCode)try{r.keyCode=-1;break e}catch(a){i=!0}(i||void 0==r.returnValue)&&(r.returnValue=!0)}for(r=[],i=t.b;i;i=i.parentNode)r.push(i);for(e=e.type,i=r.length-1;0<=i;i--){t.b=r[i];var o=dn(r[i],e,!0,t);n=n&&o}for(i=0;i<r.length;i++)t.b=r[i],o=dn(r[i],e,!1,t),n=n&&o}return n}return vn(e,new Yt(t,this))}function yn(e){return(e=e[an])instanceof nn?e:null}var mn="__closure_events_fn_"+(1e9*Math.random()>>>0);function bn(e){return v(e)?e:(e[mn]||(e[mn]=function(t){return e.handleEvent(t)}),e[mn])}function _n(){qt.call(this),this.u=new nn(this),this.Yb=this,this.eb=null}function wn(e,t,n,r,i){e.u.add(String(t),n,!1,r,i)}function En(e,t,n,r,i){e.u.add(String(t),n,!0,r,i)}function Tn(e,t,n,r){if(!(t=e.u.a[String(t)]))return!0;t=t.concat();for(var i=!0,o=0;o<t.length;++o){var a=t[o];if(a&&!a.ua&&a.capture==n){var s=a.listener,u=a.Ta||a.src;a.Na&&rn(e.u,a),i=!1!==s.call(u,r)&&i}}return i&&!r.defaultPrevented}function Sn(e,t,n){if(v(e))n&&(e=E(e,n));else{if(!e||"function"!=typeof e.handleEvent)throw Error("Invalid listener argument");e=E(e.handleEvent,e)}return 2147483647<Number(t)?-1:c.setTimeout(e,t||0)}function In(e){var t=null;return new _t((function(n,r){-1==(t=Sn((function(){n(void 0)}),e))&&r(Error("Failed to schedule timer."))})).o((function(e){throw c.clearTimeout(t),e}))}function Cn(e){if(e.V&&"function"==typeof e.V)return e.V();if("string"===typeof e)return e.split("");if(d(e)){for(var t=[],n=e.length,r=0;r<n;r++)t.push(e[r]);return t}for(r in t=[],n=0,e)t[n++]=e[r];return t}function kn(e){if(e.X&&"function"==typeof e.X)return e.X();if(!e.V||"function"!=typeof e.V){if(d(e)||"string"===typeof e){var t=[];e=e.length;for(var n=0;n<e;n++)t.push(n);return t}for(var r in t=[],n=0,e)t[n++]=r;return t}}function xn(e,t){this.b={},this.a=[],this.c=0;var n=arguments.length;if(1<n){if(n%2)throw Error("Uneven number of arguments");for(var r=0;r<n;r+=2)this.set(arguments[r],arguments[r+1])}else if(e)if(e instanceof xn)for(n=e.X(),r=0;r<n.length;r++)this.set(n[r],e.get(n[r]));else for(r in e)this.set(r,e[r])}function On(e){if(e.c!=e.a.length){for(var t=0,n=0;t<e.a.length;){var r=e.a[t];Nn(e.b,r)&&(e.a[n++]=r),t++}e.a.length=n}if(e.c!=e.a.length){var i={};for(n=t=0;t<e.a.length;)Nn(i,r=e.a[t])||(e.a[n++]=r,i[r]=1),t++;e.a.length=n}}function Nn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}I(_n,qt),_n.prototype[Jt]=!0,_n.prototype.addEventListener=function(e,t,n,r){un(this,e,t,n,r)},_n.prototype.removeEventListener=function(e,t,n,r){hn(this,e,t,n,r)},_n.prototype.dispatchEvent=function(e){var t,n=this.eb;if(n)for(t=[];n;n=n.eb)t.push(n);n=this.Yb;var r=e.type||e;if("string"===typeof e)e=new $t(e,n);else if(e instanceof $t)e.target=e.target||n;else{var i=e;ye(e=new $t(r,n),i)}if(i=!0,t)for(var o=t.length-1;0<=o;o--){var a=e.b=t[o];i=Tn(a,r,!0,e)&&i}if(i=Tn(a=e.b=n,r,!0,e)&&i,i=Tn(a,r,!1,e)&&i,t)for(o=0;o<t.length;o++)i=Tn(a=e.b=t[o],r,!1,e)&&i;return i},_n.prototype.Ba=function(){if(_n.Za.Ba.call(this),this.u){var e,t=this.u;for(e in t.a){for(var n=t.a[e],r=0;r<n.length;r++)tn(n[r]);delete t.a[e],t.b--}}this.eb=null},(t=xn.prototype).V=function(){On(this);for(var e=[],t=0;t<this.a.length;t++)e.push(this.b[this.a[t]]);return e},t.X=function(){return On(this),this.a.concat()},t.clear=function(){this.b={},this.c=this.a.length=0},t.get=function(e,t){return Nn(this.b,e)?this.b[e]:t},t.set=function(e,t){Nn(this.b,e)||(this.c++,this.a.push(e)),this.b[e]=t},t.forEach=function(e,t){for(var n=this.X(),r=0;r<n.length;r++){var i=n[r],o=this.get(i);e.call(t,o,i,this)}};var An=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/\\#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function Pn(e,t){var n;this.b=this.i=this.f="",this.l=null,this.g=this.c="",this.h=!1,e instanceof Pn?(this.h=void 0!==t?t:e.h,Rn(this,e.f),this.i=e.i,this.b=e.b,Dn(this,e.l),this.c=e.c,Ln(this,er(e.a)),this.g=e.g):e&&(n=String(e).match(An))?(this.h=!!t,Rn(this,n[1]||"",!0),this.i=Vn(n[2]||""),this.b=Vn(n[3]||"",!0),Dn(this,n[4]),this.c=Vn(n[5]||"",!0),Ln(this,n[6]||"",!0),this.g=Vn(n[7]||"")):(this.h=!!t,this.a=new Qn(null,this.h))}function Rn(e,t,n){e.f=n?Vn(t,!0):t,e.f&&(e.f=e.f.replace(/:$/,""))}function Dn(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.l=t}else e.l=null}function Ln(e,t,n){t instanceof Qn?(e.a=t,function(e,t){t&&!e.f&&($n(e),e.c=null,e.a.forEach((function(e,t){var n=t.toLowerCase();t!=n&&(Xn(this,t),Zn(this,n,e))}),e)),e.f=t}(e.a,e.h)):(n||(t=qn(t,Gn)),e.a=new Qn(t,e.h))}function Mn(e,t,n){e.a.set(t,n)}function jn(e,t){return e.a.get(t)}function Fn(e){return e instanceof Pn?new Pn(e):new Pn(e,void 0)}function Un(e,t){var n=new Pn(null,void 0);return Rn(n,"https"),e&&(n.b=e),t&&(n.c=t),n}function Vn(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}
2function qn(e,t,n){return"string"===typeof e?(e=encodeURI(e).replace(t,Bn),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function Bn(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}Pn.prototype.toString=function(){var e=[],t=this.f;t&&e.push(qn(t,zn,!0),":");var n=this.b;return(n||"file"==t)&&(e.push("//"),(t=this.i)&&e.push(qn(t,zn,!0),"@"),e.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.l)&&e.push(":",String(n))),(n=this.c)&&(this.b&&"/"!=n.charAt(0)&&e.push("/"),e.push(qn(n,"/"==n.charAt(0)?Hn:Wn,!0))),(n=this.a.toString())&&e.push("?",n),(n=this.g)&&e.push("#",qn(n,Kn)),e.join("")},Pn.prototype.resolve=function(e){var t=new Pn(this),n=!!e.f;n?Rn(t,e.f):n=!!e.i,n?t.i=e.i:n=!!e.b,n?t.b=e.b:n=null!=e.l;var r=e.c;if(n)Dn(t,e.l);else if(n=!!e.c){if("/"!=r.charAt(0))if(this.b&&!this.c)r="/"+r;else{var i=t.c.lastIndexOf("/");-1!=i&&(r=t.c.substr(0,i+1)+r)}if(".."==(i=r)||"."==i)r="";else if(ue(i,"./")||ue(i,"/.")){r=0==i.lastIndexOf("/",0),i=i.split("/");for(var o=[],a=0;a<i.length;){var s=i[a++];"."==s?r&&a==i.length&&o.push(""):".."==s?((1<o.length||1==o.length&&""!=o[0])&&o.pop(),r&&a==i.length&&o.push("")):(o.push(s),r=!0)}r=o.join("/")}else r=i}return n?t.c=r:n=""!==e.a.toString(),n?Ln(t,er(e.a)):n=!!e.g,n&&(t.g=e.g),t};var zn=/[#\/\?@]/g,Wn=/[#\?:]/g,Hn=/[#\?]/g,Gn=/[#\?@]/g,Kn=/#/g;function Qn(e,t){this.b=this.a=null,this.c=e||null,this.f=!!t}function $n(e){e.a||(e.a=new xn,e.b=0,e.c&&function(e,t){if(e){e=e.split("&");for(var n=0;n<e.length;n++){var r=e[n].indexOf("="),i=null;if(0<=r){var o=e[n].substring(0,r);i=e[n].substring(r+1)}else o=e[n];t(o,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(e.c,(function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)})))}function Yn(e){var t=kn(e);if("undefined"==typeof t)throw Error("Keys are undefined");var n=new Qn(null,void 0);e=Cn(e);for(var r=0;r<t.length;r++){var i=t[r],o=e[r];Array.isArray(o)?Zn(n,i,o):n.add(i,o)}return n}function Xn(e,t){$n(e),t=tr(e,t),Nn(e.a.b,t)&&(e.c=null,e.b-=e.a.get(t).length,Nn((e=e.a).b,t)&&(delete e.b[t],e.c--,e.a.length>2*e.c&&On(e)))}function Jn(e,t){return $n(e),t=tr(e,t),Nn(e.a.b,t)}function Zn(e,t,n){Xn(e,t),0<n.length&&(e.c=null,e.a.set(tr(e,t),J(n)),e.b+=n.length)}function er(e){var t=new Qn;return t.c=e.c,e.a&&(t.a=new xn(e.a),t.b=e.b),t}function tr(e,t){return t=String(t),e.f&&(t=t.toLowerCase()),t}function nr(e){var t=[];return function e(t,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<n;a++)r.push(o),e(t,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)&&("function"!=typeof(a=n[i])&&(r.push(o),ar(i,r),r.push(":"),e(t,a,r),o=","));return void r.push("}")}n=n.valueOf()}switch(typeof n){case"string":ar(n,r);break;case"number":r.push(isFinite(n)&&!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 rr,e,t),t.join("")}function rr(){}(t=Qn.prototype).add=function(e,t){$n(this),this.c=null,e=tr(this,e);var n=this.a.get(e);return n||this.a.set(e,n=[]),n.push(t),this.b+=1,this},t.clear=function(){this.a=this.c=null,this.b=0},t.forEach=function(e,t){$n(this),this.a.forEach((function(n,r){W(n,(function(n){e.call(t,n,r,this)}),this)}),this)},t.X=function(){$n(this);for(var e=this.a.V(),t=this.a.X(),n=[],r=0;r<t.length;r++)for(var i=e[r],o=0;o<i.length;o++)n.push(t[r]);return n},t.V=function(e){$n(this);var t=[];if("string"===typeof e)Jn(this,e)&&(t=X(t,this.a.get(tr(this,e))));else{e=this.a.V();for(var n=0;n<e.length;n++)t=X(t,e[n])}return t},t.set=function(e,t){return $n(this),this.c=null,Jn(this,e=tr(this,e))&&(this.b-=this.a.get(e).length),this.a.set(e,[t]),this.b+=1,this},t.get=function(e,t){return e&&0<(e=this.V(e)).length?String(e[0]):t},t.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var e=[],t=this.a.X(),n=0;n<t.length;n++){var r=t[n],i=encodeURIComponent(String(r));r=this.V(r);for(var o=0;o<r.length;o++){var a=i;""!==r[o]&&(a+="="+encodeURIComponent(String(r[o]))),e.push(a)}}return this.c=e.join("&")};var ir={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\u000b"},or=/\uffff/.test("\uffff")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g;function ar(e,t){t.push('"',e.replace(or,(function(e){var t=ir[e];return t||(t="\\u"+(65536|e.charCodeAt(0)).toString(16).substr(1),ir[e]=t),t})),'"')}function sr(){var e=Cr();return Ke&&!!nt&&11==nt||/Edge\/\d+/.test(e)}function ur(){return c.window&&c.window.location.href||self&&self.location&&self.location.href||""}function cr(e,t){t=t||c.window;var n="about:blank";e&&(n=Pe(De(e))),t.location.href=n}function lr(e){return!!((e=(e||Cr()).toLowerCase()).match(/android/)||e.match(/webos/)||e.match(/iphone|ipad|ipod/)||e.match(/blackberry/)||e.match(/windows phone/)||e.match(/iemobile/))}function hr(e){e=e||c.window;try{e.close()}catch(t){}}function fr(e,t,n){var r=Math.floor(1e9*Math.random()).toString();t=t||500,n=n||600;
2var i=(window.screen.availHeight-n)/2,o=(window.screen.availWidth-t)/2;for(a in t={width:t,height:n,top:0<i?i:0,left:0<o?o:0,location:!0,resizable:!0,statusbar:!0,toolbar:!1},n=Cr().toLowerCase(),r&&(t.target=r,ue(n,"crios/")&&(t.target="_blank")),Tr(Cr())==wr&&(e=e||"http://localhost",t.scrollbars=!0),n=e||"",(e=t)||(e={}),r=window,t=n instanceof Ae?n:De("undefined"!=typeof n.href?n.href:String(n)),n=e.target||n.target,i=[],e)switch(a){case"width":case"height":case"top":case"left":i.push(a+"="+e[a]);break;case"target":case"noopener":case"noreferrer":break;default:i.push(a+"="+(e[a]?1:0))}var a=i.join(",");if((fe("iPhone")&&!fe("iPod")&&!fe("iPad")||fe("iPad")||fe("iPod"))&&r.navigator&&r.navigator.standalone&&n&&"_self"!=n?(me(a=ft(document,"A"),"HTMLAnchorElement"),t instanceof Ae||t instanceof Ae||(t="object"==typeof t&&t.ra?t.qa():String(t),Re.test(t)||(t="about:invalid#zClosurez"),t=new Ae(Me,t)),a.href=Pe(t),a.setAttribute("target",n),e.noreferrer&&a.setAttribute("rel","noreferrer"),(e=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,r,1),a.dispatchEvent(e),a={}):e.noreferrer?(a=r.open("",n,a),e=Pe(t),a&&($e&&ue(e,";")&&(e="'"+e.replace(/'/g,"%27")+"'"),a.opener=null,e=Ve('<meta name="referrer" content="no-referrer"><meta http-equiv="refresh" content="0; url='+ze(e)+'">'),r=a.document)&&(r.write(Fe(e)),r.close())):(a=r.open(Pe(t),n,a))&&e.noopener&&(a.opener=null),a)try{a.focus()}catch(s){}return a}var pr=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,dr=/^[^@]+@[^@]+$/;function vr(){var e=null;return new _t((function(t){"complete"==c.document.readyState?t():(e=function(){t()},ln(window,"load",e))})).o((function(t){throw hn(window,"load",e),t}))}function gr(e){return e=e||Cr(),!("file:"!==Ar()&&"ionic:"!==Ar()||!e.toLowerCase().match(/iphone|ipad|ipod|android/))}function yr(){var e=c.window;try{return!(!e||e==e.top)}catch(t){return!1}}function mr(){return"undefined"!==typeof c.WorkerGlobalScope&&"function"===typeof c.importScripts}function br(){return r.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":r.INTERNAL.hasOwnProperty("node")?"Node":mr()?"Worker":"Browser"}function _r(){var e=br();return"ReactNative"===e||"Node"===e}var wr="Firefox",Er="Chrome";function Tr(e){var t=e.toLowerCase();return ue(t,"opera/")||ue(t,"opr/")||ue(t,"opios/")?"Opera":ue(t,"iemobile")?"IEMobile":ue(t,"msie")||ue(t,"trident/")?"IE":ue(t,"edge/")?"Edge":ue(t,"firefox/")?wr:ue(t,"silk/")?"Silk":ue(t,"blackberry")?"Blackberry":ue(t,"webos")?"Webos":!ue(t,"safari/")||ue(t,"chrome/")||ue(t,"crios/")||ue(t,"android")?!ue(t,"chrome/")&&!ue(t,"crios/")||ue(t,"edge/")?ue(t,"android")?"Android":(e=e.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/))&&2==e.length?e[1]:"Other":Er:"Safari"}var Sr={jd:"FirebaseCore-web",ld:"FirebaseUI-web"};function Ir(e,t){t=t||[];var n,r=[],i={};for(n in Sr)i[Sr[n]]=!0;for(n=0;n<t.length;n++)"undefined"!==typeof i[t[n]]&&(delete i[t[n]],r.push(t[n]));return r.sort(),(t=r).length||(t=["FirebaseCore-web"]),"Browser"===(r=br())?r=Tr(i=Cr()):"Worker"===r&&(r=Tr(i=Cr())+"-"+r),r+"/JsCore/"+e+"/"+t.join(",")}function Cr(){return c.navigator&&c.navigator.userAgent||""}function kr(e,t){e=e.split("."),t=t||c;for(var n=0;n<e.length&&"object"==typeof t&&null!=t;n++)t=t[e[n]];return n!=e.length&&(t=void 0),t}function xr(){try{var e=c.localStorage,t=Mr();if(e)return e.setItem(t,"1"),e.removeItem(t),!sr()||!!c.indexedDB}catch(n){return mr()&&!!c.indexedDB}return!1}function Or(){return(Nr()||"chrome-extension:"===Ar()||gr())&&!_r()&&xr()&&!mr()}function Nr(){return"http:"===Ar()||"https:"===Ar()}function Ar(){return c.location&&c.location.protocol||null}function Pr(e){return!lr(e=e||Cr())&&Tr(e)!=wr}function Rr(e){return"undefined"===typeof e?null:nr(e)}function Dr(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&null!==e[t]&&void 0!==e[t]&&(n[t]=e[t]);return n}function Lr(e){if(null!==e)return JSON.parse(e)}function Mr(e){return e||Math.floor(1e9*Math.random()).toString()}function jr(e){return"Safari"!=Tr(e=e||Cr())&&!e.toLowerCase().match(/iphone|ipad|ipod/)}function Fr(){var e=c.___jsl;if(e&&e.H)for(var t in e.H)if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=e.H[t].L.concat(),e.CP)for(var n=0;n<e.CP.length;n++)e.CP[n]=null}function Ur(e,t){if(e>
2t)throw Error("Short delay should be less than long delay!");this.a=e,this.c=t,e=Cr(),t=br(),this.b=lr(e)||"ReactNative"===t}function Vr(){var e=c.document;return!e||"undefined"===typeof e.visibilityState||"visible"==e.visibilityState}function qr(e){try{var t=new Date(parseInt(e,10));if(!isNaN(t.getTime())&&!/[^0-9]/.test(e))return t.toUTCString()}catch(n){}return null}function Br(){return!(!kr("fireauth.oauthhelper",c)&&!kr("fireauth.iframe",c))}Ur.prototype.get=function(){var e=c.navigator;return!e||"boolean"!==typeof e.onLine||!Nr()&&"chrome-extension:"!==Ar()&&"undefined"===typeof e.connection||e.onLine?this.b?this.c:this.a:Math.min(5e3,this.a)};var zr,Wr={};function Hr(e){Wr[e]||(Wr[e]=!0,"undefined"!==typeof console&&"function"===typeof console.warn&&console.warn(e))}try{var Gr={};Object.defineProperty(Gr,"abcd",{configurable:!0,enumerable:!0,value:1}),Object.defineProperty(Gr,"abcd",{configurable:!0,enumerable:!0,value:2}),zr=2==Gr.abcd}catch(aa){zr=!1}function Kr(e,t,n){zr?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,value:n}):e[t]=n}function Qr(e,t){if(t)for(var n in t)t.hasOwnProperty(n)&&Kr(e,n,t[n])}function $r(e){var t={};return Qr(t,e),t}function Yr(e){var t=e;if("object"==typeof e&&null!=e)for(var n in t="length"in e?[]:{},e)Kr(t,n,Yr(e[n]));return t}function Xr(e){var t=e&&(e[ni]?"phone":null);if(!(t&&e&&e[ti]))throw new C("internal-error","Internal assert: invalid MultiFactorInfo object");Kr(this,"uid",e[ti]),Kr(this,"displayName",e[Zr]||null);var n=null;e[ei]&&(n=new Date(e[ei]).toUTCString()),Kr(this,"enrollmentTime",n),Kr(this,"factorId",t)}function Jr(e){try{var t=new ri(e)}catch(n){t=null}return t}Xr.prototype.v=function(){return{uid:this.uid,displayName:this.displayName,factorId:this.factorId,enrollmentTime:this.enrollmentTime}};var Zr="displayName",ei="enrolledAt",ti="mfaEnrollmentId",ni="phoneInfo";function ri(e){Xr.call(this,e),Kr(this,"phoneNumber",e[ni])}function ii(e){var t={},n=e[ui],r=e[li],i=e[hi];if(e=Jr(e[ci]),!i||i!=ai&&i!=si&&!n||i==si&&!r||i==oi&&!e)throw Error("Invalid checkActionCode response!");i==si?(t[pi]=n||null,t[vi]=n||null,t[fi]=r):(t[pi]=r||null,t[vi]=r||null,t[fi]=n||null),t[di]=e||null,Kr(this,yi,i),Kr(this,gi,Yr(t))}I(ri,Xr),ri.prototype.v=function(){var e=ri.Za.v.call(this);return e.phoneNumber=this.phoneNumber,e};var oi="REVERT_SECOND_FACTOR_ADDITION",ai="EMAIL_SIGNIN",si="VERIFY_AND_CHANGE_EMAIL",ui="email",ci="mfaInfo",li="newEmail",hi="requestType",fi="email",pi="fromEmail",di="multiFactorInfo",vi="previousEmail",gi="data",yi="operation";function mi(e){var t=jn(e=Fn(e),bi)||null,n=jn(e,_i)||null,r=jn(e,Ti)||null;if(r=r&&Ii[r]||null,!t||!n||!r)throw new C("argument-error",bi+", "+_i+"and "+Ti+" are required in a valid action code URL.");Qr(this,{apiKey:t,operation:r,code:n,continueUrl:jn(e,wi)||null,languageCode:jn(e,Ei)||null,tenantId:jn(e,Si)||null})}var bi="apiKey",_i="oobCode",wi="continueUrl",Ei="languageCode",Ti="mode",Si="tenantId",Ii={recoverEmail:"RECOVER_EMAIL",resetPassword:"PASSWORD_RESET",revertSecondFactorAddition:oi,signIn:ai,verifyAndChangeEmail:si,verifyEmail:"VERIFY_EMAIL"};function Ci(e){try{return new mi(e)}catch(t){return null}}function ki(e){var t=e[Pi];if("undefined"===typeof t)throw new C("missing-continue-uri");if("string"!==typeof t||"string"===typeof t&&!t.length)throw new C("invalid-continue-uri");this.h=t,this.b=this.a=null,this.g=!1;var n=e[xi];if(n&&"object"===typeof n){t=n[Li];var r=n[Ri];if(n=n[Di],"string"===typeof t&&t.length){if(this.a=t,"undefined"!==typeof r&&"boolean"!==typeof r)throw new C("argument-error",Ri+" property must be a boolean when specified.");if(this.g=!!r,"undefined"!==typeof n&&("string"!==typeof n||"string"===typeof n&&!n.length))throw new C("argument-error",Di+" property must be a non empty string when specified.");this.b=n||null}else{if("undefined"!==typeof t)throw new C("argument-error",Li+" property must be a non empty string when specified.");if("undefined"!==typeof r||"undefined"!==typeof n)throw new C("missing-android-pkg-name")}}else if("undefined"!==typeof n)throw new C("argument-error",xi+" property must be a non null object when specified.");if(this.f=null,(t=e[Ai])&&"object"===typeof t){if("string"===typeof(t=t[Mi])&&t.length)this.f=t;else if("undefined"!==typeof t)throw new C("argument-error",Mi+" property must be a non empty string when specified.")}else if("undefined"!==typeof t)throw new C("argument-error",Ai+" property must be a non null object when specified.");if("undefined"!==typeof(t=e[Ni])&&"boolean"!==typeof t)throw new C("argument-error",Ni+" property must be a boolean when specified.");if(this.c=!!t,"undefined"!==typeof(e=e[Oi])&&("string"!==typeof e||"string"===typeof e&&!e.length))throw new C("argument-error",Oi+" property must be a non empty string when specified.");this.i=e||null}var xi="android",Oi="dynamicLinkDomain",Ni="handleCodeInApp",Ai="iOS",Pi="url",Ri="installApp",Di="minimumVersion",Li="packageName",Mi="bundleId";function ji(e){var t={};for(var n in t.continueUrl=e.h,t.canHandleCodeInApp=e.c,(t.androidPackageName=e.a)&&(t.androidMinimumVersion=e.b,t.androidInstallApp=e.g),t.iOSBundleId=e.f,t.dynamicLinkDomain=e.i,t)null===t[n]&&delete t[n];return t}var Fi=null;function Ui(e){var t="";return function(e,t){function n(t){for(;r<e.length;){var n=e.charAt(r++),i=Fi[n];if(null!=i)return i;if(!/^[\s\xa0]*$/.test(n))throw Error("Unknown base64 encoding at char: "+n)}return t}!function(){if(!Fi){Fi={};for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),t=["+/=","+/","-_=","-_.","-_"],n=0;5>n;n++)for(var r=e.concat(t[n].split("")),i=0;i<r.length;i++){var o=r[i];void 0===Fi[o]&&(Fi[o]=i)}}}();for(var r=0;;){var i=n(-1),o=n(0),a=n(64),s=n(64);if(64===s&&-1===i)break;t(i<<2|o>>4),64!=a&&(t(o<<4&240|a>>2),64!=s&&t(a<<6&192|s))}}(e,(function(e){t+=String.fromCharCode(e)})),t}function Vi(e){var t=Bi(e);if(!(t&&t.sub&&t.iss&&t.aud&&t.exp))throw Error("Invalid JWT");this.g=e,this.c=t.exp,this.h=t.sub,S(),this.a=t.provider_id||t.firebase&&t.firebase.sign_in_provider||null,this.f=t.firebase&&t.firebase.tenant||null,this.b=!!t.is_anonymous||"anonymous"==this.a}function qi(e){try{return new Vi(e)}catch(t){return null}}function Bi(e){if(!e)return null;if(3!=(e=e.split(".")).length)return null;for(var t=(4-(e=e[1]).length%4)%4,n=0;n<t;n++)e+=".";try{return JSON.parse(Ui(e))}catch(r){}return null}Vi.prototype.S=function(){return this.f},Vi.prototype.i=function(){return this.b},Vi.prototype.toString=function(){return this.g};var zi="oauth_consumer_key oauth_nonce oauth_signature oauth_signature_method oauth_timestamp oauth_token oauth_version".split(" "),Wi=["client_id","response_type","scope","redirect_uri","state"],Hi={kd:{Ha:"locale",ta:700,sa:600,ea:"facebook.com",Va:Wi},md:{Ha:null,ta:500,sa:750,ea:"github.com",Va:Wi},nd:{Ha:"hl",ta:515,sa:680,ea:"google.com",Va:Wi},td:{Ha:"lang",ta:485,sa:705,ea:"twitter.com",Va:zi},gd:{Ha:"locale",ta:640,sa:600,ea:"apple.com",Va:[]}};function Gi(e){for(var t in Hi)if(Hi[t].ea==e)return Hi[t];return null}function Ki(e){var t={};t["facebook.com"]=Ji,t["google.com"]=eo,t["github.com"]=Zi,t["twitter.com"]=to;var n=e&&e[$i];try{if(n)return t[n]?new t[n](e):new Xi(e);if("undefined"!==typeof e[Qi])return new Yi(e)}catch(r){}return null}var Qi="idToken",$i="providerId";function Yi(e){var t=e[$i];if(!t&&e[Qi]){var n=qi(e[Qi]);n&&n.a&&(t=n.a)}if(!t)throw Error("Invalid additional user info!");"anonymous"!=t&&"custom"!=t||(t=null),n=!1,"undefined"!==typeof e.isNewUser?n=!!e.isNewUser:"identitytoolkit#SignupNewUserResponse"===e.kind&&(n=!0),Kr(this,"providerId",t),Kr(this,"isNewUser",n)}function Xi(e){Yi.call(this,e),Kr(this,"profile",Yr((e=Lr(e.rawUserInfo||"{}"))||{}))}function Ji(e){if(Xi.call(this,e),"facebook.com"!=this.providerId)throw Error("Invalid provider ID!")}function Zi(e){if(Xi.call(this,e),"github.com"!=this.providerId)throw Error("Invalid provider ID!");Kr(this,"username",this.profile&&this.profile.login||null)}function eo(e){if(Xi.call(this,e),"google.com"!=this.providerId)throw Error("Invalid provider ID!")}function to(e){if(Xi.call(this,e),"twitter.com"!=this.providerId)throw Error("Invalid provider ID!");Kr(this,"username",e.screenName||null)}function no(e){var t=Fn(e),n=jn(t,"link"),r=jn(Fn(n),"link");return t=jn(t,"deep_link_id"),jn(Fn(t),"link")||t||r||n||e}function ro(e,t){if(!e&&!t)throw new C("internal-error","Internal assert: no raw session string available");if(e&&t)throw new C("internal-error","Internal assert: unable to determine the session type");this.a=e||null,this.b=t||null,this.type=this.a?io:oo}I(Xi,Yi),I(Ji,Xi),I(Zi,Xi),I(eo,Xi),I(to,Xi);var io="enroll",oo="signin";function ao(){}function so(e,t){return e.then((function(e){if(e[Ya]){var n=qi(e[Ya]);if(!n||t!=n.h)throw new C("user-mismatch");return e}throw new C("user-mismatch")})).o((function(e){throw e&&e.code&&e.code==O+"user-not-found"?new C("user-mismatch"):e}))}function uo(e,t){if(!t)throw new C("internal-error","failed to construct a credential");this.a=t,Kr(this,"providerId",e),Kr(this,"signInMethod",e)}function co(e){return{pendingToken:e.a,requestUri:"http://localhost"}}function lo(e){if(e&&e.providerId&&e.signInMethod&&0==e.providerId.indexOf("saml.")&&e.pendingToken)try{return new uo(e.providerId,e.pendingToken)}catch(t){}return null}
2function ho(e,t,n){if(this.a=null,t.idToken||t.accessToken)t.idToken&&Kr(this,"idToken",t.idToken),t.accessToken&&Kr(this,"accessToken",t.accessToken),t.nonce&&!t.pendingToken&&Kr(this,"nonce",t.nonce),t.pendingToken&&(this.a=t.pendingToken);else{if(!t.oauthToken||!t.oauthTokenSecret)throw new C("internal-error","failed to construct a credential");Kr(this,"accessToken",t.oauthToken),Kr(this,"secret",t.oauthTokenSecret)}Kr(this,"providerId",e),Kr(this,"signInMethod",n)}function fo(e){var t={};return e.idToken&&(t.id_token=e.idToken),e.accessToken&&(t.access_token=e.accessToken),e.secret&&(t.oauth_token_secret=e.secret),t.providerId=e.providerId,e.nonce&&!e.a&&(t.nonce=e.nonce),t={postBody:Yn(t).toString(),requestUri:"http://localhost"},e.a&&(delete t.postBody,t.pendingToken=e.a),t}function po(e){if(e&&e.providerId&&e.signInMethod){var t={idToken:e.oauthIdToken,accessToken:e.oauthTokenSecret?null:e.oauthAccessToken,oauthTokenSecret:e.oauthTokenSecret,oauthToken:e.oauthTokenSecret&&e.oauthAccessToken,nonce:e.nonce,pendingToken:e.pendingToken};try{return new ho(e.providerId,t,e.signInMethod)}catch(n){}}return null}function vo(e,t){this.Oc=t||[],Qr(this,{providerId:e,isOAuthProvider:!0}),this.Fb={},this.lb=(Gi(e)||{}).Ha||null,this.kb=null}function go(e){if("string"!==typeof e||0!=e.indexOf("saml."))throw new C("argument-error",'SAML provider IDs must be prefixed with "saml."');vo.call(this,e,[])}function yo(e){vo.call(this,e,Wi),this.a=[]}function mo(){yo.call(this,"facebook.com")}function bo(e){if(!e)throw new C("argument-error","credential failed: expected 1 argument (the OAuth access token).");var t=e;return g(e)&&(t=e.accessToken),(new mo).credential({accessToken:t})}function _o(){yo.call(this,"github.com")}function wo(e){if(!e)throw new C("argument-error","credential failed: expected 1 argument (the OAuth access token).");var t=e;return g(e)&&(t=e.accessToken),(new _o).credential({accessToken:t})}function Eo(){yo.call(this,"google.com"),this.Aa("profile")}function To(e,t){var n=e;return g(e)&&(n=e.idToken,t=e.accessToken),(new Eo).credential({idToken:n,accessToken:t})}function So(){vo.call(this,"twitter.com",zi)}function Io(e,t){var n=e;if(g(n)||(n={oauthToken:e,oauthTokenSecret:t}),!n.oauthToken||!n.oauthTokenSecret)throw new C("argument-error","credential failed: expected 2 arguments (the OAuth access token and secret).");return new ho("twitter.com",n,"twitter.com")}function Co(e,t,n){this.a=e,this.f=t,Kr(this,"providerId","password"),Kr(this,"signInMethod",n===xo.EMAIL_LINK_SIGN_IN_METHOD?xo.EMAIL_LINK_SIGN_IN_METHOD:xo.EMAIL_PASSWORD_SIGN_IN_METHOD)}function ko(e){return e&&e.email&&e.password?new Co(e.email,e.password,e.signInMethod):null}function xo(){Qr(this,{providerId:"password",isOAuthProvider:!1})}function Oo(e,t){if(!(t=No(t)))throw new C("argument-error","Invalid email link!");return new Co(e,t.code,xo.EMAIL_LINK_SIGN_IN_METHOD)}function No(e){return(e=Ci(e=no(e)))&&e.operation===ai?e:null}function Ao(e){if(!(e.bb&&e.ab||e.Ja&&e.da))throw new C("internal-error");this.a=e,Kr(this,"providerId","phone"),this.ea="phone",Kr(this,"signInMethod","phone")}function Po(e){if(e&&"phone"===e.providerId&&(e.verificationId&&e.verificationCode||e.temporaryProof&&e.phoneNumber)){var t={};return W(["verificationId","verificationCode","temporaryProof","phoneNumber"],(function(n){e[n]&&(t[n]=e[n])})),new Ao(t)}return null}function Ro(e){return e.a.Ja&&e.a.da?{temporaryProof:e.a.Ja,phoneNumber:e.a.da}:{sessionInfo:e.a.bb,code:e.a.ab}}function Do(e){try{this.a=e||r.auth()}catch(t){throw new C("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().")}Qr(this,{providerId:"phone",isOAuthProvider:!1})}function Lo(e,t){if(!e)throw new C("missing-verification-id");if(!t)throw new C("missing-verification-code");return new Ao({bb:e,ab:t})}function Mo(e){if(e.temporaryProof&&e.phoneNumber)return new Ao({Ja:e.temporaryProof,da:e.phoneNumber});var t=e&&e.providerId;if(!t||"password"===t)return null;var n=e&&e.oauthAccessToken,r=e&&e.oauthTokenSecret,i=e&&e.nonce,o=e&&e.oauthIdToken,a=e&&e.pendingToken;try{switch(t){case"google.com":return To(o,n);case"facebook.com":return bo(n);case"github.com":return wo(n);case"twitter.com":return Io(n,r);default:return n||r||o||a?a?0==t.indexOf("saml.")?new uo(t,a):new ho(t,{pendingToken:a,idToken:e.oauthIdToken,accessToken:e.oauthAccessToken},t):new yo(t).credential({idToken:o,accessToken:n,rawNonce:i}):null}}catch(s){return null}}function jo(e){if(!e.isOAuthProvider)throw new C("invalid-oauth-provider")}function Fo(e,t,n,r,i,o,a){if(this.c=e,this.b=t||null,this.g=n||null,this.f=r||null,this.i=o||null,this.h=a||null,this.a=i||null,!this.g&&!this.a)throw new C("invalid-auth-event");
2if(this.g&&this.a)throw new C("invalid-auth-event");if(this.g&&!this.f)throw new C("invalid-auth-event")}function Uo(e){return(e=e||{}).type?new Fo(e.type,e.eventId,e.urlResponse,e.sessionId,e.error&&k(e.error),e.postBody,e.tenantId):null}function Vo(){this.b=null,this.a=[]}ro.prototype.Fa=function(){return this.a?kt(this.a):kt(this.b)},ro.prototype.v=function(){return this.type==io?{multiFactorSession:{idToken:this.a}}:{multiFactorSession:{pendingCredential:this.b}}},ao.prototype.ia=function(){},ao.prototype.b=function(){},ao.prototype.c=function(){},ao.prototype.v=function(){},uo.prototype.ia=function(e){return gs(e,co(this))},uo.prototype.b=function(e,t){var n=co(this);return n.idToken=t,ys(e,n)},uo.prototype.c=function(e,t){return so(ms(e,co(this)),t)},uo.prototype.v=function(){return{providerId:this.providerId,signInMethod:this.signInMethod,pendingToken:this.a}},ho.prototype.ia=function(e){return gs(e,fo(this))},ho.prototype.b=function(e,t){var n=fo(this);return n.idToken=t,ys(e,n)},ho.prototype.c=function(e,t){return so(ms(e,fo(this)),t)},ho.prototype.v=function(){var e={providerId:this.providerId,sign
2InMethod:this.signInMethod};return this.idToken&&(e.oauthIdToken=this.idToken),this.accessToken&&(e.oauthAccessToken=this.accessToken),this.secret&&(e.oauthTokenSecret=this.secret),this.nonce&&(e.nonce=this.nonce),this.a&&(e.pendingToken=this.a),e},vo.prototype.Ia=function(e){return this.Fb=ve(e),this},I(go,vo),I(yo,vo),yo.prototype.Aa=function(e){return Q(this.a,e)||this.a.push(e),this},yo.prototype.Nb=function(){return J(this.a)},yo.prototype.credential=function(e,t){var n;if(!(n=g(e)?{idToken:e.idToken||null,accessToken:e.accessToken||null,nonce:e.rawNonce||null}:{idToken:e||null,accessToken:t||null}).idToken&&!n.accessToken)throw new C("argument-error","credential failed: must provide the ID token and/or the access token.");return new ho(this.providerId,n,this.providerId)},I(mo,yo),Kr(mo,"PROVIDER_ID","facebook.com"),Kr(mo,"FACEBOOK_SIGN_IN_METHOD","facebook.com"),I(_o,yo),Kr(_o,"PROVIDER_ID","github.com"),Kr(_o,"GITHUB_SIGN_IN_METHOD","github.com"),I(Eo,yo),Kr(Eo,"PROVIDER_ID","google.com"),Kr(Eo,"GOOGLE_SIGN_IN_METHOD","google.com"),I(So,vo),Kr(So,"PROVIDER_ID","twitter.com"),Kr(So,"TWITTER_SIGN_IN_METHOD","twitter.com"),Co.prototype.ia=function(e){return this.signInMethod==xo.EMAIL_LINK_SIGN_IN_METHOD?Zs(e,Cs,{email:this.a,oobCode:this.f}):Zs(e,Qs,{email:this.a,password:this.f})},Co.prototype.b=function(e,t){return this.signInMethod==xo.EMAIL_LINK_SIGN_IN_METHOD?Zs(e,ks,{idToken:t,email:this.a,oobCode:this.f}):Zs(e,Vs,{idToken:t,email:this.a,password:this.f})},Co.prototype.c=function(e,t){return so(this.ia(e),t)},Co.prototype.v=function(){return{email:this.a,password:this.f,signInMethod:this.signInMethod}},Qr(xo,{PROVIDER_ID:"password"}),Qr(xo,{EMAIL_LINK_SIGN_IN_METHOD:"emailLink"}),Qr(xo,{EMAIL_PASSWORD_SIGN_IN_METHOD:"password"}),Ao.prototype.ia=function(e){return e.cb(Ro(this))},Ao.prototype.b=function(e,t){var n=Ro(this);return n.idToken=t,Zs(e,Ys,n)},Ao.prototype.c=function(e,t){var n=Ro(this);return n.operation="REAUTH",so(e=Zs(e,Xs,n),t)},Ao.prototype.v=function(){var e={providerId:"phone"};return this.a.bb&&(e.verificationId=this.a.bb),this.a.ab&&(e.verificationCode=this.a.ab),this.a.Ja&&(e.temporaryProof=this.a.Ja),this.a.da&&(e.phoneNumber=this.a.da),e},Do.prototype.cb=function(e,t){var n=this.a.b;return kt(t.verify()).then((function(r){if("string"!==typeof r)throw new C("argument-error","An implementation of firebase.auth.ApplicationVerifier.prototype.verify() must return a firebase.Promise that resolves with a string.");switch(t.type){case"recaptcha":var i=g(e)?e.session:null,o=g(e)?e.phoneNumber:e;return(i&&i.type==io?i.Fa().then((function(e){return function(e,t){return Zs(e,Bs,t).then((function(e){return e.phoneSessionInfo.sessionInfo}))}(n,{idToken:e,phoneEnrollmentInfo:{phoneNumber:o,recaptchaToken:r}})})):i&&i.type==oo?i.Fa().then((function(t){return function(e,t){return Zs(e,zs,t).then((function(e){return e.phoneResponseInfo.sessionInfo}))}(n,{mfaPendingCredential:t,mfaEnrollmentId:e.multiFactorHint&&e.multiFactorHint.uid||e.multiFactorUid,phoneSignInInfo:{recaptchaToken:r}})})):function(e,t){return Zs(e,Fs,t)}(n,{phoneNumber:o,recaptchaToken:r})).then((function(e){return"function"===typeof t.reset&&t.reset(),e}),(function(e){throw"function"===typeof t.reset&&t.reset(),e}));default:throw new C("argument-error",'Only firebase.auth.ApplicationVerifiers with type="recaptcha" are currently supported.')}}))},Qr(Do,{PROVIDER_ID:"phone"}),Qr(Do,{PHONE_SIGN_IN_METHOD:"phone"}),Fo.prototype.getUid=function(){var e=[];return e.push(this.c),this.b&&e.push(this.b),this.f&&e.push(this.f),this.h&&e.push(this.h),e.join("-")},Fo.prototype.S=function(){return this.h},Fo.prototype.v=function(){return{type:this.c,eventId:this.b,urlResponse:this.g,sessionId:this.f,postBody:this.i,tenantId:this.h,error:this.a&&this.a.v()}};var qo,Bo=null;function zo(e){var t="unauthorized-domain",n=void 0,r=Fn(e);e=r.b,"chrome-extension"==(r=r.f)?n=Be("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 -> Auth section -> Sign in method tab.",e):"http"==r||"https"==r?n=Be("This domain (%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",e):t="operation-not-supported-in-this-environment",C.call(this,t,n)}function Wo(e,t,n){C.call(this,e,n),(e=t||{}).Gb&&Kr(this,"email",e.Gb),e.da&&Kr(this,"phoneNumber",e.da),e.credential&&Kr(this,"credential",e.credential),e.Wb&&Kr(this,"tenantId",e.Wb)}function Ho(e){if(e.code){var t=e.code||"";
20==t.indexOf(O)&&(t=t.substring(O.length));var n={credential:Mo(e),Wb:e.tenantId};if(e.email)n.Gb=e.email;else if(e.phoneNumber)n.da=e.phoneNumber;else if(!n.credential)return new C(t,e.message||void 0);return new Wo(t,n,e.message)}return null}function Go(){}function Ko(e){return e.c||(e.c=e.b())}function Qo(){}function $o(e){if(!e.f&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var t=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],n=0;n<t.length;n++){var r=t[n];try{return new ActiveXObject(r),e.f=r}catch(i){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return e.f}function Yo(){}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=E(this.oc,this),this.a.onerror=E(this.Pb,this),this.a.onprogress=E(this.pc,this),this.a.ontimeout=E(this.tc,this)}function Jo(e,t){e.readyState=t,e.onreadystatechange&&e.onreadystatechange()}function Zo(e,t,n){this.reset(e,t,n,void 0,void 0)}I(zo,C),I(Wo,C),Wo.prototype.v=function(){var e={code:this.code,message:this.message};this.email&&(e.email=this.email),this.phoneNumber&&(e.phoneNumber=this.phoneNumber),this.tenantId&&(e.tenantId=this.tenantId);var t=this.credential&&this.credential.v();return t&&ye(e,t),e},Wo.prototype.toJSON=function(){return this.v()},Go.prototype.c=null,I(Qo,Go),Qo.prototype.a=function(){var e=$o(this);return e?new ActiveXObject(e):new XMLHttpRequest},Qo.prototype.b=function(){var e={};return $o(this)&&(e[0]=!0,e[1]=!0),e},qo=new Qo,I(Yo,Go),Yo.prototype.a=function(){var e=new XMLHttpRequest;if("withCredentials"in e)return e;if("undefined"!=typeof XDomainRequest)return new Xo;throw Error("Unsupported browser")},Yo.prototype.b=function(){return{}},(t=Xo.prototype).open=function(e,t,n){if(null!=n&&!n)throw Error("Only async requests are supported.");this.a.open(e,t)},t.send=function(e){if(e){if("string"!=typeof e)throw Error("Only string data is supported");this.a.send(e)}else this.a.send()},t.abort=function(){this.a.abort()},t.setRequestHeader=function(){},t.getResponseHeader=function(e){return"content-type"==e.toLowerCase()?this.a.contentType:""},t.oc=function(){this.status=200,this.response=this.responseText=this.a.responseText,Jo(this,4)},t.Pb=function(){this.status=500,this.response=this.responseText="",Jo(this,4)},t.tc=function(){this.Pb()},t.pc=function(){this.status=200,Jo(this,1)},t.getAllResponseHeaders=function(){return"content-type: "+this.a.contentType},Zo.prototype.a=null;function ea(e){this.f=e,this.b=this.c=this.a=null}function ta(e,t){this.name=e,this.value=t}Zo.prototype.reset=function(e,t,n,r,i){"number"==typeof i||0,r||S(),delete this.a},ta.prototype.toString=function(){return this.name};var na=new ta("SEVERE",1e3),ra=new ta("WARNING",900),ia=new ta("CONFIG",700),oa=new ta("FINE",500);ea.prototype.log=function(e,t,n){if(e.value>=function e(t){return t.c?t.c:t.a?e(t.a):(M("Root logger has no level set."),null)}(this).value)for(v(t)&&(t=t()),e=new Zo(e,String(t),this.f),n&&(e.a=n),n=this;n;)n=n.a};var aa,sa={},ua=null;function ca(e){var t;if(ua||(ua=new ea(""),sa[""]=ua,ua.c=ia),!(t=sa[e])){t=new ea(e);var n=e.lastIndexOf("."),r=e.substr(n+1);(n=ca(e.substr(0,n))).b||(n.b={}),n.b[r]=t,t.a=n,sa[e]=t}return t}function la(e,t){e&&e.log(oa,t,void 0)}function ha(e){this.f=e}function fa(e){_n.call(this),this.s=e,this.readyState=pa,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=ca("goog.net.FetchXmlHttp"),this.l=this.c=this.f=null}I(ha,Go),ha.prototype.a=function(){return new fa(this.f)},ha.prototype.b=(aa={},function(){return aa}),I(fa,_n);var pa=0;function da(e){e.c.read().then(e.nc.bind(e)).catch(e.Sa.bind(e))}function va(e,t){t&&e.f&&(e.status=e.f.status,e.statusText=e.f.statusText),e.readyState=4,e.f=null,e.c=null,e.l=null,ga(e)}function ga(e){e.onreadystatechange&&e.onreadystatechange.call(e)}function ya(e){_n.call(this),this.headers=new xn,this.D=e||null,this.c=!1,this.B=this.a=null,this.h=this.P=this.l="",this.f=this.O=this.i=this.N=!1,this.g=0,this.s=null,this.m=ma,this.w=this.R=!1}(t=fa.prototype).open=function(e,t){if(this.readyState!=pa)throw this.abort(),Error("Error reopening a connection");this.m=e,this.g=t,this.readyState=1,ga(this)},t.send=function(e){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.a=!0;var t={headers:this.i,method:this.m,credentials:void 0,cache:void 0};
2e&&(t.body=e),this.s.fetch(new Request(this.g,t)).then(this.sc.bind(this),this.Sa.bind(this))},t.abort=function(){this.response=this.responseText="",this.i=new Headers,this.status=0,this.c&&this.c.cancel("Request was aborted."),1<=this.readyState&&this.a&&4!=this.readyState&&(this.a=!1,va(this,!1)),this.readyState=pa},t.sc=function(e){this.a&&(this.f=e,this.b||(this.b=e.headers,this.readyState=2,ga(this)),this.a&&(this.readyState=3,ga(this),this.a&&("arraybuffer"===this.responseType?e.arrayBuffer().then(this.qc.bind(this),this.Sa.bind(this)):"undefined"!==typeof c.ReadableStream&&"body"in e?(this.response=this.responseText="",this.c=e.body.getReader(),this.l=new TextDecoder,da(this)):e.text().then(this.rc.bind(this),this.Sa.bind(this)))))},t.nc=function(e){if(this.a){var t=this.l.decode(e.value?e.value:new Uint8Array(0),{stream:!e.done});t&&(this.response=this.responseText+=t),e.done?va(this,!0):ga(this),3==this.readyState&&da(this)}},t.rc=function(e){this.a&&(this.response=this.responseText=e,va(this,!0))},t.qc=function(e){this.a&&(this.response=e,va(this,!0))},t.Sa=function(e){var t=this.h;t&&t.log(ra,"Failed to fetch url "+this.g,e instanceof Error?e:Error(e)),this.a&&va(this,!0)},t.setRequestHeader=function(e,t){this.i.append(e,t)},t.getResponseHeader=function(e){return this.b?this.b.get(e.toLowerCase())||"":((e=this.h)&&e.log(ra,"Attempting to get response header but no headers have been received for url: "+this.g,void 0),"")},t.getAllResponseHeaders=function(){if(!this.b){var e=this.h;return e&&e.log(ra,"Attempting to get all response headers but no headers have been received for url: "+this.g,void 0),""}e=[];for(var t=this.b.entries(),n=t.next();!n.done;)n=n.value,e.push(n[0]+": "+n[1]),n=t.next();return e.join("\r\n")},I(ya,_n);var ma="";ya.prototype.b=ca("goog.net.XhrIo");var ba=/^https?$/i,_a=["POST","PUT"];function wa(e,t,n,r,i){if(e.a)throw Error("[goog.net.XhrIo] Object is active with another request="+e.l+"; newUri="+t);n=n?n.toUpperCase():"GET",e.l=t,e.h="",e.P=n,e.N=!1,e.c=!0,e.a=e.D?e.D.a():qo.a(),e.B=e.D?Ko(e.D):Ko(qo),e.a.onreadystatechange=E(e.Sb,e);try{la(e.b,Na(e,"Opening Xhr")),e.O=!0,e.a.open(n,String(t),!0),e.O=!1}catch(a){return la(e.b,Na(e,"Error opening Xhr: "+a.message)),void Ta(e,a)}t=r||"";var o=new xn(e.headers);i&&function(e,t){if(e.forEach&&"function"==typeof e.forEach)e.forEach(t,void 0);else if(d(e)||"string"===typeof e)W(e,t,void 0);else for(var n=kn(e),r=Cn(e),i=r.length,o=0;o<i;o++)t.call(void 0,r[o],n&&n[o],e)}(i,(function(e,t){o.set(t,e)})),i=function(e){e:{for(var t=Ea,n=e.length,r="string"===typeof e?e.split(""):e,i=0;i<n;i++)if(i in r&&t.call(void 0,r[i],i,e)){t=i;break e}t=-1}return 0>t?null:"string"===typeof e?e.charAt(t):e[t]}(o.X()),r=c.FormData&&t instanceof c.FormData,!Q(_a,n)||i||r||o.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),o.forEach((function(e,t){this.a.setRequestHeader(t,e)}),e),e.m&&(e.a.responseType=e.m),"withCredentials"in e.a&&e.a.withCredentials!==e.R&&(e.a.withCredentials=e.R);try{ka(e),0<e.g&&(e.w=function(e){return Ke&&it(9)&&"number"===typeof e.timeout&&void 0!==e.ontimeout}(e.a),la(e.b,Na(e,"Will abort after "+e.g+"ms if incomplete, xhr2 "+e.w)),e.w?(e.a.timeout=e.g,e.a.ontimeout=E(e.Ka,e)):e.s=Sn(e.Ka,e.g,e)),la(e.b,Na(e,"Sending request")),e.i=!0,e.a.send(t),e.i=!1}catch(a){la(e.b,Na(e,"Send error: "+a.message)),Ta(e,a)}}function Ea(e){return"content-type"==e.toLowerCase()}function Ta(e,t){e.c=!1,e.a&&(e.f=!0,e.a.abort(),e.f=!1),e.h=t,Sa(e),Ca(e)}function Sa(e){e.N||(e.N=!0,e.dispatchEvent("complete"),e.dispatchEvent("error"))}function Ia(e){if(e.c&&"undefined"!=typeof u)if(e.B[1]&&4==xa(e)&&2==Oa(e))la(e.b,Na(e,"Local request error detected and ignored"));else if(e.i&&4==xa(e))Sn(e.Sb,0,e);else if(e.dispatchEvent("readystatechange"),4==xa(e)){la(e.b,Na(e,"Request complete")),e.c=!1;try{var t,n=Oa(e);e:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r=!0;break e;default:r=!1}if(!(t=r)){var i;if(i=0===n){var o=String(e.l).match(An)[1]||null;if(!o&&c.self&&c.self.location){var a=c.self.location.protocol;o=a.substr(0,a.length-1)}i=!ba.test(o?o.toLowerCase():"")}t=i}if(t)e.dispatchEvent("complete"),e.dispatchEvent("success");else{try{var s=2<xa(e)?e.a.statusText:""}catch(l){la(e.b,"Can not get status: "+l.message),s=""}
2e.h=s+" ["+Oa(e)+"]",Sa(e)}}finally{Ca(e)}}}function Ca(e,t){if(e.a){ka(e);var n=e.a,r=e.B[0]?f:null;e.a=null,e.B=null,t||e.dispatchEvent("ready");try{n.onreadystatechange=r}catch(i){(e=e.b)&&e.log(na,"Problem encountered resetting onreadystatechange: "+i.message,void 0)}}}function ka(e){e.a&&e.w&&(e.a.ontimeout=null),e.s&&(c.clearTimeout(e.s),e.s=null)}function xa(e){return e.a?e.a.readyState:0}function Oa(e){try{return 2<xa(e)?e.a.status:-1}catch(t){return-1}}function Na(e,t){return t+" ["+e.P+" "+e.l+" "+Oa(e)+"]"}function Aa(e){var t=Ba;this.g=[],this.w=t,this.s=e||null,this.f=this.a=!1,this.c=void 0,this.u=this.B=this.i=!1,this.h=0,this.b=null,this.l=0}function Pa(e,t,n){e.a=!0,e.c=n,e.f=!t,Ma(e)}function Ra(e){if(e.a){if(!e.u)throw new ja(e);e.u=!1}}function Da(e,t,n,r){e.g.push([t,n,r]),e.a&&Ma(e)}function La(e){return K(e.g,(function(e){return v(e[1])}))}function Ma(e){if(e.h&&e.a&&La(e)){var t=e.h,n=Va[t];n&&(c.clearTimeout(n.a),delete Va[t]),e.h=0}e.b&&(e.b.l--,delete e.b),t=e.c;for(var r=n=!1;e.g.length&&!e.i;){var i=e.g.shift(),o=i[0],a=i[1];if(i=i[2],o=e.f?a:o)try{var s=o.call(i||e.s,t);void 0!==s&&(e.f=e.f&&(s==t||s instanceof Error),e.c=t=s),(R(t)||"function"===typeof c.Promise&&t instanceof c.Promise)&&(r=!0,e.i=!0)}catch(u){t=u,e.f=!0,La(e)||(n=!0)}}e.c=t,r&&(s=E(e.m,e,!0),r=E(e.m,e,!1),t instanceof Aa?(Da(t,s,r),t.B=!0):t.then(s,r)),n&&(t=new Ua(t),Va[t.a]=t,e.h=t.a)}function ja(){D.call(this)}function Fa(){D.call(this)}function Ua(e){this.a=c.setTimeout(E(this.c,this),0),this.b=e}(t=ya.prototype).Ka=function(){"undefined"!=typeof u&&this.a&&(this.h="Timed out after "+this.g+"ms, aborting",la(this.b,Na(this,this.h)),this.dispatchEvent("timeout"),this.abort(8))},t.abort=function(){this.a&&this.c&&(la(this.b,Na(this,"Aborting")),this.c=!1,this.f=!0,this.a.abort(),this.f=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),Ca(this))},t.Ba=function(){this.a&&(this.c&&(this.c=!1,this.f=!0,this.a.abort(),this.f=!1),Ca(this,!0)),ya.Za.Ba.call(this)},t.Sb=function(){this.wa||(this.O||this.i||this.f?Ia(this):this.Hc())},t.Hc=function(){Ia(this)},t.getResponse=function(){try{if(!this.a)return null;if("response"in this.a)return this.a.response;switch(this.m){case ma:case"text":return this.a.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in this.a)return this.a.mozResponseArrayBuffer}var e=this.b;return e&&e.log(na,"Response type "+this.m+" is not supported on this browser",void 0),null}catch(t){return la(this.b,"Can not get response: "+t.message),null}},Aa.prototype.cancel=function(e){if(this.a)this.c instanceof Aa&&this.c.cancel();else{if(this.b){var t=this.b;delete this.b,e?t.cancel(e):(t.l--,0>=t.l&&t.cancel())}this.w?this.w.call(this.s,this):this.u=!0,this.a||(e=new Fa(this),Ra(this),Pa(this,!1,e))}},Aa.prototype.m=function(e,t){this.i=!1,Pa(this,e,t)},Aa.prototype.then=function(e,t,n){var r,i,o=new _t((function(e,t){r=e,i=t}));return Da(this,r,(function(e){e instanceof Fa?o.cancel():i(e)})),o.then(e,t,n)},Aa.prototype.$goog_Thenable=!0,I(ja,D),ja.prototype.message="Deferred has already fired",ja.prototype.name="AlreadyCalledError",I(Fa,D),Fa.prototype.message="Deferred was canceled",Fa.prototype.name="CanceledError",Ua.prototype.c=function(){throw delete Va[this.a],this.b};var Va={};function qa(e){var t={},n=t.document||document,r=Ie(e).toString(),i=ft(document,"SCRIPT"),o={Tb:i,Ka:void 0},a=new Aa(o),s=null,u=null!=t.timeout?t.timeout:5e3;return 0<u&&(s=window.setTimeout((function(){za(i,!0);var e=new Ga(Ha,"Timeout reached for loading script "+r);Ra(a),Pa(a,!1,e)}),u),o.Ka=s),i.onload=i.onreadystatechange=function(){i.readyState&&"loaded"!=i.readyState&&"complete"!=i.readyState||(za(i,t.ud||!1,s),Ra(a),Pa(a,!0,null))},i.onerror=function(){za(i,!0,s);var e=new Ga(Wa,"Error while loading script "+r);Ra(a),Pa(a,!1,e)},ye(o=t.attributes||{},{type:"text/javascript",charset:"UTF-8"}),st(i,o),function(e,t){me(e,"HTMLScriptElement"),e.src=Ie(t),null===h&&(h=(t=(t=c.document).querySelector&&t.querySelector("script[nonce]"))&&(t=t.nonce||t.getAttribute("nonce"))&&l.test(t)?t:""),(t=h)&&e.setAttribute("nonce",t)}(i,e),function(e){var t;return(t=(e||document).getElementsByTagName("HEAD"))&&0!=t.length?t[0]:e.documentElement}(n).appendChild(i),a}function Ba(){if(this&&this.Tb){var e=this.Tb;e&&"SCRIPT"==e.tagName&&za(e,!0,this.Ka)}}function za(e,t,n){null!=n&&c.clearTimeout(n),e.onload=f,e.onerror=f,e.onreadystatechange=f,t&&window.setTimeout((function(){e&&e.parentNode&&e.parentNode.removeChild(e)}),0)}var Wa=0,Ha=1;function Ga(e,t){var n="Jsloader error (code #"+e+")";t&&(n+=": "+t),D.call(this,n),this.code=e}function Ka(e){this.f=e}
2function Qa(e,t,n){if(this.c=e,e=t||{},this.u=e.secureTokenEndpoint||"https://securetoken.googleapis.com/v1/token",this.m=e.secureTokenTimeout||Xa,this.g=ve(e.secureTokenHeaders||Ja),this.h=e.firebaseEndpoint||"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",this.l=e.identityPlatformEndpoint||"https://identitytoolkit.googleapis.com/v2/",this.i=e.firebaseTimeout||Za,this.a=ve(e.firebaseHeaders||es),n&&(this.a["X-Client-Version"]=n,this.g["X-Client-Version"]=n),n="Node"==br(),!(n=c.XMLHttpRequest||n&&r.INTERNAL.node&&r.INTERNAL.node.XMLHttpRequest)&&!mr())throw new C("internal-error","The XMLHttpRequest compatibility library was not found.");this.f=void 0,mr()?this.f=new ha(self):_r()?this.f=new Ka(n):this.f=new Yo,this.b=null}I(Ga,D),I(Ka,Go),Ka.prototype.a=function(){return new this.f},Ka.prototype.b=function(){return{}};var $a,Ya="idToken",Xa=new Ur(3e4,6e4),Ja={"Content-Type":"application/x-www-form-urlencoded"},Za=new Ur(3e4,6e4),es={"Content-Type":"application/json"};function ts(e,t){t?e.a["X-Firebase-Locale"]=t:delete e.a["X-Firebase-Locale"]}function ns(e,t){t?(e.a["X-Client-Version"]=t,e.g["X-Client-Version"]=t):(delete e.a["X-Client-Version"],delete e.g["X-Client-Version"])}function rs(e,t,n,r,i,o,a){(function(){var e=Cr();return!((e=Tr(e)!=Er?null:(e=e.match(/\sChrome\/(\d+)/i))&&2==e.length?parseInt(e[1],10):null)&&30>e)&&(!Ke||!nt||9<nt)})()||mr()?e=E(e.w,e):($a||($a=new _t((function(e,t){!function(e,t){if(((window.gapi||{}).client||{}).request)e();else{c[os]=function(){((window.gapi||{}).client||{}).request?e():t(Error("CORS_UNSUPPORTED"))},function(e,t){Da(e,null,t,void 0)}(qa(Ce(is,{onload:os})),(function(){t(Error("CORS_UNSUPPORTED"))}))}}(e,t)}))),e=E(e.s,e)),e(t,n,r,i,o,a)}Qa.prototype.S=function(){return this.b},Qa.prototype.w=function(e,t,n,r,i,o){if(mr()&&("undefined"===typeof c.fetch||"undefined"===typeof c.Headers||"undefined"===typeof c.Request))throw new C("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 ya(this.f);if(o){a.g=Math.max(0,o);var s=setTimeout((function(){a.dispatchEvent("timeout")}),o)}wn(a,"complete",(function(){s&&clearTimeout(s);var e=null;try{e=JSON.parse(function(e){try{return e.a?e.a.responseText:""}catch(t){return la(e.b,"Can not get responseText: "+t.message),""}}(this))||null}catch(n){e=null}t&&t(e)})),En(a,"ready",(function(){s&&clearTimeout(s),Wt(this)})),En(a,"timeout",(function(){s&&clearTimeout(s),Wt(this),t&&t(null)})),wa(a,e,n,r,i)};var is=new be(Ee,"https://apis.google.com/js/client.js?onload=%{onload}"),os="__fcb"+Math.floor(1e6*Math.random()).toString();function as(e,t,n,r,i,o,a){var s=Fn(t+n);Mn(s,"key",e.c),a&&Mn(s,"cb",S().toString());var u="GET"==r;if(u)for(var c in i)i.hasOwnProperty(c)&&Mn(s,c,i[c]);return new _t((function(t,n){rs(e,s.toString(),(function(e){e?e.error?n(tu(e,o||{})):t(e):n(new C("network-request-failed"))}),r,u?void 0:nr(Dr(i)),e.a,e.i.get())}))}function ss(e){if("string"!==typeof(e=e.email)||!dr.test(e))throw new C("invalid-email")}function us(e){"email"in e&&ss(e)}function cs(e){if(!e[Ya]){if(e.mfaPendingCredential)throw new C("multi-factor-auth-required",null,ve(e));throw new C("internal-error")}}function ls(e){if(e.phoneNumber||e.temporaryProof){if(!e.phoneNumber||!e.temporaryProof)throw new C("internal-error")}else{if(!e.sessionInfo)throw new C("missing-verification-id");if(!e.code)throw new C("missing-verification-code")}}Qa.prototype.s=function(e,t,n,r,i){var o=this;$a.then((function(){window.gapi.client.setApiKey(o.c);var a=window.gapi.auth.getToken();window.gapi.auth.setToken(null),window.gapi.client.request({path:e,method:n,body:r,headers:i,authType:"none",callback:function(e){window.gapi.auth.setToken(a),t&&t(e)}})})).o((function(e){t&&t({error:{message:e&&e.message||"CORS_UNSUPPORTED"}})}))},Qa.prototype.vb=function(){return Zs(this,qs,{})},Qa.prototype.xb=function(e,t){return Zs(this,Us,{idToken:e,email:t})},Qa.prototype.yb=function(e,t){return Zs(this,Vs,{idToken:e,password:t})};var hs={displayName:"DISPLAY_NAME",photoUrl:"PHOTO_URL"};function fs(e){if(!e.phoneVerificationInfo)throw new C("internal-error");
2if(!e.phoneVerificationInfo.sessionInfo)throw new C("missing-verification-id");if(!e.phoneVerificationInfo.code)throw new C("missing-verification-code")}function ps(e){if(!e.requestUri||!e.sessionId&&!e.postBody&&!e.pendingToken)throw new C("internal-error")}function ds(e,t){return t.oauthIdToken&&t.providerId&&0==t.providerId.indexOf("oidc.")&&!t.pendingToken&&(e.sessionId?t.nonce=e.sessionId:e.postBody&&(Jn(e=new Qn(e.postBody),"nonce")&&(t.nonce=e.get("nonce")))),t}function vs(e){var t=null;if(e.needConfirmation?(e.code="account-exists-with-different-credential",t=Ho(e)):"FEDERATED_USER_ID_ALREADY_LINKED"==e.errorMessage?(e.code="credential-already-in-use",t=Ho(e)):"EMAIL_EXISTS"==e.errorMessage?(e.code="email-already-in-use",t=Ho(e)):e.errorMessage&&(t=eu(e.errorMessage)),t)throw t;cs(e)}function gs(e,t){return t.returnIdpCredential=!0,Zs(e,Ws,t)}function ys(e,t){return t.returnIdpCredential=!0,Zs(e,Gs,t)}function ms(e,t){return t.returnIdpCredential=!0,t.autoCreate=!1,Zs(e,Hs,t)}function bs(e){if(!e.oobCode)throw new C("invalid-action-code")}(t=Qa.prototype).zb=function(e,t){var n={idToken:e},r=[];return pe(hs,(function(e,i){var o=t[i];null===o?r.push(e):i in t&&(n[i]=o)})),r.length&&(n.deleteAttribute=r),Zs(this,Us,n)},t.rb=function(e,t){return ye(e={requestType:"PASSWORD_RESET",email:e},t),Zs(this,Ds,e)},t.sb=function(e,t){return ye(e={requestType:"EMAIL_SIGNIN",email:e},t),Zs(this,As,e)},t.qb=function(e,t){return ye(e={requestType:"VERIFY_EMAIL",idToken:e},t),Zs(this,Ps,e)},t.Ab=function(e,t,n){return ye(e={requestType:"VERIFY_AND_CHANGE_EMAIL",idToken:e,newEmail:t},n),Zs(this,Rs,e)},t.cb=function(e){return Zs(this,$s,e)},t.jb=function(e,t){return Zs(this,js,{oobCode:e,newPassword:t})},t.Pa=function(e){return Zs(this,ws,{oobCode:e})},t.fb=function(e){return Zs(this,_s,{oobCode:e})};var _s={endpoint:"setAccountInfo",A:bs,Y:"email",C:!0},ws={endpoint:"resetPassword",A:bs,G:function(e){var t=e.requestType;if(!t||!e.email&&"EMAIL_SIGNIN"!=t&&"VERIFY_AND_CHANGE_EMAIL"!=t)throw new C("internal-error")},C:!0},Es={endpoint:"signupNewUser",A:function(e){if(ss(e),!e.password)throw new C("weak-password")},G:cs,U:!0,C:!0},Ts={endpoint:"createAuthUri",C:!0},Ss={endpoint:"deleteAccount",M:["idToken"]},Is={endpoint:"setAccountInfo",M:["idToken","deleteProvider"],A:function(e){if("array"!=p(e.deleteProvider))throw new C("internal-error")}},Cs={endpoint:"emailLinkSignin",M:["email","oobCode"],A:ss,G:cs,U:!0,C:!0},ks={endpoint:"emailLinkSignin",M:["idToken","email","oobCode"],A:ss,G:cs,U:!0},xs={endpoint:"accounts/mfaEnrollment:finalize",M:["idToken","phoneVerificationInfo"],A:fs,G:cs,C:!0,La:!0},Os={endpoint:"accounts/mfaSignIn:finalize",M:["mfaPendingCredential","phoneVerificationInfo"],A:fs,G:cs,C:!0,La:!0},Ns={endpoint:"getAccountInfo"},As={endpoint:"getOobConfirmationCode",M:["requestType"],A:function(e){if("EMAIL_SIGNIN"!=e.requestType)throw new C("internal-error");ss(e)},Y:"email",C:!0},Ps={endpoint:"getOobConfirmationCode",M:["idToken","requestType"],A:function(e){if("VERIFY_EMAIL"!=e.requestType)throw new C("internal-error")},Y:"email",C:!0},Rs={endpoint:"getOobConfirmationCode",M:["idToken","newEmail","requestType"],A:function(e){if("VERIFY_AND_CHANGE_EMAIL"!=e.requestType)throw new C("internal-error")},Y:"email",C:!0},Ds={endpoint:"getOobConfirmationCode",M:["requestType"],A:function(e){if("PASSWORD_RESET"!=e.requestType)throw new C("internal-error");ss(e)},Y:"email",C:!0},Ls={hb:!0,endpoint:"getProjectConfig",Rb:"GET"},Ms={hb:!0,endpoint:"getRecaptchaParam",Rb:"GET",G:function(e){if(!e.recaptchaSiteKey)throw new C("internal-error")}},js={endpoint:"resetPassword",A:bs,Y:"email",C:!0},Fs={endpoint:"sendVerificationCode",M:["phoneNumber","recaptchaToken"],Y:"sessionInfo",C:!0},Us={endpoint:"setAccountInfo",M:["idToken"],A:us,U:!0},Vs={endpoint:"setAccountInfo",M:["idToken"],A:function(e){if(us(e),!e.password)throw new C("weak-password")},G:cs,U:!0},qs={endpoint:"signupNewUser",G:cs,U:!0,C:!0},Bs={endpoint:"accounts/mfaEnrollment:start",M:["idToken","phoneEnrollmentInfo"],A:function(e){if(!e.phoneEnrollmentInfo)throw new C("internal-error");
2if(!e.phoneEnrollmentInfo.phoneNumber)throw new C("missing-phone-number");if(!e.phoneEnrollmentInfo.recaptchaToken)throw new C("missing-app-credential")},G:function(e){if(!e.phoneSessionInfo||!e.phoneSessionInfo.sessionInfo)throw new C("internal-error")},C:!0,La:!0},zs={endpoint:"accounts/mfaSignIn:start",M:["mfaPendingCredential","mfaEnrollmentId","phoneSignInInfo"],A:function(e){if(!e.phoneSignInInfo||!e.phoneSignInInfo.recaptchaToken)throw new C("missing-app-credential")},G:function(e){if(!e.phoneResponseInfo||!e.phoneResponseInfo.sessionInfo)throw new C("internal-error")},C:!0,La:!0},Ws={endpoint:"verifyAssertion",A:ps,Wa:ds,G:vs,U:!0,C:!0},Hs={endpoint:"verifyAssertion",A:ps,Wa:ds,G:function(e){if(e.errorMessage&&"USER_NOT_FOUND"==e.errorMessage)throw new C("user-not-found");if(e.errorMessage)throw eu(e.errorMessage);cs(e)},U:!0,C:!0},Gs={endpoint:"verifyAssertion",A:function(e){if(ps(e),!e.idToken)throw new C("internal-error")},Wa:ds,G:vs,U:!0},Ks={endpoint:"verifyCustomToken",A:function(e){if(!e.token)throw new C("invalid-custom-token")},G:cs,U:!0,C:!0},Qs={endpoint:"verifyPassword",A:function(e){if(ss(e),!e.password)throw new C("wrong-password")},G:cs,U:!0,C:!0},$s={endpoint:"verifyPhoneNumber",A:ls,G:cs,C:!0},Ys={endpoint:"verifyPhoneNumber",A:function(e){if(!e.idToken)throw new C("internal-error");ls(e)},G:function(e){if(e.temporaryProof)throw e.code="credential-already-in-use",Ho(e);cs(e)}},Xs={Eb:{USER_NOT_FOUND:"user-not-found"},endpoint:"verifyPhoneNumber",A:ls,G:cs,C:!0},Js={endpoint:"accounts/mfaEnrollment:withdraw",M:["idToken","mfaEnrollmentId"],G:function(e){if(!!e[Ya]^!!e.refreshToken)throw new C("internal-error")},C:!0,La:!0};function Zs(e,t,n){if(!function(e,t){if(!t||!t.length)return!0;if(!e)return!1;for(var n=0;n<t.length;n++){var r=e[t[n]];if(void 0===r||null===r||""===r)return!1}return!0}(n,t.M))return xt(new C("internal-error"));var r,i=!!t.La,o=t.Rb||"POST";return kt(n).then(t.A).then((function(){return t.U&&(n.returnSecureToken=!0),t.C&&e.b&&"undefined"===typeof n.tenantId&&(n.tenantId=e.b),as(e,i?e.l:e.h,t.endpoint,o,n,t.Eb,t.hb||!1)})).then((function(e){return r=e,t.Wa?t.Wa(n,r):r})).then(t.G).then((function(){if(!t.Y)return r;if(!(t.Y in r))throw new C("internal-error");return r[t.Y]}))}function eu(e){return tu({error:{errors:[{message:e}],code:400,message:e}})}function tu(e,t){var n=(e.error&&e.error.errors&&e.error.errors[0]||{}).reason||"",r={keyInvalid:"invalid-api-key",ipRefererBlocked:"app-not-authorized"};if(n=r[n]?new C(r[n]):null)return n;for(var i in n=e.error&&e.error.message||"",ye(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_
2NONCE:"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"},t||{}),t=(t=n.match(/^[^\s]+\s*:\s*([\s\S]*)$/))&&1<t.length?t[1]:void 0,r)if(0===n.indexOf(i))return new C(r[i],t);return!t&&e&&(t=Rr(e)),new C("internal-error",t)}function nu(e){this.b=e,this.a=null,this.nb=function(e){return(au||(au=new _t((function(e,t){function n(){Fr(),kr("gapi.load")("gapi.iframes",{callback:e,ontimeout:function(){Fr(),t(Error("Network Error"))},timeout:iu.get()})}if(kr("gapi.iframes.Iframe"))e();else if(kr("gapi.load"))n();else{var r="__iframefcb"+Math.floor(1e6*Math.random()).toString();c[r]=function(){kr("gapi.load")?n():t(Error("Network Error"))},kt(qa(r=Ce(ru,{onload:r}))).o((function(){t(Error("Network Error"))}))}})).o((function(e){throw au=null,e})))).then((function(){return new _t((function(t,n){kr("gapi.iframes.getContext")().open({where:document.body,url:e.b,messageHandlersFilter:kr("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"),attributes:{style:{position:"absolute",top:"-100px",width:"1px",height:"1px"}},dontclear:!0},(function(r){function i(){clearTimeout(o),t()}e.a=r,e.a.restyle({setHideOnLeave:!1});var o=setTimeout((function(){n(Error("Network Error"))}),ou.get());r.ping(i).then(i,(function(){n(Error("Network Error"))}))}))}))}))}(this)}var ru=new be(Ee,"https://apis.google.com/js/api.js?onload=%{onload}"),iu=new Ur(3e4,6e4),ou=new Ur(5e3,15e3),au=null;function su(e,t,n){this.i=e,this.g=t,this.h=n,this.f=null,this.a=Un(this.i,"/__/auth/iframe"),Mn(this.a,"apiKey",this.g),Mn(this.a,"appName",this.h),this.b=null,this.c=[]}function uu(e,t,n,r,i){this.s=e,this.m=t,this.c=n,this.u=r,this.i=this.g=this.l=null,this.a=i,this.h=this.f=null}function cu(e){try{return r.app(e).auth().Ea()}catch(t){return[]}}function lu(e,t,n,r,i){this.u=e,this.f=t,this.b=n,this.c=r||null,this.h=i||null,this.m=this.s=this.w=null,this.g=[],this.l=this.a=null}function hu(e){var t=ur();return function(e){return Zs(e,Ls,{}).then((function(e){return e.authorizedDomains||[]}))}(e).then((function(e){e:{var n=Fn(t),r=n.f;n=n.b;for(var i=0;i<e.length;i++){var o=e[i],a=n,s=r;if(0==o.indexOf("chrome-extension://")?a=Fn(o).b==a&&"chrome-extension"==s:"http"!=s&&"https"!=s?a=!1:pr.test(o)?a=a==o:(o=o.split(".").join("\\."),a=new RegExp("^(.+\\."+o+"|"+o+")$","i").test(a)),a){e=!0;break e}}e=!1}if(!e)throw new zo(ur())}))}function fu(e){return e.l||(e.l=vr().then((function(){if(!e.s){var t=e.c,n=e.h,r=cu(e.b),i=new su(e.u,e.f,e.b);i.f=t,i.b=n,i.c=J(r||[]),e.s=i.toString()}e.i=new nu(e.s),function(e){if(!e.i)throw Error("IfcHandler must be initialized!");!function(e,t){e.nb.then((function(){e.a.register("authEvent",t,kr("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))}))}(e.i,(function(t){var n={};if(t&&t.authEvent){var r=!1;for(t=Uo(t.authEvent),n=0;n<e.g.length;n++)r=e.g[n](t)||r;return(n={}).status=r?"ACK":"ERROR",kt(n)}return n.status="ERROR",kt(n)}))}(e)}))),e.l}function pu(e){return e.m||(e.w=e.c?Ir(e.c,cu(e.b)):null,e.m=new Qa(e.f,P(e.h),e.w)),e.m}function du(e,t,n,r,i,o,a,s,u,c,l){return(e=new uu(e,t,n,r,i)).l=o,e.g=a,e.i=s,e.b=ve(u||null),e.f=c,e.ub(l).toString()}function vu(e){if(this.a=e||r.INTERNAL.reactNative&&r.INTERNAL.reactNative.AsyncStorage,!this.a)throw new C("internal-error","The React Native compatibility library was not found.");this.type="asyncStorage"}function gu(e){this.b=e,this.a={},this.f=E(this.c,this)}su.prototype.toString=function(){return this.f?Mn(this.a,"v",this.f):Xn(this.a.a,"v"),this.b?Mn(this.a,"eid",this.b):Xn(this.a.a,"eid"),this.c.length?Mn(this.a,"fw",this.c.join(",")):Xn(this.a.a,"fw"),this.a.toString()},uu.prototype.ub=function(e){return this.h=e,this},uu.prototype.toString=function(){var e=Un(this.s,"/__/auth/handler");if(Mn(e,"apiKey",this.m),Mn(e,"appName",this.c),Mn(e,"authType",this.u),this.a.isOAuthProvider){var t=this.a;try{var n=r.app(this.c).auth().ja()}catch(u){n=null}for(var i in t.kb=n,Mn(e,"providerId",this.a.providerId),n=Dr((t=this.a).Fb))n[i]=n[i].toString();i=t.Oc,n=ve(n);for(var o=0;o<i.length;o++){var a=i[o];a in n&&delete n[a]}t.lb&&t.kb&&!n[t.lb]&&(n[t.lb]=t.kb),de(n)||Mn(e,"customParameters",Rr(n))}if("function"===typeof this.a.Nb&&((t=this.a.Nb()).length&&Mn(e,"scopes",t.join(","))),this.l?Mn(e,"redirectUrl",this.l):Xn(e.a,"redirectUrl"),this.g?Mn(e,"eventId",this.g):Xn(e.a,"eventId"),this.i?Mn(e,"v",this.i):Xn(e.a,"v"),this.b)for(var s in this.b)this.b.hasOwnProperty(s)&&!jn(e,s)&&Mn(e,s,this.b[s]);return this.h?Mn(e,"tid",this.h):Xn(e.a,"tid"),this.f?Mn(e,"eid",this.f):Xn(e.a,"eid"),(s=cu(this.c)).length&&Mn(e,"fw",s.join(",")),e.toString()},(t=lu.prototype).Lb=function(e,t,n){var r=new C("popup-closed-by-user"),i=new C("web-storage-unsupported"),o=this,a=!1;return this.ka().then((function(){(function(e){var t={type:"webStorageSupport"};return fu(e).then((function(){return function(e,t){return e.nb.then((function(){return new _t((function(n){e.a.send(t.type,t,n,kr("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))}))}))}(e.i,t)})).then((function(e){if(e&&e.length&&"undefined"!==typeof e[0].webStorageSupport)return e[0].webStorageSupport;throw Error()}))})(o).then((function(n){n||(e&&hr(e),t(i),a=!0)}))})).o((function(){})).then((function(){if(!a)return function(e){return new _t((function(t){return function n(){In(2e3).then((function(){if(e&&!e.closed)return n();t()}))}()}))}(e)})).then((function(){if(!a)return In(n).then((function(){t(r)}))}))}
2,t.Ub=function(){var e=Cr();return!Pr(e)&&!jr(e)},t.Qb=function(){return!1},t.Jb=function(e,t,n,r,i,o,a,s){if(!e)return xt(new C("popup-blocked"));if(a&&!Pr())return this.ka().o((function(t){hr(e),i(t)})),r(),kt();this.a||(this.a=hu(pu(this)));var u=this;return this.a.then((function(){var t=u.ka().o((function(t){throw hr(e),i(t),t}));return r(),t})).then((function(){(jo(n),a)||cr(du(u.u,u.f,u.b,t,n,null,o,u.c,void 0,u.h,s),e)})).o((function(e){throw"auth/network-request-failed"==e.code&&(u.a=null),e}))},t.Kb=function(e,t,n,r){this.a||(this.a=hu(pu(this)));var i=this;return this.a.then((function(){jo(t),cr(du(i.u,i.f,i.b,e,t,ur(),n,i.c,void 0,i.h,r))})).o((function(e){throw"auth/network-request-failed"==e.code&&(i.a=null),e}))},t.ka=function(){var e=this;return fu(this).then((function(){return e.i.nb})).o((function(){throw e.a=null,new C("network-request-failed")}))},t.Xb=function(){return!0},t.Ca=function(e){this.g.push(e)},t.Qa=function(e){Y(this.g,(function(t){return t==e}))},(t=vu.prototype).get=function(e){return kt(this.a.getItem(e)).then((function(e){return e&&Lr(e)}))},t.set=function(e,t){return kt(this.a.setItem(e,Rr(t)))},t.T=function(e){return kt(this.a.removeItem(e))},t.ba=function(){},t.ha=function(){};var yu,mu=[];function bu(e,t,n){de(e.a)&&e.b.addEventListener("message",e.f),"undefined"===typeof e.a[t]&&(e.a[t]=[]),e.a[t].push(n)}function _u(e){this.a=e}function wu(e){this.c=e,this.b=!1,this.a=[]}function Eu(e,t,n,r){var i,o,a,s,u=n||{},c=null;if(e.b)return xt(Error("connection_unavailable"));var l=r?800:50,h="undefined"!==typeof MessageChannel?new MessageChannel:null;return new _t((function(n,r){h?(i=Math.floor(Math.random()*Math.pow(10,20)).toString(),h.port1.start(),a=setTimeout((function(){r(Error("unsupported_event"))}),l),c={messageChannel:h,onMessage:o=function(e){e.data.eventId===i&&("ack"===e.data.status?(clearTimeout(a),s=setTimeout((function(){r(Error("timeout"))}),3e3)):"done"===e.data.status?(clearTimeout(s),"undefined"!==typeof e.data.response?n(e.data.response):r(Error("unknown_error"))):(clearTimeout(a),clearTimeout(s),r(Error("invalid_response"))))}},e.a.push(c),h.port1.addEventListener("message",o),e.c.postMessage({eventType:t,eventId:i,data:u},[h.port2])):r(Error("connection_unavailable"))})).then((function(t){return Tu(e,c),t})).o((function(t){throw Tu(e,c),t}))}function Tu(e,t){if(t){var n=t.messageChannel,r=t.onMessage;n&&(n.port1.removeEventListener("message",r),n.port1.close()),Y(e.a,(function(e){return e==t}))}}function Su(){if(!ku())throw new C("web-storage-unsupported");this.c={},this.a=[],this.b=0,this.u=c.indexedDB,this.type="indexedDB",this.g=this.l=this.f=this.i=null,this.s=!1,this.h=null;var e=this;mr()&&self?(this.l=function(){var e=mr()?self:null;if(W(mu,(function(n){n.b==e&&(t=n)})),!t){var t=new gu(e);mu.push(t)}return t}(),bu(this.l,"keyChanged",(function(t,n){return Pu(e).then((function(t){return 0<t.length&&W(e.a,(function(e){e(t)})),{keyProcessed:Q(t,n.key)}}))})),bu(this.l,"ping",(function(){return kt(["keyChanged"])}))):function(){var e=c.navigator;return e&&e.serviceWorker?kt().then((function(){return e.serviceWorker.ready})).then((function(e){return e.active||null})).o((function(){return null})):kt(null)}().then((function(t){(e.h=t)&&(e.g=new wu(new _u(t)),Eu(e.g,"ping",null,!0).then((function(t){t[0].fulfilled&&Q(t[0].value,"keyChanged")&&(e.s=!0)})).o((function(){})))}))}function Iu(e){return new _t((function(t,n){var r=e.u.open("firebaseLocalStorageDb",1);r.onerror=function(e){try{e.preventDefault()}catch(t){}n(Error(e.target.error))},r.onupgradeneeded=function(e){e=e.target.result;try{e.createObjectStore("firebaseLocalStorage",{keyPath:"fbase_key"})}catch(t){n(t)}},r.onsuccess=function(r){(r=r.target.result).objectStoreNames.contains("firebaseLocalStorage")?t(r):function(e){return new _t((function(t,n){var r=e.u.deleteDatabase("firebaseLocalStorageDb");r.onsuccess=function(){t()},r.onerror=function(e){n(Error(e.target.error))}}))}(e).then((function(){return Iu(e)})).then((function(e){t(e)})).o((function(e){n(e)}))}}))}function Cu(e){return e.m||(e.m=Iu(e)),e.m}function ku(){try{return!!c.indexedDB}catch(aa){return!1}}function xu(e){return e.objectStore("firebaseLocalStorage")}function Ou(e,t){return e.transaction(["firebaseLocalStorage"],t?"readwrite":"readonly")}function Nu(e){return new _t((function(t,n){e.onsuccess=function(e){e&&e.target?t(e.target.result):t()},e.onerror=function(e){n(e.target.error)}}))}function Au(e,t){return e.g&&e.h&&function(){var e=c.navigator;return e&&e.serviceWorker&&e.serviceWorker.controller||null}()===e.h?Eu(e.g,"keyChanged",{key:t},e.s).then((function(){})).o((function(){})):kt()}function Pu(e){return Cu(e).then((function(e){var t=xu(Ou(e,!1));return t.getAll?Nu(t.getAll()):new _t((function(e,n){var r=[],i=t.openCursor();i.onsuccess=function(t){(t=t.target.result)?(r.push(t.value),t.continue()):e(r)},i.onerror=function(e){n(e.target.error)}}))})).then((function(t){var n={},r=[];if(0==e.b){for(r=0;r<t.length;r++)n[t[r].fbase_key]=t[r].value;r=function e(t,n){var r,i=[];for(r in t)r in n?typeof t[r]!=typeof n[r]?i.push(r):"object"==typeof t[r]&&null!=t[r]&&null!=n[r]?0<e(t[r],n[r]).length&&i.push(r):t[r]!==n[r]&&i.push(r):i.push(r);for(r in n)r in t||i.push(r);return i}(e.c,n),e.c=n}return r}))}function Ru(e){e.i&&e.i.cancel("STOP_EVENT"),e.f&&(clearTimeout(e.f),e.f=null)}function Du(e){var t=this,n=null;this.a=[],this.type="indexedDB",this.c=e,this.b=kt().then((function(){if(ku()){var e=Mr(),r="__sak"+e;return yu||(yu=new Su),(n=yu).set(r,e).then((function(){return n.get(r)})).then((function(t){if(t!==e)throw Error("indexedDB not supported!");return n.T(r)})).then((function(){return n})).o((function(){return t.c}))}return t.c})).then((function(e){return t.type=e.type,e.ba((function(e){W(t.a,(function(t){t(e)}))})),e}))}function Lu(){this.a={},this.type="inMemory"}function Mu(){if(!function(){var e="Node"==br();if(!(e=ju()||e&&r.INTERNAL.node&&r.INTERNAL.node.localStorage))return!1;try{return e.setItem("__sak","1"),e.removeItem("__sak"),!0}catch(t){return!1}}()){if("Node"==br())throw new C("internal-error","The LocalStorage compatibility library was not found.");throw new C("web-storage-unsupported")}this.a=ju()||r.INTERNAL.node.localStorage,this.type="localStorage"}function ju(){try{var e=c.localStorage,t=Mr();return e&&(e.setItem(t,"1"),e.removeItem(t)),e}catch(n){return null}}function Fu(){this.type="nullStorage"}
2function Uu(){if(!function(){var e="Node"==br();if(!(e=Vu()||e&&r.INTERNAL.node&&r.INTERNAL.node.sessionStorage))return!1;try{return e.setItem("__sak","1"),e.removeItem("__sak"),!0}catch(t){return!1}}()){if("Node"==br())throw new C("internal-error","The SessionStorage compatibility library was not found.");throw new C("web-storage-unsupported")}this.a=Vu()||r.INTERNAL.node.sessionStorage,this.type="sessionStorage"}function Vu(){try{var e=c.sessionStorage,t=Mr();return e&&(e.setItem(t,"1"),e.removeItem(t)),e}catch(n){return null}}function qu(){var e={};e.Browser=Wu,e.Node=Hu,e.ReactNative=Gu,e.Worker=Ku,this.a=e[br()]}gu.prototype.c=function(e){var t=e.data.eventType,n=e.data.eventId,r=this.a[t];if(r&&0<r.length){e.ports[0].postMessage({status:"ack",eventId:n,eventType:t,response:null});var i=[];W(r,(function(t){i.push(kt().then((function(){return t(e.origin,e.data.data)})))})),Nt(i).then((function(r){var i=[];W(r,(function(e){i.push({fulfilled:e.Mb,value:e.value,reason:e.reason?e.reason.message:void 0})})),W(i,(function(e){for(var t in e)"undefined"===typeof e[t]&&delete e[t]})),e.ports[0].postMessage({status:"done",eventId:n,eventType:t,response:i})}))}},_u.prototype.postMessage=function(e,t){this.a.postMessage(e,t)},wu.prototype.close=function(){for(;0<this.a.length;)Tu(this,this.a[0]);this.b=!0},(t=Su.prototype).set=function(e,t){var n,r=!1,i=this;return Cu(this).then((function(t){return Nu((t=xu(Ou(n=t,!0))).get(e))})).then((function(o){var a=xu(Ou(n,!0));return o?(o.value=t,Nu(a.put(o))):(i.b++,r=!0,(o={}).fbase_key=e,o.value=t,Nu(a.add(o)))})).then((function(){return i.c[e]=t,Au(i,e)})).ma((function(){r&&i.b--}))},t.get=function(e){return Cu(this).then((function(t){return Nu(xu(Ou(t,!1)).get(e))})).then((function(e){return e&&e.value}))},t.T=function(e){var t=!1,n=this;return Cu(this).then((function(r){return t=!0,n.b++,Nu(xu(Ou(r,!0)).delete(e))})).then((function(){return delete n.c[e],Au(n,e)})).ma((function(){t&&n.b--}))},t.ba=function(e){0==this.a.length&&function(e){Ru(e),function t(){e.f=setTimeout((function(){e.i=Pu(e).then((function(t){0<t.length&&W(e.a,(function(e){e(t)}))})).then((function(){t()})).o((function(e){"STOP_EVENT"!=e.message&&t()}))}),800)}()}(this),this.a.push(e)},t.ha=function(e){Y(this.a,(function(t){return t==e})),0==this.a.length&&Ru(this)},(t=Du.prototype).get=function(e){return this.b.then((function(t){return t.get(e)}))},t.set=function(e,t){return this.b.then((function(n){return n.set(e,t)}))},t.T=function(e){return this.b.then((function(t){return t.T(e)}))},t.ba=function(e){this.a.push(e)},t.ha=function(e){Y(this.a,(function(t){return t==e}))},(t=Lu.prototype).get=function(e){return kt(this.a[e])},t.set=function(e,t){return this.a[e]=t,kt()},t.T=function(e){return delete this.a[e],kt()},t.ba=function(){},t.ha=function(){},(t=Mu.prototype).get=function(e){var t=this;return kt().then((function(){return Lr(t.a.getItem(e))}))},t.set=function(e,t){var n=this;return kt().then((function(){var r=Rr(t);null===r?n.T(e):n.a.setItem(e,r)}))},t.T=function(e){var t=this;return kt().then((function(){t.a.removeItem(e)}))},t.ba=function(e){c.window&&un(c.window,"storage",e)},t.ha=function(e){c.window&&hn(c.window,"storage",e)},(t=Fu.prototype).get=function(){return kt(null)},t.set=function(){return kt()},t.T=function(){return kt()},t.ba=function(){},t.ha=function(){},(t=Uu.prototype).get=function(e){var t=this;return kt().then((function(){return Lr(t.a.getItem(e))}))},t.set=function(e,t){var n=this;return kt().then((function(){var r=Rr(t);null===r?n.T(e):n.a.setItem(e,r)}))},t.T=function(e){var t=this;return kt().then((function(){t.a.removeItem(e)}))},t.ba=function(){},t.ha=function(){};var Bu,zu,Wu={F:Mu,$a:Uu},Hu={F:Mu,$a:Uu},Gu={F:vu,$a:Fu},Ku={F:Mu,$a:Fu},Qu={od:"local",NONE:"none",qd:"session"};function $u(){var e=!(jr(Cr())||!yr()),t=Pr(),n=xr();this.m=e,this.h=t,this.l=n,this.a={},Bu||(Bu=new qu),e=Bu;try{this.g=!sr()&&Br()||!c.indexedDB?new e.a.F:new Du(mr()?new Lu:new e.a.F)}catch(r){this.g=new Lu,this.h=!0}try{this.i=new e.a.$a}catch(r){this.i=new Lu}this.u=new Lu,this.f=E(this.Vb,this),this.b={}}function Yu(){return zu||(zu=new $u),zu}function Xu(e,t){switch(t){case"session":return e.i;case"none":return e.u;default:return e.g}}function Ju(e,t){return"firebase:"+e.name+(t?":"+t:"")}function Zu(e,t,n){return n=Ju(t,n),"local"==t.F&&(e.b[n]=null),Xu(e,t.F).T(n)}function ec(e){e.c&&(clearInterval(e.c),e.c=null)}function tc(e){this.a=e,this.b=Yu()}(t=$u.prototype).get=function(e,t){return Xu(this,e.F).get(Ju(e,t))},t.set=function(e,t,n){var r=Ju(e,n),i=this,o=Xu(this,e.F);return o.set(r,t).then((function(){return o.get(r)})).then((function(t){"local"==e.F&&(i.b[r]=t)}))},t.addListener=function(e,t,n){e=Ju(e,t),this.l&&(this.b[e]=c.localStorage.getItem(e)),de(this.a)&&(Xu(this,"local").ba(this.f),this.h||(sr()||!Br())&&c.indexedDB||!this.l||function(e){ec(e),e.c=setInterval((function(){for(var t in e.a){var n=c.localStorage.getItem(t),r=e.b[t];n!=r&&(e.b[t]=n,n=new Yt({type:"storage",key:t,target:window,oldValue:r,newValue:n,a:!0}),e.Vb(n))}}),1e3)}(this)),this.a[e]||(this.a[e]=[]),this.a[e].push(n)},t.removeListener=function(e,t,n){e=Ju(e,t),this.a[e]&&(Y(this.a[e],(function(e){return e==n}
2)),0==this.a[e].length&&delete this.a[e]),de(this.a)&&(Xu(this,"local").ha(this.f),ec(this))},t.Vb=function(e){if(e&&e.f){var t=e.a.key;if(null==t)for(var n in this.a){var r=this.b[n];"undefined"===typeof r&&(r=null);var i=c.localStorage.getItem(n);i!==r&&(this.b[n]=i,this.ib(n))}else if(0==t.indexOf("firebase:")&&this.a[t]){if("undefined"!==typeof e.a.a?Xu(this,"local").ha(this.f):ec(this),this.m)if(n=c.localStorage.getItem(t),(r=e.a.newValue)!==n)null!==r?c.localStorage.setItem(t,r):c.localStorage.removeItem(t);else if(this.b[t]===r&&"undefined"===typeof e.a.a)return;var o=this;n=function(){"undefined"===typeof e.a.a&&o.b[t]===c.localStorage.getItem(t)||(o.b[t]=c.localStorage.getItem(t),o.ib(t))},Ke&&nt&&10==nt&&c.localStorage.getItem(t)!==e.a.newValue&&e.a.newValue!==e.a.oldValue?setTimeout(n,10):n()}}else W(e,E(this.ib,this))},t.ib=function(e){this.a[e]&&W(this.a[e],(function(e){e()}))};var nc,rc={name:"authEvent",F:"local"};function ic(){this.a=Yu()}function oc(e,t){this.b=ac,this.f=c.Uint8Array?new Uint8Array(this.b):Array(this.b),this.g=this.c=0,this.a=[],this.i=e,this.h=t,this.l=c.Int32Array?new Int32Array(64):Array(64),void 0===nc&&(nc=c.Int32Array?new Int32Array(pc):pc),this.reset()}I(oc,(function(){this.b=-1}));for(var ac=64,sc=ac-1,uc=[],cc=0;cc<sc;cc++)uc[cc]=0;var lc=X(128,uc);function hc(e){for(var t=e.f,n=e.l,r=0,i=0;i<t.length;)n[r++]=t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3],i=4*r;for(t=16;64>t;t++){i=0|n[t-15],r=0|n[t-2];var o=(0|n[t-16])+((i>>>7|i<<25)^(i>>>18|i<<14)^i>>>3)|0,a=(0|n[t-7])+((r>>>17|r<<15)^(r>>>19|r<<13)^r>>>10)|0;n[t]=o+a|0}r=0|e.a[0],i=0|e.a[1];var s=0|e.a[2],u=0|e.a[3],c=0|e.a[4],l=0|e.a[5],h=0|e.a[6];for(o=0|e.a[7],t=0;64>t;t++){var f=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&i^r&s^i&s)|0;a=(o=o+((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))|0)+((a=(a=c&l^~c&h)+(0|nc[t])|0)+(0|n[t])|0)|0,o=h,h=l,l=c,c=u+a|0,u=s,s=i,i=r,r=a+f|0}e.a[0]=e.a[0]+r|0,e.a[1]=e.a[1]+i|0,e.a[2]=e.a[2]+s|0,e.a[3]=e.a[3]+u|0,e.a[4]=e.a[4]+c|0,e.a[5]=e.a[5]+l|0,e.a[6]=e.a[6]+h|0,e.a[7]=e.a[7]+o|0}function fc(e,t,n){void 0===n&&(n=t.length);var r=0,i=e.c;if("string"===typeof t)for(;r<n;)e.f[i++]=t.charCodeAt(r++),i==e.b&&(hc(e),i=0);else{if(!d(t))throw Error("message must be string or array");for(;r<n;){var o=t[r++];if(!("number"==typeof o&&0<=o&&255>=o&&o==(0|o)))throw Error("message must be a byte array");e.f[i++]=o,i==e.b&&(hc(e),i=0)}}e.c=i,e.g+=n}oc.prototype.reset=function(){this.g=this.c=0,this.a=c.Int32Array?new Int32Array(this.h):J(this.h)};var pc=[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 dc(){oc.call(this,8,vc)}I(dc,oc);var vc=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];function gc(e,t,n,r,i){this.u=e,this.i=t,this.l=n,this.m=r||null,this.s=i||null,this.h=t+":"+n,this.w=new ic,this.g=new tc(this.h),this.f=null,this.b=[],this.a=this.c=null}function yc(e){return new C("invalid-cordova-configuration",e)}function mc(e){var t=new dc;fc(t,e),e=[];var n=8*t.g;56>t.c?fc(t,lc,56-t.c):fc(t,lc,t.b-(t.c-56));for(var r=63;56<=r;r--)t.f[r]=255&n,n/=256;for(hc(t),r=n=0;r<t.i;r++)for(var i=24;0<=i;i-=8)e[n++]=t.a[r]>>i&255;return function(e){return G(e,(function(e){return 1<(e=e.toString(16)).length?e:"0"+e})).join("")}(e)}function bc(e,t){for(var n=0;n<e.b.length;n++)try{e.b[n](t)}catch(r){}}function _c(e){return e.f||(e.f=e.ka().then((function(){return new _t((function(t){e.Ca((function n(r){return t(r),e.Qa(n),!1})),function(e){function t(t){r=!0,i&&i.cancel(),wc(e).then((function(r){var i=n;
2if(r&&t&&t.url){var o=null;-1!=(i=no(t.url)).indexOf("/__/auth/callback")&&(o=(o="object"===typeof(o=Lr(jn(o=Fn(i),"firebaseError")||null))?k(o):null)?new Fo(r.c,r.b,null,null,o,null,r.S()):new Fo(r.c,r.b,i,r.f,null,null,r.S())),i=o||n}bc(e,i)}))}var n=new Fo("unknown",null,null,null,new C("no-auth-event")),r=!1,i=In(500).then((function(){return wc(e).then((function(){r||bc(e,n)}))})),o=c.handleOpenURL;c.handleOpenURL=function(e){if(0==e.toLowerCase().indexOf(kr("BuildInfo.packageName",c).toLowerCase()+"://")&&t({url:e}),"function"===typeof o)try{o(e)}catch(n){console.error(n)}},Bo||(Bo=new Vo),function(e){var t=Bo;t.a.push(e),t.b||(t.b=function(e){for(var n=0;n<t.a.length;n++)t.a[n](e)},"function"===typeof(e=kr("universalLinks.subscribe",c))&&e(null,t.b))}(t)}(e)}))}))),e.f}function wc(e){var t=null;return function(e){return e.b.get(rc,e.a).then((function(e){return Uo(e)}))}(e.g).then((function(n){return t=n,Zu((n=e.g).b,rc,n.a)})).then((function(){return t}))}function Ec(e){this.a=e,this.b=Yu()}(t=gc.prototype).ka=function(){return this.Ga?this.Ga:this.Ga=(gr(void 0)?vr().then((function(){return new _t((function(e,t){var n=c.document,r=setTimeout((function(){t(Error("Cordova framework is not ready."))}),1e3);n.addEventListener("deviceready",(function(){clearTimeout(r),e()}),!1)}))})):xt(Error("Cordova must run in an Android or iOS file scheme."))).then((function(){if("function"!==typeof kr("universalLinks.subscribe",c))throw yc("cordova-universal-links-plugin-fix is not installed");if("undefined"===typeof kr("BuildInfo.packageName",c))throw yc("cordova-plugin-buildinfo is not installed");if("function"!==typeof kr("cordova.plugins.browsertab.openUrl",c))throw yc("cordova-plugin-browsertab is not installed");if("function"!==typeof kr("cordova.InAppBrowser.open",c))throw yc("cordova-plugin-inappbrowser is not installed")}),(function(){throw new C("cordova-not-ready")}))},t.Lb=function(e,t){return t(new C("operation-not-supported-in-this-environment")),kt()},t.Jb=function(){return xt(new C("operation-not-supported-in-this-environment"))},t.Xb=function(){return!1},t.Ub=function(){return!0},t.Qb=function(){return!0},t.Kb=function(e,t,n,r){if(this.c)return xt(new C("redirect-operation-pending"));var i=this,o=c.document,a=null,s=null,u=null,l=null;return this.c=kt().then((function(){return jo(t),_c(i)})).then((function(){return function(e,t,n,r,i){var o=function(){for(var e=20,t=[];0<e;)t.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()))),e--;return t.join("")}(),a=new Fo(t,r,null,o,new C("no-auth-event"),null,i),s=kr("BuildInfo.packageName",c);if("string"!==typeof s)throw new C("invalid-cordova-configuration");var u=kr("BuildInfo.displayName",c),l={};if(Cr().toLowerCase().match(/iphone|ipad|ipod/))l.ibi=s;else{if(!Cr().toLowerCase().match(/android/))return xt(new C("operation-not-supported-in-this-environment"));l.apn=s}u&&(l.appDisplayName=u),o=mc(o),l.sessionId=o;var h=du(e.u,e.i,e.l,t,n,null,r,e.m,l,e.s,i);return e.ka().then((function(){var t=e.h;return e.w.a.set(rc,a.v(),t)})).then((function(){var t=kr("cordova.plugins.browsertab.isAvailable",c);if("function"!==typeof t)throw new C("invalid-cordova-configuration");var n=null;t((function(t){if(t){if("function"!==typeof(n=kr("cordova.plugins.browsertab.openUrl",c)))throw new C("invalid-cordova-configuration");n(h)}else{if("function"!==typeof(n=kr("cordova.InAppBrowser.open",c)))throw new C("invalid-cordova-configuration");t=Cr(),e.a=n(h,t.match(/(iPad|iPhone|iPod).*OS 7_\d/i)||t.match(/(iPad|iPhone|iPod).*OS 8_\d/i)?"_blank":"_system","location=yes")}}))}))}(i,e,t,n,r)})).then((function(){return new _t((function(e,t){s=function(){var t=kr("cordova.plugins.browsertab.close",c);return e(),"function"===typeof t&&t(),i.a&&"function"===typeof i.a.close&&(i.a.close(),i.a=null),!1},i.Ca(s),u=function(){a||(a=In(2e3).then((function(){t(new C("redirect-cancelled-by-user"))})))},l=function(){Vr()&&u()},o.addEventListener("resume",u,!1),Cr().toLowerCase().match(/android/)||o.addEventListener("visibilitychange",l,!1)})).o((function(e){return wc(i).then((function(){throw e}))}))})).ma((function(){u&&o.removeEventListener("resume",u,!1),l&&o.removeEventListener("visibilitychange",l,!1),a&&a.cancel(),s&&i.Qa(s),i.c=null}))},t.Ca=function(e){this.b.push(e),_c(this).o((function(t){"auth/invalid-cordova-configuration"===t.code&&(t=new Fo("unknown",null,null,null,new C("no-auth-event")),e(t))}))},t.Qa=function(e){Y(this.b,(function(t){return t==e}))};var Tc={name:"pendingRedirect",F:"session"};function Sc(e){return Zu(e.b,Tc,e.a)}function Ic(e,t,n){this.i={},this.w=0,this.D=e,this.u=t,this.m=n,this.h=[],this.f=!1,this.l=E(this.s,this),this.b=new Uc,this.B=new Wc,this.g=new Ec(this.u
2+":"+this.m),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.B,this.c.linkViaPopup=this.B,this.c.reauthViaPopup=this.B,this.a=Cc(this.D,this.u,this.m,x)}function Cc(e,t,n,i){var o=r.SDK_VERSION||null;return gr()?new gc(e,t,n,o,i):new lu(e,t,n,o,i)}function kc(e){e.f||(e.f=!0,e.a.Ca(e.l));var t=e.a;return e.a.ka().o((function(n){throw e.a==t&&e.reset(),n}))}function xc(e){e.a.Ub()&&kc(e).o((function(t){var n=new Fo("unknown",null,null,null,new C("operation-not-supported-in-this-environment"));Dc(t)&&e.s(n)})),e.a.Qb()||Vc(e.b)}function Oc(e,t){Q(e.h,t)||e.h.push(t),e.f||function(e){return e.b.get(Tc,e.a).then((function(e){return"pending"==e}))}(e.g).then((function(t){t?Sc(e.g).then((function(){kc(e).o((function(t){var n=new Fo("unknown",null,null,null,new C("operation-not-supported-in-this-environment"));Dc(t)&&e.s(n)}))})):xc(e)})).o((function(){xc(e)}))}function Nc(e,t){Y(e.h,(function(e){return e==t}))}Ic.prototype.reset=function(){this.f=!1,this.a.Qa(this.l),this.a=Cc(this.D,this.u,this.m),this.i={}},Ic.prototype.s=function(e){if(!e)throw new C("invalid-auth-event");if(6e5<=S()-this.w&&(this.i={},this.w=0),e&&e.getUid()&&this.i.hasOwnProperty(e.getUid()))return!1;for(var t=!1,n=0;n<this.h.length;n++){var r=this.h[n];if(r.Cb(e.c,e.b)){(t=this.c[e.c])&&(t.h(e,r),e&&(e.f||e.b)&&(this.i[e.getUid()]=!0,this.w=S())),t=!0;break}}return Vc(this.b),t};var Ac=new Ur(2e3,1e4),Pc=new Ur(3e4,6e4);function Rc(e,t,n,r,i,o,a){return e.a.Jb(t,n,r,(function(){e.f||(e.f=!0,e.a.Ca(e.l))}),(function(){e.reset()}),i,o,a)}function Dc(e){return!(!e||"auth/cordova-not-ready"!=e.code)}function Lc(e,t,n,r,i){var o;return function(e){return e.b.set(Tc,"pending",e.a)}(e.g).then((function(){return e.a.Kb(t,n,r,i).o((function(t){if(Dc(t))throw new C("operation-not-supported-in-this-environment");return o=t,Sc(e.g).then((function(){throw o}))})).then((function(){return e.a.Xb()?new _t((function(){})):Sc(e.g).then((function(){return e.pa()})).then((function(){})).o((function(){}))}))}))}function Mc(e,t,n,r,i){return e.a.Lb(r,(function(e){t.la(n,null,e,i)}),Ac.get())}Ic.prototype.pa=function(){return this.b.pa()};var jc={};function Fc(e,t,n){var r=t+":"+n;return jc[r]||(jc[r]=new Ic(e,t,n)),jc[r]}function Uc(){this.b=null,this.f=[],this.c=[],this.a=null,this.i=this.g=!1}function Vc(e){e.g||(e.g=!0,zc(e,!1,null,null))}function qc(e){e.g&&!e.i&&zc(e,!1,null,null)}function Bc(e,t){if(e.b=function(){return kt(t)},e.f.length)for(var n=0;n<e.f.length;n++)e.f[n](t)}function zc(e,t,n,r){t?r?function(e,t){if(e.b=function(){return xt(t)},e.c.length)for(var n=0;n<e.c.length;n++)e.c[n](t)}(e,r):Bc(e,n):Bc(e,{user:null}),e.f=[],e.c=[]}function Wc(){}function Hc(){this.Bb=!1,Object.defineProperty(this,"appVerificationDisabled",{get:function(){return this.Bb},set:function(e){this.Bb=e},enumerable:!1})}function Gc(e,t){this.a=t,Kr(this,"verificationId",e)}function Kc(e,t,n,r){return new Do(e).cb(t,n).then((function(e){return new Gc(e,r)}))}function Qc(e){var t=Bi(e);if(!(t&&t.exp&&t.auth_time&&t.iat))throw new C("internal-error","An internal error occurred. The token obtained by Firebase appears to be malformed. Please retry the operation.");Qr(this,{token:e,expirationTime:qr(1e3*t.exp),authTime:qr(1e3*t.auth_time),issuedAtTime:qr(1e3*t.iat),signInProvider:t.firebase&&t.firebase.sign_in_provider?t.firebase.sign_in_provider:null,signInSecondFactor:t.firebase&&t.firebase.sign_in_second_factor?t.firebase.sign_in_second_factor:null,claims:t})}function $c(e,t,n){var r=t&&t[Xc];if(!r)throw new C("argument-error","Internal assert: Invalid MultiFactorResolver");this.a=e,this.f=ve(t),this.g=n,this.c=new ro(null,r),this.b=[];var i=this;W(t[Yc]||[],(function(e){(e=Jr(e))&&i.b.push(e)})),Kr(this,"auth",this.a),Kr(this,"session",this.c),Kr(this,"hints",this.b)}Uc.prototype.reset=function(){this.b=null,this.a&&(this.a.cancel(),this.a=null)},Uc.prototype.h=function(e,t){if(e){this.reset(),this.g=!0;var n=e.c,r=e.b,i=e.a&&"auth/web-storage-unsupported"==e.a.code,o=e.a&&"auth/operation-not-supported-in-this-environment"==e.a.code;this.i=!(!i&&!o),"unknown"!=n||i||o?e.a?(zc(this,!0,null,e.a),kt()):t.Da(n,r)?function(e,t,n){n=n.Da(t.c,t.b);var r=t.g,i=t.f,o=t.i,a=t.S(),s=!!t.c.match(/Redirect$/);n(r,i,a,o).then((function(t){zc(e,s,t,null)})).o((function(t){zc(e,s,null,t)}))}(this,e,t):xt(new C("invalid-auth-event")):(zc(this,!1,null,null),kt())}else xt(new C("invalid-auth-event"))},Uc.prototype.pa=function(){var e=this;return new _t((function(t,n){e.b?e.b().then(t,n):(e.f.push(t),e.c.push(n),function(e){var t=new C("timeout");e.a&&e.a.cancel(),e.a=In(Pc.get()).then((function(){e.b||(e.g=!0,zc(e,!0,null,t))}))}(e))}))},Wc.prototype.h=function(e,t){if(e){var n=e.c,r=e.b;e.a?(t.la(e.c,null,e.a,e.b),kt()):t.Da(n,r)?function(e,t){var n=e.b,r=e.c;t.Da(r,n)(e.g,e.f,e.S(),e.i).then((function(e){t.la(r,e,null,n)})).o((function(e){t.la(r,null,e,n)}
2))}(e,t):xt(new C("invalid-auth-event"))}else xt(new C("invalid-auth-event"))},Gc.prototype.confirm=function(e){return e=Lo(this.verificationId,e),this.a(e)};var Yc="mfaInfo",Xc="mfaPendingCredential";function Jc(e,t,n,r){C.call(this,"multi-factor-auth-required",r,t),this.b=new $c(e,t,n),Kr(this,"resolver",this.b)}function Zc(e,t,n){if(e&&g(e.serverResponse)&&"auth/multi-factor-auth-required"===e.code)try{return new Jc(t,e.serverResponse,n,e.message)}catch(r){}return null}function el(){}function tl(e){Kr(this,"factorId",e.ea),this.a=e}function nl(e){if(tl.call(this,e),this.a.ea!=Do.PROVIDER_ID)throw new C("argument-error","firebase.auth.PhoneMultiFactorAssertion requires a valid firebase.auth.PhoneAuthCredential")}function rl(e,t){for(var n in $t.call(this,e),t)this[n]=t[n]}function il(e,t){this.a=e,this.b=[],this.c=E(this.wc,this),un(this.a,"userReloaded",this.c);var n=[];t&&t.multiFactor&&t.multiFactor.enrolledFactors&&W(t.multiFactor.enrolledFactors,(function(e){var t=null,r={};if(e){e.uid&&(r[ti]=e.uid),e.displayName&&(r[Zr]=e.displayName),e.enrollmentTime&&(r[ei]=new Date(e.enrollmentTime).toISOString()),e.phoneNumber&&(r[ni]=e.phoneNumber);try{t=new ri(r)}catch(i){}e=t}else e=null;e&&n.push(e)})),ol(this,n)}function ol(e,t){e.b=t,Kr(e,"enrolledFactors",t)}function al(e,t,n){if(this.h=e,this.i=t,this.g=n,this.c=3e4,this.f=96e4,this.b=null,this.a=this.c,this.f<this.c)throw Error("Proactive refresh lower bound greater than upper bound!")}function sl(e){this.c=e,this.b=this.a=null}function ul(e){return e.b&&1e3*e.b.c||0}function cl(e,t){var n=t.refreshToken;e.b=qi(t[Ya]||""),e.a=n}function ll(e,t){return function(e,t){return new _t((function(n,r){"refresh_token"==t.grant_type&&t.refresh_token||"authorization_code"==t.grant_type&&t.code?rs(e,e.u+"?key="+encodeURIComponent(e.c),(function(e){e?e.error?r(tu(e)):e.access_token&&e.refresh_token?n(e):r(new C("internal-error")):r(new C("network-request-failed"))}),"POST",Yn(t).toString(),e.g,e.m.get()):r(new C("internal-error"))}))}(e.c,t).then((function(t){return e.b=qi(t.access_token),e.a=t.refresh_token,{accessToken:e.b.toString(),refreshToken:e.a}})).o((function(t){throw"auth/user-token-expired"==t.code&&(e.a=null),t}))}function hl(e,t){this.a=e||null,this.b=t||null,Qr(this,{lastSignInTime:qr(t||null),creationTime:qr(e||null)})}function fl(e,t,n,r,i,o){Qr(this,{uid:e,displayName:r||null,photoURL:i||null,email:n||null,phoneNumber:o||null,providerId:t})}function pl(e,t,n){this.N=[],this.l=e.apiKey,this.m=e.appName,this.s=e.authDomain||null,e=r.SDK_VERSION?Ir(r.SDK_VERSION):null,this.a=new Qa(this.l,P(x),e),this.b=new sl(this.a),_l(this,t[Ya]),cl(this.b,t),Kr(this,"refreshToken",this.b.a),Tl(this,n||{}),_n.call(this),this.P=!1,this.s&&Or()&&(this.i=Fc(this.s,this.l,this.m)),this.R=[],this.h=null,this.B=function(e){return new al((function(){return e.I(!0)}),(function(e){return!(!e||"auth/network-request-failed"!=e.code)}),(function(){var t=ul(e.b)-S()-3e5;return 0<t?t:0}))}(this),this.Z=E(this.Ma,this);var i=this;this.oa=null,this.za=function(e){i.va(e.g)},this.aa=null,this.W=[],this.ya=function(e){vl(i,e.c)},this.$=null,this.O=new il(this,n),Kr(this,"multiFactor",this.O)}function dl(e,t){e.aa&&hn(e.aa,"languageCodeChanged",e.za),(e.aa=t)&&un(t,"languageCodeChanged",e.za)}function vl(e,t){e.W=t,ns(e.a,r.SDK_VERSION?Ir(r.SDK_VERSION,e.W):null)}function gl(e,t){e.$&&hn(e.$,"frameworkChanged",e.ya),(e.$=t)&&un(t,"frameworkChanged",e.ya)}function yl(e){try{return r.app(e.m).auth()}catch(t){throw new C("internal-error","No firebase.auth.Auth instance is available for the Firebase App '"+e.m+"'!")}}function ml(e){e.D||e.B.b||(e.B.start(),hn(e,"tokenChanged",e.Z),un(e,"tokenChanged",e.Z))}function bl(e){hn(e,"tokenChanged",e.Z),e.B.stop()}function _l(e,t){e.xa=t,Kr(e,"_lat",t)}function wl(e){for(var t=[],n=0;n<e.R.length;n++)t.push(e.R[n](e));return Nt(t).then((function(){return e}))}function El(e){e.i&&!e.P&&(e.P=!0,Oc(e.i,e))}function Tl(e,t){Qr(e,{uid:t.uid,displayName:t.displayName||null,photoURL:t.photoURL||null,email:t.email||null,emailVerified:t.emailVerified||!1,phoneNumber:t.phoneNumber||null,isAnonymous:t.isAnonymous||!1,tenantId:t.tenantId||null,metadata:new hl(t.createdAt,t.lastLoginAt),providerData:[]}),e.a.b=e.tenantId}function Sl(){}function Il(e){return kt().then((function(){if(e.D)throw new C("app-deleted")}))}function Cl(e){return G(e.providerData,(function(e){return e.providerId}))}function kl(e,t){t&&(xl(e,t.providerId),e.providerData.push(t))}function xl(e,t){Y(e.providerData,(function(e){return e.providerId==t}))}function Ol(e,t,n){("uid"!=t||n)&&e.hasOwnProperty(t)&&Kr(e,t,n)}function Nl(e,t){e!=t&&(Qr(e,{uid:t.uid,displayName:t.displayName,photoURL:t.photoURL,email:t.email,emailVerified:t.emailVerified,phoneNumber:t.phoneNumber,isAnonymous:t.isAnonymous,tenantId:t.tenantId,providerData:[]}),t.metadata?Kr(e,"metadata",function(e){return new hl(e.a,e.b)}(t.metadata)):Kr(e,"metadata",new hl),W(t.providerData,(function(t){kl(e,t)})),function(e,t){e.b=t.b,e.a=t.a}(e.b,t.b),Kr(e,"refreshToken",e.b.a),ol(e.O,t.O.b))}function Al(e){return e.I().then((function(t){var n=e.isAnonymous;return function(e,t){return Zs(e.a,Ns,{idToken:t}).then(E(e.Ic,e))}(e,t).then((function(){return n||Ol(e,"isAnonymous",!1),t}))}))}function Pl(e,t){t[Ya]&&e.xa!=t[Ya]&&(cl(e.b,t),e.dispatchEvent(new rl("tokenChanged")),_l(e,t[Ya]),Ol(e,"refreshToken",e.b.a))}function Rl(e,t){return Al(e).then((function(){if(Q(Cl(e),t))return wl(e).then((function(){throw new C("provider-already-linked")}))}))}function Dl(e,t,n){return $r({user:e,credential:Mo(t),additionalUserInfo:t=Ki(t),operationType:n})}function Ll(e,t){return Pl(e,t),e.reload().then((function(){return e}))}function Ml(e,t,n,i,o){if(!Or())return xt(new C("operation-not-supported-in-this-environment"));if(e.h&&!o)return xt(e.h);var a=Gi(n.providerId),s=Mr(e.uid+":::"),u=null;(!Pr()||yr())&&e.s&&n.isOAuthProvider&&(u=du(e.s,e.l,e.m,t,n,null,s,r.SDK_VERSION||null,null,null,e.tenantId));var c=fr(u,a&&a.ta,a&&a.sa);return i=i().then((function(){if(Fl(e),!o)return e.I().then((function(){}))})).then((function(){return Rc(e.i,c,t,n,s,!!u,e.tenantId)})).then((function(){return new _t((function(n,r){e.la(t,null,new C("cancelled-popup-request"),e.g||null),e.f=n,e.w=r,e.g=s,e.c=Mc(e.i,e,t,c,s)}))})).then((function(e){return c&&hr(c),e?$r(e):null})).o((function(e){throw c&&hr(c),e})),Ul(e,i,o)}function jl(e,t,n,r,i){if(!Or())return xt(new C("operation-not-supported-in-this-environment"));if(e.h&&!i)return xt(e.h);var o=null,a=Mr(e.uid+":::");return r=r().then((function(){if(Fl(e),!i)return e.I().then((function(){}))})).then((function(){return e.fa=a,wl(e)})).then((function(t){return e.ga&&(t=(t=e.ga).b.set(Bl,e.v(),t.a)),t})).then((function(){return Lc(e.i,t,n,a,e.tenantId)})).o((function(t){if(o=t,e.ga)return zl(e.ga);throw o})).then((function(){if(o)throw o})),Ul(e,r,i)}function Fl(e){if(!e.i||!e.P){if(e.i&&!e.P)throw new C("internal-error");throw new C("auth-domain-config-required")}}function Ul(e,t,n){var r=function(e,t,n){return e.h&&!n?(t.cancel(),xt(e.h)):t.o((function(t){throw!t||"auth/user-disabled"!=t.code&&"auth/user-token-expired"!=t.code||(e.h||e.dispatchEvent(new rl("userInvalidated")),e.h=t),t}))}
2(e,t,n);return e.N.push(r),r.ma((function(){$(e.N,r)})),r.o((function(t){var n=null;throw t&&"auth/multi-factor-auth-required"===t.code&&(n=Zc(t.v(),yl(e),E(e.hc,e))),n||t}))}function Vl(e){if(!e.apiKey)return null;var t={apiKey:e.apiKey,authDomain:e.authDomain,appName:e.appName},n={};if(!e.stsTokenManager||!e.stsTokenManager.accessToken)return null;n[Ya]=e.stsTokenManager.accessToken,n.refreshToken=e.stsTokenManager.refreshToken||null;var r=new pl(t,n,e);return e.providerData&&W(e.providerData,(function(e){e&&kl(r,$r(e))})),e.redirectEventId&&(r.fa=e.redirectEventId),r}function ql(e){this.a=e,this.b=Yu()}$c.prototype.Pc=function(e){var t=this;return e.ob(this.a.b,this.c).then((function(e){var n=ve(t.f);return delete n[Yc],delete n[Xc],ye(n,e),t.g(n)}))},I(Jc,C),el.prototype.ob=function(e,t,n){return t.type==io?function(e,t,n,r){return n.Fa().then((function(n){return n={idToken:n},"undefined"!==typeof r&&(n.displayName=r),ye(n,{phoneVerificationInfo:Ro(e.a)}),Zs(t,xs,n)}))}(this,e,t,n):function(e,t,n){return n.Fa().then((function(n){return ye(n={mfaPendingCredential:n},{phoneVerificationInfo:Ro(e.a)}),Zs(t,Os,n)}))}(this,e,t)},I(tl,el),I(nl,tl),I(rl,$t),(t=il.prototype).wc=function(e){ol(this,function(e){var t=[];return W(e.mfaInfo||[],(function(e){(e=Jr(e))&&t.push(e)})),t}(e.ed))},t.Ob=function(){return this.a.I().then((function(e){return new ro(e,null)}))},t.dc=function(e,t){var n=this,r=this.a.a;return this.Ob().then((function(n){return e.ob(r,n,t)})).then((function(e){return Pl(n.a,e),n.a.reload()}))},t.$c=function(e){var t=this,n="string"===typeof e?e:e.uid,r=this.a.a;return this.a.I().then((function(e){return Zs(r,Js,{idToken:e,mfaEnrollmentId:n})})).then((function(e){var r=H(t.b,(function(e){return e.uid!=n}));return ol(t,r),Pl(t.a,e),t.a.reload().o((function(e){if("auth/user-token-expired"!=e.code)throw e}))}))},t.v=function(){return{multiFactor:{enrolledFactors:G(this.b,(function(e){return e.v()}))}}},al.prototype.start=function(){this.a=this.c,function e(t,n){t.stop(),t.b=In(function(e,t){return t?(e.a=e.c,e.g()):(t=e.a,e.a*=2,e.a>e.f&&(e.a=e.f),t)}(t,n)).then((function(){return function(){var e=c.document,t=null;return Vr()||!e?kt():new _t((function(n){t=function(){Vr()&&(e.removeEventListener("visibilitychange",t,!1),n())},e.addEventListener("visibilitychange",t,!1)})).o((function(n){throw e.removeEventListener("visibilitychange",t,!1),n}))}()})).then((function(){return t.h()})).then((function(){e(t,!0)})).o((function(n){t.i(n)&&e(t,!1)}))}(this,!0)},al.prototype.stop=function(){this.b&&(this.b.cancel(),this.b=null)},sl.prototype.v=function(){return{apiKey:this.c.c,refreshToken:this.a,accessToken:this.b&&this.b.toString(),expirationTime:ul(this)}},sl.prototype.getToken=function(e){return e=!!e,this.b&&!this.a?xt(new C("user-token-expired")):e||!this.b||S()>ul(this)-3e4?this.a?ll(this,{grant_type:"refresh_token",refresh_token:this.a}):kt(null):kt({accessToken:this.b.toString(),refreshToken:this.a})},hl.prototype.v=function(){return{lastLoginAt:this.b,createdAt:this.a}},I(pl,_n),pl.prototype.va=function(e){this.oa=e,ts(this.a,e)},pl.prototype.ja=function(){return this.oa},pl.prototype.Ea=function(){return J(this.W)},pl.prototype.Ma=function(){this.B.b&&(this.B.stop(),this.B.start())},Kr(pl.prototype,"providerId","firebase"),(t=pl.prototype).reload=function(){var e=this;return Ul(this,Il(this).then((function(){return Al(e).then((function(){return wl(e)})).then(Sl)})))},t.mc=function(e){return this.I(e).then((function(e){return new Qc(e)}))},t.I=function(e){var t=this;return Ul(this,Il(this).then((function(){return t.b.getToken(e)})).then((function(e){if(!e)throw new C("internal-error");return e.accessToken!=t.xa&&(_l(t,e.accessToken),t.dispatchEvent(new rl("tokenChanged"))),Ol(t,"refreshToken",e.refreshToken),e.accessToken})))},t.Ic=function(e){if(!(e=e.users)||!e.length)throw new C("internal-error");Tl(this,{uid:(e=e[0]).localId,displayName:e.displayName,photoURL:e.photoUrl,email:e.email,emailVerified:!!e.emailVerified,phoneNumber:e.phoneNumber,lastLoginAt:e.lastLoginAt,createdAt:e.createdAt,tenantId:e.tenantId});for(var t=function(e){return(e=e.providerUserInfo)&&e.length?G(e,(function(e){return new fl(e.rawId,e.providerId,e.email,e.displayName,e.photoUrl,e.phoneNumber)})):[]}(e),n=0;n<t.length;n++)kl(this,t[n]);Ol(this,"isAnonymous",!(this.email&&e.passwordHash)&&!(this.providerData&&this.providerData.length)),this.dispatchEvent(new rl("userReloaded",{ed:e}))},t.Jc=function(e){return Hr("firebase.User.prototype.reauthenticateAndRetrieveDataWithCredential is deprecated. Please use firebase.User.prototype.reauthenticateWithCredential instead."),this.pb(e)},t.pb=function(e){var t=this,n=null;return Ul(this,e.c(this.a,this.uid).then((function(e){return Pl(t,e),n=Dl(t,e,"reauthenticate"),t.h=null,t.reload()})).then((function(){return n})),!0)},t.Ac=function(e){return Hr("firebase.User.prototype.linkAndRetrieveDataWithCredential is deprecated. Please use firebase.User.prototype.linkWithCredential instead."),this.mb(e)},t.mb=function(e){var t=this,n=null;return Ul(this,Rl(this,e.providerId).then((function(){return t.I()})).then((function(n){return e.b(t.a,n)})).then((function(e){return n=Dl(t,e,"link"),Ll(t,e)})).then((function(){return n})))},t.Bc=function(e,t){var n=this;return Ul(this,Rl(this,"phone").then((function(){return Kc(yl(n),e,t,E(n.mb,n))})))},t.Kc=function(e,t){var n=this;return Ul(this,kt().then((function(){return Kc(yl(n),e,t,E(n.pb,n))}
2)),!0)},t.xb=function(e){var t=this;return Ul(this,this.I().then((function(n){return t.a.xb(n,e)})).then((function(e){return Pl(t,e),t.reload()})))},t.cd=function(e){var t=this;return Ul(this,this.I().then((function(n){return e.b(t.a,n)})).then((function(e){return Pl(t,e),t.reload()})))},t.yb=function(e){var t=this;return Ul(this,this.I().then((function(n){return t.a.yb(n,e)})).then((function(e){return Pl(t,e),t.reload()})))},t.zb=function(e){if(void 0===e.displayName&&void 0===e.photoURL)return Il(this);var t=this;return Ul(this,this.I().then((function(n){return t.a.zb(n,{displayName:e.displayName,photoUrl:e.photoURL})})).then((function(e){return Pl(t,e),Ol(t,"displayName",e.displayName||null),Ol(t,"photoURL",e.photoUrl||null),W(t.providerData,(function(e){"password"===e.providerId&&(Kr(e,"displayName",t.displayName),Kr(e,"photoURL",t.photoURL))})),wl(t)})).then(Sl))},t.ad=function(e){var t=this;return Ul(this,Al(this).then((function(n){return Q(Cl(t),e)?function(e,t,n){return Zs(e,Is,{idToken:t,deleteProvider:n})}(t.a,n,[e]).then((function(e){var n={};return W(e.providerUserInfo||[],(function(e){n[e.providerId]=!0})),W(Cl(t),(function(e){n[e]||xl(t,e)})),n[Do.PROVIDER_ID]||Kr(t,"phoneNumber",null),wl(t)})):wl(t).then((function(){throw new C("no-such-provider")}))})))},t.delete=function(){var e=this;return Ul(this,this.I().then((function(t){return Zs(e.a,Ss,{idToken:t})})).then((function(){e.dispatchEvent(new rl("userDeleted"))}))).then((function(){for(var t=0;t<e.N.length;t++)e.N[t].cancel("app-deleted");dl(e,null),gl(e,null),e.N=[],e.D=!0,bl(e),Kr(e,"refreshToken",null),e.i&&Nc(e.i,e)}))},t.Cb=function(e,t){return!!("linkViaPopup"==e&&(this.g||null)==t&&this.f||"reauthViaPopup"==e&&(this.g||null)==t&&this.f||"linkViaRedirect"==e&&(this.fa||null)==t||"reauthViaRedirect"==e&&(this.fa||null)==t)},t.la=function(e,t,n,r){"linkViaPopup"!=e&&"reauthViaPopup"!=e||r!=(this.g||null)||(n&&this.w?this.w(n):t&&!n&&this.f&&this.f(t),this.c&&(this.c.cancel(),this.c=null),delete this.f,delete this.w)},t.Da=function(e,t){return"linkViaPopup"==e&&t==(this.g||null)?E(this.Hb,this):"reauthViaPopup"==e&&t==(this.g||null)?E(this.Ib,this):"linkViaRedirect"==e&&(this.fa||null)==t?E(this.Hb,this):"reauthViaRedirect"==e&&(this.fa||null)==t?E(this.Ib,this):null},t.Cc=function(e){var t=this;return Ml(this,"linkViaPopup",e,(function(){return Rl(t,e.providerId).then((function(){return wl(t)}))}),!1)},t.Lc=function(e){return Ml(this,"reauthViaPopup",e,(function(){return kt()}),!0)},t.Dc=function(e){var t=this;return jl(this,"linkViaRedirect",e,(function(){return Rl(t,e.providerId)}),!1)},t.Mc=function(e){return jl(this,"reauthViaRedirect",e,(function(){return kt()}),!0)},t.Hb=function(e,t,n,r){var i=this;this.c&&(this.c.cancel(),this.c=null);var o=null;return Ul(this,this.I().then((function(n){return ys(i.a,{requestUri:e,postBody:r,sessionId:t,idToken:n})})).then((function(e){return o=Dl(i,e,"link"),Ll(i,e)})).then((function(){return o})))},t.Ib=function(e,t,n,r){var i=this;this.c&&(this.c.cancel(),this.c=null);var o=null;return Ul(this,kt().then((function(){return so(ms(i.a,{requestUri:e,sessionId:t,postBody:r,tenantId:n}),i.uid)})).then((function(e){return o=Dl(i,e,"reauthenticate"),Pl(i,e),i.h=null,i.reload()})).then((function(){return o})),!0)},t.qb=function(e){var t=this,n=null;return Ul(this,this.I().then((function(t){return n=t,"undefined"===typeof e||de(e)?{}:ji(new ki(e))})).then((function(e){return t.a.qb(n,e)})).then((function(e){if(t.email!=e)return t.reload()})).then((function(){})))},t.Ab=function(e,t){var n=this,r=null;return Ul(this,this.I().then((function(e){return r=e,"undefined"===typeof t||de(t)?{}:ji(new ki(t))})).then((function(t){return n.a.Ab(r,e,t)})).then((function(e){if(n.email!=e)return n.reload()})).then((function(){})))},t.hc=function(e){var t=null,n=this;return Ul(this,e=so(kt(e),n.uid).then((function(e){return t=Dl(n,e,"reauthenticate"),Pl(n,e),n.h=null,n.reload()})).then((function(){return t})),!0)},t.toJSON=function(){return this.v()},t.v=function(){var e={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.s,stsTokenManager:this.b.v(),redirectEventId:this.fa||null};return this.metadata&&ye(e,this.metadata.v()),W(this.providerData,(function(t){e.providerData.push(function(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}(t))})),ye(e,this.O.v()),e};var Bl={name:"redirectUser",F:"session"};function zl(e){return Zu(e.b,Bl,e.a)}function Wl(e){this.a=e,this.b=Yu(),this.c=null,this.f=function(e){var t=Kl("local"),n=Kl("session"),r=Kl("none");return function(e,t,n){var r=Ju(t,n),i=Xu(e,t.F);return e.get(t,n).then((function(o){var a=null;try{a=Lr(c.localStorage.getItem(r))}catch(s){}if(a&&!o)return c.localStorage.removeItem(r),e.set(t,a,n);a&&o&&"localStorage"!=i.type&&c.localStorage.removeItem(r)}))}(e.b,t,e.a).then((function(){return e.b.get(n,e.a)})).then((function(i){return i?n:e.b.get(r,e.a).then((function(n){return n?r:e.b.get(t,e.a).then((function(n){return n?t:e.b.get(Gl,e.a).then((function(e){return e?Kl(e):t}))}))}))})).then((function(t){return e.c=t,Hl(e,t.F)})).o((function(){e.c||(e.c=t)}))}(this),this.b.addListener(Kl("local"),this.a,E(this.g,this))}function Hl(e,t){var n,r=[];for(n in Qu)Qu[n]!==t&&r.push(Zu(e.b,Kl(Qu[n]),e.a));return r.push(Zu(e.b,Gl,e.a)),function(e){return new _t((function(t,n){var r=e.length,i=[];if(r)for(var o=function(e,n){r--,i[e]=n,0==r&&t(i)},a=function(e){n(e)},s=0;s<e.length;s++)Ot(e[s],T(o,s),a);else t(i)}))}(r)}Wl.prototype.g=function(){var e=this,t=Kl("local");Xl(this,(function(){return kt().then((function(){return e.c&&"local"!=e.c.F?e.b.get(t,e.a):null})).then((function(n){if(n)return Hl(e,"local").then((function(){e.c=t}))}))}))};var Gl={name:"persistence",F:"session"};function Kl(e){return{name:"authUser",F:e}}function Ql(e,t){return Xl(e,(function(){return e.b.set(e.c,t.v(),e.a)}))}function $l(e){return Xl(e,(function(){return Zu(e.b,e.c,e.a)}))}function Yl(e,t){return Xl(e,(function(){return e.b.get(e.c,e.a).then((function(e){return e&&t&&(e.authDomain=t),Vl(e||{})}))}))}function Xl(e,t){return e.f=e.f.then(t,t),e.f}function Jl(e){if(this.l=!1,Kr(this,"settings",new Hc),Kr(this,"app",e),!ah(this).options||!ah(this).options.apiKey)throw new C("invalid-api-key");e=r.SDK_VERSION?Ir(r.SDK_VERSION):null,this.b=new Qa(ah(this).options&&ah(this).options.apiKey,P(x),e),this.P=[],this.m=[],this.O=[],this.$b=r.INTERNAL.createSubscribe(E(this.xc,this)),this.W=void 0,this.ac=r.INTERNAL.createSubscribe(E(this.yc,this)),ih(this,null),this.i=new Wl(ah(this).options.apiKey+":"+ah(this).name),this.B=new ql(ah(this).options.apiKey+":"+ah(this).name),this.Z=lh(this,function(e){var t=ah(e).options.authDomain,n=function(e){var t=function(e,t){return e.b.get(Bl,e.a).then((function(e){return e&&t&&(e.authDomain=t),Vl(e||{})}))}(e.B,ah(e).options.authDomain).then((function(t){return(e.D=t)&&(t.ga=e.B),zl(e.B)}));return lh(e,t)}(e).then((function(){return Yl(e.i,t)})).then((function(t){return t?(t.ga=e.B,e.D&&(e.D.fa||null)==(t.fa||null)?t:t.reload().then((function(){return Ql(e.i,t).then((function(){return t}))})).o((function(n){return"auth/network-request-failed"==n.code?t:$l(e.i)}))):null})).then((function(t){ih(e,t||null)}));return lh(e,n)}(this)),this.h=lh(this,function(e){return e.Z.then((function(){return nh(e)})).o((function(){})).then((function(){if(!e.l)return e.oa()})).o((function(){})).then((function(){if(!e.l){e.aa=!0;var t=e.i;t.b.addListener(Kl("local"),t.a,e.oa)}}))}(this)),this.aa=!1,this.oa=E(this.Xc,this),this.Ma=E(this.ca,this),this.xa=E(this.jc,this),this.ya=E(this.uc,this),this.za=E(this.vc,this),this.a=null,function(e){var t=ah(e).options.authDomain,n=ah(e).options.apiKey;t&&Or()&&(e.Zb=e.Z.then((function(){if(!e.l){if(e.a=Fc(t,n,ah(e).name),Oc(e.a,e),sh(e)&&El(sh(e)),e.D){El(e.D);var r=e.D;r.va(e.ja()),dl(r,e),vl(r=e.D,e.N),gl(r,e),e.D=null}return e.a}})))}(this),this.INTERNAL={},this.INTERNAL.delete=E(this.delete,this),this.INTERNAL.logFramework=E(this.Ec,this),this.s=0,_n.call(this),function(e){Object.defineProperty(e,"lc",{get:function(){return this.ja()},set:function(e){this.va(e)},enumerable:!1}),e.$=null,Object.defineProperty(e,"ti",{get:function(){return this.S()},set:function(e){this.ub(e)},enumerable:!1}),e.R=null}(this),this.N=[]}function Zl(e){$t.call(this,"languageCodeChanged"),this.g=e}function eh(e){$t.call(this,"frameworkChanged"),this.c=e}function th(e){return e.Zb||xt(new C("auth-domain-config-required"))}function nh(e){if(!Or())return xt(new C("operation-not-supported-in-this-environment"));var t=th(e).then((function(){return e.a.pa()})).then((function(e){return e?$r(e):null}));return lh(e,t)}function rh(e,t){var n={};return n.apiKey=ah(e).options.apiKey,n.authDomain=ah(e).options.authDomain,n.appName=ah(e).name,e.Z.then((function(){return function(e,t,n,r){var i=new pl(e,t);return n&&(i.ga=n),r&&vl(i,r),i.reload().then((function(){return i}))}(n,t,e.B,e.Ea())})).then((function(t){return sh(e)&&t.uid==sh(e).uid?(Nl(sh(e),t),e.ca(t)):(ih(e,t),El(t),e.ca(t))})).then((function(){ch(e)}))}
2function ih(e,t){sh(e)&&(function(e,t){Y(e.R,(function(e){return e==t}))}(sh(e),e.Ma),hn(sh(e),"tokenChanged",e.xa),hn(sh(e),"userDeleted",e.ya),hn(sh(e),"userInvalidated",e.za),bl(sh(e))),t&&(t.R.push(e.Ma),un(t,"tokenChanged",e.xa),un(t,"userDeleted",e.ya),un(t,"userInvalidated",e.za),0<e.s&&ml(t)),Kr(e,"currentUser",t),t&&(t.va(e.ja()),dl(t,e),vl(t,e.N),gl(t,e))}function oh(e,t){var n=null,r=null;return lh(e,t.then((function(t){return n=Mo(t),r=Ki(t),rh(e,t)}),(function(t){var n=null;throw t&&"auth/multi-factor-auth-required"===t.code&&(n=Zc(t.v(),e,E(e.ic,e))),n||t})).then((function(){return $r({user:sh(e),credential:n,additionalUserInfo:r,operationType:"signIn"})})))}function ah(e){return e.app}function sh(e){return e.currentUser}function uh(e){return sh(e)&&sh(e)._lat||null}function ch(e){if(e.aa){for(var t=0;t<e.m.length;t++)e.m[t]&&e.m[t](uh(e));if(e.W!==e.getUid()&&e.O.length)for(e.W=e.getUid(),t=0;t<e.O.length;t++)e.O[t]&&e.O[t](uh(e))}}function lh(e,t){return e.P.push(t),t.ma((function(){$(e.P,t)})),t}function hh(){}function fh(){this.a={},this.b=1e12}Wl.prototype.tb=function(e){var t=null,n=this;return function(e){var t=new C("invalid-persistence-type"),n=new C("unsupported-persistence-type");e:{for(r in Qu)if(Qu[r]==e){var r=!0;break e}r=!1}if(!r||"string"!==typeof e)throw t;switch(br()){case"ReactNative":if("session"===e)throw n;break;case"Node":if("none"!==e)throw n;break;case"Worker":if("session"===e||!ku()&&"none"!==e)throw n;break;default:if(!xr()&&"none"!==e)throw n}}(e),Xl(this,(function(){return e!=n.c.F?n.b.get(n.c,n.a).then((function(r){return t=r,Hl(n,e)})).then((function(){if(n.c=Kl(e),t)return n.b.set(n.c,t,n.a)})):kt()}))},I(Jl,_n),I(Zl,$t),I(eh,$t),(t=Jl.prototype).tb=function(e){return lh(this,e=this.i.tb(e))},t.va=function(e){this.$===e||this.l||(this.$=e,ts(this.b,this.$),this.dispatchEvent(new Zl(this.ja())))},t.ja=function(){return this.$},t.dd=function(){var e=c.navigator;this.va(e&&(e.languages&&e.languages[0]||e.language||e.userLanguage)||null)},t.Ec=function(e){this.N.push(e),ns(this.b,r.SDK_VERSION?Ir(r.SDK_VERSION,this.N):null),this.dispatchEvent(new eh(this.N))},t.Ea=function(){return J(this.N)},t.ub=function(e){this.R===e||this.l||(this.R=e,this.b.b=this.R)},t.S=function(){return this.R},t.toJSON=function(){return{apiKey:ah(this).options.apiKey,authDomain:ah(this).options.authDomain,appName:ah(this).name,currentUser:sh(this)&&sh(this).v()}},t.Cb=function(e,t){switch(e){case"unknown":case"signInViaRedirect":return!0;case"signInViaPopup":return this.g==t&&!!this.f;default:return!1}},t.la=function(e,t,n,r){"signInViaPopup"==e&&this.g==r&&(n&&this.w?this.w(n):t&&!n&&this.f&&this.f(t),this.c&&(this.c.cancel(),this.c=null),delete this.f,delete this.w)},t.Da=function(e,t){return"signInViaRedirect"==e||"signInViaPopup"==e&&this.g==t&&this.f?E(this.gc,this):null},t.gc=function(e,t,n,r){var i=this,o={requestUri:e,postBody:r,sessionId:t,tenantId:n};return this.c&&(this.c.cancel(),this.c=null),i.Z.then((function(){return oh(i,gs(i.b,o))}))},t.Vc=function(e){if(!Or())return xt(new C("operation-not-supported-in-this-environment"));var t=this,n=Gi(e.providerId),i=Mr(),o=null;(!Pr()||yr())&&ah(this).options.authDomain&&e.isOAuthProvider&&(o=du(ah(this).options.authDomain,ah(this).options.apiKey,ah(this).name,"signInViaPopup",e,null,i,r.SDK_VERSION||null,null,null,this.S()));var a=fr(o,n&&n.ta,n&&n.sa);return lh(this,n=th(this).then((function(n){return Rc(n,a,"signInViaPopup",e,i,!!o,t.S())})).then((function(){return new _t((function(e,n){t.la("signInViaPopup",null,new C("cancelled-popup-request"),t.g),t.f=e,t.w=n,t.g=i,t.c=Mc(t.a,t,"signInViaPopup",a,i)}))})).then((function(e){return a&&hr(a),e?$r(e):null})).o((function(e){throw a&&hr(a),e})))},t.Wc=function(e){if(!Or())return xt(new C("operation-not-supported-in-this-environment"));var t=this;return lh(this,th(this).then((function(){return function(e){return Xl(e,(function(){return e.b.set(Gl,e.c.F,e.a)}))}(t.i)})).then((function(){return Lc(t.a,"signInViaRedirect",e,void 0,t.S())})))},t.pa=function(){var e=this;return nh(this).then((function(t){return e.a&&qc(e.a.b),t})).o((function(t){throw e.a&&qc(e.a.b),t}))},t.bd=function(e){if(!e)return xt(new C("null-user"));if(this.R!=e.tenantId)return xt(new C("tenant-id-mismatch"));var t=this,n={};n.apiKey=ah(this).options.apiKey,n.authDomain=ah(this).options.authDomain,n.appName=ah(this).name;var r=function(e,t,n,r){var i=e.b,o={};return o[Ya]=i.b&&i.b.toString(),o.refreshToken=i.a,t=new pl(t||{apiKey:e.l,authDomain:e.s,appName:e.m},o),n&&(t.ga=n),r&&vl(t,r),Nl(t,e),t}(e,n,t.B,t.Ea());return lh(this,this.h.then((function(){if(ah(t).options.apiKey!=e.l)return r.reload()})).then((function(){return sh(t)&&e.uid==sh(t).uid?(Nl(sh(t),e),t.ca(e)):(ih(t,r),El(r),t.ca(r))})).then((function(){ch(t)})))},t.wb=function(){var e=this;return lh(this,this.h.then((function(){return e.a&&qc(e.a.b),sh(e)?(ih(e,null),$l(e.i).then((function(){ch(e)}))):kt()})))},t.Xc=function(){var e=this;return Yl(this.i,ah(this).options.authDomain).then((function(t){if(!e.l){var n;if(n=sh(e)&&t){n=sh(e).uid;var r=t.uid;n=void 0!==n&&null!==n&&""!==n&&void 0!==r&&null!==r&&""!==r&&n==r}if(n)return Nl(sh(e),t),sh(e).I();(sh(e)||t)&&(ih(e,t),t&&(El(t),t.ga=e.B),e.a&&Oc(e.a,e),ch(e))}}))},t.ca=function(e){return Ql(this.i,e)},t.jc=function(){ch(this),this.ca(sh(this))},t.uc=function(){this.wb()},t.vc=function(){this.wb()},t.ic=function(e){var t=this;return this.h.then((function(){return oh(t,kt(e))}))},t.xc=function(e){var t=this;this.addAuthTokenListener((function(){e.next(sh(t))}))},t.yc=function(e){var t=this;!function(e,t){e.O.push(t),lh(e,e.h.then((function(){!e.l&&Q(e.O,t)&&e.W!==e.getUid()&&(e.W=e.getUid(),t(uh(e)))})))}(this,(function(){e.next(sh(t))}))},t.Gc=function(e,t,n){var r=this;return this.aa&&Promise.resolve().then((function(){"function"===typeof e?e(sh(r)):"function"===typeof e.next&&e.next(sh(r))})),this.$b(e,t,n)},t.Fc=function(e,t,n){var r=this;return this.aa&&Promise.resolve().then((function(){r.W=r.getUid(),"function"===typeof e?e(sh(r)):"function"===typeof e.next&&e.next(sh(r))})),this.ac(e,t,n)},t.kc=function(e){var t=this;return lh(this,this.h.then((function(){return sh(t)?sh(t).I(e).then((function(e){return{accessToken:e}})):null})))},t.Rc=function(e){var t=this;return this.h.then((function(){return oh(t,Zs(t.b,Ks,{token:e}))})).then((function(e){var n=e.user;return Ol(n,"isAnonymous",!1),t.ca(n),e}))},t.Sc=function(e,t){var n=this;return this.h.then((function(){return oh(n,Zs(n.b,Qs,{email:e,password:t}))}))},t.cc=function(e,t){var n=this;return this.h.then((function(){return oh(n,Zs(n.b,Es,{email:e,password:t}))}))},t.Ya=function(e){var t=this;return this.h.then((function(){return oh(t,e.ia(t.b))}))},t.Qc=function(e){return Hr("firebase.auth.Auth.prototype.signInAndRetrieveDataWithCredential is deprecated. Please use firebase.auth.Auth.prototype.signInWithCredential instead."),this.Ya(e)},t.vb=function(){var e=this;return this.h.then((function(){var t=sh(e);if(t&&t.isAnonymous){var n=$r({providerId:null,isNewUser:!1});return $r({user:t,credential:null,additionalUserInfo:n,operationType:"signIn"})}return oh(e,e.b.vb()).then((function(t){var n=t.user;return Ol(n,"isAnonymous",!0),e.ca(n),t}))}))},t.getUid=function(){return sh(this)&&sh(this).uid||null},t.bc=function(e){this.addAuthTokenListener(e),this.s++,0<this.s&&sh(this)&&ml(sh(this))},t.Nc=function(e){var t=this;W(this.m,(function(n){n==e&&t.s--})),0>this.s&&(this.s=0),0==this.s&&sh(this)&&bl(sh(this)),this.removeAuthTokenListener(e)},t.addAuthTokenListener=function(e){var t=this;this.m.push(e),lh(this,this.h.then((function(){t.l||Q(t.m,e)&&e(uh(t))})))},t.removeAuthTokenListener=function(e){Y(this.m,(function(t){return t==e}))},t.delete=function(){this.l=!0;for(var e=0;e<this.P.length;e++)this.P[e].cancel("app-deleted");return this.P=[],this.i&&(e=this.i).b.removeListener(Kl("local"),e.a,this.oa),this.a&&(Nc(this.a,this),qc(this.a.b)),Promise.resolve()},t.fc=function(e){return lh(this,function(e,t){return Zs(e,Ts,{identifier:t,continueUri:Nr()?ur():"http://localhost"}).then((function(e){return e.signinMethods||[]}))}(this.b,e))},t.zc=function(e){return!!No(e)},t.sb=function(e,t){var n=this;return lh(this,kt().then((function(){var e=new ki(t);if(!e.c)throw new C("argument-error",Ni+" must be true when sending sign in link to email");return ji(e)})).then((function(t){return n.b.sb(e,t)})).then((function(){})))},t.fd=function(e){return this.Pa(e).then((function(e){return e.data.email}))},t.jb=function(e,t){return lh(this,this.b.jb(e,t).then((function(){})))},t.Pa=function(e){return lh(this,this.b.Pa(e).then((function(e){return new ii(e)})))},t.fb=function(e){return lh(this,this.b.fb(e).then((function(){})))},t.rb=function(e,t){var n=this;return lh(this,kt().then((function(){return"undefined"===typeof t||de(t)?{}:ji(new ki(t))})).then((function(t){return n.b.rb(e,t)})).then((function(){})))}
2,t.Uc=function(e,t){return lh(this,Kc(this,e,t,E(this.Ya,this)))},t.Tc=function(e,t){var n=this;return lh(this,kt().then((function(){var r=t||ur(),i=Oo(e,r);if(!(r=No(r)))throw new C("argument-error","Invalid email link!");if(r.tenantId!==n.S())throw new C("tenant-id-mismatch");return n.Ya(i)})))},hh.prototype.render=function(){},hh.prototype.reset=function(){},hh.prototype.getResponse=function(){},hh.prototype.execute=function(){};var ph=null;function dh(e,t){return(t=vh(t))&&e.a[t]||null}function vh(e){return(e="undefined"===typeof e?1e12:e)?e.toString():null}function gh(e,t){this.g=!1,this.c=t,this.a=this.b=null,this.h="invisible"!==this.c.size,this.f=at(e);var n=this;this.i=function(){n.execute()},this.h?this.execute():un(this.f,"click",this.i)}function yh(e){if(e.g)throw Error("reCAPTCHA mock was already deleted!")}function mh(){}function bh(){}fh.prototype.render=function(e,t){return this.a[this.b.toString()]=new gh(e,t),this.b++},fh.prototype.reset=function(e){var t=dh(this,e);e=vh(e),t&&e&&(t.delete(),delete this.a[e])},fh.prototype.getResponse=function(e){return(e=dh(this,e))?e.getResponse():null},fh.prototype.execute=function(e){(e=dh(this,e))&&e.execute()},gh.prototype.getResponse=function(){return yh(this),this.b},gh.prototype.execute=function(){yh(this);var e=this;this.a||(this.a=setTimeout((function(){e.b=function(){for(var e=50,t=[];0<e;)t.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()))),e--;return t.join("")}();var t=e.c.callback,n=e.c["expired-callback"];if(t)try{t(e.b)}catch(r){}e.a=setTimeout((function(){if(e.a=null,e.b=null,n)try{n()}catch(r){}e.h&&e.execute()}),6e4)}),500))},gh.prototype.delete=function(){yh(this),this.g=!0,clearTimeout(this.a),this.a=null,hn(this.f,"click",this.i)},Kr(mh,"FACTOR_ID","phone"),bh.prototype.g=function(){return ph||(ph=new fh),kt(ph)},bh.prototype.c=function(){};var _h=null;function wh(){this.b=c.grecaptcha?1/0:0,this.f=null,this.a="__rcb"+Math.floor(1e6*Math.random()).toString()}var Eh=new be(Ee,"https://www.google.com/recaptcha/api.js?onload=%{onload}&render=explicit&hl=%{hl}"),Th=new Ur(3e4,6e4);wh.prototype.g=function(e){var t=this;return new _t((function(n,r){var i=setTimeout((function(){r(new C("network-request-failed"))}),Th.get());!c.grecaptcha||e!==t.f&&!t.b?(c[t.a]=function(){if(c.grecaptcha){t.f=e;var o=c.grecaptcha.render;c.grecaptcha.render=function(e,n){return e=o(e,n),t.b++,e},clearTimeout(i),n(c.grecaptcha)}else clearTimeout(i),r(new C("internal-error"));delete c[t.a]},kt(qa(Ce(Eh,{onload:t.a,hl:e||""}))).o((function(){clearTimeout(i),r(new C("internal-error","Unable to load external reCAPTCHA dependencies!"))}))):(clearTimeout(i),n(c.grecaptcha))}))},wh.prototype.c=function(){this.b--};var Sh=null;function Ih(e,t,n,r,i,o,a){if(Kr(this,"type","recaptcha"),this.c=this.f=null,this.D=!1,this.u=t,this.g=null,a?(_h||(_h=new bh),a=_h):(Sh||(Sh=new wh),a=Sh),this.m=a,this.a=n||{theme:"light",type:"image"},this.h=[],this.a[xh])throw new C("argument-error","sitekey should not be provided for reCAPTCHA as one is automatically provisioned for the current project.");if(this.i="invisible"===this.a[Oh],!c.document)throw new C("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment with DOM support.");if(!at(t)||!this.i&&at(t).hasChildNodes())throw new C("argument-error","reCAPTCHA container is either not found or already contains inner elements!");this.s=new Qa(e,o||null,i||null),this.w=r||function(){return null};var s=this;this.l=[];var u=this.a[Ch];this.a[Ch]=function(e){if(Nh(s,e),"function"===typeof u)u(e);else if("string"===typeof u){var t=kr(u,c);"function"===typeof t&&t(e)}};var l=this.a[kh];this.a[kh]=function(){if(Nh(s,null),"function"===typeof l)l();else if("string"===typeof l){var e=kr(l,c);"function"===typeof e&&e()}}}var Ch="callback",kh="expired-callback",xh="sitekey",Oh="size";function Nh(e,t){for(var n=0;n<e.l.length;n++)try{e.l[n](t)}catch(r){}}function Ah(e,t){return e.h.push(t),t.ma((function(){$(e.h,t)})),t}function Ph(e){if(e.D)throw new C("internal-error","RecaptchaVerifier instance has been destroyed.")}function Rh(e,t,n){var i=!1;try{this.b=n||r.app()}catch(s){throw new C("argument-error","No firebase.app.App instance is currently initialized.")}if(!this.b.options||!this.b.options.apiKey)throw new C("invalid-api-key");n=this.b.options.apiKey;var o=this,a=null;try{a=this.b.auth().Ea()}catch(s){}try{i=this.b.auth().settings.appVerificationDisabledForTesting}catch(s){}
2a=r.SDK_VERSION?Ir(r.SDK_VERSION,a):null,Ih.call(this,n,e,t,(function(){try{var e=o.b.auth().ja()}catch(t){e=null}return e}),a,P(x),i)}function Dh(e,t,n,r){e:{n=Array.prototype.slice.call(n);for(var i=0,o=!1,a=0;a<t.length;a++)if(t[a].optional)o=!0;else{if(o)throw new C("internal-error","Argument validator encountered a required argument after an optional argument.");i++}if(o=t.length,n.length<i||o<n.length)r="Expected "+(i==o?1==i?"1 argument":i+" arguments":i+"-"+o+" arguments")+" but got "+n.length+".";else{for(i=0;i<n.length;i++)if(o=t[i].optional&&void 0===n[i],!t[i].K(n[i])&&!o){if(t=t[i],0>i||i>=Lh.length)throw new C("internal-error","Argument validator received an unsupported number of arguments.");n=Lh[i],r=(r?"":n+" argument ")+(t.name?'"'+t.name+'" ':"")+"must be "+t.J+".";break e}r=null}}if(r)throw new C("argument-error",e+" failed: "+r)}(t=Ih.prototype).Ga=function(){var e=this;return this.f?this.f:this.f=Ah(this,kt().then((function(){if(Nr()&&!mr())return vr();throw new C("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment.")})).then((function(){return e.m.g(e.w())})).then((function(t){return e.g=t,Zs(e.s,Ms,{})})).then((function(t){e.a[xh]=t.recaptchaSiteKey})).o((function(t){throw e.f=null,t})))},t.render=function(){Ph(this);var e=this;return Ah(this,this.Ga().then((function(){if(null===e.c){var t=e.u;if(!e.i){var n=at(t);t=function(e,t,n){var r=arguments,i=document,o=String(r[0]),a=r[1];if(!ot&&a&&(a.name||a.type)){if(o=["<",o],a.name&&o.push(' name="',ze(a.name),'"'),a.type){o.push(' type="',ze(a.type),'"');var s={};ye(s,a),delete s.type,a=s}o.push(">"),o=o.join("")}return o=ft(i,o),a&&("string"===typeof a?o.className=a:Array.isArray(a)?o.className=a.join(" "):st(o,a)),2<r.length&&ht(i,o,r),o}("DIV"),n.appendChild(t)}e.c=e.g.render(t,e.a)}return e.c})))},t.verify=function(){Ph(this);var e=this;return Ah(this,this.render().then((function(t){return new _t((function(n){var r=e.g.getResponse(t);if(r)n(r);else{e.l.push((function t(r){r&&(function(e,t){Y(e.l,(function(e){return e==t}))}(e,t),n(r))})),e.i&&e.g.execute(e.c)}}))})))},t.reset=function(){Ph(this),null!==this.c&&this.g.reset(this.c)},t.clear=function(){Ph(this),this.D=!0,this.m.c();for(var e=0;e<this.h.length;e++)this.h[e].cancel("RecaptchaVerifier instance has been destroyed.");if(!this.i){e=at(this.u);for(var t;t=e.firstChild;)e.removeChild(t)}},I(Rh,Ih);var Lh="First Second Third Fourth Fifth Sixth Seventh Eighth Ninth".split(" ");function Mh(e,t){return{name:e||"",J:"a valid string",optional:!!t,K:function(e){return"string"===typeof e}}}function jh(e,t){return{name:e||"",J:"a boolean",optional:!!t,K:function(e){return"boolean"===typeof e}}}function Fh(e,t){return{name:e||"",J:"a valid object",optional:!!t,K:g}}function Uh(e,t){return{name:e||"",J:"a function",optional:!!t,K:function(e){return"function"===typeof e}}}function Vh(e,t){return{name:e||"",J:"null",optional:!!t,K:function(e){return null===e}}}function qh(e){return{name:e?e+"Credential":"credential",J:e?"a valid "+e+" credential":"a valid credential",optional:!1,K:function(t){if(!t)return!1;var n=!e||t.providerId===e;return!(!t.ia||!n)}}}function Bh(e,t){return g(e)&&"string"===typeof e.type&&e.type===t&&"function"===typeof e.Fa}function zh(e){return g(e)&&"string"===typeof e.uid}function Wh(e,t,n,r){return{name:n||"",J:e.J+" or "+t.J,optional:!!r,K:function(n){return e.K(n)||t.K(n)}}}function Hh(e,t){for(var n in t){var r=t[n].name;e[r]=Qh(r,e[n],t[n].j)}}function Gh(e,t){for(var n in t){var r=t[n].name;r!==n&&Object.defineProperty(e,r,{get:T((function(e){return this[e]}),n),set:T((function(e,t,n,r){Dh(e,[n],[r],!0),this[t]=r}),r,n,t[n].gb),enumerable:!0})}}function Kh(e,t,n,r){e[t]=Qh(t,n,r)}function Qh(e,t,n){function r(){var e=Array.prototype.slice.call(arguments);return Dh(o,n,e),t.apply(this,e)}if(!n)return t;var i,o=function(e){return(e=e.split("."))[e.length-1]}(e);for(i in t)r[i]=t[i];for(i in t.prototype)r.prototype[i]=t.prototype[i];return r}Hh(Jl.prototype,{fb:{name:"applyActionCode",j:[Mh("code")]},Pa:{name:"checkActionCode",j:[Mh("code")]},jb:{name:"confirmPasswordReset",j:[Mh("code"),Mh("newPassword")]},cc:{name:"createUserWithEmailAndPassword",j:[Mh("email"),Mh("password")]}
2,fc:{name:"fetchSignInMethodsForEmail",j:[Mh("email")]},pa:{name:"getRedirectResult",j:[]},zc:{name:"isSignInWithEmailLink",j:[Mh("emailLink")]},Fc:{name:"onAuthStateChanged",j:[Wh(Fh(),Uh(),"nextOrObserver"),Uh("opt_error",!0),Uh("opt_completed",!0)]},Gc:{name:"onIdTokenChanged",j:[Wh(Fh(),Uh(),"nextOrObserver"),Uh("opt_error",!0),Uh("opt_completed",!0)]},rb:{name:"sendPasswordResetEmail",j:[Mh("email"),Wh(Fh("opt_actionCodeSettings",!0),Vh(null,!0),"opt_actionCodeSettings",!0)]},sb:{name:"sendSignInLinkToEmail",j:[Mh("email"),Fh("actionCodeSettings")]},tb:{name:"setPersistence",j:[Mh("persistence")]},Qc:{name:"signInAndRetrieveDataWithCredential",j:[qh()]},vb:{name:"signInAnonymously",j:[]},Ya:{name:"signInWithCredential",j:[qh()]},Rc:{name:"signInWithCustomToken",j:[Mh("token")]},Sc:{name:"signInWithEmailAndPassword",j:[Mh("email"),Mh("password")]},Tc:{name:"signInWithEmailLink",j:[Mh("email"),Mh("emailLink",!0)]},Uc:{name:"signInWithPhoneNumber",j:[Mh("phoneNumber"),{name:"applicationVerifier",J:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,K:function(e){return!(!e||"string"!==typeof e.type||"function"!==typeof e.verify)}}]},Vc:{name:"signInWithPopup",j:[{name:"authProvider",J:"a valid Auth provider",optional:!1,K:function(e){return!!(e&&e.providerId&&e.hasOwnProperty&&e.hasOwnProperty("isOAuthProvider"))}}]},Wc:{name:"signInWithRedirect",j:[{name:"authProvider",J:"a valid Auth provider",optional:!1,K:function(e){return!!(e&&e.providerId&&e.hasOwnProperty&&e.hasOwnProperty("isOAuthProvider"))}}]},bd:{name:"updateCurrentUser",j:[Wh({name:"user",J:"an instance of Firebase User",optional:!1,K:function(e){return!!(e&&e instanceof pl)}},Vh(),"user")]},wb:{name:"signOut",j:[]},toJSON:{name:"toJSON",j:[Mh(null,!0)]},dd:{name:"useDeviceLanguage",j:[]},fd:{name:"verifyPasswordResetCode",j:[Mh("code")]}}),Gh(Jl.prototype,{lc:{name:"languageCode",gb:Wh(Mh(),Vh(),"languageCode")},ti:{name:"tenantId",gb:Wh(Mh(),Vh(),"tenantId")}}),Jl.Persistence=Qu,Jl.Persistence.LOCAL="local",Jl.Persistence.SESSION="session",Jl.Persistence.NONE="none",Hh(pl.prototype,{delete:{name:"delete",j:[]},mc:{name:"getIdTokenResult",j:[jh("opt_forceRefresh",!0)]},I:{name:"getIdToken",j:[jh("opt_forceRefresh",!0)]},Ac:{name:"linkAndRetrieveDataWithCredential",j:[qh()]},mb:{name:"linkWithCredential",j:[qh()]},Bc:{name:"linkWithPhoneNumber",j:[Mh("phoneNumber"),{name:"applicationVerifier",J:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,K:function(e){return!(!e||"string"!==typeof e.type||"function"!==typeof e.verify)}}]},Cc:{name:"linkWithPopup",j:[{name:"authProvider",J:"a valid Auth provider",optional:!1,K:function(e){return!!(e&&e.providerId&&e.hasOwnProperty&&e.hasOwnProperty("isOAuthProvider"))}}]},Dc:{name:"linkWithRedirect",j:[{name:"authProvider",J:"a valid Auth provider",optional:!1,K:function(e){return!!(e&&e.providerId&&e.hasOwnProperty&&e.hasOwnProperty("isOAuthProvider"))}}]},Jc:{name:"reauthenticateAndRetrieveDataWithCredential",j:[qh()]},pb:{name:"reauthenticateWithCredential",j:[qh()]},Kc:{name:"reauthenticateWithPhoneNumber",j:[Mh("phoneNumber"),{name:"applicationVerifier",J:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,K:function(e){return!(!e||"string"!==typeof e.type||"function"!==typeof e.verify)}}]},Lc:{name:"reauthenticateWithPopup",j:[{name:"authProvider",J:"a valid Auth provider",optional:!1,K:function(e){return!!(e&&e.providerId&&e.hasOwnProperty&&e.hasOwnProperty("isOAuthProvider"))}}]},Mc:{name:"reauthenticateWithRedirect",j:[{name:"authProvider",J:"a valid Auth provider",optional:!1,K:function(e){return!!(e&&e.providerId&&e.hasOwnProperty&&e.hasOwnProperty("isOAuthProvider"))}}]},reload:{name:"reload",j:[]},qb:{name:"sendEmailVerification",j:[Wh(Fh("opt_actionCodeSettings",!0),Vh(null,!0),"opt_actionCodeSettings",!0)]},toJSON:{name:"toJSON",j:[Mh(null,!0)]},ad:{name:"unlink",j:[Mh("provider")]},xb:{name:"updateEmail",j:[Mh("email")]},yb:{name:"updatePassword",j:[Mh("password")]},cd:{name:"updatePhoneNumber",j:[qh("phone")]},zb:{name:"updateProfile",j:[Fh("profile")]},Ab:{name:"verifyBeforeUpdateEmail",j:[Mh("email"),Wh(Fh("opt_actionCodeSettings",!0),Vh(null,!0),"opt_actionCodeSettings",!0)]}}),Hh(fh.prototype,{execute:{name:"execute"},render:{name:"render"}
2,reset:{name:"reset"},getResponse:{name:"getResponse"}}),Hh(hh.prototype,{execute:{name:"execute"},render:{name:"render"},reset:{name:"reset"},getResponse:{name:"getResponse"}}),Hh(_t.prototype,{ma:{name:"finally"},o:{name:"catch"},then:{name:"then"}}),Gh(Hc.prototype,{appVerificationDisabled:{name:"appVerificationDisabledForTesting",gb:jh("appVerificationDisabledForTesting")}}),Hh(Gc.prototype,{confirm:{name:"confirm",j:[Mh("verificationCode")]}}),Kh(ao,"fromJSON",(function(e){e="string"===typeof e?JSON.parse(e):e;for(var t,n=[po,ko,Po,lo],r=0;r<n.length;r++)if(t=n[r](e))return t;return null}),[Wh(Mh(),Fh(),"json")]),Kh(xo,"credential",(function(e,t){return new Co(e,t)}),[Mh("email"),Mh("password")]),Hh(Co.prototype,{v:{name:"toJSON",j:[Mh(null,!0)]}}),Hh(mo.prototype,{Aa:{name:"addScope",j:[Mh("scope")]},Ia:{name:"setCustomParameters",j:[Fh("customOAuthParameters")]}}),Kh(mo,"credential",bo,[Wh(Mh(),Fh(),"token")]),Kh(xo,"credentialWithLink",Oo,[Mh("email"),Mh("emailLink")]),Hh(_o.prototype,{Aa:{name:"addScope",j:[Mh("scope")]},Ia:{name:"setCustomParameters",j:[Fh("customOAuthParameters")]}}),Kh(_o,"credential",wo,[Wh(Mh(),Fh(),"token")]),Hh(Eo.prototype,{Aa:{name:"addScope",j:[Mh("scope")]},Ia:{name:"setCustomParameters",j:[Fh("customOAuthParameters")]}}),Kh(Eo,"credential",To,[Wh(Mh(),Wh(Fh(),Vh()),"idToken"),Wh(Mh(),Vh(),"accessToken",!0)]),Hh(So.prototype,{Ia:{name:"setCustomParameters",j:[Fh("customOAuthParameters")]}}),Kh(So,"credential",Io,[Wh(Mh(),Fh(),"token"),Mh("secret",!0)]),Hh(yo.prototype,{Aa:{name:"addScope",j:[Mh("scope")]},credential:{name:"credential",j:[Wh(Mh(),Wh(Fh(),Vh()),"optionsOrIdToken"),Wh(Mh(),Vh(),"accessToken",!0)]},Ia:{name:"setCustomParameters",j:[Fh("customOAuthParameters")]}}),Hh(ho.prototype,{v:{name:"toJSON",j:[Mh(null,!0)]}}),Hh(uo.prototype,{v:{name:"toJSON",j:[Mh(null,!0)]}}),Kh(Do,"credential",Lo,[Mh("verificationId"),Mh("verificationCode")]),Hh(Do.prototype,{cb:{name:"verifyPhoneNumber",j:[Wh(Mh(),{name:"phoneInfoOptions",J:"valid phone info options",optional:!1,K:function(e){return!!e&&(e.session&&e.phoneNumber?Bh(e.session,io)&&"string"===typeof e.phoneNumber:e.session&&e.multiFactorHint?Bh(e.session,oo)&&zh(e.multiFactorHint):e.session&&e.multiFactorUid?Bh(e.session,oo)&&"string"===typeof e.multiFactorUid:!!e.phoneNumber&&"string"===typeof e.phoneNumber)}},"phoneInfoOptions"),{name:"applicationVerifier",J:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,K:function(e){return!(!e||"string"!==typeof e.type||"function"!==typeof e.verify)}}]}}),Hh(Ao.prototype,{v:{name:"toJSON",j:[Mh(null,!0)]}}),Hh(C.prototype,{toJSON:{name:"toJSON",j:[Mh(null,!0)]}}),Hh(Wo.prototype,{toJSON:{name:"toJSON",j:[Mh(null,!0)]}}),Hh(zo.prototype,{toJSON:{name:"toJSON",j:[Mh(null,!0)]}}),Hh(Jc.prototype,{toJSON:{name:"toJSON",j:[Mh(null,!0)]}}),Hh($c.prototype,{Pc:{name:"resolveSignIn",j:[{name:"multiFactorAssertion",J:"a valid multiFactorAssertion",optional:!1,K:function(e){return!!e&&!!e.ob}}]}}),Hh(il.prototype,{Ob:{name:"getSession",j:[]},dc:{name:"enroll",j:[{name:"multiFactorAssertion",J:"a valid multiFactorAssertion",optional:!1,K:function(e){return!!e&&!!e.ob}},Mh("displayName",!0)]},$c:{name:"unenroll",j:[Wh({name:"multiFactorInfo",J:"a valid multiFactorInfo",optional:!1,K:zh},Mh(),"multiFactorInfoIdentifier")]}}),Hh(Rh.prototype,{clear:{name:"clear",j:[]},render:{name:"render",j:[]},verify:{name:"verify",j:[]}}),Kh(mi,"parseLink",Ci,[Mh("link")]),Kh(mh,"assertion",(function(e){return new nl(e)}),[qh("phone")]),function(){if("undefined"===typeof r||!r.INTERNAL||!r.INTERNAL.registerComponent)throw Error("Cannot find the firebase namespace; be sure to include firebase-app.js before this library.");var e={ActionCodeInfo:{Operation:{EMAIL_SIGNIN:ai,PASSWORD_RESET:"PASSWORD_RESET",RECOVER_EMAIL:"RECOVER_EMAIL",REVERT_SECOND_FACTOR_ADDITION:oi,VERIFY_AND_CHANGE_EMAIL:si,VERIFY_EMAIL:"VERIFY_EMAIL"}},Auth:Jl,AuthCredential:ao,Error:C};Kh(e,"EmailAuthProvider",xo,[]),Kh(e,"FacebookAuthProvider",mo,[]),Kh(e,"GithubAuthProvider",_o,[]),Kh(e,"GoogleAuthProvider",Eo,[]),Kh(e,"TwitterAuthProvider",So,[]),Kh(e,"OAuthProvider",yo,[Mh("providerId")]),Kh(e,"SAMLAuthProvider",go,[Mh("providerId")]),Kh(e,"PhoneAuthProvider",Do,[{name:"auth",J:"an instance of Firebase Auth",optional:!0,K:function(e){return!!(e&&e instanceof Jl)}}]),Kh(e,"RecaptchaVerifier",Rh,[Wh(Mh(),{name:"",J:"an HTML element",optional:!1,K:function(e){return!!(e&&e instanceof Element)}},"recaptchaContainer"),Fh("recaptchaParameters",!0),{name:"app",J:"an instance of Firebase App",optional:!0,K:function(e){return!!(e&&e instanceof r.app.App)}}]),Kh(e,"ActionCodeURL",mi,[]),Kh(e,"PhoneMultiFactorGenerator",mh,[]),r.INTERNAL.registerComponent({name:"auth",instanceFactory:function(e){return new Jl(e=e.getProvider("app").getImmediate())},multipleInstances:!1,serviceProps:e,instantiationMode:"LAZY",type:"PUBLIC"}),r.INTERNAL.registerComponent({name:"auth-internal",instanceFactory:function(e){return{getUid:E((e=e.getProvider("auth").getImmediate()).getUid,e),getToken:E(e.kc,e),addAuthTokenListener:E(e.bc,e),removeAuthTokenListener:E(e.Nc,e)}},multipleInstances:!1,instantiationMode:"LAZY",type:"PRIVATE"}),r.registerVersion("@firebase/auth","0.14.9"),r.INTERNAL.extendNamespace({User:pl})}()}).apply("undefined"!==typeof e?e:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})}).call(this,n(32))},function(e,t,n){"use strict";
2(function(r){Object.defineProperty(t,"__esModule",{value:!0});var i=n(8),o=n(1),a=n(4),s=n(23),u=n(13);function c(e){return e&&"object"===typeof e&&"default"in e?e:{default:e}}var l=c(i),h=function(){function e(e){this.domStorage_=e,this.prefix_="firebase:"}return e.prototype.set=function(e,t){null==t?this.domStorage_.removeItem(this.prefixedName_(e)):this.domStorage_.setItem(this.prefixedName_(e),a.stringify(t))},e.prototype.get=function(e){var t=this.domStorage_.getItem(this.prefixedName_(e));return null==t?null:a.jsonEval(t)},e.prototype.remove=function(e){this.domStorage_.removeItem(this.prefixedName_(e))},e.prototype.prefixedName_=function(e){return this.prefix_+e},e.prototype.toString=function(){return this.domStorage_.toString()},e}(),f=function(){function e(){this.cache_={},this.isInMemoryStorage=!0}return e.prototype.set=function(e,t){null==t?delete this.cache_[e]:this.cache_[e]=t},e.prototype.get=function(e){return a.contains(this.cache_,e)?this.cache_[e]:null},e.prototype.remove=function(e){delete this.cache_[e]},e}(),p=function(e){try{if("undefined"!==typeof window&&"undefined"!==typeof window[e]){var t=window[e];return t.setItem("firebase:sentinel","cache"),t.removeItem("firebase:sentinel"),new h(t)}}catch(n){}return new f},d=p("localStorage"),v=p("sessionStorage"),g=new s.Logger("@firebase/database"),y=function(){var e=1;return function(){return e++}}(),m=function(e){var t=a.stringToByteArray(e),n=new a.Sha1;n.update(t);var r=n.digest();return a.base64.encodeByteArray(r)},b=function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",i=0;i<t.length;i++){var o=t[i];Array.isArray(o)||o&&"object"===typeof o&&"number"===typeof o.length?r+=e.apply(null,o):r+="object"===typeof o?a.stringify(o):o,r+=" "}return r},_=null,w=!0,E=function(e,t){a.assert(!t||!0===e||!1===e,"Can't turn on custom loggers persistently."),!0===e?(g.logLevel=s.LogLevel.VERBOSE,_=g.log.bind(g),t&&v.set("logging_enabled",!0)):"function"===typeof e?_=e:(_=null,v.remove("logging_enabled"))},T=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(!0===w&&(w=!1,null===_&&!0===v.get("logging_enabled")&&E(!0)),_){var n=b.apply(null,e);_(n)}},S=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];T.apply(void 0,o.__spread([e],t))}},I=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="FIREBASE INTERNAL ERROR: "+b.apply(void 0,o.__spread(e));g.error(n)},C=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="FIREBASE FATAL ERROR: "+b.apply(void 0,o.__spread(e));throw g.error(n),new Error(n)},k=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="FIREBASE WARNING: "+b.apply(void 0,o.__spread(e));g.warn(n)},x=function(e){return"number"===typeof e&&(e!==e||e===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY)},O="[MIN_NAME]",N="[MAX_NAME]",A=function(e,t){if(e===t)return 0;if(e===O||t===N)return-1;if(t===O||e===N)return 1;var n=U(e),r=U(t);return null!==n?null!==r?n-r===0?e.length-t.length:n-r:-1:null!==r?1:e<t?-1:1},P=function(e,t){return e===t?0:e<t?-1:1},R=function(e,t){if(t&&e in t)return t[e];throw new Error("Missing required key ("+e+") in object: "+a.stringify(t))},D=function e(t){if("object"!==typeof t||null===t)return a.stringify(t);var n=[];for(var r in t)n.push(r);n.sort();for(var i="{",o=0;o<n.length;o++)0!==o&&(i+=","),i+=a.stringify(n[o]),i+=":",i+=e(t[n[o]]);return i+="}"},L=function(e,t){var n=e.length;if(n<=t)return[e];for(var r=[],i=0;i<n;i+=t)i+t>n?r.push(e.substring(i,n)):r.push(e.substring(i,i+t));return r};function M(e,t){for(var n in e)e.hasOwnProperty(n)&&t(n,e[n])}var j=function(e){a.assert(!x(e),"Invalid JSON number");var t,n,r,i,o;0===e?(n=0,r=0,t=1/e===-1/0?1:0):(t=e<0,(e=Math.abs(e))>=Math.pow(2,-1022)?(n=(i=Math.min(Math.floor(Math.log(e)/Math.LN2),1023))+1023,r=Math.round(e*Math.pow(2,52-i)-Math.pow(2,52))):(n=0,r=Math.round(e/Math.pow(2,-1074))));var s=[];for(o=52;o;o-=1)s.push(r%2?1:0),r=Math.floor(r/2);for(o=11;o;o-=1)s.push(n%2?1:0),n=Math.floor(n/2);s.push(t?1:0),s.reverse();var u=s.join(""),c="";for(o=0;o<64;o+=8){var l=parseInt(u.substr(o,8),2).toString(16);1===l.length&&(l="0"+l),c+=l}return c.toLowerCase()},F=new RegExp("^-?(0*)\\d{1,10}$"),U=function(e){if(F.test(e)){var t=Number(e);if(t>=-2147483648&&t<=2147483647)return t}return null},V=function(e){try{e()}catch(t){setTimeout((function(){var e=t.stack||"";throw k("Exception was thrown by user callback.",e),t}),Math.floor(0))}},q=function(e,t){var n=setTimeout(e,t);return"object"===typeof n&&n.unref&&n.unref(),n},B=function(){function e(e,t){if(void 0===t){this.pieces_=e.split("/");for(var n=0,r=0;r<this.pieces_.length;r++)this.pieces_[r].length>0&&(this.pieces_[n]=this.pieces_[r],n++);this.pieces_.length=n,this.pieceNum_=0}else this.pieces_=e,this.pieceNum_=t}return Object.defineProperty(e,"Empty",{get:function(){return new e("")}
2,enumerable:!1,configurable:!0}),e.prototype.getFront=function(){return this.pieceNum_>=this.pieces_.length?null:this.pieces_[this.pieceNum_]},e.prototype.getLength=function(){return this.pieces_.length-this.pieceNum_},e.prototype.popFront=function(){var t=this.pieceNum_;return t<this.pieces_.length&&t++,new e(this.pieces_,t)},e.prototype.getBack=function(){return this.pieceNum_<this.pieces_.length?this.pieces_[this.pieces_.length-1]:null},e.prototype.toString=function(){for(var e="",t=this.pieceNum_;t<this.pieces_.length;t++)""!==this.pieces_[t]&&(e+="/"+this.pieces_[t]);return e||"/"},e.prototype.toUrlEncodedString=function(){for(var e="",t=this.pieceNum_;t<this.pieces_.length;t++)""!==this.pieces_[t]&&(e+="/"+encodeURIComponent(String(this.pieces_[t])));return e||"/"},e.prototype.slice=function(e){return void 0===e&&(e=0),this.pieces_.slice(this.pieceNum_+e)},e.prototype.parent=function(){if(this.pieceNum_>=this.pieces_.length)return null;for(var t=[],n=this.pieceNum_;n<this.pieces_.length-1;n++)t.push(this.pieces_[n]);return new e(t,0)},e.prototype.child=function(t){for(var n=[],r=this.pieceNum_;r<this.pieces_.length;r++)n.push(this.pieces_[r]);if(t instanceof e)for(r=t.pieceNum_;r<t.pieces_.length;r++)n.push(t.pieces_[r]);else{var i=t.split("/");for(r=0;r<i.length;r++)i[r].length>0&&n.push(i[r])}return new e(n,0)},e.prototype.isEmpty=function(){return this.pieceNum_>=this.pieces_.length},e.relativePath=function(t,n){var r=t.getFront(),i=n.getFront();if(null===r)return n;if(r===i)return e.relativePath(t.popFront(),n.popFront());throw new Error("INTERNAL ERROR: innerPath ("+n+") is not within outerPath ("+t+")")},e.comparePaths=function(e,t){for(var n=e.slice(),r=t.slice(),i=0;i<n.length&&i<r.length;i++){var o=A(n[i],r[i]);if(0!==o)return o}return n.length===r.length?0:n.length<r.length?-1:1},e.prototype.equals=function(e){if(this.getLength()!==e.getLength())return!1;for(var t=this.pieceNum_,n=e.pieceNum_;t<=this.pieces_.length;t++,n++)if(this.pieces_[t]!==e.pieces_[n])return!1;return!0},e.prototype.contains=function(e){var t=this.pieceNum_,n=e.pieceNum_;if(this.getLength()>e.getLength())return!1;for(;t<this.pieces_.length;){if(this.pieces_[t]!==e.pieces_[n])return!1;++t,++n}return!0},e}(),z=function(){function e(e,t){this.errorPrefix_=t,this.parts_=e.slice(),this.byteLength_=Math.max(1,this.parts_.length);for(var n=0;n<this.parts_.length;n++)this.byteLength_+=a.stringLength(this.parts_[n]);this.checkValid_()}return Object.defineProperty(e,"MAX_PATH_DEPTH",{get:function(){return 32},enumerable:!1,configurable:!0}),Object.defineProperty(e,"MAX_PATH_LENGTH_BYTES",{get:function(){return 768},enumerable:!1,configurable:!0}),e.prototype.push=function(e){this.parts_.length>0&&(this.byteLength_+=1),this.parts_.push(e),this.byteLength_+=a.stringLength(e),this.checkValid_()},e.prototype.pop=function(){var e=this.parts_.pop();this.byteLength_-=a.stringLength(e),this.parts_.length>0&&(this.byteLength_-=1)},e.prototype.checkValid_=function(){if(this.byteLength_>e.MAX_PATH_LENGTH_BYTES)throw new Error(this.errorPrefix_+"has a key path longer than "+e.MAX_PATH_LENGTH_BYTES+" bytes ("+this.byteLength_+").");if(this.parts_.length>e.MAX_PATH_DEPTH)throw new Error(this.errorPrefix_+"path specified exceeds the maximum depth that can be written ("+e.MAX_PATH_DEPTH+") or object contains a cycle "+this.toErrorString())},e.prototype.toErrorString=function(){return 0===this.parts_.length?"":"in property '"+this.parts_.join(".")+"'"},e}(),W=function(){function e(e,t,n,r,i,o,a){void 0===i&&(i=!1),void 0===o&&(o=""),void 0===a&&(a=!1),this.secure=t,this.namespace=n,this.webSocketOnly=r,this.nodeAdmin=i,this.persistenceKey=o,this.includeNamespaceInQueryParams=a,this.host=e.toLowerCase(),this.domain=this.host.substr(this.host.indexOf(".")+1),this.internalHost=d.get("host:"+e)||this.host}return e.prototype.needsQueryParam=function(){return this.host!==this.internalHost||this.isCustomHost()||this.includeNamespaceInQueryParams},e.prototype.isCacheableHost=function(){return"s-"===this.internalHost.substr(0,2)},e.prototype.isDemoHost=function(){return"firebaseio-demo.com"===this.domain},e.prototype.isCustomHost=function(){return"firebaseio.com"!==this.domain&&"firebaseio-demo.com"!==this.domain},e.prototype.updateHost=function(e){e!==this.internalHost&&(this.internalHost=e,this.isCacheableHost()&&d.set("host:"+this.host,this.internalHost))},e.prototype.connectionURL=function(e,t){var n;if(a.assert("string"===typeof e,"typeof type must == string"),a.assert("object"===typeof t,"typeof params must == object"),"websocket"===e)n=(this.secure?"wss://":"ws://")+this.internalHost+"/.ws?";else{if("long_polling"!==e)throw new Error("Unknown connection type: "+e);n=(this.secure?"https://":"http://")+this.internalHost+"/.lp?"}this.needsQueryParam()&&(t.ns=this.namespace);var r=[];return M(t,(function(e,t){r.push(e+"="+t)}
2)),n+r.join("&")},e.prototype.toString=function(){var e=this.toURLString();return this.persistenceKey&&(e+="<"+this.persistenceKey+">"),e},e.prototype.toURLString=function(){return(this.secure?"https://":"http://")+this.host},e}();var H,G,K=function(e,t){var n=Q(e),r=n.namespace;"firebase.com"===n.domain&&C(n.host+" is no longer supported. Please use <YOUR FIREBASE>.firebaseio.com instead"),r&&"undefined"!==r||"localhost"===n.domain||C("Cannot parse Firebase url. Please use https://<YOUR FIREBASE>.firebaseio.com"),n.secure||"undefined"!==typeof window&&window.location&&window.location.protocol&&-1!==window.location.protocol.indexOf("https:")&&k("Insecure Firebase access from a secure page. Please use https in calls to new Firebase().");var i="ws"===n.scheme||"wss"===n.scheme;return{repoInfo:new W(n.host,n.secure,r,t,i,"",r!==n.subdomain),path:new B(n.pathString)}},Q=function(e){var t="",n="",r="",i="",a="",s=!0,u="https",c=443;if("string"===typeof e){var l=e.indexOf("//");l>=0&&(u=e.substring(0,l-1),e=e.substring(l+2));var h=e.indexOf("/");-1===h&&(h=e.length);var f=e.indexOf("?");-1===f&&(f=e.length),t=e.substring(0,Math.min(h,f)),h<f&&(i=function(e){for(var t="",n=e.split("/"),r=0;r<n.length;r++)if(n[r].length>0){var i=n[r];try{i=decodeURIComponent(i.replace(/\+/g," "))}catch(o){}t+="/"+i}return t}(e.substring(h,f)));var p=function(e){var t,n,r={};"?"===e.charAt(0)&&(e=e.substring(1));try{for(var i=o.__values(e.split("&")),a=i.next();!a.done;a=i.next()){var s=a.value;if(0!==s.length){var u=s.split("=");2===u.length?r[decodeURIComponent(u[0])]=decodeURIComponent(u[1]):k("Invalid query segment '"+s+"' in query '"+e+"'")}}}catch(c){t={error:c}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}(e.substring(Math.min(e.length,f)));(l=t.indexOf(":"))>=0?(s="https"===u||"wss"===u,c=parseInt(t.substring(l+1),10)):l=t.length;var d=t.slice(0,l);if("localhost"===d.toLowerCase())n="localhost";else if(d.split(".").length<=2)n=d;else{var v=t.indexOf(".");r=t.substring(0,v).toLowerCase(),n=t.substring(v+1),a=r}"ns"in p&&(a=p.ns)}return{host:t,port:c,domain:n,subdomain:r,secure:s,scheme:u,pathString:i,namespace:a}},$=/[\[\].#$\/\u0000-\u001F\u007F]/,Y=/[\[\].#$\u0000-\u001F\u007F]/,X=function(e){return"string"===typeof e&&0!==e.length&&!$.test(e)},J=function(e){return"string"===typeof e&&0!==e.length&&!Y.test(e)},Z=function(e){return null===e||"string"===typeof e||"number"===typeof e&&!x(e)||e&&"object"===typeof e&&a.contains(e,".sv")},ee=function(e,t,n,r,i){i&&void 0===n||te(a.errorPrefix(e,t,i),n,r)},te=function e(t,n,r){var i=r instanceof B?new z(r,t):r;if(void 0===n)throw new Error(t+"contains undefined "+i.toErrorString());if("function"===typeof n)throw new Error(t+"contains a function "+i.toErrorString()+" with contents = "+n.toString());if(x(n))throw new Error(t+"contains "+n.toString()+" "+i.toErrorString());if("string"===typeof n&&n.length>10485760/3&&a.stringLength(n)>10485760)throw new Error(t+"contains a string greater than 10485760 utf8 bytes "+i.toErrorString()+" ('"+n.substring(0,50)+"...')");if(n&&"object"===typeof n){var o=!1,s=!1;if(M(n,(function(n,r){if(".value"===n)o=!0;else if(".priority"!==n&&".sv"!==n&&(s=!0,!X(n)))throw new Error(t+" contains an invalid key ("+n+") "+i.toErrorString()+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');i.push(n),e(t,r,i),i.pop()})),o&&s)throw new Error(t+' contains ".value" child '+i.toErrorString()+" in addition to actual children.")}},ne=function(e,t,n,r,i){if(!i||void 0!==n){var o=a.errorPrefix(e,t,i);if(!n||"object"!==typeof n||Array.isArray(n))throw new Error(o+" must be an object containing the children to replace.");var s=[];M(n,(function(e,t){var n=new B(e);if(te(o,t,r.child(n)),".priority"===n.getBack()&&!Z(t))throw new Error(o+"contains an invalid value for '"+n.toString()+"', which must be a valid Firebase priority (a string, finite number, server value, or null).");s.push(n)})),function(e,t){var n,r;for(n=0;n<t.length;n++)for(var i=(r=t[n]).slice(),o=0;o<i.length;o++)if(".priority"===i[o]&&o===i.length-1);
2else if(!X(i[o]))throw new Error(e+"contains an invalid key ("+i[o]+") in path "+r.toString()+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');t.sort(B.comparePaths);var a=null;for(n=0;n<t.length;n++){if(r=t[n],null!==a&&a.contains(r))throw new Error(e+"contains a path "+a.toString()+" that is ancestor of another path "+r.toString());a=r}}(o,s)}},re=function(e,t,n,r){if(!r||void 0!==n){if(x(n))throw new Error(a.errorPrefix(e,t,r)+"is "+n.toString()+", but must be a valid Firebase priority (a string, finite number, server value, or null).");if(!Z(n))throw new Error(a.errorPrefix(e,t,r)+"must be a valid Firebase priority (a string, finite number, server value, or null).")}},ie=function(e,t,n,r){if(!r||void 0!==n)switch(n){case"value":case"child_added":case"child_removed":case"child_changed":case"child_moved":break;default:throw new Error(a.errorPrefix(e,t,r)+'must be a valid event type = "value", "child_added", "child_removed", "child_changed", or "child_moved".')}},oe=function(e,t,n,r){if((!r||void 0!==n)&&!X(n))throw new Error(a.errorPrefix(e,t,r)+'was an invalid key = "'+n+'". Firebase keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]").')},ae=function(e,t,n,r){if((!r||void 0!==n)&&!J(n))throw new Error(a.errorPrefix(e,t,r)+'was an invalid path = "'+n+'". Paths must be non-empty strings and can\'t contain ".", "#", "$", "[", or "]"')},se=function(e,t,n,r){n&&(n=n.replace(/^\/*\.info(\/|$)/,"/")),ae(e,t,n,r)},ue=function(e,t){if(".info"===t.getFront())throw new Error(e+" failed = Can't modify data under /.info/")},ce=function(e,t,n){var r=n.path.toString();if("string"!==typeof n.repoInfo.host||0===n.repoInfo.host.length||!X(n.repoInfo.namespace)&&"localhost"!==n.repoInfo.host.split(":")[0]||0!==r.length&&!function(e){return e&&(e=e.replace(/^\/*\.info(\/|$)/,"/")),J(e)}(r))throw new Error(a.errorPrefix(e,t,!1)+'must be a valid firebase URL and the path can\'t contain ".", "#", "$", "[", or "]".')},le=function(e,t,n,r){if((!r||void 0!==n)&&"boolean"!==typeof n)throw new Error(a.errorPrefix(e,t,r)+"must be a boolean.")},he=function(){function e(e,t){this.repo_=e,this.path_=t}return e.prototype.cancel=function(e){a.validateArgCount("OnDisconnect.cancel",0,1,arguments.length),a.validateCallback("OnDisconnect.cancel",1,e,!0);var t=new a.Deferred;return this.repo_.onDisconnectCancel(this.path_,t.wrapCallback(e)),t.promise},e.prototype.remove=function(e){a.validateArgCount("OnDisconnect.remove",0,1,arguments.length),ue("OnDisconnect.remove",this.path_),a.validateCallback("OnDisconnect.remove",1,e,!0);var t=new a.Deferred;return this.repo_.onDisconnectSet(this.path_,null,t.wrapCallback(e)),t.promise},e.prototype.set=function(e,t){a.validateArgCount("OnDisconnect.set",1,2,arguments.length),ue("OnDisconnect.set",this.path_),ee("OnDisconnect.set",1,e,this.path_,!1),a.validateCallback("OnDisconnect.set",2,t,!0);var n=new a.Deferred;return this.repo_.onDisconnectSet(this.path_,e,n.wrapCallback(t)),n.promise},e.prototype.setWithPriority=function(e,t,n){a.validateArgCount("OnDisconnect.setWithPriority",2,3,arguments.length),ue("OnDisconnect.setWithPriority",this.path_),ee("OnDisconnect.setWithPriority",1,e,this.path_,!1),re("OnDisconnect.setWithPriority",2,t,!1),a.validateCallback("OnDisconnect.setWithPriority",3,n,!0);var r=new a.Deferred;return this.repo_.onDisconnectSetWithPriority(this.path_,e,t,r.wrapCallback(n)),r.promise},e.prototype.update=function(e,t){if(a.validateArgCount("OnDisconnect.update",1,2,arguments.length),ue("OnDisconnect.update",this.path_),Array.isArray(e)){for(var n={},r=0;r<e.length;++r)n[""+r]=e[r];e=n,k("Passing an Array to firebase.database.onDisconnect().update() is deprecated. Use set() if you want to overwrite the existing data, or an Object with integer keys if you really do want to only update some of the children.")}ne("OnDisconnect.update",1,e,this.path_,!1),a.validateCallback("OnDisconnect.update",2,t,!0);var i=new a.Deferred;return this.repo_.onDisconnectUpdate(this.path_,e,i.wrapCallback(t)),i.promise},e}(),fe=function(){function e(e,t){this.committed=e,this.snapshot=t}return e.prototype.toJSON=function(){return a.validateArgCount("TransactionResult.toJSON",0,1,arguments.length),{committed:this.committed,snapshot:this.snapshot.toJSON()}},e}
2(),pe=function(){var e="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",t=0,n=[];return function(r){var i,o=r===t;t=r;var s=new Array(8);for(i=7;i>=0;i--)s[i]=e.charAt(r%64),r=Math.floor(r/64);a.assert(0===r,"Cannot push at time == 0");var u=s.join("");if(o){for(i=11;i>=0&&63===n[i];i--)n[i]=0;n[i]++}else for(i=0;i<12;i++)n[i]=Math.floor(64*Math.random());for(i=0;i<12;i++)u+=e.charAt(n[i]);return a.assert(20===u.length,"nextPushId: Length should be 20."),u}}(),de=function(){function e(e,t){this.name=e,this.node=t}return e.Wrap=function(t,n){return new e(t,n)},e}(),ve=function(){function e(){}return e.prototype.getCompare=function(){return this.compare.bind(this)},e.prototype.indexedValueChanged=function(e,t){var n=new de(O,e),r=new de(O,t);return 0!==this.compare(n,r)},e.prototype.minPost=function(){return de.MIN},e}(),ge=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),Object.defineProperty(t,"__EMPTY_NODE",{get:function(){return H},set:function(e){H=e},enumerable:!1,configurable:!0}),t.prototype.compare=function(e,t){return A(e.name,t.name)},t.prototype.isDefinedOn=function(e){throw a.assertionError("KeyIndex.isDefinedOn not expected to be called.")},t.prototype.indexedValueChanged=function(e,t){return!1},t.prototype.minPost=function(){return de.MIN},t.prototype.maxPost=function(){return new de(N,H)},t.prototype.makePost=function(e,t){return a.assert("string"===typeof e,"KeyIndex indexValue must always be a string."),new de(e,H)},t.prototype.toString=function(){return".key"},t}(ve),ye=new ge;var me,be,_e,we=function(e){return"number"===typeof e?"number:"+j(e):"string:"+e},Ee=function(e){if(e.isLeafNode()){var t=e.val();a.assert("string"===typeof t||"number"===typeof t||"object"===typeof t&&a.contains(t,".sv"),"Priority must be a string or number.")}else a.assert(e===G||e.isEmpty(),"priority of unexpected type.");a.assert(e===G||e.getPriority().isEmpty(),"Priority nodes can't have a priority of their own.")},Te=function(){function e(t,n){void 0===n&&(n=e.__childrenNodeConstructor.EMPTY_NODE),this.value_=t,this.priorityNode_=n,this.lazyHash_=null,a.assert(void 0!==this.value_&&null!==this.value_,"LeafNode shouldn't be created with null/undefined value."),Ee(this.priorityNode_)}return Object.defineProperty(e,"__childrenNodeConstructor",{get:function(){return me},set:function(e){me=e},enumerable:!1,configurable:!0}),e.prototype.isLeafNode=function(){return!0},e.prototype.getPriority=function(){return this.priorityNode_},e.prototype.updatePriority=function(t){return new e(this.value_,t)},e.prototype.getImmediateChild=function(t){return".priority"===t?this.priorityNode_:e.__childrenNodeConstructor.EMPTY_NODE},e.prototype.getChild=function(t){return t.isEmpty()?this:".priority"===t.getFront()?this.priorityNode_:e.__childrenNodeConstructor.EMPTY_NODE},e.prototype.hasChild=function(){return!1},e.prototype.getPredecessorChildName=function(e,t){return null},e.prototype.updateImmediateChild=function(t,n){return".priority"===t?this.updatePriority(n):n.isEmpty()&&".priority"!==t?this:e.__childrenNodeConstructor.EMPTY_NODE.updateImmediateChild(t,n).updatePriority(this.priorityNode_)},e.prototype.updateChild=function(t,n){var r=t.getFront();return null===r?n:n.isEmpty()&&".priority"!==r?this:(a.assert(".priority"!==r||1===t.getLength(),".priority must be the last token in a path"),this.updateImmediateChild(r,e.__childrenNodeConstructor.EMPTY_NODE.updateChild(t.popFront(),n)))},e.prototype.isEmpty=function(){return!1},e.prototype.numChildren=function(){return 0},e.prototype.forEachChild=function(e,t){return!1},e.prototype.val=function(e){return e&&!this.getPriority().isEmpty()?{".value":this.getValue(),".priority":this.getPriority().val()}:this.getValue()},e.prototype.hash=function(){if(null===this.lazyHash_){var e="";this.priorityNode_.isEmpty()||(e+="priority:"+we(this.priorityNode_.val())+":");var t=typeof this.value_;e+=t+":",e+="number"===t?j(this.value_):this.value_,this.lazyHash_=m(e)}return this.lazyHash_},e.prototype.getValue=function(){return this.value_},e.prototype.compareTo=function(t){return t===e.__childrenNodeConstructor.EMPTY_NODE?1:t instanceof e.__childrenNodeConstructor?-1:(a.assert(t.isLeafNode(),"Unknown node type"),this.compareToLeafNode_(t))},e.prototype.compareToLeafNode_=function(t){var n=typeof t.value_,r=typeof this.value_,i=e.VALUE_TYPE_ORDER.indexOf(n),o=e.VALUE_TYPE_ORDER.indexOf(r);return a.assert(i>=0,"Unknown leaf type: "+n),a.assert(o>=0,"Unknown leaf type: "+r),i===o?"object"===r?0:this.value_<t.value_?-1:this.value_===t.value_?0:1:o-i},e.prototype.withIndex=function(){return this},e.prototype.isIndexed=function(){return!0},e.prototype.equals=function(e){if(e===this)return!0;
2if(e.isLeafNode()){var t=e;return this.value_===t.value_&&this.priorityNode_.equals(t.priorityNode_)}return!1},e.VALUE_TYPE_ORDER=["object","boolean","number","string"],e}();var Se,Ie,Ce=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t.prototype.compare=function(e,t){var n=e.node.getPriority(),r=t.node.getPriority(),i=n.compareTo(r);return 0===i?A(e.name,t.name):i},t.prototype.isDefinedOn=function(e){return!e.getPriority().isEmpty()},t.prototype.indexedValueChanged=function(e,t){return!e.getPriority().equals(t.getPriority())},t.prototype.minPost=function(){return de.MIN},t.prototype.maxPost=function(){return new de(N,new Te("[PRIORITY-POST]",_e))},t.prototype.makePost=function(e,t){var n=be(e);return new de(t,new Te("[PRIORITY-POST]",n))},t.prototype.toString=function(){return".priority"},t}(ve)),ke=function(){function e(e,t,n,r,i){void 0===i&&(i=null),this.isReverse_=r,this.resultGenerator_=i,this.nodeStack_=[];for(var o=1;!e.isEmpty();)if(e=e,o=t?n(e.key,t):1,r&&(o*=-1),o<0)e=this.isReverse_?e.left:e.right;else{if(0===o){this.nodeStack_.push(e);break}this.nodeStack_.push(e),e=this.isReverse_?e.right:e.left}}return e.prototype.getNext=function(){if(0===this.nodeStack_.length)return null;var e,t=this.nodeStack_.pop();if(e=this.resultGenerator_?this.resultGenerator_(t.key,t.value):{key:t.key,value:t.value},this.isReverse_)for(t=t.left;!t.isEmpty();)this.nodeStack_.push(t),t=t.right;else for(t=t.right;!t.isEmpty();)this.nodeStack_.push(t),t=t.left;return e},e.prototype.hasNext=function(){return this.nodeStack_.length>0},e.prototype.peek=function(){if(0===this.nodeStack_.length)return null;var e=this.nodeStack_[this.nodeStack_.length-1];return this.resultGenerator_?this.resultGenerator_(e.key,e.value):{key:e.key,value:e.value}},e}(),xe=function(){function e(t,n,r,i,o){this.key=t,this.value=n,this.color=null!=r?r:e.RED,this.left=null!=i?i:Ne.EMPTY_NODE,this.right=null!=o?o:Ne.EMPTY_NODE}return e.prototype.copy=function(t,n,r,i,o){return new e(null!=t?t:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=i?i:this.left,null!=o?o:this.right)},e.prototype.count=function(){return this.left.count()+1+this.right.count()},e.prototype.isEmpty=function(){return!1},e.prototype.inorderTraversal=function(e){return this.left.inorderTraversal(e)||!!e(this.key,this.value)||this.right.inorderTraversal(e)},e.prototype.reverseTraversal=function(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)},e.prototype.min_=function(){return this.left.isEmpty()?this:this.left.min_()},e.prototype.minKey=function(){return this.min_().key},e.prototype.maxKey=function(){return this.right.isEmpty()?this.key:this.right.maxKey()},e.prototype.insert=function(e,t,n){var r=this,i=n(e,r.key);return(r=i<0?r.copy(null,null,null,r.left.insert(e,t,n),null):0===i?r.copy(null,t,null,null,null):r.copy(null,null,null,null,r.right.insert(e,t,n))).fixUp_()},e.prototype.removeMin_=function(){if(this.left.isEmpty())return Ne.EMPTY_NODE;var e=this;return e.left.isRed_()||e.left.left.isRed_()||(e=e.moveRedLeft_()),(e=e.copy(null,null,null,e.left.removeMin_(),null)).fixUp_()},e.prototype.remove=function(e,t){var n,r;if(t(e,(n=this).key)<0)n.left.isEmpty()||n.left.isRed_()||n.left.left.isRed_()||(n=n.moveRedLeft_()),n=n.copy(null,null,null,n.left.remove(e,t),null);else{if(n.left.isRed_()&&(n=n.rotateRight_()),n.right.isEmpty()||n.right.isRed_()||n.right.left.isRed_()||(n=n.moveRedRight_()),0===t(e,n.key)){if(n.right.isEmpty())return Ne.EMPTY_NODE;r=n.right.min_(),n=n.copy(r.key,r.value,null,null,n.right.removeMin_())}n=n.copy(null,null,null,null,n.right.remove(e,t))}return n.fixUp_()},e.prototype.isRed_=function(){return this.color},e.prototype.fixUp_=function(){var e=this;return e.right.isRed_()&&!e.left.isRed_()&&(e=e.rotateLeft_()),e.left.isRed_()&&e.left.left.isRed_()&&(e=e.rotateRight_()),e.left.isRed_()&&e.right.isRed_()&&(e=e.colorFlip_()),e},e.prototype.moveRedLeft_=function(){var e=this.colorFlip_();return e.right.left.isRed_()&&(e=(e=(e=e.copy(null,null,null,null,e.right.rotateRight_())).rotateLeft_()).colorFlip_()),e},e.prototype.moveRedRight_=function(){var e=this.colorFlip_();return e.left.left.isRed_()&&(e=(e=e.rotateRight_()).colorFlip_()),e},e.prototype.rotateLeft_=function(){var t=this.copy(null,null,e.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)},e.prototype.rotateRight_=function(){var t=this.copy(null,null,e.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)},e.prototype.colorFlip_=function(){var e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)},e.prototype.checkMaxDepth_=function(){var e=this.check_();return Math.pow(2,e)<=this.count()+1},e.prototype.check_=function(){if(this.isRed_()&&this.left.isRed_()
2)throw new Error("Red node has red child("+this.key+","+this.value+")");if(this.right.isRed_())throw new Error("Right child of ("+this.key+","+this.value+") is red");var e=this.left.check_();if(e!==this.right.check_())throw new Error("Black depths differ");return e+(this.isRed_()?0:1)},e.RED=!0,e.BLACK=!1,e}(),Oe=function(){function e(){}return e.prototype.copy=function(e,t,n,r,i){return this},e.prototype.insert=function(e,t,n){return new xe(e,t,null)},e.prototype.remove=function(e,t){return this},e.prototype.count=function(){return 0},e.prototype.isEmpty=function(){return!0},e.prototype.inorderTraversal=function(e){return!1},e.prototype.reverseTraversal=function(e){return!1},e.prototype.minKey=function(){return null},e.prototype.maxKey=function(){return null},e.prototype.check_=function(){return 0},e.prototype.isRed_=function(){return!1},e}(),Ne=function(){function e(t,n){void 0===n&&(n=e.EMPTY_NODE),this.comparator_=t,this.root_=n}return e.prototype.insert=function(t,n){return new e(this.comparator_,this.root_.insert(t,n,this.comparator_).copy(null,null,xe.BLACK,null,null))},e.prototype.remove=function(t){return new e(this.comparator_,this.root_.remove(t,this.comparator_).copy(null,null,xe.BLACK,null,null))},e.prototype.get=function(e){for(var t,n=this.root_;!n.isEmpty();){if(0===(t=this.comparator_(e,n.key)))return n.value;t<0?n=n.left:t>0&&(n=n.right)}return null},e.prototype.getPredecessorKey=function(e){for(var t,n=this.root_,r=null;!n.isEmpty();){if(0===(t=this.comparator_(e,n.key))){if(n.left.isEmpty())return r?r.key:null;for(n=n.left;!n.right.isEmpty();)n=n.right;return n.key}t<0?n=n.left:t>0&&(r=n,n=n.right)}throw new Error("Attempted to find predecessor key for a nonexistent key. What gives?")},e.prototype.isEmpty=function(){return this.root_.isEmpty()},e.prototype.count=function(){return this.root_.count()},e.prototype.minKey=function(){return this.root_.minKey()},e.prototype.maxKey=function(){return this.root_.maxKey()},e.prototype.inorderTraversal=function(e){return this.root_.inorderTraversal(e)},e.prototype.reverseTraversal=function(e){return this.root_.reverseTraversal(e)},e.prototype.getIterator=function(e){return new ke(this.root_,null,this.comparator_,!1,e)},e.prototype.getIteratorFrom=function(e,t){return new ke(this.root_,e,this.comparator_,!1,t)},e.prototype.getReverseIteratorFrom=function(e,t){return new ke(this.root_,e,this.comparator_,!0,t)},e.prototype.getReverseIterator=function(e){return new ke(this.root_,null,this.comparator_,!0,e)},e.EMPTY_NODE=new Oe,e}(),Ae=Math.log(2),Pe=function(){function e(e){var t;this.count=(t=e+1,parseInt(Math.log(t)/Ae,10)),this.current_=this.count-1;var n,r=(n=this.count,parseInt(Array(n+1).join("1"),2));this.bits_=e+1&r}return e.prototype.nextBitIsOne=function(){var e=!(this.bits_&1<<this.current_);return this.current_--,e},e}(),Re=function(e,t,n,r){e.sort(t);var i=function(t){for(var r=null,i=null,o=e.length,a=function(t,r){var i=o-t,a=o;o-=t;var u=function t(r,i){var o,a,s=i-r;if(0===s)return null;if(1===s)return o=e[r],a=n?n(o):o,new xe(a,o.node,xe.BLACK,null,null);var u=parseInt(s/2,10)+r,c=t(r,u),l=t(u+1,i);return o=e[u],a=n?n(o):o,new xe(a,o.node,xe.BLACK,c,l)}(i+1,a),c=e[i],l=n?n(c):c;s(new xe(l,c.node,r,null,u))},s=function(e){r?(r.left=e,r=e):(i=e,r=e)},u=0;u<t.count;++u){var c=t.nextBitIsOne(),l=Math.pow(2,t.count-(u+1));c?a(l,xe.BLACK):(a(l,xe.BLACK),a(l,xe.RED))}return i}(new Pe(e.length));return new Ne(r||t,i)},De={},Le=function(){function e(e,t){this.indexes_=e,this.indexSet_=t}return Object.defineProperty(e,"Default",{get:function(){return a.assert(De&&Ce,"ChildrenNode.ts has not been loaded"),Se=Se||new e({".priority":De},{".priority":Ce})},enumerable:!1,configurable:!0}),e.prototype.get=function(e){var t=a.safeGet(this.indexes_,e);if(!t)throw new Error("No index defined for "+e);return t instanceof Ne?t:null},e.prototype.hasIndex=function(e){return a.contains(this.indexSet_,e.toString())},e.prototype.addIndex=function(t,n){a.assert(t!==ye,"KeyIndex always exists and isn't meant to be added to the IndexMap.");for(var r,i=[],s=!1,u=n.getIterator(de.Wrap),c=u.getNext();c;)s=s||t.isDefinedOn(c.node),i.push(c),c=u.getNext();r=s?Re(i,t.getCompare()):De;var l=t.toString(),h=o.__assign({},this.indexSet_);h[l]=t;var f=o.__assign({},this.indexes_);return f[l]=r,new e(f,h)},e.prototype.addToIndexes=function(t,n){var r=this;return new e(a.map(this.indexes_,(function(e,i){var o=a.safeGet(r.indexSet_,i);if(a.assert(o,"Missing index implementation for "+i),e===De){if(o.isDefinedOn(t.node)){for(var s=[],u=n.getIterator(de.Wrap),c=u.getNext();c;)c.name!==t.name&&s.push(c),c=u.getNext();return s.push(t),Re(s,o.getCompare())}return De}var l=n.get(t.name),h=e;return l&&(h=h.remove(new de(t.name,l))),h.insert(t,t.node)})),this.indexSet_)}
2,e.prototype.removeFromIndexes=function(t,n){return new e(a.map(this.indexes_,(function(e){if(e===De)return e;var r=n.get(t.name);return r?e.remove(new de(t.name,r)):e})),this.indexSet_)},e}();function Me(e,t){return A(e.name,t.name)}function je(e,t){return A(e,t)}var Fe=function(){function e(e,t,n){this.children_=e,this.priorityNode_=t,this.indexMap_=n,this.lazyHash_=null,this.priorityNode_&&Ee(this.priorityNode_),this.children_.isEmpty()&&a.assert(!this.priorityNode_||this.priorityNode_.isEmpty(),"An empty node cannot have a priority")}return Object.defineProperty(e,"EMPTY_NODE",{get:function(){return Ie||(Ie=new e(new Ne(je),null,Le.Default))},enumerable:!1,configurable:!0}),e.prototype.isLeafNode=function(){return!1},e.prototype.getPriority=function(){return this.priorityNode_||Ie},e.prototype.updatePriority=function(t){return this.children_.isEmpty()?this:new e(this.children_,t,this.indexMap_)},e.prototype.getImmediateChild=function(e){if(".priority"===e)return this.getPriority();var t=this.children_.get(e);return null===t?Ie:t},e.prototype.getChild=function(e){var t=e.getFront();return null===t?this:this.getImmediateChild(t).getChild(e.popFront())},e.prototype.hasChild=function(e){return null!==this.children_.get(e)},e.prototype.updateImmediateChild=function(t,n){if(a.assert(n,"We should always be passing snapshot nodes"),".priority"===t)return this.updatePriority(n);var r=new de(t,n),i=void 0,o=void 0;n.isEmpty()?(i=this.children_.remove(t),o=this.indexMap_.removeFromIndexes(r,this.children_)):(i=this.children_.insert(t,n),o=this.indexMap_.addToIndexes(r,this.children_));var s=i.isEmpty()?Ie:this.priorityNode_;return new e(i,s,o)},e.prototype.updateChild=function(e,t){var n=e.getFront();if(null===n)return t;a.assert(".priority"!==e.getFront()||1===e.getLength(),".priority must be the last token in a path");var r=this.getImmediateChild(n).updateChild(e.popFront(),t);return this.updateImmediateChild(n,r)},e.prototype.isEmpty=function(){return this.children_.isEmpty()},e.prototype.numChildren=function(){return this.children_.count()},e.prototype.val=function(t){if(this.isEmpty())return null;var n={},r=0,i=0,o=!0;if(this.forEachChild(Ce,(function(a,s){n[a]=s.val(t),r++,o&&e.INTEGER_REGEXP_.test(a)?i=Math.max(i,Number(a)):o=!1})),!t&&o&&i<2*r){var a=[];for(var s in n)a[s]=n[s];return a}return t&&!this.getPriority().isEmpty()&&(n[".priority"]=this.getPriority().val()),n},e.prototype.hash=function(){if(null===this.lazyHash_){var e="";this.getPriority().isEmpty()||(e+="priority:"+we(this.getPriority().val())+":"),this.forEachChild(Ce,(function(t,n){var r=n.hash();""!==r&&(e+=":"+t+":"+r)})),this.lazyHash_=""===e?"":m(e)}return this.lazyHash_},e.prototype.getPredecessorChildName=function(e,t,n){var r=this.resolveIndex_(n);if(r){var i=r.getPredecessorKey(new de(e,t));return i?i.name:null}return this.children_.getPredecessorKey(e)},e.prototype.getFirstChildName=function(e){var t=this.resolveIndex_(e);if(t){var n=t.minKey();return n&&n.name}return this.children_.minKey()},e.prototype.getFirstChild=function(e){var t=this.getFirstChildName(e);return t?new de(t,this.children_.get(t)):null},e.prototype.getLastChildName=function(e){var t=this.resolveIndex_(e);if(t){var n=t.maxKey();return n&&n.name}return this.children_.maxKey()},e.prototype.getLastChild=function(e){var t=this.getLastChildName(e);return t?new de(t,this.children_.get(t)):null},e.prototype.forEachChild=function(e,t){var n=this.resolveIndex_(e);return n?n.inorderTraversal((function(e){return t(e.name,e.node)})):this.children_.inorderTraversal(t)},e.prototype.getIterator=function(e){return this.getIteratorFrom(e.minPost(),e)},e.prototype.getIteratorFrom=function(e,t){var n=this.resolveIndex_(t);if(n)return n.getIteratorFrom(e,(function(e){return e}));for(var r=this.children_.getIteratorFrom(e.name,de.Wrap),i=r.peek();null!=i&&t.compare(i,e)<0;)r.getNext(),i=r.peek();return r},e.prototype.getReverseIterator=function(e){return this.getReverseIteratorFrom(e.maxPost(),e)},e.prototype.getReverseIteratorFrom=function(e,t){var n=this.resolveIndex_(t);if(n)return n.getReverseIteratorFrom(e,(function(e){return e}));for(var r=this.children_.getReverseIteratorFrom(e.name,de.Wrap),i=r.peek();null!=i&&t.compare(i,e)>0;)r.getNext(),i=r.peek();return r},e.prototype.compareTo=function(e){return this.isEmpty()?e.isEmpty()?0:-1:e.isLeafNode()||e.isEmpty()?1:e===Ue?-1:0},e.prototype.withIndex=function(t){if(t===ye||this.indexMap_.hasIndex(t))return this;var n=this.indexMap_.addIndex(t,this.children_);return new e(this.children_,this.priorityNode_,n)},e.prototype.isIndexed=function(e){return e===ye||this.indexMap_.hasIndex(e)},e.prototype.equals=function(e){if(e===this)return!0;
2if(e.isLeafNode())return!1;var t=e;if(this.getPriority().equals(t.getPriority())){if(this.children_.count()===t.children_.count()){for(var n=this.getIterator(Ce),r=t.getIterator(Ce),i=n.getNext(),o=r.getNext();i&&o;){if(i.name!==o.name||!i.node.equals(o.node))return!1;i=n.getNext(),o=r.getNext()}return null===i&&null===o}return!1}return!1},e.prototype.resolveIndex_=function(e){return e===ye?null:this.indexMap_.get(e.toString())},e.INTEGER_REGEXP_=/^(0|[1-9]\d*)$/,e}(),Ue=new(function(e){function t(){return e.call(this,new Ne(je),Fe.EMPTY_NODE,Le.Default)||this}return o.__extends(t,e),t.prototype.compareTo=function(e){return e===this?0:1},t.prototype.equals=function(e){return e===this},t.prototype.getPriority=function(){return this},t.prototype.getImmediateChild=function(e){return Fe.EMPTY_NODE},t.prototype.isEmpty=function(){return!1},t}(Fe));Object.defineProperties(de,{MIN:{value:new de(O,Fe.EMPTY_NODE)},MAX:{value:new de(N,Ue)}}),ge.__EMPTY_NODE=Fe.EMPTY_NODE,Te.__childrenNodeConstructor=Fe,G=Ue,function(e){_e=e}(Ue);function Ve(e,t){if(void 0===t&&(t=null),null===e)return Fe.EMPTY_NODE;if("object"===typeof e&&".priority"in e&&(t=e[".priority"]),a.assert(null===t||"string"===typeof t||"number"===typeof t||"object"===typeof t&&".sv"in t,"Invalid priority type found: "+typeof t),"object"===typeof e&&".value"in e&&null!==e[".value"]&&(e=e[".value"]),"object"!==typeof e||".sv"in e)return new Te(e,Ve(t));if(e instanceof Array){var n=Fe.EMPTY_NODE;return M(e,(function(t,r){if(a.contains(e,t)&&"."!==t.substring(0,1)){var i=Ve(r);!i.isLeafNode()&&i.isEmpty()||(n=n.updateImmediateChild(t,i))}})),n.updatePriority(Ve(t))}var r=[],i=!1;if(M(e,(function(e,t){if("."!==e.substring(0,1)){var n=Ve(t);n.isEmpty()||(i=i||!n.getPriority().isEmpty(),r.push(new de(e,n)))}})),0===r.length)return Fe.EMPTY_NODE;var o=Re(r,Me,(function(e){return e.name}),je);if(i){var s=Re(r,Ce.getCompare());return new Fe(o,Ve(t),new Le({".priority":s},{".priority":Ce}))}return new Fe(o,Ve(t),Le.Default)}!function(e){be=e}(Ve);var qe,Be=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t.prototype.compare=function(e,t){var n=e.node.compareTo(t.node);return 0===n?A(e.name,t.name):n},t.prototype.isDefinedOn=function(e){return!0},t.prototype.indexedValueChanged=function(e,t){return!e.equals(t)},t.prototype.minPost=function(){return de.MIN},t.prototype.maxPost=function(){return de.MAX},t.prototype.makePost=function(e,t){var n=Ve(e);return new de(t,n)},t.prototype.toString=function(){return".value"},t}(ve)),ze=function(e){function t(t){var n=e.call(this)||this;return n.indexPath_=t,a.assert(!t.isEmpty()&&".priority"!==t.getFront(),"Can't create PathIndex with empty path or .priority key"),n}return o.__extends(t,e),t.prototype.extractChild=function(e){return e.getChild(this.indexPath_)},t.prototype.isDefinedOn=function(e){return!e.getChild(this.indexPath_).isEmpty()},t.prototype.compare=function(e,t){var n=this.extractChild(e.node),r=this.extractChild(t.node),i=n.compareTo(r);return 0===i?A(e.name,t.name):i},t.prototype.makePost=function(e,t){var n=Ve(e),r=Fe.EMPTY_NODE.updateChild(this.indexPath_,n);return new de(t,r)},t.prototype.maxPost=function(){var e=Fe.EMPTY_NODE.updateChild(this.indexPath_,Ue);return new de(N,e)},t.prototype.toString=function(){return this.indexPath_.slice().join("/")},t}(ve),We=function(){function e(e,t,n){this.node_=e,this.ref_=t,this.index_=n}return e.prototype.val=function(){return a.validateArgCount("DataSnapshot.val",0,0,arguments.length),this.node_.val()},e.prototype.exportVal=function(){return a.validateArgCount("DataSnapshot.exportVal",0,0,arguments.length),this.node_.val(!0)},e.prototype.toJSON=function(){return a.validateArgCount("DataSnapshot.toJSON",0,1,arguments.length),this.exportVal()},e.prototype.exists=function(){return a.validateArgCount("DataSnapshot.exists",0,0,arguments.length),!this.node_.isEmpty()},e.prototype.child=function(t){a.validateArgCount("DataSnapshot.child",0,1,arguments.length),t=String(t),ae("DataSnapshot.child",1,t,!1);var n=new B(t),r=this.ref_.child(n);return new e(this.node_.getChild(n),r,Ce)},e.prototype.hasChild=function(e){a.validateArgCount("DataSnapshot.hasChild",1,1,arguments.length),ae("DataSnapshot.hasChild",1,e,!1);var t=new B(e);return!this.node_.getChild(t).isEmpty()},e.prototype.getPriority=function(){return a.validateArgCount("DataSnapshot.getPriority",0,0,arguments.length),this.node_.getPriority().val()},e.prototype.forEach=function(t){var n=this;if(a.validateArgCount("DataSnapshot.forEach",1,1,arguments.length),a.validateCallback("DataSnapshot.forEach",1,t,!1),this.node_.isLeafNode())return!1;var r=this.node_;return!!r.forEachChild(this.index_,(function(r,i){return t(new e(i,n.ref_.child(r),Ce))}))},e.prototype.hasChildren=function(){return a.validateArgCount("DataSnapshot.hasChildren",0,0,arguments.length),!this.node_.isLeafNode()&&!this.node_.isEmpty()},Object.defineProperty(e.prototype,"key",{get:function(){return this.ref_.getKey()}
2,enumerable:!1,configurable:!0}),e.prototype.numChildren=function(){return a.validateArgCount("DataSnapshot.numChildren",0,0,arguments.length),this.node_.numChildren()},e.prototype.getRef=function(){return a.validateArgCount("DataSnapshot.ref",0,0,arguments.length),this.ref_},Object.defineProperty(e.prototype,"ref",{get:function(){return this.getRef()},enumerable:!1,configurable:!0}),e}(),He=function(){function e(e,t,n,r){this.eventType=e,this.eventRegistration=t,this.snapshot=n,this.prevName=r}return e.prototype.getPath=function(){var e=this.snapshot.getRef();return"value"===this.eventType?e.path:e.getParent().path},e.prototype.getEventType=function(){return this.eventType},e.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},e.prototype.toString=function(){return this.getPath().toString()+":"+this.eventType+":"+a.stringify(this.snapshot.exportVal())},e}(),Ge=function(){function e(e,t,n){this.eventRegistration=e,this.error=t,this.path=n}return e.prototype.getPath=function(){return this.path},e.prototype.getEventType=function(){return"cancel"},e.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},e.prototype.toString=function(){return this.path.toString()+":cancel"},e}(),Ke=function(){function e(e,t,n){this.callback_=e,this.cancelCallback_=t,this.context_=n}return e.prototype.respondsTo=function(e){return"value"===e},e.prototype.createEvent=function(e,t){var n=t.getQueryParams().getIndex();return new He("value",this,new We(e.snapshotNode,t.getRef(),n))},e.prototype.getEventRunner=function(e){var t=this.context_;if("cancel"===e.getEventType()){a.assert(this.cancelCallback_,"Raising a cancel event on a listener with no cancel callback");var n=this.cancelCallback_;return function(){n.call(t,e.error)}}var r=this.callback_;return function(){r.call(t,e.snapshot)}},e.prototype.createCancelEvent=function(e,t){return this.cancelCallback_?new Ge(this,e,t):null},e.prototype.matches=function(t){return t instanceof e&&(!t.callback_||!this.callback_||t.callback_===this.callback_&&t.context_===this.context_)},e.prototype.hasAnyCallback=function(){return null!==this.callback_},e}(),Qe=function(){function e(e,t,n){this.callbacks_=e,this.cancelCallback_=t,this.context_=n}return e.prototype.respondsTo=function(e){var t="children_added"===e?"child_added":e;return t="children_removed"===t?"child_removed":t,a.contains(this.callbacks_,t)},e.prototype.createCancelEvent=function(e,t){return this.cancelCallback_?new Ge(this,e,t):null},e.prototype.createEvent=function(e,t){a.assert(null!=e.childName,"Child events should have a childName.");var n=t.getRef().child(e.childName),r=t.getQueryParams().getIndex();return new He(e.type,this,new We(e.snapshotNode,n,r),e.prevName)},e.prototype.getEventRunner=function(e){var t=this.context_;if("cancel"===e.getEventType()){a.assert(this.cancelCallback_,"Raising a cancel event on a listener with no cancel callback");var n=this.cancelCallback_;return function(){n.call(t,e.error)}}var r=this.callbacks_[e.eventType];return function(){r.call(t,e.snapshot,e.prevName)}},e.prototype.matches=function(t){var n=this;if(t instanceof e){if(!this.callbacks_||!t.callbacks_)return!0;if(this.context_===t.context_){var r=Object.keys(t.callbacks_),i=Object.keys(this.callbacks_),o=r.length;if(o===i.length){if(1===o){var a=r[0],s=i[0];return s===a&&(!t.callbacks_[a]||!this.callbacks_[s]||t.callbacks_[a]===this.callbacks_[s])}return i.every((function(e){return t.callbacks_[e]===n.callbacks_[e]}))}}}return!1},e.prototype.hasAnyCallback=function(){return null!==this.callbacks_},e}(),$e=function(){function e(e,t,n,r){this.repo=e,this.path=t,this.queryParams_=n,this.orderByCalled_=r}return Object.defineProperty(e,"__referenceConstructor",{get:function(){return a.assert(qe,"Reference.ts has not been loaded"),qe},set:function(e){qe=e},enumerable:!1,configurable:!0}),e.validateQueryEndpoints_=function(e){var t=null,n=null;if(e.hasStart()&&(t=e.getIndexStartValue()),e.hasEnd()&&(n=e.getIndexEndValue()),e.getIndex()===ye){var r="Query: When ordering by key, you may only pass one argument to startAt(), endAt(), or equalTo().",i="Query: When ordering by key, the argument passed to startAt(), endAt(),or equalTo() must be a string.";if(e.hasStart()){if(e.getIndexStartName()!==O)throw new Error(r);if("string"!==typeof t)throw new Error(i)}if(e.hasEnd()){if(e.getIndexEndName()!==N)throw new Error(r);if("string"!==typeof n)throw new Error(i)}}else if(e.getIndex()===Ce){if(null!=t&&!Z(t)||null!=n&&!Z(n))throw new Error("Query: When ordering by priority, the first argument passed to startAt(), endAt(), or equalTo() must be a valid priority value (null, a number, or a string).")}else if(a.assert(e.getIndex()instanceof ze||e.getIndex()===Be,"unknown index type."),null!=t&&"object"===typeof t||null!=n&&"object"===typeof n)throw new Error("Query: First argument passed to startAt(), endAt(), or equalTo() cannot be an object.")},e.validateLimit_=function(e){if(e.hasStart()&&e.hasEnd()&&e.hasLimit()&&!e.hasAnchoredLimit())throw new Error("Query: Can't combine startAt(), endAt(), and limit(). Use limitToFirst() or limitToLast() instead.")},e.prototype.validateNoPreviousOrderByCall_=function(e){if(!0===this.orderByCalled_)throw new Error(e+": You can't combine multiple orderBy calls.")},e.prototype.getQueryParams=function(){return this.queryParams_},e.prototype.getRef=function(){return a.validateArgCount("Query.ref",0,0,arguments.length),new e.__referenceConstructor(this.repo,this.path)},e.prototype.on=function(t,n,r,i){a.validateArgCount("Query.on",2,4,arguments.length),ie("Query.on",1,t,!1),a.validateCallback("Query.on",2,n,!1);var o=e.getCancelAndContextArgs_("Query.on",r,i);if("value"===t)this.onValueEvent(n,o.cancel,o.context);else{var s={};s[t]=n,this.onChildEvent(s,o.cancel,o.context)}return n},e.prototype.onValueEvent=function(e,t,n){var r=new Ke(e,t||null,n||null);this.repo.addEventCallbackForQuery(this,r)},e.prototype.onChildEvent=function(e,t,n){var r=new Qe(e,t,n);this.repo.addEventCallbackForQuery(this,r)},e.prototype.off=function(e,t,n){a.validateArgCount("Query.off",0,3,arguments.length),ie("Query.off",1,e,!0),a.validateCallback("Query.off",2,t,!0),a.validateContextObject("Query.off",3,n,!0);var r=null,i=null;if("value"===e){var o=t||null;r=new Ke(o,null,n||null)}else e&&(t&&((i={}
2)[e]=t),r=new Qe(i,null,n||null));this.repo.removeEventCallbackForQuery(this,r)},e.prototype.once=function(t,n,r,i){var o=this;a.validateArgCount("Query.once",1,4,arguments.length),ie("Query.once",1,t,!1),a.validateCallback("Query.once",2,n,!0);var s=e.getCancelAndContextArgs_("Query.once",r,i),u=!0,c=new a.Deferred;c.promise.catch((function(){}));var l=function e(r){u&&(u=!1,o.off(t,e),n&&n.bind(s.context)(r),c.resolve(r))};return this.on(t,l,(function(e){o.off(t,l),s.cancel&&s.cancel.bind(s.context)(e),c.reject(e)})),c.promise},e.prototype.limitToFirst=function(t){if(a.validateArgCount("Query.limitToFirst",1,1,arguments.length),"number"!==typeof t||Math.floor(t)!==t||t<=0)throw new Error("Query.limitToFirst: First argument must be a positive integer.");if(this.queryParams_.hasLimit())throw new Error("Query.limitToFirst: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new e(this.repo,this.path,this.queryParams_.limitToFirst(t),this.orderByCalled_)},e.prototype.limitToLast=function(t){if(a.validateArgCount("Query.limitToLast",1,1,arguments.length),"number"!==typeof t||Math.floor(t)!==t||t<=0)throw new Error("Query.limitToLast: First argument must be a positive integer.");if(this.queryParams_.hasLimit())throw new Error("Query.limitToLast: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new e(this.repo,this.path,this.queryParams_.limitToLast(t),this.orderByCalled_)},e.prototype.orderByChild=function(t){if(a.validateArgCount("Query.orderByChild",1,1,arguments.length),"$key"===t)throw new Error('Query.orderByChild: "$key" is invalid. Use Query.orderByKey() instead.');if("$priority"===t)throw new Error('Query.orderByChild: "$priority" is invalid. Use Query.orderByPriority() instead.');if("$value"===t)throw new Error('Query.orderByChild: "$value" is invalid. Use Query.orderByValue() instead.');ae("Query.orderByChild",1,t,!1),this.validateNoPreviousOrderByCall_("Query.orderByChild");var n=new B(t);if(n.isEmpty())throw new Error("Query.orderByChild: cannot pass in empty path. Use Query.orderByValue() instead.");var r=new ze(n),i=this.queryParams_.orderBy(r);return e.validateQueryEndpoints_(i),new e(this.repo,this.path,i,!0)},e.prototype.orderByKey=function(){a.validateArgCount("Query.orderByKey",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByKey");var t=this.queryParams_.orderBy(ye);return e.validateQueryEndpoints_(t),new e(this.repo,this.path,t,!0)},e.prototype.orderByPriority=function(){a.validateArgCount("Query.orderByPriority",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByPriority");var t=this.queryParams_.orderBy(Ce);return e.validateQueryEndpoints_(t),new e(this.repo,this.path,t,!0)},e.prototype.orderByValue=function(){a.validateArgCount("Query.orderByValue",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByValue");var t=this.queryParams_.orderBy(Be);return e.validateQueryEndpoints_(t),new e(this.repo,this.path,t,!0)},e.prototype.startAt=function(t,n){void 0===t&&(t=null),a.validateArgCount("Query.startAt",0,2,arguments.length),ee("Query.startAt",1,t,this.path,!0),oe("Query.startAt",2,n,!0);var r=this.queryParams_.startAt(t,n);if(e.validateLimit_(r),e.validateQueryEndpoints_(r),this.queryParams_.hasStart())throw new Error("Query.startAt: Starting point was already set (by another call to startAt or equalTo).");return void 0===t&&(t=null,n=null),new e(this.repo,this.path,r,this.orderByCalled_)},e.prototype.endAt=function(t,n){void 0===t&&(t=null),a.validateArgCount("Query.endAt",0,2,arguments.length),ee("Query.endAt",1,t,this.path,!0),oe("Query.endAt",2,n,!0);var r=this.queryParams_.endAt(t,n);if(e.validateLimit_(r),e.validateQueryEndpoints_(r),this.queryParams_.hasEnd())throw new Error("Query.endAt: Ending point was already set (by another call to endAt or equalTo).");return new e(this.repo,this.path,r,this.orderByCalled_)},e.prototype.equalTo=function(e,t){if(a.validateArgCount("Query.equalTo",1,2,arguments.length),ee("Query.equalTo",1,e,this.path,!1),oe("Query.equalTo",2,t,!0),this.queryParams_.hasStart())throw new Error("Query.equalTo: Starting point was already set
2(by another call to startAt or equalTo).");if(this.queryParams_.hasEnd())throw new Error("Query.equalTo: Ending point was already set (by another call to endAt or equalTo).");return this.startAt(e,t).endAt(e,t)},e.prototype.toString=function(){return a.validateArgCount("Query.toString",0,0,arguments.length),this.repo.toString()+this.path.toUrlEncodedString()},e.prototype.toJSON=function(){return a.validateArgCount("Query.toJSON",0,1,arguments.length),this.toString()},e.prototype.queryObject=function(){return this.queryParams_.getQueryObject()},e.prototype.queryIdentifier=function(){var e=this.queryObject(),t=D(e);return"{}"===t?"default":t},e.prototype.isEqual=function(t){if(a.validateArgCount("Query.isEqual",1,1,arguments.length),!(t instanceof e)){var n="Query.isEqual failed: First argument must be an instance of firebase.database.Query.";throw new Error(n)}var r=this.repo===t.repo,i=this.path.equals(t.path),o=this.queryIdentifier()===t.queryIdentifier();return r&&i&&o},e.getCancelAndContextArgs_=function(e,t,n){var r={cancel:null,context:null};if(t&&n)r.cancel=t,a.validateCallback(e,3,r.cancel,!0),r.context=n,a.validateContextObject(e,4,r.context,!0);else if(t)if("object"===typeof t&&null!==t)r.context=t;else{if("function"!==typeof t)throw new Error(a.errorPrefix(e,3,!0)+" must either be a cancel callback or a context object.");r.cancel=t}return r},Object.defineProperty(e.prototype,"ref",{get:function(){return this.getRef()},enumerable:!1,configurable:!0}),e}(),Ye=function(){function e(e){this.node_=e}return e.prototype.getImmediateChild=function(t){return new e(this.node_.getImmediateChild(t))},e.prototype.node=function(){return this.node_},e}(),Xe=function(){function e(e,t){this.syncTree_=e,this.path_=t}return e.prototype.getImmediateChild=function(t){var n=this.path_.child(t);return new e(this.syncTree_,n)},e.prototype.node=function(){return this.syncTree_.calcCompleteEventCache(this.path_)},e}(),Je=function(e,t,n){return e&&"object"===typeof e?(a.assert(".sv"in e,"Unexpected leaf node or priority contents"),"string"===typeof e[".sv"]?Ze(e[".sv"],t,n):"object"===typeof e[".sv"]?et(e[".sv"],t):void a.assert(!1,"Unexpected server value: "+JSON.stringify(e,null,2))):e},Ze=function(e,t,n){switch(e){case"timestamp":return n.timestamp;default:a.assert(!1,"Unexpected server value: "+e)}},et=function(e,t,n){e.hasOwnProperty("increment")||a.assert(!1,"Unexpected server value: "+JSON.stringify(e,null,2));var r=e.increment;"number"!==typeof r&&a.assert(!1,"Unexpected increment value: "+r);var i=t.node();if(a.assert(null!==i&&"undefined"!==typeof i,"Expected ChildrenNode.EMPTY_NODE for nulls"),!i.isLeafNode())return r;var o=i.getValue();return"number"!==typeof o?r:o+r},tt=function(e,t,n,r){return rt(t,new Xe(n,e),r)},nt=function(e,t,n){return rt(e,new Ye(t),n)};function rt(e,t,n){var r,i=e.getPriority().val(),o=Je(i,t.getImmediateChild(".priority"),n);if(e.isLeafNode()){var a=e,s=Je(a.getValue(),t,n);return s!==a.getValue()||o!==a.getPriority().val()?new Te(s,Ve(o)):e}var u=e;return r=u,o!==u.getPriority().val()&&(r=r.updatePriority(new Te(o))),u.forEachChild(Ce,(function(e,i){var o=rt(i,t.getImmediateChild(e),n);o!==i&&(r=r.updateImmediateChild(e,o))})),r}var it,ot=function(){function e(){this.value=null,this.children=new Map}return e.prototype.find=function(e){if(null!=this.value)return this.value.getChild(e);if(!e.isEmpty()&&this.children.size>0){var t=e.getFront();return e=e.popFront(),this.children.has(t)?this.children.get(t).find(e):null}return null},e.prototype.remember=function(t,n){if(t.isEmpty())this.value=n,this.children.clear();else if(null!==this.value)this.value=this.value.updateChild(t,n);else{var r=t.getFront();this.children.has(r)||this.children.set(r,new e);var i=this.children.get(r);t=t.popFront(),i.remember(t,n)}},e.prototype.forget=function(e){if(e.isEmpty())return this.value=null,this.children.clear(),!0;if(null!==this.value){if(this.value.isLeafNode())return!1;var t=this.value;this.value=null;var n=this;return t.forEachChild(Ce,(function(e,t){n.remember(new B(e),t)})),this.forget(e)}if(this.children.size>0){var r=e.getFront();if(e=e.popFront(),this.children.has(r))this.children.get(r).forget(e)&&this.children.delete(r);return 0===this.children.size}return!0},e.prototype.forEachTree=function(e,t){null!==this.value?t(e,this.value):this.forEachChild((function(n,r){var i=new B(e.toString()+"/"+n);r.forEachTree(i,t)}))}
2,e.prototype.forEachChild=function(e){this.children.forEach((function(t,n){e(n,t)}))},e}();!function(e){e[e.OVERWRITE=0]="OVERWRITE",e[e.MERGE=1]="MERGE",e[e.ACK_USER_WRITE=2]="ACK_USER_WRITE",e[e.LISTEN_COMPLETE=3]="LISTEN_COMPLETE"}(it||(it={}));var at,st,ut=function(){function e(e,t,n,r){this.fromUser=e,this.fromServer=t,this.queryId=n,this.tagged=r,a.assert(!r||t,"Tagged queries must be from server.")}return e.User=new e(!0,!1,null,!1),e.Server=new e(!1,!0,null,!1),e.forServerTaggedQuery=function(t){return new e(!1,!0,t,!0)},e}(),ct=function(){function e(e,t,n){this.path=e,this.affectedTree=t,this.revert=n,this.type=it.ACK_USER_WRITE,this.source=ut.User}return e.prototype.operationForChild=function(t){if(this.path.isEmpty()){if(null!=this.affectedTree.value)return a.assert(this.affectedTree.children.isEmpty(),"affectedTree should not have overlapping affected paths."),this;var n=this.affectedTree.subtree(new B(t));return new e(B.Empty,n,this.revert)}return a.assert(this.path.getFront()===t,"operationForChild called for unrelated child."),new e(this.path.popFront(),this.affectedTree,this.revert)},e}(),lt=function(){function e(e,t){void 0===t&&(at||(at=new Ne(P)),t=at),this.value=e,this.children=t}return e.fromObject=function(t){var n=e.Empty;return M(t,(function(e,t){n=n.set(new B(e),t)})),n},e.prototype.isEmpty=function(){return null===this.value&&this.children.isEmpty()},e.prototype.findRootMostMatchingPathAndValue=function(e,t){if(null!=this.value&&t(this.value))return{path:B.Empty,value:this.value};if(e.isEmpty())return null;var n=e.getFront(),r=this.children.get(n);if(null!==r){var i=r.findRootMostMatchingPathAndValue(e.popFront(),t);return null!=i?{path:new B(n).child(i.path),value:i.value}:null}return null},e.prototype.findRootMostValueAndPath=function(e){return this.findRootMostMatchingPathAndValue(e,(function(){return!0}))},e.prototype.subtree=function(t){if(t.isEmpty())return this;var n=t.getFront(),r=this.children.get(n);return null!==r?r.subtree(t.popFront()):e.Empty},e.prototype.set=function(t,n){if(t.isEmpty())return new e(n,this.children);var r=t.getFront(),i=(this.children.get(r)||e.Empty).set(t.popFront(),n),o=this.children.insert(r,i);return new e(this.value,o)},e.prototype.remove=function(t){if(t.isEmpty())return this.children.isEmpty()?e.Empty:new e(null,this.children);var n=t.getFront(),r=this.children.get(n);if(r){var i=r.remove(t.popFront()),o=void 0;return o=i.isEmpty()?this.children.remove(n):this.children.insert(n,i),null===this.value&&o.isEmpty()?e.Empty:new e(this.value,o)}return this},e.prototype.get=function(e){if(e.isEmpty())return this.value;var t=e.getFront(),n=this.children.get(t);return n?n.get(e.popFront()):null},e.prototype.setTree=function(t,n){if(t.isEmpty())return n;var r=t.getFront(),i=(this.children.get(r)||e.Empty).setTree(t.popFront(),n),o=void 0;return o=i.isEmpty()?this.children.remove(r):this.children.insert(r,i),new e(this.value,o)},e.prototype.fold=function(e){return this.fold_(B.Empty,e)},e.prototype.fold_=function(e,t){var n={};return this.children.inorderTraversal((function(r,i){n[r]=i.fold_(e.child(r),t)})),t(e,this.value,n)},e.prototype.findOnPath=function(e,t){return this.findOnPath_(e,B.Empty,t)},e.prototype.findOnPath_=function(e,t,n){var r=!!this.value&&n(t,this.value);if(r)return r;if(e.isEmpty())return null;var i=e.getFront(),o=this.children.get(i);return o?o.findOnPath_(e.popFront(),t.child(i),n):null},e.prototype.foreachOnPath=function(e,t){return this.foreachOnPath_(e,B.Empty,t)},e.prototype.foreachOnPath_=function(t,n,r){if(t.isEmpty())return this;this.value&&r(n,this.value);var i=t.getFront(),o=this.children.get(i);return o?o.foreachOnPath_(t.popFront(),n.child(i),r):e.Empty},e.prototype.foreach=function(e){this.foreach_(B.Empty,e)},e.prototype.foreach_=function(e,t){this.children.inorderTraversal((function(n,r){r.foreach_(e.child(n),t)})),this.value&&t(e,this.value)},e.prototype.foreachChild=function(e){this.children.inorderTraversal((function(t,n){n.value&&e(t,n.value)}))},e.Empty=new e(null),e}(),ht=function(){function e(e,t){this.source=e,this.path=t,this.type=it.LISTEN_COMPLETE}return e.prototype.operationForChild=function(t){return this.path.isEmpty()?new e(this.source,B.Empty):new e(this.source,this.path.popFront())},e}(),ft=function(){function e(e,t,n){this.source=e,this.path=t,this.snap=n,this.type=it.OVERWRITE}return e.prototype.operationForChild=function(t){return this.path.isEmpty()?new e(this.source,B.Empty,this.snap.getImmediateChild(t)):new e(this.source,this.path.popFront(),this.snap)},e}(),pt=function(){function e(e,t,n){this.source=e,this.path=t,this.children=n,this.type=it.MERGE}return e.prototype.operationForChild=function(t){if(this.path.isEmpty()){var n=this.children.subtree(new B(t));return n.isEmpty()?null:n.value?new ft(this.source,B.Empty,n.value):new e(this.source,B.Empty,n)}return a.assert(this.path.getFront()===t,"Can't get a merge for a child not on the path of the operation"),new e(this.source,this.path.popFront(),this.children)},e.prototype.toString=function(){return"Operation("+this.path+": "+this.source.toString()+" merge: "+this.children.toString()+")"},e}(),dt=function(){function e(e,t,n){this.node_=e,this.fullyInitialized_=t,this.filtered_=n}return e.prototype.isFullyInitialized=function(){return this.fullyInitialized_},e.prototype.isFiltered=function(){return this.filtered_},e.prototype.isCompleteForPath=function(e){if(e.isEmpty())return this.isFullyInitialized()&&!this.filtered_;var t=e.getFront();return this.isCompleteForChild(t)},e.prototype.isCompleteForChild=function(e){return this.isFullyInitialized()&&!this.filtered_||this.node_.hasChild(e)},e.prototype.getNode=function(){return this.node_},e}(),vt=function(){function e(e,t){this.eventCache_=e,this.serverCache_=t}return e.prototype.updateEventSnap=function(t,n,r){return new e(new dt(t,n,r),this.serverCache_)},e.prototype.updateServerSnap=function(t,n,r){return new e(this.eventCache_,new dt(t,n,r))},e.prototype.getEventCache=function(){return this.eventCache_},e.prototype.getCompleteEventSnap=function(){return this.eventCache_.isFullyInitialized()?this.eventCache_.getNode():null},e.prototype.getServerCache=function(){return this.serverCache_},e.prototype.getCompleteServerSnap=function(){return this.serverCache_.isFullyInitialized()?this.serverCache_.getNode():null},e.Empty=new e(new dt(Fe.EMPTY_NODE,!1,!1),new dt(Fe.EMPTY_NODE,!1,!1)),e}(),gt=function(){function e(e,t,n,r,i){this.type=e,this.snapshotNode=t,this.childName=n,this.oldSnap=r,this.prevName=i}return e.valueChange=function(t){return new e(e.VALUE,t)},e.childAddedChange=function(t,n){return new e(e.CHILD_ADDED,n,t)},e.childRemovedChange=function(t,n){return new e(e.CHILD_REMOVED,n,t)},e.childChangedChange=function(t,n,r){return new e(e.CHILD_CHANGED,n,t,r)},e.childMovedChange=function(t,n){return new e(e.CHILD_MOVED,n,t)},e.CHILD_ADDED="child_added",e.CHILD_REMOVED="child_removed",e.CHILD_CHANGED="child_changed",e.CHILD_MOVED="child_moved",e.VALUE="value",e}(),yt=function(){function e(e){this.index_=e}return e.prototype.updateChild=function(e,t,n,r,i,o){a.assert(e.isIndexed(this.index_),"A node must be indexed if only a child is updated");var s=e.getImmediateChild(t);return s.getChild(r).equals(n.getChild(r))&&s.isEmpty()===n.isEmpty()?e:(null!=o&&(n.isEmpty()?e.hasChild(t)?o.trackChildChange(gt.childRemovedChange(t,s)):a.assert(e.isLeafNode(),"A child remove without an old child only makes sense on a leaf node"):s.isEmpty()?o.trackChildChange(gt.childAddedChange(t,n)):o.trackChildChange(gt.childChangedChange(t,n,s))),e.isLeafNode()&&n.isEmpty()?e:e.updateImmediateChild(t,n).withIndex(this.index_))},e.prototype.updateFullNode=function(e,t,n){return null!=n&&(e.isLeafNode()||e.forEachChild(Ce,(function(e,r){t.hasChild(e)||n.trackChildChange(gt.childRemovedChange(e,r))})),t.isLeafNode()||t.forEachChild(Ce,(function(t,r){if(e.hasChild(t)){var i=e.getImmediateChild(t);i.equals(r)||n.trackChildChange(gt.childChangedChange(t,r,i))}else n.trackChildChange(gt.childAddedChange(t,r))}))),t.withIndex(this.index_)},e.prototype.updatePriority=function(e,t){return e.isEmpty()?Fe.EMPTY_NODE:e.updatePriority(t)},e.prototype.filtersNodes=function(){return!1},e.prototype.getIndexedFilter=function(){return this},e.prototype.getIndex=function(){return this.index_},e}(),mt=function(){function e(){this.changeMap=new Map}return e.prototype.trackChildChange=function(e){var t=e.type,n=e.childName;a.assert(t===gt.CHILD_ADDED||t===gt.CHILD_CHANGED||t===gt.CHILD_REMOVED,"Only child changes supported for tracking"),a.assert(".priority"!==n,"Only non-priority child changes can be tracked.");var r=this.changeMap.get(n);if(r){var i=r.type;if(t===gt.CHILD_ADDED&&i===gt.CHILD_REMOVED)this.changeMap.set(n,gt.childChangedChange(n,e.snapshotNode,r.snapshotNode));else if(t===gt.CHILD_REMOVED&&i===gt.CHILD_ADDED)this.changeMap.delete(n);else if(t===gt.CHILD_REMOVED&&i===gt.CHILD_CHANGED)this.changeMap.set(n,gt.childRemovedChange(n,r.oldSnap));else if(t===gt.CHILD_CHANGED&&i===gt.CHILD_ADDED)this.changeMap.set(n,gt.childAddedChange(n,e.snapshotNode));else{if(t!==gt.CHILD_CHANGED||i!==gt.CHILD_CHANGED)throw a.assertionError("Illegal combination of changes: "+e+" occurred after "+r);this.changeMap.set(n,gt.childChangedChange(n,e.snapshotNode,r.oldSnap))}}else this.changeMap.set(n,e)},e.prototype.getChanges=function(){return Array.from(this.changeMap.values())},e}(),bt=new(function(){function e(){}return e.prototype.getCompleteChild=function(e){return null},e.prototype.getChildAfterChild=function(e,t,n){return null},e}()),_t=function(){function e(e,t,n){void 0===n&&(n=null),this.writes_=e,this.viewCache_=t,this.optCompleteServerCache_=n}return e.prototype.getCompleteChild=function(e){var t=this.viewCache_.getEventCache();if(t.isCompleteForChild(e))return t.getNode().getImmediateChild(e);var n=null!=this.optCompleteServerCache_?new dt(this.optCompleteServerCache_,!0,!1):this.viewCache_.getServerCache();return this.writes_.calcCompleteChild(e,n)},e.prototype.getChildAfterChild=function(e,t,n){var r=null!=this.optCompleteServerCache_?this.optCompleteServerCache_:this.viewCache_.getCompleteServerSnap(),i=this.writes_.calcIndexedSlice(r,t,1,n,e);return 0===i.length?null:i[0]},e}(),wt=function(e,t){this.viewCache=e,this.changes=t},Et=function(){function e(e){this.filter_=e}return e.prototype.assertIndexed=function(e){a.assert(e.getEventCache().getNode().isIndexed(this.filter_.getIndex()),"Event snap not indexed"),a.assert(e.getServerCache().getNode().isIndexed(this.filter_.getIndex()),"Server snap not indexed")},e.prototype.applyOperation=function(t,n,r,i){var o,s,u=new mt;if(n.type===it.OVERWRITE){var c=n;c.source.fromUser?o=this.applyUserOverwrite_(t,c.path,c.snap,r,i,u):(a.assert(c.source.fromServer,"Unknown source."),s=c.source.tagged||t.getServerCache().isFiltered()&&!c.path.isEmpty(),o=this.applyServerOverwrite_(t,c.path,c.snap,r,i,s,u))}else if(n.type===it.MERGE){var l=n;l.source.fromUser?o=this.applyUserMerge_(t,l.path,l.children,r,i,u):(a.assert(l.source.fromServer,"Unknown source."),s=l.source.tagged||t.getServerCache().isFiltered(),o=this.applyServerMerge_(t,l.path,l.children,r,i,s,u))}else if(n.type===it.ACK_USER_WRITE){var h=n;o=h.revert?this.revertUserWrite_(t,h.path,r,i,u):this.ackUserWrite_(t,h.path,h.affectedTree,r,i,u)}else{if(n.type!==it.LISTEN_COMPLETE)throw a.assertionError("Unknown operation type: "+n.type);o=this.listenComplete_(t,n.path,r,u)}var f=u.getChanges();return e.maybeAddValueEvent_(t,o,f),new wt(o,f)},e.maybeAddValueEvent_=function(e,t,n){var r=t.getEventCache();if(r.isFullyInitialized()){var i=r.getNode().isLeafNode()||r.getNode().isEmpty(),o=e.getCompleteEventSnap();(n.length>
20||!e.getEventCache().isFullyInitialized()||i&&!r.getNode().equals(o)||!r.getNode().getPriority().equals(o.getPriority()))&&n.push(gt.valueChange(t.getCompleteEventSnap()))}},e.prototype.generateEventCacheAfterServerEvent_=function(e,t,n,r,i){var o=e.getEventCache();if(null!=n.shadowingWrite(t))return e;var s=void 0,u=void 0;if(t.isEmpty())if(a.assert(e.getServerCache().isFullyInitialized(),"If change path is empty, we must have complete server data"),e.getServerCache().isFiltered()){var c=e.getCompleteServerSnap(),l=c instanceof Fe?c:Fe.EMPTY_NODE,h=n.calcCompleteEventChildren(l);s=this.filter_.updateFullNode(e.getEventCache().getNode(),h,i)}else{var f=n.calcCompleteEventCache(e.getCompleteServerSnap());s=this.filter_.updateFullNode(e.getEventCache().getNode(),f,i)}else{var p=t.getFront();if(".priority"===p){a.assert(1===t.getLength(),"Can't have a priority with additional path components");var d=o.getNode();u=e.getServerCache().getNode();var v=n.calcEventCacheAfterServerOverwrite(t,d,u);s=null!=v?this.filter_.updatePriority(d,v):o.getNode()}else{var g=t.popFront(),y=void 0;if(o.isCompleteForChild(p)){u=e.getServerCache().getNode();var m=n.calcEventCacheAfterServerOverwrite(t,o.getNode(),u);y=null!=m?o.getNode().getImmediateChild(p).updateChild(g,m):o.getNode().getImmediateChild(p)}else y=n.calcCompleteChild(p,e.getServerCache());s=null!=y?this.filter_.updateChild(o.getNode(),p,y,g,r,i):o.getNode()}}return e.updateEventSnap(s,o.isFullyInitialized()||t.isEmpty(),this.filter_.filtersNodes())},e.prototype.applyServerOverwrite_=function(e,t,n,r,i,o,a){var s,u=e.getServerCache(),c=o?this.filter_:this.filter_.getIndexedFilter();if(t.isEmpty())s=c.updateFullNode(u.getNode(),n,null);else if(c.filtersNodes()&&!u.isFiltered()){var l=u.getNode().updateChild(t,n);s=c.updateFullNode(u.getNode(),l,null)}else{var h=t.getFront();if(!u.isCompleteForPath(t)&&t.getLength()>1)return e;var f=t.popFront(),p=u.getNode().getImmediateChild(h).updateChild(f,n);s=".priority"===h?c.updatePriority(u.getNode(),p):c.updateChild(u.getNode(),h,p,f,bt,null)}var d=e.updateServerSnap(s,u.isFullyInitialized()||t.isEmpty(),c.filtersNodes()),v=new _t(r,d,i);return this.generateEventCacheAfterServerEvent_(d,t,r,v,a)},e.prototype.applyUserOverwrite_=function(e,t,n,r,i,o){var a,s,u=e.getEventCache(),c=new _t(r,e,i);if(t.isEmpty())s=this.filter_.updateFullNode(e.getEventCache().getNode(),n,o),a=e.updateEventSnap(s,!0,this.filter_.filtersNodes());else{var l=t.getFront();if(".priority"===l)s=this.filter_.updatePriority(e.getEventCache().getNode(),n),a=e.updateEventSnap(s,u.isFullyInitialized(),u.isFiltered());else{var h=t.popFront(),f=u.getNode().getImmediateChild(l),p=void 0;if(h.isEmpty())p=n;else{var d=c.getCompleteChild(l);p=null!=d?".priority"===h.getBack()&&d.getChild(h.parent()).isEmpty()?d:d.updateChild(h,n):Fe.EMPTY_NODE}if(f.equals(p))a=e;else{var v=this.filter_.updateChild(u.getNode(),l,p,h,c,o);a=e.updateEventSnap(v,u.isFullyInitialized(),this.filter_.filtersNodes())}}}return a},e.cacheHasChild_=function(e,t){return e.getEventCache().isCompleteForChild(t)},e.prototype.applyUserMerge_=function(t,n,r,i,o,a){var s=this,u=t;return r.foreach((function(r,c){var l=n.child(r);e.cacheHasChild_(t,l.getFront())&&(u=s.applyUserOverwrite_(u,l,c,i,o,a))})),r.foreach((function(r,c){var l=n.child(r);e.cacheHasChild_(t,l.getFront())||(u=s.applyUserOverwrite_(u,l,c,i,o,a))})),u},e.prototype.applyMerge_=function(e,t){return t.foreach((function(t,n){e=e.updateChild(t,n)})),e},e.prototype.applyServerMerge_=function(e,t,n,r,i,o,a){var s=this;if(e.getServerCache().getNode().isEmpty()&&!e.getServerCache().isFullyInitialized())return e;var u,c=e;u=t.isEmpty()?n:lt.Empty.setTree(t,n);var l=e.getServerCache().getNode();return u.children.inorderTraversal((function(t,n){if(l.hasChild(t)){var u=e.getServerCache().getNode().getImmediateChild(t),h=s.applyMerge_(u,n);c=s.applyServerOverwrite_(c,new B(t),h,r,i,o,a)}})),u.children.inorderTraversal((function(t,n){var u=!e.getServerCache().isCompleteForChild(t)&&null==n.value;if(!l.hasChild(t)&&!u){var h=e.getServerCache().getNode().getImmediateChild(t),f=s.applyMerge_(h,n);c=s.applyServerOverwrite_(c,new B(t),f,r,i,o,a)}})),c},e.prototype.ackUserWrite_=function(e,t,n,r,i,o){if(null!=r.shadowingWrite(t))return e;var a=e.getServerCache().isFiltered(),s=e.getServerCache();if(null!=n.value){if(t.isEmpty()&&s.isFullyInitialized()||s.isCompleteForPath(t))return this.applyServerOverwrite_(e,t,s.getNode().getChild(t),r,i,a,o);if(t.isEmpty()){var u=lt.Empty;
2return s.getNode().forEachChild(ye,(function(e,t){u=u.set(new B(e),t)})),this.applyServerMerge_(e,t,u,r,i,a,o)}return e}var c=lt.Empty;return n.foreach((function(e,n){var r=t.child(e);s.isCompleteForPath(r)&&(c=c.set(e,s.getNode().getChild(r)))})),this.applyServerMerge_(e,t,c,r,i,a,o)},e.prototype.listenComplete_=function(e,t,n,r){var i=e.getServerCache(),o=e.updateServerSnap(i.getNode(),i.isFullyInitialized()||t.isEmpty(),i.isFiltered());return this.generateEventCacheAfterServerEvent_(o,t,n,bt,r)},e.prototype.revertUserWrite_=function(e,t,n,r,i){var o;if(null!=n.shadowingWrite(t))return e;var s=new _t(n,e,r),u=e.getEventCache().getNode(),c=void 0;if(t.isEmpty()||".priority"===t.getFront()){var l=void 0;if(e.getServerCache().isFullyInitialized())l=n.calcCompleteEventCache(e.getCompleteServerSnap());else{var h=e.getServerCache().getNode();a.assert(h instanceof Fe,"serverChildren would be complete if leaf node"),l=n.calcCompleteEventChildren(h)}l=l,c=this.filter_.updateFullNode(u,l,i)}else{var f=t.getFront(),p=n.calcCompleteChild(f,e.getServerCache());null==p&&e.getServerCache().isCompleteForChild(f)&&(p=u.getImmediateChild(f)),(c=null!=p?this.filter_.updateChild(u,f,p,t.popFront(),s,i):e.getEventCache().getNode().hasChild(f)?this.filter_.updateChild(u,f,Fe.EMPTY_NODE,t.popFront(),s,i):u).isEmpty()&&e.getServerCache().isFullyInitialized()&&(o=n.calcCompleteEventCache(e.getCompleteServerSnap())).isLeafNode()&&(c=this.filter_.updateFullNode(c,o,i))}return o=e.getServerCache().isFullyInitialized()||null!=n.shadowingWrite(B.Empty),e.updateEventSnap(c,o,this.filter_.filtersNodes())},e}(),Tt=function(){function e(e){this.query_=e,this.index_=this.query_.getQueryParams().getIndex()}return e.prototype.generateEventsForChanges=function(e,t,n){var r=this,i=[],o=[];return e.forEach((function(e){e.type===gt.CHILD_CHANGED&&r.index_.indexedValueChanged(e.oldSnap,e.snapshotNode)&&o.push(gt.childMovedChange(e.childName,e.snapshotNode))})),this.generateEventsForType_(i,gt.CHILD_REMOVED,e,n,t),this.generateEventsForType_(i,gt.CHILD_ADDED,e,n,t),this.generateEventsForType_(i,gt.CHILD_MOVED,o,n,t),this.generateEventsForType_(i,gt.CHILD_CHANGED,e,n,t),this.generateEventsForType_(i,gt.VALUE,e,n,t),i},e.prototype.generateEventsForType_=function(e,t,n,r,i){var o=this,a=n.filter((function(e){return e.type===t}));a.sort(this.compareChanges_.bind(this)),a.forEach((function(t){var n=o.materializeSingleChange_(t,i);r.forEach((function(r){r.respondsTo(t.type)&&e.push(r.createEvent(n,o.query_))}))}))},e.prototype.materializeSingleChange_=function(e,t){return"value"===e.type||"child_removed"===e.type||(e.prevName=t.getPredecessorChildName(e.childName,e.snapshotNode,this.index_)),e},e.prototype.compareChanges_=function(e,t){if(null==e.childName||null==t.childName)throw a.assertionError("Should only compare child_ events.");var n=new de(e.childName,e.snapshotNode),r=new de(t.childName,t.snapshotNode);return this.index_.compare(n,r)},e}(),St=function(){function e(e,t){this.query_=e,this.eventRegistrations_=[];var n=this.query_.getQueryParams(),r=new yt(n.getIndex()),i=n.getNodeFilter();this.processor_=new Et(i);var o=t.getServerCache(),a=t.getEventCache(),s=r.updateFullNode(Fe.EMPTY_NODE,o.getNode(),null),u=i.updateFullNode(Fe.EMPTY_NODE,a.getNode(),null),c=new dt(s,o.isFullyInitialized(),r.filtersNodes()),l=new dt(u,a.isFullyInitialized(),i.filtersNodes());this.viewCache_=new vt(l,c),this.eventGenerator_=new Tt(this.query_)}return e.prototype.getQuery=function(){return this.query_},e.prototype.getServerCache=function(){return this.viewCache_.getServerCache().getNode()},e.prototype.getCompleteServerCache=function(e){var t=this.viewCache_.getCompleteServerSnap();return t&&(this.query_.getQueryParams().loadsAllData()||!e.isEmpty()&&!t.getImmediateChild(e.getFront()).isEmpty())?t.getChild(e):null},e.prototype.isEmpty=function(){return 0===this.eventRegistrations_.length},e.prototype.addEventRegistration=function(e){this.eventRegistrations_.push(e)},e.prototype.removeEventRegistration=function(e,t){var n=[];if(t){a.assert(null==e,"A cancel should cancel all event registrations.");var r=this.query_.path;this.eventRegistrations_.forEach((function(e){t=t;var i=e.createCancelEvent(t,r);i&&n.push(i)}))}if(e){for(var i=[],o=0;o<this.eventRegistrations_.length;++o){var s=this.eventRegistrations_[o];if(s.matches(e)){if(e.hasAnyCallback()){i=i.concat(this.eventRegistrations_.slice(o+1));break}}else i.push(s)}this.eventRegistrations_=i}else this.eventRegistrations_=[];return n},e.prototype.applyOperation=function(e,t,n){e.type===it.MERGE&&null!==e.source.queryId&&(a.assert(this.viewCache_.getCompleteServerSnap(),"We should always have a full c
2ache before handling merges"),a.assert(this.viewCache_.getCompleteEventSnap(),"Missing event cache, even though we have a server cache"));var r=this.viewCache_,i=this.processor_.applyOperation(r,e,t,n);return this.processor_.assertIndexed(i.viewCache),a.assert(i.viewCache.getServerCache().isFullyInitialized()||!r.getServerCache().isFullyInitialized(),"Once a server snap is complete, it should never go back"),this.viewCache_=i.viewCache,this.generateEventsForChanges_(i.changes,i.viewCache.getEventCache().getNode(),null)},e.prototype.getInitialEvents=function(e){var t=this.viewCache_.getEventCache(),n=[];t.getNode().isLeafNode()||t.getNode().forEachChild(Ce,(function(e,t){n.push(gt.childAddedChange(e,t))}));return t.isFullyInitialized()&&n.push(gt.valueChange(t.getNode())),this.generateEventsForChanges_(n,t.getNode(),e)},e.prototype.generateEventsForChanges_=function(e,t,n){var r=n?[n]:this.eventRegistrations_;return this.eventGenerator_.generateEventsForChanges(e,t,r)},e}(),It=function(){function e(){this.views=new Map}return Object.defineProperty(e,"__referenceConstructor",{get:function(){return a.assert(st,"Reference.ts has not been loaded"),st},set:function(e){a.assert(!st,"__referenceConstructor has already been defined"),st=e},enumerable:!1,configurable:!0}),e.prototype.isEmpty=function(){return 0===this.views.size},e.prototype.applyOperation=function(e,t,n){var r,i,s=e.source.queryId;if(null!==s){var u=this.views.get(s);return a.assert(null!=u,"SyncTree gave us an op for an invalid query."),u.applyOperation(e,t,n)}var c=[];try{for(var l=o.__values(this.views.values()),h=l.next();!h.done;h=l.next()){u=h.value;c=c.concat(u.applyOperation(e,t,n))}}catch(f){r={error:f}}finally{try{h&&!h.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}return c},e.prototype.addEventRegistration=function(e,t,n,r,i){var o=e.queryIdentifier(),a=this.views.get(o);if(!a){var s=n.calcCompleteEventCache(i?r:null),u=!1;s?u=!0:r instanceof Fe?(s=n.calcCompleteEventChildren(r),u=!1):(s=Fe.EMPTY_NODE,u=!1);var c=new vt(new dt(s,u,!1),new dt(r,i,!1));a=new St(e,c),this.views.set(o,a)}return a.addEventRegistration(t),a.getInitialEvents(t)},e.prototype.removeEventRegistration=function(t,n,r){var i,a,s=t.queryIdentifier(),u=[],c=[],l=this.hasCompleteView();if("default"===s)try{for(var h=o.__values(this.views.entries()),f=h.next();!f.done;f=h.next()){var p=o.__read(f.value,2),d=p[0],v=p[1];c=c.concat(v.removeEventRegistration(n,r)),v.isEmpty()&&(this.views.delete(d),v.getQuery().getQueryParams().loadsAllData()||u.push(v.getQuery()))}}catch(g){i={error:g}}finally{try{f&&!f.done&&(a=h.return)&&a.call(h)}finally{if(i)throw i.error}}else(v=this.views.get(s))&&(c=c.concat(v.removeEventRegistration(n,r)),v.isEmpty()&&(this.views.delete(s),v.getQuery().getQueryParams().loadsAllData()||u.push(v.getQuery())));return l&&!this.hasCompleteView()&&u.push(new e.__referenceConstructor(t.repo,t.path)),{removed:u,events:c}},e.prototype.getQueryViews=function(){var e,t,n=[];try{for(var r=o.__values(this.views.values()),i=r.next();!i.done;i=r.next()){var a=i.value;a.getQuery().getQueryParams().loadsAllData()||n.push(a)}}catch(s){e={error:s}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return n},e.prototype.getCompleteServerCache=function(e){var t,n,r=null;try{for(var i=o.__values(this.views.values()),a=i.next();!a.done;a=i.next()){var s=a.value;r=r||s.getCompleteServerCache(e)}}catch(u){t={error:u}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r},e.prototype.viewForQuery=function(e){if(e.getQueryParams().loadsAllData())return this.getCompleteView();var t=e.queryIdentifier();return this.views.get(t)},e.prototype.viewExistsForQuery=function(e){return null!=this.viewForQuery(e)},e.prototype.hasCompleteView=function(){return null!=this.getCompleteView()},e.prototype.getCompleteView=function(){var e,t;try{for(var n=o.__values(this.views.values()),r=n.next();!r.done;r=n.next()){var i=r.value;if(i.getQuery().getQueryParams().loadsAllData())return i}}catch(a){e={error:a}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return null},e}(),Ct=function(){function e(e){this.writeTree_=e}return e.prototype.addWrite=function(t,n){if(t.isEmpty())return new e(new lt(n));var r=this.writeTree_.findRootMostValueAndPath(t);if(null!=r){var i=r.path,o=r.value,a=B.relativePath(i,t);return o=o.updateChild(a,n),new e(this.writeTree_.set(i,o))}var s=new lt(n);return new e(this.writeTree_.setTree(t,s))},e.prototype.addWrites=function(e,t){var n=this;return M(t,(function(t,r){n=n.addWrite(e.child(t),r)})),n},e.prototype.removeWrite=function(t){return t.isEmpty()?e.Empty:new e(this.writeTree_.setTree(t,lt.Empty))},e.prototype.hasCompleteWrite=function(e){return null!=this.getCompleteNode(e)},e.prototype.getCompleteNode=function(e){var t=this.writeTree_.findRootMostValueAndPath(e);return null!=t?this.writeTree_.get(t.path).getChild(B.relativePath(t.path,e)):null},e.prototype.getCompleteChildren=function(){var e=[],t=this.writeTree_.value;return null!=t?t.isLeafNode()||t.forEachChild(Ce,(function(t,n){e.push(new de(t,n))})):this.writeTree_.children.inorderTraversal((function(t,n){null!=n.value&&e.push(new de(t,n.value))})),e},e.prototype.childCompoundWrite=function(t){if(t.isEmpty())return this;var n=this.getCompleteNode(t);return new e(null!=n?new lt(n):this.writeTree_.subtree(t))},e.prototype.isEmpty=function(){return this.writeTree_.isEmpty()},e.prototype.apply=function(e){return function e(t,n,r){if(null!=n.value)return r.updateChild(t,n.value);var i=null;return n.children.inorderTraversal((function(n,o){".priority"===n?(a.assert(null!==o.value,"Priority writes must al
2ways be leaf nodes"),i=o.value):r=e(t.child(n),o,r)})),r.getChild(t).isEmpty()||null===i||(r=r.updateChild(t.child(".priority"),i)),r}(B.Empty,this.writeTree_,e)},e.Empty=new e(new lt(null)),e}();var kt=function(){function e(){this.visibleWrites_=Ct.Empty,this.allWrites_=[],this.lastWriteId_=-1}return e.prototype.childWrites=function(e){return new xt(e,this)},e.prototype.addOverwrite=function(e,t,n,r){a.assert(n>this.lastWriteId_,"Stacking an older write on top of newer ones"),void 0===r&&(r=!0),this.allWrites_.push({path:e,snap:t,writeId:n,visible:r}),r&&(this.visibleWrites_=this.visibleWrites_.addWrite(e,t)),this.lastWriteId_=n},e.prototype.addMerge=function(e,t,n){a.assert(n>this.lastWriteId_,"Stacking an older merge on top of newer ones"),this.allWrites_.push({path:e,children:t,writeId:n,visible:!0}),this.visibleWrites_=this.visibleWrites_.addWrites(e,t),this.lastWriteId_=n},e.prototype.getWrite=function(e){for(var t=0;t<this.allWrites_.length;t++){var n=this.allWrites_[t];if(n.writeId===e)return n}return null},e.prototype.removeWrite=function(e){var t=this,n=this.allWrites_.findIndex((function(t){return t.writeId===e}));a.assert(n>=0,"removeWrite called with nonexistent writeId.");var r=this.allWrites_[n];this.allWrites_.splice(n,1);for(var i=r.visible,o=!1,s=this.allWrites_.length-1;i&&s>=0;){var u=this.allWrites_[s];u.visible&&(s>=n&&this.recordContainsPath_(u,r.path)?i=!1:r.path.contains(u.path)&&(o=!0)),s--}if(i){if(o)return this.resetTree_(),!0;r.snap?this.visibleWrites_=this.visibleWrites_.removeWrite(r.path):M(r.children,(function(e){t.visibleWrites_=t.visibleWrites_.removeWrite(r.path.child(e))}));return!0}return!1},e.prototype.getCompleteWriteData=function(e){return this.visibleWrites_.getCompleteNode(e)},e.prototype.calcCompleteEventCache=function(t,n,r,i){if(r||i){var o=this.visibleWrites_.childCompoundWrite(t);if(!i&&o.isEmpty())return n;if(i||null!=n||o.hasCompleteWrite(B.Empty)){var a=e.layerTree_(this.allWrites_,(function(e){return(e.visible||i)&&(!r||!~r.indexOf(e.writeId))&&(e.path.contains(t)||t.contains(e.path))}),t);c=n||Fe.EMPTY_NODE;return a.apply(c)}return null}var s=this.visibleWrites_.getCompleteNode(t);if(null!=s)return s;var u=this.visibleWrites_.childCompoundWrite(t);if(u.isEmpty())return n;if(null!=n||u.hasCompleteWrite(B.Empty)){var c=n||Fe.EMPTY_NODE;return u.apply(c)}return null},e.prototype.calcCompleteEventChildren=function(e,t){var n=Fe.EMPTY_NODE,r=this.visibleWrites_.getCompleteNode(e);if(r)return r.isLeafNode()||r.forEachChild(Ce,(function(e,t){n=n.updateImmediateChild(e,t)})),n;if(t){var i=this.visibleWrites_.childCompoundWrite(e);return t.forEachChild(Ce,(function(e,t){var r=i.childCompoundWrite(new B(e)).apply(t);n=n.updateImmediateChild(e,r)}
2)),i.getCompleteChildren().forEach((function(e){n=n.updateImmediateChild(e.name,e.node)})),n}return this.visibleWrites_.childCompoundWrite(e).getCompleteChildren().forEach((function(e){n=n.updateImmediateChild(e.name,e.node)})),n},e.prototype.calcEventCacheAfterServerOverwrite=function(e,t,n,r){a.assert(n||r,"Either existingEventSnap or existingServerSnap must exist");var i=e.child(t);if(this.visibleWrites_.hasCompleteWrite(i))return null;var o=this.visibleWrites_.childCompoundWrite(i);return o.isEmpty()?r.getChild(t):o.apply(r.getChild(t))},e.prototype.calcCompleteChild=function(e,t,n){var r=e.child(t),i=this.visibleWrites_.getCompleteNode(r);return null!=i?i:n.isCompleteForChild(t)?this.visibleWrites_.childCompoundWrite(r).apply(n.getNode().getImmediateChild(t)):null},e.prototype.shadowingWrite=function(e){return this.visibleWrites_.getCompleteNode(e)},e.prototype.calcIndexedSlice=function(e,t,n,r,i,o){var a,s=this.visibleWrites_.childCompoundWrite(e),u=s.getCompleteNode(B.Empty);if(null!=u)a=u;else{if(null==t)return[];a=s.apply(t)}if((a=a.withIndex(o)).isEmpty()||a.isLeafNode())return[];for(var c=[],l=o.getCompare(),h=i?a.getReverseIteratorFrom(n,o):a.getIteratorFrom(n,o),f=h.getNext();f&&c.length<r;)0!==l(f,n)&&c.push(f),f=h.getNext();return c},e.prototype.recordContainsPath_=function(e,t){if(e.snap)return e.path.contains(t);for(var n in e.children)if(e.children.hasOwnProperty(n)&&e.path.child(n).contains(t))return!0;return!1},e.prototype.resetTree_=function(){this.visibleWrites_=e.layerTree_(this.allWrites_,e.DefaultFilter_,B.Empty),this.allWrites_.length>0?this.lastWriteId_=this.allWrites_[this.allWrites_.length-1].writeId:this.lastWriteId_=-1},e.DefaultFilter_=function(e){return e.visible},e.layerTree_=function(e,t,n){for(var r=Ct.Empty,i=0;i<e.length;++i){var o=e[i];if(t(o)){var s=o.path,u=void 0;if(o.snap)n.contains(s)?(u=B.relativePath(n,s),r=r.addWrite(u,o.snap)):s.contains(n)&&(u=B.relativePath(s,n),r=r.addWrite(B.Empty,o.snap.getChild(u)));else{if(!o.children)throw a.assertionError("WriteRecord should have .snap or .children");if(n.contains(s))u=B.relativePath(n,s),r=r.addWrites(u,o.children);else if(s.contains(n))if((u=B.relativePath(s,n)).isEmpty())r=r.addWrites(B.Empty,o.children);else{var c=a.safeGet(o.children,u.getFront());if(c){var l=c.getChild(u.popFront());r=r.addWrite(B.Empty,l)}}}}}return r},e}(),xt=function(){function e(e,t){this.treePath_=e,this.writeTree_=t}return e.prototype.calcCompleteEventCache=function(e,t,n){return this.writeTree_.calcCompleteEventCache(this.treePath_,e,t,n)},e.prototype.calcCompleteEventChildren=function(e){return this.writeTree_.calcCompleteEventChildren(this.treePath_,e)},e.prototype.calcEventCacheAfterServerOverwrite=function(e,t,n){return this.writeTree_.calcEventCacheAfterServerOverwrite(this.treePath_,e,t,n)},e.prototype.shadowingWrite=function(e){return this.writeTree_.shadowingWrite(this.treePath_.child(e))},e.prototype.calcIndexedSlice=function(e,t,n,r,i){return this.writeTree_.calcIndexedSlice(this.treePath_,e,t,n,r,i)},e.prototype.calcCompleteChild=function(e,t){return this.writeTree_.calcCompleteChild(this.treePath_,e,t)},e.prototype.child=function(t){return new e(this.treePath_.child(t),this.writeTree_)},e}(),Ot=function(){function e(e){this.listenProvider_=e,this.syncPointTree_=lt.Empty,this.pendingWriteTree_=new kt,this.tagToQueryMap=new Map,this.queryToTagMap=new Map}return e.prototype.applyUserOverwrite=function(e,t,n,r){return this.pendingWriteTree_.addOverwrite(e,t,n,r),r?this.applyOperationToSyncPoints_(new ft(ut.User,e,t)):[]},e.prototype.applyUserMerge=function(e,t,n){this.pendingWriteTree_.addMerge(e,t,n);var r=lt.fromObject(t);return this.applyOperationToSyncPoints_(new pt(ut.User,e,r))},e.prototype.ackUserWrite=function(e,t){void 0===t&&(t=!1);var n=this.pendingWriteTree_.getWrite(e);if(this.pendingWriteTree_.removeWrite(e)){var r=lt.Empty;return null!=n.snap?r=r.set(B.Empty,!0):M(n.children,(function(e,t){r=r.set(new B(e),t)})),this.applyOperationToSyncPoints_(new ct(n.path,r,t))}return[]},e.prototype.applyServerOverwrite=function(e,t){return this.applyOperationToSyncPoints_(new ft(ut.Server,e,t))},e.prototype.applyServerMerge=function(e,t){var n=lt.fromObject(t);return this.applyOperationToSyncPoints_(new pt(ut.Server,e,n))},e.prototype.applyListenComplete=function(e){return this.applyOperationToSyncPoints_(new ht(ut.Server,e))},e.prototype.applyTaggedQueryOverwrite=function(t,n,r){var i=this.queryKeyForTag_(r);if(null!=i){var o=e.parseQueryKey_(i),a=o.path,s=o.queryId,u=B.relativePath(a,t),c=new ft(ut.forServerTaggedQuery(s),u,n);return this.applyTaggedOperation_(a,c)}return[]},e.prototype.applyTaggedQueryMerge=function(t,n,r){var i=this.queryKeyForTag_(r);if(i){var o=e.parseQueryKey_(i),a=o.path,s=o.queryId,u=B.relativePath(a,t),c=lt.fromObject(n),l=new pt(ut.forServerTaggedQuery(s),u,c);return this.applyTaggedOperation_(a,l)}return[]},e.prototype.applyTaggedListenComplete=function(t,n){var r=this.queryKeyForTag_(n);if(r){var i=e.parseQueryKey_(r),o=i.path,a=i.queryId,s=B.relativePath(o,t),u=new ht(ut.forServerTaggedQuery(a),s);return this.applyTaggedOperation_(o,u)}return[]},e.prototype.addEventRegistration=function(t,n){var r=t.path,i=null,o=!1;this.syncPointTree_.foreachOnPath(r,(function(e,t){var n=B.relativePath(e,r);i=i||t.getCompleteServerCache(n),o=o||t.hasCompleteView()}));var s,u=this.syncPointTree_.get(r);(u?(o=o||u.hasCompleteView(),i=i||u.getCompleteServerCache(B.Empty)):(u=new It,this.syncPointTree_=this.syncPointTree_.set(r,u)),null!=i)?s=!0:(s=!1,i=Fe.EMPTY_NODE,this.syncPointTree_.subtree(r).foreachChild((function(e,t){var n=t.getCompleteServerCache(B.Empty);n&&(i=i.updateImmediateChild(e,n))})));var c=u.viewExistsForQuery(t);if(!c&&!t.getQueryParams().loadsAllData()){var l=e.makeQueryKey_(t);a.assert(!this.queryToTagMap.has(l),"View does not exist, but we have a tag");var h=e.getNextQueryTag_();this.queryToTagMap.set(l,h),this.tagToQueryMap.set(h,l)}var f=this.pendingWriteTree_.childWrites(r),p=u.addEventRegistration(t,n,f,i,s);if(!c&&!o){var d=u.viewForQuery(t);p=p.concat(this.setupListener_(t,d))}return p},e.prototype.removeEventRegistration=function(t,n,r){var i=this,o=t.path,a=this.syncPointTree_.get(o),s=[];
2if(a&&("default"===t.queryIdentifier()||a.viewExistsForQuery(t))){var u=a.removeEventRegistration(t,n,r);a.isEmpty()&&(this.syncPointTree_=this.syncPointTree_.remove(o));var c=u.removed;s=u.events;var l=-1!==c.findIndex((function(e){return e.getQueryParams().loadsAllData()})),h=this.syncPointTree_.findOnPath(o,(function(e,t){return t.hasCompleteView()}));if(l&&!h){var f=this.syncPointTree_.subtree(o);if(!f.isEmpty())for(var p=this.collectDistinctViewsForSubTree_(f),d=0;d<p.length;++d){var v=p[d],g=v.getQuery(),y=this.createListenerForView_(v);this.listenProvider_.startListening(e.queryForListening_(g),this.tagForQuery_(g),y.hashFn,y.onComplete)}}if(!h&&c.length>0&&!r)if(l){this.listenProvider_.stopListening(e.queryForListening_(t),null)}else c.forEach((function(t){var n=i.queryToTagMap.get(e.makeQueryKey_(t));i.listenProvider_.stopListening(e.queryForListening_(t),n)}));this.removeTags_(c)}return s},e.prototype.calcCompleteEventCache=function(e,t){var n=this.pendingWriteTree_,r=this.syncPointTree_.findOnPath(e,(function(t,n){var r=B.relativePath(t,e),i=n.getCompleteServerCache(r);if(i)return i}));return n.calcCompleteEventCache(e,r,t,!0)},e.prototype.collectDistinctViewsForSubTree_=function(e){return e.fold((function(e,t,n){if(t&&t.hasCompleteView())return[t.getCompleteView()];var r=[];return t&&(r=t.getQueryViews()),M(n,(function(e,t){r=r.concat(t)})),r}))},e.prototype.removeTags_=function(t){for(var n=0;n<t.length;++n){var r=t[n];if(!r.getQueryParams().loadsAllData()){var i=e.makeQueryKey_(r),o=this.queryToTagMap.get(i);this.queryToTagMap.delete(i),this.tagToQueryMap.delete(o)}}},e.queryForListening_=function(e){return e.getQueryParams().loadsAllData()&&
2!e.getQueryParams().isDefault()?e.getRef():e},e.prototype.setupListener_=function(t,n){var r=t.path,i=this.tagForQuery_(t),o=this.createListenerForView_(n),s=this.listenProvider_.startListening(e.queryForListening_(t),i,o.hashFn,o.onComplete),u=this.syncPointTree_.subtree(r);if(i)a.assert(!u.value.hasCompleteView(),"If we're adding a query, it shouldn't be shadowed");else for(var c=u.fold((function(e,t,n){if(!e.isEmpty()&&t&&t.hasCompleteView())return[t.getCompleteView().getQuery()];var r=[];return t&&(r=r.concat(t.getQueryViews().map((function(e){return e.getQuery()})))),M(n,(function(e,t){r=r.concat(t)})),r})),l=0;l<c.length;++l){var h=c[l];this.listenProvider_.stopListening(e.queryForListening_(h),this.tagForQuery_(h))}return s},e.prototype.createListenerForView_=function(e){var t=this,n=e.getQuery(),r=this.tagForQuery_(n);return{hashFn:function(){return(e.getServerCache()||Fe.EMPTY_NODE).hash()},onComplete:function(e){if("ok"===e)return r?t.applyTaggedListenComplete(n.path,r):t.applyListenComplete(n.path);var i=function(e,t){var n="Unknown Error";"too_big"===e?n="The data requested exceeds the maximum size that can be accessed with a single request.":"permission_denied"===e?n="Client doesn't have permission to access the desired data.":"unavailable"===e&&(n="The service is unavailable");var r=new Error(e+" at "+t.path.toString()+": "+n);return r.code=e.toUpperCase(),r}(e,n);return t.removeEventRegistration(n,null,i)}}},e.makeQueryKey_=function(e){return e.path.toString()+"$"+e.queryIdentifier()},e.parseQueryKey_=function(e){var t=e.indexOf("$");return a.assert(-1!==t&&t<e.length-1,"Bad queryKey."),{queryId:e.substr(t+1),path:new B(e.substr(0,t))}},e.prototype.queryKeyForTag_=function(e){return this.tagToQueryMap.get(e)},e.prototype.tagForQuery_=function(t){var n=e.makeQueryKey_(t);return this.queryToTagMap.get(n)},e.getNextQueryTag_=function(){return e.nextQueryTag_++},e.prototype.applyTaggedOperation_=function(e,t){var n=this.syncPointTree_.get(e);a.assert(n,"Missing sync point for query tag that we're tracking");var r=this.pendingWriteTree_.childWrites(e);return n.applyOperation(t,r,null)},e.prototype.applyOperationToSyncPoints_=function(e){return this.applyOperationHelper_(e,this.syncPointTree_,null,this.pendingWriteTree_.childWrites(B.Empty))},e.prototype.applyOperationHelper_=function(e,t,n,r){if(e.path.isEmpty())return this.applyOperationDescendantsHelper_(e,t,n,r);var i=t.get(B.Empty);null==n&&null!=i&&(n=i.getCompleteServerCache(B.Empty));var o=[],a=e.path.getFront(),s=e.operationForChild(a),u=t.children.get(a);if(u&&s){var c=n?n.getImmediateChild(a):null,l=r.child(a);o=o.concat(this.applyOperationHelper_(s,u,c,l))}return i&&(o=o.concat(i.applyOperation(e,r,n))),o},e.prototype.applyOperationDescendantsHelper_=function(e,t,n,r){var i=this,o=t.get(B.Empty);null==n&&null!=o&&(n=o.getCompleteServerCache(B.Empty));var a=[];return t.children.inorderTraversal((function(t,o){var s=n?n.getImmediateChild(t):null,u=r.child(t),c=e.operationForChild(t);c&&(a=a.concat(i.applyOperationDescendantsHelper_(c,o,s,u)))})),o&&(a=a.concat(o.applyOperation(e,r,n))),a},e.nextQueryTag_=1,e}(),Nt=function(){function e(){this.rootNode_=Fe.EMPTY_NODE}return e.prototype.getNode=function(e){return this.rootNode_.getChild(e)},e.prototype.updateSnapshot=function(e,t){this.rootNode_=this.rootNode_.updateChild(e,t)},e}(),At=function(){function e(){this.counters_={}}return e.prototype.incrementCounter=function(e,t){void 0===t&&(t=1),a.contains(this.counters_,e)||(this.counters_[e]=0),this.counters_[e]+=t},e.prototype.get=function(){return a.deepCopy(this.counters_)},e}(),Pt=function(){function e(){}return e.getCollection=function(e){var t=e.toString();return this.collections_[t]||(this.collections_[t]=new At),this.collections_[t]},e.getOrCreateReporter=function(e,t){var n=e.toString();return this.reporters_[n]||(this.reporters_[n]=t()),this.reporters_[n]},e.collections_={},e.reporters_={},e}(),Rt=function(){function e(e){this.collection_=e,this.last_=null}return e.prototype.get=function(){var e=this.collection_.get(),t=o.__assign({},e);return this.last_&&M(this.last_,(function(e,n){t[e]=t[e]-n})),this.last_=e,t},e}(),Dt=function(){function e(e,t){this.server_=t,this.statsToReport_={},this.statsListener_=new Rt(e);var n=1e4+2e4*Math.random();q(this.reportStats_.bind(this),Math.floor(n))}return e.prototype.includeStat=function(e){this.statsToReport_[e]=!0},e.prototype.reportStats_=function(){var e=this,t=this.statsListener_.get(),n={},r=!1;M(t,(function(t,i){i>0&&a.contains(e.statsToReport_,t)&&(n[t]=i,r=!0)})),r&&this.server_.reportStats(n),q(this.reportStats_.bind(this),Math.floor(2*Math.random()*3e5))},e}(),Lt=function(){function e(){this.eventLists_=[],this.recursionDepth_=0}return e.prototype.queueEvents=function(e){for(var t=null,n=0;n<e.length;n++){var r=e[n],i=r.getPath();null===t||i.equals(t.getPath())||(this.eventLists_.push(t),t=null),null===t&&(t=new Mt(i)),t.add(r)}t&&this.eventLists_.push(t)},e.prototype.raiseEventsAtPath=function(e,t){this.queueEvents(t),this.raiseQueuedEventsMatchingPredicate_((function(t){return t.equals(e)}))},e.prototype.raiseEventsForChangedPath=function(e,t){this.queueEvents(t),this.raiseQueuedEventsMatchingPredicate_((function(t){return t.contains(e)||e.contains(t)}))},e.prototype.raiseQueuedEventsMatchingPredicate_=function(e){this.recursionDepth_++;for(var t=!0,n=0;n<this.eventLists_.length;n++){var r=this.eventLists_[n];if(r)e(r.getPath())?(this.eventLists_[n].raise(),this.eventLists_[n]=null):t=!1}t&&(this.eventLists_=[]),this.recursionDepth_--},e}(),Mt=function(){function e(e){this.path_=e,this.events_=[]}
2return e.prototype.add=function(e){this.events_.push(e)},e.prototype.raise=function(){for(var e=0;e<this.events_.length;e++){var t=this.events_[e];if(null!==t){this.events_[e]=null;var n=t.getEventRunner();_&&T("event: "+t.toString()),V(n)}}},e.prototype.getPath=function(){return this.path_},e}(),jt=function(){function e(e){this.allowedEvents_=e,this.listeners_={},a.assert(Array.isArray(e)&&e.length>0,"Requires a non-empty array")}return e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(Array.isArray(this.listeners_[e]))for(var r=o.__spread(this.listeners_[e]),i=0;i<r.length;i++)r[i].callback.apply(r[i].context,t)},e.prototype.on=function(e,t,n){this.validateEventType_(e),this.listeners_[e]=this.listeners_[e]||[],this.listeners_[e].push({callback:t,context:n});var r=this.getInitialEvent(e);r&&t.apply(n,r)},e.prototype.off=function(e,t,n){this.validateEventType_(e);for(var r=this.listeners_[e]||[],i=0;i<r.length;i++)if(r[i].callback===t&&(!n||n===r[i].context))return void r.splice(i,1)},e.prototype.validateEventType_=function(e){a.assert(this.allowedEvents_.find((function(t){return t===e})),"Unknown event: "+e)},e}(),Ft=function(e){function t(){var t,n,r=e.call(this,["visible"])||this;return"undefined"!==typeof document&&"undefined"!==typeof document.addEventListener&&("undefined"!==typeof document.hidden?(n="visibilitychange",t="hidden"):"undefined"!==typeof document.mozHidden?(n="mozvisibilitychange",t="mozHidden"):"undefined"!==typeof document.msHidden?(n="msvisibilitychange",t="msHidden"):"undefined"!==typeof document.webkitHidden&&(n="webkitvisibilitychange",t="webkitHidden")),r.visible_=!0,n&&document.addEventListener(n,(function(){var e=!document[t];e!==r.visible_&&(r.visible_=e,r.trigger("visible",e))}),!1),r}return o.__extends(t,e),t.getInstance=function(){return new t},t.prototype.getInitialEvent=function(e){return a.assert("visible"===e,"Unknown event type: "+e),[this.visible_]},t}(jt),Ut=function(e){function t(){var t=e.call(this,["online"])||this;return t.online_=!0,"undefined"===typeof window||"undefined"===typeof window.addEventListener||a.isMobileCordova()||(window.addEventListener("online",(function(){t.online_||(t.online_=!0,t.trigger("online",!0))}),!1),window.addEventListener("offline",(function(){t.online_&&(t.online_=!1,t.trigger("online",!1))}),!1)),t}return o.__extends(t,e),t.getInstance=function(){return new t},t.prototype.getInitialEvent=function(e){return a.assert("online"===e,"Unknown event type: "+e),[this.online_]},t.prototype.currentlyOnline=function(){return this.online_},t}(jt),Vt=function(){function e(e){this.onMessage_=e,this.pendingResponses=[],this.currentResponseNum=0,this.closeAfterResponse=-1,this.onClose=null}return e.prototype.closeAfter=function(e,t){this.closeAfterResponse=e,this.onClose=t,this.closeAfterResponse<this.currentResponseNum&&(this.onClose(),this.onClose=null)},e.prototype.handleResponse=function(e,t){var n=this;this.pendingResponses[e]=t;for(var r=function(){var e=i.pendingResponses[i.currentResponseNum];delete i.pendingResponses[i.currentResponseNum];for(var t=function(t){e[t]&&V((function(){n.onMessage_(e[t])}))},r=0;r<e.length;++r)t(r);if(i.currentResponseNum===i.closeAfterResponse)return i.onClose&&(i.onClose(),i.onClose=null),"break";i.currentResponseNum++},i=this;this.pendingResponses[this.currentResponseNum];){if("break"===r())break}},e}(),qt=function(){function e(e,t,n,r,i){this.connId=e,this.repoInfo=t,this.applicationId=n,this.transportSessionId=r,this.lastSessionId=i,this.bytesSent=0,this.bytesReceived=0,this.everConnected_=!1,this.log_=S(e),this.stats_=Pt.getCollection(t),this.urlFn=function(e){return t.connectionURL("long_polling",e)}}return e.prototype.open=function(e,t){var n=this;this.curSegmentNum=0,this.onDisconnect_=t,this.myPacketOrderer=new Vt(e),this.isClosed_=!1,this.connectTimeoutTimer_=setTimeout((function(){n.log_("Timed out trying to connect."),n.onClosed_(),n.connectTimeoutTimer_=null}),Math.floor(3e4)),function(e){if(a.isNodeSdk()||"complete"===document.readyState)e();else{var t=!1,n=function n(){document.body?t||(t=!0,e()):setTimeout(n,Math.floor(10))};document.addEventListener?(document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1)):document.attachEvent&&(document.attachEvent("onreadystatechange",(function(){"complete"===document.readyState&&n()})),window.attachEvent("onload",n))}}((function(){if(!n.isClosed_){n.scriptTagHolder=new Bt((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=o.__read(e,5),i=r[0],a=r[1],s=r[2];r[3],r[4];if(n.incrementIncomingBytes_(e),n.scriptTagHolder)if(n.connectTimeoutTimer_&&(clearTimeout(n.connectTimeoutTimer_),n.connectTimeoutTimer_=null),n.everConnected_=!0,"start"===i)n.id=a,n.password=s;else{if("close"!==i)throw new Error("Unrecognized command received: "+i);a?(n.scriptTagHolder.sendNewPolls=!1,n.myPacketOrderer.closeAfter(a,(function(){n.onClosed_()}))):n.onClosed_()}}),(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=o.__read(e,2),i=r[0],a=r[1];n.incrementIncomingBytes_(e),n.myPacketOrderer.handleResponse(i,a)}),(function(){n.onClosed_()}),n.urlFn);var e={start:"t"};e.ser=Math.floor(1e8*Math.random()),n.scriptTagHolder.uniqueCallbackIdentifier&&(e.cb=n.scriptTagHolder.uniqueCallbackIdentifier),e.v="5",n.transportSessionId&&(e.s=n.transportSessionId),n.lastSessionId&&(e.ls=n.lastSessionId),n.applicationId&&(e.p=n.applicationId),"undefined"!==typeof location&&location.href&&-1!==location.href.indexOf("firebaseio.com")&&(e.r="f");var t=n.urlFn(e);n.log_("Connecting via long-poll to "+t),n.scriptTagHolder.addTag(t,(function(){}))}}))},e.prototype.start=function(){this.scriptTagHolder.startLongPoll(this.id,this.password),this.addDisconnectPingFrame(this.id,this.password)},e.forceAllow=function(){e.forceAllow_=!0},e.forceDisallow=function(){e.forceDisallow_=!0},e.isAvailable=function(){return!a.isNodeSdk()&&(!!e.forceAllow_||!e.forceDisallow_&&"undefined"!==typeof document&&null!=document.createElement&&!("object"===typeof window&&window.chrome&&window.chrome.extension&&!/^chrome/.test(window.location.href))&&!("object"===typeof Windows&&"object"===typeof Windows.UI))},e.prototype.markConnectionHealthy=function(){},e.prototype.shutdown_=function(){this.isClosed_=!0,this.scriptTagHolder&&(this.scriptTagHolder.close(),this.scriptTagHolder=null),this.myDisconnFrame&&(document.body.removeChild(this.myDisconnFrame),this.myDisconnFrame=null),this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null)},e.prototype.onClosed_=function(){this.isClosed_||(this.log_("Longpoll is closing itself"),this.shutdown_(),this.onDisconnect_&&(this.onDisconnect_(this.everConnected_),this.onDisconnect_=null))},e.prototype.close=function(){this.isClosed_||(this.log_("Longpoll is being closed."),this.shutdown_())}
2,e.prototype.send=function(e){var t=a.stringify(e);this.bytesSent+=t.length,this.stats_.incrementCounter("bytes_sent",t.length);for(var n=a.base64Encode(t),r=L(n,1840),i=0;i<r.length;i++)this.scriptTagHolder.enqueueSegment(this.curSegmentNum,r.length,r[i]),this.curSegmentNum++},e.prototype.addDisconnectPingFrame=function(e,t){if(!a.isNodeSdk()){this.myDisconnFrame=document.createElement("iframe");var n={dframe:"t"};n.id=e,n.pw=t,this.myDisconnFrame.src=this.urlFn(n),this.myDisconnFrame.style.display="none",document.body.appendChild(this.myDisconnFrame)}},e.prototype.incrementIncomingBytes_=function(e){var t=a.stringify(e).length;this.bytesReceived+=t,this.stats_.incrementCounter("bytes_received",t)},e}(),Bt=function(){function e(t,n,r,i){if(this.onDisconnect=r,this.urlFn=i,this.outstandingRequests=new Set,this.pendingSegs=[],this.currentSerial=Math.floor(1e8*Math.random()),this.sendNewPolls=!0,a.isNodeSdk())this.commandCB=t,this.onMessageCB=n;else{this.uniqueCallbackIdentifier=y(),window["pLPCommand"+this.uniqueCallbackIdentifier]=t,window["pRTLPCB"+this.uniqueCallbackIdentifier]=n,this.myIFrame=e.createIFrame_();var o="";if(this.myIFrame.src&&"javascript:"===this.myIFrame.src.substr(0,"javascript:".length))o='<script>document.domain="'+document.domain+'";<\/script>';var s="<html><body>"+o+"</body></html>";try{this.myIFrame.doc.open(),this.myIFrame.doc.write(s),this.myIFrame.doc.close()}catch(u){T("frame writing exception"),u.stack&&T(u.stack),T(u)}}}return e.createIFrame_=function(){var e=document.createElement("iframe");if(e.style.display="none",!document.body)throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";document.body.appendChild(e);try{e.contentWindow.document||T("No IE domain setting required")}catch(n){var t=document.domain;e.src="javascript:void((function(){document.open();document.domain='"+t+"';document.close();})())"}return e.contentDocument?e.doc=e.contentDocument:e.contentWindow?e.doc=e.contentWindow.document:e.document&&(e.doc=e.document),e},e.prototype.close=function(){var e=this;this.alive=!1,this.myIFrame&&(this.myIFrame.doc.body.innerHTML="",setTimeout((function(){null!==e.myIFrame&&(document.body.removeChild(e.myIFrame),e.myIFrame=null)}),Math.floor(0)));var t=this.onDisconnect;t&&(this.onDisconnect=null,t())},e.prototype.startLongPoll=function(e,t){for(this.myID=e,this.myPW=t,this.alive=!0;this.newRequest_(););},e.prototype.newRequest_=function(){if(this.alive&&this.sendNewPolls&&this.outstandingRequests.size<(this.pendingSegs.length>0?2:1)){this.currentSerial++;var e={};e.id=this.myID,e.pw=this.myPW,e.ser=this.currentSerial;for(var t=this.urlFn(e),n="",r=0;this.pendingSegs.length>0;){if(!(this.pendingSegs[0].d.length+30+n.length<=1870))break;var i=this.pendingSegs.shift();n=n+"&seg"+r+"="+i.seg+"&ts"+r+"="+i.ts+"&d"+r+"="+i.d,r++}return t+=n,this.addLongPollTag_(t,this.currentSerial),!0}return!1},e.prototype.enqueueSegment=function(e,t,n){this.pendingSegs.push({seg:e,ts:t,d:n}),this.alive&&this.newRequest_()},e.prototype.addLongPollTag_=function(e,t){var n=this;this.outstandingRequests.add(t);var r=function(){n.outstandingRequests.delete(t),n.newRequest_()},i=setTimeout(r,Math.floor(25e3));this.addTag(e,(function(){clearTimeout(i),r()}))},e.prototype.addTag=function(e,t){var n=this;a.isNodeSdk()?this.doNodeLongPoll(e,t):setTimeout((function(){try{if(!n.sendNewPolls)return;var r=n.myIFrame.doc.createElement("script");r.type="text/javascript",r.async=!0,r.src=e,r.onload=r.onreadystatechange=function(){var e=r.readyState;e&&"loaded"!==e&&"complete"!==e||(r.onload=r.onreadystatechange=null,r.parentNode&&r.parentNode.removeChild(r),t())},r.onerror=function(){T("Long-poll script failed to load: "+e),n.sendNewPolls=!1,n.close()},n.myIFrame.doc.body.appendChild(r)}catch(i){}}),Math.floor(1))},e}(),zt="";var Wt=null;"undefined"!==typeof MozWebSocket?Wt=MozWebSocket:"undefined"!==typeof WebSocket&&(Wt=WebSocket);var Ht=function(){function e(t,n,r,i,o){this.connId=t,this.applicationId=r,this.keepaliveTimer=null,this.frames=null,this.totalFrames=0,this.bytesSent=0,this.bytesReceived=0,this.log_=S(this.connId),this.stats_=Pt.getCollection(n),this.connURL=e.connectionURL_(n,i,o),this.nodeAdmin=n.nodeAdmin}return e.connectionURL_=function(e,t,n){var r={v:"5"};return!a.isNodeSdk()&&"undefined"!==typeof location&&location.href&&-1!==location.href.indexOf("firebaseio.com")&&(r.r="f"),t&&(r.s=t),n&&(r.ls=n),e.connectionURL("websocket",r)},e.prototype.open=function(e,t){var n=this;this.onDisconnect=t,this.onMessage=e,this.log_("Websocket connecting to "+this.connURL),this.everConnected_=!1,d.set("previous_websocket_failure",!0);try{if(a.isNodeSdk()){var i=this.nodeAdmin?"AdminNode":"Node",o={headers:{"User-Agent":"Firebase/5/"+zt+"/"+r.platform+"/"+i,"X-Firebase-GMPID":this.applicationId||""}},s=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}),u=0===this.connURL.indexOf("wss://")?s.HTTPS_PROXY||s.https_proxy:s.HTTP_PROXY||s.http_proxy;u&&(o.proxy={origin:u}),this.mySock=new Wt(this.connURL,[],o)}else{o={headers:{"X-Firebase-GMPID":this.applicationId||""}};this.mySock=new Wt(this.connURL,[],o)}}catch(l){this.log_("Error instantiating WebSocket.");var c=l.message||l.data;return c&&this.log_(c),void this.onClosed_()}this.mySock.onopen=function(){n.log_("Websocket connected."),n.everConnected_=!0}
2,this.mySock.onclose=function(){n.log_("Websocket connection was disconnected."),n.mySock=null,n.onClosed_()},this.mySock.onmessage=function(e){n.handleIncomingFrame(e)},this.mySock.onerror=function(e){n.log_("WebSocket error. Closing connection.");var t=e.message||e.data;t&&n.log_(t),n.onClosed_()}},e.prototype.start=function(){},e.forceDisallow=function(){e.forceDisallow_=!0},e.isAvailable=function(){var t=!1;if("undefined"!==typeof navigator&&navigator.userAgent){var n=navigator.userAgent.match(/Android ([0-9]{0,}\.[0-9]{0,})/);n&&n.length>1&&parseFloat(n[1])<4.4&&(t=!0)}return!t&&null!==Wt&&!e.forceDisallow_},e.previouslyFailed=function(){return d.isInMemoryStorage||!0===d.get("previous_websocket_failure")},e.prototype.markConnectionHealthy=function(){d.remove("previous_websocket_failure")},e.prototype.appendFrame_=function(e){if(this.frames.push(e),this.frames.length===this.totalFrames){var t=this.frames.join("");this.frames=null;var n=a.jsonEval(t);this.onMessage(n)}},e.prototype.handleNewFrameCount_=function(e){this.totalFrames=e,this.frames=[]},e.prototype.extractFrameCount_=function(e){if(a.assert(null===this.frames,"We already have a frame buffer"),e.length<=6){var t=Number(e);if(!isNaN(t))return this.handleNewFrameCount_(t),null}return this.handleNewFrameCount_(1),e},e.prototype.handleIncomingFrame=function(e){if(null!==this.mySock){var t=e.data;if(this.bytesReceived+=t.length,this.stats_.incrementCounter("bytes_received",t.length),this.resetKeepAlive(),null!==this.frames)this.appendFrame_(t);else{var n=this.extractFrameCount_(t);null!==n&&this.appendFrame_(n)}}},e.prototype.send=function(e){this.resetKeepAlive();var t=a.stringify(e);this.bytesSent+=t.length,this.stats_.incrementCounter("bytes_sent",t.length);var n=L(t,16384);n.length>1&&this.sendString_(String(n.length));for(var r=0;r<n.length;r++)this.sendString_(n[r])},e.prototype.shutdown_=function(){this.isClosed_=!0,this.keepaliveTimer&&(clearInterval(this.keepaliveTimer),this.keepaliveTimer=null),this.mySock&&(this.mySock.close(),this.mySock=null)},e.prototype.onClosed_=function(){this.isClosed_||(this.log_("WebSocket is closing itself"),this.shutdown_(),this.onDisconnect&&(this.onDisconnect(this.everConnected_),this.onDisconnect=null))},e.prototype.close=function(){this.isClosed_||(this.log_("WebSocket is being closed"),this.shutdown_())},e.prototype.resetKeepAlive=function(){var e=this;clearInterval(this.keepaliveTimer),this.keepaliveTimer=setInterval((function(){e.mySock&&e.sendString_("0"),e.resetKeepAlive()}),Math.floor(45e3))},e.prototype.sendString_=function(e){try{this.mySock.send(e)}catch(t){this.log_("Exception thrown from WebSocket.send():",t.message||t.data,"Closing connection."),setTimeout(this.onClosed_.bind(this),0)}},e.responsesRequiredToBeHealthy=2,e.healthyTimeout=3e4,e}(),Gt=function(){function e(e){this.initTransports_(e)}return Object.defineProperty(e,"ALL_TRANSPORTS",{get:function(){return[qt,Ht]},enumerable:!1,configurable:!0}),e.prototype.initTransports_=function(t){var n,r,i=Ht&&Ht.isAvailable(),a=i&&!Ht.previouslyFailed();if(t.webSocketOnly&&(i||k("wss:// URL used, but browser isn't known to support websockets. Trying anyway."),a=!0),a)this.transports_=[Ht];else{var s=this.transports_=[];try{for(var u=o.__values(e.ALL_TRANSPORTS),c=u.next();!c.done;c=u.next()){var l=c.value;l&&l.isAvailable()&&s.push(l)}}catch(h){n={error:h}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}},e.prototype.initialTransport=function(){if(this.transports_.length>0)return this.transports_[0];throw new Error("No transports available")},e.prototype.upgradeTransport=function(){return this.transports_.length>1?this.transports_[1]:null},e}(),Kt=function(){function e(e,t,n,r,i,o,a,s){this.id=e,this.repoInfo_=t,this.applicationId_=n,this.onMessage_=r,this.onReady_=i,this.onDisconnect_=o,this.onKill_=a,this.lastSessionId=s,this.connectionCount=0,this.pendingDataMessages=[],this.state_=0,this.log_=S("c:"+this.id+":"),this.transportManager_=new Gt(t),this.log_("Connection created"),this.start_()}return e.prototype.start_=function(){var e=this,t=this.transportManager_.initialTransport();this.conn_=new t(this.nextTransportId_(),this.repoInfo_,this.applicationId_,void 0,this.lastSessionId),this.primaryResponsesRequired_=t.responsesRequiredToBeHealthy||0;var n=this.connReceiver_(this.conn_),r=this.disconnReceiver_(this.conn_);this.tx_=this.conn_,this.rx_=this.conn_,this.secondaryConn_=null,this.isHealthy_=!1,setTimeout((function(){e.conn_&&e.conn_.open(n,r)}),Math.floor(0));var i=t.healthyTimeout||0;i>0&&(this.healthyTimeout_=q((function(){e.healthyTimeout_=null,e.isHealthy_||(e.conn_&&e.conn_.bytesReceived>
2102400?(e.log_("Connection exceeded healthy timeout but has received "+e.conn_.bytesReceived+" bytes. Marking connection healthy."),e.isHealthy_=!0,e.conn_.markConnectionHealthy()):e.conn_&&e.conn_.bytesSent>10240?e.log_("Connection exceeded healthy timeout but has sent "+e.conn_.bytesSent+" bytes. Leaving connection alive."):(e.log_("Closing unhealthy connection after timeout."),e.close()))}),Math.floor(i)))},e.prototype.nextTransportId_=function(){return"c:"+this.id+":"+this.connectionCount++},e.prototype.disconnReceiver_=function(e){var t=this;return function(n){e===t.conn_?t.onConnectionLost_(n):e===t.secondaryConn_?(t.log_("Secondary connection lost."),t.onSecondaryConnectionLost_()):t.log_("closing an old connection")}},e.prototype.connReceiver_=function(e){var t=this;return function(n){2!==t.state_&&(e===t.rx_?t.onPrimaryMessageReceived_(n):e===t.secondaryConn_?t.onSecondaryMessageReceived_(n):t.log_("message on old connection"))}},e.prototype.sendRequest=function(e){var t={t:"d",d:e};this.sendData_(t)},e.prototype.tryCleanupConnection=function(){this.tx_===this.secondaryConn_&&this.rx_===this.secondaryConn_&&(this.log_("cleaning up and promoting a connection: "+this.secondaryConn_.connId),this.conn_=this.secondaryConn_,this.secondaryConn_=null)},e.prototype.onSecondaryControl_=function(e){if("t"in e){var t=e.t;"a"===t?this.upgradeIfSecondaryHealthy_():"r"===t?(this.log_("Got a reset on secondary, closing it"),this.secondaryConn_.close(),this.tx_!==this.secondaryConn_&&this.rx_!==this.secondaryConn_||this.close()):"o"===t&&(this.log_("got pong on secondary."),this.secondaryResponsesRequired_--,this.upgradeIfSecondaryHealthy_())}},e.prototype.onSecondaryMessageReceived_=function(e){var t=R("t",e),n=R("d",e);if("c"===t)this.onSecondaryControl_(n);else{if("d"!==t)throw new Error("Unknown protocol layer: "+t);this.pendingDataMessages.push(n)}},e.prototype.upgradeIfSecondaryHealthy_=function(){this.secondaryResponsesRequired_<=0?(this.log_("Secondary connection is healthy."),this.isHealthy_=!0,this.secondaryConn_.markConnectionHealthy(),this.proceedWithUpgrade_()):(this.log_("sending ping on secondary."),this.secondaryConn_.send({t:"c",d:{t:"p",d:{}}}))},e.prototype.proceedWithUpgrade_=function(){this.secondaryConn_.start(),this.log_("sending client ack on secondary"),this.secondaryConn_.send({t:"c",d:{t:"a",d:{}}}),this.log_("Ending transmission on primary"),this.conn_.send({t:"c",d:{t:"n",d:{}}}),this.tx_=this.secondaryConn_,this.tryCleanupConnection()},e.prototype.onPrimaryMessageReceived_=function(e){var t=R("t",e),n=R("d",e);"c"===t?this.onControl_(n):"d"===t&&this.onDataMessage_(n)},e.prototype.onDataMessage_=function(e){this.onPrimaryResponse_(),this.onMessage_(e)},e.prototype.onPrimaryResponse_=function(){this.isHealthy_||(this.primaryResponsesRequired_--,this.primaryResponsesRequired_<=0&&(this.log_("Primary connection is healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()))},e.prototype.onControl_=function(e){var t=R("t",e);if("d"in e){var n=e.d;if("h"===t)this.onHandshake_(n);else if("n"===t){this.log_("recvd end transmission on primary"),this.rx_=this.secondaryConn_;for(var r=0;r<this.pendingDataMessages.length;++r)this.onDataMessage_(this.pendingDataMessages[r]);this.pendingDataMessages=[],this.tryCleanupConnection()}else"s"===t?this.onConnectionShutdown_(n):"r"===t?this.onReset_(n):"e"===t?I("Server Error: "+n):"o"===t?(this.log_("got pong on primary."),this.onPrimaryResponse_(),this.sendPingOnPrimaryIfNecessary_()):I("Unknown control packet command: "+t)}},e.prototype.onHandshake_=function(e){var t=e.ts,n=e.v,r=e.h;this.sessionId=e.s,this.repoInfo_.updateHost(r),0===this.state_&&(this.conn_.start(),this.onConnectionEstablished_(this.conn_,t),"5"!==n&&k("Protocol version mismatch detected"),this.tryStartUpgrade_())},e.prototype.tryStartUpgrade_=function(){var e=this.transportManager_.upgradeTransport();e&&this.startUpgrade_(e)},e.prototype.startUpgrade_=function(e){var t=this;this.secondaryConn_=new e(this.nextTransportId_(),this.repoInfo_,this.applicationId_,this.sessionId),this.secondaryResponsesRequired_=e.responsesRequiredToBeHealthy||0;var n=this.connReceiver_(this.secondaryConn_),r=this.disconnReceiver_(this.secondaryConn_);this.secondaryConn_.open(n,r),q((function(){t.secondaryConn_&&(t.log_("Timed out trying to upgrade."),t.secondaryConn_.close())}),Math.floor(6e4))},e.prototype.onReset_=function(e){this.log_("Reset packet received. New host: "+e),this.repoInfo_.updateHost(e),1===this.state_?this.close():(this.closeConnections_(),this.start_())},e.prototype.onConnectionEstablished_=function(e,t){var n=this;this.log_("Realtime connection established."),this.conn_=e,this.state_=1,this.onReady_&&(this.onReady_(t,this.sessionId),this.onReady_=null),0===this.primaryResponsesRequired_?(this.log_("Primary connection is healthy."),this.isHealthy_=!0):q((function(){n.sendPingOnPrimaryIfNecessary_()}),Math.floor(5e3))},e.prototype.sendPingOnPrimaryIfNecessary_=function(){this.isHealthy_||1!==this.state_||(this.log_("sending ping on primary."),this.sendData_({t:"c",d:{t:"p",d:{}}}))},e.prototype.onSecondaryConnectionLost_=function(){var e=this.secondaryConn_;this.secondaryConn_=null,this.tx_!==e&&this.rx_!==e||this.close()},e.prototype.onConnectionLost_=function(e){this.conn_=null,e||0!==this.state_?1===this.state_&&this.log_("Realtime connection lost."):(this.log_("Realtime connection failed."),this.repoInfo_.isCacheableHost()&&(d.remove("host:"+this.repoInfo_.host),this.repoInfo_.internalHost=this.repoInfo_.host)),this.close()},e.prototype.onConnectionShutdown_=function(e){this.log_("Connection shutdown command received. Shutting down..."),this.onKill_&&(this.onKill_(e),this.onKill_=null),this.onDisconnect_=null,this.close()},e.prototype.sendData_=function(e){if(1!==this.state_)throw"Connection is not connected";this.tx_.send(e)},e.prototype.close=function(){2!==this.state_&&(this.log_("Closing realtime connection."),this.state_=2,this.closeConnections_(),this.onDisconnect_&&(this.onDisconnect_(),this.onDisconnect_=null))},e.prototype.closeConnections_=function(){this.log_("Shutting down all connections"),this.conn_&&(this.conn_.close(),this.conn_=null),this.secondaryConn_&&(this.secondaryConn_.close(),this.secondaryConn_=null),this.healthyTimeout_&&(clearTimeout(this.healthyTimeout_),this.healthyTimeout_=null)},e}(),Qt=function(){function e(){}return e.prototype.put=function(e,t,n,r){},e.prototype.merge=function(e,t,n,r){},e.prototype.refreshAuthToken=function(e){},e.prototype.onDisconnectPut=function(e,t,n){},e.prototype.onDisconnectMerge=function(e,t,n){},e.prototype.onDisconnectCancel=function(e,t){},e.prototype.reportStats=function(e){},e}(),$t=function(e){function t(n,r,i,o,s,u,c){var l=e.call(this)||this;if(l.repoInfo_=n,l.applicationId_=r,l.onDataUpdate_=i,l.onConnectStatus_=o,l.onServerInfoUpdate_=s,l.authTokenProvider_=u,l.authOverride_=c,l.id=t.nextPersistentConnectionId_++,l.log_=S("p:"+l.id+":"),l.interruptReasons_={},l.listens=new Map,l.outstandingPuts_=[],l.outstandingPutCount_=0,l.onDisconnectRequestQueue_=[],l.connected_=!1,l.reconnectDelay_=1e3,l.maxReconnectDelay_=3e5,l.securityDebugCallback_=null,l.lastSessionId=null,l.establishConnectionTimer_=null,l.visible_=!1,l.requestCBHash_={},l.requestNumber_=0,l.realtime_=null,l.authToken_=null,l.forceTokenRefresh_=!1,l.invali
2dAuthTokenCount_=0,l.firstConnection_=!0,l.lastConnectionAttemptTime_=null,l.lastConnectionEstablishedTime_=null,c&&!a.isNodeSdk())throw new Error("Auth override specified in options, but not supported on non Node.js platforms");return l.scheduleConnect_(0),Ft.getInstance().on("visible",l.onVisible_,l),-1===n.host.indexOf("fblocal")&&Ut.getInstance().on("online",l.onOnline_,l),l}return o.__extends(t,e),t.prototype.sendRequest=function(e,t,n){var r=++this.requestNumber_,i={r:r,a:e,b:t};this.log_(a.stringify(i)),a.assert(this.connected_,"sendRequest call when we're not connected not allowed."),this.realtime_.sendRequest(i),n&&(this.requestCBHash_[r]=n)},t.prototype.listen=function(e,t,n,r){var i=e.queryIdentifier(),o=e.path.toString();this.log_("Listen called for "+o+" "+i),this.listens.has(o)||this.listens.set(o,new Map),a.assert(e.getQueryParams().isDefault()||!e.getQueryParams().loadsAllData(),"listen() called for non-default but complete query"),a.assert(!this.listens.get(o).has(i),"listen() called twice for same path/queryId.");var s={onComplete:r,hashFn:t,query:e,tag:n};this.listens.get(o).set(i,s),this.connected_&&this.sendListen_(s)},t.prototype.sendListen_=function(e){var n=this,r=e.query,i=r.path.toString(),o=r.queryIdentifier();this.log_("Listen on "+i+" for "+o);var a={p:i};e.tag&&(a.q=r.queryObject(),a.t=e.tag),a.h=e.hashFn(),this.sendRequest("q",a,(function(a){var s=a.d,u=a.s;t.warnOnListenWarnings_(s,r),(n.listens.get(i)&&n.listens.get(i).get(o))===e&&(n.log_("listen response",a),"ok"!==u&&n.removeListen_(i,o),e.onComplete&&e.onComplete(u,s))}))},t.warnOnListenWarnings_=function(e,t){if(e&&"object"===typeof e&&a.contains(e,"w")){var n=a.safeGet(e,"w");if(Array.isArray(n)&&~n.indexOf("no_index")){var r='".indexOn": "'+t.getQueryParams().getIndex().toString()+'"',i=t.path.toString();k("Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding "+r+" at "+i+" to your security rules for better performance.")}}},t.prototype.refreshAuthToken=function(e){this.authToken_=e,this.log_("Auth token refreshed"),this.authToken_?this.tryAuth():this.connected_&&this.sendRequest("unauth",{},(function(){})),this.reduceReconnectDelayIfAdminCredential_(e)},t.prototype.reduceReconnectDelayIfAdminCredential_=function(e){(e&&40===e.length||a.isAdmin(e))&&(this.log_("Admin auth credential detected. Reducing max reconnect time."),this.maxReconnectDelay_=3e4)},t.prototype.tryAuth=function(){var e=this;if(this.connected_&&this.authToken_){var t=this.authToken_,n=a.isValidFormat(t)?"auth":"gauth",r={cred:t};null===this.authOverride_?r.noauth=!0:"object"===typeof this.authOverride_&&(r.authvar=this.authOverride_),this.sendRequest(n,r,(function(n){var r=n.s,i=n.d||"error";e.authToken_===t&&("ok"===r?e.invalidAuthTokenCount_=0:e.onAuthRevoked_(r,i))}))}},t.prototype.unlisten=function(e,t){var n=e.path.toString(),r=e.queryIdentifier();this.log_("Unlisten called for "+n+" "+r),a.assert(e.getQueryParams().isDefault()||!e.getQueryParams().loadsAllData(),"unlisten() called for non-default but complete query"),this.removeListen_(n,r)&&this.connected_&&this.sendUnlisten_(n,r,e.queryObject(),t)},t.prototype.sendUnlisten_=function(e,t,n,r){this.log_("Unlisten on "+e+" for "+t);var i={p:e};r&&(i.q=n,i.t=r),this.sendRequest("n",i)},t.prototype.onDisconnectPut=function(e,t,n){this.connected_?this.sendOnDisconnect_("o",e,t,n):this.onDisconnectRequestQueue_.push({pathString:e,action:"o",data:t,onComplete:n})},t.prototype.onDisconnectMerge=function(e,t,n){this.connected_?this.sendOnDisconnect_("om",e,t,n):this.onDisconnectRequestQueue_.push({pathString:e,action:"om",data:t,onComplete:n})},t.prototype.onDisconnectCancel=function(e,t){this.connected_?this.sendOnDisconnect_("oc",e,null,t):this.onDisconnectRequestQueue_.push({pathString:e,action:"oc",data:null,onComplete:t})},t.prototype.sendOnDisconnect_=function(e,t,n,r){var i={p:t,d:n};this.log_("onDisconnect "+e,i),this.sendRequest(e,i,(function(e){r&&setTimeout((function(){r(e.s,e.d)}),Math.floor(0))}))},t.prototype.put=function(e,t,n,r){this.putInternal("p",e,t,n,r)},t.prototype.merge=function(e,t,n,r){this.putInternal("m",e,t,n,r)},t.prototype.putInternal=function(e,t,n,r,i){var o={p:t,d:n};void 0!==i&&(o.h=i),this.outstandingPuts_.push({action:e,request:o,onComplete:r}),this.outstandingPutCount_++;var a=this.outstandingPuts_.length-1;this.connected_?this.sendPut_(a):this.log_("Buffering put: "+t)},t.prototype.sendPut_=function(e){var t=this,n=this.outstandingPuts_[e].action,r=this.outstandingPuts_[e].request,i=this.outstandingPuts_[e].onComplete;this.outstandingPuts_[e].queued=this.connected_,this.sendRequest(n,r,(function(r){t.log_(n+" response",r),delete t.outstandingPuts_[e],t.outstandingPutCount_--,0===t.outstandingPutCount_&&(t.outstandingPuts_=[]),i&&i(r.s,r.d)}))},t.prototype.reportStats=function(e){var t=this;if(this.connected_){var n={c:e};this.log_("reportStats",n),this.sendRequest("s",n,(function(e){if("ok"!==e.s){var n=e.d;t.log_("reportStats","Error sending stats: "+n)}}))}},t.prototype.onDataMessage_=function(e){if("r"in e){this.log_("from server: "+a.stringify(e));var t=e.r,n=this.requestCBHash_[t];n&&(delete this.requestCBHash_[t],n(e.b))}else{if("error"in e)throw"A server-side error has occurred: "+e.error;"a"in e&&this.onDataPush_(e.a,e.b)}},t.prototype.onDataPush_=function(e,t){this.log_("handleServerMessage",e,t),"d"===e?this.onDataUpdate_(t.p,t.d,!1,t.t):"m"===e?this.onDataUpdate_(t.p,t.d,!0,t.t):"c"===e?this.onListenRevoked_(t.p,t.q):"ac"===e?this.onAuthRevoked_(t.s,t.d):"sd"===e?this.onSecurityDebugPacket_(t):I("Unrecognized action received from server: "+a.stringify(e)+"\nAre you using the latest client?")},t.prototype.onReady_=function(e,t){this.log_("connection ready"),this.connected_=!0,this.lastConnectionEstablishedTime_=(new Date).getTime(),this.handleTimestamp_(e),this.lastSessionId=t,this.firstConnection_&&this.sendConnectStats_(),this.restoreState_(),this.firstConnection_=!1,this.onConnectStatus_(!0)},t.prototype.scheduleConnect_=function(e){var t=this;a.assert(!this.realtime_,"Scheduling a connect when we're already connected/ing?"),this.establishConnectionTimer_&&clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=setTimeout((function(){t.establishConnectionTimer_=null,t.establishConnection_()}),Math.floor(e))},t.prototype.onVisible_=function(e){e&&!this.visible_&&this.reconnectDelay_===this.maxReconnectDelay_&&(this.log_("Window became visible. Reducing delay."),this.reconnectDelay_=1e3,this.realtime_||this.scheduleConnect_(0)),this.visible_=e},t.prototype.onOnline_=function(e){e?(this.log_("Browser went online."),this.reconnectDelay_=1e3,this.realtime_||this.scheduleConnect_(0)):(this.log_("Browser went offline. Killing connection."),this.realtime_&&this.realtime_.close())},t.prototype.onRealtimeDisconnect_=function(){if(this.log_("data client disconnected"),this.connected_=!1,this.realtime_=null,this.cancelSentTransactions_(),this.requestCBHash_={},this.shouldReconnect_()){if(this.visible_){if(this.lastConnectionEstablishedTime_){(new Date).getTime()-this.lastConnectionEstablishedTime_>3e4&&(this.reconnectDelay_=1e3),this.lastConnectionEstablishedTime_=null}}else this.log_("Window isn't visible. Delaying reconnect."),this.reconnectDelay_=this.maxReconnectDelay_,this.lastConnectionAttemptTime_=(new Date).getTime();var e=(new Date).getTime()-this.lastConnectionAttemptTime_,t=Math.max(0,this.reconnectDelay_-e);
2t=Math.random()*t,this.log_("Trying to reconnect in "+t+"ms"),this.scheduleConnect_(t),this.reconnectDelay_=Math.min(this.maxReconnectDelay_,1.3*this.reconnectDelay_)}this.onConnectStatus_(!1)},t.prototype.establishConnection_=function(){var e=this;if(this.shouldReconnect_()){this.log_("Making a connection attempt"),this.lastConnectionAttemptTime_=(new Date).getTime(),this.lastConnectionEstablishedTime_=null;var n=this.onDataMessage_.bind(this),r=this.onReady_.bind(this),i=this.onRealtimeDisconnect_.bind(this),o=this.id+":"+t.nextConnectionId_++,s=this,u=this.lastSessionId,c=!1,l=null,h=function(){l?l.close():(c=!0,i())};this.realtime_={close:h,sendRequest:function(e){a.assert(l,"sendRequest call when we're not connected not allowed."),l.sendRequest(e)}};var f=this.forceTokenRefresh_;this.forceTokenRefresh_=!1,this.authTokenProvider_.getToken(f).then((function(e){c?T("getToken() completed but was canceled"):(T("getToken() completed. Creating connection."),s.authToken_=e&&e.accessToken,l=new Kt(o,s.repoInfo_,s.applicationId_,n,r,i,(function(e){k(e+" ("+s.repoInfo_.toString()+")"),s.interrupt("server_kill")}),u))})).then(null,(function(t){s.log_("Failed to get token: "+t),c||(e.repoInfo_.nodeAdmin&&k(t),h())}))}},t.prototype.interrupt=function(e){T("Interrupting connection for reason: "+e),this.interruptReasons_[e]=!0,this.realtime_?this.realtime_.close():(this.establishConnectionTimer_&&(clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=null),this.connected_&&this.onRealtimeDisconnect_())},t.prototype.resume=function(e){T("Resuming connection for reason: "+e),delete this.interruptReasons_[e],a.isEmpty(this.interruptReasons_)&&(this.reconnectDelay_=1e3,this.realtime_||this.scheduleConnect_(0))},t.prototype.handleTimestamp_=function(e){var t=e-(new Date).getTime();this.onServerInfoUpdate_({serverTimeOffset:t})},t.prototype.cancelSentTransactions_=function(){for(var e=0;e<this.outstandingPuts_.length;e++){var t=this.outstandingPuts_[e];t&&"h"in t.request&&t.queued&&(t.onComplete&&t.onComplete("disconnect"),delete this.outstandingPuts_[e],this.outstandingPutCount_--)}0===this.outstandingPutCount_&&(this.outstandingPuts_=[])},t.prototype.onListenRevoked_=function(e,t){var n;n=t?t.map((function(e){return D(e)})).join("$"):"default";var r=this.removeListen_(e,n);r&&r.onComplete&&r.onComplete("permission_denied")},t.prototype.removeListen_=function(e,t){var n,r=new B(e).toString();if(this.listens.has(r)){var i=this.listens.get(r);n=i.get(t),i.delete(t),0===i.size&&this.listens.delete(r)}else n=void 0;return n},t.prototype.onAuthRevoked_=function(e,t){T("Auth token revoked: "+e+"/"+t),this.authToken_=null,this.forceTokenRefresh_=!0,this.realtime_.close(),"invalid_token"!==e&&"permission_denied"!==e||(this.invalidAuthTokenCount_++,this.invalidAuthTokenCount_>=3&&(this.reconnectDelay_=3e4,this.authTokenProvider_.notifyForInvalidToken()))},t.prototype.onSecurityDebugPacket_=function(e){this.securityDebugCallback_?this.securityDebugCallback_(e):"msg"in e&&console.log("FIREBASE: "+e.msg.replace("\n","\nFIREBASE: "))},t.prototype.restoreState_=function(){var e,t,n,r;this.tryAuth();try{for(var i=o.__values(this.listens.values()),a=i.next();!a.done;a=i.next()){var s=a.value;try{for(var u=(n=void 0,o.__values(s.values())),c=u.next();!c.done;c=u.next()){var l=c.value;this.sendListen_(l)}}catch(p){n={error:p}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}}catch(d){e={error:d}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}for(var h=0;h<this.outstandingPuts_.length;h++)this.outstandingPuts_[h]&&this.sendPut_(h);for(;this.onDisconnectRequestQueue_.length;){var f=this.onDisconnectRequestQueue_.shift();this.sendOnDisconnect_(f.action,f.pathString,f.data,f.onComplete)}},t.prototype.sendConnectStats_=function(){var e={},t="js";a.isNodeSdk()&&(t=this.repoInfo_.nodeAdmin?"admin_node":"node"),e["sdk."+t+"."+zt.replace(/\./g,"-")]=1,a.isMobileCordova()?e["framework.cordova"]=1:a.isReactNative()&&(e["framework.reactnative"]=1),this.reportStats(e)},t.prototype.shouldReconnect_=function(){var e=Ut.getInstance().currentlyOnline();return a.isEmpty(this.interruptReasons_)&&e},t.nextPersistentConnectionId_=0,t.nextConnectionId_=0,t}(Qt),Yt=function(e){function t(t,n,r){var i=e.call(this)||this;return i.repoInfo_=t,i.onDataUpdate_=n,i.authTokenProvider_=r,i.log_=S("p:rest:"),i.listens_={},i}return o.__extends(t,e),t.prototype.reportStats=function(e){throw new Error("Method not implemented.")},t.getListenId_=function(e,t){return void 0!==t?"tag$"+t:(a.assert(e.getQueryParams().isDefault(),"should have a tag if it's not a default query."),e.path.toString())},t.prototype.listen=function(e,n,r,i){var o=this,s=e.path.toString();this.log_("Listen called for "+s+" "+e.queryIdentifier());var u=t.getListenId_(e,r),c={};this.listens_[u]=c;var l=e.getQueryParams().toRestQueryStringParameters();this.restRequest_(s+".json",l,(function(e,t){var n=t;(404===e&&(n=null,e=null),null===e&&o.onDataUpdate_(s,n,!1,r),a.safeGet(o.listens_,u)===c)&&i(e?401===e?"permission_denied":"rest_error:"+e:"ok",null)}))},t.prototype.unlisten=function(e,n){var r=t.getListenId_(e,n);delete this.listens_[r]},t.prototype.refreshAuthToken=function(e){},t.prototype.restRequest_=function(e,t,n){var r=this;void 0===t&&(t={}),t.format="export",this.authTokenProvider_.getToken(!1).then((function(i){var o=i&&i.accessToken;o&&(t.auth=o);var s=(r.repoInfo_.secure?"https://":"http://")+r.repoInfo_.host+e+"?ns="+r.repoInfo_.namespace+a.querystring(t);r.log_("Sending REST request for "+s);var u=new XMLHttpRequest;u.onreadystatechange=function(){if(n&&4===u.readyState){r.log_("REST Response for "+s+" received. status:",u.status,"response:",u.responseText);var e=null;if(u.status>=200&&u.status<300){try{e=a.jsonEval(u.responseText)}catch(t){k("Failed to parse JSON response for "+s+": "+u.responseText)}n(null,e)}else 401!==u.status&&404!==u.status&&k("Got unsuccessful REST response for "+s+" Status: "+u.status),n(u.status);n=null}},u.open("GET",s,!0),u.send()}))},t}(Qt),Xt=function(){function e(e,t,n,r){var i=this;if(this.repoInfo_=e,this.app=n,this.dataUpdateCount=0,this.statsListener_=null,this.eventQueue_=new Lt,this.nextWriteId_=1,this.interceptServerDataCallback_=null,this.onDisconnect_=new ot,this.persistentConnection_=null,this.stats_=Pt.getCollection(e),t||("object"===typeof window&&window.navigator&&window.navigator.userAgent||"").search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)>=0)this.server_=new Yt(this.repoInfo_,this.onDataUpdate_.bind(this),r),setTimeout(this.onConnectStatus_.bind(this,!0),0);else{var o=n.options.databaseAuthVariableOverride;if("undefined"!==typeof o&&null!==o){if("object"!==typeof o)throw new Error("Only objects are supported for option databaseAuthVariableOverride");try{a.stringify(o)}catch(s){throw new Error("Invalid authOverride provided: "+s)}}this.persistentConnection_=new $t(this.repoInfo_,n.options.appId,this.onDataUpdate_.bind(this),this.onConnectStatus_.bind(this),this.onServerInfoUpdate_.bind(this),r,o),this.server_=this.persistentConnection_}r.addTokenChangeListener((function(e){i.server_.refreshAuthToken(e)})),this.statsReporter_=Pt.getOrCreateReporter(e,(function(){return new Dt(i.stats_,i.server_)})),this.transactionsInit_(),this.infoData_=new Nt,this.infoSyncTree_=new Ot({startListening:function(e,t,n,r){var o=[],a=i.infoData_.getNode(e.path);return a.isEmpty()||(o=i.infoSyncTree_.applyServerOverwrite(e.path,a),setTimeout((function(){r("ok")}),0)),o},stopListening:function(){}}),this.updateInfo_("connected",!1),this.serverSyncTree_=new Ot({startListening:function(e,t,n,r){return i.server_.listen(e,n,t,(function(t,n){var o=r(t,n);i.eventQueue_.raiseEventsForChangedPath(e.path,o)})),[]},stopListening:function(e,t){i.server_.unlisten(e,t)}})}return e.prototype.toString=function(){return(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host},e.prototype.name=function(){return this.repoInfo_.namespace},e.prototype.serverTime=function(){var e=this.infoData_.getNode(new B(".info/serverTimeOffset")).val()||0;return(new Date).getTime()+e}
2,e.prototype.generateServerValues=function(){return(e=(e={timestamp:this.serverTime()})||{}).timestamp=e.timestamp||(new Date).getTime(),e;var e},e.prototype.onDataUpdate_=function(e,t,n,r){this.dataUpdateCount++;var i=new B(e);t=this.interceptServerDataCallback_?this.interceptServerDataCallback_(e,t):t;var o=[];if(r)if(n){var s=a.map(t,(function(e){return Ve(e)}));o=this.serverSyncTree_.applyTaggedQueryMerge(i,s,r)}else{var u=Ve(t);o=this.serverSyncTree_.applyTaggedQueryOverwrite(i,u,r)}else if(n){var c=a.map(t,(function(e){return Ve(e)}));o=this.serverSyncTree_.applyServerMerge(i,c)}else{var l=Ve(t);o=this.serverSyncTree_.applyServerOverwrite(i,l)}var h=i;o.length>0&&(h=this.rerunTransactions_(i)),this.eventQueue_.raiseEventsForChangedPath(h,o)},e.prototype.interceptServerData_=function(e){this.interceptServerDataCallback_=e},e.prototype.onConnectStatus_=function(e){this.updateInfo_("connected",e),!1===e&&this.runOnDisconnectEvents_()},e.prototype.onServerInfoUpdate_=function(e){var t=this;M(e,(function(e,n){t.updateInfo_(e,n)}))},e.prototype.updateInfo_=function(e,t){var n=new B("/.info/"+e),r=Ve(t);this.infoData_.updateSnapshot(n,r);var i=this.infoSyncTree_.applyServerOverwrite(n,r);this.eventQueue_.raiseEventsForChangedPath(n,i)},e.prototype.getNextWriteId_=function(){return this.nextWriteId_++},e.prototype.setWithPriority=function(e,t,n,r){var i=this;this.log_("set",{path:e.toString(),value:t,priority:n});var o=this.generateServerValues(),a=Ve(t,n),s=this.serverSyncTree_.calcCompleteEventCache(e),u=nt(a,s,o),c=this.getNextWriteId_(),l=this.serverSyncTree_.applyUserOverwrite(e,u,c,!0);this.eventQueue_.queueEvents(l),this.server_.put(e.toString(),a.val(!0),(function(t,n){var o="ok"===t;o||k("set at "+e+" failed: "+t);var a=i.serverSyncTree_.ackUserWrite(c,!o);i.eventQueue_.raiseEventsForChangedPath(e,a),i.callOnCompleteCallback(r,t,n)}));var h=this.abortTransactions_(e);this.rerunTransactions_(h),this.eventQueue_.raiseEventsForChangedPath(h,[])},e.prototype.update=function(e,t,n){var r=this;this.log_("update",{path:e.toString(),value:t});var i=!0,o=this.generateServerValues(),a={};if(M(t,(function(t,n){i=!1,a[t]=tt(e.child(t),Ve(n),r.serverSyncTree_,o)})),i)T("update() called with empty data. Don't do anything."),this.callOnCompleteCallback(n,"ok");else{var s=this.getNextWriteId_(),u=this.serverSyncTree_.applyUserMerge(e,a,s);this.eventQueue_.queueEvents(u),this.server_.merge(e.toString(),t,(function(t,i){var o="ok"===t;o||k("update at "+e+" failed: "+t);var a=r.serverSyncTree_.ackUserWrite(s,!o),u=a.length>0?r.rerunTransactions_(e):e;r.eventQueue_.raiseEventsForChangedPath(u,a),r.callOnCompleteCallback(n,t,i)})),M(t,(function(t){var n=r.abortTransactions_(e.child(t));r.rerunTransactions_(n)})),this.eventQueue_.raiseEventsForChangedPath(e,[])}},e.prototype.runOnDisconnectEvents_=function(){var e=this;this.log_("onDisconnectEvents");var t=this.generateServerValues(),n=new ot;this.onDisconnect_.forEachTree(B.Empty,(function(r,i){var o=tt(r,i,e.serverSyncTree_,t);n.remember(r,o)}));var r=[];n.forEachTree(B.Empty,(function(t,n){r=r.concat(e.serverSyncTree_.applyServerOverwrite(t,n));var i=e.abortTransactions_(t);e.rerunTransactions_(i)})),this.onDisconnect_=new ot,this.eventQueue_.raiseEventsForChangedPath(B.Empty,r)},e.prototype.onDisconnectCancel=function(e,t){var n=this;this.server_.onDisconnectCancel(e.toString(),(function(r,i){"ok"===r&&n.onDisconnect_.forget(e),n.callOnCompleteCallback(t,r,i)}))},e.prototype.onDisconnectSet=function(e,t,n){var r=this,i=Ve(t);this.server_.onDisconnectPut(e.toString(),i.val(!0),(function(t,o){"ok"===t&&r.onDisconnect_.remember(e,i),r.callOnCompleteCallback(n,t,o)}))},e.prototype.onDisconnectSetWithPriority=function(e,t,n,r){var i=this,o=Ve(t,n);this.server_.onDisconnectPut(e.toString(),o.val(!0),(function(t,n){"ok"===t&&i.onDisconnect_.remember(e,o),i.callOnCompleteCallback(r,t,n)}))},e.prototype.onDisconnectUpdate=function(e,t,n){var r=this;if(a.isEmpty(t))return T("onDisconnect().update() called with empty data. Don't do anything."),void this.callOnCompleteCallback(n,"ok");this.server_.onDisconnectMerge(e.toString(),t,(function(i,o){"ok"===i&&M(t,(function(t,n){var i=Ve(n);r.onDisconnect_.remember(e.child(t),i)})),r.callOnCompleteCallback(n,i,o)}))},e.prototype.addEventCallbackForQuery=function(e,t){var n;n=".info"===e.path.getFront()?this.infoSyncTree_.addEventRegistration(e,t):this.serverSyncTree_.addEventRegistration(e,t),this.eventQueue_.raiseEventsAtPath(e.path,n)},e.prototype.removeEventCallbackForQuery=function(e,t){var n;n=".info"===e.path.getFront()?this.infoSyncTree_.removeEventRegistration(e,t):this.serverSyncTree_.removeEventRegistration(e,t),this.eventQueue_.raiseEventsAtPath(e.path,n)},e.prototype.interrupt=function(){this.persistentConnection_&&this.persistentConnection_.interrupt("repo_interrupt")},e.prototype.resume=function(){this.persistentConnection_&&this.persistentConnection_.resume("repo_interrupt")},e.prototype.stats=function(e){if(void 0===e&&(e=!1),"undefined"!==typeof console){var t;e?(this.statsListener_||(this.statsListener_=new Rt(this.stats_)),t=this.statsListener_.get()):t=this.stats_.get();var n=Object.keys(t).reduce((function(e,t){return Math.max(t.length,e)}),0);M(t,(function(e,t){for(var r=e,i=e.length;i<n+2;i++)r+=" ";console.log(r+t)}))}},e.prototype.statsIncrementCounter=function(e){this.stats_.incrementCounter(e),this.statsReporter_.includeStat(e)},e.prototype.log_=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="";this.persistentConnection_&&(n=this.persistentConnection_.id+":"),T.apply(void 0,o.__spread([n],e))},e.prototype.callOnCompleteCallback=function(e,t,n){e&&V((function(){if("ok"===t)e(null);else{var r=(t||"error").toUpperCase(),i=r;n&&(i+=": "+n);var o=new Error(i);o.code=r,e(o)}}))},Object.defineProperty(e.prototype,"database",{get:function(){return this.__database||(this.__database=new ln(this))}
2,enumerable:!1,configurable:!0}),e}(),Jt=function(){function e(t){this.indexedFilter_=new yt(t.getIndex()),this.index_=t.getIndex(),this.startPost_=e.getStartPost_(t),this.endPost_=e.getEndPost_(t)}return e.prototype.getStartPost=function(){return this.startPost_},e.prototype.getEndPost=function(){return this.endPost_},e.prototype.matches=function(e){return this.index_.compare(this.getStartPost(),e)<=0&&this.index_.compare(e,this.getEndPost())<=0},e.prototype.updateChild=function(e,t,n,r,i,o){return this.matches(new de(t,n))||(n=Fe.EMPTY_NODE),this.indexedFilter_.updateChild(e,t,n,r,i,o)},e.prototype.updateFullNode=function(e,t,n){t.isLeafNode()&&(t=Fe.EMPTY_NODE);var r=t.withIndex(this.index_);r=r.updatePriority(Fe.EMPTY_NODE);var i=this;return t.forEachChild(Ce,(function(e,t){i.matches(new de(e,t))||(r=r.updateImmediateChild(e,Fe.EMPTY_NODE))})),this.indexedFilter_.updateFullNode(e,r,n)},e.prototype.updatePriority=function(e,t){return e},e.prototype.filtersNodes=function(){return!0},e.prototype.getIndexedFilter=function(){return this.indexedFilter_},e.prototype.getIndex=function(){return this.index_},e.getStartPost_=function(e){if(e.hasStart()){var t=e.getIndexStartName();return e.getIndex().makePost(e.getIndexStartValue(),t)}return e.getIndex().minPost()},e.getEndPost_=function(e){if(e.hasEnd()){var t=e.getIndexEndName();return e.getIndex().makePost(e.getIndexEndValue(),t)}return e.getIndex().maxPost()},e}(),Zt=function(){function e(e){this.rangedFilter_=new Jt(e),this.index_=e.getIndex(),this.limit_=e.getLimit(),this.reverse_=!e.isViewFromLeft()}return e.prototype.updateChild=function(e,t,n,r,i,o){return this.rangedFilter_.matches(new de(t,n))||(n=Fe.EMPTY_NODE),e.getImmediateChild(t).equals(n)?e:e.numChildren()<this.limit_?this.rangedFilter_.getIndexedFilter().updateChild(e,t,n,r,i,o):this.fullLimitUpdateChild_(e,t,n,i,o)},e.prototype.updateFullNode=function(e,t,n){var r;if(t.isLeafNode()||t.isEmpty())r=Fe.EMPTY_NODE.withIndex(this.index_);else if(2*this.limit_<t.numChildren()&&t.isIndexed(this.index_)){r=Fe.EMPTY_NODE.withIndex(this.index_);var i=void 0;i=this.reverse_?t.getReverseIteratorFrom(this.rangedFilter_.getEndPost(),this.index_):t.getIteratorFrom(this.rangedFilter_.getStartPost(),this.index_);for(var o=0;i.hasNext()&&o<this.limit_;){var a=i.getNext();if(!(this.reverse_?this.index_.compare(this.rangedFilter_.getStartPost(),a)<=0:this.index_.compare(a,this.rangedFilter_.getEndPost())<=0))break;r=r.updateImmediateChild(a.name,a.node),o++}}else{r=(r=t.withIndex(this.index_)).updatePriority(Fe.EMPTY_NODE);var s=void 0,u=void 0,c=void 0;i=void 0;if(this.reverse_){i=r.getReverseIterator(this.index_),s=this.rangedFilter_.getEndPost(),u=this.rangedFilter_.getStartPost();var l=this.index_.getCompare();c=function(e,t){return l(t,e)}}else i=r.getIterator(this.index_),s=this.rangedFilter_.getStartPost(),u=this.rangedFilter_.getEndPost(),c=this.index_.getCompare();o=0;for(var h=!1;i.hasNext();){a=i.getNext();!h&&c(s,a)<=0&&(h=!0),h&&o<this.limit_&&c(a,u)<=0?o++:r=r.updateImmediateChild(a.name,Fe.EMPTY_NODE)}}return this.rangedFilter_.getIndexedFilter().updateFullNode(e,r,n)},e.prototype.updatePriority=function(e,t){return e},e.prototype.filtersNodes=function(){return!0},e.prototype.getIndexedFilter=function(){return this.rangedFilter_.getIndexedFilter()},e.prototype.getIndex=function(){return this.index_},e.prototype.fullLimitUpdateChild_=function(e,t,n,r,i){var o;if(this.reverse_){var s=this.index_.getCompare();o=function(e,t){return s(t,e)}}else o=this.index_.getCompare();var u=e;a.assert(u.numChildren()===this.limit_,"");var c=new de(t,n),l=this.reverse_?u.getFirstChild(this.index_):u.getLastChild(this.index_),h=this.rangedFilter_.matches(c);if(u.hasChild(t)){for(var f=u.getImmediateChild(t),p=r.getChildAfterChild(this.index_,l,this.reverse_);null!=p&&(p.name===t||u.hasChild(p.name));)p=r.getChildAfterChild(this.index_,p,this.reverse_);var d=null==p?1:o(p,c);if(h&&!n.isEmpty()&&d>=0)return null!=i&&i.trackChildChange(gt.childChangedChange(t,n,f)),u.updateImmediateChild(t,n);null!=i&&i.trackChildChange(gt.childRemovedChange(t,f));var v=u.updateImmediateChild(t,Fe.EMPTY_NODE);return null!=p&&this.rangedFilter_.matches(p)?(null!=i&&i.trackChildChange(gt.childAddedChange(p.name,p.node)),v.updateImmediateChild(p.name,p.node)):v}return n.isEmpty()?e:h&&o(l,c)>=0?(null!=i&&(i.trackChildChange(gt.childRemovedChange(l.name,l.node)),i.trackChildChange(gt.childAddedChange(t,n))),u.updateImmediateChild(t,n).updateImmediateChild(l.name,Fe.EMPTY_NODE)):e},e}(),en=function(){function e(){this.limitSet_=!1,this.startSet_=!1,this.startNameSet_=!1,this.endSet_=!1,this.endNameSet_=!1,this.limit_=0,this.viewFrom_="",this.indexStartValue_=null,this.indexStartName_="",this.indexEndValue_=null,this.indexEndName_="",this.index_=Ce}return e.prototype.hasStart=function(){return this.startSet_},e.prototype.isViewFromLeft=function(){return""===this.viewFrom_?this.startSet_:this.viewFrom_===e.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT},e.prototype.getIndexStartValue=function(){return a.assert(this.startSet_,"Only valid if start has been set"),this.indexStartValue_},e.prototype.getIndexStartName=function(){return a.assert(this.startSet_,"Only valid if start has been set"),this.startNameSet_?this.indexStartName_:O},e.prototype.hasEnd=function(){return this.endSet_},e.prototype.getIndexEndValue=function(){return a.assert(this.endSet_,"Only valid if end has been set"),this.indexEndValue_},e.prototype.getIndexEndName=function(){return a.assert(this.endSet_,"Only valid if end has been set"),this.endNameSet_?this.indexEndName_:N},e.prototype.hasLimit=function(){return this.limitSet_},e.prototype.hasAnchoredLimit=function(){return this.limitSet_&&""!==this.viewFrom_},e.prototype.getLimit=function(){return a.assert(this.limitSet_,"Only valid if limit has been set"),this.limit_},e.prototype.getIndex=function(){return this.index_},e.prototype.copy_=function(){var t=new e;return t.limitSet_=this.limitSet_,t.limit_=this.limit_,t.startSet_=this.startSet_,t.indexStartValue_=this.indexStartValue_,t.startNameSet_=this.startNameSet_,t.indexStartName_=this.indexStartName_,t.endSet_=this.endSet_,t.indexEndValue_=this.indexEndValue_,t.endNameSet_=this.endNameSet_,t.indexEndName_=this.indexEndName_,t.index_
2=this.index_,t.viewFrom_=this.viewFrom_,t},e.prototype.limit=function(e){var t=this.copy_();return t.limitSet_=!0,t.limit_=e,t.viewFrom_="",t},e.prototype.limitToFirst=function(t){var n=this.copy_();return n.limitSet_=!0,n.limit_=t,n.viewFrom_=e.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT,n},e.prototype.limitToLast=function(t){var n=this.copy_();return n.limitSet_=!0,n.limit_=t,n.viewFrom_=e.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_RIGHT,n},e.prototype.startAt=function(e,t){var n=this.copy_();return n.startSet_=!0,void 0===e&&(e=null),n.indexStartValue_=e,null!=t?(n.startNameSet_=!0,n.indexStartName_=t):(n.startNameSet_=!1,n.indexStartName_=""),n},e.prototype.endAt=function(e,t){var n=this.copy_();return n.endSet_=!0,void 0===e&&(e=null),n.indexEndValue_=e,void 0!==t?(n.endNameSet_=!0,n.indexEndName_=t):(n.endNameSet_=!1,n.indexEndName_=""),n},e.prototype.orderBy=function(e){var t=this.copy_();return t.index_=e,t},e.prototype.getQueryObject=function(){var t=e.WIRE_PROTOCOL_CONSTANTS_,n={};if(this.startSet_&&(n[t.INDEX_START_VALUE]=this.indexStartValue_,this.startNameSet_&&(n[t.INDEX_START_NAME]=this.indexStartName_)),this.endSet_&&(n[t.INDEX_END_VALUE]=this.indexEndValue_,this.endNameSet_&&(n[t.INDEX_END_NAME]=this.indexEndName_)),this.limitSet_){n[t.LIMIT]=this.limit_;var r=this.viewFrom_;""===r&&(r=this.isViewFromLeft()?t.VIEW_FROM_LEFT:t.VIEW_FROM_RIGHT),n[t.VIEW_FROM]=r}return this.index_!==Ce&&(n[t.INDEX]=this.index_.toString()),n},e.prototype.loadsAllData=function(){return!(this.startSet_||this.endSet_||this.limitSet_)},e.prototype.isDefault=function(){return this.loadsAllData()&&this.index_===Ce},e.prototype.getNodeFilter=function(){return this.loadsAllData()?new yt(this.getIndex()):this.hasLimit()?new Zt(this):new Jt(this)},e.prototype.toRestQueryStringParameters=function(){var t,n=e.REST_QUERY_CONSTANTS_,r={};return this.isDefault()||(this.index_===Ce?t=n.PRIORITY_INDEX:this.index_===Be?t=n.VALUE_INDEX:this.index_===ye?t=n.KEY_INDEX:(a.assert(this.index_ instanceof ze,"Unrecognized index type!"),t=this.index_.toString()),r[n.ORDER_BY]=a.stringify(t),this.startSet_&&(r[n.START_AT]=a.stringify(this.indexStartValue_),this.startNameSet_&&(r[n.START_AT]+=","+a.stringify(this.indexStartName_))),this.endSet_&&(r[n.END_AT]=a.stringify(this.indexEndValue_),this.endNameSet_&&(r[n.END_AT]+=","+a.stringify(this.indexEndName_))),this.limitSet_&&(this.isViewFromLeft()?r[n.LIMIT_TO_FIRST]=this.limit_:r[n.LIMIT_TO_LAST]=this.limit_)),r},e.WIRE_PROTOCOL_CONSTANTS_={INDEX_START_VALUE:"sp",INDEX_START_NAME:"sn",INDEX_END_VALUE:"ep",INDEX_END_NAME:"en",LIMIT:"l",VIEW_FROM:"vf",VIEW_FROM_LEFT:"l",VIEW_FROM_RIGHT:"r",INDEX:"i"},e.REST_QUERY_CONSTANTS_={ORDER_BY:"orderBy",PRIORITY_INDEX:"$priority",VALUE_INDEX:"$value",KEY_INDEX:"$key",START_AT:"startAt",END_AT:"endAt",LIMIT_TO_FIRST:"limitToFirst",LIMIT_TO_LAST:"limitToLast"},e.DEFAULT=new e,e}(),tn=function(e){function t(t,n){if(!(t instanceof Xt))throw new Error("new Reference() no longer supported - use app.database().");return e.call(this,t,n,en.DEFAULT,!1)||this}return o.__extends(t,e),t.prototype.getKey=function(){return a.validateArgCount("Reference.key",0,0,arguments.length),this.path.isEmpty()?null:this.path.getBack()},t.prototype.child=function(e){return a.validateArgCount("Reference.child",1,1,arguments.length),"number"===typeof e?e=String(e):e instanceof B||(null===this.path.getFront()?se("Reference.child",1,e,!1):ae("Reference.child",1,e,!1)),new t(this.repo,this.path.child(e))},t.prototype.getParent=function(){a.validateArgCount("Reference.parent",0,0,arguments.length);var e=this.path.parent();return null===e?null:new t(this.repo,e)},t.prototype.getRoot=function(){a.validateArgCount("Reference.root",0,0,arguments.length);for(var e=this;null!==e.getParent();)e=e.getParent();return e},t.prototype.databaseProp=function(){return this.repo.database},t.prototype.set=function(e,t){a.validateArgCount("Reference.set",1,2,arguments.length),ue("Reference.set",this.path),ee("Reference.set",1,e,this.path,!1),a.validateCallback("Reference.set",2,t,!0);var n=new a.Deferred;return this.repo.setWithPriority(this.path,e,null,n.wrapCallback(t)),n.promise},t.prototype.update=function(e,t){if(a.validateArgCount("Reference.update",1,2,arguments.length),ue("Reference.update",this.path),Array.isArray(e)){for(var n={},r=0;r<e.length;++r)n[""+r]=e[r];
2e=n,k("Passing an Array to Firebase.update() is deprecated. Use set() if you want to overwrite the existing data, or an Object with integer keys if you really do want to only update some of the children.")}ne("Reference.update",1,e,this.path,!1),a.validateCallback("Reference.update",2,t,!0);var i=new a.Deferred;return this.repo.update(this.path,e,i.wrapCallback(t)),i.promise},t.prototype.setWithPriority=function(e,t,n){if(a.validateArgCount("Reference.setWithPriority",2,3,arguments.length),ue("Reference.setWithPriority",this.path),ee("Reference.setWithPriority",1,e,this.path,!1),re("Reference.setWithPriority",2,t,!1),a.validateCallback("Reference.setWithPriority",3,n,!0),".length"===this.getKey()||".keys"===this.getKey())throw"Reference.setWithPriority failed: "+this.getKey()+" is a read-only object.";var r=new a.Deferred;return this.repo.setWithPriority(this.path,e,t,r.wrapCallback(n)),r.promise},t.prototype.remove=function(e){return a.validateArgCount("Reference.remove",0,1,arguments.length),ue("Reference.remove",this.path),a.validateCallback("Reference.remove",1,e,!0),this.set(null,e)},t.prototype.transaction=function(e,t,n){if(a.validateArgCount("Reference.transaction",1,3,arguments.length),ue("Reference.transaction",this.path),a.validateCallback("Reference.transaction",1,e,!1),a.validateCallback("Reference.transaction",2,t,!0),le("Reference.transaction",3,n,!0),".length"===this.getKey()||".keys"===this.getKey())throw"Reference.transaction failed: "+this.getKey()+" is a read-only object.";void 0===n&&(n=!0);var r=new a.Deferred;"function"===typeof t&&r.promise.catch((function(){}));var i=function(e,n,i){e?r.reject(e):r.resolve(new fe(n,i)),"function"===typeof t&&t(e,n,i)};return this.repo.startTransaction(this.path,e,i,n),r.promise},t.prototype.setPriority=function(e,t){a.validateArgCount("Reference.setPriority",1,2,arguments.length),ue("Reference.setPriority",this.path),re("Reference.setPriority",1,e,!1),a.validateCallback("Reference.setPriority",2,t,!0);var n=new a.Deferred;return this.repo.setWithPriority(this.path.child(".priority"),e,null,n.wrapCallback(t)),n.promise},t.prototype.push=function(e,t){a.validateArgCount("Reference.push",0,2,arguments.length),ue("Reference.push",this.path),ee("Reference.push",1,e,this.path,!0),a.validateCallback("Reference.push",2,t,!0);var n,r=this.repo.serverTime(),i=pe(r),o=this.child(i),s=this.child(i);return n=null!=e?o.set(e,t).then((function(){return s})):Promise.resolve(s),o.then=n.then.bind(n),o.catch=n.then.bind(n,void 0),"function"===typeof t&&n.catch((function(){})),o},t.prototype.onDisconnect=function(){return ue("Reference.onDisconnect",this.path),new he(this.repo,this.path)},Object.defineProperty(t.prototype,"database",{get:function(){return this.databaseProp()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"key",{get:function(){return this.getKey()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this.getParent()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this.getRoot()},enumerable:!1,configurable:!0}),t}($e);$e.__referenceConstructor=tn,It.__referenceConstructor=tn;var nn,rn=function(){this.children={},this.childCount=0,this.value=null},on=function(){function e(e,t,n){void 0===e&&(e=""),void 0===t&&(t=null),void 0===n&&(n=new rn),this.name_=e,this.parent_=t,this.node_=n}return e.prototype.subTree=function(t){for(var n=t instanceof B?t:new B(t),r=this,i=n.getFront();null!==i;){r=new e(i,r,a.safeGet(r.node_.children,i)||new rn),i=(n=n.popFront()).getFront()}return r},e.prototype.getValue=function(){return this.node_.value},e.prototype.setValue=function(e){a.assert("undefined"!==typeof e,"Cannot set value to undefined"),this.node_.value=e,this.updateParents_()},e.prototype.clear=function(){this.node_.value=null,this.node_.children={},this.node_.childCount=0,this.updateParents_()},e.prototype.hasChildren=function(){return this.node_.childCount>0},e.prototype.isEmpty=function(){return null===this.getValue()&&!this.hasChildren()},e.prototype.forEachChild=function(t){var n=this;M(this.node_.children,(function(r,i){t(new e(r,n,i))}))},e.prototype.forEachDescendant=function(e,t,n){t&&!n&&e(this),this.forEachChild((function(t){t.forEachDescendant(e,!0,n)})),t&&n&&e(this)},e.prototype.forEachAncestor=function(e,t){for(var n=t?this:this.parent();null!==n;){if(e(n))return!0;n=n.parent()}return!1},e.prototype.forEachImmediateDescendantWithValue=function(e){this.forEachChild((function(t){null!==t.getValue()?e(t):t.forEachImmediateDescendantWithValue(e)}))},e.prototype.path=function(){return new B(null===this.parent_?this.name_:this.parent_.path()+"/"+this.name_)},e.prototype.name=function(){return this.name_},e.prototype.parent=function(){return this.parent_},e.prototype.updateParents_=function(){null!==this.parent_&&this.parent_.updateChild_(this.name_,this)},e.prototype.updateChild_=function(e,t){var n=t.isEmpty(),r=a.contains(this.node_.children,e);n&&r?(delete this.node_.children[e],this.node_.childCount--,this.updateParents_()):n||r||(this.node_.children[e]=t.node_,this.node_.childCount++,this.updateParents_())},e}();!function(e){e[e.RUN=0]="RUN",e[e.SENT=1]="SENT",e[e.COMPLETED=2]="COMPLETED",e[e.SENT_NEEDS_ABORT=3]="SENT_NEEDS_ABORT",e[e.NEEDS_ABORT=4]="NEEDS_ABORT"}(nn||(nn={})),Xt.MAX_TRANSACTION_RETRIES_=25,Xt.prototype.transactionsInit_=function(){this.transactionQueueTree_=new on},Xt.prototype.startTransaction=function(e,t,n,r){this.log_("transaction on "+e);var i=function(){},o=new tn(this,e);o.on("value",i);var s={path:e,update:t,onComplete:n,status:null,order:y(),applyLocally:r,retryCount:0,unwatcher:function(){o.off("value",i)},abortReason:null,currentWriteId:null,currentInputSnapshot:null,currentOutputSnapshotRaw:null,currentOutputSnapshotResolved:null},u=this.getLatestState_(e);s.currentInputSnapshot=u;var c=s.update(u.val());if(void 0===c){if(s.unwatcher(),s.currentOutputSnapshotRaw=null,s.currentOutputSnapshotResolved=null,s.onComplete){var l=new We(s.currentInputSnapshot,new tn(this,s.path),Ce);s.onComplete(null,!1,l)}}else{te("transaction failed: Data returned ",c,s.path),s.status=nn.RUN;var h=this.transactionQueueTree_.subTree(e),f=h.getValue()||[];f.push(s),h.setValue(f);var p=void 0;if("object"===typeof c&&null!==c&&a.contains(c,".priority"))p=a.safeGet(c,".priority"),a.assert(Z(p),"Invalid priority returned by transaction. Priority must be a valid string, finite number, server value, or null.");else p=(this.serverSyncTree_.calcCompleteEventCache(e)||Fe.EMPTY_NODE).getPriority().val();p=p;var d=this.generateServerValues(),v=Ve(c,p),g=nt(v,u,d);s.currentOutputSnapshotRaw=v,s.currentOutputSnapshotResolved=g,s.currentWriteId=this.getNextWriteId_();var m=this.serverSyncTree_.applyUserOverwrite(e,g,s.currentWriteId,s.applyLocally);this.eventQueue_.raiseEventsForChangedPath(e,m),this.sendReadyTransactions_()}},Xt.prototype.getLatestState_=function(e,t){return this.serverSyncTree_.calcCompleteEventCache(e,t)||Fe.EMPTY_NODE},Xt.prototype.sendReadyTransactions_=function(e){var t=this;if(void 0===e&&(e=this.transactionQueueTree_),e||this.pruneCompletedTransactionsBelowNode_(e),null!==e.getValue()){var n=this.buildTransactionQueue_(e);a.assert(n.length>0,"Sending zero length transaction queue"),n.every((function(e){return e.status===nn.RUN}
2))&&this.sendTransactionQueue_(e.path(),n)}else e.hasChildren()&&e.forEachChild((function(e){t.sendReadyTransactions_(e)}))},Xt.prototype.sendTransactionQueue_=function(e,t){for(var n=this,r=t.map((function(e){return e.currentWriteId})),i=this.getLatestState_(e,r),o=i,s=i.hash(),u=0;u<t.length;u++){var c=t[u];a.assert(c.status===nn.RUN,"tryToSendTransactionQueue_: items in queue should all be run."),c.status=nn.SENT,c.retryCount++;var l=B.relativePath(e,c.path);o=o.updateChild(l,c.currentOutputSnapshotRaw)}var h=o.val(!0),f=e;this.server_.put(f.toString(),h,(function(r){n.log_("transaction put response",{path:f.toString(),status:r});var i=[];if("ok"===r){for(var o=[],a=0;a<t.length;a++){if(t[a].status=nn.COMPLETED,i=i.concat(n.serverSyncTree_.ackUserWrite(t[a].currentWriteId)),t[a].onComplete){var s=t[a].currentOutputSnapshotResolved,u=new tn(n,t[a].path),c=new We(s,u,Ce);o.push(t[a].onComplete.bind(null,null,!0,c))}t[a].unwatcher()}n.pruneCompletedTransactionsBelowNode_(n.transactionQueueTree_.subTree(e)),n.sendReadyTransactions_(),n.eventQueue_.raiseEventsForChangedPath(e,i);for(a=0;a<o.length;a++)V(o[a])}else{if("datastale"===r)for(a=0;a<t.length;a++)t[a].status===nn.SENT_NEEDS_ABORT?t[a].status=nn.NEEDS_ABORT:t[a].status=nn.RUN;else{k("transaction at "+f.toString()+" failed: "+r);for(a=0;a<t.length;a++)t[a].status=nn.NEEDS_ABORT,t[a].abortReason=r}n.rerunTransactions_(e)}}),s)},Xt.prototype.rerunTransactions_=function(e){var t=this.getAncestorTransactionNode_(e),n=t.path(),r=this.buildTransactionQueue_(t);return this.rerunTransactionQueue_(r,n),n},Xt.prototype.rerunTransactionQueue_=function(e,t){if(0!==e.length){for(var n,r=[],i=[],o=e.filter((function(e){return e.status===nn.RUN})).map((function(e){return e.currentWriteId})),s=0;s<e.length;s++){var u=e[s],c=B.relativePath(t,u.path),l=!1,h=void 0;if(a.assert(null!==c,"rerunTransactionsUnderNode_: relativePath should not be null."),u.status===nn.NEEDS_ABORT)l=!0,h=u.abortReason,i=i.concat(this.serverSyncTree_.ackUserWrite(u.currentWriteId,!0));else if(u.status===nn.RUN)if(u.retryCount>=Xt.MAX_TRANSACTION_RETRIES_)l=!0,h="maxretry",i=i.concat(this.serverSyncTree_.ackUserWrite(u.currentWriteId,!0));else{var f=this.getLatestState_(u.path,o);u.currentInputSnapshot=f;var p=e[s].update(f.val());if(void 0!==p){te("transaction failed: Data returned ",p,u.path);var d=Ve(p);"object"===typeof p&&null!=p&&a.contains(p,".priority")||(d=d.updatePriority(f.getPriority()));var v=u.currentWriteId,g=this.generateServerValues(),y=nt(d,f,g);u.currentOutputSnapshotRaw=d,u.currentOutputSnapshotResolved=y,u.currentWriteId=this.getNextWriteId_(),o.splice(o.indexOf(v),1),i=(i=i.concat(this.serverSyncTree_.applyUserOverwrite(u.path,y,u.currentWriteId,u.applyLocally))).concat(this.serverSyncTree_.ackUserWrite(v,!0))}else l=!0,h="nodata",i=i.concat(this.serverSyncTree_.ackUserWrite(u.currentWriteId,!0))}if(this.eventQueue_.raiseEventsForChangedPath(t,i),i=[],l&&(e[s].status=nn.COMPLETED,n=e[s].unwatcher,setTimeout(n,Math.floor(0)),e[s].onComplete))if("nodata"===h){var m=new tn(this,e[s].path),b=e[s].currentInputSnapshot,_=new We(b,m,Ce);r.push(e[s].onComplete.bind(null,null,!1,_))}else r.push(e[s].onComplete.bind(null,new Error(h),!1,null))}this.pruneCompletedTransactionsBelowNode_(this.transactionQueueTree_);for(s=0;s<r.length;s++)V(r[s]);this.sendReadyTransactions_()}},Xt.prototype.getAncestorTransactionNode_=function(e){var t,n=this.transactionQueueTree_;for(t=e.getFront();null!==t&&null===n.getValue();)n=n.subTree(t),t=(e=e.popFront()).getFront();return n},Xt.prototype.buildTransactionQueue_=function(e){var t=[];return this.aggregateTransactionQueuesForNode_(e,t),t.sort((function(e,t){return e.order-t.order})),t},Xt.prototype.aggregateTransactionQueuesForNode_=function(e,t){var n=this,r=e.getValue();if(null!==r)for(var i=0;i<r.length;i++)t.push(r[i]);e.forEachChild((function(e){n.aggregateTransactionQueuesForNode_(e,t)}))},Xt.prototype.pruneCompletedTransactionsBelowNode_=function(e){var t=this,n=e.getValue();if(n){for(var r=0,i=0;i<n.length;i++)n[i].status!==nn.COMPLETED&&(n[r]=n[i],r++);n.length=r,e.setValue(n.length>0?n:null)}e.forEachChild((function(e){t.pruneCompletedTransactionsBelowNode_(e)}))},Xt.prototype.abortTransactions_=function(e){var t=this,n=this.getAncestorTransactionNode_(e).path(),r=this.transactionQueueTree_.subTree(e);return r.forEachAncestor((function(e){t.abortTransactionsOnNode_(e)})),this.abortTransactionsOnNode_(r),r.forEachDescendant((function(e){t.abortTransactionsOnNode_(e)})),n},Xt.prototype.abortTransactionsOnNode_=function(e){var t=e.getValue();if(null!==t){for(var n=[],r=[],i=-1,o=0;o<t.length;o++)if(t[o].status===nn.SENT_NEEDS_ABORT);else if(t[o].status===nn.SENT)a.assert(i===o-1,"All SENT items should be at beginning of queue."),i=o,t[o].status=nn.SENT_NEEDS_ABORT,t[o].abortReason="set";else if(a.assert(t[o].status===nn.RUN,"Unexpected transaction status in abort"),t[o].unwatcher(),r
2=r.concat(this.serverSyncTree_.ackUserWrite(t[o].currentWriteId,!0)),t[o].onComplete){n.push(t[o].onComplete.bind(null,new Error("set"),!1,null))}-1===i?e.setValue(null):t.length=i+1,this.eventQueue_.raiseEventsForChangedPath(e.path(),r);for(o=0;o<n.length;o++)V(n[o])}};var an,sn=function(){function e(e,t){var n=this;this.app_=e,this.authProvider_=t,this.auth_=null,this.auth_=t.getImmediate({optional:!0}),this.auth_||t.get().then((function(e){return n.auth_=e}))}return e.prototype.getToken=function(e){return this.auth_?this.auth_.getToken(e).catch((function(e){return e&&"auth/token-not-initialized"===e.code?(T("Got auth/token-not-initialized error. Treating as null token."),null):Promise.reject(e)})):Promise.resolve(null)},e.prototype.addTokenChangeListener=function(e){this.auth_?this.auth_.addAuthTokenListener(e):(setTimeout((function(){return e(null)}),0),this.authProvider_.get().then((function(t){return t.addAuthTokenListener(e)})))},e.prototype.removeTokenChangeListener=function(e){this.authProvider_.get().then((function(t){return t.removeAuthTokenListener(e)}))},e.prototype.notifyForInvalidToken=function(){var e='Provided authentication credentials for the app named "'+this.app_.name+'" are invalid. This usually indicates your app was not initialized correctly. ';"credential"in this.app_.options?e+='Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':"serviceAccount"in this.app_.options?e+='Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':e+='Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.',k(e)},e}(),un=function(){function e(){}return e.prototype.getToken=function(t){return Promise.resolve({accessToken:e.EMULATOR_AUTH_TOKEN})},e.prototype.addTokenChangeListener=function(t){t(e.EMULATOR_AUTH_TOKEN)},e.prototype.removeTokenChangeListener=function(e){},e.prototype.notifyForInvalidToken=function(){},e.EMULATOR_AUTH_TOKEN="owner",e}(),cn=function(){function e(){this.repos_={},this.useRestClient_=!1}return e.getInstance=function(){return an||(an=new e),an},e.prototype.interrupt=function(){var e,t,n,r;try{for(var i=o.__values(Object.keys(this.repos_)),a=i.next();!a.done;a=i.next()){var s=a.value;try{for(var u=(n=void 0,o.__values(Object.keys(this.repos_[s]))),c=u.next();!c.done;c=u.next()){var l=c.value;this.repos_[s][l].interrupt()}}catch(h){n={error:h}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}}catch(f){e={error:f}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}},e.prototype.resume=function(){var e,t,n,r;try{for(var i=o.__values(Object.keys(this.repos_)),a=i.next();!a.done;a=i.next()){var s=a.value;try{for(var u=(n=void 0,o.__values(Object.keys(this.repos_[s]))),c=u.next();!c.done;c=u.next()){var l=c.value;this.repos_[s][l].resume()}}catch(h){n={error:h}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}}catch(f){e={error:f}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}},e.prototype.databaseFromApp=function(e,t,n,i){var o=n||e.options.databaseURL;void 0===o&&(e.options.projectId||C("Can't determine Firebase Database URL. Be sure to include a Project ID when calling firebase.initializeApp()."),T("Using default host for project ",e.options.projectId),o=e.options.projectId+"-default-rtdb.firebaseio.com");var a,s=K(o,i),u=s.repoInfo,c=void 0;"undefined"!==typeof r&&(c=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}).FIREBASE_DATABASE_EMULATOR_HOST),c?(a=!0,o="http://"+c+"?ns="+u.namespace,u=(s=K(o,i)).repoInfo):a=!s.repoInfo.secure;var l=i&&a?new un:new sn(e,t);return ce("Invalid Firebase Database URL",1,s),s.path.isEmpty()||C("Database URL must point to the root of a Firebase Database (not including a child path)."),this.createRepo(u,e,l).database},e.prototype.deleteRepo=function(e){var t=a.safeGet(this.repos_,e.app.name);t&&a.safeGet(t,e.repoInfo_.toURLString())===e||C("Database "+e.app.name+"("+e.repoInfo_+") has already been deleted."),e.interrupt(),delete t[e.repoInfo_.toURLString()]},e.prototype.createRepo=function(e,t,n){var r=a.safeGet(this.repos_,t.name);r||(r={},this.repos_[t.name]=r);var i=a.safeGet(r,e.toURLString());return i&&C("Database initialized multiple times. Please make sure the format of the database URL matches with each database() call."),i=new Xt(e,this.useRestClient_,t,n),r[e.toURLString()]=i,i},e.prototype.forceRestClient=function(e){this.useRestClient_=e},e}(),ln=function(){function e(e){this.repo_=e,e instanceof Xt||C("Don't call new Database() directly - please use firebase.database()."),this.root_=new tn(e,B.Empty),this.INTERNAL=new hn(this)}return Object.defineProperty(e.prototype,"app",{get:function(){return this.repo_.app}
2,enumerable:!1,configurable:!0}),e.prototype.ref=function(e){return this.checkDeleted_("ref"),a.validateArgCount("database.ref",0,1,arguments.length),e instanceof tn?this.refFromURL(e.toString()):void 0!==e?this.root_.child(e):this.root_},e.prototype.refFromURL=function(e){var t="database.refFromURL";this.checkDeleted_(t),a.validateArgCount(t,1,1,arguments.length);var n=K(e,this.repo_.repoInfo_.nodeAdmin);ce(t,1,n);var r=n.repoInfo;return r.host!==this.repo_.repoInfo_.host&&C(t+": Host name does not match the current database: (found "+r.host+" but expected "+this.repo_.repoInfo_.host+")"),this.ref(n.path.toString())},e.prototype.checkDeleted_=function(e){null===this.repo_&&C("Cannot call "+e+" on a deleted database.")},e.prototype.goOffline=function(){a.validateArgCount("database.goOffline",0,0,arguments.length),this.checkDeleted_("goOffline"),this.repo_.interrupt()},e.prototype.goOnline=function(){a.validateArgCount("database.goOnline",0,0,arguments.length),this.checkDeleted_("goOnline"),this.repo_.resume()},e.ServerValue={TIMESTAMP:{".sv":"timestamp"},increment:function(e){return{".sv":{increment:e}}}},e}(),hn=function(){function e(e){this.database=e}return e.prototype.delete=function(){return o.__awaiter(this,void 0,void 0,(function(){return o.__generator(this,(function(e){return this.database.checkDeleted_("delete"),cn.getInstance().deleteRepo(this.database.repo_),this.database.repo_=null,this.database.root_=null,this.database.INTERNAL=null,this.database=null,[2]}))}))},e}(),fn=Object.freeze({__proto__:null,forceLongPolling:function(){Ht.forceDisallow(),qt.forceAllow()},forceWebSockets:function(){qt.forceDisallow()},isWebSocketsAvailable:function(){return Ht.isAvailable()},setSecurityDebugCallback:function(e,t){e.repo.persistentConnection_.securityDebugCallback_=t},stats:function(e,t){e.repo.stats(t)},statsIncrementCounter:function(e,t){e.repo.statsIncrementCounter(t)},dataUpdateCount:function(e){return e.repo.dataUpdateCount},interceptServerData:function(e,t){return e.repo.interceptServerData_(t)}}),pn=$t;$t.prototype.simpleListen=function(e,t){this.sendRequest("q",{p:e},t)},$t.prototype.echo=function(e,t){this.sendRequest("echo",{d:e},t)};var dn=Kt,vn=W,gn=Object.freeze({__proto__:null,DataConnection:pn,RealTimeConnection:dn,hijackHash:function(e){var t=$t.prototype.put;return $t.prototype.put=function(n,r,i,o){void 0!==o&&(o=e()),t.call(this,n,r,i,o)},function(){$t.prototype.put=t}},ConnectionTarget:vn,queryIdentifier:function(e){return e.queryIdentifier()},forceRestClient:function(e){cn.getInstance().forceRestClient(e)}}),yn=ln.ServerValue;function mn(t){!function(e){zt=e}(t.SDK_VERSION);var n=t.INTERNAL.registerComponent(new u.Component("database",(function(e,t){var n=e.getProvider("app").getImmediate(),r=e.getProvider("auth-internal");return cn.getInstance().databaseFromApp(n,r,t)}),"PUBLIC").setServiceProps({Reference:tn,Query:$e,Database:ln,DataSnapshot:We,enableLogging:E,INTERNAL:fn,ServerValue:yn,TEST_ACCESS:gn}).setMultipleInstances(!0));t.registerVersion("@firebase/database","0.6.13"),a.isNodeSdk()&&(e.exports=n)}mn(l.default),t.DataSnapshot=We,t.Database=ln,t.OnDisconnect=he,t.Query=$e,t.Reference=tn,t.ServerValue=yn,t.enableLogging=E,t.registerDatabase=mn}).call(this,n(45))},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n(8),o=n(23),a=n(4),s=n(89),u=n(13);var c=function(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}(i),l={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"},h=function(e){function t(t,n){var r=this;return(r=e.call(this,n)||this).code=t,r.message=n,r.name="FirebaseError",r.toString=function(){return r.name+": [code="+r.code+"]: "+r.message},r}return r.__extends(t,e),t}(Error),f=new o.Logger("@firebase/firestore");function p(){return f.logLevel}function d(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(f.logLevel<=o.LogLevel.DEBUG){var i=t.map(y);f.debug.apply(f,r.__spreadArrays(["Firestore (7.22.0): "+e],i))}}function v(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(f.logLevel<=o.LogLevel.ERROR){var i=t.map(y);f.error.apply(f,r.__spreadArrays(["Firestore (7.22.0): "+e],i))}}function g(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(f.logLevel<=o.LogLevel.WARN){var i=t.map(y);f.warn.apply(f,r.__spreadArrays(["Firestore (7.22.0): "+e],i))}}function y(e){if("string"==typeof e)return e;try{return t=e,JSON.stringify(t)}catch(t){return e}var t}function m(e){void 0===e&&(e="Unexpected state");var t="FIRESTORE (7.22.0) INTERNAL ASSERTION FAILED: "+e;throw v(t),new Error(t)}function b(e,t){e||m()}function _(e,t){return e}function w(e){var t=0;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function E(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])}function T(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}var S=function(){function e(e,t,n){void 0===t?t=0:t>e.length&&m(),void 0===n?n=e.length-t:n>e.length-t&&m(),this.segments=e,this.offset=t,this.t=n}return Object.defineProperty(e.prototype,"length",{get:function(){return this.t}
2,enumerable:!1,configurable:!0}),e.prototype.isEqual=function(t){return 0===e.i(this,t)},e.prototype.child=function(t){var n=this.segments.slice(this.offset,this.limit());return t instanceof e?t.forEach((function(e){n.push(e)})):n.push(t),this.o(n)},e.prototype.limit=function(){return this.offset+this.length},e.prototype.u=function(e){return e=void 0===e?1:e,this.o(this.segments,this.offset+e,this.length-e)},e.prototype.h=function(){return this.o(this.segments,this.offset,this.length-1)},e.prototype.l=function(){return this.segments[this.offset]},e.prototype._=function(){return this.get(this.length-1)},e.prototype.get=function(e){return this.segments[this.offset+e]},e.prototype.m=function(){return 0===this.length},e.prototype.T=function(e){if(e.length<this.length)return!1;for(var t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0},e.prototype.I=function(e){if(this.length+1!==e.length)return!1;for(var t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0},e.prototype.forEach=function(e){for(var t=this.offset,n=this.limit();t<n;t++)e(this.segments[t])},e.prototype.A=function(){return this.segments.slice(this.offset,this.limit())},e.i=function(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){var i=e.get(r),o=t.get(r);if(i<o)return-1;if(i>o)return 1}return e.length<t.length?-1:e.length>t.length?1:0},e}(),I=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.o=function(e,n,r){return new t(e,n,r)},t.prototype.R=function(){return this.A().join("/")},t.prototype.toString=function(){return this.R()},t.P=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];for(var r=[],i=0,o=e;i<o.length;i++){var a=o[i];if(a.indexOf("//")>=0)throw new h(l.INVALID_ARGUMENT,"Invalid segment ("+a+"). Paths must not contain // in them.");r.push.apply(r,a.split("/").filter((function(e){return e.length>0})))}return new t(r)},t.g=function(){return new t([])},t}(S),C=/^[_a-zA-Z][_a-zA-Z0-9]*$/,k=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.o=function(e,n,r){return new t(e,n,r)},t.V=function(e){return C.test(e)},t.prototype.R=function(){return this.A().map((function(e){return e=e.replace("\\","\\\\").replace("`","\\`"),t.V(e)||(e="`"+e+"`"),e})).join(".")},t.prototype.toString=function(){return this.R()},t.prototype.p=function(){return 1===this.length&&"__name__"===this.get(0)},t.v=function(){return new t(["__name__"])},t.S=function(e){for(var n=[],r="",i=0,o=function(){if(0===r.length)throw new h(l.INVALID_ARGUMENT,"Invalid field path ("+e+"). Paths must not be empty, begin with '.', end with '.', or contain '..'");n.push(r),r=""},a=!1;i<e.length;){var s=e[i];if("\\"===s){if(i+1===e.length)throw new h(l.INVALID_ARGUMENT,"Path has trailing escape character: "+e);var u=e[i+1];if("\\"!==u&&"."!==u&&"`"!==u)throw new h(l.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);r+=u,i+=2}else"`"===s?(a=!a,i++):"."!==s||a?(r+=s,i++):(o(),i++)}if(o(),a)throw new h(l.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new t(n)},t.g=function(){return new t([])},t}(S),x=function(){function e(e){this.path=e}return e.D=function(t){return new e(I.P(t))},e.C=function(t){return new e(I.P(t).u(5))},e.prototype.N=function(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e},e.prototype.isEqual=function(e){return null!==e&&0===I.i(this.path,e.path)},e.prototype.toString=function(){return this.path.toString()},e.i=function(e,t){return I.i(e.path,t.path)},e.F=function(e){return e.length%2==0},e.$=function(t){return new e(new I(t.slice()))},e}();function O(e,t){if(0!==t.length)throw new h(l.INVALID_ARGUMENT,"Function "+e+"() does not support arguments, but was called with "+K(t.length,"argument")+".")}function N(e,t,n){if(t.length!==n)throw new h(l.INVALID_ARGUMENT,"Function "+e+"() requires "+K(n,"argument")+", but was called with "+K(t.length,"argument")+".")}function A(e,t,n){if(t.length<n)throw new h(l.INVALID_ARGUMENT,"Function "+e+"() requires at least "+K(n,"argument")+", but was called with "+K(t.length,"argument")+".")}function P(e,t,n,r){if(t.length<n||t.length>r)throw new h(l.INVALID_ARGUMENT,"Function "+e+"() requires between "+n+" and "+r+" arguments, but was called with "+K(t.length,"argument")+".")}function R(e,t,n,r){U(e,t,G(n)+" argument",r)}function D(e,t,n,r){void 0!==r&&R(e,t,n,r)}function L(e,t,n,r){U(e,t,n+" option",r)}function M(e,t,n,r){void 0!==r&&L(e,t,n,r)}function j(e,t,n,r,i){void 0!==r&&function(e,t,n,r,i){for(var o=[],a=0,s=i;a<s.length;a++){var u=s[a];if(u===r)return;o.push(q(u))}var c=q(r);throw new h(l.INVALID_ARGUMENT,"Invalid value "+c+" provided to function "+e+'() for option "'+n+'". Acceptable values: '+o.join(", "))}(e,0,n,r,i)}function F(e,t,n,r){if(!t.some((function(e){return e===r})))throw new h(l.INVALID_ARGUMENT,"Invalid value "+q(r)+" provided to function "+e+"() for its "+G(n)+" argument. Acceptable values: "+t.join(", "));return r}function U(e,t,n,r){if(!("object"===t?V(r):"non-empty string"===t?"string"==typeof r&&""!==r:typeof r===t)){var i=q(r);throw new h(l.INVALID_ARGUMENT,"Function "+e+"() requires its "+n+" to be of type "+t+", but it was: "+i)}}function V(e){return"object"==typeof e&&null!==e&&(Object.getPrototypeOf(e)===Object.prototype||null===Object.getPrototypeOf(e))}function q(e){if(void 0===e)return"undefined";if(null===e)return"null";if("string"==typeof e)return e.length>20&&(e=e.substring(0,20)+"..."),JSON.stringify(e);if("number"==typeof e||"boolean"==typeof e)return""+e;if("object"==typeof e){if(e instanceof Array)return"an array";var t=function(e){if(e.constructor){var t=/function\s+([^\s(]+)\s*\(/.exec(e.constructor.toString());if(t&&t.length>1)return t[1]}return null}(e);return t?"a custom "+t+" object":"an object"}return"function"==typeof e?"a function":m()}function B(e,t,n){if(void 0===n)throw new h(l.INVALID_ARGUMENT,"Function "+e+"() requires a valid "+G(t)+" argument, but it was undefined.")}function z(e,t,n){E(t,(function(t,r){if(n.indexOf(t)<0)throw new h(l.INVALID_ARGUMENT,"Unknown option '"+t+"' passed to function "+e+"(). Available options: "+n.join(", "))}))}function W(e,t,n,r){var i=q(r);return new h(l.INVALID_ARGUMENT,"Function "+e+"() requires its "+G(n)+" argument to be a "+t+", but it was: "+i)}function H(e,t,n){if(n<=0)throw new h(l.INVALID_ARGUMENT,"Function "+e+"() requires its "+G(t)+" argument to be a positive number, but it was: "+n+".")}function G(e){switch(e){case 1:return"first";
2case 2:return"second";case 3:return"third";default:return e+"th"}}function K(e,t){return e+" "+t+(1===e?"":"s")}function Q(e){var t="undefined"!=typeof self&&(self.crypto||self.msCrypto),n=new Uint8Array(e);if(t&&"function"==typeof t.getRandomValues)t.getRandomValues(n);else for(var r=0;r<e;r++)n[r]=Math.floor(256*Math.random());return n}var $=function(){function e(){}return e.k=function(){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=Math.floor(256/e.length)*e.length,n="";n.length<20;)for(var r=Q(40),i=0;i<r.length;++i)n.length<20&&r[i]<t&&(n+=e.charAt(r[i]%e.length));return n},e}();function Y(e,t){return e<t?-1:e>t?1:0}function X(e,t,n){return e.length===t.length&&e.every((function(e,r){return n(e,t[r])}))}function J(e){return e+"\0"}var Z=function(){function e(e){this.M=e}return e.fromBase64String=function(t){return new e(atob(t))},e.fromUint8Array=function(t){return new e(function(e){for(var t="",n=0;n<e.length;++n)t+=String.fromCharCode(e[n]);return t}(t))},e.prototype.toBase64=function(){return e=this.M,btoa(e);var e},e.prototype.toUint8Array=function(){return function(e){for(var t=new Uint8Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}(this.M)},e.prototype.O=function(){return 2*this.M.length},e.prototype.L=function(e){return Y(this.M,e.M)},e.prototype.isEqual=function(e){return this.M===e.M},e}();Z.B=new Z("");var ee=function(){function e(e){this.q=e}return e.fromBase64String=function(t){try{return new e(Z.fromBase64String(t))}catch(t){throw new h(l.INVALID_ARGUMENT,"Failed to construct Bytes from Base64 string: "+t)}},e.fromUint8Array=function(t){return new e(Z.fromUint8Array(t))},e.prototype.toBase64=function(){return this.q.toBase64()},e.prototype.toUint8Array=function(){return this.q.toUint8Array()},e.prototype.toString=function(){return"Bytes(base64: "+this.toBase64()+")"},e.prototype.isEqual=function(e){return this.q.isEqual(e.q)},e}();function te(){if("undefined"==typeof Uint8Array)throw new h(l.UNIMPLEMENTED,"Uint8Arrays are not available in this environment.")}function ne(){if("undefined"==typeof atob)throw new h(l.UNIMPLEMENTED,"Blobs are unavailable in Firestore in this environment.")}var re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.fromBase64String=function(e){N("Blob.fromBase64String",arguments,1),R("Blob.fromBase64String","string",1,e),ne();try{return new t(Z.fromBase64String(e))}catch(e){throw new h(l.INVALID_ARGUMENT,"Failed to construct Blob from Base64 string: "+e)}},t.fromUint8Array=function(e){if(N("Blob.fromUint8Array",arguments,1),te(),!(e instanceof Uint8Array))throw W("Blob.fromUint8Array","Uint8Array",1,e);return new t(Z.fromUint8Array(e))},t.prototype.toBase64=function(){return N("Blob.toBase64",arguments,0),ne(),e.prototype.toBase64.call(this)},t.prototype.toUint8Array=function(){return N("Blob.toUint8Array",arguments,0),te(),e.prototype.toUint8Array.call(this)},t.prototype.toString=function(){return"Blob(base64: "+this.toBase64()+")"},t}(ee),ie=function(e,t,n,r,i){this.U=e,this.persistenceKey=t,this.host=n,this.ssl=r,this.forceLongPolling=i},oe=function(){function e(e,t){this.projectId=e,this.database=t||"(default)"}return Object.defineProperty(e.prototype,"W",{get:function(){return"(default)"===this.database},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(t){return t instanceof e&&t.projectId===this.projectId&&t.database===this.database},e.prototype.L=function(e){return Y(this.projectId,e.projectId)||Y(this.database,e.database)},e}(),ae=function(){function e(e,t){this.j=e,this.K=t,this.G={}}return e.prototype.get=function(e){var t=this.j(e),n=this.G[t];if(void 0!==n)for(var r=0,i=n;r<i.length;r++){var o=i[r],a=o[0],s=o[1];if(this.K(a,e))return s}},e.prototype.has=function(e){return void 0!==this.get(e)},e.prototype.set=function(e,t){var n=this.j(e),r=this.G[n];if(void 0!==r){for(var i=0;i<r.length;i++)if(this.K(r[i][0],e))return void(r[i]=[e,t]);r.push([e,t])}else this.G[n]=[[e,t]]},e.prototype.delete=function(e){var t=this.j(e),n=this.G[t];if(void 0===n)return!1;for(var r=0;r<n.length;r++)if(this.K(n[r][0],e))return 1===n.length?delete this.G[t]:n.splice(r,1),!0;return!1},e.prototype.forEach=function(e){E(this.G,(function(t,n){for(var r=0,i=n;r<i.length;r++){var o=i[r],a=o[0],s=o[1];e(a,s)}}))},e.prototype.m=function(){return T(this.G)},e}(),se=function(){function e(e,t){if(this.seconds=e,this.nanoseconds=t,t<0)throw new h(l.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(t>=1e9)throw new h(l.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(e<-62135596800)throw new h(l.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new h(l.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}return e.now=function(){return e.fromMillis(Date.now())},e.fromDate=function(t){return e.fromMillis(t.getTime())},e.fromMillis=function(t){var n=Math.floor(t/1e3);return new e(n,1e6*(t-1e3*n))},e.prototype.toDate=function(){return new Date(this.toMillis())},e.prototype.toMillis=function(){return 1e3*this.seconds+this.nanoseconds/1e6},e.prototype.H=function(e){return this.seconds===e.seconds?Y(this.nanoseconds,e.nanoseconds):Y(this.seconds,e.seconds)},e.prototype.isEqual=function(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds},e.prototype.toString=function(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"},e.prototype.toJSON=function(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}},e.prototype.valueOf=function(){var e=this.seconds- -62135596800;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}
2,e}(),ue=function(){function e(e){this.timestamp=e}return e.Y=function(t){return new e(t)},e.min=function(){return new e(new se(0,0))},e.prototype.L=function(e){return this.timestamp.H(e.timestamp)},e.prototype.isEqual=function(e){return this.timestamp.isEqual(e.timestamp)},e.prototype.J=function(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3},e.prototype.toString=function(){return"SnapshotVersion("+this.timestamp.toString()+")"},e.prototype.X=function(){return this.timestamp},e}();function ce(e){return null==e}function le(e){return 0===e&&1/e==-1/0}function he(e){return"number"==typeof e&&Number.isInteger(e)&&!le(e)&&e<=Number.MAX_SAFE_INTEGER&&e>=Number.MIN_SAFE_INTEGER}var fe=function(e,t,n,r,i,o,a){void 0===t&&(t=null),void 0===n&&(n=[]),void 0===r&&(r=[]),void 0===i&&(i=null),void 0===o&&(o=null),void 0===a&&(a=null),this.path=e,this.collectionGroup=t,this.orderBy=n,this.filters=r,this.limit=i,this.startAt=o,this.endAt=a,this.Z=null};function pe(e,t,n,r,i,o,a){return void 0===t&&(t=null),void 0===n&&(n=[]),void 0===r&&(r=[]),void 0===i&&(i=null),void 0===o&&(o=null),void 0===a&&(a=null),new fe(e,t,n,r,i,o,a)}function de(e){var t=_(e);if(null===t.Z){var n=t.path.R();null!==t.collectionGroup&&(n+="|cg:"+t.collectionGroup),n+="|f:",n+=t.filters.map((function(e){return function(e){return e.field.R()+e.op.toString()+it(e.value)}(e)})).join(","),n+="|ob:",n+=t.orderBy.map((function(e){return(t=e).field.R()+t.dir;var t})).join(","),ce(t.limit)||(n+="|l:",n+=t.limit),t.startAt&&(n+="|lb:",n+=ar(t.startAt)),t.endAt&&(n+="|ub:",n+=ar(t.endAt)),t.Z=n}return t.Z}function ve(e,t){if(e.limit!==t.limit)return!1;if(e.orderBy.length!==t.orderBy.length)return!1;for(var n=0;n<e.orderBy.length;n++)if(!hr(e.orderBy[n],t.orderBy[n]))return!1;if(e.filters.length!==t.filters.length)return!1;for(var r=0;r<e.filters.length;r++)if(i=e.filters[r],o=t.filters[r],i.op!==o.op||!i.field.isEqual(o.field)||!et(i.value,o.value))return!1;var i,o;return e.collectionGroup===t.collectionGroup&&!!e.path.isEqual(t.path)&&!!ur(e.startAt,t.startAt)&&ur(e.endAt,t.endAt)}function ge(e){return x.F(e.path)&&null===e.collectionGroup&&0===e.filters.length}var ye,me,be=function(){function e(e,t,n,r,i,o,a){void 0===i&&(i=ue.min()),void 0===o&&(o=ue.min()),void 0===a&&(a=Z.B),this.target=e,this.targetId=t,this.tt=n,this.sequenceNumber=r,this.et=i,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=a}return e.prototype.nt=function(t){return new e(this.target,this.targetId,this.tt,t,this.et,this.lastLimboFreeSnapshotVersion,this.resumeToken)},e.prototype.st=function(t,n){return new e(this.target,this.targetId,this.tt,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,t)},e.prototype.it=function(t){return new e(this.target,this.targetId,this.tt,this.sequenceNumber,this.et,t,this.resumeToken)},e}(),_e=function(e){this.count=e};function we(e){switch(e){case l.OK:return m();case l.CANCELLED:case l.UNKNOWN:case l.DEADLINE_EXCEEDED:case l.RESOURCE_EXHAUSTED:case l.INTERNAL:case l.UNAVAILABLE:case l.UNAUTHENTICATED:return!1;case l.INVALID_ARGUMENT:case l.NOT_FOUND:case l.ALREADY_EXISTS:case l.PERMISSION_DENIED:case l.FAILED_PRECONDITION:case l.ABORTED:case l.OUT_OF_RANGE:case l.UNIMPLEMENTED:case l.DATA_LOSS:return!0;default:return m()}}function Ee(e){if(void 0===e)return v("GRPC error has no .code"),l.UNKNOWN;switch(e){case ye.OK:return l.OK;case ye.CANCELLED:return l.CANCELLED;case ye.UNKNOWN:return l.UNKNOWN;case ye.DEADLINE_EXCEEDED:return l.DEADLINE_EXCEEDED;case ye.RESOURCE_EXHAUSTED:return l.RESOURCE_EXHAUSTED;case ye.INTERNAL:return l.INTERNAL;case ye.UNAVAILABLE:return l.UNAVAILABLE;case ye.UNAUTHENTICATED:return l.UNAUTHENTICATED;case ye.INVALID_ARGUMENT:return l.INVALID_ARGUMENT;case ye.NOT_FOUND:return l.NOT_FOUND;case ye.ALREADY_EXISTS:return l.ALREADY_EXISTS;case ye.PERMISSION_DENIED:return l.PERMISSION_DENIED;case ye.FAILED_PRECONDITION:return l.FAILED_PRECONDITION;case ye.ABORTED:return l.ABORTED;case ye.OUT_OF_RANGE:return l.OUT_OF_RANGE;case ye.UNIMPLEMENTED:return l.UNIMPLEMENTED;case ye.DATA_LOSS:return l.DATA_LOSS;default:return m()}}(me=ye||(ye={}))[me.OK=0]="OK",me[me.CANCELLED=1]="CANCELLED",me[me.UNKNOWN=2]="UNKNOWN",me[me.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",me[me.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",me[me.NOT_FOUND=5]="NOT_FOUND",me[me.ALREADY_EXISTS=6]="ALREADY_EXISTS",me[me.PERMISSION_DENIED=7]="PERMISSION_DENIED",me[me.UNAUTHENTICATED=16]="UNAUTHENTICATED",me[me.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",me[me.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",me[me.ABORTED=10]="ABORTED",me[me.OUT_OF_RANGE=11]="OUT_OF_RANGE",me[me.UNIMPLEMENT
2ED=12]="UNIMPLEMENTED",me[me.INTERNAL=13]="INTERNAL",me[me.UNAVAILABLE=14]="UNAVAILABLE",me[me.DATA_LOSS=15]="DATA_LOSS";var Te=function(){function e(e,t){this.i=e,this.root=t||Ie.EMPTY}return e.prototype.rt=function(t,n){return new e(this.i,this.root.rt(t,n,this.i).copy(null,null,Ie.ot,null,null))},e.prototype.remove=function(t){return new e(this.i,this.root.remove(t,this.i).copy(null,null,Ie.ot,null,null))},e.prototype.get=function(e){for(var t=this.root;!t.m();){var n=this.i(e,t.key);if(0===n)return t.value;n<0?t=t.left:n>0&&(t=t.right)}return null},e.prototype.indexOf=function(e){for(var t=0,n=this.root;!n.m();){var r=this.i(e,n.key);if(0===r)return t+n.left.size;r<0?n=n.left:(t+=n.left.size+1,n=n.right)}return-1},e.prototype.m=function(){return this.root.m()},Object.defineProperty(e.prototype,"size",{get:function(){return this.root.size},enumerable:!1,configurable:!0}),e.prototype.at=function(){return this.root.at()},e.prototype.ct=function(){return this.root.ct()},e.prototype.ut=function(e){return this.root.ut(e)},e.prototype.forEach=function(e){this.ut((function(t,n){return e(t,n),!1}))},e.prototype.toString=function(){var e=[];return this.ut((function(t,n){return e.push(t+":"+n),!1})),"{"+e.join(", ")+"}"},e.prototype.ht=function(e){return this.root.ht(e)},e.prototype.lt=function(){return new Se(this.root,null,this.i,!1)},e.prototype._t=function(e){return new Se(this.root,e,this.i,!1)},e.prototype.ft=function(){return new Se(this.root,null,this.i,!0)},e.prototype.dt=function(e){return new Se(this.root,e,this.i,!0)},e}(),Se=function(){function e(e,t,n,r){this.wt=r,this.Tt=[];for(var i=1;!e.m();)if(i=t?n(e.key,t):1,r&&(i*=-1),i<0)e=this.wt?e.left:e.right;else{if(0===i){this.Tt.push(e);break}this.Tt.push(e),e=this.wt?e.right:e.left}}return e.prototype.Et=function(){var e=this.Tt.pop(),t={key:e.key,value:e.value};if(this.wt)for(e=e.left;!e.m();)this.Tt.push(e),e=e.right;else for(e=e.right;!e.m();)this.Tt.push(e),e=e.left;return t},e.prototype.It=function(){return this.Tt.length>0},e.prototype.At=function(){if(0===this.Tt.length)return null;var e=this.Tt[this.Tt.length-1];return{key:e.key,value:e.value}},e}(),Ie=function(){function e(t,n,r,i,o){this.key=t,this.value=n,this.color=null!=r?r:e.RED,this.left=null!=i?i:e.EMPTY,this.right=null!=o?o:e.EMPTY,this.size=this.left.size+1+this.right.size}return e.prototype.copy=function(t,n,r,i,o){return new e(null!=t?t:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=i?i:this.left,null!=o?o:this.right)},e.prototype.m=function(){return!1},e.prototype.ut=function(e){return this.left.ut(e)||e(this.key,this.value)||this.right.ut(e)},e.prototype.ht=function(e){return this.right.ht(e)||e(this.key,this.value)||this.left.ht(e)},e.prototype.min=function(){return this.left.m()?this:this.left.min()},e.prototype.at=function(){return this.min().key},e.prototype.ct=function(){return this.right.m()?this.key:this.right.ct()},e.prototype.rt=function(e,t,n){var r=this,i=n(e,r.key);return(r=i<0?r.copy(null,null,null,r.left.rt(e,t,n),null):0===i?r.copy(null,t,null,null,null):r.copy(null,null,null,null,r.right.rt(e,t,n))).Rt()},e.prototype.Pt=function(){if(this.left.m())return e.EMPTY;var t=this;return t.left.gt()||t.left.left.gt()||(t=t.yt()),(t=t.copy(null,null,null,t.left.Pt(),null)).Rt()},e.prototype.remove=function(t,n){var r,i=this;if(n(t,i.key)<0)i.left.m()||i.left.gt()||i.left.left.gt()||(i=i.yt()),i=i.copy(null,null,null,i.left.remove(t,n),null);else{if(i.left.gt()&&(i=i.Vt()),i.right.m()||i.right.gt()||i.right.left.gt()||(i=i.bt()),0===n(t,i.key)){if(i.right.m())return e.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(t,n))}return i.Rt()},e.prototype.gt=function(){return this.color},e.prototype.Rt=function(){var e=this;return e.right.gt()&&!e.left.gt()&&(e=e.vt()),e.left.gt()&&e.left.left.gt()&&(e=e.Vt()),e.left.gt()&&e.right.gt()&&(e=e.St()),e},e.prototype.yt=function(){var e=this.St();return e.right.left.gt()&&(e=(e=(e=e.copy(null,null,null,null,e.right.Vt())).vt()).St()),e},e.prototype.bt=function(){var e=this.St();return e.left.left.gt()&&(e=(e=e.Vt()).St()),e},e.prototype.vt=function(){var t=this.copy(null,null,e.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)},e.prototype.Vt=function(){var t=this.copy(null,null,e.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)},e.prototype.St=function(){var e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)},e.prototype.Dt=function(){var e=this.Ct();return Math.pow(2,e)<=this.size+1},e.prototype.Ct=function(){if(this.gt()&&this.left.gt())throw m();if(this.right.gt())throw m();var e=this.left.Ct();if(e!==this.right.Ct())throw m();return e+(this.gt()?0:1)},e}();
2Ie.EMPTY=null,Ie.RED=!0,Ie.ot=!1,Ie.EMPTY=new(function(){function e(){this.size=0}return Object.defineProperty(e.prototype,"key",{get:function(){throw m()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){throw m()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){throw m()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"left",{get:function(){throw m()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){throw m()},enumerable:!1,configurable:!0}),e.prototype.copy=function(e,t,n,r,i){return this},e.prototype.rt=function(e,t,n){return new Ie(e,t)},e.prototype.remove=function(e,t){return this},e.prototype.m=function(){return!0},e.prototype.ut=function(e){return!1},e.prototype.ht=function(e){return!1},e.prototype.at=function(){return null},e.prototype.ct=function(){return null},e.prototype.gt=function(){return!1},e.prototype.Dt=function(){return!0},e.prototype.Ct=function(){return 0},e}());var Ce=function(){function e(e){this.i=e,this.data=new Te(this.i)}return e.prototype.has=function(e){return null!==this.data.get(e)},e.prototype.first=function(){return this.data.at()},e.prototype.last=function(){return this.data.ct()},Object.defineProperty(e.prototype,"size",{get:function(){return this.data.size},enumerable:!1,configurable:!0}),e.prototype.indexOf=function(e){return this.data.indexOf(e)},e.prototype.forEach=function(e){this.data.ut((function(t,n){return e(t),!1}))},e.prototype.Nt=function(e,t){for(var n=this.data._t(e[0]);n.It();){var r=n.Et();if(this.i(r.key,e[1])>=0)return;t(r.key)}},e.prototype.Ft=function(e,t){var n;for(n=void 0!==t?this.data._t(t):this.data.lt();n.It();)if(!e(n.Et().key))return},e.prototype.$t=function(e){var t=this.data._t(e);return t.It()?t.Et().key:null},e.prototype.lt=function(){return new ke(this.data.lt())},e.prototype._t=function(e){return new ke(this.data._t(e))},e.prototype.add=function(e){return this.copy(this.data.remove(e).rt(e,!0))},e.prototype.delete=function(e){return this.has(e)?this.copy(this.data.remove(e)):this},e.prototype.m=function(){return this.data.m()},e.prototype.xt=function(e){var t=this;return t.size<e.size&&(t=e,e=this),e.forEach((function(e){t=t.add(e)})),t},e.prototype.isEqual=function(t){if(!(t instanceof e))return!1;if(this.size!==t.size)return!1;for(var n=this.data.lt(),r=t.data.lt();n.It();){var i=n.Et().key,o=r.Et().key;if(0!==this.i(i,o))return!1}return!0},e.prototype.A=function(){var e=[];return this.forEach((function(t){e.push(t)})),e},e.prototype.toString=function(){var e=[];return this.forEach((function(t){return e.push(t)})),"SortedSet("+e.toString()+")"},e.prototype.copy=function(t){var n=new e(this.i);return n.data=t,n},e}(),ke=function(){function e(e){this.kt=e}return e.prototype.Et=function(){return this.kt.Et().key},e.prototype.It=function(){return this.kt.It()},e}(),xe=new Te(x.i);function Oe(){return xe}function Ne(){return Oe()}var Ae=new Te(x.i);function Pe(){return Ae}var Re=new Te(x.i),De=new Ce(x.i);function Le(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=De,r=0,i=e;r<i.length;r++){var o=i[r];n=n.add(o)}return n}var Me=new Ce(Y);function je(){return Me}var Fe=function(){function e(e){this.i=e?function(t,n){return e(t,n)||x.i(t.key,n.key)}:function(e,t){return x.i(e.key,t.key)},this.Mt=Pe(),this.Ot=new Te(this.i)}return e.Lt=function(t){return new e(t.i)},e.prototype.has=function(e){return null!=this.Mt.get(e)},e.prototype.get=function(e){return this.Mt.get(e)},e.prototype.first=function(){return this.Ot.at()},e.prototype.last=function(){return this.Ot.ct()},e.prototype.m=function(){return this.Ot.m()},e.prototype.indexOf=function(e){var t=this.Mt.get(e);return t?this.Ot.indexOf(t):-1},Object.defineProperty(e.prototype,"size",{get:function(){return this.Ot.size},enumerable:!1,configurable:!0}),e.prototype.forEach=function(e){this.Ot.ut((function(t,n){return e(t),!1}))},e.prototype.add=function(e){var t=this.delete(e.key);return t.copy(t.Mt.rt(e.key,e),t.Ot.rt(e,null))},e.prototype.delete=function(e){var t=this.get(e);return t?this.copy(this.Mt.remove(e),this.Ot.remove(t)):this},e.prototype.isEqual=function(t){if(!(t instanceof e))return!1;if(this.size!==t.size)return!1;for(var n=this.Ot.lt(),r=t.Ot.lt();n.It();){var i=n.Et().key,o=r.Et().key;if(!i.isEqual(o))return!1}return!0},e.prototype.toString=function(){var e=[];return this.forEach((function(t){e.push(t.toString())})),0===e.length?"DocumentSet ()":"DocumentSet (\n "+e.join(" \n")+"\n)"},e.prototype.copy=function(t,n){var r=new e;return r.i=this.i,r.Mt=t,r.Ot=n,r},e}(),Ue=function(){function e(){this.Bt=new Te(x.i)}return e.prototype.track=function(e){var t=e.doc.key,n=this.Bt.get(t);n?0!==e.type&&3===n.type?this.Bt=this.Bt.rt(t,e):3===e.type&&1!==n.type?this.Bt=this.Bt.rt(t,{type:n.type,doc:e.doc}):2===e.type&&2===n.type?this.Bt=this.Bt.rt(t,{type:2,doc:e.doc}):2===e.type&&0===n.type?this.Bt=this.Bt.rt(t,{type:0,doc:e.doc}):1===e.type&&0===n.type?this.Bt=this.Bt.remove(t):1===e.type&&2===n.type?this.Bt=this.Bt.rt(t,{type:1,doc:n.doc}):0===e.type&&1===n.type?this.Bt=this.Bt.rt(t,{type:2,doc:e.doc}):m():this.Bt=this.Bt.rt(t,e)},e.prototype.qt=function(){var e=[];return this.Bt.ut((function(t,n){e.push(n)})),e},e}(),Ve=function(){function e(e,t,n,r,i,o,a,s){this.query=e,this.docs=t,this.Ut=n,this.docChanges=r,this.Qt=i,this.fromCache=o,this.Wt=a,this.jt=s}return e.Kt=function(t,n,r,i){var o=[];
2return n.forEach((function(e){o.push({type:0,doc:e})})),new e(t,n,Fe.Lt(n),o,r,i,!0,!1)},Object.defineProperty(e.prototype,"hasPendingWrites",{get:function(){return!this.Qt.m()},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(e){if(!(this.fromCache===e.fromCache&&this.Wt===e.Wt&&this.Qt.isEqual(e.Qt)&&Hn(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.Ut.isEqual(e.Ut)))return!1;var t=this.docChanges,n=e.docChanges;if(t.length!==n.length)return!1;for(var r=0;r<t.length;r++)if(t[r].type!==n[r].type||!t[r].doc.isEqual(n[r].doc))return!1;return!0},e}(),qe=function(){function e(e,t,n,r,i){this.et=e,this.Gt=t,this.zt=n,this.Ht=r,this.Yt=i}return e.Jt=function(t,n){var r=new Map;return r.set(t,Be.Xt(t,n)),new e(ue.min(),r,je(),Oe(),Le())},e}(),Be=function(){function e(e,t,n,r,i){this.resumeToken=e,this.Zt=t,this.te=n,this.ee=r,this.ne=i}return e.Xt=function(t,n){return new e(Z.B,n,Le(),Le(),Le())},e}(),ze=function(e,t,n,r){this.se=e,this.removedTargetIds=t,this.key=n,this.ie=r},We=function(e,t){this.targetId=e,this.re=t},He=function(e,t,n,r){void 0===n&&(n=Z.B),void 0===r&&(r=null),this.state=e,this.targetIds=t,this.resumeToken=n,this.cause=r},Ge=function(){function e(){this.oe=0,this.ae=$e(),this.ce=Z.B,this.ue=!1,this.he=!0}return Object.defineProperty(e.prototype,"Zt",{get:function(){return this.ue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"resumeToken",{get:function(){return this.ce},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"le",{get:function(){return 0!==this.oe},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_e",{get:function(){return this.he},enumerable:!1,configurable:!0}),e.prototype.fe=function(e){e.O()>0&&(this.he=!0,this.ce=e)},e.prototype.de=function(){var e=Le(),t=Le(),n=Le();return this.ae.forEach((function(r,i){switch(i){case 0:e=e.add(r);break;case 2:t=t.add(r);break;case 1:n=n.add(r);break;default:m()}})),new Be(this.ce,this.ue,e,t,n)},e.prototype.we=function(){this.he=!1,this.ae=$e()},e.prototype.me=function(e,t){this.he=!0,this.ae=this.ae.rt(e,t)},e.prototype.Te=function(e){this.he=!0,this.ae=this.ae.remove(e)},e.prototype.Ee=function(){this.oe+=1},e.prototype.Ie=function(){this.oe-=1},e.prototype.Ae=function(){this.he=!0,this.ue=!0},e}(),Ke=function(){function e(e){this.Re=e,this.Pe=new Map,this.ge=Oe(),this.ye=Qe(),this.Ve=new Ce(Y)}return e.prototype.pe=function(e){for(var t=0,n=e.se;t<n.length;t++){var r=n[t];e.ie instanceof On?this.be(r,e.ie):e.ie instanceof Nn&&this.ve(r,e.key,e.ie)}for(var i=0,o=e.removedTargetIds;i<o.length;i++){var a=o[i];this.ve(a,e.key,e.ie)}},e.prototype.Se=function(e){var t=this;this.De(e,(function(n){var r=t.Ce(n);switch(e.state){case 0:t.Ne(n)&&r.fe(e.resumeToken);break;case 1:r.Ie(),r.le||r.we(),r.fe(e.resumeToken);break;case 2:r.Ie(),r.le||t.removeTarget(n);break;case 3:t.Ne(n)&&(r.Ae(),r.fe(e.resumeToken));break;case 4:t.Ne(n)&&(t.Fe(n),r.fe(e.resumeToken));break;default:m()}}))},e.prototype.De=function(e,t){var n=this;e.targetIds.length>0?e.targetIds.forEach(t):this.Pe.forEach((function(e,r){n.Ne(r)&&t(r)}))},e.prototype.$e=function(e){var t=e.targetId,n=e.re.count,r=this.xe(t);if(r){var i=r.target;if(ge(i))if(0===n){var o=new x(i.path);this.ve(t,o,new Nn(o,ue.min()))}else b(1===n);else this.ke(t)!==n&&(this.Fe(t),this.Ve=this.Ve.add(t))}},e.prototype.Me=function(e){var t=this,n=new Map;this.Pe.forEach((function(r,i){var o=t.xe(i);if(o){if(r.Zt&&ge(o.target)){var a=new x(o.target.path);null!==t.ge.get(a)||t.Oe(i,a)||t.ve(i,a,new Nn(a,e))}r._e&&(n.set(i,r.de()),r.we())}}));var r=Le();this.ye.forEach((function(e,n){var i=!0;n.Ft((function(e){var n=t.xe(e);return!n||2===n.tt||(i=!1,!1)})),i&&(r=r.add(e))}));var i=new qe(e,n,this.Ve,this.ge,r);return this.ge=Oe(),this.ye=Qe(),this.Ve=new Ce(Y),i},e.prototype.be=function(e,t){if(this.Ne(e)){var n=this.Oe(e,t.key)?2:0;this.Ce(e).me(t.key,n),this.ge=this.ge.rt(t.key,t),this.ye=this.ye.rt(t.key,this.Le(t.key).add(e))}},e.prototype.ve=function(e,t,n){if(this.Ne(e)){var r=this.Ce(e);this.Oe(e,t)?r.me(t,1):r.Te(t),this.ye=this.ye.rt(t,this.Le(t).delete(e)),n&&(this.ge=this.ge.rt(t,n))}},e.prototype.removeTarget=function(e){this.Pe.delete(e)},e.prototype.ke=function(e){var t=this.Ce(e).de();return this.Re.Be(e).size+t.te.size-t.ne.size},e.prototype.Ee=function(e){this.Ce(e).Ee()},e.prototype.Ce=function(e){var t=this.Pe.get(e);return t||(t=new Ge,this.Pe.set(e,t)),t},e.prototype.Le=function(e){var t=this.ye.get(e);return t||(t=new Ce(Y),this.ye=this.ye.rt(e,t)),t},e.prototype.Ne=function(e){var t=null!==this.xe(e);return t||d("WatchChangeAggregator","Detected inactive target",e),t},e.prototype.xe=function(e){var t=this.Pe.get(e);return t&&t.le?null:this.Re.qe(e)},e.prototype.Fe=function(e){var t=this;this.Pe.set(e,new Ge),this.Re.Be(e).forEach((function(n){t.ve(e,n,null)}))},e.prototype.Oe=function(e,t){return this.Re.Be(e).has(t)},e}();function Qe(){return new Te(x.i)}function $e(){return new Te(x.i)}function Ye(e){var t,n;return"server_timestamp"===(null===(n=((null===(t=null==e?void 0:e.mapValue)||void 0===t?void 0:t.fields)||{}).__type__)||void 0===n?void 0:n.stringValue)}function Xe(e){var t=ot(e.mapValue.fields.__local_write_time__.timestampValue);return new se(t.seconds,t.nanos)}var Je=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function Ze(e){return"nullValue"in e?0:"booleanValue"in e?1:"integerValue"in e||"doubleValue"in e?2:"timestampValue"in e?3:"stringValue"in e?5:"bytesValue"in e?6:"referenceValue"in e?7:"geoPointValue"in e?8:"arrayValue"in e?9:"mapValue"in e?Ye(e)?4:10:m()}function et(e,t){var n=Ze(e);if(n!==Ze(t))return!1;switch(n){case 0:return!0;case 1:return e.booleanValue===t.booleanValue;case 4:return Xe(e).isEqual(Xe(t));case 3:return function(e,t){if("string"==typeof e.timestampValue&&"string"==typeof t.timestampValue&&e.timestampValue.length===t.timestampValue.length)return e.timestampValue===t.timestampValue;var n=ot(e.timestampValue),r=ot(t.timestampValue);return n.seconds===r.seconds&&n.nanos===r.nanos}(e,t);case 5:return e.stringValue===t.stringValue;case 6:return function(e,t){return st(e.bytesValue).isEqual(st(t.bytesValue))}(e,t);case 7:return e.referenceValue===t.referenceValue;case 8:return function(e,t){return at(e.geoPointValue.latitude)===at(t.geoPointValue.latitude)&&at(e.geoPointValue.longitude)===at(t.geoPointValue.longitude)}(e,t);case 2:return function(e,t){if("integerValue"in e&&"integerValue"in t)return at(e.integerValue)===at(t.integerValue);if("doubleValue"in e&&"doubleValue"in t){var n=at(e.doubleValue),r=at(t.doubleValue);return n===r?le(n)===le(r):isNaN(n)&&isNaN(r)}return!1}(e,t);case 9:return X(e.arrayValue.values||[],t.arrayValue.values||[],et);case 10:return function(e,t){var n=e.mapValue.fields||{},r=t.mapValue.fields||{};if(w(n)!==w(r))return!1;for(var i in n)if(n.hasOwnProperty(i)&&(void 0===r[i]||!et(n[i],r[i])))return!1;return!0}(e,t);default:return m()}}function tt(e,t){return void 0!==(e.values||[]).find((function(e){return et(e,t)}))}function nt(e,t){var n=Ze(e),r=Ze(t);if(n!==r)return Y(n,r);switch(n){case 0:return 0;case 1:return Y(e.booleanValue,t.booleanValue);case 2:return function(e,t){var n=at(e.integerValue||e.doubleValue),r=at(t.integerValue||t.doubleValue);return n<r?-1:n>r?1:n===r?0:isNaN(n)?isNaN(r)?0:-1:1}(e,t);case 3:return rt(e.timestampValue,t.timestampValue);case 4:return rt(Xe(e),Xe(t));case 5:return Y(e.stringValue,t.stringValue);case 6:return function(e,t){var n=st(e),r=st(t);return n.L(r)}(e.bytesValue,t.bytesValue);case 7:return function(e,t){for(var n=e.split("/"),r=t.split("/"),i=0;i<n.length&&i<r.length;i++){var o=Y(n[i],r[i]);if(0!==o)return o}return Y(n.length,r.length)}(e.referenceValue,t.referenceValue);case 8:return function(e,t){var n=Y(at(e.latitude),at(t.latitude));return 0!==n?n:Y(at(e.longitude),at(t.longitude))}(e.geoPointValue,t.geoPointValue);case 9:return function(e,t){for(var n=e.values||[],r=t.values||[],i=0;i<n.length&&i<r.length;++i){var o=nt(n[i],r[i]);if(o)return o}return Y(n.length,r.length)}(e.arrayValue,t.arrayValue);case 10:return function(e,t){var n=e.fields||{},r=Object.keys(n),i=t.fields||{},o=Object.keys(i);r.sort(),o.sort();for(var a=0;a<r.length&&a<o.length;++a){var s=Y(r[a],o[a]);if(0!==s)return s;var u=nt(n[r[a]],i[o[a]]);if(0!==u)return u}return Y(r.length,o.length)}(e.mapValue,t.mapValue);default:throw m()}}function rt(e,t){if("string"==typeof e&&"string"==typeof t&&e.length===t.length)return Y(e,t);var n=ot(e),r=ot(t),i=Y(n.seconds,r.seconds);return 0!==i?i:Y(n.nanos,r.nanos)}function it(e){return function e(t){return"nullValue"in t?"null":"booleanValue"in t?""+t.booleanValue:"integerValue"in t?""+t.integerValue:"doubleValue"in t?""+t.doubleValue:"timestampValue"in t?function(e){var t=ot(e);return"time("+t.seconds+","+t.nanos+")"}
2(t.timestampValue):"stringValue"in t?t.stringValue:"bytesValue"in t?st(t.bytesValue).toBase64():"referenceValue"in t?(r=t.referenceValue,x.C(r).toString()):"geoPointValue"in t?"geo("+(n=t.geoPointValue).latitude+","+n.longitude+")":"arrayValue"in t?function(t){for(var n="[",r=!0,i=0,o=t.values||[];i<o.length;i++){var a=o[i];r?r=!1:n+=",",n+=e(a)}return n+"]"}(t.arrayValue):"mapValue"in t?function(t){for(var n="{",r=!0,i=0,o=Object.keys(t.fields||{}).sort();i<o.length;i++){var a=o[i];r?r=!1:n+=",",n+=a+":"+e(t.fields[a])}return n+"}"}(t.mapValue):m();var n,r}(e)}function ot(e){if(b(!!e),"string"==typeof e){var t=0,n=Je.exec(e);if(b(!!n),n[1]){var r=n[1];r=(r+"000000000").substr(0,9),t=Number(r)}var i=new Date(e);return{seconds:Math.floor(i.getTime()/1e3),nanos:t}}return{seconds:at(e.seconds),nanos:at(e.nanos)}}function at(e){return"number"==typeof e?e:"string"==typeof e?Number(e):0}function st(e){return"string"==typeof e?Z.fromBase64String(e):Z.fromUint8Array(e)}function ut(e,t){return{referenceValue:"projects/"+e.projectId+"/databases/"+e.database+"/documents/"+t.path.R()}}function ct(e){return!!e&&"integerValue"in e}function lt(e){return!!e&&"arrayValue"in e}function ht(e){return!!e&&"nullValue"in e}function ft(e){return!!e&&"doubleValue"in e&&isNaN(Number(e.doubleValue))}function pt(e){return!!e&&"mapValue"in e}var dt={asc:"ASCENDING",desc:"DESCENDING"},vt={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"},gt=function(e,t){this.U=e,this.Ue=t};function yt(e){return{integerValue:""+e}}function mt(e,t){if(e.Ue){if(isNaN(t))return{doubleValue:"NaN"};if(t===1/0)return{doubleValue:"Infinity"};if(t===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:le(t)?"-0":t}}function bt(e,t){return he(t)?yt(t):mt(e,t)}function _t(e,t){return e.Ue?new Date(1e3*t.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")+"."+("000000000"+t.nanoseconds).slice(-9)+"Z":{seconds:""+t.seconds,nanos:t.nanoseconds}}function wt(e,t){return e.Ue?t.toBase64():t.toUint8Array()}function Et(e,t){return _t(e,t.X())}function Tt(e){return b(!!e),ue.Y(function(e){var t=ot(e);return new se(t.seconds,t.nanos)}(e))}function St(e,t){return function(e){return new I(["projects",e.projectId,"databases",e.database])}(e).child("documents").child(t).R()}function It(e){var t=I.P(e);return b(Gt(t)),t}function Ct(e,t){return St(e.U,t.path)}function kt(e,t){var n=It(t);return b(n.get(1)===e.U.projectId),b(!n.get(3)&&!e.U.database||n.get(3)===e.U.database),new x(At(n))}function xt(e,t){return St(e.U,t)}function Ot(e){var t=It(e);return 4===t.length?I.g():At(t)}function Nt(e){return new I(["projects",e.U.projectId,"databases",e.U.database]).R()}function At(e){return b(e.length>4&&"documents"===e.get(4)),e.u(5)}function Pt(e,t,n){return{name:Ct(e,t),fields:n.proto.mapValue.fields}}function Rt(e,t){var n;if(t instanceof yn)n={update:Pt(e,t.key,t.value)};
2else if(t instanceof Tn)n={delete:Ct(e,t.key)};else if(t instanceof mn)n={update:Pt(e,t.key,t.data),updateMask:Ht(t.Qe)};else if(t instanceof _n)n={transform:{document:Ct(e,t.key),fieldTransforms:t.fieldTransforms.map((function(e){return function(e,t){var n=t.transform;if(n instanceof Xt)return{fieldPath:t.field.R(),setToServerValue:"REQUEST_TIME"};if(n instanceof Jt)return{fieldPath:t.field.R(),appendMissingElements:{values:n.elements}};if(n instanceof en)return{fieldPath:t.field.R(),removeAllFromArray:{values:n.elements}};if(n instanceof nn)return{fieldPath:t.field.R(),increment:n.We};throw m()}(0,e)}))}};else{if(!(t instanceof Sn))return m();n={verify:Ct(e,t.key)}}return t.Ke.je||(n.currentDocument=function(e,t){return void 0!==t.updateTime?{updateTime:Et(e,t.updateTime)}:void 0!==t.exists?{exists:t.exists}:m()}(e,t.Ke)),n}function Dt(e,t){var n=t.currentDocument?function(e){return void 0!==e.updateTime?cn.updateTime(Tt(e.updateTime)):void 0!==e.exists?cn.exists(e.exists):cn.Ge()}(t.currentDocument):cn.Ge();if(t.update){t.update.name;var r=kt(e,t.update.name),i=new In({mapValue:{fields:t.update.fields}});if(t.updateMask){var o=function(e){var t=e.fieldPaths||[];return new an(t.map((function(e){return k.S(e)})))}(t.updateMask);return new mn(r,i,o,n)}return new yn(r,i,n)}if(t.delete){var a=kt(e,t.delete);return new Tn(a,n)}if(t.transform){var s=kt(e,t.transform.document),u=t.transform.fieldTransforms.map((function(t){return function(e,t){var n=null;if("setToServerValue"in t)b("REQUEST_TIME"===t.setToServerValue),n=new Xt;else if("appendMissingElements"in t){var r=t.appendMissingElements.values||[];n=new Jt(r)}else if("removeAllFromArray"in t){var i=t.removeAllFromArray.values||[];n=new en(i)}else"increment"in t?n=new nn(e,t.increment):m();var o=k.S(t.fieldPath);return new sn(o,n)}(e,t)}));return b(!0===n.exists),new _n(s,u)}if(t.verify){var c=kt(e,t.verify);return new Sn(c,n)}return m()}function Lt(e,t){return{documents:[xt(e,t.path)]}}function Mt(e,t){var n={structuredQuery:{}},r=t.path;null!==t.collectionGroup?(n.parent=xt(e,r),n.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(n.parent=xt(e,r.h()),n.structuredQuery.from=[{collectionId:r._()}]);var i=function(e){if(0!==e.length){var t=e.map((function(e){return function(e){if("=="===e.op){if(ft(e.value))return{unaryFilter:{field:qt(e.field),op:"IS_NAN"}};if(ht(e.value))return{unaryFilter:{field:qt(e.field),op:"IS_NULL"}}}else if("!="===e.op){if(ft(e.value))return{unaryFilter:{field:qt(e.field),op:"IS_NOT_NAN"}};if(ht(e.value))return{unaryFilter:{field:qt(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:qt(e.field),op:Vt(e.op),value:e.value}}}(e)}));return 1===t.length?t[0]:{compositeFilter:{op:"AND",filters:t}}}}(t.filters);i&&(n.structuredQuery.where=i);var o=function(e){if(0!==e.length)return e.map((function(e){return function(e){return{field:qt(e.field),direction:Ut(e.dir)}}(e)}))}(t.orderBy);o&&(n.structuredQuery.orderBy=o);var a=function(e,t){return e.Ue||ce(t)?t:{value:t}}(e,t.limit);return null!==a&&(n.structuredQuery.limit=a),t.startAt&&(n.structuredQuery.startAt=jt(t.startAt)),t.endAt&&(n.structuredQuery.endAt=jt(t.endAt)),n}function jt(e){return{before:e.before,values:e.position}}function Ft(e){var t=!!e.before,n=e.values||[];return new or(n,t)}function Ut(e){return dt[e]}function Vt(e){return vt[e]}function qt(e){return{fieldPath:e.R()}}function Bt(e){return k.S(e.fieldPath)}function zt(e){return Yn.create(Bt(e.fieldFilter.field),function(e){switch(e){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";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()}}(e.fieldFilter.op),e.fieldFilter.value)}function Wt(e){switch(e.unaryFilter.op){case"IS_NAN":var t=Bt(e.unaryFilter.field);return Yn.create(t,"==",{doubleValue:NaN});case"IS_NULL":var n=Bt(e.unaryFilter.field);return Yn.create(n,"==",{nullValue:"NULL_VALUE"});
2case"IS_NOT_NAN":var r=Bt(e.unaryFilter.field);return Yn.create(r,"!=",{doubleValue:NaN});case"IS_NOT_NULL":var i=Bt(e.unaryFilter.field);return Yn.create(i,"!=",{nullValue:"NULL_VALUE"});case"OPERATOR_UNSPECIFIED":default:return m()}}function Ht(e){var t=[];return e.fields.forEach((function(e){return t.push(e.R())})),{fieldPaths:t}}function Gt(e){return e.length>=4&&"projects"===e.get(0)&&"databases"===e.get(2)}var Kt=function(){this.ze=void 0};function Qt(e,t,n){return e instanceof Xt?function(e,t){var n={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:e.seconds,nanos:e.nanoseconds}}}};return t&&(n.fields.__previous_value__=t),{mapValue:n}}(n,t):e instanceof Jt?Zt(e,t):e instanceof en?tn(e,t):function(e,t){var n=Yt(e,t),r=rn(n)+rn(e.We);return ct(n)&&ct(e.We)?yt(r):mt(e.serializer,r)}(e,t)}function $t(e,t,n){return e instanceof Jt?Zt(e,t):e instanceof en?tn(e,t):n}function Yt(e,t){return e instanceof nn?ct(n=t)||function(e){return!!e&&"doubleValue"in e}(n)?t:{integerValue:0}:null;var n}var Xt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(Kt),Jt=function(e){function t(t){var n=this;return(n=e.call(this)||this).elements=t,n}return r.__extends(t,e),t}(Kt);function Zt(e,t){for(var n=on(t),r=function(e){n.some((function(t){return et(t,e)}))||n.push(e)},i=0,o=e.elements;i<o.length;i++)r(o[i]);return{arrayValue:{values:n}}}var en=function(e){function t(t){var n=this;return(n=e.call(this)||this).elements=t,n}return r.__extends(t,e),t}(Kt);function tn(e,t){for(var n=on(t),r=function(e){n=n.filter((function(t){return!et(t,e)}))},i=0,o=e.elements;i<o.length;i++)r(o[i]);return{arrayValue:{values:n}}}var nn=function(e){function t(t,n){var r=this;return(r=e.call(this)||this).serializer=t,r.We=n,r}return r.__extends(t,e),t}(Kt);function rn(e){return at(e.integerValue||e.doubleValue)}function on(e){return lt(e)&&e.arrayValue.values?e.arrayValue.values.slice():[]}var an=function(){function e(e){this.fields=e,e.sort(k.i)}return e.prototype.He=function(e){for(var t=0,n=this.fields;t<n.length;t++)if(n[t].T(e))return!0;return!1},e.prototype.isEqual=function(e){return X(this.fields,e.fields,(function(e,t){return e.isEqual(t)}))},e}(),sn=function(e,t){this.field=e,this.transform=t},un=function(e,t){this.version=e,this.transformResults=t},cn=function(){function e(e,t){this.updateTime=e,this.exists=t}return e.Ge=function(){return new e},e.exists=function(t){return new e(void 0,t)},e.updateTime=function(t){return new e(t)},Object.defineProperty(e.prototype,"je",{get:function(){return void 0===this.updateTime&&void 0===this.exists},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)},e}();function ln(e,t){return void 0!==e.updateTime?t instanceof On&&t.version.isEqual(e.updateTime):void 0===e.exists||e.exists===t instanceof On}var hn=function(){};function fn(e,t,n){return e instanceof yn?function(e,t,n){return new On(e.key,n.version,e.value,{hasCommittedMutations:!0})}(e,0,n):e instanceof mn?function(e,t,n){if(!ln(e.Ke,t))return new An(e.key,n.version);var r=bn(e,t);return new On(e.key,n.version,r,{hasCommittedMutations:!0})}(e,t,n):e instanceof _n?function(e,t,n){if(b(null!=n.transformResults),!ln(e.Ke,t))return new An(e.key,n.version);var r=wn(e,t),i=function(e,t,n){var r=[];b(e.length===n.length);for(var i=0;i<n.length;i++){var o=e[i],a=o.transform,s=null;t instanceof On&&(s=t.field(o.field)),r.push($t(a,s,n[i]))}return r}(e.fieldTransforms,t,n.transformResults),o=n.version,a=En(e,r.data(),i);return new On(e.key,o,a,{hasCommittedMutations:!0})}(e,t,n):function(e,t,n){return new Nn(e.key,n.version,{hasCommittedMutations:!0})}(e,0,n)}function pn(e,t,n,r){return e instanceof yn?function(e,t){if(!ln(e.Ke,t))return t;var n=gn(t);return new On(e.key,n,e.value,{Ye:!0})}(e,t):e instanceof mn?function(e,t){if(!ln(e.Ke,t))return t;var n=gn(t),r=bn(e,t);return new On(e.key,n,r,{Ye:!0})}(e,t):e instanceof _n?function(e,t,n,r){if(!ln(e.Ke,t))return t;var i=wn(e,t),o=function(e,t,n,r){for(var i=[],o=0,a=e;o<a.length;o++){var s=a[o],u=s.transform,c=null;n instanceof On&&(c=n.field(s.field)),null===c&&r instanceof On&&(c=r.field(s.field)),i.push(Qt(u,c,t))}return i}(e.fieldTransforms,n,t,r),a=En(e,i.data(),o);return new On(e.key,i.version,a,{Ye:!0})}(e,t,r,n):function(e,t){return ln(e.Ke,t)?new Nn(e.key,ue.min()):t}(e,t)}function dn(e,t){return e instanceof _n?function(e,t){for(var n=null,r=0,i=e.fieldTransforms;r<i.length;r++){var o=i[r],a=t instanceof On?t.field(o.field):void 0,s=Yt(o.transform,a||null);null!=s&&(n=null==n?(new Cn).set(o.field,s):n.set(o.field,s))}return n?n.Je():null}(e,t):null}function vn(e,t){return e.type===t.type&&!!e.key.isEqual(t.key)&&!!e.Ke.isEqual(t.Ke)&&(0===e.type?e.value.isEqual(t.value):1===e.type?e.data.isEqual(t.data)&&e.Qe.isEqual(t.Qe):2!==e.type||X(e.fieldTransforms,e.fieldTransforms,(function(e,t){return function(e,t){return e.field.isEqual(t.field)&&function(e,t){return e instanceof Jt&&t instanceof Jt||e instanceof en&&t instanceof en?X(e.elements,t.elements,et):e instanceof nn&&t instanceof nn?et(e.We,t.We):e instanceof Xt&&t instanceof Xt}(e.transform,t.transform)}(e,t)})))}function gn(e){return e instanceof On?e.version:ue.min()}var yn=function(e){function t(t,n,r){var i=this;return(i=e.call(this)||this).key=t,i.value=n,i.Ke=r,i.type=0,i}return r.__extends(t,e),t}(hn),mn=function(e){function t(t,n,r,i){var o=this;return(o=e.call(this)||this).key=t,o.data=n,o.Qe=r,o.Ke=i,o.type=1,o}return r.__extends(t,e),t}(hn);function bn(e,t){return function(e,t){var n=new Cn(t);return e.Qe.fields.forEach((function(t){if(!t.m()){var r=e.data.field(t);null!==r?n.set(t,r):n.delete(t)}})),n.Je()}(e,t instanceof On?t.data():In.empty())}var _n=function(e){function t(t,n){var r=this;return(r=e.call(this)||this).key=t,r.fieldTransforms=n,r.type=2,r.Ke=cn.exists(!0),r}return r.__extends(t,e),t}(hn);function wn(e,t){return t}function En(e,t,n){for(var r=new Cn(t),i=0;i<e.fieldTransforms.length;i++){var o=e.fieldTransforms[i];r.set(o.field,n[i])}return r.Je()}var Tn=function(e){function t(t,n){var r=this;return(r=e.call(this)||this).key=t,r.Ke=n,r.type=3,r}return r.__extends(t,e),t}(hn),Sn=function(e){function t(t,n){var r=this;return(r=e.call(this)||this).key=t,r.Ke=n,r.type=4,r}return r.__extends(t,e),t}(hn),In=function(){function e(e){this.proto=e}return e.empty=function(){return new e({mapValue:{}})},e.prototype.field=function(e){if(e.m())return this.proto;for(var t=this.proto,n=0;n<e.length-1;++n){if(!t.mapValue.fields)return null;if(!pt(t=t.mapValue.fields[e.get(n)]))return null}return(t=(t.mapValue.fields||{})[e._()])||null},e.prototype.isEqual=function(e){return et(this.proto,e.proto)},e}(),Cn=function(){function e(e){void 0===e&&(e=In.empty()),this.Xe=e,this.Ze=new Map}return e.prototype.set=function(e,t){return this.tn(e,t),this},e.prototype.delete=function(e){return this.tn(e,null),this},e.prototype.tn=function(e,t){for(var n=this.Ze,r=0;r<e.length-1;++r){var i=e.get(r),o=n.get(i);o instanceof Map?n=o:o&&10===Ze(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(e._(),t)},e.prototype.Je=function(){var e=this.en(k.g(),this.Ze);return null!=e?new In(e):this.Xe},e.prototype.en=function(e,t){var n=this,r=!1,i=this.Xe.field(e),o=pt(i)?Object.assign({},i.mapValue.fields):{};return t.forEach((function(t,i){if(t instanceof Map){var a=n.en(e.child(i),t);null!=a&&(o[i]=a,r=!0)}else null!==t?(o[i]=t,r=!0):o.hasOwnProperty(i)&&(delete o[i],r=!0)})),r?{mapValue:{fields:o}}:null},e}();function kn(e){var t=[];return E(e.fields||{},(function(e,n){var r=new k([e]);if(pt(n)){var i=kn(n.mapValue).fields;if(0===i.length)t.push(r);else for(var o=0,a=i;o<a.length;o++){var s=a[o];t.push(r.child(s))}}else t.push(r)})),new an(t)}var xn=function(e,t){this.key=e,this.version=t},On=function(e){function t(t,n,r,i){var o=this;return(o=e.call(this,t,n)||this).nn=r,o.Ye=!!i.Ye,o.hasCommittedMutations=!!i.hasCommittedMutations,o}return r.__extends(t,e),t.prototype.field=function(e){return this.nn.field(e)},t.prototype.data=function(){return this.nn},t.prototype.sn=function(){return this.nn.proto},t.prototype.isEqual=function(e){return e instanceof t&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.Ye===e.Ye&&this.hasCommittedMutations===e.hasCommittedMutations&&this.nn.isEqual(e.nn)},t.prototype.toString=function(){return"Document("+this.key+", "+this.version+", "+this.nn.toString()+", {hasLocalMutations: "+this.Ye+"}), {hasCommittedMutations: "+this.hasCommittedMutations+"})"},Object.defineProperty(t.prototype,"hasPendingWrites",{get:function(){return this.Ye||this.hasCommittedMutations}
2,enumerable:!1,configurable:!0}),t}(xn),Nn=function(e){function t(t,n,r){var i=this;return(i=e.call(this,t,n)||this).hasCommittedMutations=!(!r||!r.hasCommittedMutations),i}return r.__extends(t,e),t.prototype.toString=function(){return"NoDocument("+this.key+", "+this.version+")"},Object.defineProperty(t.prototype,"hasPendingWrites",{get:function(){return this.hasCommittedMutations},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(e){return e instanceof t&&e.hasCommittedMutations===this.hasCommittedMutations&&e.version.isEqual(this.version)&&e.key.isEqual(this.key)},t}(xn),An=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.toString=function(){return"UnknownDocument("+this.key+", "+this.version+")"},Object.defineProperty(t.prototype,"hasPendingWrites",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(e){return e instanceof t&&e.version.isEqual(this.version)&&e.key.isEqual(this.key)},t}(xn),Pn=function(e,t,n,r,i,o,a,s){void 0===t&&(t=null),void 0===n&&(n=[]),void 0===r&&(r=[]),void 0===i&&(i=null),void 0===o&&(o="F"),void 0===a&&(a=null),void 0===s&&(s=null),this.path=e,this.collectionGroup=t,this.rn=n,this.filters=r,this.limit=i,this.on=o,this.startAt=a,this.endAt=s,this.an=null,this.cn=null,this.startAt,this.endAt};function Rn(e,t,n,r,i,o,a,s){return new Pn(e,t,n,r,i,o,a,s)}function Dn(e){return new Pn(e)}function Ln(e){return!ce(e.limit)&&"F"===e.on}function Mn(e){return!ce(e.limit)&&"L"===e.on}function jn(e){return e.rn.length>0?e.rn[0].field:null}function Fn(e){for(var t=0,n=e.filters;t<n.length;t++){var r=n[t];if(r.un())return r.field}return null}function Un(e){return null!==e.collectionGroup}function Vn(e){var t=_(e);if(null===t.an){t.an=[];var n=Fn(t),r=jn(t);if(null!==n&&null===r)n.p()||t.an.push(new cr(n)),t.an.push(new cr(k.v(),"asc"));else{for(var i=!1,o=0,a=t.rn;o<a.length;o++){var s=a[o];t.an.push(s),s.field.p()&&(i=!0)}if(!i){var u=t.rn.length>0?t.rn[t.rn.length-1].dir:"asc";t.an.push(new cr(k.v(),u))}}}return t.an}function qn(e){var t=_(e);if(!t.cn)if("F"===t.on)t.cn=pe(t.path,t.collectionGroup,Vn(t),t.filters,t.limit,t.startAt,t.endAt);else{for(var n=[],r=0,i=Vn(t);r<i.length;r++){var o=i[r],a="desc"===o.dir?"asc":"desc";n.push(new cr(o.field,a))}var s=t.endAt?new or(t.endAt.position,!t.endAt.before):null,u=t.startAt?new or(t.startAt.position,!t.startAt.before):null;t.cn=pe(t.path,t.collectionGroup,n,t.filters,t.limit,s,u)}return t.cn}function Bn(e,t,n){return new Pn(e.path,e.collectionGroup,e.rn.slice(),e.filters.slice(),t,n,e.startAt,e.endAt)}function zn(e,t){return new Pn(e.path,e.collectionGroup,e.rn.slice(),e.filters.slice(),e.limit,e.on,t,e.endAt)}function Wn(e,t){return new Pn(e.path,e.collectionGroup,e.rn.slice(),e.filters.slice(),e.limit,e.on,e.startAt,t)}function Hn(e,t){return ve(qn(e),qn(t))&&e.on===t.on}function Gn(e){return de(qn(e))+"|lt:"+e.on}function Kn(e){return"Query(target="+function(e){var t=e.path.R();return null!==e.collectionGroup&&(t+=" collectionGroup="+e.collectionGroup),e.filters.length>0&&(t+=", filters: ["+e.filters.map((function(e){return(t=e).field.R()+" "+t.op+" "+it(t.value);var t})).join(", ")+"]"),ce(e.limit)||(t+=", limit: "+e.limit),e.orderBy.length>0&&(t+=", orderBy: ["+e.orderBy.map((function(e){return(t=e).field.R()+" ("+t.dir+")";var t})).join(", ")+"]"),e.startAt&&(t+=", startAt: "+ar(e.startAt)),e.endAt&&(t+=", endAt: "+ar(e.endAt)),"Target("+t+")"}(qn(e))+"; limitType="+e.on+")"}function Qn(e,t){return function(e,t){var n=t.key.path;return null!==e.collectionGroup?t.key.N(e.collectionGroup)&&e.path.T(n):x.F(e.path)?e.path.isEqual(n):e.path.I(n)}(e,t)&&function(e,t){for(var n=0,r=e.rn;n<r.length;n++){var i=r[n];if(!i.field.p()&&null===t.field(i.field))return!1}return!0}(e,t)&&function(e,t){for(var n=0,r=e.filters;n<r.length;n++)if(!r[n].matches(t))return!1;return!0}(e,t)&&function(e,t){return!(e.startAt&&!sr(e.startAt,Vn(e),t))&&(!e.endAt||!sr(e.endAt,Vn(e),t))}(e,t)}function $n(e){return function(t,n){for(var r=!1,i=0,o=Vn(e);i<o.length;i++){var a=o[i],s=lr(a,t,n);if(0!==s)return s;r=r||a.field.p()}return 0}}var Yn=function(e){function t(t,n,r){var i=this;return(i=e.call(this)||this).field=t,i.op=n,i.value=r,i}return r.__extends(t,e),t.create=function(e,n,r){if(e.p())return"in"===n||"not-in"===n?this.hn(e,n,r):new Xn(e,n,r);if(ht(r)){if("=="!==n&&"!="!==n)throw new h(l.INVALID_ARGUMENT,"Invalid query. Null only supports '==' and '!=' comparisons.");return new t(e,n,r)}if(ft(r)){if("=="!==n&&"!="!==n)throw new h(l.INVALID_ARGUMENT,"Invalid query. NaN only supports '==' and '!=' comparisons.");return new t(e,n,r)}return"array-contains"===n?new tr(e,r):"in"===n?new nr(e,r):"not-in"===n?new rr(e,r):"array-contains-any"===n?new ir(e,r):new t(e,n,r)},t.hn=function(e,t,n){return"in"===t?new Jn(e,n):new Zn(e,n)},t.prototype.matches=function(e){var t=e.field(this.field);return"!="===this.op?null!==t&&this.ln(nt(t,this.value)):null!==t&&Ze(this.value)===Ze(t)&&this.ln(nt(t,this.value))},t.prototype.ln=function(e){switch(this.op){case"<":return e<0;case"<=":return e<=0;case"==":return 0===e;case"!=":return 0!==e;case">":return e>0;case">=":return e>=0;default:return m()}},t.prototype.un=function(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0},t}((function(){})),Xn=function(e){function t(t,n,r){var i=this;return(i=e.call(this,t,n,r)||this).key=x.C(r.referenceValue),i}return r.__extends(t,e),t.prototype.matches=function(e){var t=x.i(e.key,this.key);return this.ln(t)},t}(Yn),Jn=function(e){function t(t,n){var r=this;return(r=e.call(this,t,"in",n)||this).keys=er("in",n),r}return r.__extends(t,e),t.prototype.matches=function(e){return this.keys.some((function(t){return t.isEqual(e.key)}))},t}(Yn),Zn=function(e){function t(t,n){var r=this;return(r=e.call(this,t,"not-in",n)||this).keys=er("not-in",n),r}return r.__extends(t,e),t.prototype.matches=function(e){return!this.keys.some((function(t){return t.isEqual(e.key)}))},t}(Yn);function er(e,t){var n;return((null===(n=t.arrayValue)||void 0===n?void 0:n.values)||[]).map((function(e){return x.C(e.referenceValue)}))}var tr=function(e){function t(t,n){return e.call(this,t,"array-contains",n)||this}return r.__extends(t,e),t.prototype.matches=function(e){var t=e.field(this.field);return lt(t)&&tt(t.arrayValue,this.value)},t}(Yn),nr=function(e){function t(t,n){return e.call(this,t,"in",n)||this}return r.__extends(t,e),t.prototype.matches=function(e){var t=e.field(this.field);return null!==t&&tt(this.value.arrayValue,t)},t}(Yn),rr=function(e){function t(t,n){return e.call(this,t,"not-in",n)||this}return r.__extends(t,e),t.prototype.matches=function(e){if(tt(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;var t=e.field(this.field);return null!==t&&!tt(this.value.arrayValue,t)},t}(Yn),ir=function(e){function t(t,n){return e.call(this,t,"array-contains-any",n)||this}return r.__extends(t,e),t.prototype.matches=function(e){var t=this,n=e.field(this.field);return!(!lt(n)||!n.arrayValue.values)&&n.arrayValue.values.some((function(e){return tt(t.value.arrayValue,e)}))},t}(Yn),or=function(e,t){this.position=e,this.before=t};function ar(e){return(e.before?"b":"a")+":"+e.position.map((function(e){return it(e)})).join(",")}function sr(e,t,n){for(var r=0,i=0;i<e.position.length;i++){var o=t[i],a=e.position[i];if(r=o.field.p()?x.i(x.C(a.referenceValue),n.key):nt(a,n.field(o.field)),"desc"===o.dir&&(r*=-1),0!==r)break}return e.before?r<=0:r<0}function ur(e,t){if(null===e)return null===t;if(null===t)return!1;if(e.before!==t.before||e.position.length!==t.position.length)return!1;for(var n=0;n<e.position.length;n++)if(!et(e.position[n],t.position[n]))return!1;return!0}var cr=function(e,t){void 0===t&&(t="asc"),this.field=e,this.dir=t};function lr(e,t,n){var r=e.field.p()?x.i(t.key,n.key):function(e,t,n){var r=t.field(e),i=n.field(e);return null!==r&&null!==i?nt(r,i):m()}(e.field,t,n);switch(e.dir){case"asc":return r;case"desc":return-1*r;default:return m()}}function hr(e,t){return e.dir===t.dir&&e.field.isEqual(t.field)}var fr=function(){var e=this;this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))},pr=function(){function e(e,t,n,r,i){void 0===n&&(n=1e3),void 0===r&&(r=1.5),void 0===i&&(i=6e4),this._n=e,this.fn=t,this.dn=n,this.wn=r,this.mn=i,this.Tn=0,this.En=null,this.In=Date.now(),this.reset()}return e.prototype.reset=function(){this.Tn=0},e.prototype.An=function(){this.Tn=this.mn},e.prototype.Rn=function(e){var t=this;this.cancel();var n=Math.floor(this.Tn+this.Pn()),r=Math.max(0,Date.now()-this.In),i=Math.max(0,n-r);i>
20&&d("ExponentialBackoff","Backing off for "+i+" ms (base delay: "+this.Tn+" ms, delay with jitter: "+n+" ms, last attempt: "+r+" ms ago)"),this.En=this._n.gn(this.fn,i,(function(){return t.In=Date.now(),e()})),this.Tn*=this.wn,this.Tn<this.dn&&(this.Tn=this.dn),this.Tn>this.mn&&(this.Tn=this.mn)},e.prototype.yn=function(){null!==this.En&&(this.En.Vn(),this.En=null)},e.prototype.cancel=function(){null!==this.En&&(this.En.cancel(),this.En=null)},e.prototype.Pn=function(){return(Math.random()-.5)*this.Tn},e}(),dr=function(){function e(e){var t=this;this.pn=null,this.bn=null,this.result=void 0,this.error=void 0,this.vn=!1,this.Sn=!1,e((function(e){t.vn=!0,t.result=e,t.pn&&t.pn(e)}),(function(e){t.vn=!0,t.error=e,t.bn&&t.bn(e)}))}return e.prototype.catch=function(e){return this.next(void 0,e)},e.prototype.next=function(t,n){var r=this;return this.Sn&&m(),this.Sn=!0,this.vn?this.error?this.Dn(n,this.error):this.Cn(t,this.result):new e((function(e,i){r.pn=function(n){r.Cn(t,n).next(e,i)},r.bn=function(t){r.Dn(n,t).next(e,i)}}))},e.prototype.Nn=function(){var e=this;return new Promise((function(t,n){e.next(t,n)}))},e.prototype.Fn=function(t){try{var n=t();return n instanceof e?n:e.resolve(n)}catch(t){return e.reject(t)}},e.prototype.Cn=function(t,n){return t?this.Fn((function(){return t(n)})):e.resolve(n)},e.prototype.Dn=function(t,n){return t?this.Fn((function(){return t(n)})):e.reject(n)},e.resolve=function(t){return new e((function(e,n){e(t)}))}
2,e.reject=function(t){return new e((function(e,n){n(t)}))},e.$n=function(t){return new e((function(e,n){var r=0,i=0,o=!1;t.forEach((function(t){++r,t.next((function(){++i,o&&i===r&&e()}),(function(e){return n(e)}))})),o=!0,i===r&&e()}))},e.xn=function(t){for(var n=e.resolve(!1),r=function(t){n=n.next((function(n){return n?e.resolve(n):t()}))},i=0,o=t;i<o.length;i++)r(o[i]);return n},e.forEach=function(e,t){var n=this,r=[];return e.forEach((function(e,i){r.push(t.call(n,e,i))})),this.$n(r)},e}(),vr=function(){function t(e,n,r){this.name=e,this.version=n,this.kn=r,12.2===t.Mn(a.getUA())&&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 t.delete=function(e){return d("SimpleDb","Removing database:",e),wr(window.indexedDB.deleteDatabase(e)).Nn()},t.On=function(){if("undefined"==typeof indexedDB)return!1;if(t.Ln())return!0;var e=a.getUA(),n=t.Mn(e),r=0<n&&n<10,i=t.Bn(e),o=0<i&&i<4.5;return!(e.indexOf("MSIE ")>0||e.indexOf("Trident/")>0||e.indexOf("Edge/")>0||r||o)},t.Ln=function(){var t;return"undefined"!=typeof e&&"YES"===(null===(t=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}))||void 0===t?void 0:t.qn)},t.Un=function(e,t){return e.store(t)},t.Mn=function(e){var t=e.match(/i(?:phone|pad|pod) os ([\d_]+)/i),n=t?t[1].split("_").slice(0,2).join("."):"-1";return Number(n)},t.Bn=function(e){var t=e.match(/Android ([\d.]+)/i),n=t?t[1].split(".").slice(0,2).join("."):"-1";return Number(n)},t.prototype.Qn=function(){return r.__awaiter(this,void 0,void 0,(function(){var e,t=this;return r.__generator(this,(function(n){switch(n.label){case 0:return this.db?[3,2]:(d("SimpleDb","Opening database:",this.name),e=this,[4,new Promise((function(e,n){var r=indexedDB.open(t.name,t.version);r.onsuccess=function(t){var n=t.target.result;e(n)},r.onblocked=function(){n(new yr("Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},r.onerror=function(e){var t=e.target.error;"VersionError"===t.name?n(new h(l.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.")):n(new yr(t))},r.onupgradeneeded=function(e){d("SimpleDb",'Database "'+t.name+'" requires upgrade from version:',e.oldVersion);var n=e.target.result;t.kn.createOrUpgrade(n,r.transaction,e.oldVersion,t.version).next((function(){d("SimpleDb","Database upgrade to version "+t.version+" complete")}))}}))]);case 1:e.db=n.sent(),n.label=2;case 2:return[2,(this.Wn&&(this.db.onversionchange=function(e){return t.Wn(e)}),this.db)]}}))}))},t.prototype.jn=function(e){this.Wn=e,this.db&&(this.db.onversionchange=function(t){return e(t)})},t.prototype.runTransaction=function(e,t,n){return r.__awaiter(this,void 0,void 0,(function(){var i,o,a,s,u;return r.__generator(this,(function(c){switch(c.label){case 0:i="readonly"===e,o=0,a=function(){var e,a,u,c,l;return r.__generator(this,(function(r){switch(r.label){case 0:++o,r.label=1;case 1:return r.trys.push([1,4,,5]),[4,s.Qn()];case 2:return s.db=r.sent(),e=br.open(s.db,i?"readonly":"readwrite",t),a=n(e).catch((function(t){return e.abort(t),dr.reject(t)})).Nn(),u={},a.catch((function(){})),[4,e.Kn];case 3:return[2,(u.value=(r.sent(),a),u)];case 4:return c=r.sent(),l="FirebaseError"!==c.name&&o<3,d("SimpleDb","Transaction failed with error:",c.message,"Retrying:",l),s.close(),l?[3,5]:[2,{value:Promise.reject(c)}];case 5:return[2]}}
2))},s=this,c.label=1;case 1:return[5,a()];case 2:if("object"==typeof(u=c.sent()))return[2,u.value];c.label=3;case 3:return[3,1];case 4:return[2]}}))}))},t.prototype.close=function(){this.db&&this.db.close(),this.db=void 0},t}(),gr=function(){function e(e){this.Gn=e,this.zn=!1,this.Hn=null}return Object.defineProperty(e.prototype,"vn",{get:function(){return this.zn},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Yn",{get:function(){return this.Hn},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cursor",{set:function(e){this.Gn=e},enumerable:!1,configurable:!0}),e.prototype.done=function(){this.zn=!0},e.prototype.Jn=function(e){this.Hn=e},e.prototype.delete=function(){return wr(this.Gn.delete())},e}(),yr=function(e){function t(t){var n=this;return(n=e.call(this,l.UNAVAILABLE,"IndexedDB transaction failed: "+t)||this).name="IndexedDbTransactionError",n}return r.__extends(t,e),t}(h);function mr(e){return"IndexedDbTransactionError"===e.name}var br=function(){function e(e){var t=this;this.transaction=e,this.aborted=!1,this.Xn=new fr,this.transaction.oncomplete=function(){t.Xn.resolve()},this.transaction.onabort=function(){e.error?t.Xn.reject(new yr(e.error)):t.Xn.resolve()},this.transaction.onerror=function(e){var n=Tr(e.target.error);t.Xn.reject(new yr(n))}}return e.open=function(t,n,r){try{return new e(t.transaction(r,n))}catch(t){throw new yr(t)}},Object.defineProperty(e.prototype,"Kn",{get:function(){return this.Xn.promise},enumerable:!1,configurable:!0}),e.prototype.abort=function(e){e&&this.Xn.reject(e),this.aborted||(d("SimpleDb","Aborting transaction:",e?e.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())},e.prototype.store=function(e){var t=this.transaction.objectStore(e);return new _r(t)},e}(),_r=function(){function e(e){this.store=e}return e.prototype.put=function(e,t){var n;return void 0!==t?(d("SimpleDb","PUT",this.store.name,e,t),n=this.store.put(t,e)):(d("SimpleDb","PUT",this.store.name,"<auto-key>",e),n=this.store.put(e)),wr(n)},e.prototype.add=function(e){return d("SimpleDb","ADD",this.store.name,e,e),wr(this.store.add(e))},e.prototype.get=function(e){var t=this;return wr(this.store.get(e)).next((function(n){return void 0===n&&(n=null),d("SimpleDb","GET",t.store.name,e,n),n}))},e.prototype.delete=function(e){return d("SimpleDb","DELETE",this.store.name,e),wr(this.store.delete(e))},e.prototype.count=function(){return d("SimpleDb","COUNT",this.store.name),wr(this.store.count())},e.prototype.Zn=function(e,t){var n=this.cursor(this.options(e,t)),r=[];return this.ts(n,(function(e,t){r.push(t)})).next((function(){return r}))},e.prototype.es=function(e,t){d("SimpleDb","DELETE ALL",this.store.name);var n=this.options(e,t);n.ns=!1;var r=this.cursor(n);return this.ts(r,(function(e,t,n){return n.delete()}))},e.prototype.ss=function(e,t){var n;t?n=e:(n={},t=e);var r=this.cursor(n);return this.ts(r,t)},e.prototype.rs=function(e){var t=this.cursor({});return new dr((function(n,r){t.onerror=function(e){var t=Tr(e.target.error);r(t)},t.onsuccess=function(t){var r=t.target.result;r?e(r.primaryKey,r.value).next((function(e){e?r.continue():n()})):n()}}))},e.prototype.ts=function(e,t){var n=[];return new dr((function(r,i){e.onerror=function(e){i(e.target.error)},e.onsuccess=function(e){var i=e.target.result;if(i){var o=new gr(i),a=t(i.primaryKey,i.value,o);if(a instanceof dr){var s=a.catch((function(e){return o.done(),dr.reject(e)}));n.push(s)}o.vn?r():null===o.Yn?i.continue():i.continue(o.Yn)}else r()}})).next((function(){return dr.$n(n)}))},e.prototype.options=function(e,t){var n=void 0;return void 0!==e&&("string"==typeof e?n=e:t=e),{index:n,range:t}},e.prototype.cursor=function(e){var t="next";if(e.reverse&&(t="prev"),e.index){var n=this.store.index(e.index);return e.ns?n.openKeyCursor(e.range,t):n.openCursor(e.range,t)}return this.store.openCursor(e.range,t)},e}();function wr(e){return new dr((function(t,n){e.onsuccess=function(e){var n=e.target.result;t(n)},e.onerror=function(e){var t=Tr(e.target.error);n(t)}}))}var Er=!1;function Tr(e){var t=vr.Mn(a.getUA());if(t>=12.2&&t<13){var n="An internal error was encountered in the Indexed Database server";if(e.message.indexOf(n)>=0){var r=new h("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 Er||(Er=!0,setTimeout((function(){throw r}),0)),r}}return e}function Sr(){return"undefined"!=typeof window?window:null}function Ir(){return"undefined"!=typeof document?document:null}var Cr=function(){function e(e,t,n,r,i){this.os=e,this.fn=t,this.cs=n,this.op=r,this.us=i,this.hs=new fr,this.then=this.hs.promise.then.bind(this.hs.promise),this.hs.promise.catch((function(e){}))}return e.ls=function(t,n,r,i,o){var a=new e(t,n,Date.now()+r,i,o);return a.start(r),a},e.prototype.start=function(e){var t=this;this._s=setTimeout((function(){return t.fs()}),e)},e.prototype.Vn=function(){return this.fs()},e.prototype.cancel=function(e){null!==this._s&&(this.clearTimeout(),this.hs.reject(new h(l.CANCELLED,"Operation cancelled"+(e?": "+e:""))))},e.prototype.fs=function(){var e=this;this.os.ds((function(){return null!==e._s?(e.clearTimeout(),e.op().then((function(t){return e.hs.resolve(t)}))):Promise.resolve()}))},e.prototype.clearTimeout=function(){null!==this._s&&(this.us(this),clearTimeout(this._s),this._s=null)},e}(),kr=function(){function e(){var e=this;this.ws=Promise.resolve(),this.Ts=[],this.Es=!1,this.Is=[],this.As=null,this.Rs=!1,this.Ps=[],this.gs=new pr(this,"async_queue_retry"),this.ys=function(){var t=Ir();t&&d("AsyncQueue","Visibility state changed to ",t.visibilityState),e.gs.yn()};var t=Ir();t&&"function"==typeof t.addEventListener&&t.addEventListener("visibilitychange",this.ys)}return Object.defineProperty(e.prototype,"Vs",{get:function(){return this.Es}
2,enumerable:!1,configurable:!0}),e.prototype.ds=function(e){this.enqueue(e)},e.prototype.ps=function(e){this.bs(),this.vs(e)},e.prototype.Ss=function(){if(!this.Es){this.Es=!0;var e=Ir();e&&"function"==typeof e.removeEventListener&&e.removeEventListener("visibilitychange",this.ys)}},e.prototype.enqueue=function(e){return this.bs(),this.Es?new Promise((function(e){})):this.vs(e)},e.prototype.Ds=function(e){var t=this;this.Ts.push(e),this.ds((function(){return t.Cs()}))},e.prototype.Cs=function(){return r.__awaiter(this,void 0,void 0,(function(){var e,t=this;return r.__generator(this,(function(n){switch(n.label){case 0:if(0===this.Ts.length)return[3,5];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.Ts[0]()];case 2:return n.sent(),this.Ts.shift(),this.gs.reset(),[3,4];case 3:if(!mr(e=n.sent()))throw e;return d("AsyncQueue","Operation failed with retryable error: "+e),[3,4];case 4:this.Ts.length>0&&this.gs.Rn((function(){return t.Cs()})),n.label=5;case 5:return[2]}}))}))},e.prototype.vs=function(e){var t=this,n=this.ws.then((function(){return t.Rs=!0,e().catch((function(e){throw t.As=e,t.Rs=!1,v("INTERNAL UNHANDLED ERROR: ",function(e){var t=e.message||"";return e.stack&&(t=e.stack.includes(e.message)?e.stack:e.message+"\n"+e.stack),t}(e)),e})).then((function(e){return t.Rs=!1,e}))}));return this.ws=n,n},e.prototype.gn=function(e,t,n){var r=this;this.bs(),this.Ps.indexOf(e)>-1&&(t=0);var i=Cr.ls(this,e,t,n,(function(e){return r.Ns(e)}));return this.Is.push(i),i},e.prototype.bs=function(){this.As&&m()},e.prototype.Fs=function(){},e.prototype.$s=function(){return r.__awaiter(this,void 0,void 0,(function(){var e;return r.__generator(this,(function(t){switch(t.label){case 0:return[4,e=this.ws];case 1:t.sent(),t.label=2;case 2:if(e!==this.ws)return[3,0];t.label=3;case 3:return[2]}}
2))}))},e.prototype.xs=function(e){for(var t=0,n=this.Is;t<n.length;t++)if(n[t].fn===e)return!0;return!1},e.prototype.ks=function(e){var t=this;return this.$s().then((function(){t.Is.sort((function(e,t){return e.cs-t.cs}));for(var n=0,r=t.Is;n<r.length;n++){var i=r[n];if(i.Vn(),"all"!==e&&i.fn===e)break}return t.$s()}))},e.prototype.Ms=function(e){this.Ps.push(e)},e.prototype.Ns=function(e){var t=this.Is.indexOf(e);this.Is.splice(t,1)},e}();function xr(e,t){if(v("AsyncQueue",t+": "+e),mr(e))return new h(l.UNAVAILABLE,t+": "+e);throw e}var Or=function(){this.Os=void 0,this.listeners=[]},Nr=function(){this.Ls=new ae((function(e){return Gn(e)}),Hn),this.onlineState="Unknown",this.Bs=new Set};function Ar(e,t){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=_(e),i=t.query,o=!1,(a=n.Ls.get(i))||(o=!0,a=new Or),!o)return[3,4];r.label=1;case 1:return r.trys.push([1,3,,4]),s=a,[4,n.qs(i)];case 2:return s.Os=r.sent(),[3,4];case 3:return u=r.sent(),c=xr(u,"Initialization of query '"+Kn(t.query)+"' failed"),[2,void t.onError(c)];case 4:return n.Ls.set(i,a),a.listeners.push(t),t.Us(n.onlineState),a.Os&&t.Qs(a.Os)&&Lr(n),[2]}}))}))}function Pr(e,t){return r.__awaiter(this,void 0,void 0,(function(){var n,i,o,a,s;return r.__generator(this,(function(r){return n=_(e),i=t.query,o=!1,(a=n.Ls.get(i))&&(s=a.listeners.indexOf(t))>=0&&(a.listeners.splice(s,1),o=0===a.listeners.length),o?[2,(n.Ls.delete(i),n.Ws(i))]:[2]}))}))}function Rr(e,t){for(var n=_(e),r=!1,i=0,o=t;i<o.length;i++){var a=o[i],s=a.query,u=n.Ls.get(s);if(u){for(var c=0,l=u.listeners;c<l.length;c++)l[c].Qs(a)&&(r=!0);u.Os=a}}r&&Lr(n)}function Dr(e,t,n){var r=_(e),i=r.Ls.get(t);if(i)for(var o=0,a=i.listeners;o<a.length;o++)a[o].onError(n);r.Ls.delete(t)}function Lr(e){e.Bs.forEach((function(e){e.next()}))}var Mr=function(){function e(e,t,n){this.query=e,this.js=t,this.Ks=!1,this.Gs=null,this.onlineState="Unknown",this.options=n||{}}return e.prototype.Qs=function(e){if(!this.options.includeMetadataChanges){for(var t=[],n=0,r=e.docChanges;n<r.length;n++){var i=r[n];3!==i.type&&t.push(i)}e=new Ve(e.query,e.docs,e.Ut,t,e.Qt,e.fromCache,e.Wt,!0)}var o=!1;return this.Ks?this.zs(e)&&(this.js.next(e),o=!0):this.Hs(e,this.onlineState)&&(this.Ys(e),o=!0),this.Gs=e,o},e.prototype.onError=function(e){this.js.error(e)},e.prototype.Us=function(e){this.onlineState=e;var t=!1;return this.Gs&&!this.Ks&&this.Hs(this.Gs,e)&&(this.Ys(this.Gs),t=!0),t},e.prototype.Hs=function(e,t){if(!e.fromCache)return!0;var n="Offline"!==t;return!(this.options.Js&&n||e.docs.m()&&"Offline"!==t)},e.prototype.zs=function(e){if(e.docChanges.length>0)return!0;var t=this.Gs&&this.Gs.hasPendingWrites!==e.hasPendingWrites;return!(!e.Wt&&!t)&&!0===this.options.includeMetadataChanges},e.prototype.Ys=function(e){e=Ve.Kt(e.query,e.docs,e.Qt,e.fromCache),this.Ks=!0,this.js.next(e)},e}(),jr=function(){function e(e){this.uid=e}return e.prototype.Xs=function(){return null!=this.uid},e.prototype.Zs=function(){return this.Xs()?"uid:"+this.uid:"anonymous-user"},e.prototype.isEqual=function(e){return e.uid===this.uid},e}();jr.UNAUTHENTICATED=new jr(null),jr.ti=new jr("google-credentials-uid"),jr.ei=new jr("first-party-uid");var Fr=function(){function e(e,t){var n=this;this.previousValue=e,t&&(t.ni=function(e){return n.si(e)},this.ii=function(e){return t.ri(e)})}return e.prototype.si=function(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue},e.prototype.next=function(){var e=++this.previousValue;return this.ii&&this.ii(e),e},e}();function Ur(e,t){return"firestore_clients_"+e+"_"+t}function Vr(e,t,n){var r="firestore_mutations_"+e+"_"+n;return t.Xs()&&(r+="_"+t.uid),r}function qr(e,t){return"firestore_targets_"+e+"_"+t}Fr.oi=-1;var Br=function(){function e(e,t,n,r){this.user=e,this.batchId=t,this.state=n,this.error=r}return e.ai=function(t,n,r){var i=JSON.parse(r),o="object"==typeof i&&-1!==["pending","acknowledged","rejected"].indexOf(i.state)&&(void 0===i.error||"object"==typeof i.error),a=void 0;return o&&i.error&&(o="string"==typeof i.error.message&&"string"==typeof i.error.code)&&(a=new h(i.error.code,i.error.message)),o?new e(t,n,i.state,a):(v("SharedCl
2ientState","Failed to parse mutation state for ID '"+n+"': "+r),null)},e.prototype.ci=function(){var e={state:this.state,updateTimeMs:Date.now()};return this.error&&(e.error={code:this.error.code,message:this.error.message}),JSON.stringify(e)},e}(),zr=function(){function e(e,t,n){this.targetId=e,this.state=t,this.error=n}return e.ai=function(t,n){var r=JSON.parse(n),i="object"==typeof r&&-1!==["not-current","current","rejected"].indexOf(r.state)&&(void 0===r.error||"object"==typeof r.error),o=void 0;return i&&r.error&&(i="string"==typeof r.error.message&&"string"==typeof r.error.code)&&(o=new h(r.error.code,r.error.message)),i?new e(t,r.state,o):(v("SharedClientState","Failed to parse target state for ID '"+t+"': "+n),null)},e.prototype.ci=function(){var e={state:this.state,updateTimeMs:Date.now()};return this.error&&(e.error={code:this.error.code,message:this.error.message}),JSON.stringify(e)},e}(),Wr=function(){function e(e,t){this.clientId=e,this.activeTargetIds=t}return e.ai=function(t,n){for(var r=JSON.parse(n),i="object"==typeof r&&r.activeTargetIds instanceof Array,o=je(),a=0;i&&a<r.activeTargetIds.length;++a)i=he(r.activeTargetIds[a]),o=o.add(r.activeTargetIds[a]);return i?new e(t,o):(v("SharedClientState","Failed to parse client data for instance '"+t+"': "+n),null)},e}(),Hr=function(){function e(e,t){this.clientId=e,this.onlineState=t}return e.ai=function(t){var n=JSON.parse(t);return"object"==typeof n&&-1!==["Unknown","Online","Offline"].indexOf(n.onlineState)&&"string"==typeof n.clientId?new e(n.clientId,n.onlineState):(v("SharedClientState","Failed to parse online state: "+t),null)},e}(),Gr=function(){function e(){this.activeTargetIds=je()}return e.prototype.ui=function(e){this.activeTargetIds=this.activeTargetIds.add(e)},e.prototype.hi=function(e){this.activeTargetIds=this.activeTargetIds.delete(e)},e.prototype.ci=function(){var e={activeTargetIds:this.activeTargetIds.A(),updateTimeMs:Date.now()};return JSON.stringify(e)},e}(),Kr=function(){function e(e,t,n,r,i){this.window=e,this._n=t,this.persistenceKey=n,this.li=r,this._i=null,this.fi=null,this.ni=null,this.di=this.wi.bind(this),this.mi=new Te(Y),this.Ti=!1,this.Ei=[];var o=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");this.storage=this.window.localStorage,this.currentUser=i,this.Ii=Ur(this.persistenceKey,this.li),this.Ai=function(e){return"firestore_sequence_number_"+e}(this.persistenceKey),this.mi=this.mi.rt(this.li,new Gr),this.Ri=new RegExp("^firestore_clients_"+o+"_([^_]*)$"),this.Pi=new RegExp("^firestore_mutations_"+o+"_(\\d+)(?:_(.*))?$"),this.gi=new RegExp("^firestore_targets_"+o+"_(\\d+)$"),this.yi=function(e){return"firestore_online_state_"+e}(this.persistenceKey),this.window.addEventListener("storage",this.di)}return e.On=function(e){return!(!e||!e.localStorage)},e.prototype.start=function(){return r.__awaiter(this,void 0,void 0,(function(){var e,t,n,i,o,a,s,u,c,l,h,f=this;return r.__generator(this,(function(r){switch(r.label){case 0:return[4,this._i.Vi()];case 1:for(e=r.sent(),t=0,n=e;t<n.length;t++)(i=n[t])!==this.li&&(o=this.getItem(Ur(this.persistenceKey,i)))&&(a=Wr.ai(i,o))&&(this.mi=this.mi.rt(a.clientId,a));for(this.pi(),(s=this.storage.getItem(this.yi))&&(u=this.bi(s))&&this.vi(u),c=0,l=this.Ei;c<l.length;c++)h=l[c],this.wi(h);return this.Ei=[],this.window.addEventListener("unload",(function(){return f.Si()})),this.Ti=!0,[2]}}))}))},e.prototype.ri=function(e){this.setItem(this.Ai,JSON.stringify(e))},e.prototype.Di=function(){return this.Ci(this.mi)},e.prototype.Ni=function(e){var t=!1;return this.mi.forEach((function(n,r){r.activeTargetIds.has(e)&&(t=!0)})),t},e.prototype.Fi=function(e){this.$i(e,"pending")},e.prototype.xi=function(e,t,n){this.$i(e,t,n),this.ki(e)},e.prototype.Mi=function(e){var t="not-current";if(this.Ni(e)){var n=this.storage.getItem(qr(this.persistenceKey,e));if(n){var r=zr.ai(e,n);r&&(t=r.state)}}return this.Oi.ui(e),this.pi(),t},e.prototype.Li=function(e){this.Oi.hi(e),this.pi()},e.prototype.Bi=function(e){return this.Oi.activeTargetIds.has(e)},e.prototype.qi=function(e){this.removeItem(qr(this.persistenceKey,e))},e.prototype.Ui=function(e,t,n){this.Qi(e,t,n)},e.prototype.Wi=function(e,t,n){var r=this;t.forEach((function(e){r.ki(e)}
2)),this.currentUser=e,n.forEach((function(e){r.Fi(e)}))},e.prototype.ji=function(e){this.Ki(e)},e.prototype.Si=function(){this.Ti&&(this.window.removeEventListener("storage",this.di),this.removeItem(this.Ii),this.Ti=!1)},e.prototype.getItem=function(e){var t=this.storage.getItem(e);return d("SharedClientState","READ",e,t),t},e.prototype.setItem=function(e,t){d("SharedClientState","SET",e,t),this.storage.setItem(e,t)},e.prototype.removeItem=function(e){d("SharedClientState","REMOVE",e),this.storage.removeItem(e)},e.prototype.wi=function(e){var t=this,n=e;if(n.storageArea===this.storage){if(d("SharedClientState","EVENT",n.key,n.newValue),n.key===this.Ii)return void v("Received WebStorage notification for local change. Another client might have garbage-collected our state");this._n.Ds((function(){return r.__awaiter(t,void 0,void 0,(function(){var e,t,i,o,a,s;return r.__generator(this,(function(r){if(this.Ti){if(null!==n.key)if(this.Ri.test(n.key)){if(null==n.newValue)return e=this.Gi(n.key),[2,this.zi(e,null)];if(t=this.Hi(n.key,n.newValue))return[2,this.zi(t.clientId,t)]}else if(this.Pi.test(n.key)){if(null!==n.newValue&&(i=this.Yi(n.key,n.newValue)))return[2,this.Ji(i)]}else if(this.gi.test(n.key)){if(null!==n.newValue&&(o=this.Xi(n.key,n.newValue)))return[2,this.Zi(o)]}else if(n.key===this.yi){if(null!==n.newValue&&(a=this.bi(n.newValue)))return[2,this.vi(a)]}else n.key===this.Ai&&(s=function(e){var t=Fr.oi;if(null!=e)try{var n=JSON.parse(e);b("number"==typeof n),t=n}catch(e){v("SharedClientState","Failed to read sequence number from WebStorage",e)}return t}(n.newValue))!==Fr.oi&&this.ni(s)}else this.Ei.push(n);return[2]}))}))}))}},Object.defineProperty(e.prototype,"Oi",{get:function(){return this.mi.get(this.li)},enumerable:!1,configurable:!0}),e.prototype.pi=function(){this.setItem(this.Ii,this.Oi.ci())},e.prototype.$i=function(e,t,n){var r=new Br(this.currentUser,e,t,n),i=Vr(this.persistenceKey,this.currentUser,e);this.setItem(i,r.ci())},e.prototype.ki=function(e){var t=Vr(this.persistenceKey,this.currentUser,e);this.removeItem(t)},e.prototype.Ki=function(e){var t={clientId:this.li,onlineState:e};this.storage.setItem(this.yi,JSON.stringify(t))},e.prototype.Qi=function(e,t,n){var r=qr(this.persistenceKey,e),i=new zr(e,t,n);this.setItem(r,i.ci())},e.prototype.Gi=function(e){var t=this.Ri.exec(e);return t?t[1]:null},e.prototype.Hi=function(e,t){var n=this.Gi(e);return Wr.ai(n,t)},e.prototype.Yi=function(e,t){var n=this.Pi.exec(e),r=Number(n[1]),i=void 0!==n[2]?n[2]:null;return Br.ai(new jr(i),r,t)},e.prototype.Xi=function(e,t){var n=this.gi.exec(e),r=Number(n[1]);return zr.ai(r,t)},e.prototype.bi=function(e){return Hr.ai(e)},e.prototype.Ji=function(e){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(t){return e.user.uid===this.currentUser.uid?[2,this._i.tr(e.batchId,e.state,e.error)]:(d("SharedClientState","Ignoring mutation for non-active user "+e.user.uid),[2])}))}))},e.prototype.Zi=function(e){return this._i.er(e.targetId,e.state,e.error)},e.prototype.zi=function(e,t){var n=this,r=t?this.mi.rt(e,t):this.mi.remove(e),i=this.Ci(this.mi),o=this.Ci(r),a=[],s=[];return o.forEach((function(e){i.has(e)||a.push(e)})),i.forEach((function(e){o.has(e)||s.push(e)})),this._i.nr(a,s).then((function(){n.mi=r}))},e.prototype.vi=function(e){this.mi.get(e.clientId)&&this.fi(e.onlineState)},e.prototype.Ci=function(e){var t=je();return e.forEach((function(e,n){t=t.xt(n.activeTargetIds)})),t},e}(),Qr=function(){function e(){this.sr=new Gr,this.ir={},this.fi=null,this.ni=null}return e.prototype.Fi=function(e){},e.prototype.xi=function(e,t,n){},e.prototype.Mi=function(e){return this.sr.ui(e),this.ir[e]||"not-current"},e.prototype.Ui=function(e,t,n){this.ir[e]=t},e.prototype.Li=function(e){this.sr.hi(e)},e.prototype.Bi=function(e){return this.sr.activeTargetIds.has(e)},e.prototype.qi=function(e){delete this.ir[e]},e.prototype.Di=function(){return this.sr.activeTargetIds},e.prototype.Ni=function(e){return this.sr.activeTargetIds.has(e)},e.prototype.start=function(){return this.sr=new Gr,Promise.resolve()},e.prototype.Wi=function(e,t,n){},e.prototype.ji=function(e){},e.prototype.Si=function(){},e.prototype.ri=function(e){},e}(),$r=function(){function e(e,t,n,r){this.batchId=e,this.rr=t,this.baseMutations=n,this.mutations=r}return e.prototype.ar=function(e,t,n){for(var r=n.cr,i=0;i<this.mutations.length;i++){var o=this.mutations[i];o.key.isEqual(e)&&(t=fn(o,t,r[i]))}return t},e.prototype.ur=function(e,t){for(var n=0,r=this.baseMutations;n<r.length;n++){var i=r[n];i.key.isEqual(e)&&(t=pn(i,t,t,this.rr))}for(var o=t,a=0,s=this.mutations;a<s.length;a++){var u=s[a];u.key.isEqual(e)&&(t=pn(u,t,o,this.rr))}return t},e.prototype.hr=function(e){var t=this,n=e;return this.mutations.forEach((function(r){var i=t.ur(r.key,e.get(r.key));i&&(n=n.rt(r.key,i))})),n},e.prototype.keys=function(){return this.mutations.reduce((function(e,t){return e.add(t.key)}),Le())},e.prototype.isEqual=function(e){return this.batchId===e.batchId&&X(this.mutations,e.mutations,(function(e,t){return vn(e,t)}))&&X(this.baseMutations,e.baseMutations,(function(e,t){return vn(e,t)}))},e}(),Yr=function(){function e(e,t,n,r){this.batch=e,this.lr=t,this.cr=n,this._r=r}return e.from=function(t,n,r){b(t.mutations.length===r.length);for(var i=Re,o=t.mutations,a=0;a<o.length;
2a++)i=i.rt(o[a].key,r[a].version);return new e(t,n,r,i)},e}(),Xr=function(){function e(){this.dr=new ae((function(e){return e.toString()}),(function(e,t){return e.isEqual(t)})),this.wr=!1}return Object.defineProperty(e.prototype,"readTime",{get:function(){return this.mr},set:function(e){this.mr=e},enumerable:!1,configurable:!0}),e.prototype.Tr=function(e,t){this.Er(),this.readTime=t,this.dr.set(e.key,e)},e.prototype.Ir=function(e,t){this.Er(),t&&(this.readTime=t),this.dr.set(e,null)},e.prototype.Ar=function(e,t){this.Er();var n=this.dr.get(t);return void 0!==n?dr.resolve(n):this.Rr(e,t)},e.prototype.getEntries=function(e,t){return this.Pr(e,t)},e.prototype.apply=function(e){return this.Er(),this.wr=!0,this.gr(e)},e.prototype.Er=function(){},e}(),Jr="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.",Zr=function(){function e(){this.yr=[]}return e.prototype.Vr=function(e){this.yr.push(e)},e.prototype.pr=function(){this.yr.forEach((function(e){return e()}))},e}(),ei=function(){function e(e,t,n){this.br=e,this.vr=t,this.Sr=n}return e.prototype.Dr=function(e,t){var n=this;return this.vr.Cr(e,t).next((function(r){return n.Nr(e,t,r)}))},e.prototype.Nr=function(e,t,n){return this.br.Ar(e,t).next((function(e){for(var r=0,i=n;r<i.length;r++)e=i[r].ur(t,e);return e}))},e.prototype.Fr=function(e,t,n){var r=Ne();return t.forEach((function(e,t){for(var i=0,o=n;i<o.length;i++)t=o[i].ur(e,t);r=r.rt(e,t)})),r},e.prototype.$r=function(e,t){var n=this;return this.br.getEntries(e,t).next((function(t){return n.kr(e,t)}))},e.prototype.kr=function(e,t){var n=this;return this.vr.Mr(e,t).next((function(r){var i=n.Fr(e,t,r),o=Oe();return i.forEach((function(e,t){t||(t=new Nn(e,ue.min())),o=o.rt(e,t)})),o}))},e.prototype.Or=function(e,t,n){return function(e){return x.F(e.path)&&null===e.collectionGroup&&0===e.filters.length}(t)?this.Lr(e,t.path):Un(t)?this.Br(e,t,n):this.qr(e,t,n)},e.prototype.Lr=function(e,t){return this.Dr(e,new x(t)).next((function(e){var t=Pe();return e instanceof On&&(t=t.rt(e.key,e)),t}))},e.prototype.Br=function(e,t,n){var r=this,i=t.collectionGroup,o=Pe();return this.Sr.Ur(e,i).next((function(a){return dr.forEach(a,(function(a){var s=function(e,t){return new Pn(t,null,e.rn.slice(),e.filters.slice(),e.limit,e.on,e.startAt,e.endAt)}(t,a.child(i));return r.qr(e,s,n).next((function(e){e.forEach((function(e,t){o=o.rt(e,t)}))}))})).next((function(){return o}))}))},e.prototype.qr=function(e,t,n){var r,i,o=this;return this.br.Or(e,t,n).next((function(n){return r=n,o.vr.Qr(e,t)})).next((function(t){return i=t,o.Wr(e,i,r).next((function(e){r=e;for(var t=0,n=i;t<n.length;t++)for(var o=n[t],a=0,s=o.mutations;a<s.length;a++){var u=s[a],c=u.key,l=r.get(c),h=pn(u,l,l,o.rr);r=h instanceof On?r.rt(c,h):r.remove(c)}}))})).next((function(){return r.forEach((function(e,n){Qn(t,n)||(r=r.remove(e))})),r}))},e.prototype.Wr=function(e,t,n){for(var r=Le(),i=0,o=t;i<o.length;i++)for(var a=0,s=o[i].mutations;a<s.length;a++){var u=s[a];u instanceof mn&&null===n.get(u.key)&&(r=r.add(u.key))}var c=n;return this.br.getEntries(e,r).next((function(e){return e.forEach((function(e,t){null!==t&&t instanceof On&&(c=c.rt(e,t))})),c}))},e}(),ti=function(){function e(e,t,n,r){this.targetId=e,this.fromCache=t,this.jr=n,this.Kr=r}return e.Gr=function(t,n){for(var r=Le(),i=Le(),o=0,a=n.docChanges;o<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 e(t,n.fromCache,r,i)},e}();function ni(e,t){var n=e[0],r=e[1],i=t[0],o=t[1],a=Y(n,i);return 0===a?Y(r,o):a}var ri=function(){function e(e){this.zr=e,this.buffer=new Ce(ni),this.Hr=0}return e.prototype.Yr=function(){return++this.Hr},e.prototype.Jr=function(e){var t=[e,this.Yr()];if(this.buffer.size<this.zr)this.buffer=this.buffer.add(t);else{var n=this.buffer.last();ni(t,n)<0&&(this.buffer=this.buffer.delete(n).add(t))}},Object.defineProperty(e.prototype,"maxValue",{get:function(){return this.buffer.last()[0]},enumerable:!1,configurable:!0}),e}(),ii={Xr:!1,Zr:0,eo:0,no:0},oi=function(){function e(e,t,n){this.so=e,this.io=t,this.ro=n}return e.oo=function(t){return new e(t,e.ao,e.co)},e}();oi.uo=-1,oi.ho=1048576,oi.lo=41943040,oi.ao=10,oi.co=1e3,oi._o=new oi(oi.lo,oi.ao,oi.co),oi.fo=new oi(oi.uo,0,0);var ai=function(){function e(e,t){this.do=e,this.os=t,this.wo=!1,this.mo=null}return e.prototype.start=function(e){this.do.params.so!==oi.uo&&this.To(e)},e.prototype.stop=function(){this.mo&&(this.mo.cancel(),this.mo=null)},Object.defineProperty(e.prototype,"Ti",{get:function(){return null!==this.mo}
2,enumerable:!1,configurable:!0}),e.prototype.To=function(e){var t=this,n=this.wo?3e5:6e4;d("LruGarbageCollector","Garbage collection scheduled in "+n+"ms"),this.mo=this.os.gn("lru_garbage_collection",n,(function(){return r.__awaiter(t,void 0,void 0,(function(){var t;return r.__generator(this,(function(n){switch(n.label){case 0:this.mo=null,this.wo=!0,n.label=1;case 1:return n.trys.push([1,3,,7]),[4,e.Eo(this.do)];case 2:return n.sent(),[3,7];case 3:return mr(t=n.sent())?(d("LruGarbageCollector","Ignoring IndexedDB error during garbage collection: ",t),[3,6]):[3,4];case 4:return[4,To(t)];case 5:n.sent(),n.label=6;case 6:return[3,7];case 7:return[4,this.To(e)];case 8:return n.sent(),[2]}}))}))}))},e}(),si=function(){function e(e,t){this.Io=e,this.params=t}return e.prototype.Ao=function(e,t){return this.Io.Ro(e).next((function(e){return Math.floor(t/100*e)}))},e.prototype.Po=function(e,t){var n=this;if(0===t)return dr.resolve(Fr.oi);var r=new ri(t);return this.Io.De(e,(function(e){return r.Jr(e.sequenceNumber)})).next((function(){return n.Io.yo(e,(function(e){return r.Jr(e)}))})).next((function(){return r.maxValue}))},e.prototype.Vo=function(e,t,n){return this.Io.Vo(e,t,n)},e.prototype.po=function(e,t){return this.Io.po(e,t)},e.prototype.bo=function(e,t){var n=this;return this.params.so===oi.uo?(d("LruGarbageCollector","Garbage collection skipped; disabled"),dr.resolve(ii)):this.vo(e).next((function(r){return r<n.params.so?(d("LruGarbageCollector","Garbage collection skipped; Cache size "+r+" is lower than threshold "+n.params.so),ii):n.So(e,t)}))},e.prototype.vo=function(e){return this.Io.vo(e)},e.prototype.So=function(e,t){var n,r,i,a,s,u,c,l=this,h=Date.now();return this.Ao(e,this.params.io).next((function(t){return t>l.params.ro?(d("LruGarbageCollector","Capping sequence numbers to collect down to the maximum of "+l.params.ro+" from "+t),r=l.params.ro):r=t,a=Date.now(),l.Po(e,r)})).next((function(r){return n=r,s=Date.now(),l.Vo(e,n,t)})).next((function(t){return i=t,u=Date.now(),l.po(e,n)})).next((function(e){return c=Date.now(),p()<=o.LogLevel.DEBUG&&d("LruGarbageCollector","LRU Garbage Collection\n\tCounted targets in "+(a-h)+"ms\n\tDetermined least recently used "+r+" in "+(s-a)+"ms\n\tRemoved "+i+" targets in "+(u-s)+"ms\n\tRemoved "+e+" documents in "+(c-u)+"ms\nTotal Duration: "+(c-h)+"ms"),dr.resolve({Xr:!0,Zr:r,eo:i,no:e})}))},e}();function ui(e){for(var t="",n=0;n<e.length;n++)t.length>0&&(t=li(t)),t=ci(e.get(n),t);return li(t)}function ci(e,t){for(var n=t,r=e.length,i=0;i<r;i++){var o=e.charAt(i);switch(o){case"\0":n+="\x01\x10";break;case"\x01":n+="\x01\x11";break;default:n+=o}}return n}function li(e){return e+"\x01\x01"}function hi(e){var t=e.length;if(b(t>=2),2===t)return b("\x01"===e.charAt(0)&&"\x01"===e.charAt(1)),I.g();for(var n=t-2,r=[],i="",o=0;o<t;){var a=e.indexOf("\x01",o);switch((a<0||a>n)&&m(),e.charAt(a+1)){case"\x01":var s=e.substring(o,a),u=void 0;0===i.length?u=s:(u=i+=s,i=""),r.push(u);break;case"\x10":i+=e.substring(o,a),i+="\0";break;case"\x11":i+=e.substring(o,a+1);break;default:m()}o=a+2}return new I(r)}var fi=function(e){this.Do=e};function pi(e,t){if(t.document)return function(e,t,n){var r=kt(e,t.name),i=Tt(t.updateTime),o=new In({mapValue:{fields:t.fields}});return new On(r,i,o,{hasCommittedMutations:!!n})}(e.Do,t.document,!!t.hasCommittedMutations);if(t.noDocument){var n=x.$(t.noDocument.path),r=mi(t.noDocument.readTime);return new Nn(n,r,{hasCommittedMutations:!!t.hasCommittedMutations})}if(t.unknownDocument){var i=x.$(t.unknownDocument.path),o=mi(t.unknownDocument.version);return new An(i,o)}return m()}function di(e,t,n){var r=vi(n),i=t.key.path.h().A();
2if(t instanceof On){var o=function(e,t){return{name:Ct(e,t.key),fields:t.sn().mapValue.fields,updateTime:_t(e,t.version.X())}}(e.Do,t),a=t.hasCommittedMutations;return new zi(null,null,o,a,r,i)}if(t instanceof Nn){var s=t.key.path.A(),u=yi(t.version),c=t.hasCommittedMutations;return new zi(null,new qi(s,u),null,c,r,i)}if(t instanceof An){var l=t.key.path.A(),h=yi(t.version);return new zi(new Bi(l,h),null,null,!0,r,i)}return m()}function vi(e){var t=e.X();return[t.seconds,t.nanoseconds]}function gi(e){var t=new se(e[0],e[1]);return ue.Y(t)}function yi(e){var t=e.X();return new Mi(t.seconds,t.nanoseconds)}function mi(e){var t=new se(e.seconds,e.nanoseconds);return ue.Y(t)}function bi(e,t){var n=(t.baseMutations||[]).map((function(t){return Dt(e.Do,t)})),r=t.mutations.map((function(t){return Dt(e.Do,t)})),i=se.fromMillis(t.localWriteTimeMs);return new $r(t.batchId,i,n,r)}function _i(e){var t,n,r=mi(e.readTime),i=void 0!==e.lastLimboFreeSnapshotVersion?mi(e.lastLimboFreeSnapshotVersion):ue.min();return void 0!==e.query.documents?(b(1===(n=e.query).documents.length),t=qn(Dn(Ot(n.documents[0])))):t=function(e){var t=Ot(e.parent),n=e.structuredQuery,r=n.from?n.from.length:0,i=null;if(r>0){b(1===r);var o=n.from[0];o.allDescendants?i=o.collectionId:t=t.child(o.collectionId)}var a=[];n.where&&(a=function e(t){return t?void 0!==t.unaryFilter?[Wt(t)]:void 0!==t.fieldFilter?[zt(t)]:void 0!==t.compositeFilter?t.compositeFilter.filters.map((function(t){return e(t)})).reduce((function(e,t){return e.concat(t)})):m():[]}(n.where));var s=[];n.orderBy&&(s=n.orderBy.map((function(e){return function(e){return new cr(Bt(e.field),function(e){switch(e){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(e.direction))}(e)})));var u=null;n.limit&&(u=function(e){var t;return ce(t="object"==typeof e?e.value:e)?null:t}(n.limit));var c=null;n.startAt&&(c=Ft(n.startAt));var l=null;return n.endAt&&(l=Ft(n.endAt)),qn(Rn(t,i,s,a,u,"F",c,l))}(e.query),new be(t,e.targetId,0,e.lastListenSequenceNumber,r,i,Z.fromBase64String(e.resumeToken))}function wi(e,t){var n,r=yi(t.et),i=yi(t.lastLimboFreeSnapshotVersion);n=ge(t.target)?Lt(e.Do,t.target):Mt(e.Do,t.target);var o=t.resumeToken.toBase64();return new Hi(t.targetId,de(t.target),r,o,t.sequenceNumber,i,n)}var Ei=function(){function e(e,t,n,r){this.userId=e,this.serializer=t,this.Sr=n,this.Co=r,this.No={}}return e.Fo=function(t,n,r,i){return b(""!==t.uid),new e(t.Xs()?t.uid:"",n,r,i)},e.prototype.$o=function(e){var t=!0,n=IDBKeyRange.bound([this.userId,Number.NEGATIVE_INFINITY],[this.userId,Number.POSITIVE_INFINITY]);return Ii(e).ss({index:Ui.userMutationsIndex,range:n},(function(e,n,r){t=!1,r.done()})).next((function(){return t}))},e.prototype.xo=function(e,t,n,r){var i=this,o=Ci(e),a=Ii(e);return a.add({}).next((function(s){b("number"==typeof s);for(var u=new $r(s,t,n,r),c=function(e,t,n){var r=n.baseMutations.map((function(t){return Rt(e.Do,t)})),i=n.mutations.map((function(t){return Rt(e.Do,t)}));return new Ui(t,n.batchId,n.rr.toMillis(),r,i)}(i.serializer,i.userId,u),l=[],h=new Ce((function(e,t){return Y(e.R(),t.R())})),f=0,p=r;f<p.length;f++){var d=p[f],v=Vi.key(i.userId,d.key.path,s);h=h.add(d.key.path.h()),l.push(a.put(c)),l.push(o.put(v,Vi.PLACEHOLDER))}return h.forEach((function(t){l.push(i.Sr.ko(e,t))})),e.Vr((function(){i.No[s]=u.keys()})),dr.$n(l).next((function(){return u}))}))},e.prototype.Mo=function(e,t){var n=this;return Ii(e).get(t).next((function(e){return e?(b(e.userId===n.userId),bi(n.serializer,e)):null}))},e.prototype.Oo=function(e,t){var n=this;return this.No[t]?dr.resolve(this.No[t]):this.Mo(e,t).next((function(e){if(e){var r=e.keys();return n.No[t]=r,r}return null}))},e.prototype.Lo=function(e,t){var n=this,r=t+1,i=IDBKeyRange.lowerBound([this.userId,r]),o=null;return Ii(e).ss({index:Ui.userMutationsIndex,range:i},(function(e,t,i){t.userId===n.userId&&(b(t.batchId>=r),o=bi(n.serializer,t)),i.done()})).next((function(){return o}))},e.prototype.Bo=function(e){var t=IDBKeyRange.upperBound([this.userId,Number.POSITIVE_INFINITY]),n=-1;return Ii(e).ss({index:Ui.userMutationsIndex,range:t,reverse:!0},(function(e,t,r){n=t.batchId,r.done()})).next((function(){return n}))},e.prototype.qo=function(e){var t=this,n=IDBKeyRange.bound([this.userId,-1],[this.userId,Number.POSITIVE_INFINITY]);return Ii(e).Zn(Ui.userMutationsIndex,n).next((function(e){return e.map((function(e){return bi(t.serializer,e)}))}
2))},e.prototype.Cr=function(e,t){var n=this,r=Vi.prefixForPath(this.userId,t.path),i=IDBKeyRange.lowerBound(r),o=[];return Ci(e).ss({range:i},(function(r,i,a){var s=r[0],u=r[1],c=r[2],l=hi(u);if(s===n.userId&&t.path.isEqual(l))return Ii(e).get(c).next((function(e){if(!e)throw m();b(e.userId===n.userId),o.push(bi(n.serializer,e))}));a.done()})).next((function(){return o}))},e.prototype.Mr=function(e,t){var n=this,r=new Ce(Y),i=[];return t.forEach((function(t){var o=Vi.prefixForPath(n.userId,t.path),a=IDBKeyRange.lowerBound(o),s=Ci(e).ss({range:a},(function(e,i,o){var a=e[0],s=e[1],u=e[2],c=hi(s);a===n.userId&&t.path.isEqual(c)?r=r.add(u):o.done()}));i.push(s)})),dr.$n(i).next((function(){return n.Uo(e,r)}))},e.prototype.Qr=function(e,t){var n=this,r=t.path,i=r.length+1,o=Vi.prefixForPath(this.userId,r),a=IDBKeyRange.lowerBound(o),s=new Ce(Y);return Ci(e).ss({range:a},(function(e,t,o){var a=e[0],u=e[1],c=e[2],l=hi(u);a===n.userId&&r.T(l)?l.length===i&&(s=s.add(c)):o.done()})).next((function(){return n.Uo(e,s)}))},e.prototype.Uo=function(e,t){var n=this,r=[],i=[];return t.forEach((function(t){i.push(Ii(e).get(t).next((function(e){if(null===e)throw m();b(e.userId===n.userId),r.push(bi(n.serializer,e))})))})),dr.$n(i).next((function(){return r}))},e.prototype.Qo=function(e,t){var n=this;return Si(e.Wo,this.userId,t).next((function(r){return e.Vr((function(){n.jo(t.batchId)})),dr.forEach(r,(function(t){return n.Co.Ko(e,t)}))}))},e.prototype.jo=function(e){delete this.No[e]},e.prototype.Go=function(e){var t=this;return this.$o(e).next((function(n){if(!n)return dr.resolve();
2var r=IDBKeyRange.lowerBound(Vi.prefixForUser(t.userId)),i=[];return Ci(e).ss({range:r},(function(e,n,r){if(e[0]===t.userId){var o=hi(e[1]);i.push(o)}else r.done()})).next((function(){b(0===i.length)}))}))},e.prototype.zo=function(e,t){return Ti(e,this.userId,t)},e.prototype.Ho=function(e){var t=this;return ki(e).get(this.userId).next((function(e){return e||new Fi(t.userId,-1,"")}))},e}();function Ti(e,t,n){var r=Vi.prefixForPath(t,n.path),i=r[1],o=IDBKeyRange.lowerBound(r),a=!1;return Ci(e).ss({range:o,ns:!0},(function(e,n,r){var o=e[0],s=e[1];e[2],o===t&&s===i&&(a=!0),r.done()})).next((function(){return a}))}function Si(e,t,n){var r=e.store(Ui.store),i=e.store(Vi.store),o=[],a=IDBKeyRange.only(n.batchId),s=0,u=r.ss({range:a},(function(e,t,n){return s++,n.delete()}));o.push(u.next((function(){b(1===s)})));for(var c=[],l=0,h=n.mutations;l<h.length;l++){var f=h[l],p=Vi.key(t,f.key.path,n.batchId);o.push(i.delete(p)),c.push(f.key)}return dr.$n(o).next((function(){return c}))}function Ii(e){return so.Un(e,Ui.store)}function Ci(e){return so.Un(e,Vi.store)}function ki(e){return so.Un(e,Fi.store)}var xi=function(){function e(e,t){this.serializer=e,this.Sr=t}return e.prototype.Tr=function(e,t,n){return Ni(e).put(Ai(t),n)},e.prototype.Ir=function(e,t){var n=Ni(e),r=Ai(t);return n.delete(r)},e.prototype.updateMetadata=function(e,t){var n=this;return this.getMetadata(e).next((function(r){return r.byteSize+=t,n.Yo(e,r)}))},e.prototype.Ar=function(e,t){var n=this;return Ni(e).get(Ai(t)).next((function(e){return n.Jo(e)}))},e.prototype.Xo=function(e,t){var n=this;return Ni(e).get(Ai(t)).next((function(e){var t=n.Jo(e);return t?{Zo:t,size:Pi(e)}:null}))},e.prototype.getEntries=function(e,t){var n=this,r=Ne();return this.ta(e,t,(function(e,t){var i=n.Jo(t);r=r.rt(e,i)})).next((function(){return r}))},e.prototype.ea=function(e,t){var n=this,r=Ne(),i=new Te(x.i);return this.ta(e,t,(function(e,t){var o=n.Jo(t);o?(r=r.rt(e,o),i=i.rt(e,Pi(t))):(r=r.rt(e,null),i=i.rt(e,0))})).next((function(){return{na:r,sa:i}}))},e.prototype.ta=function(e,t,n){if(t.m())return dr.resolve();var r=IDBKeyRange.bound(t.first().path.A(),t.last().path.A()),i=t.lt(),o=i.Et();return Ni(e).ss({range:r},(function(e,t,r){for(var a=x.$(e);o&&x.i(o,a)<0;)n(o,null),o=i.Et();o&&o.isEqual(a)&&(n(o,t),o=i.It()?i.Et():null),o?r.Jn(o.path.A()):r.done()})).next((function(){for(;o;)n(o,null),o=i.It()?i.Et():null}))},e.prototype.Or=function(e,t,n){var r=this,i=Pe(),o=t.path.length+1,a={};if(n.isEqual(ue.min())){var s=t.path.A();a.range=IDBKeyRange.lowerBound(s)}else{var u=t.path.A(),c=vi(n);a.range=IDBKeyRange.lowerBound([u,c],!0),a.index=zi.collectionReadTimeIndex}return Ni(e).ss(a,(function(e,n,a){if(e.length===o){var s=pi(r.serializer,n);t.path.T(s.key.path)?s instanceof On&&Qn(t,s)&&(i=i.rt(s.key,s)):a.done()}})).next((function(){return i}))},e.prototype.ia=function(e,t){var n=this,r=Oe(),i=vi(t),o=Ni(e),a=IDBKeyRange.lowerBound(i,!0);return o.ss({index:zi.readTimeIndex,range:a},(function(e,t){var o=pi(n.serializer,t);r=r.rt(o.key,o),i=t.readTime})).next((function(){return{ra:r,readTime:gi(i)}}))},e.prototype.oa=function(e){var t=Ni(e),n=ue.min();return t.ss({index:zi.readTimeIndex,reverse:!0},(function(e,t,r){t.readTime&&(n=gi(t.readTime)),r.done()})).next((function(){return n}))},e.prototype.aa=function(t){return new e.ca(this,!!t&&t.ua)},e.prototype.ha=function(e){return this.getMetadata(e).next((function(e){return e.byteSize}))},e.prototype.getMetadata=function(e){return Oi(e).get(Wi.key).next((function(e){return b(!!e),e}))},e.prototype.Yo=function(e,t){return Oi(e).put(Wi.key,t)},e.prototype.Jo=function(e){if(e){var t=pi(this.serializer,e);return t instanceof Nn&&t.version.isEqual(ue.min())?null:t}return null},e}();function Oi(e){return so.Un(e,Wi.store)}function Ni(e){return so.Un(e,zi.store)}function Ai(e){return e.path.A()}function Pi(e){var t;if(e.document)t=e.document;else if(e.unknownDocument)t=e.unknownDocument;else{if(!e.noDocument)throw m();t=e.noDocument}return JSON.stringify(t).length}xi.ca=function(e){function t(t,n){var r=this;return(r=e.call(this)||this).la=t,r.ua=n,r._a=new ae((function(e){return e.toString()}),(function(e,t){return e.isEqual(t)})),r}return r.__extends(t,e),t.prototype.gr=function(e){var t=this,n=[],r=0,i=new Ce((function(e,t){return Y(e.R(),t.R())}));return this.dr.forEach((function(o,a){var s=t._a.get(o);
2if(a){var u=di(t.la.serializer,a,t.readTime);i=i.add(o.path.h());var c=Pi(u);r+=c-s,n.push(t.la.Tr(e,o,u))}else if(r-=s,t.ua){var l=di(t.la.serializer,new Nn(o,ue.min()),t.readTime);n.push(t.la.Tr(e,o,l))}else n.push(t.la.Ir(e,o))})),i.forEach((function(r){n.push(t.la.Sr.ko(e,r))})),n.push(this.la.updateMetadata(e,r)),dr.$n(n)},t.prototype.Rr=function(e,t){var n=this;return this.la.Xo(e,t).next((function(e){return null===e?(n._a.set(t,0),null):(n._a.set(t,e.size),e.Zo)}))},t.prototype.Pr=function(e,t){var n=this;return this.la.ea(e,t).next((function(e){var t=e.na;return e.sa.forEach((function(e,t){n._a.set(e,t)})),t}))},t}(Xr);var Ri=function(){function e(){this.fa=new Di}return e.prototype.ko=function(e,t){return this.fa.add(t),dr.resolve()},e.prototype.Ur=function(e,t){return dr.resolve(this.fa.getEntries(t))},e}(),Di=function(){function e(){this.index={}}return e.prototype.add=function(e){var t=e._(),n=e.h(),r=this.index[t]||new Ce(I.i),i=!r.has(n);return this.index[t]=r.add(n),i},e.prototype.has=function(e){var t=e._(),n=e.h(),r=this.index[t];return r&&r.has(n)},e.prototype.getEntries=function(e){return(this.index[e]||new Ce(I.i)).A()},e}(),Li=function(){function e(e){this.serializer=e}return e.prototype.createOrUpgrade=function(e,t,n,r){var i=this;b(n<r&&n>=0&&r<=10);var o=new br(t);n<1&&r>=1&&(function(e){e.createObjectStore(ji.store)}(e),function(e){e.createObjectStore(Fi.store,{keyPath:Fi.keyPath}),e.createObjectStore(Ui.store,{keyPath:Ui.keyPath,autoIncrement:!0}).createIndex(Ui.userMutationsIndex,Ui.userMutationsKeyPath,{unique:!0}),e.createObjectStore(Vi.store)}(e),$i(e),function(e){e.createObjectStore(zi.store)}(e));var a=dr.resolve();return n<3&&r>=3&&(0!==n&&(function(e){e.deleteObjectStore(Gi.store),e.deleteObjectStore(Hi.store),e.deleteObjectStore(Ki.store)}(e),$i(e)),a=a.next((function(){return function(e){var t=e.store(Ki.store),n=new Ki(0,0,ue.min().X(),0);return t.put(Ki.key,n)}(o)}))),n<4&&r>=4&&(0!==n&&(a=a.next((function(){return function(e,t){return t.store(Ui.store).Zn().next((function(n){e.deleteObjectStore(Ui.store),e.createObjectStore(Ui.store,{keyPath:Ui.keyPath,autoIncrement:!0}).createIndex(Ui.userMutationsIndex,Ui.userMutationsKeyPath,{unique:!0});var r=t.store(Ui.store),i=n.map((function(e){return r.put(e)}));return dr.$n(i)}))}(e,o)}))),a=a.next((function(){!function(e){e.createObjectStore(Yi.store,{keyPath:Yi.keyPath})}(e)}))),n<5&&r>=5&&(a=a.next((function(){return i.removeAcknowledgedMutations(o)}))),n<6&&r>=6&&(a=a.next((function(){return function(e){e.createObjectStore(Wi.store)}(e),i.addDocumentGlobal(o)}))),n<7&&r>=7&&(a=a.next((function(){return i.ensureSequenceNumbers(o)}))),n<8&&r>=8&&(a=a.next((function(){return i.createCollectionParentIndex(e,o)}))),n<9&&r>=9&&(a=a.next((function(){!function(e){e.objectStoreNames.contains("remoteDocumentChanges")&&e.deleteObjectStore("remoteDocumentChanges")}(e),function(e){var t=e.objectStore(zi.store);t.createIndex(zi.readTimeIndex,zi.readTimeIndexPath,{unique:!1}),t.createIndex(zi.collectionReadTimeIndex,zi.collectionReadTimeIndexPath,{unique:!1})}(t)}))),n<10&&r>=10&&(a=a.next((function(){return i.rewriteCanonicalIds(o)}))),a},e.prototype.addDocumentGlobal=function(e){var t=0;return e.store(zi.store).ss((function(e,n){t+=Pi(n)})).next((function(){var n=new Wi(t);return e.store(Wi.store).put(Wi.key,n)}))},e.prototype.removeAcknowledgedMutations=function(e){var t=this,n=e.store(Fi.store),r=e.store(Ui.store);return n.Zn().next((function(n){return dr.forEach(n,(function(n){var i=IDBKeyRange.bound([n.userId,-1],[n.userId,n.lastAcknowledgedBatchId]);return r.Zn(Ui.userMutationsIndex,i).next((function(r){return dr.forEach(r,(function(r){b(r.userId===n.userId);var i=bi(t.serializer,r);return Si(e,n.userId,i).next((function(){}))}))}))}))}))},e.prototype.ensureSequenceNumbers=function(e){var t=e.store(Gi.store),n=e.store(zi.store);return e.store(Ki.store).get(Ki.key).next((function(e){var r=[];return n.ss((function(n,i){var o=new I(n),a=function(e){return[0,ui(e)]}(o);r.push(t.get(a).next((function(n){return n?dr.resolve():function(n){return t.put(new Gi(0,ui(n),e.highestListenSequenceNumber))}(o)})))})).next((function(){return dr.$n(r)}))}
2))},e.prototype.createCollectionParentIndex=function(e,t){e.createObjectStore(Qi.store,{keyPath:Qi.keyPath});var n=t.store(Qi.store),r=new Di,i=function(e){if(r.add(e)){var t=e._(),i=e.h();return n.put({collectionId:t,parent:ui(i)})}};return t.store(zi.store).ss({ns:!0},(function(e,t){var n=new I(e);return i(n.h())})).next((function(){return t.store(Vi.store).ss({ns:!0},(function(e,t){e[0];var n=e[1],r=(e[2],hi(n));return i(r.h())}))}))},e.prototype.rewriteCanonicalIds=function(e){var t=this,n=e.store(Hi.store);return n.ss((function(e,r){var i=_i(r),o=wi(t.serializer,i);return n.put(o)}))},e}(),Mi=function(e,t){this.seconds=e,this.nanoseconds=t},ji=function(e,t,n){this.ownerId=e,this.allowTabSynchronization=t,this.leaseTimestampMs=n};ji.store="owner",ji.key="owner";var Fi=function(e,t,n){this.userId=e,this.lastAcknowledgedBatchId=t,this.lastStreamToken=n};Fi.store="mutationQueues",Fi.keyPath="userId";var Ui=function(e,t,n,r,i){this.userId=e,this.batchId=t,this.localWriteTimeMs=n,this.baseMutations=r,this.mutations=i};Ui.store="mutations",Ui.keyPath="batchId",Ui.userMutationsIndex="userMutationsIndex",Ui.userMutationsKeyPath=["userId","batchId"];var Vi=function(){function e(){}return e.prefixForUser=function(e){return[e]},e.prefixForPath=function(e,t){return[e,ui(t)]},e.key=function(e,t,n){return[e,ui(t),n]},e}();Vi.store="documentMutations",Vi.PLACEHOLDER=new Vi;var qi=function(e,t){this.path=e,this.readTime=t},Bi=function(e,t){this.path=e,this.version=t},zi=function(e,t,n,r,i,o){this.unknownDocument=e,this.noDocument=t,this.document=n,this.hasCommittedMutations=r,this.readTime=i,this.parentPath=o};zi.store="remoteDocuments",zi.readTimeIndex="readTimeIndex",zi.readTimeIndexPath="readTime",zi.collectionReadTimeIndex="collectionReadTimeIndex",zi.collectionReadTimeIndexPath=["parentPath","readTime"];var Wi=function(e){this.byteSize=e};Wi.store="remoteDocumentGlobal",Wi.key="remoteDocumentGlobalKey";var Hi=function(e,t,n,r,i,o,a){this.targetId=e,this.canonicalId=t,this.readTime=n,this.resumeToken=r,this.lastListenSequenceNumber=i,this.lastLimboFreeSnapshotVersion=o,this.query=a};Hi.store="targets",Hi.keyPath="targetId",Hi.queryTargetsIndexName="queryTargetsIndex",Hi.queryTargetsKeyPath=["canonicalId","targetId"];var Gi=function(e,t,n){this.targetId=e,this.path=t,this.sequenceNumber=n};Gi.store="targetDocuments",Gi.keyPath=["targetId","path"],Gi.documentTargetsIndex="documentTargetsIndex",Gi.documentTargetsKeyPath=["path","targetId"];var Ki=function(e,t,n,r){this.highestTargetId=e,this.highestListenSequenceNumber=t,this.lastRemoteSnapshotVersion=n,this.targetCount=r};Ki.key="targetGlobalKey",Ki.store="targetGlobal";var Qi=function(e,t){this.collectionId=e,this.parent=t};function $i(e){e.createObjectStore(Gi.store,{keyPath:Gi.keyPath}).createIndex(Gi.documentTargetsIndex,Gi.documentTargetsKeyPath,{unique:!0}),e.createObjectStore(Hi.store,{keyPath:Hi.keyPath}).createIndex(Hi.queryTargetsIndexName,Hi.queryTargetsKeyPath,{unique:!0}),e.createObjectStore(Ki.store)}Qi.store="collectionParents",Qi.keyPath=["collectionId","parent"];var Yi=function(e,t,n,r){this.clientId=e,this.updateTimeMs=t,this.networkEnabled=n,this.inForeground=r};Yi.store="clientMetadata",Yi.keyPath="clientId";var Xi=r.__spreadArrays(r.__spreadArrays(r.__spreadArrays([Fi.store,Ui.store,Vi.store,zi.store,Hi.store,ji.store,Ki.store,Gi.store],[Yi.store]),[Wi.store]),[Qi.store]),Ji=function(){function e(){this.da=new Di}return e.prototype.ko=function(e,t){var n=this;if(!this.da.has(t)){var r=t._(),i=t.h();e.Vr((function(){n.da.add(t)}));var o={collectionId:r,parent:ui(i)};return Zi(e).put(o)}return dr.resolve()},e.prototype.Ur=function(e,t){var n=[],r=IDBKeyRange.bound([t,""],[J(t),""],!1,!0);return Zi(e).Zn(r).next((function(e){for(var r=0,i=e;r<i.length;r++){var o=i[r];if(o.collectionId!==t)break;n.push(hi(o.parent))}return n}))},e}();function Zi(e){return so.Un(e,Qi.store)}var eo=function(){function e(e){this.wa=e}return e.prototype.next=function(){return this.wa+=2,this.wa},e.ma=function(){return new e(0)},e.Ta=function(){return new e(-1)},e}
2(),to=function(){function e(e,t){this.Co=e,this.serializer=t}return e.prototype.Ea=function(e){var t=this;return this.Ia(e).next((function(n){var r=new eo(n.highestTargetId);return n.highestTargetId=r.next(),t.Aa(e,n).next((function(){return n.highestTargetId}))}))},e.prototype.Ra=function(e){return this.Ia(e).next((function(e){return ue.Y(new se(e.lastRemoteSnapshotVersion.seconds,e.lastRemoteSnapshotVersion.nanoseconds))}))},e.prototype.Pa=function(e){return this.Ia(e).next((function(e){return e.highestListenSequenceNumber}))},e.prototype.ga=function(e,t,n){var r=this;return this.Ia(e).next((function(i){return i.highestListenSequenceNumber=t,n&&(i.lastRemoteSnapshotVersion=n.X()),t>i.highestListenSequenceNumber&&(i.highestListenSequenceNumber=t),r.Aa(e,i)}))},e.prototype.ya=function(e,t){var n=this;return this.Va(e,t).next((function(){return n.Ia(e).next((function(r){return r.targetCount+=1,n.pa(t,r),n.Aa(e,r)}))}))},e.prototype.ba=function(e,t){return this.Va(e,t)},e.prototype.va=function(e,t){var n=this;return this.Sa(e,t.targetId).next((function(){return no(e).delete(t.targetId)})).next((function(){return n.Ia(e)})).next((function(t){return b(t.targetCount>0),t.targetCount-=1,n.Aa(e,t)}))},e.prototype.Vo=function(e,t,n){var r=this,i=0,o=[];return no(e).ss((function(a,s){var u=_i(s);u.sequenceNumber<=t&&null===n.get(u.targetId)&&(i++,o.push(r.va(e,u)))})).next((function(){return dr.$n(o)})).next((function(){return i}))},e.prototype.De=function(e,t){return no(e).ss((function(e,n){var r=_i(n);t(r)}))},e.prototype.Ia=function(e){return ro(e).get(Ki.key).next((function(e){return b(null!==e),e}))},e.prototype.Aa=function(e,t){return ro(e).put(Ki.key,t)},e.prototype.Va=function(e,t){return no(e).put(wi(this.serializer,t))},e.prototype.pa=function(e,t){var n=!1;return e.targetId>t.highestTargetId&&(t.highestTargetId=e.targetId,n=!0),e.sequenceNumber>t.highestListenSequenceNumber&&(t.highestListenSequenceNumber=e.sequenceNumber,n=!0),n},e.prototype.Da=function(e){return this.Ia(e).next((function(e){return e.targetCount}))},e.prototype.Ca=function(e,t){var n=de(t),r=IDBKeyRange.bound([n,Number.NEGATIVE_INFINITY],[n,Number.POSITIVE_INFINITY]),i=null;return no(e).ss({range:r,index:Hi.queryTargetsIndexName},(function(e,n,r){var o=_i(n);ve(t,o.target)&&(i=o,r.done())})).next((function(){return i}))},e.prototype.Na=function(e,t,n){var r=this,i=[],o=io(e);return t.forEach((function(t){var a=ui(t.path);i.push(o.put(new Gi(n,a))),i.push(r.Co.Fa(e,n,t))})),dr.$n(i)},e.prototype.$a=function(e,t,n){var r=this,i=io(e);return dr.forEach(t,(function(t){var o=ui(t.path);return dr.$n([i.delete([n,o]),r.Co.xa(e,n,t)])}))},e.prototype.Sa=function(e,t){var n=io(e),r=IDBKeyRange.bound([t],[t+1],!1,!0);return n.delete(r)},e.prototype.ka=function(e,t){var n=IDBKeyRange.bound([t],[t+1],!1,!0),r=io(e),i=Le();return r.ss({range:n,ns:!0},(function(e,t,n){var r=hi(e[1]),o=new x(r);i=i.add(o)})).next((function(){return i}))},e.prototype.zo=function(e,t){var n=ui(t.path),r=IDBKeyRange.bound([n],[J(n)],!1,!0),i=0;return io(e).ss({index:Gi.documentTargetsIndex,ns:!0,range:r},(function(e,t,n){var r=e[0];e[1],0!==r&&(i++,n.done())})).next((function(){return i>0}))},e.prototype.qe=function(e,t){return no(e).get(t).next((function(e){return e?_i(e):null}))},e}();function no(e){return so.Un(e,Hi.store)}function ro(e){return so.Un(e,Ki.store)}function io(e){return so.Un(e,Gi.store)}var oo="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.",ao=function(e){function t(t,n){var r=this;return(r=e.call(this)||this).Wo=t,r.Ma=n,r}return r.__extends(t,e),t}(Zr),so=function(){function e(t,n,r,i,o,a,s,u,c,f){if(this.allowTabSynchronization=t,this.persistenceKey=n,this.clientId=r,this._n=o,this.window=a,this.document=s,this.Oa=c,this.La=f,this.Ba=null,this.qa=!1,this.isPrimary=!1,this.networkEnabled=!0,this.Ua=null,this.inForeground=!1,this.Qa=null,this.Wa=null,this.ja=Number.NEGATIVE_INFINITY,this.Ka=function(e){return Promise.resolve()}
2,!e.On())throw new h(l.UNIMPLEMENTED,"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");this.Co=new lo(this,i),this.Ga=n+"main",this.serializer=new fi(u),this.za=new vr(this.Ga,10,new Li(this.serializer)),this.Ha=new to(this.Co,this.serializer),this.Sr=new Ji,this.br=new xi(this.serializer,this.Sr),this.window&&this.window.localStorage?this.Ya=this.window.localStorage:(this.Ya=null,!1===f&&v("IndexedDbPersistence","LocalStorage is unavailable. As a result, persistence may not work reliably. In particular enablePersistence() could fail immediately after refreshing the page."))}return e.Un=function(e,t){if(e instanceof ao)return vr.Un(e.Wo,t);throw m()},e.prototype.start=function(){var e=this;return this.Ja().then((function(){if(!e.isPrimary&&!e.allowTabSynchronization)throw new h(l.FAILED_PRECONDITION,oo);return e.Xa(),e.Za(),e.tc(),e.runTransaction("getHighestListenSequenceNumber","readonly",(function(t){return e.Ha.Pa(t)}))})).then((function(t){e.Ba=new Fr(t,e.Oa)})).then((function(){e.qa=!0})).catch((function(t){return e.za&&e.za.close(),Promise.reject(t)}))},e.prototype.ec=function(e){var t=this;return this.Ka=function(n){return r.__awaiter(t,void 0,void 0,(function(){return r.__generator(this,(function(t){return this.Ti?[2,e(n)]:[2]}))}))},e(this.isPrimary)},e.prototype.nc=function(e){var t=this;this.za.jn((function(n){return r.__awaiter(t,void 0,void 0,(function(){return r.__generator(this,(function(t){switch(t.label){case 0:return null===n.newVersion?[4,e()]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}
2))}))}))},e.prototype.sc=function(e){var t=this;this.networkEnabled!==e&&(this.networkEnabled=e,this._n.ds((function(){return r.__awaiter(t,void 0,void 0,(function(){return r.__generator(this,(function(e){switch(e.label){case 0:return this.Ti?[4,this.Ja()]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}))}))})))},e.prototype.Ja=function(){var e=this;return this.runTransaction("updateClientMetadataAndTryBecomePrimary","readwrite",(function(t){return co(t).put(new Yi(e.clientId,Date.now(),e.networkEnabled,e.inForeground)).next((function(){if(e.isPrimary)return e.ic(t).next((function(t){t||(e.isPrimary=!1,e._n.Ds((function(){return e.Ka(!1)})))}))})).next((function(){return e.rc(t)})).next((function(n){return e.isPrimary&&!n?e.oc(t).next((function(){return!1})):!!n&&e.ac(t).next((function(){return!0}))}))})).catch((function(t){if(mr(t))return d("IndexedDbPersistence","Failed to extend owner lease: ",t),e.isPrimary;if(!e.allowTabSynchronization)throw t;return d("IndexedDbPersistence","Releasing owner lease after error during lease refresh",t),!1})).then((function(t){e.isPrimary!==t&&e._n.Ds((function(){return e.Ka(t)})),e.isPrimary=t}))},e.prototype.ic=function(e){var t=this;return uo(e).get(ji.key).next((function(e){return dr.resolve(t.cc(e))}))},e.prototype.uc=function(e){return co(e).delete(this.clientId)},e.prototype.hc=function(){return r.__awaiter(this,void 0,void 0,(function(){var t,n,i,o,a=this;return r.__generator(this,(function(r){switch(r.label){case 0:return!this.isPrimary||this.lc(this.ja,18e5)?[3,2]:(this.ja=Date.now(),[4,this.runTransaction("maybeGarbageCollectMultiClientState","readwrite-primary",(function(t){var n=e.Un(t,Yi.store);return n.Zn().next((function(e){var t=a._c(e,18e5),r=e.filter((function(e){return-1===t.indexOf(e)}));return dr.forEach(r,(function(e){return n.delete(e.clientId)})).next((function(){return r}))}))})).catch((function(){return[]}))]);case 1:if(t=r.sent(),this.Ya)for(n=0,i=t;n<i.length;n++)o=i[n],this.Ya.removeItem(this.fc(o.clientId));r.label=2;case 2:return[2]}}
2))}))},e.prototype.tc=function(){var e=this;this.Wa=this._n.gn("client_metadata_refresh",4e3,(function(){return e.Ja().then((function(){return e.hc()})).then((function(){return e.tc()}))}))},e.prototype.cc=function(e){return!!e&&e.ownerId===this.clientId},e.prototype.rc=function(e){var t=this;return this.La?dr.resolve(!0):uo(e).get(ji.key).next((function(n){if(null!==n&&t.lc(n.leaseTimestampMs,5e3)&&!t.dc(n.ownerId)){if(t.cc(n)&&t.networkEnabled)return!0;if(!t.cc(n)){if(!n.allowTabSynchronization)throw new h(l.FAILED_PRECONDITION,oo);return!1}}return!(!t.networkEnabled||!t.inForeground)||co(e).Zn().next((function(e){return void 0===t._c(e,5e3).find((function(e){if(t.clientId!==e.clientId){var n=!t.networkEnabled&&e.networkEnabled,r=!t.inForeground&&e.inForeground,i=t.networkEnabled===e.networkEnabled;if(n||r&&i)return!0}return!1}))}))})).next((function(e){return t.isPrimary!==e&&d("IndexedDbPersistence","Client "+(e?"is":"is not")+" eligible for a primary lease."),e}))},e.prototype.Si=function(){return r.__awaiter(this,void 0,void 0,(function(){var e=this;return r.__generator(this,(function(t){switch(t.label){case 0:return this.qa=!1,this.wc(),this.Wa&&(this.Wa.cancel(),this.Wa=null),this.mc(),this.Tc(),[4,this.za.runTransaction("readwrite",[ji.store,Yi.store],(function(t){var n=new ao(t,Fr.oi);return e.oc(n).next((function(){return e.uc(n)}))}))];case 1:return t.sent(),this.za.close(),this.Ec(),[2]}}))}))},e.prototype._c=function(e,t){var n=this;return e.filter((function(e){return n.lc(e.updateTimeMs,t)&&!n.dc(e.clientId)}))},e.prototype.Vi=function(){var e=this;return this.runTransaction("getActiveClients","readonly",(function(t){return co(t).Zn().next((function(t){return e._c(t,18e5).map((function(e){return e.clientId}))}))}))},Object.defineProperty(e.prototype,"Ti",{get:function(){return this.qa},enumerable:!1,configurable:!0}),e.prototype.Ic=function(e){return Ei.Fo(e,this.serializer,this.Sr,this.Co)},e.prototype.Ac=function(){return this.Ha},e.prototype.Rc=function(){return this.br},e.prototype.Pc=function(){return this.Sr},e.prototype.runTransaction=function(e,t,n){var r=this;d("IndexedDbPersistence","Starting transaction:",e);var i,o="readonly"===t?"readonly":"readwrite";return this.za.runTransaction(o,Xi,(function(o){return i=new ao(o,r.Ba?r.Ba.next():Fr.oi),"readwrite-primary"===t?r.ic(i).next((function(e){return!!e||r.rc(i)})).next((function(t){if(!t)throw v("Failed to obtain primary lease for action '"+e+"'."),r.isPrimary=!1,r._n.Ds((function(){return r.Ka(!1)})),new h(l.FAILED_PRECONDITION,Jr);return n(i)})).next((function(e){return r.ac(i).next((function(){return e}))})):r.gc(i).next((function(){return n(i)}))})).then((function(e){return i.pr(),e}))},e.prototype.gc=function(e){var t=this;return uo(e).get(ji.key).next((function(e){if(null!==e&&t.lc(e.leaseTimestampMs,5e3)&&!t.dc(e.ownerId)&&!t.cc(e)&&!(t.La||t.allowTabSynchronization&&e.allowTabSynchronization))throw new h(l.FAILED_PRECONDITION,oo)}))},e.prototype.ac=function(e){var t=new ji(this.clientId,this.allowTabSynchronization,Date.now());return uo(e).put(ji.key,t)},e.On=function(){return vr.On()},e.prototype.oc=function(e){var t=this,n=uo(e);return n.get(ji.key).next((function(e){return t.cc(e)?(d("IndexedDbPersistence","Releasing primary lease."),n.delete(ji.key)):dr.resolve()}))},e.prototype.lc=function(e,t){var n=Date.now();return!(e<n-t||e>n&&(v("Detected an update time that is in the future: "+e+" > "+n),1))},e.prototype.Xa=function(){var e=this;null!==this.document&&"function"==typeof this.document.addEventListener&&(this.Qa=function(){e._n.ds((function(){return e.inForeground="visible"===e.document.visibilityState,e.Ja()}))},this.document.addEventListener("visibilitychange",this.Qa),this.inForeground="visible"===this.document.visibilityState)},e.prototype.mc=function(){this.Qa&&(this.document.removeEventListener("visibilitychange",this.Qa),this.Qa=null)},e.prototype.Za=function(){var e,t=this;"function"==typeof(null===(e=this.window)||void 0===e?void 0:e.addEventListener)&&(this.Ua=function(){t.wc(),t._n.ds((function(){return t.Si()}))},this.window.addEventListener("unload",this.Ua))},e.prototype.Tc=function(){this.Ua&&(this.window.removeEventListener("unload",this.Ua),this.Ua=null)},e.prototype.dc=function(e){var t;try{var n=null!==(null===(t=this.Ya)||void 0===t?void 0:t.getItem(this.fc(e)));return d("IndexedDbPersistence","Client '"+e+"' "+(n?"is":"is not")+" zombied in LocalStorage"),n}catch(e){return v("IndexedDbPersistence","Failed to get zombied client id.",e),!1}},e.prototype.wc=function(){if(this.Ya)try{this.Ya.setItem(this.fc(this.clientId),String(Date.now()))}catch(r){v("Failed to set zombie client id.",r)}},e.prototype.Ec=function(){if(this.Ya)try{this.Ya.removeItem(this.fc(this.clientId))}catch(r){}},e.prototype.fc=function(e){return"firestore_zombie_"+this.persistenceKey+"_"+e},e}();function uo(e){return so.Un(e,ji.store)}function co(e){return so.Un(e,Yi.store)}var lo=function(){function e(e,t){this.db=e,this.do=new si(this,t)}return e.prototype.Ro=function(e){var t=this.yc(e);return this.db.Ac().Da(e).next((function(e){return t.next((function(t){return e+t}))}))},e.prototype.yc=function(e){var t=0;return this.yo(e,(function(e){t++})).next((function(){return t}))},e.prototype.De=function(e,t){return this.db.Ac().De(e,t)},e.prototype.yo=function(e,t){return this.Vc(e,(function(e,n){return t(n)}))},e.prototype.Fa=function(e,t,n){return ho(e,n)},e.prototype.xa=function(e,t,n){return ho(e,n)},e.prototype.Vo=function(e,t,n){return this.db.Ac().Vo(e,t,n)},e.prototype.Ko=function(e,t){return ho(e,t)},e.prototype.bc=function(e,t){return function(e,t){var n=!1;return ki(e).rs((function(r){return Ti(e,r,t).next((function(e){return e&&(n=!0),dr.resolve(!e)}))})).next((function(){return n}))}(e,t)},e.prototype.po=function(e,t){var n=this,r=this.db.Rc().aa(),i=[],o=0;return this.Vc(e,(function(a,s){if(s<=t){var u=n.bc(e,a).next((function(t){if(!t)return o++,r.Ar(e,a).next((function(){return r.Ir(a),io(e).delete([0,ui(a.path)])}))}));i.push(u)}})).next((function(){return dr.$n(i)})).next((function(){return r.apply(e)})).next((function(){return o}
2))},e.prototype.removeTarget=function(e,t){var n=t.nt(e.Ma);return this.db.Ac().ba(e,n)},e.prototype.vc=function(e,t){return ho(e,t)},e.prototype.Vc=function(e,t){var n,r=io(e),i=Fr.oi;return r.ss({index:Gi.documentTargetsIndex},(function(e,r){var o=e[0],a=(e[1],r.path),s=r.sequenceNumber;0===o?(i!==Fr.oi&&t(new x(hi(n)),i),i=s,n=a):i=Fr.oi})).next((function(){i!==Fr.oi&&t(new x(hi(n)),i)}))},e.prototype.vo=function(e){return this.db.Rc().ha(e)},e}();function ho(e,t){return io(e).put(function(e,t){return new Gi(0,ui(e.path),t)}(t,e.Ma))}function fo(e,t){var n=e.projectId;return e.W||(n+="."+e.database),"firestore/"+t+"/"+n+"/"}var po=function(){function e(e,t,n){this.persistence=e,this.Sc=t,this.Dc=new Te(Y),this.Cc=new ae((function(e){return de(e)}),ve),this.Nc=ue.min(),this.vr=e.Ic(n),this.Fc=e.Rc(),this.Ha=e.Ac(),this.$c=new ei(this.Fc,this.vr,this.persistence.Pc()),this.Sc.xc(this.$c)}return e.prototype.Eo=function(e){var t=this;return this.persistence.runTransaction("Collect garbage","readwrite-primary",(function(n){return e.bo(n,t.Dc)}))},e}();function vo(e,t){var n=_(e);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",(function(e){var r=t.batch.keys(),i=n.Fc.aa({ua:!0});return function(e,t,n,r){var i=n.batch,o=i.keys(),a=dr.resolve();return o.forEach((function(e){a=a.next((function(){return r.Ar(t,e)})).next((function(t){var o=t,a=n._r.get(e);b(null!==a),(!o||o.version.L(a)<0)&&(o=i.ar(e,o,n))&&r.Tr(o,n.lr)}))})),a.next((function(){return e.vr.Qo(t,i)}))}(n,e,t,i).next((function(){return i.apply(e)})).next((function(){return n.vr.Go(e)})).next((function(){return n.$c.$r(e,r)}))}))}function go(e){var t=_(e);return t.persistence.runTransaction("Get last remote snapshot version","readonly",(function(e){return t.Ha.Ra(e)}))}function yo(e,t){var n=_(e),r=t.et,i=n.Dc;return n.persistence.runTransaction("Apply remote event","readwrite-primary",(function(e){var o=n.Fc.aa({ua:!0});i=n.Dc;var a=[];t.Gt.forEach((function(t,o){var s=i.get(o);if(s){a.push(n.Ha.$a(e,t.ne,o).next((function(){return n.Ha.Na(e,t.te,o)})));var u=t.resumeToken;if(u.O()>0){var c=s.st(u,r).nt(e.Ma);i=i.rt(o,c),function(e,t,n){return b(t.resumeToken.O()>0),0===e.resumeToken.O()||t.et.J()-e.et.J()>=3e8||n.te.size+n.ee.size+n.ne.size>0}(s,c,t)&&a.push(n.Ha.ba(e,c))}}}));var s=Oe(),u=Le();if(t.Ht.forEach((function(e,t){u=u.add(e)})),a.push(o.getEntries(e,u).next((function(i){t.Ht.forEach((function(u,c){var l=i.get(u);c instanceof Nn&&c.version.isEqual(ue.min())?(o.Ir(u,r),s=s.rt(u,c)):null==l||c.version.L(l.version)>0||0===c.version.L(l.version)&&l.hasPendingWrites?(o.Tr(c,r),s=s.rt(u,c)):d("LocalStore","Ignoring outdated watch update for ",u,". Current version:",l.version," Watch version:",c.version),t.Yt.has(u)&&a.push(n.persistence.Co.vc(e,u))}))}))),!r.isEqual(ue.min())){var c=n.Ha.Ra(e).next((function(t){return n.Ha.ga(e,e.Ma,r)}));a.push(c)}return dr.$n(a).next((function(){return o.apply(e)})).next((function(){return n.$c.kr(e,s)}))})).then((function(e){return n.Dc=i,e}))}function mo(e,t){var n=_(e);return n.persistence.runTransaction("Get next mutation batch","readonly",(function(e){return void 0===t&&(t=-1),n.vr.Lo(e,t)}))}function bo(e,t){var n=_(e);return n.persistence.runTransaction("Allocate target","readwrite",(function(e){var r;return n.Ha.Ca(e,t).next((function(i){return i?(r=i,dr.resolve(r)):n.Ha.Ea(e).next((function(i){return r=new be(t,i,0,e.Ma),n.Ha.ya(e,r).next((function(){return r}))}))}))})).then((function(e){var r=n.Dc.get(e.targetId);return(null===r||e.et.L(r.et)>0)&&(n.Dc=n.Dc.rt(e.targetId,e),n.Cc.set(t,e.targetId)),e}))}function _o(e,t,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=_(e),o=i.Dc.get(t),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(e){return i.persistence.Co.removeTarget(e,o)}))];case 2:r.sent(),r.label=3;case 3:return[3,5];case 4:if(!mr(s=r.sent()))throw s;return d("LocalStore","Failed to update sequence numbers for target "+t+": "+s),[3,5];case 5:return i.Dc=i.Dc.remove(t),i.Cc.delete(o.target),[2]}}))}))}function wo(e,t,n){var r=_(e),i=ue.min(),o=Le();
2return r.persistence.runTransaction("Execute query","readonly",(function(e){return function(e,t,n){var r=_(e),i=r.Cc.get(n);return void 0!==i?dr.resolve(r.Dc.get(i)):r.Ha.Ca(t,n)}(r,e,qn(t)).next((function(t){if(t)return i=t.lastLimboFreeSnapshotVersion,r.Ha.ka(e,t.targetId).next((function(e){o=e}))})).next((function(){return r.Sc.Or(e,t,n?i:ue.min(),n?o:Le())})).next((function(e){return{documents:e,kc:o}}))}))}function Eo(e,t){var n=_(e),r=_(n.Ha),i=n.Dc.get(t);return i?Promise.resolve(i.target):n.persistence.runTransaction("Get target data","readonly",(function(e){return r.qe(e,t).next((function(e){return e?e.target:null}))}))}function To(e){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(t){if(e.code!==l.FAILED_PRECONDITION||e.message!==Jr)throw e;return d("LocalStore","Unexpectedly lost primary lease"),[2]}))}))}var So=function(){function e(){this.Mc=new Ce(Io.Oc),this.Lc=new Ce(Io.Bc)}return e.prototype.m=function(){return this.Mc.m()},e.prototype.Fa=function(e,t){var n=new Io(e,t);this.Mc=this.Mc.add(n),this.Lc=this.Lc.add(n)},e.prototype.qc=function(e,t){var n=this;e.forEach((function(e){return n.Fa(e,t)}))},e.prototype.xa=function(e,t){this.Uc(new Io(e,t))},e.prototype.Qc=function(e,t){var n=this;e.forEach((function(e){return n.xa(e,t)}))},e.prototype.Wc=function(e){var t=this,n=new x(new I([])),r=new Io(n,e),i=new Io(n,e+1),o=[];return this.Lc.Nt([r,i],(function(e){t.Uc(e),o.push(e.key)})),o},e.prototype.jc=function(){var e=this;this.Mc.forEach((function(t){return e.Uc(t)}))},e.prototype.Uc=function(e){this.Mc=this.Mc.delete(e),this.Lc=this.Lc.delete(e)},e.prototype.Kc=function(e){var t=new x(new I([])),n=new Io(t,e),r=new Io(t,e+1),i=Le();return this.Lc.Nt([n,r],(function(e){i=i.add(e.key)})),i},e.prototype.zo=function(e){var t=new Io(e,0),n=this.Mc.$t(t);return null!==n&&e.isEqual(n.key)},e}(),Io=function(){function e(e,t){this.key=e,this.Gc=t}return e.Oc=function(e,t){return x.i(e.key,t.key)||Y(e.Gc,t.Gc)},e.Bc=function(e,t){return Y(e.Gc,t.Gc)||x.i(e.key,t.key)},e}(),Co=function(e,t){this.user=t,this.type="OAuth",this.zc={},this.zc.Authorization="Bearer "+e},ko=function(){function e(){this.Hc=null}return e.prototype.getToken=function(){return Promise.resolve(null)},e.prototype.Yc=function(){},e.prototype.Jc=function(e){this.Hc=e,e(jr.UNAUTHENTICATED)},e.prototype.Xc=function(){this.Hc=null},e}(),xo=function(){function e(e){var t=this;this.Zc=null,this.currentUser=jr.UNAUTHENTICATED,this.tu=!1,this.eu=0,this.Hc=null,this.forceRefresh=!1,this.Zc=function(){t.eu++,t.currentUser=t.nu(),t.tu=!0,t.Hc&&t.Hc(t.currentUser)},this.eu=0,this.auth=e.getImmediate({optional:!0}),this.auth?this.auth.addAuthTokenListener(this.Zc):(this.Zc(null),e.get().then((function(e){t.auth=e,t.Zc&&t.auth.addAuthTokenListener(t.Zc)}),(function(){})))}return e.prototype.getToken=function(){var e=this,t=this.eu,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then((function(n){return e.eu!==t?(d("FirebaseCredentialsProvider","getToken aborted due to token change."),e.getToken()):n?(b("string"==typeof n.accessToken),new Co(n.accessToken,e.currentUser)):null})):Promise.resolve(null)},e.prototype.Yc=function(){this.forceRefresh=!0},e.prototype.Jc=function(e){this.Hc=e,this.tu&&e(this.currentUser)},e.prototype.Xc=function(){this.auth&&this.auth.removeAuthTokenListener(this.Zc),this.Zc=null,this.Hc=null},e.prototype.nu=function(){var e=this.auth&&this.auth.getUid();return b(null===e||"string"==typeof e),new jr(e)},e}(),Oo=function(){function e(e,t){this.su=e,this.iu=t,this.type="FirstParty",this.user=jr.ei}return Object.defineProperty(e.prototype,"zc",{get:function(){var e={"X-Goog-AuthUser":this.iu},t=this.su.auth.getAuthHeaderValueForFirstParty([]);return t&&(e.Authorization=t),e},enumerable:!1,configurable:!0}),e}(),No=function(){function e(e,t){this.su=e,this.iu=t}return e.prototype.getToken=function(){return Promise.resolve(new Oo(this.su,this.iu))},e.prototype.Jc=function(e){e(jr.ei)},e.prototype.Xc=function(){},e.prototype.Yc=function(){},e}(),Ao=function(){function e(e,t,n,r,i,o){this._n=e,this.ru=n,this.ou=r,this.au=i,this.listener=o,this.state=0,this.cu=0,this.uu=null,this.stream=null,this.gs=new pr(e,t)}return e.prototype.hu=function(){return 1===this.state||2===this.state||4===this.state},e.prototype.lu=function(){return 2===this.state},e.prototype.start=function(){3!==this.state?this.auth():this._u()},e.prototype.stop=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){switch(e.label){case 0:return this.hu()?[4,this.close(0)]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}
2))}))},e.prototype.fu=function(){this.state=0,this.gs.reset()},e.prototype.du=function(){var e=this;this.lu()&&null===this.uu&&(this.uu=this._n.gn(this.ru,6e4,(function(){return e.wu()})))},e.prototype.mu=function(e){this.Tu(),this.stream.send(e)},e.prototype.wu=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.lu()?[2,this.close(0)]:[2]}))}))},e.prototype.Tu=function(){this.uu&&(this.uu.cancel(),this.uu=null)},e.prototype.close=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(n){switch(n.label){case 0:return this.Tu(),this.gs.cancel(),this.cu++,3!==e?this.gs.reset():t&&t.code===l.RESOURCE_EXHAUSTED?(v(t.toString()),v("Using maximum backoff delay to prevent overloading the backend."),this.gs.An()):t&&t.code===l.UNAUTHENTICATED&&this.au.Yc(),null!==this.stream&&(this.Eu(),this.stream.close(),this.stream=null),this.state=e,[4,this.listener.Iu(t)];case 1:return n.sent(),[2]}}))}))},e.prototype.Eu=function(){},e.prototype.auth=function(){var e=this;this.state=1;var t=this.Au(this.cu),n=this.cu;this.au.getToken().then((function(t){e.cu===n&&e.Ru(t)}),(function(n){t((function(){var t=new h(l.UNKNOWN,"Fetching auth token failed: "+n.message);return e.Pu(t)}))}))},e.prototype.Ru=function(e){var t=this,n=this.Au(this.cu);this.stream=this.gu(e),this.stream.yu((function(){n((function(){return t.state=2,t.listener.yu()}))})),this.stream.Iu((function(e){n((function(){return t.Pu(e)}))})),this.stream.onMessage((function(e){n((function(){return t.onMessage(e)}))}))},e.prototype._u=function(){var e=this;this.state=4,this.gs.Rn((function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.state=0,this.start(),[2]}))}))}))},e.prototype.Pu=function(e){return d("PersistentStream","close with error: "+e),this.stream=null,this.close(3,e)},e.prototype.Au=function(e){var t=this;return function(n){t._n.ds((function(){return t.cu===e?n():(d("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())}))}},e}(),Po=function(e){function t(t,n,r,i,o){var a=this;return(a=e.call(this,t,"listen_stream_connection_backoff","listen_stream_idle",n,r,o)||this).serializer=i,a}return r.__extends(t,e),t.prototype.gu=function(e){return this.ou.Vu("Listen",e)},t.prototype.onMessage=function(e){this.gs.reset();var t=function(e,t){var n;if("targetChange"in t){t.targetChange;var r=function(e){return"NO_CHANGE"===e?0:"ADD"===e?1:"REMOVE"===e?2:"CURRENT"===e?3:"RESET"===e?4:m()}(t.targetChange.targetChangeType||"NO_CHANGE"),i=t.targetChange.targetIds||[],o=function(e,t){return e.Ue?(b(void 0===t||"string"==typeof t),Z.fromBase64String(t||"")):(b(void 0===t||t instanceof Uint8Array),Z.fromUint8Array(t||new Uint8Array))}(e,t.targetChange.resumeToken),a=t.targetChange.cause,s=a&&function(e){var t=void 0===e.code?l.UNKNOWN:Ee(e.code);return new h(t,e.message||"")}(a);n=new He(r,i,o,s||null)}else if("documentChange"in t){t.documentChange;var u=t.documentChange;u.document,u.document.name,u.document.updateTime;var c=kt(e,u.document.name),f=Tt(u.document.updateTime),p=new In({mapValue:{fields:u.document.fields}}),d=new On(c,f,p,{}),v=u.targetIds||[],g=u.removedTargetIds||[];n=new ze(v,g,d.key,d)}else if("documentDelete"in t){t.documentDelete;var y=t.documentDelete;y.document;var _=kt(e,y.document),w=y.readTime?Tt(y.readTime):ue.min(),E=new Nn(_,w),T=y.removedTargetIds||[];n=new ze([],T,E.key,E)}else if("documentRemove"in t){t.documentRemove;var S=t.documentRemove;S.document;var I=kt(e,S.document),C=S.removedTargetIds||[];n=new ze([],C,I,null)}else{if(!("filter"in t))return m();t.filter;var k=t.filter;k.targetId;var x=k.count||0,O=new _e(x),N=k.targetId;n=new We(N,O)}return n}(this.serializer,e),n=function(e){if(!("targetChange"in e))return ue.min();var t=e.targetChange;return t.targetIds&&t.targetIds.length?ue.min():t.readTime?Tt(t.readTime):ue.min()}(e);return this.listener.pu(t,n)},t.prototype.bu=function(e){var t={};t.database=Nt(this.serializer),t.addTarget=function(e,t){var n,r=t.target;return(n=ge(r)?{documents:Lt(e,r)}:{query:Mt(e,r)}).targetId=t.targetId,t.resumeToken.O()>0&&(n.resumeToken=wt(e,t.resumeToken)),n}(this.serializer,e);var n=function(e,t){var n=function(e,t){switch(t){case 0:return null;case 1:return"existence-filter-mismatch";case 2:return"limbo-document";default:return m()}}(0,t.tt);return null==n?null:{"goog-listen-tags":n}}(this.serializer,e);n&&(t.labels=n),this.mu(t)},t.prototype.vu=function(e){var t={};t.database=Nt(this.serializer),t.removeTarget=e,this.mu(t)},t}(Ao),Ro=function(e){function t(t,n,r,i,o){var a=this;return(a=e.call(this,t,"write_stream_connection_backoff","write_stream_idle",n,r,o)||this).serializer
2=i,a.Su=!1,a}return r.__extends(t,e),Object.defineProperty(t.prototype,"Du",{get:function(){return this.Su},enumerable:!1,configurable:!0}),t.prototype.start=function(){this.Su=!1,this.lastStreamToken=void 0,e.prototype.start.call(this)},t.prototype.Eu=function(){this.Su&&this.Cu([])},t.prototype.gu=function(e){return this.ou.Vu("Write",e)},t.prototype.onMessage=function(e){if(b(!!e.streamToken),this.lastStreamToken=e.streamToken,this.Su){this.gs.reset();var t=function(e,t){return e&&e.length>0?(b(void 0!==t),e.map((function(e){return function(e,t){var n=e.updateTime?Tt(e.updateTime):Tt(t);n.isEqual(ue.min())&&(n=Tt(t));var r=null;return e.transformResults&&e.transformResults.length>0&&(r=e.transformResults),new un(n,r)}(e,t)}))):[]}(e.writeResults,e.commitTime),n=Tt(e.commitTime);return this.listener.Nu(n,t)}return b(!e.writeResults||0===e.writeResults.length),this.Su=!0,this.listener.Fu()},t.prototype.$u=function(){var e={};e.database=Nt(this.serializer),this.mu(e)},t.prototype.Cu=function(e){var t=this,n={streamToken:this.lastStreamToken,writes:e.map((function(e){return Rt(t.serializer,e)}))};this.mu(n)},t}(Ao),Do=function(e){function t(t,n,r){var i=this;return(i=e.call(this)||this).credentials=t,i.ou=n,i.serializer=r,i.xu=!1,i}return r.__extends(t,e),t.prototype.ku=function(){if(this.xu)throw new h(l.FAILED_PRECONDITION,"The client has already been terminated.")},t.prototype.Mu=function(e,t,n){var r=this;return this.ku(),this.credentials.getToken().then((function(i){return r.ou.Mu(e,t,n,i)})).catch((function(e){throw e.code===l.UNAUTHENTICATED&&r.credentials.Yc(),e}))},t.prototype.Ou=function(e,t,n){var r=this;return this.ku(),this.credentials.getToken().then((function(i){return r.ou.Ou(e,t,n,i)})).catch((function(e){throw e.code===l.UNAUTHENTICATED&&r.credentials.Yc(),e}))},t.prototype.terminate=function(){this.xu=!1},t}((function(){})),Lo=function(){function e(e,t){this.os=e,this.fi=t,this.state="Unknown",this.Lu=0,this.Bu=null,this.qu=!0}return e.prototype.Uu=function(){var e=this;0===this.Lu&&(this.Qu("Unknown"),this.Bu=this.os.gn("online_state_timeout",1e4,(function(){return e.Bu=null,e.Wu("Backend didn't respond within 10 seconds."),e.Qu("Offline"),Promise.resolve()})))},e.prototype.ju=function(e){"Online"===this.state?this.Qu("Unknown"):(this.Lu++,this.Lu>=1&&(this.Ku(),this.Wu("Connection failed 1 times. Most recent error: "+e.toString()),this.Qu("Offline")))},e.prototype.set=function(e){this.Ku(),this.Lu=0,"Online"===e&&(this.qu=!1),this.Qu(e)},e.prototype.Qu=function(e){e!==this.state&&(this.state=e,this.fi(e))},e.prototype.Wu=function(e){var t="Could not reach Cloud Firestore backend. "+e+"\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.qu?(v(t),this.qu=!1):d("OnlineStateTracker",t)},e.prototype.Ku=function(){null!==this.Bu&&(this.Bu.cancel(),this.Bu=null)},e}(),Mo=function(e,t,n,i,o){var a=this;this.Gu=e,this.zu=t,this.os=n,this.Hu={},this.Yu=[],this.Ju=new Map,this.Xu=new Set,this.Zu=[],this.th=o,this.th.eh((function(e){n.ds((function(){return r.__awaiter(a,void 0,void 0,(function(){return r.__generator(this,(function(e){switch(e.label){case 0:return Go(this)?(d("RemoteStore","Restarting streams for network reachability change."),[4,function(e){return r.__awaiter(this,void 0,void 0,(function(){var t;return r.__generator(this,(function(n){switch(n.label){case 0:return(t=_(e)).Xu.add(4),[4,Fo(t)];case 1:return n.sent(),t.nh.set("Unknown"),t.Xu.delete(4),[4,jo(t)];case 2:return n.sent(),[2]}}))}))}(this)]):[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}
2))}))}))})),this.nh=new Lo(n,i)};function jo(e){return r.__awaiter(this,void 0,void 0,(function(){var t,n;return r.__generator(this,(function(r){switch(r.label){case 0:if(!Go(e))return[3,4];t=0,n=e.Zu,r.label=1;case 1:return t<n.length?[4,(0,n[t])(!0)]:[3,4];case 2:r.sent(),r.label=3;case 3:return t++,[3,1];case 4:return[2]}}))}))}function Fo(e){return r.__awaiter(this,void 0,void 0,(function(){var t,n;return r.__generator(this,(function(r){switch(r.label){case 0:t=0,n=e.Zu,r.label=1;case 1:return t<n.length?[4,(0,n[t])(!1)]:[3,4];case 2:r.sent(),r.label=3;case 3:return t++,[3,1];case 4:return[2]}}))}))}function Uo(e){return r.__awaiter(this,void 0,void 0,(function(){var t;return r.__generator(this,(function(n){switch(n.label){case 0:return t=_(e),d("RemoteStore","RemoteStore shutting down."),t.Xu.add(5),[4,Fo(t)];case 1:return n.sent(),t.th.Si(),t.nh.set("Unknown"),[2]}}))}))}function Vo(e,t){var n=_(e);n.Ju.has(t.targetId)||(n.Ju.set(t.targetId,t),Ho(n)?Wo(n):sa(n).lu()&&Bo(n,t))}function qo(e,t){var n=_(e),r=sa(n);n.Ju.delete(t),r.lu()&&zo(n,t),0===n.Ju.size&&(r.lu()?r.du():Go(n)&&n.nh.set("Unknown"))}function Bo(e,t){e.sh.Ee(t.targetId),sa(e).bu(t)}function zo(e,t){e.sh.Ee(t),sa(e).vu(t)}function Wo(e){e.sh=new Ke({Be:function(t){return e.Hu.Be(t)},qe:function(t){return e.Ju.get(t)||null}}),sa(e).start(),e.nh.Uu()}function Ho(e){return Go(e)&&!sa(e).hu()&&e.Ju.size>0}function Go(e){return 0===_(e).Xu.size}function Ko(e){e.sh=void 0}function Qo(e){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(t){return e.Ju.forEach((function(t,n){Bo(e,t)})),[2]}))}))}function $o(e,t){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(n){return Ko(e),Ho(e)?(e.nh.ju(t),Wo(e)):e.nh.set("Unknown"),[2]}))}))}function Yo(e,t,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(e.nh.set("Online"),!(t instanceof He&&2===t.state&&t.cause))return[3,6];s.label=1;case 1:return s.trys.push([1,3,,5]),[4,function(e,t){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=t.cause,i=0,o=t.targetIds,r.label=1;case 1:return i<o.length?(a=o[i],e.Ju.has(a)?[4,e.Hu.ih(a,n)]:[3,3]):[3,5];case 2:r.sent(),e.Ju.delete(a),e.sh.removeTarget(a),r.label=3;case 3:r.label=4;case 4:return i++,[3,1];case 5:return[2]}}
2))}))}(e,t)];case 2:return s.sent(),[3,5];case 3:return i=s.sent(),d("RemoteStore","Failed to remove targets %s: %s ",t.targetIds.join(","),i),[4,Xo(e,i)];case 4:return s.sent(),[3,5];case 5:return[3,13];case 6:if(t instanceof ze?e.sh.pe(t):t instanceof We?e.sh.$e(t):e.sh.Se(t),n.isEqual(ue.min()))return[3,13];s.label=7;case 7:return s.trys.push([7,11,,13]),[4,go(e.Gu)];case 8:return o=s.sent(),n.L(o)>=0?[4,function(e,t){var n=e.sh.Me(t);return n.Gt.forEach((function(n,r){if(n.resumeToken.O()>0){var i=e.Ju.get(r);i&&e.Ju.set(r,i.st(n.resumeToken,t))}})),n.zt.forEach((function(t){var n=e.Ju.get(t);if(n){e.Ju.set(t,n.st(Z.B,n.et)),zo(e,t);var r=new be(n.target,t,1,n.sequenceNumber);Bo(e,r)}})),e.Hu.rh(n)}(e,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,Xo(e,a)];case 12:return s.sent(),[3,13];case 13:return[2]}}))}))}function Xo(e,t,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(!mr(t))throw t;return e.Xu.add(1),[4,Fo(e)];case 1:return o.sent(),e.nh.set("Offline"),n||(n=function(){return go(e.Gu)}),e.os.Ds((function(){return r.__awaiter(i,void 0,void 0,(function(){return r.__generator(this,(function(t){switch(t.label){case 0:return d("RemoteStore","Retrying IndexedDB access"),[4,n()];case 1:return t.sent(),e.Xu.delete(1),[4,jo(e)];case 2:return t.sent(),[2]}}))}))})),[2]}}))}))}function Jo(e,t){return t().catch((function(n){return Xo(e,n,t)}))}function Zo(e){return r.__awaiter(this,void 0,void 0,(function(){var t,n,i,o,a;return r.__generator(this,(function(r){switch(r.label){case 0:t=_(e),n=ua(t),i=t.Yu.length>0?t.Yu[t.Yu.length-1].batchId:-1,r.label=1;case 1:if(!function(e){return Go(e)&&e.Yu.length<10}(t))return[3,7];r.label=2;case 2:return r.trys.push([2,4,,6]),[4,mo(t.Gu,i)];case 3:return null===(o=r.sent())?(0===t.Yu.length&&n.du(),[3,7]):(i=o.batchId,function(e,t){e.Yu.push(t);var n=ua(e);n.lu()&&n.Du&&n.Cu(t.mutations)}(t,o),[3,6]);case 4:return a=r.sent(),[4,Xo(t,a)];case 5:return r.sent(),[3,6];case 6:return[3,1];case 7:return ea(t)&&ta(t),[2]}}))}))}function ea(e){return Go(e)&&!ua(e).hu()&&e.Yu.length>0}function ta(e){ua(e).start()}function na(e){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(t){return ua(e).$u(),[2]}))}))}function ra(e){return r.__awaiter(this,void 0,void 0,(function(){var t,n,i,o;return r.__generator(this,(function(r){for(t=ua(e),n=0,i=e.Yu;n<i.length;n++)o=i[n],t.Cu(o.mutations);return[2]}))}))}function ia(e,t,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=e.Yu.shift(),o=Yr.from(i,t,n),[4,Jo(e,(function(){return e.Hu.oh(o)}))];case 1:return r.sent(),[4,Zo(e)];case 2:return r.sent(),[2]}}))}))}function oa(e,t){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(n){switch(n.label){case 0:return t&&ua(e).Du?[4,function(e,t){return r.__awaiter(this,void 0,void 0,(function(){var n,i;return r.__generator(this,(function(r){switch(r.label){case 0:return we(i=t.code)&&i!==l.ABORTED?(n=e.Yu.shift(),ua(e).fu(),[4,Jo(e,(function(){return e.Hu.ah(n.batchId,t)}))]):[3,3];case 1:return r.sent(),[4,Zo(e)];case 2:r.sent(),r.label=3;case 3:return[2]}}
2))}))}(e,t)]:[3,2];case 1:n.sent(),n.label=2;case 2:return ea(e)&&ta(e),[2]}}))}))}function aa(e,t){return r.__awaiter(this,void 0,void 0,(function(){var n;return r.__generator(this,(function(r){switch(r.label){case 0:return n=_(e),t?(n.Xu.delete(2),[4,jo(n)]):[3,2];case 1:return r.sent(),[3,5];case 2:return t?[3,4]:(n.Xu.add(2),[4,Fo(n)]);case 3:r.sent(),n.nh.set("Unknown"),r.label=4;case 4:r.label=5;case 5:return[2]}}))}))}function sa(e){var t=this;return e.uh||(e.uh=function(e,t,n){var r=_(e);return r.ku(),new Po(t,r.ou,r.credentials,r.serializer,n)}(e.zu,e.os,{yu:Qo.bind(null,e),Iu:$o.bind(null,e),pu:Yo.bind(null,e)}),e.Zu.push((function(n){return r.__awaiter(t,void 0,void 0,(function(){return r.__generator(this,(function(t){switch(t.label){case 0:return n?(e.uh.fu(),Ho(e)?Wo(e):e.nh.set("Unknown"),[3,3]):[3,1];case 1:return[4,e.uh.stop()];case 2:t.sent(),Ko(e),t.label=3;case 3:return[2]}}))}))}))),e.uh}function ua(e){var t=this;return e.hh||(e.hh=function(e,t,n){var r=_(e);return r.ku(),new Ro(t,r.ou,r.credentials,r.serializer,n)}(e.zu,e.os,{yu:na.bind(null,e),Iu:oa.bind(null,e),Fu:ra.bind(null,e),Nu:ia.bind(null,e)}),e.Zu.push((function(n){return r.__awaiter(t,void 0,void 0,(function(){return r.__generator(this,(function(t){switch(t.label){case 0:return n?(e.hh.fu(),[4,Zo(e)]):[3,2];case 1:return t.sent(),[3,4];case 2:return[4,e.hh.stop()];case 3:t.sent(),e.Yu.length>0&&(d("RemoteStore","Stopping write stream with "+e.Yu.length+" pending writes"),e.Yu=[]),t.label=4;case 4:return[2]}}
2))}))}))),e.hh}var ca=function(e){this.key=e},la=function(e){this.key=e},ha=function(){function e(e,t){this.query=e,this.lh=t,this._h=null,this.Zt=!1,this.fh=Le(),this.Qt=Le(),this.dh=$n(e),this.wh=new Fe(this.dh)}return Object.defineProperty(e.prototype,"mh",{get:function(){return this.lh},enumerable:!1,configurable:!0}),e.prototype.Th=function(e,t){var n=this,r=t?t.Eh:new Ue,i=t?t.wh:this.wh,o=t?t.Qt:this.Qt,a=i,s=!1,u=Ln(this.query)&&i.size===this.query.limit?i.last():null,c=Mn(this.query)&&i.size===this.query.limit?i.first():null;if(e.ut((function(e,t){var l=i.get(e),h=t instanceof On?t:null;h&&(h=Qn(n.query,h)?h:null);var f=!!l&&n.Qt.has(l.key),p=!!h&&(h.Ye||n.Qt.has(h.key)&&h.hasCommittedMutations),d=!1;l&&h?l.data().isEqual(h.data())?f!==p&&(r.track({type:3,doc:h}),d=!0):n.Ih(l,h)||(r.track({type:2,doc:h}),d=!0,(u&&n.dh(h,u)>0||c&&n.dh(h,c)<0)&&(s=!0)):!l&&h?(r.track({type:0,doc:h}),d=!0):l&&!h&&(r.track({type:1,doc:l}),d=!0,(u||c)&&(s=!0)),d&&(h?(a=a.add(h),o=p?o.add(e):o.delete(e)):(a=a.delete(e),o=o.delete(e)))})),Ln(this.query)||Mn(this.query))for(;a.size>this.query.limit;){var l=Ln(this.query)?a.last():a.first();a=a.delete(l.key),o=o.delete(l.key),r.track({type:1,doc:l})}return{wh:a,Eh:r,Ah:s,Qt:o}},e.prototype.Ih=function(e,t){return e.Ye&&t.hasCommittedMutations&&!t.Ye},e.prototype.gr=function(e,t,n){var r=this,i=this.wh;this.wh=e.wh,this.Qt=e.Qt;var o=e.Eh.qt();o.sort((function(e,t){return function(e,t){var n=function(e){switch(e){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return m()}};return n(e)-n(t)}(e.type,t.type)||r.dh(e.doc,t.doc)})),this.Rh(n);var a=t?this.Ph():[],s=0===this.fh.size&&this.Zt?1:0,u=s!==this._h;return this._h=s,0!==o.length||u?{snapshot:new Ve(this.query,e.wh,i,o,e.Qt,0===s,u,!1),gh:a}:{gh:a}},e.prototype.Us=function(e){return this.Zt&&"Offline"===e?(this.Zt=!1,this.gr({wh:this.wh,Eh:new Ue,Qt:this.Qt,Ah:!1},!1)):{gh:[]}},e.prototype.yh=function(e){return!this.lh.has(e)&&!!this.wh.has(e)&&!this.wh.get(e).Ye},e.prototype.Rh=function(e){var t=this;e&&(e.te.forEach((function(e){return t.lh=t.lh.add(e)})),e.ee.forEach((function(e){})),e.ne.forEach((function(e){return t.lh=t.lh.delete(e)})),this.Zt=e.Zt)},e.prototype.Ph=function(){var e=this;if(!this.Zt)return[];var t=this.fh;this.fh=Le(),this.wh.forEach((function(t){e.yh(t.key)&&(e.fh=e.fh.add(t.key))}));var n=[];return t.forEach((function(t){e.fh.has(t)||n.push(new la(t))})),this.fh.forEach((function(e){t.has(e)||n.push(new ca(e))})),n},e.prototype.Vh=function(e){this.lh=e.kc,this.fh=Le();var t=this.Th(e.documents);return this.gr(t,!0)},e.prototype.ph=function(){return Ve.Kt(this.query,this.wh,this.Qt,0===this._h)},e}(),fa=function(e,t,n){this.query=e,this.targetId=t,this.view=n},pa=function(e){this.key=e,this.bh=!1},da=function(){function e(e,t,n,r,i,o){this.Gu=e,this.Sh=t,this.Dh=n,this.Ch=r,this.currentUser=i,this.Nh=o,this.Fh={},this.$h=new ae((function(e){return Gn(e)}),Hn),this.xh=new Map,this.kh=[],this.Mh=new Te(x.i),this.Oh=new Map,this.Lh=new So,this.Bh={},this.qh=new Map,this.Uh=eo.Ta(),this.onlineState="Unknown",this.Qh=void 0}return Object.defineProperty(e.prototype,"Wh",{get:function(){return!0===this.Qh},enumerable:!1,configurable:!0}),e}();function va(e,t){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=qa(e),(a=n.$h.get(t))?(i=a.targetId,n.Ch.Mi(i),o=a.view.ph(),[3,4]):[3,1];case 1:return[4,bo(n.Gu,qn(t))];case 2:return s=r.sent(),u=n.Ch.Mi(s.targetId),i=s.targetId,[4,ga(n,t,i,"current"===u)];case 3:o=r.sent(),n.Wh&&Vo(n.Sh,s),r.label=4;case 4:return[2,o]}}))}))}function ga(e,t,n,i){return r.__awaiter(this,void 0,void 0,(function(){var o,a,s,u,c,l;return r.__generator(this,(function(h){switch(h.label){case 0:return e.jh=function(t,n,i){return function(e,t,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=t.view.Th(n)).Ah?[4,wo(e.Gu,t.query,!1).then((function(e){var n=e.documents;return t.view.Th(n,o)}))]:[3,2];case 1:o=r.sent(),r.label=2;case 2:return a=i&&i.Gt.get(t.targetId),s=t.view.gr(o,e.Wh,a),[2,(ka(e,t.targetId,s.gh),s.snapshot)]}}))}))}(e,t,n,i)},[4,wo(e.Gu,t,!0)];case 1:return o=h.sent(),a=new ha(t,o.kc),s=a.Th(o.documents),u=Be.Xt(n,i&&"Offline"!==e.onlineState),c=a.gr(s,e.Wh,u),ka(e,n,c.gh),l=new fa(t,n,a),[2,(e.$h.set(t,l),e.xh.has(n)?e.xh.get(n).push(t):e.xh.set(n,[t]),c.snapshot)]}}))}))}function ya(e,t){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=_(e),i=n.$h.get(t),(o=n.xh.get(i.targetId)).length>1?[2,(n.xh.set(i.targetId,o.filter((function(e){return!Hn(e,t)}))),void n.$h.delete(t))]:n.Wh?(n.Ch.Li(i.targetId),n.Ch.Ni(i.targetId)?[3,2]:[4,_o(n.Gu,i.targetId,!1).then((function(){n.Ch.qi(i.targetId),qo(n.Sh,i.targetId),Ia(n,i.targetId)})).catch(To)]):[3,3];case 1:r.sent(),r.label=2;case 2:return[3,5];case 3:return Ia(n,i.targetId),[4,_o(n.Gu,i.targetId,!0)];case 4:r.sent(),r.label=5;case 5:return[2]}}
2))}))}function ma(e,t){return r.__awaiter(this,void 0,void 0,(function(){var n,i;return r.__generator(this,(function(r){switch(r.label){case 0:n=_(e),r.label=1;case 1:return r.trys.push([1,4,,6]),[4,yo(n.Gu,t)];case 2:return i=r.sent(),t.Gt.forEach((function(e,t){var r=n.Oh.get(t);r&&(b(e.te.size+e.ee.size+e.ne.size<=1),e.te.size>0?r.bh=!0:e.ee.size>0?b(r.bh):e.ne.size>0&&(b(r.bh),r.bh=!1))})),[4,Na(n,i,t)];case 3:return r.sent(),[3,6];case 4:return[4,To(r.sent())];case 5:return r.sent(),[3,6];case 6:return[2]}}))}))}function ba(e,t,n){var r=_(e);if(r.Wh&&0===n||!r.Wh&&1===n){var i=[];r.$h.forEach((function(e,n){var r=n.view.Us(t);r.snapshot&&i.push(r.snapshot)})),function(e,t){var n=_(e);n.onlineState=t;var r=!1;n.Ls.forEach((function(e,n){for(var i=0,o=n.listeners;i<o.length;i++)o[i].Us(t)&&(r=!0)})),r&&Lr(n)}(r.Dh,t),i.length&&r.Fh.pu(i),r.onlineState=t,r.Wh&&r.Ch.ji(t)}}function _a(e,t,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=_(e)).Ch.Ui(t,"rejected",n),o=i.Oh.get(t),(a=o&&o.key)?(s=(s=new Te(x.i)).rt(a,new Nn(a,ue.min())),u=Le().add(a),c=new qe(ue.min(),new Map,new Ce(Y),s,u),[4,ma(i,c)]):[3,2];case 1:return r.sent(),i.Mh=i.Mh.remove(a),i.Oh.delete(t),Oa(i),[3,4];case 2:return[4,_o(i.Gu,t,!1).then((function(){return Ia(i,t,n)})).catch(To)];case 3:r.sent(),r.label=4;case 4:return[2]}}
2))}))}function wa(e,t){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=_(e),i=t.batch.batchId,r.label=1;case 1:return r.trys.push([1,4,,6]),[4,vo(n.Gu,t)];case 2:return o=r.sent(),Sa(n,i,null),Ta(n,i),n.Ch.xi(i,"acknowledged"),[4,Na(n,o)];case 3:return r.sent(),[3,6];case 4:return[4,To(r.sent())];case 5:return r.sent(),[3,6];case 6:return[2]}}))}))}function Ea(e,t,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=_(e),r.label=1;case 1:return r.trys.push([1,4,,6]),[4,function(e,t){var n=_(e);return n.persistence.runTransaction("Reject batch","readwrite-primary",(function(e){var r;return n.vr.Mo(e,t).next((function(t){return b(null!==t),r=t.keys(),n.vr.Qo(e,t)})).next((function(){return n.vr.Go(e)})).next((function(){return n.$c.$r(e,r)}))}))}(i.Gu,t)];case 2:return o=r.sent(),Sa(i,t,n),Ta(i,t),i.Ch.xi(t,"rejected",n),[4,Na(i,o)];case 3:return r.sent(),[3,6];case 4:return[4,To(r.sent())];case 5:return r.sent(),[3,6];case 6:return[2]}}
2))}))}function Ta(e,t){(e.qh.get(t)||[]).forEach((function(e){e.resolve()})),e.qh.delete(t)}function Sa(e,t,n){var r=_(e),i=r.Bh[r.currentUser.Zs()];if(i){var o=i.get(t);o&&(n?o.reject(n):o.resolve(),i=i.remove(t)),r.Bh[r.currentUser.Zs()]=i}}function Ia(e,t,n){void 0===n&&(n=null),e.Ch.Li(t);for(var r=0,i=e.xh.get(t);r<i.length;r++){var o=i[r];e.$h.delete(o),n&&e.Fh.Kh(o,n)}e.xh.delete(t),e.Wh&&e.Lh.Wc(t).forEach((function(t){e.Lh.zo(t)||Ca(e,t)}))}function Ca(e,t){var n=e.Mh.get(t);null!==n&&(qo(e.Sh,n),e.Mh=e.Mh.remove(t),e.Oh.delete(n),Oa(e))}function ka(e,t,n){for(var r=0,i=n;r<i.length;r++){var o=i[r];o instanceof ca?(e.Lh.Fa(o.key,t),xa(e,o)):o instanceof la?(d("SyncEngine","Document no longer in limbo: "+o.key),e.Lh.xa(o.key,t),e.Lh.zo(o.key)||Ca(e,o.key)):m()}}function xa(e,t){var n=t.key;e.Mh.get(n)||(d("SyncEngine","New document in limbo: "+n),e.kh.push(n),Oa(e))}function Oa(e){for(;e.kh.length>0&&e.Mh.size<e.Nh;){var t=e.kh.shift(),n=e.Uh.next();e.Oh.set(n,new pa(t)),e.Mh=e.Mh.rt(t,n),Vo(e.Sh,new be(qn(Dn(t.path)),n,2,Fr.oi))}}function Na(e,t,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=_(e),o=[],a=[],s=[],i.$h.m()?[3,3]:(i.$h.forEach((function(e,r){s.push(i.jh(r,t,n).then((function(e){if(e){i.Wh&&i.Ch.Ui(r.targetId,e.fromCache?"not-current":"current"),o.push(e);var t=ti.Gr(r.targetId,e);a.push(t)}})))})),[4,Promise.all(s)]);case 1:return u.sent(),i.Fh.pu(o),[4,function(e,t){return r.__awaiter(this,void 0,void 0,(function(){var n,i,o,a,s,u,c,l,h;return r.__generator(this,(function(r){switch(r.label){case 0:n=_(e),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,n.persistence.runTransaction("notifyLocalViewChanges","readwrite",(function(e){return dr.forEach(t,(function(t){return dr.forEach(t.jr,(function(r){return n.persistence.Co.Fa(e,t.targetId,r)})).next((function(){return dr.forEach(t.Kr,(function(r){return n.persistence.Co.xa(e,t.targetId,r)}))}))}))}))];case 2:return r.sent(),[3,4];case 3:if(!mr(i=r.sent()))throw i;return d("LocalStore","Failed to update sequence numbers: "+i),[3,4];case 4:for(o=0,a=t;o<a.length;o++)s=a[o],u=s.targetId,s.fromCache||(c=n.Dc.get(u),l=c.et,h=c.it(l),n.Dc=n.Dc.rt(u,h));return[2]}}))}))}(i.Gu,a)];case 2:u.sent(),u.label=3;case 3:return[2]}}
2))}))}function Aa(e,t){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=_(e)).currentUser.isEqual(t)?[3,3]:(d("SyncEngine","User change. New user:",t.Zs()),[4,function(e,t){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=_(e),i=n.vr,o=n.$c,[4,n.persistence.runTransaction("Handle user change","readonly",(function(e){var r;return n.vr.qo(e).next((function(a){return r=a,i=n.persistence.Ic(t),o=new ei(n.Fc,i,n.persistence.Pc()),i.qo(e)})).next((function(t){for(var n=[],i=[],a=Le(),s=0,u=r;s<u.length;s++){var c=u[s];n.push(c.batchId);for(var l=0,h=c.mutations;l<h.length;l++){var f=h[l];a=a.add(f.key)}}for(var p=0,d=t;p<d.length;p++){var v=d[p];i.push(v.batchId);for(var g=0,y=v.mutations;g<y.length;g++){var m=y[g];a=a.add(m.key)}}return o.$r(e,a).next((function(e){return{Gh:e,zh:n,Hh:i}}))}))}))];case 1:return a=r.sent(),[2,(n.vr=i,n.$c=o,n.Sc.xc(n.$c),a)]}}))}))}(n.Gu,t)]);case 1:return i=o.sent(),n.currentUser=t,function(e,t){e.qh.forEach((function(e){e.forEach((function(e){e.reject(new h(l.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))}))})),e.qh.clear()}(n),n.Ch.Wi(t,i.zh,i.Hh),[4,Na(n,i.Gh)];case 2:o.sent(),o.label=3;case 3:return[2]}}
2))}))}function Pa(e,t){var n=_(e),r=n.Oh.get(t);if(r&&r.bh)return Le().add(r.key);var i=Le(),o=n.xh.get(t);if(!o)return i;for(var a=0,s=o;a<s.length;a++){var u=s[a],c=n.$h.get(u);i=i.xt(c.view.mh)}return i}function Ra(e,t){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,wo((n=_(e)).Gu,t.query,!0)];case 1:return i=r.sent(),o=t.view.Vh(i),[2,(n.Wh&&ka(n,t.targetId,o.gh),o)]}}))}))}function Da(e,t,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(e,t){var n=_(e),r=_(n.vr);return n.persistence.runTransaction("Lookup mutation documents","readonly",(function(e){return r.Oo(e,t).next((function(t){return t?n.$c.$r(e,t):dr.resolve(null)}))}))}((o=_(e)).Gu,t)];case 1:return null===(a=r.sent())?[3,6]:"pending"!==n?[3,3]:[4,Zo(o.Sh)];case 2:return r.sent(),[3,4];case 3:"acknowledged"===n||"rejected"===n?(Sa(o,t,i||null),Ta(o,t),function(e,t){_(_(e).vr).jo(t)}(o.Gu,t)):m(),r.label=4;case 4:return[4,Na(o,a)];case 5:return r.sent(),[3,7];case 6:d("SyncEngine","Cannot apply mutation batch with id: "+t),r.label=7;case 7:return[2]}}
2))}))}function La(e,t){return r.__awaiter(this,void 0,void 0,(function(){var n,i,o,a,s,u,c,l;return r.__generator(this,(function(r){switch(r.label){case 0:return qa(n=_(e)),Ba(n),!0!==t||!0===n.Qh?[3,3]:(i=n.Ch.Di(),[4,Ma(n,i.A())]);case 1:return o=r.sent(),n.Qh=!0,[4,aa(n.Sh,!0)];case 2:for(r.sent(),a=0,s=o;a<s.length;a++)u=s[a],Vo(n.Sh,u);return[3,7];case 3:return!1!==t||!1===n.Qh?[3,7]:(c=[],l=Promise.resolve(),n.xh.forEach((function(e,t){n.Ch.Bi(t)?c.push(t):l=l.then((function(){return Ia(n,t),_o(n.Gu,t,!0)})),qo(n.Sh,t)})),[4,l]);case 4:return r.sent(),[4,Ma(n,c)];case 5:return r.sent(),function(e){var t=_(e);t.Oh.forEach((function(e,n){qo(t.Sh,n)})),t.Lh.jc(),t.Oh=new Map,t.Mh=new Te(x.i)}(n),n.Qh=!1,[4,aa(n.Sh,!1)];case 6:r.sent(),r.label=7;case 7:return[2]}}))}))}function Ma(e,t,n){return r.__awaiter(this,void 0,void 0,(function(){var n,i,o,a,s,u,c,l,h,f,p,d,v,g;return r.__generator(this,(function(r){switch(r.label){case 0:n=_(e),i=[],o=[],a=0,s=t,r.label=1;case 1:return a<s.length?(u=s[a],c=void 0,(l=n.xh.get(u))&&0!==l.length?[4,bo(n.Gu,qn(l[0]))]:[3,7]):[3,13];case 2:c=r.sent(),h=0,f=l,r.label=3;case 3:return h<f.length?(p=f[h],d=n.$h.get(p),[4,Ra(n,d)]):[3,6];case 4:(v=r.sent()).snapshot&&o.push(v.snapshot),r.label=5;case 5:return h++,[3,3];case 6:return[3,11];case 7:return[4,Eo(n.Gu,u)];case 8:return g=r.sent(),[4,bo(n.Gu,g)];case 9:return c=r.sent(),[4,ga(n,ja(g),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.Fh.pu(o),i)]}}))}))}function ja(e){return Rn(e.path,e.collectionGroup,e.orderBy,e.filters,e.limit,"F",e.startAt,e.endAt)}function Fa(e){var t=_(e);return _(_(t.Gu).persistence).Vi()}function Ua(e,t,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)).Qh?(d("SyncEngine","Ignoring unexpected query state notification."),[3,8]):[3,1];case 1:if(!o.xh.has(t))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(e){var t=_(e),n=_(t.Fc);return t.persistence.runTransaction("Get new document changes","readonly",(function(e){return n.ia(e,t.Nc)})).then((function(e){var n=e.ra,r=e.readTime;return t.Nc=r,n}))}(o.Gu)];case 3:return a=r.sent(),s=qe.Jt(t,"current"===n),[4,Na(o,a,s)];case 4:return r.sent(),[3,8];case 5:return[4,_o(o.Gu,t,!0)];case 6:return r.sent(),Ia(o,t,i),[3,8];case 7:m(),r.label=8;case 8:return[2]}}
2))}))}function Va(e,t,n){return r.__awaiter(this,void 0,void 0,(function(){var i,o,a,s,u,c,l,h,f,p;return r.__generator(this,(function(v){switch(v.label){case 0:if(!(i=qa(e)).Qh)return[3,10];o=0,a=t,v.label=1;case 1:return o<a.length?(s=a[o],i.xh.has(s)?(d("SyncEngine","Adding an already active target "+s),[3,5]):[4,Eo(i.Gu,s)]):[3,6];case 2:return u=v.sent(),[4,bo(i.Gu,u)];case 3:return c=v.sent(),[4,ga(i,ja(u),c.targetId,!1)];case 4:v.sent(),Vo(i.Sh,c),v.label=5;case 5:return o++,[3,1];case 6:l=function(e){return r.__generator(this,(function(t){switch(t.label){case 0:return i.xh.has(e)?[4,_o(i.Gu,e,!1).then((function(){qo(i.Sh,e),Ia(i,e)})).catch(To)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))},h=0,f=n,v.label=7;case 7:return h<f.length?(p=f[h],[5,l(p)]):[3,10];case 8:v.sent(),v.label=9;case 9:return h++,[3,7];case 10:return[2]}}))}))}function qa(e){var t=_(e);return t.Sh.Hu.rh=ma.bind(null,t),t.Sh.Hu.Be=Pa.bind(null,t),t.Sh.Hu.ih=_a.bind(null,t),t.Fh.pu=Rr.bind(null,t.Dh),t.Fh.Kh=Dr.bind(null,t.Dh),t}function Ba(e){var t=_(e);return t.Sh.Hu.oh=wa.bind(null,t),t.Sh.Hu.ah=Ea.bind(null,t),t}var za=function(){function e(){}return e.prototype.xc=function(e){this.Yh=e},e.prototype.Or=function(e,t,n,r){var i=this;return function(e){return 0===e.filters.length&&null===e.limit&&null==e.startAt&&null==e.endAt&&(0===e.rn.length||1===e.rn.length&&e.rn[0].field.p())}(t)||n.isEqual(ue.min())?this.Jh(e,t):this.Yh.$r(e,r).next((function(a){var s=i.Xh(t,a);return(Ln(t)||Mn(t))&&i.Ah(t.on,s,r,n)?i.Jh(e,t):(p()<=o.LogLevel.DEBUG&&d("IndexFreeQueryEngine","Re-using previous result from %s to execute query: %s",n.toString(),Kn(t)),i.Yh.Or(e,t,n).next((function(e){return s.forEach((function(t){e=e.rt(t.key,t)})),e})))}))},e.prototype.Xh=function(e,t){var n=new Ce($n(e));return t.forEach((function(t,r){r instanceof On&&Qn(e,r)&&(n=n.add(r))})),n},e.prototype.Ah=function(e,t,n,r){if(n.size!==t.size)return!0;var i="F"===e?t.last():t.first();return!!i&&(i.hasPendingWrites||i.version.L(r)>0)},e.prototype.Jh=function(e,t){return p()<=o.LogLevel.DEBUG&&d("IndexFreeQueryEngine","Using full collection scan to execute query:",Kn(t)),this.Yh.Or(e,t,ue.min())},e}(),Wa=function(){function e(e,t){this.Sr=e,this.Co=t,this.vr=[],this.Zh=1,this.tl=new Ce(Io.Oc)}return e.prototype.$o=function(e){return dr.resolve(0===this.vr.length)},e.prototype.xo=function(e,t,n,r){var i=this.Zh;this.Zh++,this.vr.length>0&&this.vr[this.vr.length-1];var o=new $r(i,t,n,r);this.vr.push(o);for(var a=0,s=r;a<s.length;a++){var u=s[a];this.tl=this.tl.add(new Io(u.key,i)),this.Sr.ko(e,u.key.path.h())}return dr.resolve(o)},e.prototype.Mo=function(e,t){return dr.resolve(this.el(t))},e.prototype.Lo=function(e,t){var n=t+1,r=this.nl(n),i=r<0?0:r;return dr.resolve(this.vr.length>i?this.vr[i]:null)},e.prototype.Bo=function(){return dr.resolve(0===this.vr.length?-1:this.Zh-1)},e.prototype.qo=function(e){return dr.resolve(this.vr.slice())},e.prototype.Cr=function(e,t){var n=this,r=new Io(t,0),i=new Io(t,Number.POSITIVE_INFINITY),o=[];return this.tl.Nt([r,i],(function(e){var t=n.el(e.Gc);o.push(t)})),dr.resolve(o)},e.prototype.Mr=function(e,t){var n=this,r=new Ce(Y);return t.forEach((function(e){var t=new Io(e,0),i=new Io(e,Number.POSITIVE_INFINITY);n.tl.Nt([t,i],(function(e){r=r.add(e.Gc)}))})),dr.resolve(this.sl(r))},e.prototype.Qr=function(e,t){var n=t.path,r=n.length+1,i=n;x.F(i)||(i=i.child(""));var o=new Io(new x(i),0),a=new Ce(Y);return this.tl.Ft((function(e){var t=e.key.path;return!!n.T(t)&&(t.length===r&&(a=a.add(e.Gc)),!0)}),o),dr.resolve(this.sl(a))},e.prototype.sl=function(e){var t=this,n=[];return e.forEach((function(e){var r=t.el(e);null!==r&&n.push(r)})),n},e.prototype.Qo=function(e,t){var n=this;b(0===this.il(t.batchId,"removed")),this.vr.shift();var r=this.tl;return dr.forEach(t.mutations,(function(i){var o=new Io(i.key,t.batchId);return r=r.delete(o),n.Co.Ko(e,i.key)})).next((function(){n.tl=r}))},e.prototype.jo=function(e){},e.prototype.zo=function(e,t){var n=new Io(t,0),r=this.tl.$t(n);return dr.resolve(t.isEqual(r&&r.key))},e.prototype.Go=function(e){return this.vr.length,dr.resolve()},e.prototype.il=function(e,t){return this.nl(e)},e.prototype.nl=function(e){return 0===this.vr.length?0:e-this.vr[0].batchId},e.prototype.el=function(e){var t=this.nl(e);return t<0||t>=this.vr.length?null:this.vr[t]},e}(),Ha=function(){function e(e,t){this.Sr=e,this.rl=t,this.docs=new Te(x.i),this.size=0}return e.prototype.Tr=function(e,t,n){var r=t.key,i=this.docs.get(r),o=i?i.size:0,a=this.rl(t);return this.docs=this.docs.rt(r,{Zo:t,size:a,readTime:n}),this.size+=a-o,this.Sr.ko(e,r.path.h())},e.prototype.Ir=function(e){var t=this.docs.get(e);t&&(this.docs=this.docs.remove(e),this.size-=t.size)},e.prototype.Ar=function(e,t){var n=this.docs.get(t);return dr.resolve(n?n.Zo:null)},e.prototype.getEntries=function(e,t){var n=this,r=Ne();return t.forEach((function(e){var t=n.docs.get(e);r=r.rt(e,t?t.Zo:null)})),dr.resolve(r)}
2,e.prototype.Or=function(e,t,n){for(var r=Pe(),i=new x(t.path.child("")),o=this.docs._t(i);o.It();){var a=o.Et(),s=a.key,u=a.value,c=u.Zo,l=u.readTime;if(!t.path.T(s.path))break;l.L(n)<=0||c instanceof On&&Qn(t,c)&&(r=r.rt(c.key,c))}return dr.resolve(r)},e.prototype.ol=function(e,t){return dr.forEach(this.docs,(function(e){return t(e)}))},e.prototype.aa=function(t){return new e.ca(this)},e.prototype.ha=function(e){return dr.resolve(this.size)},e}();Ha.ca=function(e){function t(t){var n=this;return(n=e.call(this)||this).la=t,n}return r.__extends(t,e),t.prototype.gr=function(e){var t=this,n=[];return this.dr.forEach((function(r,i){i?n.push(t.la.Tr(e,i,t.readTime)):t.la.Ir(r)})),dr.$n(n)},t.prototype.Rr=function(e,t){return this.la.Ar(e,t)},t.prototype.Pr=function(e,t){return this.la.getEntries(e,t)},t}(Xr);var Ga=function(){function e(e){this.persistence=e,this.al=new ae((function(e){return de(e)}),ve),this.lastRemoteSnapshotVersion=ue.min(),this.highestTargetId=0,this.cl=0,this.ul=new So,this.targetCount=0,this.hl=eo.ma()}return e.prototype.De=function(e,t){return this.al.forEach((function(e,n){return t(n)})),dr.resolve()},e.prototype.Ra=function(e){return dr.resolve(this.lastRemoteSnapshotVersion)},e.prototype.Pa=function(e){return dr.resolve(this.cl)},e.prototype.Ea=function(e){return this.highestTargetId=this.hl.next(),dr.resolve(this.highestTargetId)},e.prototype.ga=function(e,t,n){return n&&(this.lastRemoteSnapshotVersion=n),t>this.cl&&(this.cl=t),dr.resolve()},e.prototype.Va=function(e){this.al.set(e.target,e);var t=e.targetId;t>this.highestTargetId&&(this.hl=new eo(t),this.highestTargetId=t),e.sequenceNumber>this.cl&&(this.cl=e.sequenceNumber)},e.prototype.ya=function(e,t){return this.Va(t),this.targetCount+=1,dr.resolve()},e.prototype.ba=function(e,t){return this.Va(t),dr.resolve()},e.prototype.va=function(e,t){return this.al.delete(t.target),this.ul.Wc(t.targetId),this.targetCount-=1,dr.resolve()},e.prototype.Vo=function(e,t,n){var r=this,i=0,o=[];return this.al.forEach((function(a,s){s.sequenceNumber<=t&&null===n.get(s.targetId)&&(r.al.delete(a),o.push(r.Sa(e,s.targetId)),i++)})),dr.$n(o).next((function(){return i}))},e.prototype.Da=function(e){return dr.resolve(this.targetCount)},e.prototype.Ca=function(e,t){var n=this.al.get(t)||null;return dr.resolve(n)},e.prototype.Na=function(e,t,n){return this.ul.qc(t,n),dr.resolve()},e.prototype.$a=function(e,t,n){this.ul.Qc(t,n);var r=this.persistence.Co,i=[];return r&&t.forEach((function(t){i.push(r.Ko(e,t))})),dr.$n(i)},e.prototype.Sa=function(e,t){return this.ul.Wc(t),dr.resolve()},e.prototype.ka=function(e,t){var n=this.ul.Kc(t);return dr.resolve(n)},e.prototype.zo=function(e,t){return dr.resolve(this.ul.zo(t))},e}(),Ka=function(){function e(e){var t=this;this.ll={},this.Ba=new Fr(0),this.qa=!1,this.qa=!0,this.Co=e(this),this.Ha=new Ga(this),this.Sr=new Ri,this.br=new Ha(this.Sr,(function(e){return t.Co._l(e)}))}return e.prototype.start=function(){return Promise.resolve()},e.prototype.Si=function(){return this.qa=!1,Promise.resolve()},Object.defineProperty(e.prototype,"Ti",{get:function(){return this.qa},enumerable:!1,configurable:!0}),e.prototype.nc=function(){},e.prototype.sc=function(){},e.prototype.Pc=function(){return this.Sr},e.prototype.Ic=function(e){var t=this.ll[e.Zs()];return t||(t=new Wa(this.Sr,this.Co),this.ll[e.Zs()]=t),t},e.prototype.Ac=function(){return this.Ha},e.prototype.Rc=function(){return this.br},e.prototype.runTransaction=function(e,t,n){var r=this;d("MemoryPersistence","Starting transaction:",e);var i=new Qa(this.Ba.next());return this.Co.fl(),n(i).next((function(e){return r.Co.dl(i).next((function(){return e}))})).Nn().then((function(e){return i.pr(),e}))},e.prototype.wl=function(e,t){return dr.xn(Object.values(this.ll).map((function(n){return function(){return n.zo(e,t)}})))},e}(),Qa=function(e){function t(t){var n=this;return(n=e.call(this)||this).Ma=t,n}return r.__extends(t,e),t}(Zr),$a=function(){function e(e){this.persistence=e,this.ml=new So,this.Tl=null}return e.El=function(t){return new e(t)},Object.defineProperty(e.prototype,"Il",{get:function(){if(this.Tl)return this.Tl;throw m()}
2,enumerable:!1,configurable:!0}),e.prototype.Fa=function(e,t,n){return this.ml.Fa(n,t),this.Il.delete(n.toString()),dr.resolve()},e.prototype.xa=function(e,t,n){return this.ml.xa(n,t),this.Il.add(n.toString()),dr.resolve()},e.prototype.Ko=function(e,t){return this.Il.add(t.toString()),dr.resolve()},e.prototype.removeTarget=function(e,t){var n=this;this.ml.Wc(t.targetId).forEach((function(e){return n.Il.add(e.toString())}));var r=this.persistence.Ac();return r.ka(e,t.targetId).next((function(e){e.forEach((function(e){return n.Il.add(e.toString())}))})).next((function(){return r.va(e,t)}))},e.prototype.fl=function(){this.Tl=new Set},e.prototype.dl=function(e){var t=this,n=this.persistence.Rc().aa();return dr.forEach(this.Il,(function(r){var i=x.D(r);return t.Al(e,i).next((function(e){e||n.Ir(i)}))})).next((function(){return t.Tl=null,n.apply(e)}))},e.prototype.vc=function(e,t){var n=this;return this.Al(e,t).next((function(e){e?n.Il.delete(t.toString()):n.Il.add(t.toString())}))},e.prototype._l=function(e){return 0},e.prototype.Al=function(e,t){var n=this;return dr.xn([function(){return dr.resolve(n.ml.zo(t))},function(){return n.persistence.Ac().zo(e,t)},function(){return n.persistence.wl(e,t)}])},e}(),Ya=function(){function e(e){this.Rl=e.Rl,this.Pl=e.Pl}return e.prototype.yu=function(e){this.gl=e},e.prototype.Iu=function(e){this.yl=e},e.prototype.onMessage=function(e){this.Vl=e},e.prototype.close=function(){this.Pl()},e.prototype.send=function(e){this.Rl(e)},e.prototype.pl=function(){this.gl()},e.prototype.bl=function(e){this.yl(e)},e.prototype.vl=function(e){this.Vl(e)},e}(),Xa={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery"},Ja=function(e){function t(t){var n=this;return(n=e.call(this,t)||this).forceLongPolling=t.forceLongPolling,n}return r.__extends(t,e),t.prototype.$l=function(e,t,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 t=a.getResponseJson();d("Connection","XHR received:",JSON.stringify(t)),i(t);break;case s.ErrorCode.TIMEOUT:d("Connection",'RPC "'+e+'" timed out'),o(new h(l.DEADLINE_EXCEEDED,"Request time out"));break;case s.ErrorCode.HTTP_ERROR:var n=a.getStatus();if(d("Connection",'RPC "'+e+'" failed with status:',n,"response text:",a.getResponseText()),n>0){var r=a.getResponseJson().error;if(r&&r.status&&r.message){var u=function(e){var t=e.toLowerCase().replace("_","-");return Object.values(l).indexOf(t)>=0?t:l.UNKNOWN}(r.status);o(new h(u,r.message))}else o(new h(l.UNKNOWN,"Server responded with status "+a.getStatus()))}else o(new h(l.UNAVAILABLE,"Connection failed."));break;default:m()}}finally{d("Connection",'RPC "'+e+'" completed.')}}));var u=JSON.stringify(r);a.send(t,"POST",u,n,15)}))},t.prototype.Vu=function(e,t){var n=[this.Dl,"/","google.firestore.v1.Firestore","/",e,"/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};this.Fl(i.initMessageHeaders,t),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,f=!1,p=new Ya({Rl:function(e){f?d("Connection","Not sending because WebChannel is closed:",e):(c||(d("Connection","Opening WebChannel transport."),u.open(),c=!0),d("Connection","WebChannel sending:",e),u.send(e))},Pl:function(){return u.close()}}),v=function(e,t){u.listen(e,(function(e){try{t(e)}catch(e){setTimeout((function(){throw e}),0)}}))};return v(s.WebChannel.EventType.OPEN,(function(){f||d("Connection","WebChannel transport opened.")})),v(s.WebChannel.EventType.CLOSE,(function(){f||(f=!0,d("Connection","WebChannel transport closed"),p.bl())})),v(s.WebChannel.EventType.ERROR,(function(e){f||(f=!0,g("Connection","WebChannel transport errored:",e),p.bl(new h(l.UNAVAILABLE,"The operation could not be completed")))})),v(s.WebChannel.EventType.MESSAGE,(function(e){var t;if(!f){var n=e.data[0];b(!!n);var r=n,i=r.error||(null===(t=r[0])||void 0===t?void 0:t.error);if(i){d("Connection","WebChannel received error:",i);var o=i.status,a=function(e){var t=ye[e];
2if(void 0!==t)return Ee(t)}(o),s=i.message;void 0===a&&(a=l.INTERNAL,s="Unknown error status: "+o+" with message "+i.message),f=!0,p.bl(new h(a,s)),u.close()}else d("Connection","WebChannel received:",n),p.vl(n)}})),setTimeout((function(){p.pl()}),0),p},t}(function(){function e(e){this.Sl=e,this.U=e.U;var t=e.ssl?"https":"http";this.Dl=t+"://"+e.host,this.Cl="projects/"+this.U.projectId+"/databases/"+this.U.database+"/documents"}return e.prototype.Mu=function(e,t,n,r){var i=this.Nl(e,t);d("RestConnection","Sending: ",i,n);var o={};return this.Fl(o,r),this.$l(e,i,o,n).then((function(e){return d("RestConnection","Received: ",e),e}),(function(t){throw g("RestConnection",e+" failed with error: ",t,"url: ",i,"request:",n),t}))},e.prototype.Ou=function(e,t,n,r){return this.Mu(e,t,n,r)},e.prototype.Fl=function(e,t){if(e["X-Goog-Api-Client"]="gl-js/ fire/7.22.0",e["Content-Type"]="text/plain",t)for(var n in t.zc)t.zc.hasOwnProperty(n)&&(e[n]=t.zc[n])},e.prototype.Nl=function(e,t){var n=Xa[e];return this.Dl+"/v1/"+t+":"+n},e}()),Za=function(){function e(){var e=this;this.xl=function(){return e.kl()},this.Ml=function(){return e.Ol()},this.Ll=[],this.Bl()}return e.prototype.eh=function(e){this.Ll.push(e)},e.prototype.Si=function(){window.removeEventListener("online",this.xl),window.removeEventListener("offline",this.Ml)},e.prototype.Bl=function(){window.addEventListener("online",this.xl),window.addEventListener("offline",this.Ml)},e.prototype.kl=function(){d("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(var e=0,t=this.Ll;e<t.length;e++)(0,t[e])(0)},e.prototype.Ol=function(){d("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(var e=0,t=this.Ll;e<t.length;e++)(0,t[e])(1)},e.On=function(){return"undefined"!=typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener},e}(),es=function(){function e(){}return e.prototype.eh=function(e){},e.prototype.Si=function(){},e}();function ts(e){return new gt(e,!0)}var ns="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.",rs=function(){function e(){}return e.prototype.initialize=function(e){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(t){switch(t.label){case 0:return this.Ch=this.ql(e),this.persistence=this.Ul(e),[4,this.persistence.start()];case 1:return t.sent(),this.Ql=this.Wl(e),this.Gu=this.jl(e),[2]}}))}))},e.prototype.Wl=function(e){return null},e.prototype.jl=function(e){return t=this.persistence,n=new za,r=e.Kl,new po(t,n,r);var t,n,r},e.prototype.Ul=function(e){if(e.persistenceSettings.Gl)throw new h(l.FAILED_PRECONDITION,ns);return new Ka($a.El)},e.prototype.ql=function(e){return new Qr},e.prototype.terminate=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){switch(e.label){case 0:return this.Ql&&this.Ql.stop(),[4,this.Ch.Si()];case 1:return e.sent(),[4,this.persistence.Si()];case 2:return e.sent(),[2]}}))}))},e.prototype.clearPersistence=function(e,t){throw new h(l.FAILED_PRECONDITION,ns)},e}(),is=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.initialize=function(t){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,e.prototype.initialize.call(this,t)];case 1:return o.sent(),n=this.zl._i,this.Ch instanceof Kr?(this.Ch._i={tr:Da.bind(null,n),er:Ua.bind(null,n),nr:Va.bind(null,n),Vi:Fa.bind(null,n)},[4,this.Ch.start()]):[3,3];case 2:o.sent(),o.label=3;case 3:return[4,this.persistence.ec((function(e){return r.__awaiter(i,void 0,void 0,(function(){return r.__generator(this,(function(t){switch(t.label){case 0:return[4,La(this.zl._i,e)];case 1:return t.sent(),this.Ql&&(e&&!this.Ql.Ti?this.Ql.start(this.Gu):e||this.Ql.stop()),[2]}}))}))}))];case 4:return o.sent(),[2]}}))}))},t.prototype.ql=function(e){if(e.persistenceSettings.Gl&&e.persistenceSettings.synchronizeTabs){var t=Sr();
2if(!Kr.On(t))throw new h(l.UNIMPLEMENTED,"IndexedDB persistence is only available on platforms that support LocalStorage.");var n=fo(e.Sl.U,e.Sl.persistenceKey);return new Kr(t,e.os,n,e.clientId,e.Kl)}return new Qr},t}(function(e){function t(t){var n=this;return(n=e.call(this)||this).zl=t,n}return r.__extends(t,e),t.prototype.initialize=function(t){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(n){switch(n.label){case 0:return[4,e.prototype.initialize.call(this,t)];case 1:return n.sent(),[4,function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,n;return r.__generator(this,(function(r){return t=_(e),n=_(t.Fc),[2,t.persistence.runTransaction("Synchronize last document change read time","readonly",(function(e){return n.oa(e)})).then((function(e){t.Nc=e}))]}))}))}(this.Gu)];case 2:return n.sent(),[4,this.zl.initialize(this,t)];case 3:return n.sent(),[4,Ba(this.zl._i)];case 4:return n.sent(),[4,Zo(this.zl.Sh)];case 5:return n.sent(),[2]}}))}))},t.prototype.Wl=function(e){var t=this.persistence.Co.do;return new ai(t,e.os)},t.prototype.Ul=function(e){var t=fo(e.Sl.U,e.Sl.persistenceKey),n=ts(e.Sl.U);return new so(e.persistenceSettings.synchronizeTabs,t,e.clientId,oi.oo(e.persistenceSettings.cacheSizeBytes),e.os,Sr(),Ir(),n,this.Ch,e.persistenceSettings.La)},t.prototype.ql=function(e){return new Qr},t.prototype.clearPersistence=function(e,t){return function(e){return r.__awaiter(this,void 0,void 0,(function(){var t;return r.__generator(this,(function(n){switch(n.label){case 0:return vr.On()?(t=e+"main",[4,vr.delete(t)]):[2,Promise.resolve()];case 1:return n.sent(),[2]}}))}))}(fo(e,t))},t}(rs)),os=function(){function e(){}return e.prototype.initialize=function(e,t){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.Gu?[3,2]:(this.Gu=e.Gu,this.Ch=e.Ch,this.zu=this.Hl(t),this.Sh=this.Yl(t),this.Dh=this.Jl(t),this._i=this.Xl(t),this.Ch.fi=function(e){return ba(n._i,e,1)},this.Sh.Hu.Zl=Aa.bind(null,this._i),[4,aa(this.Sh,this._i.Wh)]);case 1:r.sent(),r.label=2;case 2:return[2]}}
2))}))},e.prototype.Jl=function(e){return new Nr},e.prototype.Hl=function(e){var t,n=ts(e.Sl.U),r=(t=e.Sl,new Ja(t));return function(e,t,n){return new Do(e,t,n)}(e.credentials,r,n)},e.prototype.Yl=function(e){var t,n,r,i,o,a=this;return t=this.Gu,n=this.zu,r=e.os,i=function(e){return ba(a._i,e,0)},o=Za.On()?new Za:new es,new Mo(t,n,r,i,o)},e.prototype.Xl=function(e){return function(e,t,n,r,i,o,a){var s=new da(e,t,n,r,i,o);return a&&(s.Qh=!0),s}(this.Gu,this.Sh,this.Dh,this.Ch,e.Kl,e.Nh,!e.persistenceSettings.Gl||!e.persistenceSettings.synchronizeTabs)},e.prototype.terminate=function(){return Uo(this.Sh)},e}(),as=function(){function e(e){this.observer=e,this.muted=!1}return e.prototype.next=function(e){this.observer.next&&this.t_(this.observer.next,e)},e.prototype.error=function(e){this.observer.error?this.t_(this.observer.error,e):console.error("Uncaught Error in snapshot listener:",e)},e.prototype.e_=function(){this.muted=!0},e.prototype.t_=function(e,t){var n=this;this.muted||setTimeout((function(){n.muted||e(t)}),0)},e}(),ss=function(e){!function(e,t,n,r){if(!(t instanceof Array)||t.length<1)throw new h(l.INVALID_ARGUMENT,"Function FieldPath() requires its fieldNames argument to be an array with at least "+K(1,"element")+".")}(0,e);for(var t=0;t<e.length;++t)if(R("FieldPath","string",t,e[t]),0===e[t].length)throw new h(l.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this.n_=new k(e)},us=function(e){function t(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.call(this,t)||this}return r.__extends(t,e),t.documentId=function(){return new t(k.v().R())},t.prototype.isEqual=function(e){if(!(e instanceof t))throw W("isEqual","FieldPath",1,e);return this.n_.isEqual(e.n_)},t}(ss),cs=new RegExp("[~\\*/\\[\\]]"),ls=function(e){this.s_=e},hs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.i_=function(e){if(2!==e.r_)throw 1===e.r_?e.o_(this.s_+"() can only appear at the top level of your update data"):e.o_(this.s_+"() cannot be used with set() unless you pass {merge:true}");return e.Qe.push(e.path),null},t.prototype.isEqual=function(e){return e instanceof t},t}(ls);function fs(e,t,n){return new Ss({r_:3,a_:t.settings.a_,methodName:e.s_,c_:n},t.U,t.serializer,t.ignoreUndefinedProperties)}var ps=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.i_=function(e){return new sn(e.path,new Xt)},t.prototype.isEqual=function(e){return e instanceof t},t}(ls),ds=function(e){function t(t,n){var r=this;return(r=e.call(this,t)||this).u_=n,r}return r.__extends(t,e),t.prototype.i_=function(e){var t=fs(this,e,!0),n=this.u_.map((function(e){return Ns(e,t)})),r=new Jt(n);return new sn(e.path,r)},t.prototype.isEqual=function(e){return this===e},t}(ls),vs=function(e){function t(t,n){var r=this;return(r=e.call(this,t)||this).u_=n,r}return r.__extends(t,e),t.prototype.i_=function(e){var t=fs(this,e,!0),n=this.u_.map((function(e){return Ns(e,t)})),r=new en(n);return new sn(e.path,r)},t.prototype.isEqual=function(e){return this===e},t}(ls),gs=function(e){function t(t,n){var r=this;return(r=e.call(this,t)||this).h_=n,r}return r.__extends(t,e),t.prototype.i_=function(e){var t=new nn(e.serializer,bt(e.serializer,this.h_));return new sn(e.path,t)},t.prototype.isEqual=function(e){return this===e},t}(ls),ys=function(){function e(e,t){if(N("GeoPoint",arguments,2),R("GeoPoint","number",1,e),R("GeoPoint","number",2,t),!isFinite(e)||e<-90||e>90)throw new h(l.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(t)||t<-180||t>180)throw new h(l.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+t);this.l_=e,this.__=t}return Object.defineProperty(e.prototype,"latitude",{get:function(){return this.l_},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"longitude",{get:function(){return this.__},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(e){return this.l_===e.l_&&this.__===e.__},e.prototype.toJSON=function(){return{latitude:this.l_,longitude:this.__}},e.prototype.H=function(e){return Y(this.l_,e.l_)||Y(this.__,e.__)},e}(),ms=function(e){this.f_=e},bs=/^__.*__$/,_s=function(e,t,n){this.d_=e,this.w_=t,this.m_=n},ws=function(){function e(e,t,n){this.data=e,this.Qe=t,this.fieldTransforms=n}return e.prototype.T_=function(e,t){var n=[];return null!==this.Qe?n.push(new mn(e,this.data,this.Qe,t)):n.push(new yn(e,this.data,t)),this.fieldTransforms.length>0&&n.push(new _n(e,this.fieldTransforms)),n},e}(),Es=function(){function e(e,t,n){this.data=e,this.Qe=t,this.fieldTransforms=n}return e.prototype.T_=function(e,t){var n=[new mn(e,this.data,this.Qe,t)];return this.fieldTransforms.length>0&&n.push(new _n(e,this.fieldTransforms)),n},e}();function Ts(e){switch(e){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw m()}}var Ss=function(){function e(e,t,n,r,i,o){this.settings=e,this.U=t,this.serializer
2=n,this.ignoreUndefinedProperties=r,void 0===i&&this.E_(),this.fieldTransforms=i||[],this.Qe=o||[]}return Object.defineProperty(e.prototype,"path",{get:function(){return this.settings.path},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"r_",{get:function(){return this.settings.r_},enumerable:!1,configurable:!0}),e.prototype.I_=function(t){return new e(Object.assign(Object.assign({},this.settings),t),this.U,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.Qe)},e.prototype.A_=function(e){var t,n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.I_({path:n,c_:!1});return r.R_(e),r},e.prototype.P_=function(e){var t,n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.I_({path:n,c_:!1});return r.E_(),r},e.prototype.g_=function(e){return this.I_({path:void 0,c_:!0})},e.prototype.o_=function(e){return Ms(e,this.settings.methodName,this.settings.y_||!1,this.path,this.settings.a_)},e.prototype.contains=function(e){return void 0!==this.Qe.find((function(t){return e.T(t)}))||void 0!==this.fieldTransforms.find((function(t){return e.T(t.field)}))},e.prototype.E_=function(){if(this.path)for(var e=0;e<this.path.length;e++)this.R_(this.path.get(e))},e.prototype.R_=function(e){if(0===e.length)throw this.o_("Document fields must not be empty");if(Ts(this.r_)&&bs.test(e))throw this.o_('Document fields cannot begin and end with "__"')},e}(),Is=function(){function e(e,t,n){this.U=e,this.ignoreUndefinedProperties=t,this.serializer=n||ts(e)}return e.prototype.V_=function(e,t,n,r){return void 0===r&&(r=!1),new Ss({r_:e,methodName:t,a_:n,path:k.g(),c_:!1,y_:r},this.U,this.serializer,this.ignoreUndefinedProperties)},e}();function Cs(e,t,n,r,i,o){void 0===o&&(o={});var a=e.V_(o.merge||o.mergeFields?2:0,t,n,i);Rs("Data must be an object, but it was:",a,r);var s,u,c=As(r,a);if(o.merge)s=new an(a.Qe),u=a.fieldTransforms;else if(o.mergeFields){for(var f=[],p=0,d=o.mergeFields;p<d.length;p++){var v=d[p],g=void 0;if(v instanceof ss)g=v.n_;else{if("string"!=typeof v)throw m();g=Ls(t,v,n)}if(!a.contains(g))throw new h(l.INVALID_ARGUMENT,"Field '"+g+"' is specified in your field mask but missing from your input data.");js(f,g)||f.push(g)}s=new an(f),u=a.fieldTransforms.filter((function(e){return s.He(e.field)}))}else s=null,u=a.fieldTransforms;return new ws(new In(c),s,u)}function ks(e,t,n,r){var i=e.V_(1,t,n);Rs("Data must be an object, but it was:",i,r);var o=[],a=new Cn;E(r,(function(e,r){var s=Ls(t,e,n),u=i.P_(s);if(r instanceof hs||r instanceof ms&&r.f_ instanceof hs)o.push(s);else{var c=Ns(r,u);null!=c&&(o.push(s),a.set(s,c))}}));var s=new an(o);return new Es(a.Je(),s,i.fieldTransforms)}function xs(e,t,n,r,i,o){var a=e.V_(1,t,n),s=[Ds(t,r,n)],u=[i];if(o.length%2!=0)throw new h(l.INVALID_ARGUMENT,"Function "+t+"() needs to be called with an even number of arguments that alternate between field names and values.");for(var c=0;c<o.length;c+=2)s.push(Ds(t,o[c])),u.push(o[c+1]);for(var f=[],p=new Cn,d=s.length-1;d>=0;--d)if(!js(f,s[d])){var v=s[d],g=u[d],y=a.P_(v);if(g instanceof hs||g instanceof ms&&g.f_ instanceof hs)f.push(v);else{var m=Ns(g,y);null!=m&&(f.push(v),p.set(v,m))}}var b=new an(f);return new Es(p.Je(),b,a.fieldTransforms)}function Os(e,t,n,r){return void 0===r&&(r=!1),Ns(n,e.V_(r?4:3,t))}function Ns(e,t){if(e instanceof ms&&(e=e.f_),Ps(e))return Rs("Unsupported field value:",t,e),As(e,t);if(e instanceof ls)return function(e,t){if(!Ts(t.r_))throw t.o_(e.s_+"() can only be used with update() and set()");if(!t.path)throw t.o_(e.s_+"() is not currently supported inside arrays");var n=e.i_(t);n&&t.fieldTransforms.push(n)}(e,t),null;if(t.path&&t.Qe.push(t.path),e instanceof Array){if(t.settings.c_&&4!==t.r_)throw t.o_("Nested arrays are not supported");return function(e,t){for(var n=[],r=0,i=0,o=e;i<o.length;i++){var a=Ns(o[i],t.g_(r));null==a&&(a={nullValue:"NULL_VALUE"}),n.push(a),r++}return{arrayValue:{values:n}}}(e,t)}return function(e,t){if(null===e)return{nullValue:"NULL_VALUE"};if("number"==typeof e)return bt(t.serializer,e);if("boolean"==typeof e)return{booleanValue:e};if("string"==typeof e)return{stringValue:e};if(e instanceof Date){var n=se.fromDate(e);return{timestampValue:_t(t.serializer,n)}}if(e instanceof se){var r=new se(e.seconds,1e3*Math.floor(e.nanoseconds/1e3));return{timestampValue:_t(t.serializer,r)}}if(e instanceof ys)return{geoPointValue:{latitude:e.latitude,longitude:e.longitude}};if(e instanceof ee)return{bytesValue:wt(t.serializer,e.q)};if(e instanceof _s){var i=t.U,o=e.d_;if(!o.isEqual(i))throw t.o_("Document reference is for database "+o.projectId+"/"+o.database+" but should be for database "+i.projectId+"/"+i.database);return{referenceValue:St(e.d_||t.U,e.w_.path)}}if(void 0===e&&t.ignoreUndefinedProperties)return null;throw t.o_("Unsupported field value: "+q(e))}(e,t)}function As(e,t){var n={};return T(e)?t.path&&t.path.length>0&&t.Qe.push(t.path):E(e,(function(e,r){var i=Ns(r,t.A_(e));null!=i&&(n[e]=i)})),{mapValue:{fields:n}}}function Ps(e){return!("object"!=typeof e||null===e||e instanceof Array||e instanceof Date||e instanceof se||e instanceof ys||e instanceof ee||e instanceof _s||e instanceof ls)}function Rs(e,t,n){if(!Ps(n)||!V(n)){var r=q(n);throw"an object"===r?t.o_(e+" a custom object"):t.o_(e+" "+r)}}function Ds(e,t,n){if(t instanceof ss)return t.n_;if("string"==typeof t)return Ls(e,t);throw Ms("Field path arguments must be of type string or FieldPath.",e,!1,void 0,n)}function Ls(e,t,n){try{return function(e){if(e.search(cs)>=0)throw new h(l.INVALID_ARGUMENT,"Invalid field path ("+e+"). Paths must not contain '~', '*', '/', '[', or ']'");try{return new(us.bind.apply(us,r.__spreadArrays([void 0],e.split("."))))}catch(r){throw new h(l.INVALID_ARGUMENT,"Invalid field path ("+e+"). Paths must not be empty, begin with '.', end with '.', or contain '..'")}}(t).n_}catch(t){throw Ms((i=t)instanceof Error?i.message:i.toString(),e,!1,void 0,n)}var i}function Ms(e,t,n,r,i){var o=r&&!r.m(),a=void 0!==i,s="Function "+t+"() called with invali
2d data";n&&(s+=" (via `toFirestore()`)");var u="";return(o||a)&&(u+=" (found",o&&(u+=" in field "+r),a&&(u+=" in document "+i),u+=")"),new h(l.INVALID_ARGUMENT,(s+=". ")+e+u)}function js(e,t){return e.some((function(e){return e.isEqual(t)}))}var Fs=function(){function e(e){this.zu=e,this.p_=new Map,this.mutations=[],this.b_=!1,this.v_=null,this.S_=new Set}return e.prototype.D_=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,n=this;return r.__generator(this,(function(i){switch(i.label){case 0:if(this.C_(),this.mutations.length>0)throw new h(l.INVALID_ARGUMENT,"Firestore transactions require all reads to be executed before all writes.");return[4,function(e,t){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=_(e),i=Nt(n.serializer)+"/documents",o={documents:t.map((function(e){return Ct(n.serializer,e)}))},[4,n.Ou("BatchGetDocuments",i,o)];case 1:return a=r.sent(),s=new Map,a.forEach((function(e){var t=function(e,t){return"found"in t?function(e,t){b(!!t.found),t.found.name,t.found.updateTime;var n=kt(e,t.found.name),r=Tt(t.found.updateTime),i=new In({mapValue:{fields:t.found.fields}});return new On(n,r,i,{})}(e,t):"missing"in t?function(e,t){b(!!t.missing),b(!!t.readTime);var n=kt(e,t.missing),r=Tt(t.readTime);return new Nn(n,r)}(e,t):m()}(n.serializer,e);s.set(t.key.toString(),t)})),u=[],[2,(t.forEach((function(e){var t=s.get(e.toString());b(!!t),u.push(t)})),u)]}}))}))}(this.zu,e)];case 1:return[2,((t=i.sent()).forEach((function(e){e instanceof Nn||e instanceof On?n.N_(e):m()})),t)]}}))}))},e.prototype.set=function(e,t){this.write(t.T_(e,this.Ke(e))),this.S_.add(e.toString())},e.prototype.update=function(e,t){try{this.write(t.T_(e,this.F_(e)))}catch(e){this.v_=e}this.S_.add(e.toString())},e.prototype.delete=function(e){this.write([new Tn(e,this.Ke(e))]),this.S_.add(e.toString())},e.prototype.commit=function(){return r.__awaiter(this,void 0,void 0,(function(){var e,t=this;return r.__generator(this,(function(n){switch(n.label){case 0:if(this.C_(),this.v_)throw this.v_;return e=this.p_,this.mutations.forEach((function(t){e.delete(t.key.toString())})),e.forEach((function(e,n){var r=x.D(n);t.mutations.push(new Sn(r,t.Ke(r)))})),[4,function(e,t){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=_(e),i=Nt(n.serializer)+"/documents",o={writes:t.map((function(e){return Rt(n.serializer,e)}))},[4,n.Mu("Commit",i,o)];case 1:return r.sent(),[2]}}))}))}(this.zu,this.mutations)];case 1:return n.sent(),this.b_=!0,[2]}}))}))},e.prototype.N_=function(e){var t;if(e instanceof On)t=e.version;else{if(!(e instanceof Nn))throw m();t=ue.min()}var n=this.p_.get(e.key.toString());if(n){if(!t.isEqual(n))throw new h(l.ABORTED,"Document version changed between two reads.")}else this.p_.set(e.key.toString(),t)},e.prototype.Ke=function(e){var t=this.p_.get(e.toString());return!this.S_.has(e.toString())&&t?cn.updateTime(t):cn.Ge()},e.prototype.F_=function(e){var t=this.p_.get(e.toString());if(!this.S_.has(e.toString())&&t){if(t.isEqual(ue.min()))throw new h(l.INVALID_ARGUMENT,"Can't update a document that doesn't exist.");return cn.updateTime(t)}return cn.exists(!0)},e.prototype.write=function(e){this.C_(),this.mutations=this.mutations.concat(e)},e.prototype.C_=function(){},e}(),Us=function(){function e(e,t,n,r){this.os=e,this.zu=t,this.updateFunction=n,this.hs=r,this.x_=5,this.gs=new pr(this.os,"transaction_retry")}return e.prototype.run=function(){this.k_()},e.prototype.k_=function(){var e=this;this.gs.Rn((function(){return r.__awaiter(e,void 0,void 0,(function(){var e,t,n=this;return r.__generator(this,(function(r){return e=new Fs(this.zu),(t=this.M_(e))&&t.then((function(t){n.os.ds((function(){return e.commit().then((function(){n.hs.resolve(t)})).catch((function(e){n.O_(e)}))}))})).catch((function(e){n.O_(e)})),[2]}))}))}))},e.prototype.M_=function(e){try{var t=this.updateFunction(e);return!ce(t)&&t.catch&&t.then?t:(this.hs.reject(Error("Transaction callback must return a Promise")),null)}catch(e){return this.hs.reject(e),null}},e.prototype.O_=function(e){var t=this;this.x_>0&&this.L_(e)?(this.x_-=1,this.os.ds((function(){return t.k_(),Promise.resolve()}))):this.hs.reject(e)},e.prototype.L_=function(e){if("FirebaseError"===e.name){var t=e.code;return"aborted"===t||"failed-precondition"===t||!we(t)}return!1},e}(),Vs=function(){function e(e,t){this.credentials=e,this.os=t,this.clientId=$.k(),this.B_=new fr}return e.prototype.start=function(e,t,n,i){var o=this;this.q_(),this.Sl=e;var a=new fr,s=!1;return this.credentials.Jc((function(e){if(!s)return s=!0,d("FirestoreClient","Initializing. user=",e.uid),o.U_(t,n,i,e,a).then(o.B_.resolve,o.B_.reject);o.os.Ds((function(){return function(e,t){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=_(e)).os.Fs(),d("RemoteStore","RemoteStore received new credentials"),i=Go(n),n.Xu.add(3),[4,Fo(n)];case 1:return r.sent(),i&&n.nh.set("Unknown"),[4,n.Hu.Zl(t)];case 2:return r.sent(),n.Xu.delete(3),[4,jo(n)];case 3:return r.sent(),[2]}}))}))}(o.Sh,e)}))})),this.os.ds((function(){return o.B_.promise})),a.promise},e.prototype.enableNetwork=function(){var e=this;return this.q_(),this.os.enqueue((function(){return e.persistence.sc(!0),function(e){var t=_(e);return t.Xu.delete(0),jo(t)}(e.Sh)}))},e.prototype.U_=function(e,t,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={os:this.os,Sl:this.Sl,clientId:this.clientId,credentials:this.credentials,Kl:i,Nh:100,persistenceSettings:n},[4,e.initialize(a)];case 1:return c.sent(),[4,t.initialize(e,a)];case 2:return c.sent(),this.persistence=e.persistence,this.Ch=e.Ch,this.Gu=e.Gu,this.Ql=e.Ql,this.zu=t.zu,this.Sh=t.Sh,this._i=t._i,this.Q_=t.Dh,this.Q_.qs=va.bind(null,this._i),this.Q_.Ws=ya.bind(null,this._i),this.persistence.nc((function(){return r.__awaiter(u,void 0,void 0,(function(){return r.__generator(this,(function(e){switch(e.label){case 0:return[4,this.terminate()];case 1:return e.sent(),[2]}}))}))})),o.resolve(),[3,4];case 3:if(s=c.sent(),o.reject(s),!this.W_(s))throw s;return[2,(console.warn("Error enabling offline persistence. Falling back to persistence disabled: "+s),this.U_(new rs,new os,{Gl:!1},i,o))];case 4:return[2]}}
2))}))},e.prototype.W_=function(e){return"FirebaseError"===e.name?e.code===l.FAILED_PRECONDITION||e.code===l.UNIMPLEMENTED:!("undefined"!=typeof DOMException&&e instanceof DOMException)||22===e.code||20===e.code||11===e.code},e.prototype.q_=function(){if(this.os.Vs)throw new h(l.FAILED_PRECONDITION,"The client has already been terminated.")},e.prototype.disableNetwork=function(){var e=this;return this.q_(),this.os.enqueue((function(){return e.persistence.sc(!1),function(e){return r.__awaiter(this,void 0,void 0,(function(){var t;return r.__generator(this,(function(n){switch(n.label){case 0:return(t=_(e)).Xu.add(0),[4,Fo(t)];case 1:return n.sent(),t.nh.set("Offline"),[2]}}))}))}(e.Sh)}))},e.prototype.terminate=function(){var e=this;this.os.Ss();var t=new fr;return this.os.ps((function(){return r.__awaiter(e,void 0,void 0,(function(){var e,n;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,4,,5]),this.Ql&&this.Ql.stop(),[4,Uo(this.Sh)];case 1:return r.sent(),[4,this.Ch.Si()];case 2:return r.sent(),[4,this.persistence.Si()];case 3:return r.sent(),this.credentials.Xc(),t.resolve(),[3,5];case 4:return e=r.sent(),n=xr(e,"Failed to shutdown persistence"),t.reject(n),[3,5];case 5:return[2]}}
2))}))})),t.promise},e.prototype.waitForPendingWrites=function(){var e=this;this.q_();var t=new fr;return this.os.ds((function(){return function(e,t){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:Go((n=_(e)).Sh)||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(e){var t=_(e);return t.persistence.runTransaction("Get highest unacknowledged batch id","readonly",(function(e){return t.vr.Bo(e)}))}(n.Gu)];case 2:return-1===(i=r.sent())?[2,void t.resolve()]:((o=n.qh.get(i)||[]).push(t),n.qh.set(i,o),[3,4]);case 3:return a=r.sent(),s=xr(a,"Initialization of waitForPendingWrites() operation failed"),t.reject(s),[3,4];case 4:return[2]}}))}))}(e._i,t)})),t.promise},e.prototype.listen=function(e,t,n){var r=this;this.q_();var i=new as(n),o=new Mr(e,i,t);return this.os.ds((function(){return Ar(r.Q_,o)})),function(){i.e_(),r.os.ds((function(){return Pr(r.Q_,o)}))}},e.prototype.j_=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,n=this;return r.__generator(this,(function(i){switch(i.label){case 0:return this.q_(),[4,this.B_.promise];case 1:return i.sent(),t=new fr,[2,(this.os.ds((function(){return function(e,t,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(e,t){var n=_(e);return n.persistence.runTransaction("read document","readonly",(function(e){return n.$c.Dr(e,t)}))}(e,t)];case 1:return(i=r.sent())instanceof On?n.resolve(i):i instanceof Nn?n.resolve(null):n.reject(new h(l.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=xr(o,"Failed to get document '"+t+" from cache"),n.reject(a),[3,3];case 3:return[2]}}
2))}))}(n.Gu,e,t)})),t.promise)]}}))}))},e.prototype.K_=function(e,t){return void 0===t&&(t={}),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.q_(),[4,this.B_.promise];case 1:return r.sent(),n=new fr,[2,(this.os.ds((function(){return function(e,t,n,r,i){var o=new as({next:function(o){t.ds((function(){return Pr(e,a)}));var s=o.docs.has(n);!s&&o.fromCache?i.reject(new h(l.UNAVAILABLE,"Failed to get document because the client is offline.")):s&&o.fromCache&&r&&"server"===r.source?i.reject(new h(l.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(e){return i.reject(e)}}),a=new Mr(Dn(n.path),o,{includeMetadataChanges:!0,Js:!0});return Ar(e,a)}(i.Q_,i.os,e,t,n)})),n.promise)]}}))}))},e.prototype.G_=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,n=this;return r.__generator(this,(function(i){switch(i.label){case 0:return this.q_(),[4,this.B_.promise];case 1:return i.sent(),t=new fr,[2,(this.os.ds((function(){return function(e,t,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,wo(e,t,!0)];case 1:return i=r.sent(),o=new ha(t,i.kc),a=o.Th(i.documents),s=o.gr(a,!1),n.resolve(s.snapshot),[3,3];case 2:return u=r.sent(),c=xr(u,"Failed to execute query '"+t+" against cache"),n.reject(c),[3,3];case 3:return[2]}}
2))}))}(n.Gu,e,t)})),t.promise)]}}))}))},e.prototype.z_=function(e,t){return void 0===t&&(t={}),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.q_(),[4,this.B_.promise];case 1:return r.sent(),n=new fr,[2,(this.os.ds((function(){return function(e,t,n,r,i){var o=new as({next:function(n){t.ds((function(){return Pr(e,a)})),n.fromCache&&"server"===r.source?i.reject(new h(l.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(e){return i.reject(e)}}),a=new Mr(n,o,{includeMetadataChanges:!0,Js:!0});return Ar(e,a)}(i.Q_,i.os,e,t,n)})),n.promise)]}}))}))},e.prototype.write=function(e){var t=this;this.q_();var n=new fr;return this.os.ds((function(){return function(e,t,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=Ba(e),r.label=1;case 1:return r.trys.push([1,5,,6]),[4,function(e,t){var n,r=_(e),i=se.now(),o=t.reduce((function(e,t){return e.add(t.key)}),Le());return r.persistence.runTransaction("Locally write mutations","readwrite",(function(e){return r.$c.$r(e,o).next((function(o){n=o;for(var a=[],s=0,u=t;s<u.length;s++){var c=u[s],l=dn(c,n.get(c.key));null!=l&&a.push(new mn(c.key,l,kn(l.proto.mapValue),cn.exists(!0)))}return r.vr.xo(e,i,a,t)}))})).then((function(e){var t=e.hr(n);return{batchId:e.batchId,dr:t}}))}(i.Gu,t)];case 2:return o=r.sent(),i.Ch.Fi(o.batchId),function(e,t,n){var r=e.Bh[e.currentUser.Zs()];r||(r=new Te(Y)),r=r.rt(t,n),e.Bh[e.currentUser.Zs()]=r}(i,o.batchId,n),[4,Na(i,o.dr)];case 3:return r.sent(),[4,Zo(i.Sh)];case 4:return r.sent(),[3,6];case 5:return a=r.sent(),s=xr(a,"Failed to persist write"),n.reject(s),[3,6];case 6:return[2]}}
2))}))}(t._i,e,n)})),n.promise},e.prototype.U=function(){return this.Sl.U},e.prototype.H_=function(e){var t=this;this.q_();var n=new as(e);return this.os.ds((function(){return r.__awaiter(t,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,function(e,t){_(e).Bs.add(t),t.next()}(this.Q_,n)]}))}))})),function(){n.e_(),t.os.ds((function(){return r.__awaiter(t,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,function(e,t){_(e).Bs.delete(t)}(this.Q_,n)]}))}))}))}},Object.defineProperty(e.prototype,"Y_",{get:function(){return this.os.Vs},enumerable:!1,configurable:!0}),e.prototype.transaction=function(e){var t=this;this.q_();var n=new fr;return this.os.ds((function(){return new Us(t.os,t.zu,e,n).run(),Promise.resolve()})),n.promise},e}();function qs(e){return function(e,t){if("object"!=typeof e||null===e)return!1;for(var n=e,r=0,i=["next","error","complete"];r<i.length;r++){var o=i[r];if(o in n&&"function"==typeof n[o])return!0}return!1}(e)}var Bs=function(){function e(e,t,n,r,i){this.U=e,this.timestampsInSnapshots=t,this.J_=n,this.X_=r,this.Z_=i}return e.prototype.tf=function(e){switch(Ze(e)){case 0:return null;case 1:return e.booleanValue;case 2:return at(e.integerValue||e.doubleValue);case 3:return this.ef(e.timestampValue);case 4:return this.nf(e);case 5:return e.stringValue;case 6:return this.Z_(st(e.bytesValue));case 7:return this.sf(e.referenceValue);case 8:return this.if(e.geoPointValue);case 9:return this.rf(e.arrayValue);case 10:return this.af(e.mapValue);default:throw m()}},e.prototype.af=function(e){var t=this,n={};return E(e.fields||{},(function(e,r){n[e]=t.tf(r)})),n},e.prototype.if=function(e){return new ys(at(e.latitude),at(e.longitude))},e.prototype.rf=function(e){var t=this;return(e.values||[]).map((function(e){return t.tf(e)}))},e.prototype.nf=function(e){switch(this.J_){case"previous":var t=function e(t){var n=t.mapValue.fields.__previous_value__;return Ye(n)?e(n):n}(e);return null==t?null:this.tf(t);case"estimate":return this.ef(Xe(e));default:return null}},e.prototype.ef=function(e){var t=ot(e),n=new se(t.seconds,t.nanos);return this.timestampsInSnapshots?n:n.toDate()},e.prototype.sf=function(e){var t=I.P(e);b(Gt(t));var n=new oe(t.get(1),t.get(3)),r=new x(t.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.X_(r)},e}(),zs=oi.uo,Ws=function(){function e(e){var t,n,r,i;if(void 0===e.host){if(void 0!==e.ssl)throw new h(l.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",e.host),this.host=e.host,M("settings","boolean","ssl",e.ssl),this.ssl=null===(t=e.ssl)||void 0===t||t;if(z("settings",e,["host","ssl","credentials","timestampsInSnapshots","cacheSizeBytes","experimentalForceLongPolling","ignoreUndefinedProperties"]),M("settings","object","credentials",e.credentials),this.credentials=e.credentials,M("settings","boolean","timestampsInSnapshots",e.timestampsInSnapshots),M("settings","boolean","ignoreUndefinedProperties",e.ignoreUndefinedProperties),!0===e.timestampsInSnapshots?v("The setting 'timestampsInSnapshots: true' is no longer required and should be removed."):!1===e.timestampsInSnapshots&&v("Support for 'timestampsInSnapshots: false' will be removed soon. You must update your code to handle Timestamp objects."),this.timestampsInSnapshots=null===(n=e.timestampsInSnapshots)||void 0===n||n,this.ignoreUndefinedProperties=null!==(r=e.ignoreUndefinedProperties)&&void 0!==r&&r,M("settings","number","cacheSizeBytes",e.cacheSizeBytes),void 0===e.cacheSizeBytes)this.cacheSizeBytes=oi.lo;else{if(e.cacheSizeBytes!==zs&&e.cacheSizeBytes<oi.ho)throw new h(l.INVALID_ARGUMENT,"cacheSizeBytes must be at least "+oi.ho);this.cacheSizeBytes=e.cacheSizeBytes}M("settings","boolean","experimentalForceLongPolling",e.experimentalForceLongPolling),this.experimentalForceLongPolling=null!==(i=e.experimentalForceLongPolling)&&void 0!==i&&i}return e.prototype.isEqual=function(e){return this.host===e.host&&this.ssl===e.ssl&&this.timestampsInSnapshots===e.timestampsInSnapshots&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties},e}(),Hs=function(){function e(t,n,i,o){var a=this;if(void 0===i&&(i=new rs),void 0===o&&(o=new os),this.cf=i,this.uf=o,this.hf=null,this.lf=new kr,this.INTERNAL={delete:function(){return r.__awaiter(a,void 0,void 0,(function(){return r.__generator(this,(function(e){switch(e.label){case 0:return this._f(),[4,this.ff.terminate()];case 1:return e.sent(),[2]}}))}))}},"object"==typeof t.options){var s=t;this.hf=s,this.d_=e.df(s),this.wf=s.name,this.mf=new xo(n)}else{var u=t;if(!u.projectId)throw new h(l.INVALID_ARGUMENT,"Must provide projectId");this.d_=new oe(u.projectId,u.database),this.wf="[DEFAULT]",this.mf=new ko}this.Tf=new Ws({})}return Object.defineProperty(e.prototype,"Ef",{get:function(){return this.If||(this.If=new Is(this.d_,this.Tf.ignoreUndefinedProperties)),this.If}
2,enumerable:!1,configurable:!0}),e.prototype.settings=function(e){N("Firestore.settings",arguments,1),R("Firestore.settings","object",1,e),e.merge&&delete(e=Object.assign(Object.assign({},this.Tf),e)).merge;var t=new Ws(e);if(this.ff&&!this.Tf.isEqual(t))throw new h(l.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.Tf=t,void 0!==t.credentials&&(this.mf=function(e){if(!e)return new ko;switch(e.type){case"gapi":var t=e.client;return b(!("object"!=typeof t||null===t||!t.auth||!t.auth.getAuthHeaderValueForFirstParty)),new No(t,e.sessionIndex||"0");case"provider":return e.client;default:throw new h(l.INVALID_ARGUMENT,"makeCredentialsProvider failed due to invalid credential type")}}(t.credentials))},e.prototype.enableNetwork=function(){return this._f(),this.ff.enableNetwork()},e.prototype.disableNetwork=function(){return this._f(),this.ff.disableNetwork()},e.prototype.enablePersistence=function(e){var t,n;if(this.ff)throw new h(l.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(e&&(void 0!==e.experimentalTabSynchronization&&v("The 'experimentalTabSynchronization' setting will be removed. Use 'synchronizeTabs' instead."),r=null!==(n=null!==(t=e.synchronizeTabs)&&void 0!==t?t:e.experimentalTabSynchronization)&&void 0!==n&&n,i=!!e.experimentalForceOwningTab&&e.experimentalForceOwningTab,r&&i))throw new h(l.INVALID_ARGUMENT,"The 'experimentalForceOwningTab' setting cannot be used with 'synchronizeTabs'.");return this.Af(this.cf,this.uf,{Gl:!0,cacheSizeBytes:this.Tf.cacheSizeBytes,synchronizeTabs:r,La:i})},e.prototype.clearPersistence=function(){return r.__awaiter(this,void 0,void 0,(function(){var e,t=this;return r.__generator(this,(function(n){if(void 0!==this.ff&&!this.ff.Y_)throw new h(l.FAILED_PRECONDITION,"Persistence can only be cleared before a Firestore instance is initialized or after it is terminated.");return e=new fr,[2,(this.lf.ps((function(){return r.__awaiter(t,void 0,void 0,(function(){var t;return r.__generator(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.cf.clearPersistence(this.d_,this.wf)];case 1:return n.sent(),e.resolve(),[3,3];case 2:return t=n.sent(),e.reject(t),[3,3];case 3:return[2]}}
2))}))})),e.promise)]}))}))},e.prototype.terminate=function(){return this.app._removeServiceInstance("firestore"),this.INTERNAL.delete()},Object.defineProperty(e.prototype,"Rf",{get:function(){return this._f(),this.ff.Y_},enumerable:!1,configurable:!0}),e.prototype.waitForPendingWrites=function(){return this._f(),this.ff.waitForPendingWrites()},e.prototype.onSnapshotsInSync=function(e){if(this._f(),qs(e))return this.ff.H_(e);R("Firestore.onSnapshotsInSync","function",1,e);var t={next:e};return this.ff.H_(t)},e.prototype._f=function(){return this.ff||this.Af(new rs,new os,{Gl:!1}),this.ff},e.prototype.Pf=function(){return new ie(this.d_,this.wf,this.Tf.host,this.Tf.ssl,this.Tf.experimentalForceLongPolling)},e.prototype.Af=function(e,t,n){var r=this.Pf();return this.ff=new Vs(this.mf,this.lf),this.ff.start(r,e,t,n)},e.df=function(e){if(t=e.options,!Object.prototype.hasOwnProperty.call(t,"projectId"))throw new h(l.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');var t,n=e.options.projectId;if(!n||"string"!=typeof n)throw new h(l.INVALID_ARGUMENT,"projectId must be a string in FirebaseApp.options");return new oe(n)},Object.defineProperty(e.prototype,"app",{get:function(){if(!this.hf)throw new h(l.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this.hf},enumerable:!1,configurable:!0}),e.prototype.collection=function(e){return N("Firestore.collection",arguments,1),R("Firestore.collection","non-empty string",1,e),this._f(),new au(I.P(e),this,null)},e.prototype.doc=function(e){return N("Firestore.doc",arguments,1),R("Firestore.doc","non-empty string",1,e),this._f(),Qs.gf(I.P(e),this,null)},e.prototype.collectionGroup=function(e){if(N("Firestore.collectionGroup",arguments,1),R("Firestore.collectionGroup","non-empty string",1,e),e.indexOf("/")>=0)throw new h(l.INVALID_ARGUMENT,"Invalid collection ID '"+e+"' passed to function Firestore.collectionGroup(). Collection IDs must not contain '/'.");return this._f(),new iu(function(e){return new Pn(I.g(),e)}(e),this,null)},e.prototype.runTransaction=function(e){var t=this;return N("Firestore.runTransaction",arguments,1),R("Firestore.runTransaction","function",1,e),this._f().transaction((function(n){return e(new Gs(t,n))}))},e.prototype.batch=function(){return this._f(),new Ks(this)},Object.defineProperty(e,"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}),e.setLogLevel=function(e){var t;N("Firestore.setLogLevel",arguments,1),F("setLogLevel",["debug","error","silent","warn","info","verbose"],1,e),t=e,f.setLogLevel(t)},e.prototype.yf=function(){return this.Tf.timestampsInSnapshots},e.prototype.Vf=function(){return this.Tf},e}(),Gs=function(){function e(e,t){this.pf=e,this.bf=t}return e.prototype.get=function(e){var t=this;N("Transaction.get",arguments,1);var n=lu("Transaction.get",e,this.pf);return this.bf.D_([n.w_]).then((function(e){if(!e||1!==e.length)return m();var r=e[0];if(r instanceof Nn)return new Ys(t.pf,n.w_,null,!1,!1,n.m_);if(r instanceof On)return new Ys(t.pf,n.w_,r,!1,!1,n.m_);throw m()}
2))},e.prototype.set=function(e,t,n){P("Transaction.set",arguments,2,3);var r=lu("Transaction.set",e,this.pf);n=su("Transaction.set",n);var i=fu(r.m_,t,n),o=Cs(this.pf.Ef,"Transaction.set",r.w_,i,null!==r.m_,n);return this.bf.set(r.w_,o),this},e.prototype.update=function(e,t,n){for(var r,i,o=[],a=3;a<arguments.length;a++)o[a-3]=arguments[a];return"string"==typeof t||t instanceof us?(A("Transaction.update",arguments,3),r=lu("Transaction.update",e,this.pf),i=xs(this.pf.Ef,"Transaction.update",r.w_,t,n,o)):(N("Transaction.update",arguments,2),r=lu("Transaction.update",e,this.pf),i=ks(this.pf.Ef,"Transaction.update",r.w_,t)),this.bf.update(r.w_,i),this},e.prototype.delete=function(e){N("Transaction.delete",arguments,1);var t=lu("Transaction.delete",e,this.pf);return this.bf.delete(t.w_),this},e}(),Ks=function(){function e(e){this.pf=e,this.vf=[],this.Sf=!1}return e.prototype.set=function(e,t,n){P("WriteBatch.set",arguments,2,3),this.Df();var r=lu("WriteBatch.set",e,this.pf);n=su("WriteBatch.set",n);var i=fu(r.m_,t,n),o=Cs(this.pf.Ef,"WriteBatch.set",r.w_,i,null!==r.m_,n);return this.vf=this.vf.concat(o.T_(r.w_,cn.Ge())),this},e.prototype.update=function(e,t,n){for(var r,i,o=[],a=3;a<arguments.length;a++)o[a-3]=arguments[a];return this.Df(),"string"==typeof t||t instanceof us?(A("WriteBatch.update",arguments,3),r=lu("WriteBatch.update",e,this.pf),i=xs(this.pf.Ef,"WriteBatch.update",r.w_,t,n,o)):(N("WriteBatch.update",arguments,2),r=lu("WriteBatch.update",e,this.pf),i=ks(this.pf.Ef,"WriteBatch.update",r.w_,t)),this.vf=this.vf.concat(i.T_(r.w_,cn.exists(!0))),this},e.prototype.delete=function(e){N("WriteBatch.delete",arguments,1),this.Df();var t=lu("WriteBatch.delete",e,this.pf);return this.vf=this.vf.concat(new Tn(t.w_,cn.Ge())),this},e.prototype.commit=function(){return this.Df(),this.Sf=!0,this.vf.length>0?this.pf._f().write(this.vf):Promise.resolve()},e.prototype.Df=function(){if(this.Sf)throw new h(l.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")},e}(),Qs=function(e){function t(t,n,r){var i=this;return(i=e.call(this,n.d_,t,r)||this).w_=t,i.firestore=n,i.m_=r,i.ff=i.firestore._f(),i}return r.__extends(t,e),t.gf=function(e,n,r){if(e.length%2!=0)throw new h(l.INVALID_ARGUMENT,"Invalid document reference. Document references must have an even number of segments, but "+e.R()+" has "+e.length);return new t(new x(e),n,r)},Object.defineProperty(t.prototype,"id",{get:function(){return this.w_.path._()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return new au(this.w_.path.h(),this.firestore,this.m_)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return this.w_.path.R()},enumerable:!1,configurable:!0}),t.prototype.collection=function(e){if(N("DocumentReference.collection",arguments,1),R("DocumentReference.collection","non-empty string",1,e),!e)throw new h(l.INVALID_ARGUMENT,"Must provide a non-empty collection name to collection()");var t=I.P(e);return new au(this.w_.path.child(t),this.firestore,null)},t.prototype.isEqual=function(e){if(!(e instanceof t))throw W("isEqual","DocumentReference",1,e);return this.firestore===e.firestore&&this.w_.isEqual(e.w_)&&this.m_===e.m_},t.prototype.set=function(e,t){P("DocumentReference.set",arguments,1,2),t=su("DocumentReference.set",t);var n=fu(this.m_,e,t),r=Cs(this.firestore.Ef,"DocumentReference.set",this.w_,n,null!==this.m_,t);return this.ff.write(r.T_(this.w_,cn.Ge()))},t.prototype.update=function(e,t){for(var n,r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return"string"==typeof e||e instanceof us?(A("DocumentReference.update",arguments,2),n=xs(this.firestore.Ef,"DocumentReference.update",this.w_,e,t,r)):(N("DocumentReference.update",arguments,1),n=ks(this.firestore.Ef,"DocumentReference.update",this.w_,e)),this.ff.write(n.T_(this.w_,cn.exists(!0)))},t.prototype.delete=function(){return N("DocumentReference.delete",arguments,0),this.ff.write([new Tn(this.w_,cn.Ge())])},t.prototype.onSnapshot=function(){for(var e,t,n,r=this,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];P("DocumentReference.onSnapshot",arguments,1,4);var a={includeMetadataChanges:!1},s=0;"object"!=typeof i[s]||qs(i[s])||(z("DocumentReference.onSnapshot",a=i[s],["includeMetadataChanges"]),M("DocumentReference.onSnapshot","boolean","includeMetadataChanges",a.includeMetadataChanges),s++);var u={includeMetadataChanges:a.includeMetadataChanges};if(qs(i[s])){var c=i[s];
2i[s]=null===(e=c.next)||void 0===e?void 0:e.bind(c),i[s+1]=null===(t=c.error)||void 0===t?void 0:t.bind(c),i[s+2]=null===(n=c.complete)||void 0===n?void 0:n.bind(c)}else R("DocumentReference.onSnapshot","function",s,i[s]),D("DocumentReference.onSnapshot","function",s+1,i[s+1]),D("DocumentReference.onSnapshot","function",s+2,i[s+2]);var l={next:function(e){i[s]&&i[s](r.Cf(e))},error:i[s+1],complete:i[s+2]};return this.ff.listen(Dn(this.w_.path),u,l)},t.prototype.get=function(e){var t=this;P("DocumentReference.get",arguments,0,1),cu("DocumentReference.get",e);var n=this.firestore._f();return e&&"cache"===e.source?n.j_(this.w_).then((function(e){return new Ys(t.firestore,t.w_,e,!0,e instanceof On&&e.Ye,t.m_)})):n.K_(this.w_,e).then((function(e){return t.Cf(e)}))},t.prototype.withConverter=function(e){return new t(this.w_,this.firestore,e)},t.prototype.Cf=function(e){var t=e.docs.get(this.w_);return new Ys(this.firestore,this.w_,t,e.fromCache,e.hasPendingWrites,this.m_)},t}(_s),$s=function(){function e(e,t){this.hasPendingWrites=e,this.fromCache=t}return e.prototype.isEqual=function(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache},e}(),Ys=function(){function e(e,t,n,r,i,o){this.pf=e,this.w_=t,this.Nf=n,this.Ff=r,this.$f=i,this.m_=o}return e.prototype.data=function(e){var t=this;if(P("DocumentSnapshot.data",arguments,0,1),e=uu("DocumentSnapshot.data",e),this.Nf){if(this.m_){var n=new Xs(this.pf,this.w_,this.Nf,this.Ff,this.$f,null);return this.m_.fromFirestore(n,e)}return new Bs(this.pf.d_,this.pf.yf(),e.serverTimestamps||"none",(function(e){return new Qs(e,t.pf,null)}),(function(e){return new re(e)})).tf(this.Nf.sn())}},e.prototype.get=function(e,t){var n=this;if(P("DocumentSnapshot.get",arguments,1,2),t=uu("DocumentSnapshot.get",t),this.Nf){var r=this.Nf.data().field(Ds("DocumentSnapshot.get",e,this.w_));if(null!==r)return new Bs(this.pf.d_,this.pf.yf(),t.serverTimestamps||"none",(function(e){return new Qs(e,n.pf,n.m_)}),(function(e){return new re(e)})).tf(r)}},Object.defineProperty(e.prototype,"id",{get:function(){return this.w_.path._()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ref",{get:function(){return new Qs(this.w_,this.pf,this.m_)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"exists",{get:function(){return null!==this.Nf},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"metadata",{get:function(){return new $s(this.$f,this.Ff)},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(t){if(!(t instanceof e))throw W("isEqual","DocumentSnapshot",1,t);return this.pf===t.pf&&this.Ff===t.Ff&&this.w_.isEqual(t.w_)&&(null===this.Nf?null===t.Nf:this.Nf.isEqual(t.Nf))&&this.m_===t.m_},e}(),Xs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.data=function(t){return e.prototype.data.call(this,t)},t}(Ys);function Js(e,t,n,r,i,o,a){var s;if(i.p()){if("array-contains"===o||"array-contains-any"===o)throw new h(l.INVALID_ARGUMENT,"Invalid Query. You can't perform '"+o+"' queries on FieldPath.documentId().");if("in"===o||"not-in"===o){tu(a,o);
2for(var u=[],c=0,f=a;c<f.length;c++){var p=f[c];u.push(eu(r,e,p))}s={arrayValue:{values:u}}}else s=eu(r,e,a)}else"in"!==o&&"not-in"!==o&&"array-contains-any"!==o||tu(a,o),s=Os(n,t,a,"in"===o||"not-in"===o);var d=Yn.create(i,o,s);return function(e,t){if(t.un()){var n=Fn(e);if(null!==n&&!n.isEqual(t.field))throw new h(l.INVALID_ARGUMENT,"Invalid query. All where filters with an inequality (<, <=, >, or >=) must be on the same field. But you have inequality filters on '"+n.toString()+"' and '"+t.field.toString()+"'");var r=jn(e);null!==r&&nu(e,t.field,r)}var i=function(e,t){for(var n=0,r=e.filters;n<r.length;n++){var i=r[n];if(t.indexOf(i.op)>=0)return i.op}return null}(e,function(e){switch(e){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[]}}(t.op));if(null!==i)throw i===t.op?new h(l.INVALID_ARGUMENT,"Invalid query. You cannot use more than one '"+t.op.toString()+"' filter."):new h(l.INVALID_ARGUMENT,"Invalid query. You cannot use '"+t.op.toString()+"' filters with '"+i.toString()+"' filters.")}(e,d),d}function Zs(e,t,n){if(null!==e.startAt)throw new h(l.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(null!==e.endAt)throw new h(l.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");var r=new cr(t,n);return function(e,t){if(null===jn(e)){var n=Fn(e);null!==n&&nu(e,n,t.field)}}(e,r),r}function eu(e,t,n){if("string"==typeof n){if(""===n)throw new h(l.INVALID_ARGUMENT,"Invalid query. When querying with FieldPath.documentId(), you must provide a valid document ID, but it was an empty string.");if(!Un(t)&&-1!==n.indexOf("/"))throw new h(l.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=t.path.child(I.P(n));if(!x.F(r))throw new h(l.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 ut(e,new x(r))}if(n instanceof _s)return ut(e,n.w_);throw new h(l.INVALID_ARGUMENT,"Invalid query. When querying with FieldPath.documentId(), you must provide a valid string or a DocumentReference, but it was: "+q(n)+".")}function tu(e,t){if(!Array.isArray(e)||0===e.length)throw new h(l.INVALID_ARGUMENT,"Invalid Query. A non-empty array is required for '"+t.toString()+"' filters.");if(e.length>10)throw new h(l.INVALID_ARGUMENT,"Invalid Query. '"+t.toString()+"' filters support a maximum of 10 elements in the value array.");if("in"===t||"array-contains-any"===t){if(e.indexOf(null)>=0)throw new h(l.INVALID_ARGUMENT,"Invalid Query. '"+t.toString()+"' filters cannot contain 'null' in the value array.");if(e.filter((function(e){return Number.isNaN(e)})).length>0)throw new h(l.INVALID_ARGUMENT,"Invalid Query. '"+t.toString()+"' filters cannot contain 'NaN' in the value array.")}}function nu(e,t,n){if(!n.isEqual(t))throw new h(l.INVALID_ARGUMENT,"Invalid query. You have a where filter with an inequality (<, <=, >, or >=) on field '"+t.toString()+"' and so you must also use '"+t.toString()+"' as your first orderBy(), but your first orderBy() is on field '"+n.toString()+"' instead.")}function ru(e){if(Mn(e)&&0===e.rn.length)throw new h(l.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}var iu=function(){function e(e,t,n){this.xf=e,this.firestore=t,this.m_=n}return e.prototype.where=function(t,n,r){N("Query.where",arguments,3),B("Query.where",3,r);var i=F("Query.where",["<","<=","==","!=",">=",">","array-contains","in","array-contains-any","not-in"],2,n),o=Ds("Query.where",t),a=Js(this.xf,"Query.where",this.firestore.Ef,this.firestore.d_,o,i,r);return new e(function(e,t){var n=e.filters.concat([t]);return new Pn(e.path,e.collectionGroup,e.rn.slice(),n,e.limit,e.on,e.startAt,e.endAt)}(this.xf,a),this.firestore,this.m_)},e.prototype.orderBy=function(t,n){var r;if(P("Query.orderBy",arguments,1,2),D("Query.orderBy","non-empty string",2,n),void 0===n||"asc"===n)r="asc";else{if("desc"!==n)throw new h(l.INVALID_ARGUMENT,"Function Query.orderBy() has unknown direction '"+n+"', expected 'asc' or 'desc'.");r="desc"}var i=Ds("Query.orderBy",t),o=Zs(this.xf,i,r);return new e(function(e,t){var n=e.rn.concat([t]);return new Pn(e.path,e.collectionGroup,n,e.filters.slice(),e.limit,e.on,e.startAt,e.endAt)}(this.xf,o),this.firestore,this.m_)},e.prototype.limit=function(t){return N("Query.limit",arguments,1
2),R("Query.limit","number",1,t),H("Query.limit",1,t),new e(Bn(this.xf,t,"F"),this.firestore,this.m_)},e.prototype.limitToLast=function(t){return N("Query.limitToLast",arguments,1),R("Query.limitToLast","number",1,t),H("Query.limitToLast",1,t),new e(Bn(this.xf,t,"L"),this.firestore,this.m_)},e.prototype.startAt=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];A("Query.startAt",arguments,1);var i=this.kf("Query.startAt",t,n,!0);return new e(zn(this.xf,i),this.firestore,this.m_)},e.prototype.startAfter=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];A("Query.startAfter",arguments,1);var i=this.kf("Query.startAfter",t,n,!1);return new e(zn(this.xf,i),this.firestore,this.m_)},e.prototype.endBefore=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];A("Query.endBefore",arguments,1);var i=this.kf("Query.endBefore",t,n,!0);return new e(Wn(this.xf,i),this.firestore,this.m_)},e.prototype.endAt=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];A("Query.endAt",arguments,1);var i=this.kf("Query.endAt",t,n,!1);return new e(Wn(this.xf,i),this.firestore,this.m_)},e.prototype.isEqual=function(t){if(!(t instanceof e))throw W("isEqual","Query",1,t);return this.firestore===t.firestore&&Hn(this.xf,t.xf)&&this.m_===t.m_},e.prototype.withConverter=function(t){return new e(this.xf,this.firestore,t)},e.prototype.kf=function(e,t,n,i){if(B(e,1,t),t instanceof Ys)return N(e,r.__spreadArrays([t],n),1),function(e,t,n,r,i){if(!r)throw new h(l.NOT_FOUND,"Can't use a DocumentSnapshot that doesn't exist for "+n+"().");for(var o=[],a=0,s=Vn(e);a<s.length;a++){var u=s[a];if(u.field.p())o.push(ut(t,r.key));else{var c=r.field(u.field);if(Ye(c))throw new h(l.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 f=u.field.R();throw new h(l.INVALID_ARGUMENT,"Invalid query. You are trying to start or end a query using a document for which the field '"+f+"' (used as the orderBy) does not exist.")}o.push(c)}}return new or(o,i)}(this.xf,this.firestore.d_,e,t.Nf,i);var o=[t].concat(n);return function(e,t,n,r,i,o){var a=e.rn;if(i.length>a.length)throw new h(l.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<i.length;u++){var c=i[u];if(a[u].field.p()){if("string"!=typeof c)throw new h(l.INVALID_ARGUMENT,"Invalid query. Expected a string for document ID in "+r+"(), but got a "+typeof c);if(!Un(e)&&-1!==c.indexOf("/"))throw new h(l.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 f=e.path.child(I.P(c));if(!x.F(f))throw new h(l.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 '"+f+"' is not because it contains an odd number of segments.");var p=new x(f);s.push(ut(t,p))}else{var d=Os(n,r,c);s.push(d)}}return new or(s,o)}(this.xf,this.firestore.d_,this.firestore.Ef,e,o,i)},e.prototype.onSnapshot=function(){for(var e,t,n,r=this,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];P("Query.onSnapshot",arguments,1,4);var a={},s=0;if("object"!=typeof i[s]||qs(i[s])||(z("Query.onSnapshot",a=i[s],["includeMetadataChanges"]),M("Query.onSnapshot","boolean","includeMetadataChanges",a.includeMetadataChanges),s++),qs(i[s])){var u=i[s];i[s]=null===(e=u.next)||void 0===e?void 0:e.bind(u),i[s+1]=null===(t=u.error)||void 0===t?void 0:t.bind(u),i[s+2]=null===(n=u.complete)||void 0===n?void 0:n.bind(u)}else R("Query.onSnapshot","function",s,i[s]),D("Query.onSnapshot","function",s+1,i[s+1]),D("Query.onSnapshot","function",s+2,i[s+2]);var c={next:function(e){i[s]&&i[s](new ou(r.firestore,r.xf,e,r.m_))},error:i[s+1],complete:i[s+2]};return ru(this.xf),this.firestore._f().listen(this.xf,a,c)},e.prototype.get=function(e){var t=this;P("Query.get",arguments,0,1),cu("Query.get",e),ru(this.xf);var n=this.firestore._f();return(e&&"cache"===e.source?n.G_(this.xf):n.z_(this.xf,e)).then((function(e){return new ou(t.firestore,t.xf,e,t.m_)}))},e}(),ou=function(){function e(e,t,n,r){this.pf=e,this.Mf=t,this.Of=n,this.m_=r,this.Lf=null,this.Bf=null,this.metadata=new $s(n.hasPendingWrites,n.fromCache)}return Object.defineProperty(e.prototype,"docs",{get:function(){var e=[];return this.forEach((function(t){return e.push(t)})),e}
2,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return this.Of.docs.m()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this.Of.docs.size},enumerable:!1,configurable:!0}),e.prototype.forEach=function(e,t){var n=this;P("QuerySnapshot.forEach",arguments,1,2),R("QuerySnapshot.forEach","function",1,e),this.Of.docs.forEach((function(r){e.call(t,n.qf(r,n.metadata.fromCache,n.Of.Qt.has(r.key)))}))},Object.defineProperty(e.prototype,"query",{get:function(){return new iu(this.Mf,this.pf,this.m_)},enumerable:!1,configurable:!0}),e.prototype.docChanges=function(e){e&&(z("QuerySnapshot.docChanges",e,["includeMetadataChanges"]),M("QuerySnapshot.docChanges","boolean","includeMetadataChanges",e.includeMetadataChanges));var t=!(!e||!e.includeMetadataChanges);if(t&&this.Of.jt)throw new h(l.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this.Lf&&this.Bf===t||(this.Lf=function(e,t,n){if(e.Ut.m()){var r=0;return e.docChanges.map((function(t){var i=n(t.doc,e.fromCache,e.Qt.has(t.doc.key));return t.doc,{type:"added",doc:i,oldIndex:-1,newIndex:r++}}))}var i=e.Ut;return e.docChanges.filter((function(e){return t||3!==e.type})).map((function(t){var r=n(t.doc,e.fromCache,e.Qt.has(t.doc.key)),o=-1,a=-1;return 0!==t.type&&(o=i.indexOf(t.doc.key),i=i.delete(t.doc.key)),1!==t.type&&(a=(i=i.add(t.doc)).indexOf(t.doc.key)),{type:hu(t.type),doc:r,oldIndex:o,newIndex:a}}))}(this.Of,t,this.qf.bind(this)),this.Bf=t),this.Lf},e.prototype.isEqual=function(t){if(!(t instanceof e))throw W("isEqual","QuerySnapshot",1,t);return this.pf===t.pf&&Hn(this.Mf,t.Mf)&&this.Of.isEqual(t.Of)&&this.m_===t.m_},e.prototype.qf=function(e,t,n){return new Xs(this.pf,e.key,e,t,n,this.m_)},e}(),au=function(e){function t(t,n,r){var i=this;if((i=e.call(this,Dn(t),n,r)||this).Uf=t,t.length%2!=1)throw new h(l.INVALID_ARGUMENT,"Invalid collection reference. Collection references must have an odd number of segments, but "+t.R()+" has "+t.length);return i}return r.__extends(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this.xf.path._()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){var e=this.xf.path.h();return e.m()?null:new Qs(new x(e),this.firestore,null)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return this.xf.path.R()},enumerable:!1,configurable:!0}),t.prototype.doc=function(e){P("CollectionReference.doc",arguments,0,1),0===arguments.length&&(e=$.k()),R("CollectionReference.doc","non-empty string",1,e);var t=I.P(e);return Qs.gf(this.xf.path.child(t),this.firestore,this.m_)},t.prototype.add=function(e){N("CollectionReference.add",arguments,1);var t=this.m_?this.m_.toFirestore(e):e;R("CollectionReference.add","object",1,t);var n=this.doc();return new Qs(n.w_,this.firestore,null).set(t).then((function(){return n}))},t.prototype.withConverter=function(e){return new t(this.Uf,this.firestore,e)},t}(iu);function su(e,t){if(void 0===t)return{merge:!1};if(z(e,t,["merge","mergeFields"]),M(e,"boolean","merge",t.merge),function(e,t,n,r,i){void 0!==r&&function(e,t,n,r,i){if(!(r instanceof Array))throw new h(l.INVALID_ARGUMENT,"Function "+e+"() requires its "+t+" option to be an array, but it was: "+q(r));for(var o=0;o<r.length;++o)if(!i(r[o]))throw new h(l.INVALID_ARGUMENT,"Function "+e+"() requires all "+t+" elements to be a string or a FieldPath, but the value at index "+o+" was: "+q(r[o]))}(e,"mergeFields",0,r,(function(e){return"string"==typeof e||e instanceof us}))}(e,0,0,t.mergeFields),void 0!==t.mergeFields&&void 0!==t.merge)throw new h(l.INVALID_ARGUMENT,"Invalid options passed to function "+e+'(): You cannot specify both "merge" and "mergeFields".');return t}function uu(e,t){return void 0===t?{}:(z(e,t,["serverTimestamps"]),j(e,0,"serverTimestamps",t.serverTimestamps,["estimate","previous","none"]),t)}function cu(e,t){D(e,"object",1,t),t&&(z(e,t,["source"]),j(e,0,"source",t.source,["default","server","cache"]))}function lu(e,t,n){if(t instanceof _s){if(t.firestore!==n)throw new h(l.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return t}throw W(e,"DocumentReference",1,t)}function hu(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return m()}}function fu(e,t,n){return e?n&&(n.merge||n.mergeFields)?e.toFirestore(t,n):e.toFirestore(t):t}var pu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.serverTimestamp=function(){O("FieldValue.serverTimestamp",arguments);var e=new ps("serverTimestamp");return e.s_="FieldValue.serverTimestamp",new t(e)},t.delete=function(){O("FieldValue.delete",arguments);var e=new hs("deleteField");return e.s_="FieldValue.delete",new t(e)},t.arrayUnion=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];
2A("FieldValue.arrayUnion",arguments,1);var r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return A("arrayUnion()",arguments,1),new ds("arrayUnion",e)}.apply(void 0,e);return r.s_="FieldValue.arrayUnion",new t(r)},t.arrayRemove=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];A("FieldValue.arrayRemove",arguments,1);var r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return A("arrayRemove()",arguments,1),new vs("arrayRemove",e)}.apply(void 0,e);return r.s_="FieldValue.arrayRemove",new t(r)},t.increment=function(e){R("FieldValue.increment","number",1,e),N("FieldValue.increment",arguments,1);var n=function(e){return new gs("increment",e)}(e);return n.s_="FieldValue.increment",new t(n)},t.prototype.isEqual=function(e){return this.f_.isEqual(e.f_)},t}(ms),du={Firestore:Hs,GeoPoint:ys,Timestamp:se,Blob:re,Transaction:Gs,WriteBatch:Ks,DocumentReference:Qs,DocumentSnapshot:Ys,Query:iu,QueryDocumentSnapshot:Xs,QuerySnapshot:ou,CollectionReference:au,FieldPath:us,FieldValue:pu,setLogLevel:Hs.setLogLevel,CACHE_SIZE_UNLIMITED:zs};function vu(e){!function(e,t){e.INTERNAL.registerComponent(new u.Component("firestore",(function(e){return function(e,t){var n=new os,r=new is(n);return new Hs(e,t,r,n)}(e.getProvider("app").getImmediate(),e.getProvider("auth-internal"))}),"PUBLIC").setServiceProps(Object.assign({},du)))}(e),e.registerVersion("@firebase/firestore","1.17.2")}vu(c.default),t.__PRIVATE_registerFirestore=vu}).call(this,n(45))},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"ErrorCode",(function(){return tr})),n.d(t,"EventType",(function(){return nr})),n.d(t,"WebChannel",(function(){return rr})),n.d(t,"XhrIo",(function(){return ir})),n.d(t,"createWebChannelTransport",(function(){return er}));var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function i(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var o,a="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{},s=s||{},u=a||self;function c(){}function l(e){var t=typeof e;return"object"!=t?t:e?Array.isArray(e)?"array":t:"null"}function h(e){var t=l(e);return"array"==t||"object"==t&&"number"==typeof e.length}function f(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}var p="closure_uid_"+(1e9*Math.random()>>>0),d=0;function v(e,t,n){return e.call.apply(e.bind,arguments)}function g(e,t,n){if(!e)throw Error();if(2<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),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function y(e,t,n){return(y=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?v:g).apply(null,arguments)}function m(e,t){var n=Array.prototype.slice.call(arguments,1);return function(){var t=n.slice();return t.push.apply(t,arguments),e.apply(this,t)}}var b=Date.now;function _(e,t){function n(){}n.prototype=t.prototype,e.S=t.prototype,e.prototype=new n,e.prototype.constructor=e}function w(){this.j=this.j,this.i=this.i}w.prototype.j=!1,w.prototype.ja=function(){if(!this.j&&(this.j=!0,this.G(),0))(function(e){Object.prototype.hasOwnProperty.call(e,p)&&e[p]||(e[p]=++d)})(this)},w.prototype.G=function(){if(this.i)for(;this.i.length;)this.i.shift()()};var E=Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t,void 0)}:function(e,t){if("string"===typeof e)return"string"!==typeof t||1!=t.length?-1:e.indexOf(t,0);for(var n=0;n<e.length;n++)if(n in e&&e[n]===t)return n;return-1},T=Array.prototype.forEach?function(e,t,n){Array.prototype.forEach.call(e,t,n)}:function(e,t,n){for(var r=e.length,i="string"===typeof e?e.split(""):e,o=0;o<r;o++)o in i&&t.call(n,i[o],o,e)};function S(e){return Array.prototype.concat.apply([],arguments)}function I(e){var t=e.length;if(0<t){for(var n=Array(t),r=0;r<t;r++)n[r]=e[r];return n}return[]}function C(e){return/^[\s\xa0]*$/.test(e)}var k,x=String.prototype.trim?function(e){return e.trim()}:function(e){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(e)[1]};function O(e,t){return-1!=e.indexOf(t)}function N(e,t){return e<t?-1:e>t?1:0}e:{var A=u.navigator;if(A){var P=A.userAgent;if(P){k=P;break e}}k=""}function R(e,t,n){for(var r in e)t.call(n,e[r],r,e)}function D(e){var t={};for(var n in e)t[n]=e[n];return t}var L="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleStr
2ing toString valueOf".split(" ");function M(e,t){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i])e[n]=r[n];for(var o=0;o<L.length;o++)n=L[o],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}function j(e){return j[" "](e),e}j[" "]=c;var F,U=O(k,"Opera"),V=O(k,"Trident")||O(k,"MSIE"),q=O(k,"Edge"),B=q||V,z=O(k,"Gecko")&&!(O(k.toLowerCase(),"webkit")&&!O(k,"Edge"))&&!(O(k,"Trident")||O(k,"MSIE"))&&!O(k,"Edge"),W=O(k.toLowerCase(),"webkit")&&!O(k,"Edge");function H(){var e=u.document;return e?e.documentMode:void 0}e:{var G="",K=function(){var e=k;return z?/rv:([^\);]+)(\)|;)/.exec(e):q?/Edge\/([\d\.]+)/.exec(e):V?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e):W?/WebKit\/(\S+)/.exec(e):U?/(?:Version)[ \/]?(\S+)/.exec(e):void 0}();if(K&&(G=K?K[1]:""),V){var Q=H();if(null!=Q&&Q>parseFloat(G)){F=String(Q);break e}}F=G}var $,Y={};function X(e){return function(e,t){var n=Y;return Object.prototype.hasOwnProperty.call(n,e)?n[e]:n[e]=t(e)}(e,(function(){for(var t=0,n=x(String(F)).split("."),r=x(String(e)).split("."),i=Math.max(n.length,r.length),o=0;0==t&&o<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&&0==s[0].length)break;t=N(0==a[1].length?0:parseInt(a[1],10),0==s[1].length?0:parseInt(s[1],10))||N(0==a[2].length,0==s[2].length)||N(a[2],s[2]),a=a[3],s=s[3]}while(0==t)}return 0<=t}))}if(u.document&&V){var J=H();$=J||(parseInt(F,10)||void 0)}else $=void 0;var Z=$,ee=!V||9<=Number(Z),te=V&&!X("9"),ne=function(){if(!u.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{u.addEventListener("test",c,t),u.removeEventListener("test",c,t)}catch(n){}return e}();function re(e,t){this.type=e,this.a=this.target=t,this.defaultPrevented=!1}function ie(e,t){if(re.call(this,e?e.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,e){var n=this.type=e.type,r=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:null;if(this.target=e.target||e.srcElement,this.a=t,t=e.relatedTarget){if(z){e:{try{j(t.nodeName);var i=!0;break e}catch(o){}i=!1}i||(t=null)}}else"mouseover"==n?t=e.fromElement:"mouseout"==n&&(t=e.toElement);this.relatedTarget=t,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!==e.clientX?e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0),this.button=e.button,this.key=e.key||"",this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.pointerId=e.pointerId||0,this.pointerType="string"===typeof e.pointerType?e.pointerType:oe[e.pointerType]||"",this.c=e,e.defaultPrevented&&this.b()}}re.prototype.b=function(){this.defaultPrevented=!0},_(ie,re);var oe={2:"touch",3:"pen",4:"mouse"};ie.prototype.b=function(){ie.S.b.call(this);var e=this.c;if(e.preventDefault)e.preventDefault();else if(e.returnValue=!1,te)try{(e.ctrlKey||112<=e.keyCode&&123>=e.keyCode)&&(e.keyCode=-1)}catch(t){}};var ae="closure_listenable_"+(1e6*Math.random()|0),se=0;function ue(e,t,n,r,i){this.listener=e,this.proxy=null,this.src=t,this.type=n,this.capture=!!r,this.ca=i,this.key=++se,this.Y=this.Z=!1}function ce(e){e.Y=!0,e.listener=null,e.proxy=null,e.src=null,e.ca=null}function le(e){this.src=e,this.a={},this.b=0}function he(e,t){var n=t.type;if(n in e.a){var r,i=e.a[n],o=E(i,t);(r=0<=o)&&Array.prototype.splice.call(i,o,1),r&&(ce(t),0==e.a[n].length&&(delete e.a[n],e.b--))}}function fe(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i];if(!o.Y&&o.listener==t&&o.capture==!!n&&o.ca==r)return i}return-1}le.prototype.add=function(e,t,n,r,i){var o=e.toString();(e=this.a[o])||(e=this.a[o]=[],this.b++);var a=fe(e,t,r,i);return-1<a?(t=e[a],n||(t.Z=!1)):((t=new ue(t,this.src,o,!!r,i)).Z=n,e.push(t)),t};var pe="closure_lm_"+(1e6*Math.random()|0),de={};function ve(e,t,n,r,i){if(r&&r.once)return function e(t,n,r,i,o){if(Array.isArray(n)){for(var a=0;a<n.length;a++)e(t,n[a],r,i,o);return null}return r=Te(r),t&&t[ae]?t.wa(n,r,f(i)?!!i.capture:!!i,o):ge(t,n,r,!0,i,o)}(e,t,n,r,i);if(Array.isArray(t)){for(var o=0;o<t.length;o++)ve(e,t[o],n,r,i);return null}return n=Te(n),e&&e[ae]?e.va(t,n,f(r)?!!r.capture:!!r,i):ge(e,t,n,!1,r,i)}function ge(e,t,n,r,i,o){if(!t)throw Error("Invalid event type");var a=f(i)?!!i.capture:!!i;if(a&&!ee)return null;var s=we(e);if(s||(e[pe]=s=new le(e)),(n=s.add(t,n,r,a,o)).proxy)return n;if(r=function(){var e=_e,t=ee?function(n){return e.call(t.src,t.listener,n)}:function(n){if(!(n=e.call(t.src,t.listener,n)))return n};return t}(),n.proxy=r,r.src=e,r.listener=n,e.addEventListener)ne||(i=a),void 0===i&&(i=!1),e.addEventListener(t.toString(),r,i);else if(e.attachEvent)e.attachEvent(me(t.toString()),r);else{if(!e.addListener||!e.removeListener)throw Error("addEventListener and attachEvent are unavailable.");e.addListener(r)}return n}function ye(e){if("number"!==typeof e&&e&&!e.Y){var t=e.src;if(t&&t[ae])he(t.c,e);else{var n=e.type,r=e.proxy;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent?t.detachEvent(me(n),r):t.addListener&&t.removeListener&&t.removeListener(r),(n=we(t))?(he(n,e),0==n.b&&(n.src=null,t[pe]=null)):ce(e)}}}function me(e){return e in de?de[e]:de[e]="on"+e}function be(e,t){var n=e.listener,r=e.ca||e.src;return e.Z&&ye(e),n.call(r,t)}function _e(e,t){if(e.Y)return!0;
2if(!ee){if(!t)e:{t=["window","event"];for(var n=u,r=0;r<t.length;r++)if(null==(n=n[t[r]])){t=null;break e}t=n}return be(e,t=new ie(t,this))}return be(e,new ie(t,this))}function we(e){return(e=e[pe])instanceof le?e:null}var Ee="__closure_events_fn_"+(1e9*Math.random()>>>0);function Te(e){return"function"==l(e)?e:(e[Ee]||(e[Ee]=function(t){return e.handleEvent(t)}),e[Ee])}function Se(){w.call(this),this.c=new le(this),this.J=this,this.C=null}function Ie(e,t,n,r){if(!(t=e.c.a[String(t)]))return!0;t=t.concat();for(var i=!0,o=0;o<t.length;++o){var a=t[o];if(a&&!a.Y&&a.capture==n){var s=a.listener,u=a.ca||a.src;a.Z&&he(e.c,a),i=!1!==s.call(u,r)&&i}}return i&&!r.defaultPrevented}_(Se,w),Se.prototype[ae]=!0,(o=Se.prototype).addEventListener=function(e,t,n,r){ve(this,e,t,n,r)},o.removeEventListener=function(e,t,n,r){!function e(t,n,r,i,o){if(Array.isArray(n))for(var a=0;a<n.length;a++)e(t,n[a],r,i,o);else i=f(i)?!!i.capture:!!i,r=Te(r),t&&t[ae]?(t=t.c,(n=String(n).toString())in t.a&&(-1<(r=fe(a=t.a[n],r,i,o))&&(ce(a[r]),Array.prototype.splice.call(a,r,1),0==a.length&&(delete t.a[n],t.b--)))):t&&(t=we(t))&&(n=t.a[n.toString()],t=-1,n&&(t=fe(n,r,i,o)),(r=-1<t?n[t]:null)&&ye(r))}(this,e,t,n,r)},o.dispatchEvent=function(e){var t,n=this.C;if(n)for(t=[];n;n=n.C)t.push(n);n=this.J;var r=e.type||e;if("string"===typeof e)e=new re(e,n);else if(e instanceof re)e.target=e.target||n;else{var i=e;M(e=new re(r,n),i)}if(i=!0,t)for(var o=t.length-1;0<=o;o--){var a=e.a=t[o];i=Ie(a,r,!0,e)&&i}if(i=Ie(a=e.a=n,r,!0,e)&&i,i=Ie(a,r,!1,e)&&i,t)for(o=0;o<t.length;o++)i=Ie(a=e.a=t[o],r,!1,e)&&i;return i},o.G=function(){if(Se.S.G.call(this),this.c){var e,t=this.c;for(e in t.a){for(var n=t.a[e],r=0;r<n.length;r++)ce(n[r]);delete t.a[e],t.b--}}this.C=null},o.va=function(e,t,n,r){return this.c.add(String(e),t,!1,n,r)},o.wa=function(e,t,n,r){return this.c.add(String(e),t,!0,n,r)};var Ce=u.JSON.stringify;function ke(){this.b=this.a=null}var xe,Oe=new(function(){function e(e,t,n){this.f=n,this.c=e,this.g=t,this.b=0,this.a=null}return e.prototype.get=function(){var e;return 0<this.b?(this.b--,e=this.a,this.a=e.next,e.next=null):e=this.c(),e},e}())((function(){return new Ae}),(function(e){e.reset()}),100);function Ne(){var e=Le,t=null;return e.a&&(t=e.a,e.a=e.a.next,e.a||(e.b=null),t.next=null),t}function Ae(){this.next=this.b=this.a=null}function Pe(e){u.setTimeout((function(){throw e}),0)}function Re(e,t){xe||function(){var e=u.Promise.resolve(void 0);xe=function(){e.then(Me)}}(),De||(xe(),De=!0),Le.add(e,t)}ke.prototype.add=function(e,t){var n=Oe.get();n.set(e,t),this.b?this.b.next=n:this.a=n,this.b=n},Ae.prototype.set=function(e,t){this.a=e,this.b=t,this.next=null},Ae.prototype.reset=function(){this.next=this.b=this.a=null};var De=!1,Le=new ke;function Me(){for(var e;e=Ne();){try{e.a.call(e.b)}catch(n){Pe(n)}var t=Oe;t.g(e),t.b<t.f&&(t.b++,e.next=t.a,t.a=e)}De=!1}function je(e,t){Se.call(this),this.b=e||1,this.a=t||u,this.f=y(this.Ya,this),this.g=b()}function Fe(e){e.aa=!1,e.M&&(e.a.clearTimeout(e.M),e.M=null)}function Ue(e,t,n){if("function"==l(e))n&&(e=y(e,n));else{if(!e||"function"!=typeof e.handleEvent)throw Error("Invalid listener argument");e=y(e.handleEvent,e)}return 2147483647<Number(t)?-1:u.setTimeout(e,t||0)}function Ve(e){e.a=Ue((function(){e.a=null,e.c&&(e.c=!1,Ve(e))}),e.h);var t=e.b;e.b=null,e.g.apply(null,t)}_(je,Se),(o=je.prototype).aa=!1,o.M=null,o.Ya=function(){if(this.aa){var e=b()-this.g;0<e&&e<.8*this.b?this.M=this.a.setTimeout(this.f,this.b-e):(this.M&&(this.a.clearTimeout(this.M),this.M=null),this.dispatchEvent("tick"),this.aa&&(Fe(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(){je.S.G.call(this),Fe(this),delete this.a};var qe=function(e){function t(t,n,r){var i=e.call(this)||this;return i.g=null!=r?t.bind(r):t,i.h=n,i.b=null,i.c=!1,i.a=null,i}return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.f=function(e){this.b=arguments,this.a?this.c=!0:Ve(this)},t.prototype.G=function(){e.prototype.G.call(this),this.a&&(u.clearTimeout(this.a),this.a=null,this.c=!1,this.b=null)},t}(w);function Be(e){w.call(this),this.b=e,this.a={}}_(Be,w);var ze=[];function We(e,t,n,r){Array.isArray(n)||(n&&(ze[0]=n.toString()),n=ze);for(var i=0;i<n.length;i++){var o=ve(t,n[i],r||e.handleEvent,!1,e.b||e);if(!o)break;e.a[o.key]=o}}function He(e){R(e.a,(function(e,t){this.a.hasOwnProperty(t)&&ye(e)}),e),e.a={}}function Ge(){this.a=!0}function Ke(e,t,n,r){e.info((function(){return"XMLHTTP TEXT ("+t+"): "+function(e,t){if(!e.a)return t;if(!t)return null;try{var n=JSON.parse(t);if(n)for(e=0;e<n.length;e++)if(Array.isArray(n[e])){var r=n[e];if(!(2>r.length)){var i=r[1];if(Array.isArray(i)&&!(1>i.length)){var o=i[0];if("noop"!=o&&"stop"!=o&&"close"!=o)for(var a=1;a<i.length;a++)i[a]=""}}}return Ce(n)}catch(s){return t}}(e,n)+(r?" "+r:"")}))}Be.prototype.G=function(){Be.S.G.call(this),He(this)},Be.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},Ge.prototype.info=function(){};var Qe=null;function $e(){return Qe=Qe||new Se}function Ye(e){re.call(this,"serverreachability",e)}function Xe(e){var t=$e();t.dispatchEvent(new Ye(t,e))}function Je(e){re.call(this,"statevent",e)}function Ze(e){var t=$e();t.dispatchEvent(new Je(t,e))}function et(e){re.call(this,"timingevent",e)}function tt(e,t){if("function"!=l(e))throw Error("Fn must not be null and must be a function");return u.setTimeout((function(){e()}),t)}_(Ye,re),_(Je,re),_(et,re);var nt={NO_ERROR:0,Za:1,gb:2,fb:3,bb:4,eb:5,hb:6,Da:7,TIMEOUT:8,kb:9},rt={ab:"complete",ob:"success",Ea:"error",Da:"abort",mb:"ready",nb:"readystatechange",TIMEOUT:"timeout",ib:"incrementaldata",lb:"progress",cb:"downloadprogress",pb:"uploadprogress"};function it(){}function ot(e){var t;return(t=e.a)||(t=e.a={}),t}function at(){}it.prototype.a=null;var st,ut={OPEN:"a",$a:"b",Ea:"c",jb:"d"};function ct(){re.call(this,"d")}function lt(){re.call(this,"c")}function ht(){}function ft(e,t,n,r){this.g=e,this.c=t,this.f=n,this.T=r||1,this.J=new Be(this),this.P=pt,e=B?125:void 0,this.R=new je(e),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}
vendor: 9,445 bytes, line 2
2_(ct,re),_(lt,re),_(ht,it),st=new ht;var pt=45e3,dt={},vt={};function gt(e,t,n){e.H=1,e.i=Ft(Pt(t)),e.j=n,e.I=!0,yt(e,null)}function yt(e,t){e.u=b(),_t(e),e.l=Pt(e.i);var n=e.l,r=e.T;Array.isArray(r)||(r=[String(r)]),Xt(n.b,"t",r),e.D=0,e.a=Gn(e.g,e.g.C?t:null),0<e.O&&(e.F=new qe(y(e.Ca,e,e.a),e.O)),We(e.J,e.a,"readystatechange",e.Wa),t=e.B?D(e.B):{},e.j?(e.m||(e.m="POST"),t["Content-Type"]="application/x-www-form-urlencoded",e.a.ba(e.l,e.m,e.j,t)):(e.m="GET",e.a.ba(e.l,e.m,null,t)),Xe(1),function(e,t,n,r,i,o){e.info((function(){if(e.a)if(o)for(var a="",s=o.split("&"),u=0;u<s.length;u++){var c=s[u].split("=");if(1<c.length){var l=c[0];c=c[1];var h=l.split("_");a=2<=h.length&&"type"==h[1]?a+(l+"=")+c+"&":a+(l+"=redacted&")}}else a=null;else a=o;return"XMLHTTP REQ ("+r+") [attempt "+i+"]: "+t+"\n"+n+"\n"+a}))}(e.c,e.m,e.l,e.f,e.T,e.j)}function mt(e,t,n){for(var r=!0;!e.A&&e.D<n.length;){var i=bt(e,n);if(i==vt){4==t&&(e.h=4,Ze(14),r=!1),Ke(e.c,e.f,null,"[Incomplete Response]");break}if(i==dt){e.h=4,Ze(15),Ke(e.c,e.f,n,"[Invalid Chunk]"),r=!1;break}Ke(e.c,e.f,i,null),It(e,i)}4==t&&0==n.length&&(e.h=1,Ze(16),r=!1),e.b=e.b&&r,r?0<n.length&&!e.W&&(e.W=!0,(t=e.g).a==e&&t.V&&!t.F&&(t.c.info("Great, no buffering proxy detected. Bytes received: "+n.length),Fn(t),t.F=!0)):(Ke(e.c,e.f,n,"[Invalid Chunked Response]"),St(e),Tt(e))}function bt(e,t){var n=e.D,r=t.indexOf("\n",n);return-1==r?vt:(n=Number(t.substring(n,r)),isNaN(n)?dt:(r+=1)+n>t.length?vt:(t=t.substr(r,n),e.D=r+n,t))}function _t(e){e.U=b()+e.P,wt(e,e.P)}function wt(e,t){if(null!=e.o)throw Error("WatchDog timer not null");e.o=tt(y(e.Ua,e),t)}function Et(e){e.o&&(u.clearTimeout(e.o),e.o=null)}function Tt(e){0==e.g.v||e.A||qn(e.g,e)}function St(e){Et(e);var t=e.F;t&&"function"==typeof t.ja&&t.ja(),e.F=null,Fe(e.R),He(e.J),e.a&&(t=e.a,e.a=null,t.abort(),t.ja())}function It(e,t){try{var n=e.g;if(0!=n.v&&(n.a==e||on(n.b,e)))if(n.I=e.N,!e.C&&on(n.b,e)&&3==n.v){try{var r=n.ka.a.parse(t)}catch(g){r=null}if(Array.isArray(r)&&3==r.length){var i=r;if(0==i[0]){e:if(!n.j){if(n.a){if(!(n.a.u+3e3<e.u))break e;Vn(n),On(n)}jn(n),Ze(18)}}else n.oa=i[1],0<n.oa-n.P&&37500>i[2]&&n.H&&0==n.o&&!n.m&&(n.m=tt(y(n.Ra,n),6e3));if(1>=rn(n.b)&&n.ea){try{n.ea()}catch(g){}n.ea=void 0}}else zn(n,11)}else if((e.C||n.a==e)&&Vn(n),!C(t))for(t=r=n.ka.a.parse(t),r=0;r<t.length;r++)if(i=t[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&&(n.ha=o,n.c.info("VER="+n.ha));var a=i[4];null!=a&&(n.pa=a,n.c.info("SVER="+n.pa));var s=i[5];if(null!=s&&"number"===typeof s&&0<s){var u=1.5*s;n.D=u,n.c.info("backChannelRequestTimeoutMs_="+u)}u=n;var c=e.a;if(c){var l=c.a?c.a.getResponseHeader("X-Client-Wire-Protocol"):null;if(l){var h=u.b;!h.a&&(O(l,"spdy")||O(l,"quic")||O(l,"h2"))&&(h.f=h.g,h.a=new Set,h.b&&(an(h,h.b),h.b=null))}if(u.A){var f=c.a?c.a.getResponseHeader("X-HTTP-Session-Id"):null;f&&(u.na=f,jt(u.B,u.A,f))}}n.v=3,n.f&&n.f.ta(),n.V&&(n.N=b()-e.u,n.c.info("Handshake RTT: "+n.N+"ms"));var p=e;if((u=n).la=Hn(u,u.C?u.ga:null,u.fa),p.C){sn(u.b,p);var d=p,v=u.D;v&&d.setTimeout(v),d.o&&(Et(d),_t(d)),u.a=p}else Mn(u);0<n.g.length&&Pn(n)}else"stop"!=i[0]&&"close"!=i[0]||zn(n,7);else 3==n.v&&("stop"==i[0]||"close"==i[0]?"stop"==i[0]?zn(n,7):xn(n):"noop"!=i[0]&&n.f&&n.f.sa(i),n.o=0);Xe(4)}catch(g){}}function Ct(e,t){if(e.forEach&&"function"==typeof e.forEach)e.forEach(t,void 0);else if(h(e)||"string"===typeof e)T(e,t,void 0);else{if(e.L&&"function"==typeof e.L)var n=e.L();else if(e.K&&"function"==typeof e.K)n=void 0;else if(h(e)||"string"===typeof e){n=[];for(var r=e.length,i=0;i<r;i++)n.push(i)}else for(i in n=[],r=0,e)n[r++]=i;i=(r=function(e){if(e.K&&"function"==typeof e.K)return e.K();if("string"===typeof e)return e.split("");if(h(e)){for(var t=[],n=e.length,r=0;r<n;r++)t.push(e[r]);return t}for(r in t=[],n=0,e)t[n++]=e[r];return t}(e)).length;for(var o=0;o<i;o++)t.call(void 0,r[o],n&&n[o],e)}}function kt(e,t){this.b={},this.a=[],this.c=0;var n=arguments.length;if(1<n){if(n%2)throw Error("Uneven number of arguments");for(var r=0;r<n;r+=2)this.set(arguments[r],arguments[r+1])}else if(e)if(e instanceof kt)for(n=e.L(),r=0;r<n.length;r++)this.set(n[r],e.get(n[r]));else for(r in e)this.set(r,e[r])}function xt(e){if(e.c!=e.a.length){for(var t=0,n=0;t<e.a.length;){var r=e.a[t];Ot(e.b,r)&&(e.a[n++]=r),t++}e.a.length=n}if(e.c!=e.a.length){var i={};for(n=t=0;t<e.a.length;)Ot(i,r=e.a[t])||(e.a[n++]=r,i[r]=1),t++;e.a.length=n}}function Ot(e,t){return Object.prototype.hasOwnProperty.call(e,t)}(o=ft.prototype).setTimeout=function(e){this.P=e},o.Wa=function(e){e=e.target;var t=this.F;t&&3==Sn(e)?t.f():this.Ca(e)},o.Ca=function(e){try{if(e==this.a)e:{var t=Sn(this.a),n=this.a.ua(),r=this.a.X();if(!(3>t||3==t&&!B&&!this.a.$())){this.A||4!=t||7==n||Xe(8==n||0>=r?3:2),Et(this);var i=this.a.X();this.N=i;var o=this.a.$();if(this.b=200==i,function(e,t,n,r,i,o,a){e.info((function(){return"XMLHTTP RESP ("+r+") [ attempt "+i+"]: "+t+"\n"+n+"\n"+o+" "+a}))}(this.c,this.m,this.l,this.f,this.T,t,i),this.b){if(this.V&&!this.C){t:{if(this.a){var a,s=this.a;if((a=s.a?s.a.getResponseHeader("X-HTTP-Initial-Response"):null)&&!C(a)){var u=a;break t}}u=null}if(!u){this.b=!1,this.h=3,Ze(12),St(this),Tt(this);break e}Ke(this.c,this.f,u,"Initial handshake response via X-HTTP-Initial-Response"),this.C=!0,It(this,u)}this.I?(mt(this,t,o),B&&this.b&&3==t&&(We(this.J,this.R,"tick",this.Va),this.R.start())):(Ke(this.c,this.f,o,null),It(this,o)),4==t&&St(this),this.b&&!this.A&&(4==t?qn(this.g,this):(this.b=!1,_t(this)))}else 400==i&&0<o.indexOf("Unknown SID")?(this.h=3,Ze(12)):(this.h=0,Ze(13)),St(this),Tt(this)}}}catch(c){}},o.Va=function(){if(this.a){var e=Sn(this.a),t=this.a.$();this.D<t.length&&(Et(this),mt(this,e,t),this.b&&4!=e&&_t(this))}},o.cancel=function(){this.A=!0,St(this)},o.Ua=function(){this.o=null;var e=b();0<=e-this.U?(function(e,t){e.info((function(){return"TIMEOUT: "+t}))}(this.c,this.l),2!=this.H&&(Xe(3),Ze(17)),St(this),this.h=2,Tt(this)):wt(this,this.U-e)},(o=kt.prototype).K=function(){xt(this);for(var e=[],t=0;t<this.a.length;t++)e.push(this.b[this.a[t]]);return e},o.L=function(){return xt(this),this.a.concat()},o.get=function(e,t){return Ot(this.b,e)?this.b[e]:t},o.set=function(e,t){Ot(this.b,e)||(this.c++,this.a.push(e)),this.b[e]=t},o.forEach=function(e,t){for(var n=this.L(),r=0;r<n.length;r++){var i=n[r],o=this.get(i);e.call(t,o,i,this)}};var Nt=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function At(e,t){if(this.c=this.j=this.f="",this.h=null,this.i=this.g="",this.a=!1,e instanceof At){this.a=void 0!==t?t:e.a,Rt(this,e.f),this.j=e.j,Dt(this,e.c),Lt(this,e.h),this.g=e.g,t=e.b;var n=new Kt;n.c=t.c,t.a&&(n.a=new kt(t.a),n.b=t.b),Mt(this,n),this.i=e.i}else e&&(n=String(e).match(Nt))?(this.a=!!t,Rt(this,n[1]||"",!0),this.j=Ut(n[2]||""),Dt(this,n[3]||"",!0),Lt(this,n[4]),this.g=Ut(n[5]||"",!0),Mt(this,n[6]||"",!0),this.i=Ut(n[7]||"")):(this.a=!!t,this.b=new Kt(null,this.a))}function Pt(e){return new At(e)}function Rt(e,t,n){e.f=n?Ut(t,!0):t,e.f&&(e.f=e.f.replace(/:$/,""))}function Dt(e,t,n){e.c=n?Ut(t,!0):t}function Lt(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.h=t}else e.h=null}function Mt(e,t,n){t instanceof Kt?(e.b=t,function(e,t){t&&!e.f&&(Qt(e),e.c=null,e.a.forEach((function(e,t){var n=t.toLowerCase();t!=n&&($t(this,t),Xt(this,n,e))}),e)),e.f=t}(e.b,e.a)):(n||(t=Vt(t,Ht)),e.b=new Kt(t,e.a))}function jt(e,t,n){e.b.set(t,n)}function Ft(e){return jt(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^b()).toString(36)),e}function Ut(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function Vt(e,t,n){return"string"===typeof e?(e=encodeURI(e).replace(t,qt),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function qt(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}At.prototype.toString=function(){var e=[],t=this.f;t&&e.push(Vt(t,Bt,!0),":");var n=this.c;return(n||"file"==t)&&(e.push("//"),(t=this.j)&&e.push(Vt(t,Bt,!0),"@"),e.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.h)&&e.push(":",String(n))),(n=this.g)&&(this.c&&"/"!=n.charAt(0)&&e.push("/"),e.push(Vt(n,"/"==n.charAt(0)?Wt:zt,!0))),(n=this.b.toString())&&e.push("?",n),(n=this.i)&&e.push("#",Vt(n,Gt)),e.join("")};var Bt=/[#\/\?@]/g,zt=/[#\?:]/g,Wt=/[#\?]/g,Ht=/[#\?@]/g,Gt=/#/g;function Kt(e,t){this.b=this.a=null,this.c=e||null,this.f=!!t}function Qt(e){e.a||(e.a=new kt,e.b=0,e.c&&function(e,t){if(e){e=e.split("&");for(var n=0;n<e.length;n++){var r=e[n].indexOf("="),i=null;if(0<=r){var o=e[n].substring(0,r);i=e[n].substring(r+1)}else o=e[n];t(o,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(e.c,(function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)})))}function $t(e,t){Qt(e),t=Jt(e,t),Ot(e.a.b,t)&&(e.c=null,e.b-=e.a.get(t).length,Ot((e=e.a).b,t)&&(delete e.b[t],e.c--,e.a.length>2*e.c&&xt(e)))}function Yt(e,t){return Qt(e),t=Jt(e,t),Ot(e.a.b,t)}function Xt(e,t,n){$t(e,t),0<n.length&&(e.c=null,e.a.set(Jt(e,t),I(n)),e.b+=n.length)}function Jt(e,t){return t=String(t),e.f&&(t=t.toLowerCase()),t}function Zt(e,t){this.b=e,this.a=t}function en(e){this.g=e||tn,u.PerformanceNavigationTiming?e=0<(e=u.performance.getEntriesByType("navigation")).length&&("hq"==e[0].nextHopProtocol||"h2"==e[0].nextHopProtocol):e=!!(u.ia&&u.ia.ya&&u.ia.ya()&&u.
2ia.ya().qb),this.f=e?this.g:1,this.a=null,1<this.f&&(this.a=new Set),this.b=null,this.c=[]}(o=Kt.prototype).add=function(e,t){Qt(this),this.c=null,e=Jt(this,e);var n=this.a.get(e);return n||this.a.set(e,n=[]),n.push(t),this.b+=1,this},o.forEach=function(e,t){Qt(this),this.a.forEach((function(n,r){T(n,(function(n){e.call(t,n,r,this)}),this)}),this)},o.L=function(){Qt(this);for(var e=this.a.K(),t=this.a.L(),n=[],r=0;r<t.length;r++)for(var i=e[r],o=0;o<i.length;o++)n.push(t[r]);return n},o.K=function(e){Qt(this);var t=[];if("string"===typeof e)Yt(this,e)&&(t=S(t,this.a.get(Jt(this,e))));else{e=this.a.K();for(var n=0;n<e.length;n++)t=S(t,e[n])}return t},o.set=function(e,t){return Qt(this),this.c=null,Yt(this,e=Jt(this,e))&&(this.b-=this.a.get(e).length),this.a.set(e,[t]),this.b+=1,this},o.get=function(e,t){return e&&0<(e=this.K(e)).length?String(e[0]):t},o.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var e=[],t=this.a.L(),n=0;n<t.length;n++){var r=t[n],i=encodeURIComponent(String(r));r=this.K(r);for(var o=0;o<r.length;o++){var a=i;""!==r[o]&&(a+="="+encodeURIComponent(String(r[o]))),e.push(a)}}return this.c=e.join("&")};var tn=10;function nn(e){return!!e.b||!!e.a&&e.a.size>=e.f}function rn(e){return e.b?1:e.a?e.a.size:0}function on(e,t){return e.b?e.b==t:!!e.a&&e.a.has(t)}function an(e,t){e.a?e.a.add(t):e.b=t}function sn(e,t){e.b&&e.b==t?e.b=null:e.a&&e.a.has(t)&&e.a.delete(t)}function un(e){var t,n;if(null!=e.b)return e.c.concat(e.b.s);if(null!=e.a&&0!==e.a.size){var r=e.c;try{for(var o=i(e.a.values()),a=o.next();!a.done;a=o.next()){var s=a.value;r=r.concat(s.s)}}catch(u){t={error:u}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}return I(e.c)}function cn(){}function ln(){this.a=new cn}function hn(e,t,n){var r=n||"";try{Ct(e,(function(e,n){var i=e;f(e)&&(i=Ce(e)),t.push(r+n+"="+encodeURIComponent(i))}))}catch(i){throw t.push(r+"type="+encodeURIComponent("_badmap")),i}}function fn(e,t,n,r,i){try{t.onload=null,t.onerror=null,t.onabort=null,t.ontimeout=null,i(r)}catch(o){}}en.prototype.cancel=function(){var e,t;if(this.c=un(this),this.b)this.b.cancel(),this.b=null;else if(this.a&&0!==this.a.size){try{for(var n=i(this.a.values()),r=n.next();!r.done;r=n.next()){r.value.cancel()}}catch(o){e={error:o}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}this.a.clear()}},cn.prototype.stringify=function(e){return u.JSON.stringify(e,void 0)},cn.prototype.parse=function(e){return u.JSON.parse(e,void 0)};var pn=u.JSON.parse;function dn(e){Se.call(this),this.headers=new kt,this.H=e||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=vn,this.D=this.F=!1}_(dn,Se);var vn="",gn=/^https?$/i,yn=["POST","PUT"];function mn(e){return"content-type"==e.toLowerCase()}function bn(e,t){e.b=!1,e.a&&(e.g=!0,e.a.abort(),e.g=!1),e.f=t,e.h=5,_n(e),En(e)}function _n(e){e.u||(e.u=!0,e.dispatchEvent("complete"),e.dispatchEvent("error"))}function wn(e){if(e.b&&"undefined"!=typeof s&&(!e.s[1]||4!=Sn(e)||2!=e.X()))if(e.l&&4==Sn(e))Ue(e.za,0,e);else if(e.dispatchEvent("readystatechange"),4==Sn(e)){e.b=!1;try{var t,n=e.X();e:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r=!0;break e;default:r=!1}if(!(t=r)){var i;if(i=0===n){var o=String(e.B).match(Nt)[1]||null;if(!o&&u.self&&u.self.location){var a=u.self.location.protocol;o=a.substr(0,a.length-1)}i=!gn.test(o?o.toLowerCase():"")}t=i}if(t)e.dispatchEvent("complete"),e.dispatchEvent("success");else{e.h=6;try{var c=2<Sn(e)?e.a.statusText:""}catch(l){c=""}e.f=c+" ["+e.X()+"]",_n(e)}}finally{En(e)}}}function En(e,t){if(e.a){Tn(e);var n=e.a,r=e.s[0]?c:null;e.a=null,e.s=null,t||e.dispatchEvent("ready");try{n.onreadystatechange=r}catch(i){}}}function Tn(e){e.a&&e.D&&(e.a.ontimeout=null),e.m&&(u.clearTimeout(e.m),e.m=null)}function Sn(e){return e.a?e.a.readyState:0}function In(e,t,n){e:{for(r in n){var r=!1;break e}r=!0}r||(n=function(e){var t="";return R(e,(function(e,n){t+=n,t+=":",t+=e,t+="\r\n"})),t}(n),"string"===typeof e?null!=n&&encodeURIComponent(String(n)):jt(e,t,n))}
2function Cn(e,t,n){return n&&n.internalChannelParams&&n.internalChannelParams[e]||t}function kn(e){this.pa=0,this.g=[],this.c=new Ge,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=Cn("failFast",!1,e),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=Cn("baseRetryDelayMs",5e3,e),this.Ma=Cn("retryDelaySeedMs",1e4,e),this.Ja=Cn("forwardChannelMaxRetries",2,e),this.ma=Cn("forwardChannelRequestTimeoutMs",2e4,e),this.Ka=e&&e.g||void 0,this.D=void 0,this.C=e&&e.supportsCrossDomainXhr||!1,this.J="",this.b=new en(e&&e.concurrentRequestLimit),this.ka=new ln,this.da=e&&e.fastHandshake||!1,this.Ga=e&&e.b||!1,e&&e.f&&(this.c.a=!1),e&&e.forceLongPolling&&(this.T=!1),this.V=!this.da&&this.T&&e&&e.c||!1,this.ea=void 0,this.N=0,this.F=!1,this.s=null}function xn(e){if(Nn(e),3==e.v){var t=e.R++,n=Pt(e.B);jt(n,"SID",e.J),jt(n,"RID",t),jt(n,"TYPE","terminate"),Dn(e,n),(t=new ft(e,e.c,t,void 0)).H=2,t.i=Ft(Pt(n)),n=!1,u.navigator&&u.navigator.sendBeacon&&(n=u.navigator.sendBeacon(t.i.toString(),"")),!n&&u.Image&&((new Image).src=t.i,n=!0),n||(t.a=Gn(t.g,null),t.a.ba(t.i)),t.u=b(),_t(t)}Wn(e)}function On(e){e.a&&(Fn(e),e.a.cancel(),e.a=null)}function Nn(e){On(e),e.j&&(u.clearTimeout(e.j),e.j=null),Vn(e),e.b.cancel(),e.h&&("number"===typeof e.h&&u.clearTimeout(e.h),e.h=null)}function An(e,t){e.g.push(new Zt(e.La++,t)),3==e.v&&Pn(e)}function Pn(e){nn(e.b)||e.h||(e.h=!0,Re(e.Ba,e),e.u=0)}function Rn(e,t){var n;n=t?t.f:e.R++;var r=Pt(e.B);jt(r,"SID",e.J),jt(r,"RID",n),jt(r,"AID",e.P),Dn(e,r),e.i&&e.l&&In(r,e.i,e.l),n=new ft(e,e.c,n,e.u+1),null===e.i&&(n.B=e.l),t&&(e.g=t.s.concat(e.g)),t=Ln(e,n,1e3),n.setTimeout(Math.round(.5*e.ma)+Math.round(.5*e.ma*Math.random())),an(e.b,n),gt(n,r,t)}function Dn(e,t){e.f&&Ct({},(function(e,n){jt(t,n,e)}))}function Ln(e,t,n){n=Math.min(e.g.length,n);var r=e.f?y(e.f.Ha,e.f,e):null;e:for(var i=e.g,o=-1;;){var a=["count="+n];-1==o?0<n?(o=i[0].b,a.push("ofs="+o)):o=0:a.push("ofs="+o);for(var s=!0,u=0;u<n;u++){var c=i[u].b,l=i[u].a;if(0>(c-=o))o=Math.max(0,i[u].b-100),s=!1;else try{hn(l,a,"req"+c+"_")}catch(h){r&&r(l)}}if(s){r=a.join("&");break e}}return e=e.g.splice(0,n),t.s=e,r}function Mn(e){e.a||e.j||(e.U=1,Re(e.Aa,e),e.o=0)}function jn(e){return!(e.a||e.j||3<=e.o)&&(e.U++,e.j=tt(y(e.Aa,e),Bn(e,e.o)),e.o++,!0)}function Fn(e){null!=e.s&&(u.clearTimeout(e.s),e.s=null)}function Un(e){e.a=new ft(e,e.c,"rpc",e.U),null===e.i&&(e.a.B=e.l),e.a.O=0;var t=Pt(e.la);jt(t,"RID","rpc"),jt(t,"SID",e.J),jt(t,"CI",e.H?"0":"1"),jt(t,"AID",e.P),Dn(e,t),jt(t,"TYPE","xmlhttp"),e.i&&e.l&&In(t,e.i,e.l),e.D&&e.a.setTimeout(e.D);var n=e.a;e=e.ga,n.H=1,n.i=Ft(Pt(t)),n.j=null,n.I=!0,yt(n,e)}function Vn(e){null!=e.m&&(u.clearTimeout(e.m),e.m=null)}function qn(e,t){var n=null;if(e.a==t){Vn(e),Fn(e),e.a=null;var r=2}else{if(!on(e.b,t))return;n=t.s,sn(e.b,t),r=1}if(e.I=t.N,0!=e.v)if(t.b)if(1==r){n=t.j?t.j.length:0,t=b()-t.u;var i=e.u;(r=$e()).dispatchEvent(new et(r,n,t,i)),Pn(e)}else Mn(e);else if(3==(i=t.h)||0==i&&0<e.I||!(1==r&&function(e,t){return!(rn(e.b)>=e.b.f-(e.h?1:0))&&(e.h?(e.g=t.s.concat(e.g),!0):!(1==e.v||2==e.v||e.u>=(e.Ia?0:e.Ja))&&(e.h=tt(y(e.Ba,e,t),Bn(e,e.u)),e.u++,!0))}(e,t)||2==r&&jn(e)))switch(n&&0<n.length&&(t=e.b,t.c=t.c.concat(n)),i){case 1:zn(e,5);break;case 4:zn(e,10);break;case 3:zn(e,6);break;default:zn(e,2)}}function Bn(e,t){var n=e.Fa+Math.floor(Math.random()*e.Ma);return e.f||(n*=2),n*t}function zn(e,t){if(e.c.info("Error code "+t),2==t){var n=null;e.f&&(n=null);var r=y(e.Xa,e);n||(n=new At("//www.google.com/images/cleardot.gif"),u.location&&"http"==u.location.protocol||Rt(n,"https"),Ft(n)),function(e,t){var n=new Ge;if(u.Image){var r=new Image;r.onload=m(fn,n,r,"TestLoadImage: loaded",!0,t),r.onerror=m(fn,n,r,"TestLoadImage: error",!1,t),r.onabort=m(fn,n,r,"TestLoadImage: abort",!1,t),r.ontimeout=m(fn,n,r,"TestLoadImage: timeout",!1,t),u.setTimeout((function(){r.ontimeout&&r.ontimeout()}),1e4),r.src=e}else t(!1)}(n.toString(),r)}else Ze(2);e.v=0,e.f&&e.f.ra(t),Wn(e),Nn(e)}function Wn(e){e.v=0,e.I=-1,e.f&&(0==un(e.b).length&&0==e.g.length||(e.b.c.length=0,I(e.g),e.g.length=0),e.f.qa())}function Hn(e,t,n){var r=function(e){return e instanceof At?Pt(e):new At(e,void 0)}(n);if(""!=r.c)t&&Dt(r,t+"."+r.c),Lt(r,r.h);else{var i=u.location;r=function(e,t,n,r){var i=new At(null,void 0);return e&&Rt(i,e),t&&Dt(i,t),n&&Lt(i,n),r&&(i.g=r),i}(i.protocol,t?t+"."+i.hostname:i.hostname,+i.port,n)}return e.W&&R(e.W,(function(e,t){jt(r,t,e)})),t=e.A,n=e.na,t&&n&&jt(r,t,n),jt(r,"VER",e.ha),Dn(e,r),r}function Gn(e,t){if(t&&!e.C)throw Error("Can't create secondary domain capable XhrIo object.");return(t=new dn(e.Ka)).F=e.C,t}function Kn(){}function Qn(){if(V&&!(10<=Number(Z)))throw Error("Environmental error: no available transport.")}function $n(e,t){Se.call(this),this.a=new kn(t),this.l=e,this.b=t&&t.messageUrlParams||null,e=t&&t.messageHeaders||null,t&&t.clientProtocolHeaderRequired&&(e?e["X-Client-Protocol"]="webchannel":e={"X-Client-Protocol":"webchannel"}),this.a.l=e,e=t&&t.initMessageHeaders||null,t&&t.messageContentType&&(e?e["X-WebChannel-Content-Type"]=t.messageContentType:e={"X-WebChannel-Content-Type":t.messageContentType}),t&&t.a&&(e?e["X-WebChannel-Client-Profile"]=t.a:e={"X-WebChannel-Client-Profile":t.a}),this.a.O=e,(e=t&&t.httpHeadersOverwriteParam)&&!C(e)&&(this.a.i=e),this.h=t&&t.supportsCrossDomainXhr||!1,this.g=t&&t.sendRawJson||!1,(t=t&&t.httpSessionIdParam)&&!C(t)&&(this.a.A=t,null!==(e=this.b)&&t in e&&(t in(e=this.b)&&delete e[t])),this.f=new Jn(this)}function Yn(e){ct.call(this);var t=e.__sm__;if(t){e:{for(var n in t){e=n;break e}e=void 0}(this.c=e)?(e=this.c,this.data=null!==t&&e in t?t[e]:void 0):this.data=t}else this.data=e}function Xn(){lt.call(this),this.status=1}function Jn(e){this.a=e}(o=dn.prototype).ba=function(e,t,n,r){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.B+"; newUri="+e);t=t?t.toUpperCase():"GET",this.B=e,this.f="",this.h=0,this.u=!1,this.b=!0,this.a=new XMLHttpRequest,this.s=this.H?ot(this.H):ot(st),this.a.onreadystatechange=y(this.za,this);try{this.A=!0,this.a.open(t,String(e),!0),this.A=!1}catch(o){return void bn(this,o)}e=n||"";var i=new kt(this.headers);r&&Ct(r,(function(e,t){i.set(t,e)})),r=function(e){e:{for(var t=mn,n=e.length,r="string"===typeof e?e.split(""):e,i=0;i<n;i++)if(i in r&&t.call(void 0,r[i],i,e)){t=i;break e}t=-1}return 0>t?null:"string"===typeof e?e.charAt(t):e[t]}(i.L()),n=u.FormData&&e instanceof u.FormData,!(0<=E(yn,t))||r||n||i.set("Content-Type","application/x-www-form-urlencoded;
2charset=utf-8"),i.forEach((function(e,t){this.a.setRequestHeader(t,e)}),this),this.I&&(this.a.responseType=this.I),"withCredentials"in this.a&&this.a.withCredentials!==this.F&&(this.a.withCredentials=this.F);try{Tn(this),0<this.o&&((this.D=function(e){return V&&X(9)&&"number"===typeof e.timeout&&void 0!==e.ontimeout}(this.a))?(this.a.timeout=this.o,this.a.ontimeout=y(this.xa,this)):this.m=Ue(this.xa,this.o,this)),this.l=!0,this.a.send(e),this.l=!1}catch(o){bn(this,o)}},o.xa=function(){"undefined"!=typeof s&&this.a&&(this.f="Timed out after "+this.o+"ms, aborting",this.h=8,this.dispatchEvent("timeout"),this.abort(8))},o.abort=function(e){this.a&&this.b&&(this.b=!1,this.g=!0,this.a.abort(),this.g=!1,this.h=e||7,this.dispatchEvent("complete"),this.dispatchEvent("abort"),En(this))},o.G=function(){this.a&&(this.b&&(this.b=!1,this.g=!0,this.a.abort(),this.g=!1),En(this,!0)),dn.S.G.call(this)},o.za=function(){this.j||(this.A||this.l||this.g?wn(this):this.Ta())},o.Ta=function(){wn(this)},o.X=function(){try{return 2<Sn(this)?this.a.status:-1}catch(e){return-1}},o.$=function(){try{return this.a?this.a.responseText:""}catch(e){return""}},o.Na=function(e){if(this.a){var t=this.a.responseText;return e&&0==t.indexOf(e)&&(t=t.substring(e.length)),pn(t)}},o.ua=function(){return this.h},o.Qa=function(){return"string"===typeof this.f?this.f:String(this.f)},(o=kn.prototype).ha=8,o.v=1,o.Ba=function(e){if(this.h)if(this.h=null,1==this.v){if(!e){this.R=Math.floor(1e5*Math.random()),e=this.R++;var t,n=new ft(this,this.c,e,void 0),r=this.l;if(this.O&&(r?M(r=D(r),this.O):r=this.O),null===this.i&&(n.B=r),this.da)e:{for(var i=t=0;i<this.g.length;i++){var o=this.g[i];if(void 0===(o="__data__"in o.a&&"string"===typeof(o=o.a.__data__)?o.length:void 0))break;if(4096<(t+=o)){t=i;break e}if(4096===t||i===this.g.length-1){t=i+1;break e}}t=1e3}else t=1e3;t=Ln(this,n,t),jt(i=Pt(this.B),"RID",e),jt(i,"CVER",22),this.A&&jt(i,"X-HTTP-Session-Id",this.A),Dn(this,i),this.i&&r&&In(i,this.i,r),an(this.b,n),this.Ga&&jt(i,"TYPE","init"),this.da?(jt(i,"$req",t),jt(i,"SID","null"),n.V=!0,gt(n,i,null)):gt(n,i,t),this.v=2}}else 3==this.v&&(e?Rn(this,e):0==this.g.length||nn(this.b)||Rn(this))},o.Aa=function(){if(this.j=null,Un(this),this.V&&!(this.F||null==this.a||0>=this.N)){var e=2*this.N;this.c.info("BP detection timer enabled: "+e),this.s=tt(y(this.Sa,this),e)}},o.Sa=function(){this.s&&(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,On(this),Un(this))},o.Ra=function(){null!=this.m&&(this.m=null,On(this),jn(this),Ze(19))},o.Xa=function(e){e?(this.c.info("Successfully pinged google.com"),Ze(2)):(this.c.info("Failed to ping google.com"),Ze(1))},(o=Kn.prototype).ta=function(){},o.sa=function(){},o.ra=function(){},o.qa=function(){},o.Ha=function(){},Qn.prototype.a=function(e,t){return new $n(e,t)},_($n,Se),(o=$n.prototype).addEventListener=function(e,t,n,r){$n.S.addEventListener.call(this,e,t,n,r)},o.removeEventListener=function(e,t,n,r){$n.S.removeEventListener.call(this,e,t,n,r)},o.Oa=function(){this.a.f=this.f,this.h&&(this.a.C=!0);var e=this.a,t=this.l,n=this.b||void 0;Ze(0),e.fa=t,e.W=n||{},e.H=e.T,e.B=Hn(e,null,e.fa),Pn(e)},o.close=function(){xn(this.a)},o.Pa=function(e){if("string"===typeof e){var t={};t.__data__=e,An(this.a,t)}else this.g?((t={}).__data__=Ce(e),An(this.a,t)):An(this.a,e)},o.G=function(){this.a.f=null,delete this.f,xn(this.a),delete this.a,$n.S.G.call(this)},_(Yn,ct),_(Xn,lt),_(Jn,Kn),Jn.prototype.ta=function(){this.a.dispatchEvent("a")},Jn.prototype.sa=function(e){this.a.dispatchEvent(new Yn(e))},Jn.prototype.ra=function(e){this.a.dispatchEvent(new Xn(e))},Jn.prototype.qa=function(){this.a.dispatchEvent("b")},Qn.prototype.createWebChannel=Qn.prototype.a,$n.prototype.send=$n.prototype.Pa,$n.prototype.open=$n.prototype.Oa,$n.prototype.close=$n.prototype.close,nt.NO_ERROR=0,nt.TIMEOUT=8,nt.HTTP_ERROR=6,rt.COMPLETE="complete",at.EventType=ut,ut.OPEN="a",ut.CLOSE="b",ut.ERROR="c",ut.MESSAGE="d",Se.prototype.listen=Se.prototype.va,dn.prototype.listenOnce=dn.prototype.wa,dn.prototype.getLastError=dn.prototype.Qa,dn.prototype.getLastErrorCode=dn.prototype.ua,dn.prototype.getStatus=dn.prototype.X,dn.prototype.getResponseJson=dn.prototype.Na,dn.prototype.getResponseText=dn.prototype.$,dn.prototype.send=dn.prototype.ba;var Zn={createWebChannelTransport:function(){return new Qn},ErrorCode:nt,EventType:rt,WebChannel:at,XhrIo:dn},er=Zn.createWebChannelTransport,tr=Zn.ErrorCode,nr=Zn.EventType,rr=Zn.WebChannel,ir=Zn.XhrIo;t.default=Zn}
2.call(this,n(32))},function(e,t,n){"use strict";var r=n(8),i=n(1),o=n(13);function a(e){return e&&"object"===typeof e&&"default"in e?e:{default:e}}var s=a(r),u={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"},c=function(e){function t(n,r,i){var o=e.call(this,r)||this;return Object.setPrototypeOf(o,t.prototype),o.code=n,o.details=i,o}return i.__extends(t,e),t}(Error);var l=function(){function e(e,t){var n=this;this.auth=null,this.messaging=null,this.auth=e.getImmediate({optional:!0}),this.messaging=t.getImmediate({optional:!0}),this.auth||e.get().then((function(e){return n.auth=e}),(function(){})),this.messaging||t.get().then((function(e){return n.messaging=e}),(function(){}))}return e.prototype.getAuthToken=function(){return i.__awaiter(this,void 0,void 0,(function(){var e;return i.__generator(this,(function(t){switch(t.label){case 0:if(!this.auth)return[2,void 0];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.auth.getToken()];case 2:return(e=t.sent())?[2,e.accessToken]:[2,void 0];case 3:return t.sent(),[2,void 0];case 4:return[2]}}
2))}))},e.prototype.getInstanceIdToken=function(){return i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(e){if(!this.messaging||!("Notification"in self)||"granted"!==Notification.permission)return[2,void 0];try{return[2,this.messaging.getToken()]}catch(t){return[2,void 0]}return[2]}))}))},e.prototype.getContext=function(){return i.__awaiter(this,void 0,void 0,(function(){var e,t;return i.__generator(this,(function(n){switch(n.label){case 0:return[4,this.getAuthToken()];case 1:return e=n.sent(),[4,this.getInstanceIdToken()];case 2:return t=n.sent(),[2,{authToken:e,instanceIdToken:t}]}}))}))},e}();function h(e,t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=t(e[r]));return n}var f=function(){function e(){}return e.prototype.encode=function(e){var t=this;if(null==e)return null;if(e instanceof Number&&(e=e.valueOf()),"number"===typeof e&&isFinite(e))return e;if(!0===e||!1===e)return e;if("[object String]"===Object.prototype.toString.call(e))return e;if(Array.isArray(e))return e.map((function(e){return t.encode(e)}));if("function"===typeof e||"object"===typeof e)return h(e,(function(e){return t.encode(e)}));throw new Error("Data cannot be encoded in JSON: "+e)},e.prototype.decode=function(e){var t=this;if(null==e)return e;if(e["@type"])switch(e["@type"]){case"type.googleapis.com/google.protobuf.Int64Value":case"type.googleapis.com/google.protobuf.UInt64Value":var n=Number(e.value);if(isNaN(n))throw new Error("Data cannot be decoded from JSON: "+e);return n;default:throw new Error("Data cannot be decoded from JSON: "+e)}return Array.isArray(e)?e.map((function(e){return t.decode(e)})):"function"===typeof e||"object"===typeof e?h(e,(function(e){return t.decode(e)})):e},e}();var p=function(){function e(e,t,n,r,i){var o=this;void 0===r&&(r="us-central1"),this.app_=e,this.fetchImpl=i,this.serializer=new f,this.emulatorOrigin=null,this.INTERNAL={delete:function(){return Promise.resolve(o.deleteService())}},this.contextProvider=new l(t,n),this.cancelAllRequests=new Promise((function(e){o.deleteService=function(){return e()}}));try{var a=new URL(r);this.customDomain=a.origin,this.region="us-central1"}catch(s){this.customDomain=null,this.region=r}}return Object.defineProperty(e.prototype,"app",{get:function(){return this.app_},enumerable:!1,configurable:!0}),e.prototype._url=function(e){var t=this.app_.options.projectId;return null!==this.emulatorOrigin?this.emulatorOrigin+"/"+t+"/"+this.region+"/"+e:null!==this.customDomain?this.customDomain+"/"+e:"https://"+this.region+"-"+t+".cloudfunctions.net/"+e},e.prototype.useFunctionsEmulator=function(e){this.emulatorOrigin=e},e.prototype.httpsCallable=function(e,t){var n=this;return function(r){return n.call(e,r,t||{})}},e.prototype.postJSON=function(e,t,n){return i.__awaiter(this,void 0,void 0,(function(){var r,o;return i.__generator(this,(function(i){switch(i.label){case 0:n["Content-Type"]="application/json",i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.fetchImpl(e,{method:"POST",body:JSON.stringify(t),headers:n})];case 2:return r=i.sent(),[3,4];case 3:return i.sent(),[2,{status:0,json:null}];case 4:o=null,i.label=5;case 5:return i.trys.push([5,7,,8]),[4,r.json()];case 6:return o=i.sent(),[3,8];case 7:return i.sent(),[3,8];case 8:return[2,{status:r.status,json:o}]}}))}))},e.prototype.call=function(e,t,n){return i.__awaiter(this,void 0,void 0,(function(){var r,o,a,s,l,h,f,p,v,g,y;return i.__generator(this,(function(i){switch(i.label){case 0:return r=this._url(e),t=this.serializer.encode(t),o={data:t},a={},[4,this.contextProvider.getContext()];case 1:return(s=i.sent()).authToken&&(a.Authorization="Bearer "+s.authToken),s.instanceIdToken&&(a["Firebase-Instance-ID-Token"]=s.instanceIdToken),l=n.timeout||7e4,h=function(e){var t,n=new Promise((function(n,r){t=setTimeout((function(){r(new c("deadline-exceeded","deadline-exceeded"))}),e)}));return{timer:t,promise:n}}(l),f=h.timer,p=h.promise,[4,Promise.race([d(f,this.postJSON(r,o,a)),p,d(f,this.cancelAllRequests)])];case 2:if(!(v=i.sent()))throw new c("cancelled","Firebase Functions instance was deleted.");
2if(g=function(e,t,n){var r=function(e){if(e>=200&&e<300)return"ok";switch(e){case 0:return"internal";case 400:return"invalid-argument";case 401:return"unauthenticated";case 403:return"permission-denied";case 404:return"not-found";case 409:return"aborted";case 429:return"resource-exhausted";case 499:return"cancelled";case 500:return"internal";case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline-exceeded"}return"unknown"}(e),i=r,o=void 0;try{var a=t&&t.error;if(a){var s=a.status;if("string"===typeof s){if(!u[s])return new c("internal","internal");r=u[s],i=s}var l=a.message;"string"===typeof l&&(i=l),void 0!==(o=a.details)&&(o=n.decode(o))}}catch(h){}return"ok"===r?null:new c(r,i,o)}(v.status,v.json,this.serializer))throw g;if(!v.json)throw new c("internal","Response is not valid JSON object.");if("undefined"===typeof(y=v.json.data)&&(y=v.json.result),"undefined"===typeof y)throw new c("internal","Response is missing data field.");return[2,{data:this.serializer.decode(y)}]}}))}))},e}();function d(e,t){return i.__awaiter(this,void 0,void 0,(function(){var n;return i.__generator(this,(function(r){switch(r.label){case 0:return[4,t];case 1:return n=r.sent(),clearTimeout(e),[2,n]}}))}))}!function(e,t){var n={Functions:p};e.INTERNAL.registerComponent(new o.Component("functions",(function(e,n){var r=e.getProvider("app").getImmediate(),i=e.getProvider("auth-internal"),o=e.getProvider("messaging");return new p(r,i,o,n,t)}),"PUBLIC").setServiceProps(n).setMultipleInstances(!0))}(s.default,fetch.bind(self)),s.default.registerVersion("@firebase/functions","0.5.1")},function(e,t,n){"use strict";n.r(t);n(33);var r,i,o=n(13),a=n(4),s=n(1),u=n(22),c=n(8),l=n.n(c),h=((r={})["missing-app-config-values"]='Missing App configuration value: "{$valueName}"',r["only-available-in-window"]="This method is available in a Window context.",r["only-available-in-sw"]="This method is available in a service worker context.",r["permission-default"]="The notification permission was not granted and dismissed instead.",r["permission-blocked"]="The notification permission was not granted and blocked instead.",r["unsupported-browser"]="This browser doesn't support the API's required to use the firebase SDK.",r["failed-service-worker-registration"]="We are unable to register the default service worker. {$browserErrorMessage}",r["token-subscribe-failed"]="A problem occurred while subscribing the user to FCM: {$errorInfo}",r["token-subscribe-no-token"]="FCM returned no token when subscribing the user to push.",r["token-unsubscribe-failed"]="A problem occurred while unsubscribing the user from FCM: {$errorInfo}",r["token-update-failed"]="A problem occurred while updating the user from FCM: {$errorInfo}",r["token-update-no-token"]="FCM returned no token when updating the user to push.",r["use-sw-after-get-token"]="The useServiceWorker() method may only be called once and must be called before calling getToken() to ensure your service worker is used.",r["invalid-sw-registration"]="The input to useServiceWorker() must be a ServiceWorkerRegistration.",r["invalid-bg-handler"]="The input to setBackgroundMessageHandler() must be a function.",r["invalid-vapid-key"]="The public VAPID key must be a string.",r["use-vapid-key-after-get-token"]="The usePublicVapidKey() method may only be called once and must be called before calling getToken() to ensure your VAPID key is used.",r),f=new a.ErrorFactory("messaging","Messaging",h),p="BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4";function d(e){var t=new Uint8Array(e);return btoa(String.fromCharCode.apply(String,Object(s.__spread)(t))).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function v(e){for(var t=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=atob(t),r=new Uint8Array(n.length),i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r}!function(e){e.PUSH_RECEIVED="push-received",e.NOTIFICATION_CLICKED="notification-clicked"}(i||(i={}));function g(e){return Object(s.__awaiter)(this,void 0,void 0,(function(){var t,n,r=this;return Object(s.__generator)(this,(function(i){switch(i.label){case 0:return"databases"in indexedDB?[4,indexedDB.databases()]:[3,2];case 1:if(t=i.sent(),!t.map((function(e){return e.name})).includes("fcm_token_details_db"))return[2,null];i.label=2;case 2:return n=null,[4,Object(u.openDb)("fcm_token_details_db",5,(function(t){return Object(s.__awaiter)(r,void 0,void 0,(function(){var r,i,o,a;return Object(s.__generator)(this,(function(s){switch(s.label){case 0:return t.oldVersion<2?[2]:t.objectStoreNames.contains("fcm_token_object_Store")?[4,(r=t.transaction.objectStore("fcm_token_object_Store")).index("fcmSenderId").get(e)]:[2];case 1:return i=s.sent(),[4,r.clear()];case 2:if(s.sent(),!i)return[2];if(2===t.oldVersion){if(!(o=i).auth||!o.p256dh||!o.endpoint)return[2];n={token:o.fcmToken,createTime:null!==(a=o.createTime)&&void 0!==a?a:Date.now(),subscriptionOptions:{auth:o.auth,p256dh:o.p256dh,endpoint:o.endpoint,swScope:o.swScope,vapidKey:"string"===typeof o.vapidKey?o.vapidKey:d(o.vapidKey)}}}else(3===t.oldVersion||4===t.oldVersion)&&(n={token:(o=i).fcmToken,createTime:o.createTime,subscriptionOptions:{auth:d(o.auth),p256dh:d(o.p256dh),endpoint:o.endpoint,swScope:o.swScope,vapidKey:d(o.vapidKey)}});return[2]}}
2))}))}))];case 3:return i.sent().close(),[4,Object(u.deleteDb)("fcm_token_details_db")];case 4:return i.sent(),[4,Object(u.deleteDb)("fcm_vapid_details_db")];case 5:return i.sent(),[4,Object(u.deleteDb)("undefined")];case 6:return i.sent(),[2,y(n)?n:null]}}))}))}function y(e){if(!e||!e.subscriptionOptions)return!1;var t=e.subscriptionOptions;return"number"===typeof e.createTime&&e.createTime>0&&"string"===typeof e.token&&e.token.length>0&&"string"===typeof t.auth&&t.auth.length>0&&"string"===typeof t.p256dh&&t.p256dh.length>0&&"string"===typeof t.endpoint&&t.endpoint.length>0&&"string"===typeof t.swScope&&t.swScope.length>0&&"string"===typeof t.vapidKey&&t.vapidKey.length>0}var m="firebase-messaging-store",b=null;function _(){return b||(b=Object(u.openDb)("firebase-messaging-database",1,(function(e){switch(e.oldVersion){case 0:e.createObjectStore(m)}}))),b}function w(e){return Object(s.__awaiter)(this,void 0,void 0,(function(){var t,n,r;return Object(s.__generator)(this,(function(i){switch(i.label){case 0:return t=S(e),[4,_()];case 1:return[4,i.sent().transaction(m).objectStore(m).get(t)];case 2:return(n=i.sent())?[2,n]:[3,3];case 3:return[4,g(e.appConfig.senderId)];case 4:return(r=i.sent())?[4,E(e,r)]:[3,6];case 5:return i.sent(),[2,r];case 6:return[2]}}
2))}))}function E(e,t){return Object(s.__awaiter)(this,void 0,void 0,(function(){var n,r,i;return Object(s.__generator)(this,(function(o){switch(o.label){case 0:return n=S(e),[4,_()];case 1:return r=o.sent(),[4,(i=r.transaction(m,"readwrite")).objectStore(m).put(t,n)];case 2:return o.sent(),[4,i.complete];case 3:return o.sent(),[2,t]}}))}))}function T(e){return Object(s.__awaiter)(this,void 0,void 0,(function(){var t,n,r;return Object(s.__generator)(this,(function(i){switch(i.label){case 0:return t=S(e),[4,_()];case 1:return n=i.sent(),[4,(r=n.transaction(m,"readwrite")).objectStore(m).delete(t)];case 2:return i.sent(),[4,r.complete];case 3:return i.sent(),[2]}}))}))}function S(e){return e.appConfig.appId}function I(e,t){return Object(s.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o,a,u;return Object(s.__generator)(this,(function(s){switch(s.label){case 0:return[4,O(e)];case 1:n=s.sent(),r=N(t),i={method:"POST",headers:n,body:JSON.stringify(r)},s.label=2;case 2:return s.trys.push([2,5,,6]),[4,fetch(x(e.appConfig),i)];case 3:return[4,s.sent().json()];case 4:return o=s.sent(),[3,6];case 5:throw a=s.sent(),f.create("token-subscribe-failed",{errorInfo:a});case 6:if(o.error)throw u=o.error.message,f.create("token-subscribe-failed",{errorInfo:u});if(!o.token)throw f.create("token-subscribe-no-token");return[2,o.token]}}))}))}function C(e,t){return Object(s.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o,a,u;return Object(s.__generator)(this,(function(s){switch(s.label){case 0:return[4,O(e)];case 1:n=s.sent(),r=N(t.subscriptionOptions),i={method:"PATCH",headers:n,body:JSON.stringify(r)},s.label=2;case 2:return s.trys.push([2,5,,6]),[4,fetch(x(e.appConfig)+"/"+t.token,i)];case 3:return[4,s.sent().json()];case 4:return o=s.sent(),[3,6];case 5:throw a=s.sent(),f.create("token-update-failed",{errorInfo:a});case 6:if(o.error)throw u=o.error.message,f.create("token-update-failed",{errorInfo:u});if(!o.token)throw f.create("token-update-no-token");return[2,o.token]}}))}))}function k(e,t){return Object(s.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o,a;return Object(s.__generator)(this,(function(s){switch(s.label){case 0:return[4,O(e)];case 1:n=s.sent(),r={method:"DELETE",headers:n},s.label=2;case 2:return s.trys.push([2,5,,6]),[4,fetch(x(e.appConfig)+"/"+t,r)];case 3:return[4,s.sent().json()];case 4:if((i=s.sent()).error)throw o=i.error.message,f.create("token-unsubscribe-failed",{errorInfo:o});return[3,6];case 5:throw a=s.sent(),f.create("token-unsubscribe-failed",{errorInfo:a});case 6:return[2]}}
2))}))}function x(e){return"https://fcmregistrations.googleapis.com/v1/projects/"+e.projectId+"/registrations"}function O(e){var t=e.appConfig,n=e.installations;return Object(s.__awaiter)(this,void 0,void 0,(function(){var e;return Object(s.__generator)(this,(function(r){switch(r.label){case 0:return[4,n.getToken()];case 1:return e=r.sent(),[2,new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t.apiKey,"x-goog-firebase-installations-auth":"FIS "+e})]}}))}))}function N(e){var t=e.p256dh,n=e.auth,r=e.endpoint,i=e.vapidKey,o={web:{endpoint:r,auth:n,p256dh:t}};return i!==p&&(o.web.applicationPubKey=i),o}function A(e,t,n){return Object(s.__awaiter)(this,void 0,void 0,(function(){var r,i,o,a;return Object(s.__generator)(this,(function(s){switch(s.label){case 0:if("granted"!==Notification.permission)throw f.create("permission-blocked");return[4,L(t,n)];case 1:return r=s.sent(),[4,w(e)];case 2:return i=s.sent(),o={vapidKey:n,swScope:t.scope,endpoint:r.endpoint,auth:d(r.getKey("auth")),p256dh:d(r.getKey("p256dh"))},i?[3,3]:[2,D(e,o)];case 3:if(function(e,t){var n=t.vapidKey===e.vapidKey,r=t.endpoint===e.endpoint,i=t.auth===e.auth,o=t.p256dh===e.p256dh;return n&&r&&i&&o}(i.subscriptionOptions,o))return[3,8];s.label=4;case 4:return s.trys.push([4,6,,7]),[4,k(e,i.token)];case 5:return s.sent(),[3,7];case 6:return a=s.sent(),console.warn(a),[3,7];case 7:return[2,D(e,o)];case 8:return Date.now()>=i.createTime+6048e5?[2,R({token:i.token,createTime:Date.now(),subscriptionOptions:o},e,t)]:[2,i.token];case 9:return[2]}}
2))}))}function P(e,t){return Object(s.__awaiter)(this,void 0,void 0,(function(){var n,r;return Object(s.__generator)(this,(function(i){switch(i.label){case 0:return[4,w(e)];case 1:return(n=i.sent())?[4,k(e,n.token)]:[3,4];case 2:return i.sent(),[4,T(e)];case 3:i.sent(),i.label=4;case 4:return[4,t.pushManager.getSubscription()];case 5:return(r=i.sent())?[2,r.unsubscribe()]:[2,!0]}}))}))}function R(e,t,n){return Object(s.__awaiter)(this,void 0,void 0,(function(){var r,i,o;return Object(s.__generator)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,5]),[4,C(t,e)];case 1:return r=a.sent(),i=Object(s.__assign)(Object(s.__assign)({},e),{token:r,createTime:Date.now()}),[4,E(t,i)];case 2:return a.sent(),[2,r];case 3:return o=a.sent(),[4,P(t,n)];case 4:throw a.sent(),o;case 5:return[2]}}))}))}function D(e,t){return Object(s.__awaiter)(this,void 0,void 0,(function(){var n,r;return Object(s.__generator)(this,(function(i){switch(i.label){case 0:return[4,I(e,t)];case 1:return n=i.sent(),r={token:n,createTime:Date.now(),subscriptionOptions:t},[4,E(e,r)];case 2:return i.sent(),[2,r.token]}}))}))}function L(e,t){return Object(s.__awaiter)(this,void 0,void 0,(function(){var n;return Object(s.__generator)(this,(function(r){switch(r.label){case 0:return[4,e.pushManager.getSubscription()];case 1:return(n=r.sent())?[2,n]:[2,e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:v(t)})]}}))}))}function M(e){return"object"===typeof e&&!!e&&"google.c.a.c_id"in e}var j=function(){function e(e){var t=this;this.firebaseDependencies=e,this.isOnBackgroundMessageUsed=null,this.vapidKey=null,this.bgMessageHandler=null,self.addEventListener("push",(function(e){e.waitUntil(t.onPush(e))})),self.addEventListener("pushsubscriptionchange",(function(e){e.waitUntil(t.onSubChange(e))})),self.addEventListener("notificationclick",(function(e){e.waitUntil(t.onNotificationClick(e))}))}return Object.defineProperty(e.prototype,"app",{get:function(){return this.firebaseDependencies.app},enumerable:!1,configurable:!0}),e.prototype.setBackgroundMessageHandler=function(e){if(this.isOnBackgroundMessageUsed=!1,!e||"function"!==typeof e)throw f.create("invalid-bg-handler");this.bgMessageHandler=e},e.prototype.onBackgroundMessage=function(e){var t=this;return this.isOnBackgroundMessageUsed=!0,this.bgMessageHandler=e,function(){t.bgMessageHandler=null}},e.prototype.getToken=function(){var e,t;return Object(s.__awaiter)(this,void 0,void 0,(function(){var n;return Object(s.__generator)(this,(function(r){switch(r.label){case 0:return this.vapidKey?[3,2]:[4,w(this.firebaseDependencies)];case 1:n=r.sent(),this.vapidKey=null!==(t=null===(e=null===n||void 0===n?void 0:n.subscriptionOptions)||void 0===e?void 0:e.vapidKey)&&void 0!==t?t:p,r.label=2;case 2:return[2,A(this.firebaseDependencies,self.registration,this.vapidKey)]}}))}))},e.prototype.deleteToken=function(){return P(this.firebaseDependencies,self.registration)},e.prototype.requestPermission=function(){throw f.create("only-available-in-window")},e.prototype.usePublicVapidKey=function(e){if(null!==this.vapidKey)throw f.create("use-vapid-key-after-get-token");if("string"!==typeof e||0===e.length)throw f.create("invalid-vapid-key");this.vapidKey=e},e.prototype.useServiceWorker=function(){throw f.create("only-available-in-window")},e.prototype.onMessage=function(){throw f.create("only-available-in-window")},e.prototype.onTokenRefresh=function(){throw f.create("only-available-in-window")},e.prototype.onPush=function(e){return Object(s.__awaiter)(this,void 0,void 0,(function(){var t,n,r,i;return Object(s.__generator)(this,(function(o){switch(o.label){case 0:return(t=function(e){var t=e.data;if(!t)return null;try{return t.json()}catch(n){return null}}(e))?[4,q()]:(console.debug("FirebaseMessaging: failed to get parsed MessagePayload from the PushEvent. Skip handling the push."),[2]);case 1:return function(e){return e.some((function(e){return"visible"===e.visibilityState&&!e.url.startsWith("chrome-extension://")}))}(n=o.sent())?[2,V(n,t)]:(r=!1,t.notification?[4,B(F(t))]:[3,3]);case 2:o.sent(),r=!0,o.label=3;
2case 3:return!0===r&&!1===this.isOnBackgroundMessageUsed||this.bgMessageHandler&&(i=function(e){var t={from:e.from,collapseKey:e.collapse_key};return function(e,t){if(!t.notification)return;e.notification={};var n=t.notification.title;n&&(e.notification.title=n);var r=t.notification.body;r&&(e.notification.body=r);var i=t.notification.image;i&&(e.notification.image=i)}(t,e),function(e,t){if(!t.data)return;e.data=t.data}(t,e),function(e,t){if(!t.fcmOptions)return;e.fcmOptions={};var n=t.fcmOptions.link;n&&(e.fcmOptions.link=n);var r=t.fcmOptions.analytics_label;r&&(e.fcmOptions.analyticsLabel=r)}(t,e),t}(t),"function"===typeof this.bgMessageHandler?this.bgMessageHandler(i):this.bgMessageHandler.next(i)),[2]}}))}))},e.prototype.onSubChange=function(e){var t,n;return Object(s.__awaiter)(this,void 0,void 0,(function(){var r;return Object(s.__generator)(this,(function(i){switch(i.label){case 0:return e.newSubscription?[3,2]:[4,P(this.firebaseDependencies,self.registration)];case 1:return i.sent(),[2];case 2:return[4,w(this.firebaseDependencies)];case 3:return r=i.sent(),[4,P(this.firebaseDependencies,self.registration)];case 4:return i.sent(),[4,A(this.firebaseDependencies,self.registration,null!==(n=null===(t=null===r||void 0===r?void 0:r.subscriptionOptions)||void 0===t?void 0:t.vapidKey)&&void 0!==n?n:p)];case 5:return i.sent(),[2]}}))}))},e.prototype.onNotificationClick=function(e){var t,n;return Object(s.__awaiter)(this,void 0,void 0,(function(){var r,o,a,u,c;return Object(s.__generator)(this,(function(s){switch(s.label){case 0:return(r=null===(n=null===(t=e.notification)||void 0===t?void 0:t.data)||void 0===n?void 0:n.FCM_MSG)?e.action?[2]:(e.stopImmediatePropagation(),e.notification.close(),(o=function(e){var t,n,r,i=null!==(n=null===(t=e.fcmOptions)||void 0===t?void 0:t.link)&&void 0!==n?n:null===(r=e.notification)||void 0===r?void 0:r.click_action;if(i)return i;return M(e.data)?self.location.origin:null}(r))?(a=new URL(o,self.location.href),u=new URL(self.location.origin),a.host!==u.host?[2]:[4,U(a)]):[2]):[2];case 1:return(c=s.sent())?[3,4]:[4,self.clients.openWindow(o)];case 2:return c=s.sent(),[4,(l=3e3,new Promise((function(e){setTimeout(e,l)})))];case 3:return s.sent(),[3,6];case 4:return[4,c.focus()];case 5:c=s.sent(),s.label=6;case 6:return c?(r.messageType=i.NOTIFICATION_CLICKED,r.isFirebaseMessaging=!0,[2,c.postMessage(r)]):[2]}var l}))}))},e}();function F(e){var t,n=Object(s.__assign)({},e.notification);return n.data=((t={}).FCM_MSG=e,t),n}function U(e){return Object(s.__awaiter)(this,void 0,void 0,(function(){var t,n,r,i,o,a,u;return Object(s.__generator)(this,(function(c){switch(c.label){case 0:return[4,q()];case 1:t=c.sent();try{for(n=Object(s.__values)(t),r=n.next();!r.done;r=n.next())if(i=r.value,o=new URL(i.url,self.location.href),e.host===o.host)return[2,i]}catch(l){a={error:l}}finally{try{r&&!r.done&&(u=n.return)&&u.call(n)}finally{if(a)throw a.error}}return[2,null]}}))}))}function V(e,t){var n,r;t.isFirebaseMessaging=!0,t.messageType=i.PUSH_RECEIVED;try{for(var o=Object(s.__values)(e),a=o.next();!a.done;a=o.next()){a.value.postMessage(t)}}catch(u){n={error:u}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}function q(){return self.clients.matchAll({type:"window",includeUncontrolled:!0})}function B(e){var t,n=e.actions,r=Notification.maxActions;return n&&r&&n.length>r&&console.warn("This browser only supports "+r+" actions. The remaining actions will not be displayed."),self.registration.showNotification(null!==(t=e.title)&&void 0!==t?t:"",e)}var z=function(){function e(e){var t=this;this.firebaseDependencies=e,this.vapidKey=null,this.onMessageCallback=null,navigator.serviceWorker.addEventListener("message",(function(e){return t.messageEventListener(e)}))}return Object.defineProperty(e.prototype,"app",{get:function(){return this.firebaseDependencies.app},enumerable:!1,configurable:!0}),e.prototype.messageEventListener=function(e){return Object(s.__awaiter)(this,void 0,void 0,(function(){var t,n;return Object(s.__generator)(this,(function(r){switch(r.label){case 0:return(t=e.data).isFirebaseMessaging?(this.onMessageCallback&&t.messageType===i.PUSH_RECEIVED&&("function"===typeof this.onMessageCallback?this.onMessageCallback(function(e){return delete e.messageType,delete e.isFirebaseMessaging,e}(Object.assign({},t))):this.onMessageCallback.next(Object.assign({},t))),M(n=t.data)&&"1"===n["google.c.a.e"]?[4,this.logEvent(t.messageType,n)]:[3,2]):[2];case 1:r.sent(),r.label=2;case 2:return[2]}}
2))}))},e.prototype.getVapidKey=function(){return this.vapidKey},e.prototype.getSwReg=function(){return this.swRegistration},e.prototype.getToken=function(e){return Object(s.__awaiter)(this,void 0,void 0,(function(){return Object(s.__generator)(this,(function(t){switch(t.label){case 0:return"default"!==Notification.permission?[3,2]:[4,Notification.requestPermission()];case 1:t.sent(),t.label=2;case 2:if("granted"!==Notification.permission)throw f.create("permission-blocked");return[4,this.updateVapidKey(null===e||void 0===e?void 0:e.vapidKey)];case 3:return t.sent(),[4,this.updateSwReg(null===e||void 0===e?void 0:e.serviceWorkerRegistration)];case 4:return t.sent(),[2,A(this.firebaseDependencies,this.swRegistration,this.vapidKey)]}}))}))},e.prototype.updateVapidKey=function(e){return Object(s.__awaiter)(this,void 0,void 0,(function(){return Object(s.__generator)(this,(function(t){return e?this.vapidKey=e:this.vapidKey||(this.vapidKey=p),[2]}))}))},e.prototype.updateSwReg=function(e){return Object(s.__awaiter)(this,void 0,void 0,(function(){return Object(s.__generator)(this,(function(t){switch(t.label){case 0:return e||this.swRegistration?[3,2]:[4,this.registerDefaultSw()];case 1:t.sent(),t.label=2;case 2:if(!e&&this.swRegistration)return[2];if(!(e instanceof ServiceWorkerRegistration))throw f.create("invalid-sw-registration");return this.swRegistration=e,[2]}}))}))},e.prototype.registerDefaultSw=function(){return Object(s.__awaiter)(this,void 0,void 0,(function(){var e,t;return Object(s.__generator)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),e=this,[4,navigator.serviceWorker.register("/firebase-messaging-sw.js",{scope:"/firebase-cloud-messaging-push-scope"})];case 1:return e.swRegistration=n.sent(),this.swRegistration.update().catch((function(){})),[3,3];case 2:throw t=n.sent(),f.create("failed-service-worker-registration",{browserErrorMessage:t.message});case 3:return[2]}}
2))}))},e.prototype.deleteToken=function(){return Object(s.__awaiter)(this,void 0,void 0,(function(){return Object(s.__generator)(this,(function(e){switch(e.label){case 0:return this.swRegistration?[3,2]:[4,this.registerDefaultSw()];case 1:e.sent(),e.label=2;case 2:return[2,P(this.firebaseDependencies,this.swRegistration)]}}))}))},e.prototype.requestPermission=function(){return Object(s.__awaiter)(this,void 0,void 0,(function(){var e;return Object(s.__generator)(this,(function(t){switch(t.label){case 0:return"granted"===Notification.permission?[2]:[4,Notification.requestPermission()];case 1:if("granted"===(e=t.sent()))return[2];throw"denied"===e?f.create("permission-blocked"):f.create("permission-default")}}))}))},e.prototype.usePublicVapidKey=function(e){if(null!==this.vapidKey)throw f.create("use-vapid-key-after-get-token");if("string"!==typeof e||0===e.length)throw f.create("invalid-vapid-key");this.vapidKey=e},e.prototype.useServiceWorker=function(e){if(!(e instanceof ServiceWorkerRegistration))throw f.create("invalid-sw-registration");if(this.swRegistration)throw f.create("use-sw-after-get-token");this.swRegistration=e},e.prototype.onMessage=function(e){var t=this;return this.onMessageCallback=e,function(){t.onMessageCallback=null}},e.prototype.setBackgroundMessageHandler=function(){throw f.create("only-available-in-sw")},e.prototype.onBackgroundMessage=function(){throw f.create("only-available-in-sw")},e.prototype.onTokenRefresh=function(){return function(){}},e.prototype.logEvent=function(e,t){return Object(s.__awaiter)(this,void 0,void 0,(function(){var n;return Object(s.__generator)(this,(function(r){switch(r.label){case 0:return n=function(e){switch(e){case i.NOTIFICATION_CLICKED:return"notification_open";case i.PUSH_RECEIVED:return"notification_foreground";default:throw new Error}}(e),[4,this.firebaseDependencies.analyticsProvider.get()];case 1:return r.sent().logEvent(n,{message_id:t["google.c.a.c_id"],message_name:t["google.c.a.c_l"],message_time:t["google.c.a.ts"],message_device_time:Math.floor(Date.now()/1e3)}),[2]}}))}))},e}();function W(e){return f.create("missing-app-config-values",{valueName:e})}var H={isSupported:G};function G(){return self&&"ServiceWorkerGlobalScope"in self?"indexedDB"in self&&null!==indexedDB&&"PushManager"in self&&"Notification"in self&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey"):"indexedDB"in window&&null!==indexedDB&&navigator.cookieEnabled&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}l.a.INTERNAL.registerComponent(new o.Component("messaging",(function(e){var t=e.getProvider("app").getImmediate(),n={app:t,appConfig:function(e){var t,n;if(!e||!e.options)throw W("App Configuration Object");if(!e.name)throw W("App Name");var r=e.options;try{for(var i=Object(s.__values)(["projectId","apiKey","appId","messagingSenderId"]),o=i.next();!o.done;o=i.next()){var a=o.value;if(!r[a])throw W(a)}}catch(u){t={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return{appName:e.name,projectId:r.projectId,apiKey:r.apiKey,appId:r.appId,senderId:r.messagingSenderId}}(t),installations:e.getProvider("installations").getImmediate(),analyticsProvider:e.getProvider("analytics-internal")};if(!G())throw f.create("unsupported-browser");return self&&"ServiceWorkerGlobalScope"in self?new j(n):new z(n)}),"PUBLIC").setServiceProps(H))},function(e,t,n){"use strict";n.r(t),n.d(t,"registerStorage",(function(){return ft}));var r=n(8),i=n.n(r),o=n(1),a=n(13),s=function(){function e(e,t){this.code_=C(e),this.message_="Firebase Storage: "+t,this.serverResponse_=null,this.name_="FirebaseError"}return e.prototype.codeProp=function(){return this.code},e.prototype.codeEquals=function(e){return C(e)===this.codeProp()},e.prototype.serverResponseProp=function(){return this.serverResponse_},e.prototype.setServerResponseProp=function(e){this.serverResponse_=e},Object.defineProperty(e.prototype,"name",{get:function(){return this.name_}
2,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"code",{get:function(){return this.code_},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"message",{get:function(){return this.serverResponse_?this.message_+"\n"+this.serverResponse_:this.message_},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"serverResponse",{get:function(){return this.serverResponse_},enumerable:!1,configurable:!0}),e}(),u="unknown",c="object-not-found",l="quota-exceeded",h="unauthenticated",f="unauthorized",p="retry-limit-exceeded",d="canceled",v="invalid-url",g="invalid-default-bucket",y="cannot-slice-blob",m="server-file-wrong-size",b="no-download-url",_="invalid-argument",w="invalid-argument-count",E="app-deleted",T="invalid-root-operation",S="invalid-format",I="internal-error";function C(e){return"storage/"+e}function k(){return new s(u,"An unknown error occurred, please check the error payload for server response.")}function x(){return new s(d,"User canceled the upload/download.")}function O(){return new s(y,"Cannot slice blob for upload. Please retry the upload.")}function N(){return new s(b,"The given file does not have any download URLs.")}function A(e,t,n){return new s(_,"Invalid argument in `"+t+"` at index "+e+": "+n)}function P(){return new s(E,"The Firebase app was deleted.")}function R(e,t){return new s(S,"String does not match format '"+e+"': "+t)}function D(e){throw new s(I,"Internal error: "+e)}var L={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"};function M(e){switch(e){case L.RAW:case L.BASE64:case L.BASE64URL:case L.DATA_URL:return;default:throw"Expected one of the event types: ["+L.RAW+", "+L.BASE64+", "+L.BASE64URL+", "+L.DATA_URL+"]."}}var j=function(e,t){this.data=e,this.contentType=t||null};function F(e,t){switch(e){case L.RAW:return new j(U(t));case L.BASE64:case L.BASE64URL:return new j(V(e,t));case L.DATA_URL:return new j(function(e){var t=new q(e);return t.base64?V(L.BASE64,t.rest):function(e){var t;try{t=decodeURIComponent(e)}catch(n){throw R(L.DATA_URL,"Malformed data URL.")}return U(t)}(t.rest)}(t),new q(t).contentType)}throw k()}function U(e){for(var t=[],n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r<=127)t.push(r);else if(r<=2047)t.push(192|r>>6,128|63&r);else if(55296===(64512&r))if(n<e.length-1&&56320===(64512&e.charCodeAt(n+1)))r=65536|(1023&r)<<10|1023&e.charCodeAt(++n),t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r);else t.push(239,191,189);else 56320===(64512&r)?t.push(239,191,189):t.push(224|r>>12,128|r>>6&63,128|63&r)}return new Uint8Array(t)}function V(e,t){switch(e){case L.BASE64:var n=-1!==t.indexOf("-"),r=-1!==t.indexOf("_");if(n||r)throw R(e,"Invalid character '"+(n?"-":"_")+"' found: is it base64url encoded?");break;case L.BASE64URL:var i=-1!==t.indexOf("+"),o=-1!==t.indexOf("/");if(i||o)throw R(e,"Invalid character '"+(i?"+":"/")+"' found: is it base64 encoded?");t=t.replace(/-/g,"+").replace(/_/g,"/")}var a;try{a=atob(t)}catch(c){throw R(e,"Invalid character found")}for(var s=new Uint8Array(a.length),u=0;u<a.length;u++)s[u]=a.charCodeAt(u);return s}var q=function(e){this.base64=!1,this.contentType=null;var t=e.match(/^data:([^,]+)?,/);if(null===t)throw R(L.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");var n=t[1]||null;null!=n&&(this.base64=(r=n,i=";base64",r.length>=i.length&&r.substring(r.length-i.length)===i),this.contentType=this.base64?n.substring(0,n.length-";base64".length):n),this.rest=e.substring(e.indexOf(",")+1);var r,i};var B,z={STATE_CHANGED:"state_changed"},W="running",H="pausing",G="paused",K="success",Q="canceling",$="canceled",Y="error",X={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};function J(e){switch(e){case W:case H:case Q:return X.RUNNING;case G:return X.PAUSED;case K:return X.SUCCESS;case $:return X.CANCELED;case Y:default:return X.ERROR}}function Z(e){return null!=e}function ee(e){return void 0!==e}function te(e){return"function"===typeof e}function ne(e){return"object"===typeof e}function re(e){return ne(e)&&null!==e}function ie(e){return"string"===typeof e||e instanceof String}function oe(e){return ae(e)&&Number.isInteger(e)}function ae(e){return"number"===typeof e||e instanceof Number}function se(e){return ue()&&e instanceof Blob}function ue(){return"undefined"!==typeof Blob}
2!function(e){e[e.NO_ERROR=0]="NO_ERROR",e[e.NETWORK_ERROR=1]="NETWORK_ERROR",e[e.ABORT=2]="ABORT"}(B||(B={}));var ce=function(){function e(){var e=this;this.sent_=!1,this.xhr_=new XMLHttpRequest,this.errorCode_=B.NO_ERROR,this.sendPromise_=new Promise((function(t){e.xhr_.addEventListener("abort",(function(){e.errorCode_=B.ABORT,t(e)})),e.xhr_.addEventListener("error",(function(){e.errorCode_=B.NETWORK_ERROR,t(e)})),e.xhr_.addEventListener("load",(function(){t(e)}))}))}return e.prototype.send=function(e,t,n,r){if(this.sent_)throw D("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(t,e,!0),Z(r))for(var i in r)r.hasOwnProperty(i)&&this.xhr_.setRequestHeader(i,r[i].toString());return Z(n)?this.xhr_.send(n):this.xhr_.send(),this.sendPromise_},e.prototype.getErrorCode=function(){if(!this.sent_)throw D("cannot .getErrorCode() before sending");return this.errorCode_},e.prototype.getStatus=function(){if(!this.sent_)throw D("cannot .getStatus() before sending");try{return this.xhr_.status}catch(e){return-1}},e.prototype.getResponseText=function(){if(!this.sent_)throw D("cannot .getResponseText() before sending");return this.xhr_.responseText},e.prototype.abort=function(){this.xhr_.abort()},e.prototype.getResponseHeader=function(e){return this.xhr_.getResponseHeader(e)},e.prototype.addUploadProgressListener=function(e){Z(this.xhr_.upload)&&this.xhr_.upload.addEventListener("progress",e)},e.prototype.removeUploadProgressListener=function(e){Z(this.xhr_.upload)&&this.xhr_.upload.removeEventListener("progress",e)},e}(),le=function(){function e(){}return e.prototype.createXhrIo=function(){return new ce},e}();function he(){return"undefined"!==typeof BlobBuilder?BlobBuilder:"undefined"!==typeof WebKitBlobBuilder?WebKitBlobBuilder:void 0}function fe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=he();if(void 0!==n){for(var r=new n,i=0;i<e.length;i++)r.append(e[i]);return r.getBlob()}if(ue())return new Blob(e);throw Error("This browser doesn't seem to support creating Blobs")}var pe=function(){function e(e,t){var n=0,r="";se(e)?(this.data_=e,n=e.size,r=e.type):e instanceof ArrayBuffer?(t?this.data_=new Uint8Array(e):(this.data_=new Uint8Array(e.byteLength),this.data_.set(new Uint8Array(e))),n=this.data_.length):e instanceof Uint8Array&&(t?this.data_=e:(this.data_=new Uint8Array(e.length),this.data_.set(e)),n=e.length),this.size_=n,this.type_=r}return e.prototype.size=function(){return this.size_},e.prototype.type=function(){return this.type_},e.prototype.slice=function(t,n){if(se(this.data_)){var r=function(e,t,n){return e.webkitSlice?e.webkitSlice(t,n):e.mozSlice?e.mozSlice(t,n):e.slice?e.slice(t,n):null}(this.data_,t,n);return null===r?null:new e(r)}return new e(new Uint8Array(this.data_.buffer,t,n-t),!0)},e.getBlob=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(ue()){var r=t.map((function(t){return t instanceof e?t.data_:t}));return new e(fe.apply(null,r))}var i=t.map((function(e){return ie(e)?F(L.RAW,e).data:e.data_})),o=0;i.forEach((function(e){o+=e.byteLength}));var a=new Uint8Array(o),s=0;return i.forEach((function(e){for(var t=0;t<e.length;t++)a[s++]=e[t]})),new e(a,!0)},e.prototype.uploadData=function(){return this.data_},e}(),de=function(){function e(e,t){this.bucket=e,this.path_=t}return Object.defineProperty(e.prototype,"path",{get:function(){return this.path_},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRoot",{get:function(){return 0===this.path.length},enumerable:!1,configurable:!0}),e.prototype.fullServerUrl=function(){var e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o/"+e(this.path)},e.prototype.bucketOnlyServerUrl=function(){return"/b/"+encodeURIComponent(this.bucket)+"/o"},e.makeFromBucketSpec=function(t){var n;try{n=e.makeFromUrl(t)}catch(r){return new e(t,"")}if(""===n.path)return n;throw new s(g,"Invalid default bucket '"+t+"'.")},e.makeFromUrl=function(t){var n=null;var r=new RegExp("^gs://([A-Za-z0-9.\\-_]+)(/(.*))?$","i");function i(e){e.path_=decodeURIComponent(e.path)}for(var o="firebasestorage.googleapis.com".replace(/[.]/g,"\\."),a=[{regex:r,
2indices:{bucket:1,path:3},postModify:function(e){"/"===e.path.charAt(e.path.length-1)&&(e.path_=e.path_.slice(0,-1))}},{regex:new RegExp("^https?://"+o+"/v[A-Za-z0-9_]+/b/([A-Za-z0-9.\\-_]+)/o(/([^?#]*).*)?$","i"),indices:{bucket:1,path:3},postModify:i},{regex:new RegExp("^https?://(?:storage.googleapis.com|storage.cloud.google.com)/([A-Za-z0-9.\\-_]+)/([^?#]*)","i"),indices:{bucket:1,path:2},postModify:i}],u=0;u<a.length;u++){var c=a[u],l=c.regex.exec(t);if(l){var h=l[c.indices.bucket],f=l[c.indices.path];f||(f=""),n=new e(h,f),c.postModify(n);break}}if(null==n)throw function(e){return new s(v,"Invalid URL '"+e+"'.")}(t);return n},e}();function ve(e){var t,n;try{t=JSON.parse(e)}catch(r){return null}return ne(n=t)&&!Array.isArray(n)?t:null}function ge(e,t){var n=t.split("/").filter((function(e){return e.length>0})).join("/");return 0===e.length?n:e+"/"+n}function ye(e){var t=e.lastIndexOf("/",e.length-2);return-1===t?e:e.slice(t+1)}function me(e){return"https://firebasestorage.googleapis.com/v0"+e}function be(e){var t=encodeURIComponent,n="?";for(var r in e){if(e.hasOwnProperty(r))n=n+(t(r)+"="+t(e[r]))+"&"}return n=n.slice(0,-1)}function _e(e,t){return t}var we=function(e,t,n,r){this.server=e,this.local=t||e,this.writable=!!n,this.xform=r||_e},Ee=null;function Te(){if(Ee)return Ee;var e=[];e.push(new we("bucket")),e.push(new we("generation")),e.push(new we("metageneration")),e.push(new we("name","fullPath",!0));var t=new we("name");t.xform=function(e,t){return function(e){return!ie(e)||e.length<2?e:ye(e)}(t)},e.push(t);var n=new we("size");return n.xform=function(e,t){return Z(t)?Number(t):t},e.push(n),e.push(new we("timeCreated")),e.push(new we("updated")),e.push(new we("md5Hash",null,!0)),e.push(new we("cacheControl",null,!0)),e.push(new we("contentDisposition",null,!0)),e.push(new we("contentEncoding",null,!0)),e.push(new we("contentLanguage",null,!0)),e.push(new we("contentType",null,!0)),e.push(new we("metadata","customMetadata",!0)),Ee=e}function Se(e,t,n){for(var r={type:"file"},i=n.length,o=0;o<i;o++){var a=n[o];r[a.local]=a.xform(r,t[a.server])}return function(e,t){Object.defineProperty(e,"ref",{get:function(){var n=e.bucket,r=e.fullPath,i=new de(n,r);return t.makeStorageReference(i)}})}(r,e),r}function Ie(e,t,n){var r=ve(t);return null===r?null:Se(e,r,n)}function Ce(e,t){for(var n={},r=t.length,i=0;i<r;i++){var o=t[i];o.writable&&(n[o.server]=e[o.local])}return JSON.stringify(n)}function ke(e){if(!ne(e)||!e)throw"Expected Metadata object.";for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];if("customMetadata"===t){if(!ne(n))throw"Expected object for 'customMetadata' mapping."}else if(re(n))throw"Mapping for '"+t+"' cannot be an object."}}function xe(e,t,n){var r=ve(n);return null===r?null:function(e,t,n){var r={prefixes:[],items:[],nextPageToken:n.nextPageToken};if(n.prefixes)for(var i=0,o=n.prefixes;i<o.length;i++){var a=o[i].replace(/\/$/,""),s=e.makeStorageReference(new de(t,a));r.prefixes.push(s)}if(n.items)for(var u=0,c=n.items;u<c.length;u++){var l=c[u];s=e.makeStorageReference(new de(t,l.name));r.items.push(s)}return r}(e,t,r)}function Oe(e){if(!ne(e)||!e)throw"Expected ListOptions object.";for(var t in e)if("maxResults"===t){if(!oe(e.maxResults)||e.maxResults<=0)throw"Expected maxResults to be a positive number.";if(e.maxResults>1e3)throw"Expected maxResults to be less than or equal to 1000."}else{if("pageToken"!==t)throw"Unknown option: "+t;if(e.pageToken&&!ie(e.pageToken))throw"Expected pageToken to be string."}}var Ne=function(e,t,n,r){this.url=e,this.method=t,this.handler=n,this.timeout=r,this.urlParams={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]};function Ae(e){if(!e)throw k()}function Pe(e,t){return function(n,r){var i=Ie(e,r,t);return Ae(null!==i),i}}function Re(e,t){return function(n,r){var i=Ie(e,r,t);return Ae(null!==i),function(e,t){var n=ve(t);if(null===n)return null;if(!ie(n.downloadTokens))return null;var r=n.downloadTokens;if(0===r.length)return null;var i=encodeURIComponent;return r.split(",").map((function(t){var n=e.bucket,r=e.fullPath;return me("/b/"+i(n)+"/o/"+i(r))+be({alt:"media",token:t})}))[0]}(i,r)}}function De(e){return function(t,n){var r,i,o;return 401===t.getStatus()?r=new s(h,"User is not authenticated, please authenticate using Firebase Authentication and try again."):402===t.getStatus()?(o=e.bucket,r=new s(l,"Quota for bucket '"+o+"' exceeded, please view quota on https://firebase.google.com/pricing/.")):403===t.getStatus()?(i=e.path,r=new s(f,"User does not have permission to access '"+i+"'.")):r=n,r.setServerResponseProp(n.serverResponseProp()),r}}function Le(e){var t=De(e);return function(n,r){var i,o=t(n,r);
2return 404===n.getStatus()&&(i=e.path,o=new s(c,"Object '"+i+"' does not exist.")),o.setServerResponseProp(r.serverResponseProp()),o}}function Me(e,t,n){var r=me(t.fullServerUrl()),i=e.maxOperationRetryTime,o=new Ne(r,"GET",Pe(e,n),i);return o.errorHandler=Le(t),o}function je(e,t,n,r,i){var o={};t.isRoot?o.prefix="":o.prefix=t.path+"/",n&&n.length>0&&(o.delimiter=n),r&&(o.pageToken=r),i&&(o.maxResults=i);var a=me(t.bucketOnlyServerUrl()),s=e.maxOperationRetryTime,u=new Ne(a,"GET",function(e,t){return function(n,r){var i=xe(e,t,r);return Ae(null!==i),i}}(e,t.bucket),s);return u.urlParams=o,u.errorHandler=De(t),u}function Fe(e,t,n){var r=me(t.fullServerUrl()),i=e.maxOperationRetryTime,o=new Ne(r,"GET",Re(e,n),i);return o.errorHandler=Le(t),o}function Ue(e,t,n,r){var i=me(t.fullServerUrl()),o=Ce(n,r),a=e.maxOperationRetryTime,s=new Ne(i,"PATCH",Pe(e,r),a);return s.headers={"Content-Type":"application/json; charset=utf-8"},s.body=o,s.errorHandler=Le(t),s}function Ve(e,t){var n=me(t.fullServerUrl()),r=e.maxOperationRetryTime;var i=new Ne(n,"DELETE",(function(e,t){}),r);return i.successCodes=[200,204],i.errorHandler=Le(t),i}function qe(e,t,n){var r=Object.assign({},n);return r.fullPath=e.path,r.size=t.size(),r.contentType||(r.contentType=function(e,t){return e&&e.contentType||t&&t.type()||"application/octet-stream"}(null,t)),r}var Be=function(e,t,n,r){this.current=e,this.total=t,this.finalized=!!n,this.metadata=r||null};function ze(e,t){var n=null;try{n=e.getResponseHeader("X-Goog-Upload-Status")}catch(r){Ae(!1)}return Ae(!!n&&-1!==(t||["active"]).indexOf(n)),n}function We(e,t,n,r,i,o,a,u){var c=new Be(0,0);if(a?(c.current=a.current,c.total=a.total):(c.current=0,c.total=r.size()),r.size()!==c.total)throw new s(m,"Server recorded incorrect upload file size, please retry the upload.");var l=c.total-c.current,h=l;i>0&&(h=Math.min(h,i));var f=c.current,p=f+h,d={"X-Goog-Upload-Command":h===l?"upload, finalize":"upload","X-Goog-Upload-Offset":c.current},v=r.slice(f,p);if(null===v)throw O();var g=t.maxUploadRetryTime,y=new Ne(n,"POST",(function(e,n){var i,a=ze(e,["active","final"]),s=c.current+h,u=r.size();return i="final"===a?Pe(t,o)(e,n):null,new Be(s,u,"final"===a,i)}),g);return y.headers=d,y.body=v.uploadData(),y.progressCallback=u||null,y.errorHandler=De(e),y}var He=function(e,t,n){if(te(e)||Z(t)||Z(n))this.next=e,this.error=t||null,this.complete=n||null;else{var r=e;this.next=r.next||null,this.error=r.error||null,this.complete=r.complete||null}},Ge=function(e,t,n,r,i,o){this.bytesTransferred=e,this.totalBytes=t,this.state=n,this.metadata=r,this.task=i,this.ref=o};function Ke(e,t,n){for(var r=t.length,i=t.length,o=0;o<t.length;o++)if(t[o].optional){r=o;break}if(!(r<=n.length&&n.length<=i))throw function(e,t,n,r){var i,o;return e===t?(i=e,o=1===e?"argument":"arguments"):(i="between "+e+" and "+t,o="arguments"),new s(w,"Invalid argument count in `"+n+"`: Expected "+i+" "+o+", received "+r+".")}(r,i,e,n.length);for(o=0;o<n.length;o++)try{t[o].validator(n[o])}catch(a){throw a instanceof Error?A(o,e,a.message):A(o,e,a)}}var Qe=function(e,t){var n=this;this.validator=function(t){n.optional&&!ee(t)||e(t)},this.optional=!!t};function $e(e,t){function n(e){if(!ie(e))throw"Expected string."}var r,i,o;return e?(i=n,o=e,r=function(e){i(e),o(e)}):r=n,new Qe(r,t)}function Ye(){return new Qe((function(e){if(!(e instanceof Uint8Array||e instanceof ArrayBuffer||ue()&&e instanceof Blob))throw"Expected Blob or File."}))}function Xe(e){return new Qe(ke,e)}function Je(e){return new Qe(Oe,e)}function Ze(){return new Qe((function(e){if(!(ae(e)&&e>=0))throw"Expected a number 0 or greater."}))}function et(e,t){return new Qe((function(t){if(!(null===t||Z(t)&&t instanceof Object))throw"Expected an Object.";void 0!==e&&null!==e&&e(t)}),t)}function tt(e){return new Qe((function(e){if(!(null===e||te(e)))throw"Expected a Function."}),e)}function nt(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];Promise.resolve().then((function(){return e.apply(void 0,t)}))}}var rt=function(){function e(e,t,n,r,i,o){var a=this;void 0===o&&(o=null),this.transferred_=0,this.needToFetchStatus_=!1,this.needToFetchMetadata_=!1,this.observers_=[],this.error_=null,this.uploadUrl_=null,this.request_=null,this.chunkMultiplier_=1,this.resolve_=null,this.reject_=null,this.ref_=e,this.service_=t,this.location_=n,this.blob_=i,this.metadata_=o,this.mappings_=r,this.resumable_=this.shouldDoResumable_(this.blob_),this.state_=W,this.errorHandler_=function(e){a.request_=null,a.chunkMultiplier_=1,e.codeEquals(d)?(a.needToFetchStatus_=!0,a.completeTransitions_()):(a.error_=e,a.transition_(Y))},this.metadataErrorHandler_=function(e){a.request_=null,e.codeEquals(d)?a.completeTransitions_():(a.error_=e,a.transition_(Y))},this.promise_=new Promise((function(e,t){a.resolve_=e,a.reject_=t,a.start_()}
2)),this.promise_.then(null,(function(){}))}return e.prototype.makeProgressCallback_=function(){var e=this,t=this.transferred_;return function(n){return e.updateProgress_(t+n)}},e.prototype.shouldDoResumable_=function(e){return e.size()>262144},e.prototype.start_=function(){this.state_===W&&null===this.request_&&(this.resumable_?null===this.uploadUrl_?this.createResumable_():this.needToFetchStatus_?this.fetchStatus_():this.needToFetchMetadata_?this.fetchMetadata_():this.continueUpload_():this.oneShotUpload_())},e.prototype.resolveToken_=function(e){var t=this;this.service_.getAuthToken().then((function(n){switch(t.state_){case W:e(n);break;case Q:t.transition_($);break;case H:t.transition_(G)}}))},e.prototype.createResumable_=function(){var e=this;this.resolveToken_((function(t){var n=function(e,t,n,r,i){var o=t.bucketOnlyServerUrl(),a=qe(t,r,i),s={name:a.fullPath},u=me(o),c={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":r.size(),"X-Goog-Upload-Header-Content-Type":a.contentType,"Content-Type":"application/json; charset=utf-8"},l=Ce(a,n),h=e.maxUploadRetryTime,f=new Ne(u,"POST",(function(e){var t;ze(e);try{t=e.getResponseHeader("X-Goog-Upload-URL")}catch(n){Ae(!1)}return Ae(ie(t)),t}),h);return f.urlParams=s,f.headers=c,f.body=l,f.errorHandler=De(t),f}(e.service_,e.location_,e.mappings_,e.blob_,e.metadata_),r=e.service_.makeRequest(n,t);e.request_=r,r.getPromise().then((function(t){e.request_=null,e.uploadUrl_=t,e.needToFetchStatus_=!1,e.completeTransitions_()}),e.errorHandler_)}))},e.prototype.fetchStatus_=function(){var e=this,t=this.uploadUrl_;this.resolveToken_((function(n){var r=function(e,t,n,r){var i=e.maxUploadRetryTime,o=new Ne(n,"POST",(function(e){var t=ze(e,["active","final"]),n=null;try{n=e.getResponseHeader("X-Goog-Upload-Size-Received")}catch(o){Ae(!1)}n||Ae(!1);var i=Number(n);return Ae(!isNaN(i)),new Be(i,r.size(),"final"===t)}),i);return o.headers={"X-Goog-Upload-Command":"query"},o.errorHandler=De(t),o}(e.service_,e.location_,t,e.blob_),i=e.service_.makeRequest(r,n);e.request_=i,i.getPromise().then((function(t){t=t,e.request_=null,e.updateProgress_(t.current),e.needToFetchStatus_=!1,t.finalized&&(e.needToFetchMetadata_=!0),e.completeTransitions_()}),e.errorHandler_)}))},e.prototype.continueUpload_=function(){var e=this,t=262144*this.chunkMultiplier_,n=new Be(this.transferred_,this.blob_.size()),r=this.uploadUrl_;this.resolveToken_((function(i){var o;try{o=We(e.location_,e.service_,r,e.blob_,t,e.mappings_,n,e.makeProgressCallback_())}catch(s){return e.error_=s,void e.transition_(Y)}var a=e.service_.makeRequest(o,i);e.request_=a,a.getPromise().then((function(t){e.increaseMultiplier_(),e.request_=null,e.updateProgress_(t.current),t.finalized?(e.metadata_=t.metadata,e.transition_(K)):e.completeTransitions_()}),e.errorHandler_)}))},e.prototype.increaseMultiplier_=function(){262144*this.chunkMultiplier_<33554432&&(this.chunkMultiplier_*=2)},e.prototype.fetchMetadata_=function(){var e=this;this.resolveToken_((function(t){var n=Me(e.service_,e.location_,e.mappings_),r=e.service_.makeRequest(n,t);e.request_=r,r.getPromise().then((function(t){e.request_=null,e.metadata_=t,e.transition_(K)}),e.metadataErrorHandler_)}))},e.prototype.oneShotUpload_=function(){var e=this;this.resolveToken_((function(t){var n=function(e,t,n,r,i){var o=t.bucketOnlyServerUrl(),a={"X-Goog-Upload-Protocol":"multipart"},s=function(){for(var e="",t=0;t<2;t++)e+=Math.random().toString().slice(2);return e}();a["Content-Type"]="multipart/related; boundary="+s;var u=qe(t,r,i),c="--"+s+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+Ce(u,n)+"\r\n--"+s+"\r\nContent-Type: "+u.contentType+"\r\n\r\n",l="\r\n--"+s+"--",h=pe.getBlob(c,r,l);if(null===h)throw O();var f={name:u.fullPath},p=me(o),d=e.maxUploadRetryTime,v=new Ne(p,"POST",Pe(e,n),d);return v.urlParams=f,v.headers=a,v.body=h.uploadData(),v.errorHandler=De(t),v}(e.service_,e.location_,e.mappings_,e.blob_,e.metadata_),r=e.service_.makeRequest(n,t);e.request_=r,r.getPromise().then((function(t){e.request_=null,e.metadata_=t,e.updateProgress_(e.blob_.size()),e.transition_(K)}),e.errorHandler_)}))},e.prototype.updateProgress_=function(e){var t=this.transferred_;this.transferred_=e,this.transferred_!==t&&this.notifyObservers_()},e.prototype.transition_=function(e){if(this.state_!==e)switch(e){case Q:case H:this.state_=e,null!==this.request_&&this.request_.cancel();break;case W:var t=this.state_===G;this.state_=e,t&&(this.notifyObservers_(),this.start_());break;case G:this.state_=e,this.notifyObservers_();break;case $:this.error_=x(),this.state_=e,this.notifyObservers_();break;case Y:case K:this.state_=e,this.notifyObservers_()}},e.prototype.completeTransitions_=function(){switch(this.state_){case H:this.transition_(G);break;case Q:this.transition_($);break;case W:this.start_()}},Object.defineProperty(e.prototype,"snapshot",{get:function(){var e=J(this.state_);return new Ge(this.transferred_,this.blob_.size(),e,this.metadata_,this,this.ref_)}
2,enumerable:!1,configurable:!0}),e.prototype.on=function(e,t,n,r){function i(){if(e!==z.STATE_CHANGED)throw"Expected one of the event types: ["+z.STATE_CHANGED+"]."}var o="Expected a function or an Object with one of `next`, `error`, `complete` properties.",a=tt(!0).validator,s=et(null,!0).validator;function u(e){try{return void a(e)}catch(t){}try{if(s(e),!(ee(e.next)||ee(e.error)||ee(e.complete)))throw"";return}catch(t){throw o}}var c=[$e(i),et(u,!0),tt(!0),tt(!0)];Ke("on",c,arguments);var l=this;function h(e){return function(t,n,i){null!==e&&Ke("on",e,arguments);var o=new He(t,n,r);return l.addObserver_(o),function(){l.removeObserver_(o)}}}function f(e){if(null===e)throw o;u(e)}var p=[et(f),tt(!0),tt(!0)],d=!(ee(t)||ee(n)||ee(r));return d?h(p):h(null)(t,n,r)},e.prototype.then=function(e,t){return this.promise_.then(e,t)},e.prototype.catch=function(e){return this.then(null,e)},e.prototype.addObserver_=function(e){this.observers_.push(e),this.notifyObserver_(e)},e.prototype.removeObserver_=function(e){var t=this.observers_.indexOf(e);-1!==t&&this.observers_.splice(t,1)},e.prototype.notifyObservers_=function(){var e=this;this.finishPromise_(),this.observers_.slice().forEach((function(t){e.notifyObserver_(t)}))},e.prototype.finishPromise_=function(){if(null!==this.resolve_){var e=!0;switch(J(this.state_)){case X.SUCCESS:nt(this.resolve_.bind(null,this.snapshot))();break;case X.CANCELED:case X.ERROR:nt(this.reject_.bind(null,this.error_))();break;default:e=!1}e&&(this.resolve_=null,this.reject_=null)}},e.prototype.notifyObserver_=function(e){switch(J(this.state_)){case X.RUNNING:case X.PAUSED:e.next&&nt(e.next.bind(e,this.snapshot))();break;case X.SUCCESS:e.complete&&nt(e.complete.bind(e))();break;case X.CANCELED:case X.ERROR:e.error&&nt(e.error.bind(e,this.error_))();break;default:e.error&&nt(e.error.bind(e,this.error_))()}},e.prototype.resume=function(){Ke("resume",[],arguments);var e=this.state_===G||this.state_===H;return e&&this.transition_(W),e},e.prototype.pause=function(){Ke("pause",[],arguments);var e=this.state_===W;return e&&this.transition_(H),e},e.prototype.cancel=function(){Ke("cancel",[],arguments);var e=this.state_===W||this.state_===H;return e&&this.transition_(Q),e},e}(),it=function(){function e(e,t){this.service=e,this.location=t instanceof de?t:de.makeFromUrl(t)}return e.prototype.toString=function(){return Ke("toString",[],arguments),"gs://"+this.location.bucket+"/"+this.location.path},e.prototype.newRef=function(t,n){return new e(t,n)},e.prototype.mappings=function(){return Te()},e.prototype.child=function(e){Ke("child",[$e()],arguments);var t=ge(this.location.path,e),n=new de(this.location.bucket,t);return this.newRef(this.service,n)},Object.defineProperty(e.prototype,"parent",{get:function(){var e=function(e){if(0===e.length)return null;var t=e.lastIndexOf("/");return-1===t?"":e.slice(0,t)}(this.location.path);if(null===e)return null;var t=new de(this.location.bucket,e);return this.newRef(this.service,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"root",{get:function(){var e=new de(this.location.bucket,"");return this.newRef(this.service,e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bucket",{get:function(){return this.location.bucket},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fullPath",{get:function(){return this.location.path},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return ye(this.location.path)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"storage",{get:function(){return this.service},enumerable:!1,configurable:!0}),e.prototype.put=function(e,t){return void 0===t&&(t=null),Ke("put",[Ye(),Xe(!0)],arguments),this.throwIfRoot_("put"),new rt(this,this.service,this.location,this.mappings(),new pe(e),t)},e.prototype.putString=function(e,t,n){void 0===t&&(t=L.RAW),Ke("putString",[$e(),$e(M,!0),Xe(!0)],arguments),this.throwIfRoot_("putString");var r=F(t,e),i=Object.assign({},n);return!Z(i.contentType)&&Z(r.contentType)&&(i.contentType=r.contentType),new rt(this,this.service,this.location,this.mappings(),new pe(r.data,!0),i)},e.prototype.delete=function(){var e=this;return Ke("delete",[],arguments),this.throwIfRoot_("delete"),this.service.getAuthToken().then((function(t){var n=Ve(e.service,e.location);
2return e.service.makeRequest(n,t).getPromise()}))},e.prototype.listAll=function(){Ke("listAll",[],arguments);var e={prefixes:[],items:[]};return this.listAllHelper(e).then((function(){return e}))},e.prototype.listAllHelper=function(e,t){return Object(o.__awaiter)(this,void 0,void 0,(function(){var n,r,i,a;return Object(o.__generator)(this,(function(o){switch(o.label){case 0:return n={pageToken:t},[4,this.list(n)];case 1:return r=o.sent(),(i=e.prefixes).push.apply(i,r.prefixes),(a=e.items).push.apply(a,r.items),null==r.nextPageToken?[3,3]:[4,this.listAllHelper(e,r.nextPageToken)];case 2:o.sent(),o.label=3;case 3:return[2]}}))}))},e.prototype.list=function(e){Ke("list",[Je(!0)],arguments);var t=this;return this.service.getAuthToken().then((function(n){var r=e||{},i=je(t.service,t.location,"/",r.pageToken,r.maxResults);return t.service.makeRequest(i,n).getPromise()}))},e.prototype.getMetadata=function(){var e=this;return Ke("getMetadata",[],arguments),this.throwIfRoot_("getMetadata"),this.service.getAuthToken().then((function(t){var n=Me(e.service,e.location,e.mappings());return e.service.makeRequest(n,t).getPromise()}))},e.prototype.updateMetadata=function(e){var t=this;return Ke("updateMetadata",[Xe()],arguments),this.throwIfRoot_("updateMetadata"),this.service.getAuthToken().then((function(n){var r=Ue(t.service,t.location,e,t.mappings());return t.service.makeRequest(r,n).getPromise()}))},e.prototype.getDownloadURL=function(){var e=this;return Ke("getDownloadURL",[],arguments),this.throwIfRoot_("getDownloadURL"),this.service.getAuthToken().then((function(t){var n=Fe(e.service,e.location,e.mappings());return e.service.makeRequest(n,t).getPromise().then((function(e){if(null===e)throw N();return e}))}))},e.prototype.throwIfRoot_=function(e){if(""===this.location.path)throw function(e){return new s(T,"The operation '"+e+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}(e)},e}(),ot=function(){function e(e){this.promise_=Promise.reject(e)}return e.prototype.getPromise=function(){return this.promise_},e.prototype.cancel=function(e){},e}();var at=function(){function e(e,t,n,r,i,o,a,s,u,c,l){var h=this;this.pendingXhr_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.url_=e,this.method_=t,this.headers_=n,this.body_=r,this.successCodes_=i.slice(),this.additionalRetryCodes_=o.slice(),this.callback_=a,this.errorCallback_=s,this.progressCallback_=c,this.timeout_=u,this.pool_=l,this.promise_=new Promise((function(e,t){h.resolve_=e,h.reject_=t,h.start_()}))}return e.prototype.start_=function(){var e=this;function t(t,n){var r,i=e.resolve_,o=e.reject_,a=n.xhr;if(n.wasSuccessCode)try{var u=e.callback_(a,a.getResponseText());ee(u)?i(u):i()}catch(c){o(c)}else null!==a?((r=k()).setServerResponseProp(a.getResponseText()),e.errorCallback_?o(e.errorCallback_(a,r)):o(r)):n.canceled?o(r=e.appDelete_?P():x()):o(r=new s(p,"Max retry time for operation exceeded, please try again."))}this.canceled_?t(0,new st(!1,null,!0)):this.backoffId_=function(e,t,n){var r=1,i=null,a=!1,s=0;function u(){return 2===s}var c=!1;function l(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];c||(c=!0,t.apply(null,e))}function h(t){i=setTimeout((function(){i=null,e(f,u())}),t)}function f(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!c)if(e)l.call.apply(l,Object(o.__spreadArrays)([null,e],t));else{var i,f=u()||a;if(f)l.call.apply(l,Object(o.__spreadArrays)([null,e],t));else r<64&&(r*=2),1===s?(s=2,i=0):i=1e3*(r+Math.random()),h(i)}}var p=!1;function d(e){p||(p=!0,c||(null!==i?(e||(s=2),clearTimeout(i),h(0)):e||(s=1)))}return h(0),setTimeout((function(){a=!0,d(!0)}),n),d}((function(t,n){if(n)t(!1,new st(!1,null,!0));else{var r=e.pool_.createXhrIo();e.pendingXhr_=r,null!==e.progressCallback_&&r.addUploadProgressListener(i),r.send(e.url_,e.method_,e.body_,e.headers_).then((function(n){null!==e.progressCallback_&&n.removeUploadProgressListener(i),e.pendingXhr_=null;var r=(n=n).getErrorCode()===B.NO_ERROR,o=n.getStatus();if(r&&!e.isRetryStatusCode_(o)){var a=-1!==e.successCodes_.indexOf(o);t(!0,new st(a,n))}else{var s=n.getErrorCode()===B.ABORT;t(!1,new st(!1,null,s))}}))}function i(t){var n=t.loaded,r=t.lengthComputable?t.total:-1;null!==e.progressCallback_&&e.progressCallback_(n,r)}}),t,this.timeout_)},e.prototype.getPromise=function(){return this.promise_},e.prototype.cancel=function(e){this.canceled_=!0,this.appDelete_=e||!1,null!==this.backoffId_&&(0,this.backoffId_)(!1),null!==this.pendingXhr_&&this.pendingXhr_.abort()},e.prototype.isRetryStatusCode_=function(e){var t=e>=500&&e<600,n=-1!==[408,429].indexOf(e),r=-1!==this.additionalRetryCodes_.indexOf(e);return t||n||r},e}(),st=function(e,t,n){this.wasSuccessCode=e,this.xhr=t,this.canceled=!!n};
2function ut(e,t,n,r){var o=be(e.urlParams),a=e.url+o,s=Object.assign({},e.headers);return function(e,t){t&&(e["X-Firebase-GMPID"]=t)}(s,t),function(e,t){null!==t&&t.length>0&&(e.Authorization="Firebase "+t)}(s,n),function(e){var t="undefined"!==typeof i.a?i.a.SDK_VERSION:"AppManager";e["X-Firebase-Storage-Version"]="webjs/"+t}(s),new at(a,e.method,s,e.body,e.successCodes,e.additionalRetryCodes,e.handler,e.errorHandler,e.timeout,e.progressCallback,r)}var ct=function(){function e(t,n,r,i){var o;this.bucket_=null,this.appId_=null,this.deleted_=!1,this.app_=t,this.authProvider_=n,this.maxOperationRetryTime_=12e4,this.maxUploadRetryTime_=6e5,this.requests_=new Set,this.pool_=r,this.bucket_=null!=i?de.makeFromBucketSpec(i):e.extractBucket_(null===(o=this.app_)||void 0===o?void 0:o.options),this.internals_=new lt(this)}return e.extractBucket_=function(e){var t=null===e||void 0===e?void 0:e.storageBucket;return null==t?null:de.makeFromBucketSpec(t)},e.prototype.getAuthToken=function(){return Object(o.__awaiter)(this,void 0,void 0,(function(){var e,t;return Object(o.__generator)(this,(function(n){switch(n.label){case 0:return(e=this.authProvider_.getImmediate({optional:!0}))?[4,e.getToken()]:[3,2];case 1:if(null!==(t=n.sent()))return[2,t.accessToken];n.label=2;case 2:return[2,null]}}))}))},e.prototype.deleteApp=function(){this.deleted_=!0,this.app_=null,this.requests_.forEach((function(e){return e.cancel()})),this.requests_.clear()},e.prototype.makeStorageReference=function(e){return new it(this,e)},e.prototype.makeRequest=function(e,t){var n=this;if(this.deleted_)return new ot(P());var r=ut(e,this.appId_,t,this.pool_);return this.requests_.add(r),r.getPromise().then((function(){return n.requests_.delete(r)}),(function(){return n.requests_.delete(r)})),r},e.prototype.ref=function(e){function t(e){if("string"!==typeof e)throw"Path is not a string.";if(/^[A-Za-z]+:\/\//.test(e))throw"Expected child path but got a URL, use refFromURL instead."}if(Ke("ref",[$e(t,!0)],arguments),null==this.bucket_)throw new Error("No Storage Bucket defined in Firebase Options.");var n=new it(this,this.bucket_);return null!=e?n.child(e):n},e.prototype.refFromURL=function(e){function t(e){if("string"!==typeof e)throw"Path is not a string.";if(!/^[A-Za-z]+:\/\//.test(e))throw"Expected full URL but got a child path, use ref instead.";try{de.makeFromUrl(e)}catch(t){throw"Expected valid full URL but got an invalid one."}}return Ke("refFromURL",[$e(t,!1)],arguments),new it(this,e)},Object.defineProperty(e.prototype,"maxUploadRetryTime",{get:function(){return this.maxUploadRetryTime_},enumerable:!1,configurable:!0}),e.prototype.setMaxUploadRetryTime=function(e){Ke("setMaxUploadRetryTime",[Ze()],arguments),this.maxUploadRetryTime_=e},Object.defineProperty(e.prototype,"maxOperationRetryTime",{get:function(){return this.maxOperationRetryTime_},enumerable:!1,configurable:!0}),e.prototype.setMaxOperationRetryTime=function(e){Ke("setMaxOperationRetryTime",[Ze()],arguments),this.maxOperationRetryTime_=e},Object.defineProperty(e.prototype,"app",{get:function(){return this.app_},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"INTERNAL",{get:function(){return this.internals_},enumerable:!1,configurable:!0}),e}(),lt=function(){function e(e){this.service_=e}return e.prototype.delete=function(){return this.service_.deleteApp(),Promise.resolve()},e}();function ht(e,t){var n=e.getProvider("app").getImmediate(),r=e.getProvider("auth-internal");return new ct(n,r,new le,t)}function ft(e){var t={TaskState:X,TaskEvent:z,StringFormat:L,Storage:ct,Reference:it};e.INTERNAL.registerComponent(new a.Component("storage",ht,"PUBLIC").setServiceProps(t).setMultipleInstances(!0)),e.registerVersion("@firebase/storage","0.3.43")}ft(i.a)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8);n(33);var i=n(1),o=n(4),a=n(23),s=n(13);function u(e){return e&&"object"===typeof e&&"default"in e?e:{default:e}}var c,l,h,f=u(r),p=((c={})["trace started"]="Trace {$traceName} was started before.",c["trace stopped"]="Trace {$traceName} is not running.",c["no window"]="Window is not available.",c["no app id"]="App id is not available.",c["no project id"]="Project id is not available.",c["no api key"]="Api key is not available.",c["invalid cc log"]="Attempted to queue invalid cc event",c["FB not default"]="Performance can only start when Firebase app instance is the default one.",c["RC response not ok"]="RC response is not ok",c["invalid attribute name"]="Attribute name {$attributeName}
2 is invalid.",c["invalid attribute value"]="Attribute value {$attributeValue} is invalid.",c["invalid custom metric name"]="Custom metric name {$customMetricName} is invalid",c["invalid String merger input"]="Input for String merger is invalid, contact support team to resolve.",c),d=new o.ErrorFactory("performance","Performance",p),v=new a.Logger("Performance");v.logLevel=a.LogLevel.INFO;var g,y=function(){function e(e){if(this.window=e,!e)throw d.create("no window");this.performance=e.performance,this.PerformanceObserver=e.PerformanceObserver,this.windowLocation=e.location,this.navigator=e.navigator,this.document=e.document,this.navigator&&this.navigator.cookieEnabled&&(this.localStorage=e.localStorage),e.perfMetrics&&e.perfMetrics.onFirstInputDelay&&(this.onFirstInputDelay=e.perfMetrics.onFirstInputDelay)}return e.prototype.getUrl=function(){return this.windowLocation.href.split("?")[0]},e.prototype.mark=function(e){this.performance&&this.performance.mark&&this.performance.mark(e)},e.prototype.measure=function(e,t,n){this.performance&&this.performance.measure&&this.performance.measure(e,t,n)},e.prototype.getEntriesByType=function(e){return this.performance&&this.performance.getEntriesByType?this.performance.getEntriesByType(e):[]},e.prototype.getEntriesByName=function(e){return this.performance&&this.performance.getEntriesByName?this.performance.getEntriesByName(e):[]},e.prototype.getTimeOrigin=function(){return this.performance&&(this.performance.timeOrigin||this.performance.timing.navigationStart)},e.prototype.requiredApisAvailable=function(){return fetch&&Promise&&this.navigator&&this.navigator.cookieEnabled?!!o.isIndexedDBAvailable()||(v.info("IndexedDB is not supported by current browswer"),!1):(v.info("Firebase Performance cannot start if browser does not support fetch and Promise or cookie is disabled."),!1)},e.prototype.setupObserver=function(e,t){this.PerformanceObserver&&new this.PerformanceObserver((function(e){for(var n=0,r=e.getEntries();n<r.length;n++){var i=r[n];t(i)}})).observe({entryTypes:[e]})},e.getInstance=function(){return void 0===l&&(l=new e(h)),l},e}();function m(e,t){var n=e.length-t.length;if(n<0||n>1)throw d.create("invalid String merger input");for(var r=[],i=0;i<e.length;i++)r.push(e.charAt(i)),t.length>i&&r.push(t.charAt(i));return r.join("")}var b,_,w=function(){function e(){this.instrumentationEnabled=!0,this.dataCollectionEnabled=!0,this.loggingEnabled=!1,this.tracesSamplingRate=1,this.networkRequestsSamplingRate=1,this.logEndPointUrl="https://firebaselogging.googleapis.com/v0cc/log?format=json_proto",this.flTransportEndpointUrl=m("hts/frbslgigp.ogepscmv/ieo/eaylg","tp:/ieaeogn-agolai.o/1frlglgc/o"),this.transportKey=m("AzSC8r6ReiGqFMyfvgow","Iayx0u-XT3vksVM-pIV"),this.logSource=462,this.logTraceAfterSampling=!1,this.logNetworkAfterSampling=!1,this.configTimeToLive=12}return e.prototype.getAppId=function(){var e=this.firebaseAppInstance&&this.firebaseAppInstance.options&&this.firebaseAppInstance.options.appId;if(!e)throw d.create("no app id");return e},e.prototype.getProjectId=function(){var e=this.firebaseAppInstance&&this.firebaseAppInstance.options&&this.firebaseAppInstance.options.projectId;if(!e)throw d.create("no project id");return e},e.prototype.getApiKey=function(){var e=this.firebaseAppInstance&&this.firebaseAppInstance.options&&this.firebaseAppInstance.options.apiKey;if(!e)throw d.create("no api key");return e},e.prototype.getFlTransportFullUrl=function(){return this.flTransportEndpointUrl.concat("?key=",this.transportKey)},e.getInstance=function(){return void 0===g&&(g=new e),g},e}();function E(){return b}!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.VISIBLE=1]="VISIBLE",e[e.HIDDEN=2]="HIDDEN"}(_||(_={}));var T=["firebase_","google_","ga_"],S=new RegExp("^[a-zA-Z]\\w*$");function I(){var e=y.getInstance().navigator;return"serviceWorker"in e?e.serviceWorker.controller?2:3:1}function C(){switch(y.getInstance().document.visibilityState){case"visible":return _.VISIBLE;case"hidden":return _.HIDDEN;default:return _.UNKNOWN}}function k(){var e=y.getInstance().navigator.connection;switch(e&&e.effectiveType){case"slow-2g":return 1;case"2g":return 2;case"3g":return 3;case"4g":return 4;default:return 0}}var x=!0;function O(e){var t=function(){var e=y.getInstance().localStorage;if(!e)return;var t=e.getItem("@firebase/performance/configexpire");if(!t||(n=t,!(Number(n)>Date.now())))return;var n;var r=e.getItem("@firebase/performance/config");if(!r)return;try{return JSON.parse(r)}catch(c){return}}();return t?(N(t),Promise.resolve()):function(e){return function(){var e=w.getInstance().installationsService.getToken();return e.then((function(e){})),e}().then((function(t){var n="https://firebaseremoteconfig.googleapis.com/v1/projects/"+w.getInstance().getProjectId()+"/namespaces/fireperf:fetch?ke
2y="+w.getInstance().getApiKey(),r=new Request(n,{method:"POST",headers:{Authorization:"FIREBASE_INSTALLATIONS_AUTH "+t},body:JSON.stringify({app_instance_id:e,app_instance_id_token:t,app_id:w.getInstance().getAppId(),app_version:"0.4.1",sdk_version:"0.0.1"})});return fetch(r).then((function(e){if(e.ok)return e.json();throw d.create("RC response not ok")}))})).catch((function(){v.info("Could not fetch config, will use default configs")}))}(e).then(N).then((function(e){return function(e){var t=y.getInstance().localStorage;if(!e||!t)return;t.setItem("@firebase/performance/config",JSON.stringify(e)),t.setItem("@firebase/performance/configexpire",String(Date.now()+60*w.getInstance().configTimeToLive*60*1e3))}(e)}),(function(){}))}function N(e){if(!e)return e;var t=w.getInstance(),n=e.entries||{};return void 0!==n.fpr_enabled?t.loggingEnabled="true"===String(n.fpr_enabled):t.loggingEnabled=x,n.fpr_log_source&&(t.logSource=Number(n.fpr_log_source)),n.fpr_log_endpoint_url&&(t.logEndPointUrl=n.fpr_log_endpoint_url),n.fpr_log_transport_key&&(t.transportKey=n.fpr_log_transport_key),void 0!==n.fpr_vc_network_request_sampling_rate&&(t.networkRequestsSamplingRate=Number(n.fpr_vc_network_request_sampling_rate)),void 0!==n.fpr_vc_trace_sampling_rate&&(t.tracesSamplingRate=Number(n.fpr_vc_trace_sampling_rate)),t.logTraceAfterSampling=A(t.tracesSamplingRate),t.logNetworkAfterSampling=A(t.networkRequestsSamplingRate),e}function A(e){return Math.random()<=e}var P,R=1;function D(){return R=2,P=P||function(){var e=y.getInstance().document;return new Promise((function(t){e&&"complete"!==e.readyState?e.addEventListener("readystatechange",(function n(){"complete"===e.readyState&&(e.removeEventListener("readystatechange",n),t())})):t()}))}().then((function(){return function(){var e=w.getInstance().installationsService.getId();return e.then((function(e){b=e})),e}()})).then((function(e){return O(e)})).then((function(){return L()}),(function(){return L()}))}function L(){R=3}var M,j=3,F=[],U=!1;function V(e){setTimeout((function(){if(0!==j)return F.length?void function(){var e=i.__spreadArrays(F);F=[];var t=e.map((function(e){return{source_extension_json_proto3:e.message,event_time_ms:String(e.eventTime)}}));(function(e,t){return function(e){var t=w.getInstance().getFlTransportFullUrl();return fetch(t,{method:"POST",body:JSON.stringify(e)})}(e).then((function(e){return e.ok||v.info("Call to Firebase backend failed."),e.json()})).then((function(e){var n=Number(e.nextRequestWaitMillis),r=1e4;isNaN(n)||(r=Math.max(n,r));var o=e.logResponseDetails;Array.isArray(o)&&o.length>0&&"RETRY_REQUEST_LATER"===o[0].responseAction&&(F=i.__spreadArrays(t,F),v.info("Retry transport request later.")),j=3,V(r)}))})({request_time_ms:String(Date.now()),client_info:{client_type:1,js_client_info:{}},log_source:w.getInstance().logSource,log_event:t},e).catch((function(){F=i.__spreadArrays(e,F),j--,v.info("Tries left: "+j+"."),V(1e4)}))}():V(1e4)}),e)}function q(e){if(!e.eventTime||!e.message)throw d.create("invalid cc log");F=i.__spreadArrays(F,[e])}function B(e,t){M||(M=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=e.apply(void 0,t);q({message:r,eventTime:Date.now()})}}(H)),M(e,t)}function z(e){var t=w.getInstance();!t.instrumentationEnabled&&e.isAuto||(t.dataCollectionEnabled||e.isAuto)&&y.getInstance().requiredApisAvailable()&&(e.isAuto&&C()!==_.VISIBLE||t.loggingEnabled&&t.logTraceAfterSampling&&(3===R?W(e):D().then((function(){return W(e)}),(function(){return W(e)}))))}function W(e){E()&&setTimeout((function(){return B(e,1)}),0)}function H(e,t){return 0===t?function(e){var t={url:e.url,http_method:e.httpMethod||0,http_response_code:200,response_payload_bytes:e.responsePayloadBytes,client_start_time_us:e.startTimeUs,time_to_response_initiated_us:e.timeToResponseInitiatedUs,time_to_response_completed_us:e.timeToResponseCompletedUs},n={application_info:G(),network_request_metric:t};return JSON.stringify(n)}(e):function(e){var t={name:e.name,is_auto:e.isAuto,client_start_time_us:e.startTimeUs,duration_us:e.durationUs};0!==Object.keys(e.counters).length&&(t.counters=e.counters);var n=e.getAttributes();0!==Object.keys(n).length&&(t.custom_attributes=n);var r={application_info:G(),trace_metric:t};return JSON.stringify(r)}(e)}function G(){return{google_app_id:w.getInstance().getAppId(),app_instance_id:E(),web_app_info:{sdk_version:"0.4.1",page_url:y.getInstance().getUrl(),service_worker_status:I(),visibility_state:C(),effective_connection_type:k()},application_process_state:0}}var K=["_fp","_fcp","_fid"];var Q=function(){function e(e,t,n){void 0===t&&(t=!1),this.name=e,this.isAuto=t,this.state=1,this.customAttributes={},this.counters={},this.api=y.getInstance(),this.randomId=Math.floor(1e6*Math.random()),this.isAuto||(this.traceStartMark="FB-PERF-TRACE-START-"+this.randomId+"-"+this.name,this.traceStopMark="FB-PERF-TRACE-STOP-"+this.randomId+"-"+this.name,this.traceMeasure=n||"FB-PERF-TRACE-MEASURE-"+this.randomId+"-"+this.name,n&&this.calculateTraceMetrics())}return e.prototype.start=function(){if(1!==this.state)throw d.create("trace started",{traceName:this.name});this.api.mark(this.traceStartMark),this.state=2},e.prototype.stop=function(){if(2!==this.state)throw d.create("trace stopped",{traceName:this.name});this.state=3,this.api.mark(this.traceStopMark),this.api.measure(this.traceMeasure,this.traceStartMark,this.traceStopMark),this.calculateTraceMetrics(),z(this)},e.prototype.record=function(e,t,n){if(this.durationUs=Math.floor(1e3*t),this.startTimeUs=Math.floor(1e3*e),n&&n.attributes&&(this.customAttributes=i.__assign({},n.attributes)),n&&n.metrics)for(var r=0,o=Object.keys(n.metrics);r<o.length;r++){var a=o[r];isNaN(Number(n.metrics[a]))||(this.counters[a]=Number(Math.floor(n.metrics[a])))}z(this)},e.prototype.incrementMetric=function(e,t){void 0===t&&(t=1),void 0===this.counters[e]?this.putMetric(e,t):this.putMetric(e,this.counters[e]+t)},e.prototype.putMetric=function(e,t){if(!function(e,t){return!(0===e.length||e.length>100)&&(t&&t.startsWith("_wt_")&&K.indexOf(e)>-1||!e.startsWith("_"))}(e,this.name))throw d.create("invalid custom metric name",{customMetricName:e});this.counters[e]=function(e){var t=Math.floor(e);return t<e&&v.info("Metric value should be an Integer, setting the value as : "+t+"."),t}(t)}
2,e.prototype.getMetric=function(e){return this.counters[e]||0},e.prototype.putAttribute=function(e,t){var n=function(e){return!(0===e.length||e.length>40)&&(!T.some((function(t){return e.startsWith(t)}))&&!!e.match(S))}(e),r=function(e){return 0!==e.length&&e.length<=100}(t);if(n&&r)this.customAttributes[e]=t;else{if(!n)throw d.create("invalid attribute name",{attributeName:e});if(!r)throw d.create("invalid attribute value",{attributeValue:t})}},e.prototype.getAttribute=function(e){return this.customAttributes[e]},e.prototype.removeAttribute=function(e){void 0!==this.customAttributes[e]&&delete this.customAttributes[e]},e.prototype.getAttributes=function(){return i.__assign({},this.customAttributes)},e.prototype.setStartTime=function(e){this.startTimeUs=e},e.prototype.setDuration=function(e){this.durationUs=e},e.prototype.calculateTraceMetrics=function(){var e=this.api.getEntriesByName(this.traceMeasure),t=e&&e[0];t&&(this.durationUs=Math.floor(1e3*t.duration),this.startTimeUs=Math.floor(1e3*(t.startTime+this.api.getTimeOrigin())))},e.createOobTrace=function(t,n,r){var i=y.getInstance().getUrl();if(i){var o=new e("_wt_"+i,!0),a=Math.floor(1e3*y.getInstance().getTimeOrigin());o.setStartTime(a),t&&t[0]&&(o.setDuration(Math.floor(1e3*t[0].duration)),o.putMetric("domInteractive",Math.floor(1e3*t[0].domInteractive)),o.putMetric("domContentLoadedEventEnd",Math.floor(1e3*t[0].domContentLoadedEventEnd)),o.putMetric("loadEventEnd",Math.floor(1e3*t[0].loadEventEnd)));if(n){var s=n.find((function(e){return"first-paint"===e.name}));s&&s.startTime&&o.putMetric("_fp",Math.floor(1e3*s.startTime));var u=n.find((function(e){return"first-contentful-paint"===e.name}));u&&u.startTime&&o.putMetric("_fcp",Math.floor(1e3*u.startTime)),r&&o.putMetric("_fid",Math.floor(1e3*r))}z(o)}},e.createUserTimingTrace=function(t){z(new e(t,!1,t))},e}();function $(e){var t=e;if(t&&void 0!==t.responseStart){var n=y.getInstance().getTimeOrigin(),r=Math.floor(1e3*(t.startTime+n)),i=t.responseStart?Math.floor(1e3*(t.responseStart-t.startTime)):void 0,o=Math.floor(1e3*(t.responseEnd-t.startTime));!function(e){var t=w.getInstance();if(t.instrumentationEnabled){var n=e.url,r=t.logEndPointUrl.split("?")[0],i=t.flTransportEndpointUrl.split("?")[0];n!==r&&n!==i&&t.loggingEnabled&&t.logNetworkAfterSampling&&setTimeout((function(){return B(e,0)}),0)}}({url:t.name&&t.name.split("?")[0],responsePayloadBytes:t.transferSize,startTimeUs:r,timeToResponseInitiatedUs:i,timeToResponseCompletedUs:o})}}function Y(){E()&&(setTimeout((function(){return function(){var e=y.getInstance(),t=e.getEntriesByType("navigation"),n=e.getEntriesByType("paint");if(e.onFirstInputDelay){var r=setTimeout((function(){Q.createOobTrace(t,n),r=void 0}),5e3);e.onFirstInputDelay((function(e){r&&(clearTimeout(r),Q.createOobTrace(t,n,e))}))}else Q.createOobTrace(t,n)}()}),0),setTimeout((function(){return function(){for(var e=y.getInstance(),t=e.getEntriesByType("resource"),n=0,r=t;n<r.length;n++){$(r[n])}e.setupObserver("resource",$)}()}),0),setTimeout((function(){return function(){for(var e=y.getInstance(),t=e.getEntriesByType("measure"),n=0,r=t;n<r.length;n++){X(r[n])}e.setupObserver("measure",X)}()}),0))}function X(e){var t=e.name;"FB-PERF-TRACE-MEASURE"!==t.substring(0,"FB-PERF-TRACE-MEASURE".length)&&Q.createUserTimingTrace(t)}var J=function(){function e(e){this.app=e,y.getInstance().requiredApisAvailable()&&o.validateIndexedDBOpenable().then((function(e){e&&(U||(V(5500),U=!0),D().then(Y,Y))})).catch((function(e){v.info("Environment doesn't support IndexedDB: "+e)}))}return e.prototype.trace=function(e){return new Q(e)},Object.defineProperty(e.prototype,"instrumentationEnabled",{get:function(){return w.getInstance().instrumentationEnabled},set:function(e){w.getInstance().instrumentationEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataCollectionEnabled",{get:function(){return w.getInstance().dataCollectionEnabled},set:function(e){w.getInstance().dataCollectionEnabled=e},enumerable:!1,configurable:!0}),e}();function Z(e){var t=function(e,t){if("[DEFAULT]"!==e.name)throw d.create("FB not default");if("undefined"===typeof window)throw d.create("no window");return function(e){h=e}(window),w.getInstance().firebaseAppInstance=e,w.getInstance().installationsService=t,new J(e)};e.INTERNAL.registerComponent(new s.Component("performance",(function(e){var n=e.getProvider("app").getImmediate(),r=e.getProvider("installations").getImmediate();return t(n,r)}),"PUBLIC")),e.registerVersion("@firebase/performance","0.4.1")}Z(f.default),t.registerPerformance=Z},function(e,t,n){"use strict";n.r(t),n.d(t,"factory",(function(){return j})),n.d(t,"getGlobalVars",(function(){return L})),n.d(t,"registerAnalytics",(function(){return F})),n.d(t,"resetGlobalVars",(function(){return D})),n.d(t,"settings",(function(){return M}));var r,i,o=n(1),a=n(8),s=n.n(a),u=(n(33),n(23)),c=n(4),l=n(13),h="https://www.googletagmanager.com/gtag/js";!function(e){e.EVENT="event",e.SET="set",e.CONFIG="config"}(r||(r={})),function(e){e.ADD_SHIPPING_INFO="add_shipping_info",e.ADD_PAYMENT_INFO="add_payment_info",e.ADD_TO_CART="add_to_cart",e.ADD_TO_WISHLIST="add_to_wishlist",e.BEGIN_CHECKOUT="begin_checkout",e.CHECKOUT_PROGRESS="checkout_progress",e.EXCEPTION="exception",e.GENERATE_LEAD="generate_lead",e.LOGIN="login",e.PAGE_VIEW="page_view",e.PURCHASE="purchase",e.REFUND="refund",e.REMOVE_FROM_CART="remove_from_cart",e.SCREEN_VIEW="screen_view",e.SEARCH="search",e.SELECT_CONTENT="select_content",e.SELECT_ITEM="select_item",e.SELECT_PROMOTION="select_promotion",e.SET_CHECKOUT_OPTION="set_checkout_option",e.SHARE="share",e.SIGN_UP="sign_up",e.TIMING_COMPLETE="timing_complete",e.VIEW_CART="view_cart",e.VIEW_ITEM="view_item",e.VIEW_ITEM_LIST="view_item_list",e.VIEW_PROMOTION="view_promotion",e.VIEW_SEARCH_RESULTS="view_search_results"}(i||(i={}));var f,p=new u.Logger("@firebase/analytics");function d(e,t,n,i,a,s){return Object(o.__awaiter)(this,void 0,void 0,(function(){var u,c,l,h;return Object(o.__generator)(this,(function(o){switch(o.label){case 0:u=i[a],o.label=1;case 1:return o.trys.push([1,7,,8]),u?[4,t[u]]:[3,3];case 2:return o.sent(),[3,6];case 3:return[4,Promise.all(n)];case 4:return c=o.sent(),(l=c.find((function(e){return e.measurementId===a})))?[4,t[l.appId]]:[3,6];case 5:o.sent(),o.label=6;case 6:return[3,8];case 7:return h=o.sent(),p.error(h),[3,8];case 8:return e(r.CONFIG,a,s),[2]}}))}))}function v(e,t,n,i,a){return Object(o.__awaiter)(this,void 0,void 0,(function(){var s,u,c,l,h,f,d,v;return Object(o.__generator)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,4,,5]),s=[],a&&a.send_to?(u=a.send_to,Array.isArray(u)||(u=[u]),[4,Promise.all(n)]):[3,2];case 1:for(c=o.sent(),l=function(e){var n=c.find((function(t){return t.measurementId===e})),r=n&&t[n.appId];if(!r)return s=[],"break";s.push(r)},h=0,f=u;h<f.length&&(d=f[h],"break"!==l(d));h++);o.label=2;case 2:return 0===s.length&&(s=Object.values(t)),[4,Promise.all(s)];case 3:return o.sent(),e(r.EVENT,i,a||{}),[3,5];case 4:return v=o.sent(),p.error(v),[3,5];case 5:return[2]}}
2))}))}function g(e,t,n,i,a){var s=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];window[i].push(arguments)};return window[a]&&"function"===typeof window[a]&&(s=window[a]),window[a]=function(e,t,n,i){return function(a,s,u){return Object(o.__awaiter)(this,void 0,void 0,(function(){var c;return Object(o.__generator)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,6,,7]),a!==r.EVENT?[3,2]:[4,v(e,t,n,s,u)];case 1:return o.sent(),[3,5];case 2:return a!==r.CONFIG?[3,4]:[4,d(e,t,n,i,s,u)];case 3:return o.sent(),[3,5];case 4:e(r.SET,s),o.label=5;case 5:return[3,7];case 6:return c=o.sent(),p.error(c),[3,7];case 7:return[2]}}))}))}}(s,e,t,n),{gtagCore:s,wrappedGtag:window[a]}}var y=((f={})["already-exists"]="A Firebase Analytics instance with the appId {$id} already exists. Only one Firebase Analytics instance can be created for each appId.",f["already-initialized"]="Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.",f["interop-component-reg-failed"]="Firebase Analytics Interop Component failed to instantiate: {$reason}",f["indexedDB-unsupported"]="IndexedDB is not supported by current browswer",f["invalid-indexedDB-context"]="Environment doesn't support IndexedDB: {$errorInfo}. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments",f["cookies-not-enabled"]="Cookies are not enabled in this browser environment. Analytics requires cookies to be enabled.",f["invalid-analytics-context"]="Firebase Analytics is not supported in browser extensions.",f["fetch-throttle"]="The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.",f["config-fetch-failed"]="Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}",f["no-api-key"]='The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',f["no-app-id"]='The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.',f["indexedDB-unsupported"]="IndexedDB is not supported by current browswer",f["invalid-indexedDB-context"]="Environment doesn't support IndexedDB: {$errorInfo}. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments",f["cookies-not-enabled"]="Cookies are not enabled in this browser environment. Analytics requires cookies to be enabled.",f),m=new c.ErrorFactory("analytics","Analytics",y),b=new(function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t=1e3),this.throttleMetadata=e,this.intervalMillis=t}return e.prototype.getThrottleMetadata=function(e){return this.throttleMetadata[e]},e.prototype.setThrottleMetadata=function(e,t){this.throttleMetadata[e]=t},e.prototype.deleteThrottleMetadata=function(e){delete this.throttleMetadata[e]},e}());function _(e){return new Headers({Accept:"application/json","x-goog-api-key":e})}function w(e){var t;return Object(o.__awaiter)(this,void 0,void 0,(function(){var n,r,i,a,s,u,c;return Object(o.__generator)(this,(function(o){switch(o.label){case 0:return n=e.appId,r=e.apiKey,i={method:"GET",headers:_(r)},a="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig".replace("{app-id}",n),[4,fetch(a,i)];case 1:if(200===(s=o.sent()).status||304===s.status)return[3,6];u="",o.label=2;case 2:return o.trys.push([2,4,,5]),[4,s.json()];case 3:return c=o.sent(),(null===(t=c.error)||void 0===t?void 0:t.message)&&(u=c.error.message),[3,5];case 4:return o.sent(),[3,5];case 5:throw m.create("config-fetch-failed",{httpStatus:s.status,responseMessage:u});case 6:return[2,s.json()]}}))}))}function E(e,t,n,r){var i=t.throttleEndTimeMillis,a=t.backoffCount;return void 0===r&&(r=b),Object(o.__awaiter)(this,void 0,void 0,(function(){var t,s,u,l,h,f,d;return Object(o.__generator)(this,(function(o){switch(o.label){case 0:t=e.appId,s=e.measurementId,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,T(n,i)];case 2:return o.sent(),[3,4];case 3:if(u=o.sent(),s)return p.warn("Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID "+s+' provided in the "measurementId" field in the local Firebase config. ['+u.message+"]"),[2,{appId:t,measurementId:s}];throw u;case 4:return o.trys.push([4,6,,7]),[4,w(e)];case 5:return l=o.sent(),r.deleteThrottleMetadata(t),[2,l];case 6:if(!function(e){if(!(e instanceof c.FirebaseError))return!1;var t=Number(e.httpStatus);return 429===t||500===t||503===t||504===t}(h=o.sent())){if(r.deleteThrottleMetadata(t),s)return p.warn("Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID "+s+' provided in the "measurementId" field in the local Firebase config. ['+h.message+"]"),[2,{appId:t,measurementId:s}];throw h}return f=503===Number(h.httpStatus)?Object(c.calculateBackoffMillis)(a,r.intervalMillis,30):Object(c.calculateBackoffMillis)(a,r.intervalMillis),d={throttleEndTimeMillis:Date.now()+f,backoffCount:a+1},r.setThrottleMetadata(t,d),p.debug("Calling attemptFetch again in "+f+" millis"),[2,E(e,d,n,r)];case 7:return[2]}}
2))}))}function T(e,t){return new Promise((function(n,r){var i=Math.max(t-Date.now(),0),o=setTimeout(n,i);e.addEventListener((function(){clearTimeout(o),r(m.create("fetch-throttle",{throttleEndTimeMillis:t}))}))}))}var S=function(){function e(){this.listeners=[]}return e.prototype.addEventListener=function(e){this.listeners.push(e)},e.prototype.abort=function(){this.listeners.forEach((function(e){return e()}))},e}();function I(e,t,n,i,a){return Object(o.__awaiter)(this,void 0,void 0,(function(){var s,u,c,l,h;return Object(o.__generator)(this,(function(f){switch(f.label){case 0:return(s=function(e,t,n){return void 0===t&&(t=b),Object(o.__awaiter)(this,void 0,void 0,(function(){var r,i,a,s,u,c,l=this;return Object(o.__generator)(this,(function(h){if(r=e.options,i=r.appId,a=r.apiKey,s=r.measurementId,!i)throw m.create("no-app-id");if(!a){if(s)return[2,{measurementId:s,appId:i}];throw m.create("no-api-key")}return u=t.getThrottleMetadata(i)||{backoffCount:0,throttleEndTimeMillis:Date.now()},c=new S,setTimeout((function(){return Object(o.__awaiter)(l,void 0,void 0,(function(){return Object(o.__generator)(this,(function(e){return c.abort(),[2]}))}))}),void 0!==n?n:6e4),[2,E({appId:i,apiKey:a,measurementId:s},u,c,t)]}))}))}(e)).then((function(t){n[t.measurementId]=t.appId,e.options.measurementId&&t.measurementId!==e.options.measurementId&&p.warn("The measurement ID in the local Firebase config ("+e.options.measurementId+") does not match the measurement ID fetched from the server ("+t.measurementId+"). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.")})).catch((function(e){return p.error(e)})),t.push(s),[4,Promise.all([s,i.getId()])];case 1:return u=f.sent(),c=u[0],l=u[1],a("js",new Date),a(r.CONFIG,c.measurementId,((h={}).firebase_id=l,h.origin="firebase",h.update=!0,h)),[2,c.measurementId]}}))}))}var C,k,x={},O=[],N={},A="dataLayer",P="gtag",R=!1;function D(e,t,n){void 0===e&&(e=!1),void 0===t&&(t={}),void 0===n&&(n=[]),R=e,x=t,O=n,A="dataLayer",P="gtag"}function L(){return{initializationPromisesMap:x,dynamicConfigPromisesList:O}}function M(e){if(R)throw m.create("already-initialized");e.dataLayerName&&(A=e.dataLayerName),e.gtagName&&(P=e.gtagName)}function j(e,t){if(Object(c.isBrowserExtension)())throw m.create("invalid-analytics-context");if(!Object(c.areCookiesEnabled)())throw m.create("cookies-not-enabled");if(!Object(c.isIndexedDBAvailable)())throw m.create("indexedDB-unsupported");Object(c.validateIndexedDBOpenable)().catch((function(e){var t=m.create("invalid-indexedDB-context",{errorInfo:e});p.warn(t.message)}));var n=e.options.appId;if(!n)throw m.create("no-app-id");if(!e.options.apiKey){if(!e.options.measurementId)throw m.create("no-api-key");p.warn('The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID '+e.options.measurementId+' provided in the "measurementId" field in the local Firebase config.')}if(null!=x[n])throw m.create("already-exists",{id:n});if(!R){(function(){for(var e=window.document.getElementsByTagName("script"),t=0,n=Object.values(e);t<n.length;t++){var r=n[t];if(r.src&&r.src.includes(h))return r}return null})()||function(e){var t=document.createElement("script");t.src=h+"?l="+e,t.async=!0,document.head.appendChild(t)}(A),function(e){var t=[];Array.isArray(window[e])?t=window[e]:window[e]=t}(A);var i=g(x,O,N,A,P),a=i.wrappedGtag,s=i.gtagCore;k=a,C=s,R=!0}return x[n]=I(e,O,N,t,C),{app:e,logEvent:function(e,t,i){(function(e,t,n,i,a){return Object(o.__awaiter)(this,void 0,void 0,(function(){var s,u;return Object(o.__generator)(this,(function(c){switch(c.label){case 0:return a&&a.global?(e(r.EVENT,n,i),[2]):[3,1];case 1:return[4,t];case 2:s=c.sent(),u=Object(o.__assign)(Object(o.__assign)({},i),{send_to:s}),e(r.EVENT,n,u),c.label=3;case 3:return[2]}}
2))}))})(k,x[n],e,t,i).catch((function(e){return p.error(e)}))},setCurrentScreen:function(e,t){(function(e,t,n,i){return Object(o.__awaiter)(this,void 0,void 0,(function(){var a;return Object(o.__generator)(this,(function(o){switch(o.label){case 0:return i&&i.global?(e(r.SET,{screen_name:n}),[2,Promise.resolve()]):[3,1];case 1:return[4,t];case 2:a=o.sent(),e(r.CONFIG,a,{update:!0,screen_name:n}),o.label=3;case 3:return[2]}}))}))})(k,x[n],e,t).catch((function(e){return p.error(e)}))},setUserId:function(e,t){(function(e,t,n,i){return Object(o.__awaiter)(this,void 0,void 0,(function(){var a;return Object(o.__generator)(this,(function(o){switch(o.label){case 0:return i&&i.global?(e(r.SET,{user_id:n}),[2,Promise.resolve()]):[3,1];case 1:return[4,t];case 2:a=o.sent(),e(r.CONFIG,a,{update:!0,user_id:n}),o.label=3;case 3:return[2]}}))}))})(k,x[n],e,t).catch((function(e){return p.error(e)}))},setUserProperties:function(e,t){(function(e,t,n,i){return Object(o.__awaiter)(this,void 0,void 0,(function(){var a,s,u,c,l;return Object(o.__generator)(this,(function(o){switch(o.label){case 0:if(!i||!i.global)return[3,1];for(a={},s=0,u=Object.keys(n);s<u.length;s++)c=u[s],a["user_properties."+c]=n[c];return e(r.SET,a),[2,Promise.resolve()];case 1:return[4,t];case 2:l=o.sent(),e(r.CONFIG,l,{update:!0,user_properties:n}),o.label=3;case 3:return[2]}}
2))}))})(k,x[n],e,t).catch((function(e){return p.error(e)}))},setAnalyticsCollectionEnabled:function(e){(function(e,t){return Object(o.__awaiter)(this,void 0,void 0,(function(){var n;return Object(o.__generator)(this,(function(r){switch(r.label){case 0:return[4,e];case 1:return n=r.sent(),window["ga-disable-"+n]=!t,[2]}}))}))})(x[n],e).catch((function(e){return p.error(e)}))},INTERNAL:{delete:function(){return delete x[n],Promise.resolve()}}}}function F(e){e.INTERNAL.registerComponent(new l.Component("analytics",(function(e){return j(e.getProvider("app").getImmediate(),e.getProvider("installations").getImmediate())}),"PUBLIC").setServiceProps({settings:M,EventName:i,isSupported:U})),e.INTERNAL.registerComponent(new l.Component("analytics-internal",(function(e){try{return{logEvent:e.getProvider("analytics").getImmediate().logEvent}}catch(t){throw m.create("interop-component-reg-failed",{reason:t})}}),"PRIVATE")),e.registerVersion("@firebase/analytics","0.5.0")}function U(){return Object(o.__awaiter)(this,void 0,void 0,(function(){return Object(o.__generator)(this,(function(e){switch(e.label){case 0:if(Object(c.isBrowserExtension)())return[2,!1];if(!Object(c.areCookiesEnabled)())return[2,!1];if(!Object(c.isIndexedDBAvailable)())return[2,!1];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,Object(c.validateIndexedDBOpenable)()];case 2:return[2,e.sent()];case 3:return e.sent(),[2,!1];case 4:return[2]}}
2))}))}F(s.a)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8);n(33);var i=n(1),o=n(4),a=n(23),s=n(13);function u(e){return e&&"object"===typeof e&&"default"in e?e:{default:e}}var c,l=u(r),h=function(){function e(e,t,n,r){this.client=e,this.storage=t,this.storageCache=n,this.logger=r}return e.prototype.isCachedDataFresh=function(e,t){if(!t)return this.logger.debug("Config fetch cache check. Cache unpopulated."),!1;var n=Date.now()-t,r=n<=e;return this.logger.debug("Config fetch cache check. Cache age millis: "+n+". Cache max age millis (minimumFetchIntervalMillis setting): "+e+". Is cache hit: "+r+"."),r},e.prototype.fetch=function(e){return i.__awaiter(this,void 0,void 0,(function(){var t,n,r,o,a;return i.__generator(this,(function(i){switch(i.label){case 0:return[4,Promise.all([this.storage.getLastSuccessfulFetchTimestampMillis(),this.storage.getLastSuccessfulFetchResponse()])];case 1:return t=i.sent(),n=t[0],(r=t[1])&&this.isCachedDataFresh(e.cacheMaxAgeMillis,n)?[2,r]:(e.eTag=r&&r.eTag,[4,this.client.fetch(e)]);case 2:return o=i.sent(),a=[this.storageCache.setLastSuccessfulFetchTimestampMillis(Date.now())],200===o.status&&a.push(this.storage.setLastSuccessfulFetchResponse(o)),[4,Promise.all(a)];case 3:return i.sent(),[2,o]}}))}))},e}(),f=((c={})["registration-window"]="Undefined window object. This SDK only supports usage in a browser environment.",c["registration-project-id"]="Undefined project identifier. Check Firebase app initialization.",c["registration-api-key"]="Undefined API key. Check Firebase app initialization.",c["registration-app-id"]="Undefined app identifier. Check Firebase app initialization.",c["storage-open"]="Error thrown when opening storage. Original error: {$originalErrorMessage}.",c["storage-get"]="Error thrown when reading from storage. Original error: {$originalErrorMessage}.",c["storage-set"]="Error thrown when writing to storage. Original error: {$originalErrorMessage}.",c["storage-delete"]="Error thrown when deleting from storage. Original error: {$originalErrorMessage}.",c["fetch-client-network"]="Fetch client failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.",c["fetch-timeout"]='The config fetch request timed out. Configure timeout using "fetchTimeoutMillis" SDK setting.',c["fetch-throttle"]='The config fetch request timed out while in an exponential backoff state. Configure timeout using "fetchTimeoutMillis" SDK setting. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.',c["fetch-client-parse"]="Fetch client could not parse response. Original error: {$originalErrorMessage}.",c["fetch-status"]="Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.",c),p=new o.ErrorFactory("remoteconfig","Remote Config",f);var d=function(){function e(e,t,n,r,i,o){this.firebaseInstallations=e,this.sdkVersion=t,this.namespace=n,this.projectId=r,this.apiKey=i,this.appId=o}return e.prototype.fetch=function(e){return i.__awaiter(this,void 0,void 0,(function(){var t,n,r,o,a,s,u,c,l,h,f,d,v,g,y,m,b,_,w;return i.__generator(this,(function(i){switch(i.label){case 0:return[4,Promise.all([this.firebaseInstallations.getId(),this.firebaseInstallations.getToken()])];case 1:t=i.sent(),n=t[0],r=t[1],o=window.FIREBASE_REMOTE_CONFIG_URL_BASE||"https://firebaseremoteconfig.googleapis.com",a=o+"/v1/projects/"+this.projectId+"/namespaces/"+this.namespace+":fetch?key="+this.apiKey,s={"Content-Type":"application/json","Content-Encoding":"gzip","If-None-Match":e.eTag||"*"},u={sdk_version:this.sdkVersion,app_instance_id:n,app_instance_id_token:r,app_id:this.appId,language_code:(void 0===E&&(E=navigator),E.languages&&E.languages[0]||E.language)},c={method:"POST",headers:s,body:JSON.stringify(u)},l=fetch(a,c),h=new Promise((function(t,n){e.signal.addEventListener((function(){var e=new Error("The operation was aborted.");e.name="AbortError",n(e)}))})),i.label=2;case 2:return i.trys.push([2,5,,6]),[4,Promise.race([l,h])];case 3:return i.sent(),[4,l];case 4:return f=i.sent(),[3,6];case 5:throw d=i.sent(),v="fetch-client-network","AbortError"===d.name&&(v="fetch-timeout"),p.create(v,{originalErrorMessage:d.message});case 6:if(g=f.status,y=f.headers.get("ETag")||void 0,200!==f.status)return[3,11];_=void 0,i.label=7;case 7:return i.trys.push([7,9,,10]),[4,f.json()];case 8:return _=i.sent(),[3,10];case 9:throw w=i.sent(),p.create("fetch-client-parse",{originalErrorMessage:w.message});case 10:m=_.entries,b=_.state,i.label=11;case 11:if("INSTANCE_STATE_UNSPECIFIED"===b?g=500:"NO_CHANGE"===b?g=304:"NO_TEMPLATE"!==b&&"EMPTY_CONFIG"!==b||(m={}),304!==g&&200!==g)throw p.create("fetch-status",{httpStatus:g});return[2,{status:g,eTag:y,config:m}]}var E}))}))},e}(),v=function(){function e(){this.listeners=[]}return e.prototype.addEventListener=function(e){this.listeners.push(e)}
2,e.prototype.abort=function(){this.listeners.forEach((function(e){return e()}))},e}(),g=["1","true","t","yes","y","on"],y=function(){function e(e,t){void 0===t&&(t=""),this._source=e,this._value=t}return e.prototype.asString=function(){return this._value},e.prototype.asBoolean=function(){return"static"!==this._source&&g.indexOf(this._value.toLowerCase())>=0},e.prototype.asNumber=function(){if("static"===this._source)return 0;var e=Number(this._value);return isNaN(e)&&(e=0),e},e.prototype.getSource=function(){return this._source},e}(),m=function(){function e(e,t,n,r,i){this.app=e,this._client=t,this._storageCache=n,this._storage=r,this._logger=i,this._isInitializationComplete=!1,this.settings={fetchTimeoutMillis:6e4,minimumFetchIntervalMillis:432e5},this.defaultConfig={}}return e.prototype.setLogLevel=function(e){switch(e){case"debug":this._logger.logLevel=a.LogLevel.DEBUG;break;case"silent":this._logger.logLevel=a.LogLevel.SILENT;break;default:this._logger.logLevel=a.LogLevel.ERROR}},Object.defineProperty(e.prototype,"fetchTimeMillis",{get:function(){return this._storageCache.getLastSuccessfulFetchTimestampMillis()||-1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastFetchStatus",{get:function(){return this._storageCache.getLastFetchStatus()||"no-fetch-yet"},enumerable:!1,configurable:!0}),e.prototype.activate=function(){return i.__awaiter(this,void 0,void 0,(function(){var e,t,n;return i.__generator(this,(function(r){switch(r.label){case 0:return[4,Promise.all([this._storage.getLastSuccessfulFetchResponse(),this._storage.getActiveConfigEtag()])];case 1:return e=r.sent(),t=e[0],n=e[1],t&&t.config&&t.eTag&&t.eTag!==n?[4,Promise.all([this._storageCache.setActiveConfig(t.config),this._storage.setActiveConfigEtag(t.eTag)])]:[2,!1];case 2:return r.sent(),[2,!0]}}))}))},e.prototype.ensureInitialized=function(){var e=this;return this._initializePromise||(this._initializePromise=this._storageCache.loadFromStorage().then((function(){e._isInitializationComplete=!0}))),this._initializePromise},e.prototype.fetch=function(){return i.__awaiter(this,void 0,void 0,(function(){var e,t,n,r=this;return i.__generator(this,(function(a){switch(a.label){case 0:e=new v,setTimeout((function(){return i.__awaiter(r,void 0,void 0,(function(){return i.__generator(this,(function(t){return e.abort(),[2]}))}))}),this.settings.fetchTimeoutMillis),a.label=1;case 1:return a.trys.push([1,4,,6]),[4,this._client.fetch({cacheMaxAgeMillis:this.settings.minimumFetchIntervalMillis,signal:e})];case 2:return a.sent(),[4,this._storageCache.setLastFetchStatus("success")];case 3:return a.sent(),[3,6];case 4:return t=a.sent(),u="fetch-throttle",n=(s=t)instanceof o.FirebaseError&&-1!==s.code.indexOf(u)?"throttle":"failure",[4,this._storageCache.setLastFetchStatus(n)];case 5:throw a.sent(),t;case 6:return[2]}var s,u}))}))},e.prototype.fetchAndActivate=function(){return i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(e){switch(e.label){case 0:return[4,this.fetch()];case 1:return e.sent(),[2,this.activate()]}}))}))},e.prototype.getAll=function(){var e=this;return function(e,t){void 0===e&&(e={});void 0===t&&(t={});return Object.keys(i.__assign(i.__assign({},e),t))}(this._storageCache.getActiveConfig(),this.defaultConfig).reduce((function(t,n){return t[n]=e.getValue(n),t}),{})},e.prototype.getBoolean=function(e){return this.getValue(e).asBoolean()},e.prototype.getNumber=function(e){return this.getValue(e).asNumber()},e.prototype.getString=function(e){return this.getValue(e).asString()},e.prototype.getValue=function(e){this._isInitializationComplete||this._logger.debug('A value was requested for key "'+e+'" before SDK initialization completed. Await on ensureInitialized if the intent was to get a previously activated value.');var t=this._storageCache.getActiveConfig();return t&&void 0!==t[e]?new y("remote",t[e]):this.defaultConfig&&void 0!==this.defaultConfig[e]?new y("default",String(this.defaultConfig[e])):(this._logger.debug('Returning static value for key "'+e+'". Define a default or remote value if this is unintentional.'),new y("static"))},e}();function b(e,t){var n=e.target.error||void 0;return p.create(t,{originalErrorMessage:n&&n.message})}var _=function(){function e(e,t,n,r){void 0===r&&(r=new Promise((function(e,t){var n=indexedDB.open("firebase_remote_config",1);n.onerror=function(e){t(b(e,"storage-open"))},n.onsuccess=function(t){e(t.target.result)},n.onupgradeneeded=function(e){var t=e.target.result;switch(e.oldVersion){case 0:t.createObjectStore("app_namespace_store",{keyPath:"compositeKey"})}}}))),this.appId=e,this.appName=t,this.namespace=n,this.openDbPromise=r}return e.prototype.getLastFetchStatus=function(){return this.get("last_fetch_status")},e.prototype.setLastFetchStatus=function(e){return this.set("last_fetch_status",e)},e.prototype.getLastSuccessfulFetchTimestampMillis=function(){return this.get("last_successful_fetch_timestamp_millis")},e.prototype.setLastSuccessfulFetchTimestampMillis=function(e){return this.set("last_successful_fetch_timestamp_millis",e)},e.prototype.getLastSuccessfulFetchResponse=function(){return this.get("last_successful_fetch_response")},e.prototype.setLastSuccessfulFetchResponse=function(e){return this.set("last_successful_fetch_response",e)},e.prototype.getActiveConfig=function(){return this.get("active_config")},e.prototype.setActiveConfig=function(e){return this.set("active_config",e)},e.prototype.getActiveConfigEtag=function(){return this.get("active_config_etag")},e.prototype.setActiveConfigEtag=function(e){return this.set("active_config_etag",e)},e.prototype.getThrottleMetadata=function(){return this.get("throttle_metadata")},e.prototype.setThrottleMetadata=function(e){return this.set("throttle_metadata",e)},e.prototype.deleteThrottleMetadata=function(){return this.delete("throttle_metadata")},e.prototype.get=function(e){return i.__awaiter(this,void 0,void 0,(function(){var t,n=this;return i.__generator(this,(function(r){switch(r.label){case 0:return[4,this.openDbPromise];case 1:return t=r.sent(),[2,new Promise((function(r,i){var o=t.transaction(["app_namespace_store"],"readonly").objectStore("app_namespace_store"),a=n.createCompositeKey(e);try{var s=o.get(a);s.onerror=function(e){i(b(e,"storage-get"))},s.onsuccess=function(e){var t=e.target.result;r(t?t.value:void 0)}}catch(u){i(p.create("storage-get",{originalErrorMessage:u&&u.message}))}}))]}}))}))},e.prototype.set=function(e,t){return i.__awaiter(this,void 0,void 0,(function(){var n,r=this;return i.__generator(this,(function(i){switch(i.label){case 0:return[4,this.openDbPromise];case 1:return n=i.sent(),[2,new Promise((function(i,o){var a=n.transaction(["app_namespace_store"],"readwrite").objectStore("app_namespace_store"),s=r.createCompositeKey(e);try{var u=a.put({compositeKey:s,value:t});u.onerror=function(e){o(b(e,"storage-set"))},u.onsuccess=function(){i()}}catch(c){o(p.create("storage-set",{originalErrorMessage:c&&c.message}))}}))]}}))}))},e.prototype.delete=function(e){return i.__awaiter(this,void 0,void 0,(function(){var t,n=this;return i.__generator(this,(function(r){switch(r.label){case 0:return[4,this.openDbPromise];case 1:return t=r.sent(),[2,new Promise((function(r,i){var o=t.transaction(["app_namespace_store"],"readwrite").objectStore("app_namespace_store"),a=n.createCompositeKey(e);try{var s=o.delete(a);s.onerror=function(e){i(b(e,"storage-delete"))},s.onsuccess=function(){r()}}catch(u){i(p.create("storage-delete",{originalErrorMessage:u&&u.message}))}}))]}}))}))},e.prototype.createCompositeKey=function(e){return[this.appId,this.appName,this.namespace,e].join()},e}(),w=function(){function e(e){this.storage=e}return e.prototype.getLastFetchStatus=function(){return this.lastFetchStatus},e.prototype.getLastSuccessfulFetchTimestampMillis=function(){return this.lastSuccessfulFetchTimestampMillis},e.prototype.getActiveConfig=function(){return this.activeConfig},e.prototype.loadFromStorage=function(){return i.__awaiter(this,void 0,void 0,(function(){var e,t,n,r,o,a;return i.__generator(this,(function(i){switch(i.label){case 0:return e=this.storage.getLastFetchStatus(),t=this.storage.getLastSuccessfulFetchTimestampMillis(),n=this.storage.getActiveConfig(),[4,e];case 1:return(r=i.sent())&&(this.lastFetchStatus=r),[4,t];case 2:return(o=i.sent())&&(this.lastSuccessfulFetchTimestampMillis=o),[4,n];case 3:return(a=i.sent())&&(this.activeConfig=a),[2]}}))}))},e.prototype.setLastFetchStatus=function(e){return this.lastFetchStatus=e,this.storage.setLastFetchStatus(e)},e.prototype.setLastSuccessfulFetchTimestampMillis=function(e){return this.lastSuccessfulFetchTimestampMillis=e,this.storage.setLastSuccessfulFetchTimestampMillis(e)},e.prototype.setActiveConfig=function(e){return this.activeConfig=e,this.storage.setActiveConfig(e)},e}();function E(e,t){return new Promise((function(n,r){var i=Math.max(t-Date.now(),0),o=setTimeout(n,i);e.addEventListener((function(){clearTimeout(o),r(p.create("fetch-throttle",{throttleEndTimeMillis:t}))}))}))}var T=function(){function e(e,t){this.client=e,this.storage=t}return e.prototype.fetch=function(e){return i.__awaiter(this,void 0,void 0,(function(){var t;return i.__generator(this,(function(n){switch(n.label){case 0:return[4,this.storage.getThrottleMetadata()];case 1:return t=n.sent()||{backoffCount:0,throttleEndTimeMillis:Date.now()},[2,this.attemptFetch(e,t)]}}))}))},e.prototype.attemptFetch=function(e,t){var n=t.throttleEndTimeMillis,r=t.backoffCount;return i.__awaiter(this,void 0,void 0,(function(){var t,a,s;return i.__generator(this,(function(i){switch(i.label){case 0:return[4,E(e.signal,n)];case 1:i.sent(),i.label=2;case 2:return i.trys.push([2,5,,7]),[4,this.client.fetch(e)];case 3:return t=i.sent(),[4,this.storage.deleteThrottleMetadata()];case 4:return i.sent(),[2,t];case 5:if(!function(e){if(!(e instanceof o.FirebaseError))return!1;var t=Number(e.httpStatus);return 429===t||500===t||503===t||504===t}(a=i.sent()))throw a;return s={throttleEndTimeMillis:Date.now()+o.calculateBackoffMillis(r),backoffCount:r+1},[4,this.storage.setThrottleMetadata(s)];case 6:return i.sent(),[2,this.attemptFetch(e,s)];case 7:return[2]}}
2))}))},e}(),S="@firebase/remote-config";function I(e){e.INTERNAL.registerComponent(new s.Component("remoteConfig",(function(t,n){var r=t.getProvider("app").getImmediate(),i=t.getProvider("installations").getImmediate();if("undefined"===typeof window)throw p.create("registration-window");var o=r.options,s=o.projectId,u=o.apiKey,c=o.appId;if(!s)throw p.create("registration-project-id");if(!u)throw p.create("registration-api-key");if(!c)throw p.create("registration-app-id");n=n||"firebase";var l=new _(c,r.name,n),f=new w(l),v=new a.Logger(S);v.logLevel=a.LogLevel.ERROR;var g=new d(i,e.SDK_VERSION,n,s,u,c),y=new T(g,l),b=new h(y,l,f,v),E=new m(r,b,f,l,v);return E.ensureInitialized(),E}),"PUBLIC").setMultipleInstances(!0)),e.registerVersion(S,"0.1.28")}I(l.default),t.registerRemoteConfig=I},function(e,t){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(3),i=n(2),o=n(0),a=n.n(o),s=(n(12),n(11)),u=n(19),c=n(16),l=n(27);function h(e,t){"function"===typeof e?e(t):e&&(e.current=t)}function f(e,t){return o.useMemo((function(){return null==e&&null==t?null:function(n){h(e,n),h(t,n)}}),[e,t])}var p="undefined"!==typeof window?o.useLayoutEffect:o.useEffect;function d(e){var t=o.useRef(e);return p((function(){t.current=e})),o.useCallback((function(){return t.current.apply(void 0,arguments)}),[])}var v=!0,g=!1,y=null,m={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function b(e){e.metaKey||e.altKey||e.ctrlKey||(v=!0)}function _(){v=!1}function w(){"hidden"===this.visibilityState&&g&&(v=!0)}function E(e){var t=e.target;try{return t.matches(":focus-visible")}catch(n){}return v||function(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!m[t]||e.readOnly)||("TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable)}(t)}function T(){g=!0,window.clearTimeout(y),y=window.setTimeout((function(){g=!1}),100)}function S(){return{isFocusVisible:E,onBlurVisible:T,ref:o.useCallback((function(e){var t,n=l.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",b,!0),t.addEventListener("mousedown",_,!0),t.addEventListener("pointerdown",_,!0),t.addEventListener("touchstart",_,!0),t.addEventListener("visibilitychange",w,!0))}),[])}}var I=n(28),C=n(14),k=n(25),x=n(6),O=a.a.createContext(null);function N(e,t){var n=Object.create(null);return e&&o.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&Object(o.isValidElement)(e)?t(e):e}(e)})),n}function A(e,t,n){return null!=n[t]?n[t]:e.props[t]}function P(e,t,n){var r=N(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var u in t){if(i[u])for(r=0;r<i[u].length;r++){var c=i[u][r];s[i[u][r]]=n(c)}s[u]=n(u)}for(r=0;r<o.length;r++)s[o[r]]=n(o[r]);return s}(t,r);
2return Object.keys(i).forEach((function(a){var s=i[a];if(Object(o.isValidElement)(s)){var u=a in t,c=a in r,l=t[a],h=Object(o.isValidElement)(l)&&!l.props.in;!c||u&&!h?c||!u||h?c&&u&&Object(o.isValidElement)(l)&&(i[a]=Object(o.cloneElement)(s,{onExited:n.bind(null,s),in:l.props.in,exit:A(s,"exit",e),enter:A(s,"enter",e)})):i[a]=Object(o.cloneElement)(s,{in:!1}):i[a]=Object(o.cloneElement)(s,{onExited:n.bind(null,s),in:!0,exit:A(s,"exit",e),enter:A(s,"enter",e)})}})),i}var R=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},D=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(Object(k.a)(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}Object(x.a)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,i=t.children,a=t.handleExited;return{children:t.firstRender?(n=e,r=a,N(n.children,(function(e){return Object(o.cloneElement)(e,{onExited:r.bind(null,e),in:!0,appear:A(e,"appear",n),enter:A(e,"enter",n),exit:A(e,"exit",n)})}))):P(e,i,a),firstRender:!1}},n.handleExited=function(e,t){var n=N(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=Object(i.a)({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=Object(C.a)(e,["component","childFactory"]),i=this.state.contextValue,o=R(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?a.a.createElement(O.Provider,{value:i},o):a.a.createElement(O.Provider,{value:i},a.a.createElement(t,r,o))},t}(a.a.Component);D.propTypes={},D.defaultProps={component:"div",childFactory:function(e){return e}};var L=D,M="undefined"===typeof window?o.useEffect:o.useLayoutEffect;var j=function(e){var t=e.classes,n=e.pulsate,r=void 0!==n&&n,i=e.rippleX,a=e.rippleY,u=e.rippleSize,c=e.in,l=e.onExited,h=void 0===l?function(){}:l,f=e.timeout,p=o.useState(!1),v=p[0],g=p[1],y=Object(s.a)(t.ripple,t.rippleVisible,r&&t.ripplePulsate),m={width:u,height:u,top:-u/2+a,left:-u/2+i},b=Object(s.a)(t.child,v&&t.childLeaving,r&&t.childPulsate),_=d(h);return M((function(){if(!c){g(!0);var e=setTimeout(_,f);return function(){clearTimeout(e)}}}),[_,c,f]),o.createElement("span",{className:y,style:m},o.createElement("span",{className:b}))},F=o.forwardRef((function(e,t){var n=e.center,a=void 0!==n&&n,u=e.classes,c=e.className,l=Object(r.a)(e,["center","classes","className"]),h=o.useState([]),f=h[0],p=h[1],d=o.useRef(0),v=o.useRef(null);o.useEffect((function(){v.current&&(v.current(),v.current=null)}),[f]);var g=o.useRef(!1),y=o.useRef(null),m=o.useRef(null),b=o.useRef(null);o.useEffect((function(){return function(){clearTimeout(y.current)}}),[]);var _=o.useCallback((function(e){var t=e.pulsate,n=e.rippleX,r=e.rippleY,i=e.rippleSize,a=e.cb;p((function(e){return[].concat(Object(I.a)(e),[o.createElement(j,{key:d.current,classes:u,timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i})])})),d.current+=1,v.current=a}),[u]),w=o.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t.pulsate,i=void 0!==r&&r,o=t.center,s=void 0===o?a||t.pulsate:o,u=t.fakeElement,c=void 0!==u&&u;if("mousedown"===e.type&&g.current)g.current=!1;else{"touchstart"===e.type&&(g.current=!0);var l,h,f,p=c?null:b.current,d=p?p.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)l=Math.round(d.width/2),h=Math.round(d.height/2);else{var v=e.touches?e.touches[0]:e,w=v.clientX,E=v.clientY;l=Math.round(w-d.left),h=Math.round(E-d.top)}if(s)(f=Math.sqrt((2*Math.pow(d.width,2)+Math.pow(d.height,2))/3))%2===0&&(f+=1);else{var T=2*Math.max(Math.abs((p?p.clientWidth:0)-l),l)+2,S=2*Math.max(Math.abs((p?p.clientHeight:0)-h),h)+2;f=Math.sqrt(Math.pow(T,2)+Math.pow(S,2))}e.touches?null===m.current&&(m.current=function(){_({pulsate:i,rippleX:l,rippleY:h,rippleSize:f,cb:n})},y.current=setTimeout((function(){m.current&&(m.current(),m.current=null)}),80)):_({pulsate:i,rippleX:l,rippleY:h,rippleSize:f,cb:n})}}),[a,_]),E=o.useCallback((function(){w({},{pulsate:!0})}),[w]),T=o.useCallback((function(e,t){if(clearTimeout(y.current),"touchend"===e.type&&m.current)return e.persist(),m.current(),m.current=null,void(y.current=setTimeout((function(){T(e,t)})));m.current=null,p((function(e){return e.length>0?e.slice(1):e})),v.current=t}),[]);return o.useImperativeHandle(t,(function(){return{pulsate:E,start:w,stop:T}}),[E,w,T]),o.createElement("span",Object(i.a)({className:Object(s.a)(u.root,c),ref:b},l),o.createElement(L,{component:null,exit:!0},f))})),U=Object(u.a)((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500m
2s ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(o.memo(F)),V=o.forwardRef((function(e,t){var n=e.action,a=e.buttonRef,u=e.centerRipple,c=void 0!==u&&u,h=e.children,p=e.classes,v=e.className,g=e.component,y=void 0===g?"button":g,m=e.disabled,b=void 0!==m&&m,_=e.disableRipple,w=void 0!==_&&_,E=e.disableTouchRipple,T=void 0!==E&&E,I=e.focusRipple,C=void 0!==I&&I,k=e.focusVisibleClassName,x=e.onBlur,O=e.onClick,N=e.onFocus,A=e.onFocusVisible,P=e.onKeyDown,R=e.onKeyUp,D=e.onMouseDown,L=e.onMouseLeave,M=e.onMouseUp,j=e.onTouchEnd,F=e.onTouchMove,V=e.onTouchStart,q=e.onDragLeave,B=e.tabIndex,z=void 0===B?0:B,W=e.TouchRippleProps,H=e.type,G=void 0===H?"button":H,K=Object(r.a)(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),Q=o.useRef(null);var $=o.useRef(null),Y=o.useState(!1),X=Y[0],J=Y[1];b&&X&&J(!1);var Z=S(),ee=Z.isFocusVisible,te=Z.onBlurVisible,ne=Z.ref;function re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:T;return d((function(r){return t&&t(r),!n&&$.current&&$.current[e](r),!0}))}o.useImperativeHandle(n,(function(){return{focusVisible:function(){J(!0),Q.current.focus()}}}),[]),o.useEffect((function(){X&&C&&!w&&$.current.pulsate()}),[w,C,X]);var ie=re("start",D),oe=re("stop",q),ae=re("stop",M),se=re("stop",(function(e){X&&e.preventDefault(),L&&L(e)})),ue=re("start",V),ce=re("stop",j),le=re("stop",F),he=re("stop",(function(e){X&&(te(e),J(!1)),x&&x(e)}),!1),fe=d((function(e){Q.current||(Q.current=e.currentTarget),ee(e)&&(J(!0),A&&A(e)),N&&N(e)})),pe=function(){var e=l.findDOMNode(Q.current);return y&&"button"!==y&&!("A"===e.tagName&&e.href)},de=o.useRef(!1),ve=d((function(e){C&&!de.current&&X&&$.current&&" "===e.key&&(de.current=!0,e.persist(),$.current.stop(e,(function(){$.current.start(e)}))),e.target===e.currentTarget&&pe()&&" "===e.key&&e.preventDefault(),P&&P(e),e.target===e.currentTarget&&pe()&&"Enter"===e.key&&!b&&(e.preventDefault(),O&&O(e))})),ge=d((function(e){C&&" "===e.key&&$.current&&X&&!e.defaultPrevented&&(de.current=!1,e.persist(),$.current.stop(e,(function(){$.current.pulsate(e)}))),R&&R(e),O&&e.target===e.currentTarget&&pe()&&" "===e.key&&!e.defaultPrevented&&O(e)})),ye=y;"button"===ye&&K.href&&(ye="a");var me={};"button"===ye?(me.type=G,me.disabled=b):("a"===ye&&K.href||(me.role="button"),me["aria-disabled"]=b);var be=f(a,t),_e=f(ne,Q),we=f(be,_e),Ee=o.useState(!1),Te=Ee[0],Se=Ee[1];o.useEffect((function(){Se(!0)}),[]);var Ie=Te&&!w&&!b;return o.createElement(ye,Object(i.a)({className:Object(s.a)(p.root,v,X&&[p.focusVisible,k],b&&p.disabled),onBlur:he,onClick:O,onFocus:fe,onKeyDown:ve,onKeyUp:ge,onMouseDown:ie,onMouseLeave:se,onMouseUp:ae,onDragLeave:oe,onTouchEnd:ce,onTouchMove:le,onTouchStart:ue,ref:we,tabIndex:b?-1:z},me,K),h,Ie?o.createElement(U,Object(i.a)({ref:$,center:c},W)):null)})),q=Object(u.a)({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(V),B=n(21),z=o.forwardRef((function(e,t){var n=e.children,a=e.classes,u=e.className,c=e.color,l=void 0===c?"default":c,h=e.component,f=void 0===h?"button":h,p=e.disabled,d=void 0!==p&&p,v=e.disableElevation,g=void 0!==v&&v,y=e.disableFocusRipple,m=void 0!==y&&y,b=e.endIcon,_=e.focu
2sVisibleClassName,w=e.fullWidth,E=void 0!==w&&w,T=e.size,S=void 0===T?"medium":T,I=e.startIcon,C=e.type,k=void 0===C?"button":C,x=e.variant,O=void 0===x?"text":x,N=Object(r.a)(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),A=I&&o.createElement("span",{className:Object(s.a)(a.startIcon,a["iconSize".concat(Object(B.a)(S))])},I),P=b&&o.createElement("span",{className:Object(s.a)(a.endIcon,a["iconSize".concat(Object(B.a)(S))])},b);return o.createElement(q,Object(i.a)({className:Object(s.a)(a.root,a[O],u,"inherit"===l?a.colorInherit:"default"!==l&&a["".concat(O).concat(Object(B.a)(l))],"medium"!==S&&[a["".concat(O,"Size").concat(Object(B.a)(S))],a["size".concat(Object(B.a)(S))]],g&&a.disableElevation,d&&a.disabled,E&&a.fullWidth),component:f,disabled:d,focusRipple:!m,focusVisibleClassName:Object(s.a)(a.focusVisible,_),ref:t,type:k},N),o.createElement("span",{className:a.label},A,n,P))}));t.a=Object(u.a)((function(e){return{root:Object(i.a)({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:Object(c.b)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:Object(c.b)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:Object(c.b)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(Object(c.b)(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:Object(c.b)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(Object(c.b)(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:Object(c.b)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(z)},function(e,t,n){"use strict";var r=n(2),i=n(3),o=n(0),a=n.n(o),s=(n(12),n(11)),u=n(19),c=n(42);var l=function(e,t){var n=function(t,n){return a.a.createElement(c.a,Object(r.a)({ref:n},t),e)};return n.muiName=c.a.muiName,a.a.memo(a.a.forwardRef(n))}(o.createElement("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}));var h=o.forwardRef((function(e,t){var n=e.alt,a=e.children,u=e.classes,c=e.className,h=e.component,f=void 0===h?"div":h,p=e.imgProps,d=e.sizes,v=e.src,g=e.srcSet,y=e.variant,m=void 0===y?"circle":y,b=Object(i.a)(e,["alt","children","classes","className","component","imgProps","
2sizes","src","srcSet","variant"]),_=null,w=function(e){var t=e.src,n=e.srcSet,r=o.useState(!1),i=r[0],a=r[1];return o.useEffect((function(){if(t||n){a(!1);var e=!0,r=new Image;return r.src=t,r.srcSet=n,r.onload=function(){e&&a("loaded")},r.onerror=function(){e&&a("error")},function(){e=!1}}}),[t,n]),i}({src:v,srcSet:g}),E=v||g,T=E&&"error"!==w;return _=T?o.createElement("img",Object(r.a)({alt:n,src:v,srcSet:g,sizes:d,className:u.img},p)):null!=a?a:E&&n?n[0]:o.createElement(l,{className:u.fallback}),o.createElement(f,Object(r.a)({className:Object(s.a)(u.root,u.system,u[m],c,!T&&u.colorDefault),ref:t},b),_)}));t.a=Object(u.a)((function(e){return{root:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none"},colorDefault:{color:e.palette.background.default,backgroundColor:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[600]},circle:{},rounded:{borderRadius:e.shape.borderRadius},square:{borderRadius:0},img:{width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4},fallback:{width:"75%",height:"75%"}}}),{name:"MuiAvatar"})(h)}]]); 3//# sourceMappingURL=2.5aa73c77.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.