1/*! For license information please see 2.868141b9.chunk.js.LICENSE.txt */ 2(this["webpackJsonpynet-people"]=this["webpackJsonpynet-people"]||[]).push([[2],[function(t,e,n){"use strict";n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return a})),n.d(e,"d",(function(){return s})),n.d(e,"h",(function(){return u})),n.d(e,"e",(function(){return c})),n.d(e,"f",(function(){return l})),n.d(e,"g",(function(){return f}));var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function a(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(e){o(e)}}function s(t){try{u(r.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))}function s(t,e){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=e.call(t,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 u(t){var e="function"===typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"===typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function c(t,e){var n="function"===typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >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 l(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(c(arguments[e]));return t}function f(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return v})),n.d(e,"b",(function(){return A})),n.d(e,"c",(function(){return N})),n.d(e,"d",(function(){return z})),n.d(e,"e",(function(){return k})),n.d(e,"f",(function(){return s})),n.d(e,"g",(function(){return u})),n.d(e,"h",(function(){return l})),n.d(e,"i",(function(){return f})),n.d(e,"j",(function(){return Z})),n.d(e,"k",(function(){return F})),n.d(e,"l",(function(){return H})),n.d(e,"m",(function(){return p})),n.d(e,"n",(function(){return d})),n.d(e,"o",(function(){return Q})),n.d(e,"p",(function(){return y})),n.d(e,"q",(function(){return M})),n.d(e,"r",(function(){return b})),n.d(e,"s",(function(){return w})),n.d(e,"t",(function(){return E})),n.d(e,"u",(function(){return V})),n.d(e,"v",(function(){return T})),n.d(e,"w",(function(){return I})),n.d(e,"x",(function(){return g})),n.d(e,"y",(function(){return m})),n.d(e,"z",(function(){return S})),n.d(e,"A",(function(){return _})),n.d(e,"B",(function(){return O})),n.d(e,"C",(function(){return L})),n.d(e,"D",(function(){return R})),n.d(e,"E",(function(){return q})),n.d(e,"F",(function(){return B})),n.d(e,"G",(function(){return U})),n.d(e,"H",(function(){return J})),n.d(e,"I",(function(){return $})),n.d(e,"J",(function(){return j})),n.d(e,"K",(function(){return G})),n.d(e,"L",(function(){return Y})),n.d(e,"M",(function(){return X})),n.d(e,"N",(function(){return C}));var r=n(0),i=!1,o=!1,a="${JSCORE_VERSION}",s=function(t,e){if(!t)throw u(e)},u=function(t){return new Error("Firebase Database ("+a+") INTERNAL ASSERT FAILED: "+t)},c=function(t){for(var e=[],n=0,r=0;r<t.length;r++){var i=t.charCodeAt(r);i<128?e[n++]=i:i<2048?(e[n++]=i>>6|192,e[n++]=63&i|128):55296===(64512&i)&&r+1<t.length&&56320===(64512&t.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&t.charCodeAt(++r)),e[n++]=i>>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=63&i|128):(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=63&i|128)}return e},l={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"===typeof atob,encodeByteArray:function(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[],i=0;i<t.length;i+=3){var o=t[i],a=i+1<t.length,s=a?t[i+1]:0,u=i+2<t.length,c=u?t[i+2]:0,l=o>>2,f=(3&o)<<4|s>>4,h=(15&s)<<2|c>>6,p=63&c;u||(p=64,a||(h=64)),r.push(n[l],n[f],n[h],n[p])}return r.join("")},encodeString:function(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(c(t),e)},decodeString:function(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):function(t){for(var e=[],n=0,r=0;n<t.length;){var i=t[n++];if(i<128)e[r++]=String.fromCharCode(i);else if(i>191&&i<224){var o=t[n++];e[r++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){var a=((7&i)<<18|(63&(o=t[n++]))<<12|(63&(s=t[n++]))<<6|63&t[n++])-65536;e[r++]=String.fromCharCode(55296+(a>>10)),e[r++]=String.fromCharCode(56320+(1023&a))}else{o=t[n++];var s=t[n++];
2e[r++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&s)}}return e.join("")}(this.decodeStringToByteArray(t,e))},decodeStringToByteArray:function(t,e){this.init_();for(var n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],i=0;i<t.length;){var o=n[t.charAt(i++)],a=i<t.length?n[t.charAt(i)]:0,s=++i<t.length?n[t.charAt(i)]:64,u=++i<t.length?n[t.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 f=s<<6&192|u;r.push(f)}}}return r},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}},f=function(t){var e=c(t);return l.encodeByteArray(e,!0)},h=function(t){try{return l.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};function p(t){return d(void 0,t)}function d(t,e){if(!(e instanceof Object))return e;switch(e.constructor){case Date:return new Date(e.getTime());case Object:void 0===t&&(t={});break;case Array:t=[];break;default:return e}for(var n in e)e.hasOwnProperty(n)&&"__proto__"!==n&&(t[n]=d(t[n],e[n]));return t}var v=function(){function t(){var t=this;this.reject=function(){},this.resolve=function(){},this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))}return t.prototype.wrapCallback=function(t){var e=this;return function(n,r){n?e.reject(n):e.resolve(r),"function"===typeof t&&(e.promise.catch((function(){})),1===t.length?t(n):t(n,r))}},t}();function y(){return"undefined"!==typeof navigator&&"string"===typeof navigator.userAgent?navigator.userAgent:""}function g(){return"undefined"!==typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(y())}function m(){try{return"[object process]"===Object.prototype.toString.call(t.process)}catch(e){return!1}}function b(){return"object"===typeof self&&self.self===self}function w(){var t="object"===typeof chrome?chrome.runtime:"object"===typeof browser?browser.runtime:void 0;return"object"===typeof t&&void 0!==t.id}function _(){return"object"===typeof navigator&&"ReactNative"===navigator.product}function E(){return y().indexOf("Electron/")>=0}function T(){var t=y();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0}function O(){return y().indexOf("MSAppHost/")>=0}function S(){return!0===i||!0===o}function I(){return"indexedDB"in self&&null!=indexedDB}function C(){return new Promise((function(t,e){try{var n=!0,r="validate-browser-context-for-indexeddb-analytics-module",i=window.indexedDB.open(r);i.onsuccess=function(){i.result.close(),n||window.indexedDB.deleteDatabase(r),t(!0)},i.onupgradeneeded=function(){n=!1},i.onerror=function(){var t;e((null===(t=i.error)||void 0===t?void 0:t.message)||"")}}catch(o){e(o)}}))}function k(){return!(!navigator||!navigator.cookieEnabled)}var N=function(t){function e(n,r,i){var o=t.call(this,r)||this;return o.code=n,o.customData=i,o.name="FirebaseError",Object.setPrototypeOf(o,e.prototype),Error.captureStackTrace&&Error.captureStackTrace(o,A.prototype.create),o}return Object(r.c)(e,t),e}(Error),A=function(){function t(t,e,n){this.service=t,this.serviceName=e,this.errors=n}return t.prototype.create=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=e[0]||{},i=this.service+"/"+t,o=this.errors[t],a=o?x(o,r):"Error",s=this.serviceName+": "+a+" ("+i+").",u=new N(i,s,r);return u},t}();function x(t,e){return t.replace(P,(function(t,n){var r=e[n];return null!=r?String(r):"<"+n+"?>"}))}var P=/\{\$([^}]+)}/g;function R(t){return JSON.parse(t)}function j(t){return JSON.stringify(t)}var D=function(t){var e={},n={},r={},i="";try{var o=t.split(".");e=R(h(o[0])||""),n=R(h(o[1])||""),i=o[2],r=n.d||{},delete n.d}catch(a){}return{header:e,claims:n,data:r,signature:i}},L=function(t){var e=D(t).claims;return!!e&&"object"===typeof e&&e.hasOwnProperty("iat")},M=function(t){var e=D(t).claims;return"object"===typeof e&&!0===e.admin};function F(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function U(t,e){return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0}function V(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function q(t,e,n){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=e.call(n,t[i],i,t));return r}function B(t){for(var e=[],n=function(t,n){Array.isArray(n)?n.forEac
2h((function(n){e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))})):e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))},r=0,i=Object.entries(t);r<i.length;r++){var o=i[r];n(o[0],o[1])}return e.length?"&"+e.join("&"):""}var z=function(){function t(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=64,this.pad_[0]=128;for(var t=1;t<this.blockSize;++t)this.pad_[t]=0;this.reset()}return t.prototype.reset=function(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0},t.prototype.compress_=function(t,e){e||(e=0);var n=this.W_;if("string"===typeof t)for(var r=0;r<16;r++)n[r]=t.charCodeAt(e)<<24|t.charCodeAt(e+1)<<16|t.charCodeAt(e+2)<<8|t.charCodeAt(e+3),e+=4;else for(r=0;r<16;r++)n[r]=t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3],e+=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],f=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+f+a+n[r]&4294967295;f=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]+f&4294967295},t.prototype.update=function(t,e){if(null!=t){void 0===e&&(e=t.length);for(var n=e-this.blockSize,r=0,i=this.buf_,o=this.inbuf_;r<e;){if(0===o)for(;r<=n;)this.compress_(t,r),r+=this.blockSize;if("string"===typeof t){for(;r<e;)if(i[o]=t.charCodeAt(r),++r,++o===this.blockSize){this.compress_(i),o=0;break}}else for(;r<e;)if(i[o]=t[r],++r,++o===this.blockSize){this.compress_(i),o=0;break}}this.inbuf_=o,this.total_+=e}},t.prototype.digest=function(){var t=[],e=8*this.total_;this.inbuf_<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&e,e/=256;this.compress_(this.buf_);var r=0;for(n=0;n<5;n++)for(var i=24;i>=0;i-=8)t[r]=this.chain_[n]>>i&255,++r;return t},t}();function H(t,e){var n=new W(t,e);return n.subscribe.bind(n)}var W=function(){function t(t,e){var n=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=e,this.task.then((function(){t(n)})).catch((function(t){n.error(t)}))}return t.prototype.next=function(t){this.forEachObserver((function(e){e.next(t)}))},t.prototype.error=function(t){this.forEachObserver((function(e){e.error(t)})),this.close(t)},t.prototype.complete=function(){this.forEachObserver((function(t){t.complete()})),this.close()},t.prototype.subscribe=function(t,e,n){var r,i=this;if(void 0===t&&void 0===e&&void 0===n)throw new Error("Missing Observer.");void 0===(r=function(t,e){if("object"!==typeof t||null===t)return!1;for(var n=0,r=e;n<r.length;n++){var i=r[n];if(i in t&&"function"===typeof t[i])return!0}return!1}(t,["next","error","complete"])?t:{next:t,error:e,complete:n}).next&&(r.next=K),void 0===r.error&&(r.error=K),void 0===r.complete&&(r.complete=K);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(t){}})),this.observers.push(r),o},t.prototype.unsubscribeOne=function(t){void 0!==this.observers&&void 0!==this.observers[t]&&(delete this.observers[t],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},t.prototype.forEachObserver=function(t){if(!this.finalized)for(var e=0;e<this.observers.length;e++)this.sendOne(e,t)},t.prototype.sendOne=function(t,e){var n=this;this.task.then((function(){if(void 0!==n.observers&&void 0!==n.observers[t])try{e(n.observers[t])}catch(r){"undefined"!==typeof console&&console.error&&console.error(r)}}))},t.prototype.close=function(t){var e=this;this.finalized||(this.finalized=!0,void 0!==t&&(this.finalError=t),this.task.then((function(){e.observers=void 0,e.onNoObservers=void 0})))},t}();function K(){}var G=function(t,e,n,r){var i;if(r<e?i="at least "+e:r>n&&(i=0===n?"none":"no more than "+n),i)throw new Error(t+" failed: Was called with "+r+(1===r?" argument.":" arguments.")+" Expects "+i+".")};function Q(t,e,n){var r="";switch(e){case 1:r=n?"first":"First";break;case 2:r=n?"second":"Second";break;case 3:r=n?"third":"Third";break;case 4:r=n?"fourth":"Fourth";break;default:throw new Error("errorPrefix called with argumentNumber > 4. Need to update it?")}var i=t+" failed: ";return i+=r+" argument "}function Y(t,e,n,r){if((!r||n)&&"function"!==typeof n)throw new Error(Q(t,e,r)+"must be a valid function.")}function X(t,e,n,r){if((!r||n)&&("object"!==typeof n||null===n))throw new Error(Q(t,e,r)+"must be a valid context object.")}var $=function(t){for(var e=[],n=0,r=0;r<t.length;r++){var i=t.charCodeAt(r);if(i>=55296&&i<=56319){var o=i-55296;r++,s(r<t.length,"Surrogate pair missing trail surrogate."),i=65536+(o<<10)+(t.charCodeAt(r)-56320)}i<128?e[n++]=i:i<2048?(e[n++]=i>>6|192,e[n++]=63&i|128):i<65536?(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=63&i|128):(e[n++]=i>>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=63&i|128)}return e},J=function(t){for(var e=0,n=0;n<t.length;n++){var r=t.charCodeAt(n);
2r<128?e++:r<2048?e+=2:r>=55296&&r<=56319?(e+=4,n++):e+=3}return e};function Z(t,e,n){void 0===e&&(e=1e3),void 0===n&&(n=2);var r=e*Math.pow(n,t),i=Math.round(.5*r*(Math.random()-.5)*2);return Math.min(144e5,r+i)}}).call(this,n(10))},function(t,e,n){"use strict";t.exports=n(114)},function(t,e,n){"use strict";t.exports=n(110)},function(t,e,n){"use strict";var r,i,o=n(0),a=n(1),s=n(6),u=n(5),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.b("app","Firebase",c),f="@firebase/app",h="[DEFAULT]",p=((i={})[f]="fire-core",i["@firebase/analytics"]="fire-analytics",i["@firebase/auth"]="fire-auth",i["@firebase/database"]="fire-rtdb",i["@firebase/functions"]="fire-fn",i["@firebase/installations"]="fire-iid",i["@firebase/messaging"]="fire-fcm",i["@firebase/performance"]="fire-perf",i["@firebase/remote-config"]="fire-rc",i["@firebase/storage"]="fire-gcs",i["@firebase/firestore"]="fire-fst",i["fire-js"]="fire-js",i["firebase-wrapper"]="fire-js-all",i),d=new u.b("@firebase/app"),v=function(){function t(t,e,n){var r,i,u=this;this.firebase_=n,this.isDeleted_=!1,this.name_=e.name,this.automaticDataCollectionEnabled_=e.automaticDataCollectionEnabled||!1,this.options_=Object(a.m)(t),this.container=new s.b(e.name),this._addComponent(new s.a("app",(function(){return u}),"PUBLIC"));try{for(var c=Object(o.h)(this.firebase_.INTERNAL.components.values()),l=c.next();!l.done;l=c.next()){var f=l.value;this._addComponent(f)}}catch(h){r={error:h}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}}return Object.defineProperty(t.prototype,"automaticDataCollectionEnabled",{get:function(){return this.checkDestroyed_(),this.automaticDataCollectionEnabled_},set:function(t){this.checkDestroyed_(),this.automaticDataCollectionEnabled_=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.checkDestroyed_(),this.name_},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"options",{get:function(){return this.checkDestroyed_(),this.options_},enumerable:!1,configurable:!0}),t.prototype.delete=function(){var t=this;return new Promise((function(e){t.checkDestroyed_(),e()})).then((function(){return t.firebase_.INTERNAL.removeApp(t.name_),Promise.all(t.container.getProviders().map((function(t){return t.delete()})))})).then((function(){t.isDeleted_=!0}))},t.prototype._getService=function(t,e){return void 0===e&&(e=h),this.checkDestroyed_(),this.container.getProvider(t).getImmediate({identifier:e})},t.prototype._removeServiceInstance=function(t,e){void 0===e&&(e=h),this.container.getProvider(t).clearInstance(e)},t.prototype._addComponent=function(t){try{this.container.addComponent(t)}catch(e){d.debug("Component "+t.name+" failed to register with FirebaseApp "+this.name,e)}},t.prototype._addOrOverwriteComponent=function(t){this.container.addOrOverwriteComponent(t)},t.prototype.toJSON=function(){return{name:this.name,automaticDataCollectionEnabled:this.automaticDataCollectionEnabled,options:this.options}},t.prototype.checkDestroyed_=function(){if(this.isDeleted_)throw l.create("app-deleted",{appName:this.name_})},t}();v.prototype.name&&v.prototype.options||v.prototype.delete||console.log("dc");var y=function t(){var e=function(t){var e={},n=new Map,r={__esModule:!0,initializeApp:function(n,i){void 0===i&&(i={}),"object"===typeof i&&null!==i||(i={name:i});var o=i;void 0===o.name&&(o.name=h);var s=o.name;if("string"!==typeof s||!s)throw l.create("bad-app-name",{appName:String(s)});
2if(Object(a.k)(e,s))throw l.create("duplicate-app",{appName:s});var u=new t(n,o,r);return e[s]=u,u},app:i,registerVersion:function(t,e,n){var r,i=null!==(r=p[t])&&void 0!==r?r:t;n&&(i+="-"+n);var o=i.match(/\s|\//),a=e.match(/\s|\//);if(o||a){var u=['Unable to register library "'+i+'" with version "'+e+'":'];return o&&u.push('library name "'+i+'" contains illegal characters (whitespace or "/")'),o&&a&&u.push("and"),a&&u.push('version name "'+e+'" contains illegal characters (whitespace or "/")'),void d.warn(u.join(" "))}c(new s.a(i+"-version",(function(){return{library:i,version:e}}),"VERSION"))},setLogLevel:u.c,onLog:function(t,e){if(null!==t&&"function"!==typeof t)throw l.create("invalid-log-argument",{appName:name});Object(u.d)(t,e)},apps:null,SDK_VERSION:"8.2.5",INTERNAL:{registerComponent:c,removeApp:function(t){delete e[t]},components:n,useAsService:function(t,e){return"serverAuth"===e?null:e}}};function i(t){if(t=t||h,!Object(a.k)(e,t))throw l.create("no-app",{appName:t});return e[t]}function c(s){var u,c,f=s.name;if(n.has(f))return d.debug("There were multiple attempts to register component "+f+"."),"PUBLIC"===s.type?r[f]:null;if(n.set(f,s),"PUBLIC"===s.type){var h=function(t){if(void 0===t&&(t=i()),"function"!==typeof t[f])throw l.create("invalid-app-argument",{appName:f});return t[f]()};void 0!==s.serviceProps&&Object(a.n)(h,s.serviceProps),r[f]=h,t.prototype[f]=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._getService.bind(this,f).apply(this,s.multipleInstances?t:[])}}try{for(var p=Object(o.h)(Object.keys(e)),v=p.next();!v.done;v=p.next()){var y=v.value;e[y]._addComponent(s)}}catch(g){u={error:g}}finally{try{v&&!v.done&&(c=p.return)&&c.call(p)}finally{if(u)throw u.error}}return"PUBLIC"===s.type?r[f]:null}return r.default=r,Object.defineProperty(r,"apps",{get:function(){return Object.keys(e).map((function(t){return e[t]}))}}),i.App=t,r}(v);return e.INTERNAL=Object(o.a)(Object(o.a)({},e.INTERNAL),{createFirebaseNamespace:t,extendNamespace:function(t){Object(a.n)(e,t)},createSubscribe:a.l,ErrorFactory:a.b,deepExtend:a.n}),e}(),g=function(){function t(t){this.container=t}return t.prototype.getPlatformInfoString=function(){return this.container.getProviders().map((function(t){if(function(t){var e=t.getComponent();return"VERSION"===(null===e||void 0===e?void 0:e.type)}(t)){var e=t.getImmediate();return e.library+"/"+e.version}return null})).filter((function(t){return t})).join(" ")},t}();if(Object(a.r)()&&void 0!==self.firebase){d.warn("\n Warning: Firebase is already defined in the global scope. Please make sure\n Firebase library is only loaded once.\n ");var m=self.firebase.SDK_VERSION;m&&m.indexOf("LITE")>=0&&d.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 b=y.initializeApp;y.initializeApp=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Object(a.y)()&&d.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 '),b.apply(void 0,t)};var w=y;!function(t,e){t.INTERNAL.registerComponent(new s.a("platform-logger",(function(t){return new g(t)}),"PRIVATE")),t.registerVersion(f,"0.6.14",e),t.registerVersion("fire-js","")}(w),e.a=w},function(t,e,n){"use strict";function r(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}var i;n.d(e,"a",(function(){return o}
2)),n.d(e,"b",(function(){return f})),n.d(e,"c",(function(){return h})),n.d(e,"d",(function(){return p}));var o,a=[];!function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"}(o||(o={}));var s={debug:o.DEBUG,verbose:o.VERBOSE,info:o.INFO,warn:o.WARN,error:o.ERROR,silent:o.SILENT},u=o.INFO,c=((i={})[o.DEBUG]="log",i[o.VERBOSE]="log",i[o.INFO]="info",i[o.WARN]="warn",i[o.ERROR]="error",i),l=function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];if(!(e<t.logLevel)){var o=(new Date).toISOString(),a=c[e];if(!a)throw new Error("Attempted to log a message with an invalid logType (value: "+e+")");console[a].apply(console,r(["["+o+"] "+t.name+":"],n))}},f=function(){function t(t){this.name=t,this._logLevel=u,this._logHandler=l,this._userLogHandler=null,a.push(this)}return Object.defineProperty(t.prototype,"logLevel",{get:function(){return this._logLevel},set:function(t){if(!(t in o))throw new TypeError('Invalid value "'+t+'" assigned to `logLevel`');this._logLevel=t},enumerable:!1,configurable:!0}),t.prototype.setLogLevel=function(t){this._logLevel="string"===typeof t?s[t]:t},Object.defineProperty(t.prototype,"logHandler",{get:function(){return this._logHandler},set:function(t){if("function"!==typeof t)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userLogHandler",{get:function(){return this._userLogHandler},set:function(t){this._userLogHandler=t},enumerable:!1,configurable:!0}),t.prototype.debug=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.DEBUG],t)),this._logHandler.apply(this,r([this,o.DEBUG],t))},t.prototype.log=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.VERBOSE],t)),this._logHandler.apply(this,r([this,o.VERBOSE],t))},t.prototype.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.INFO],t)),this._logHandler.apply(this,r([this,o.INFO],t))},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.WARN],t)),this._logHandler.apply(this,r([this,o.WARN],t))},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.ERROR],t)),this._logHandler.apply(this,r([this,o.ERROR],t))},t}();function h(t){a.forEach((function(e){e.setLogLevel(t)}))}function p(t,e){for(var n=function(n){var r=null;e&&e.level&&(r=s[e.level]),n.userLogHandler=null===t?null:function(e,n){for(var i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];var s=i.map((function(t){if(null==t)return null;if("string"===typeof t)return t;if("number"===typeof t||"boolean"===typeof t)return t.toString();if(t instanceof Error)return t.message;try{return JSON.stringify(t)}catch(e){return null}})).filter((function(t){return t})).join(" ");n>=(null!==r&&void 0!==r?r:e.logLevel)&&t({level:o[n].toLowerCase(),message:s,args:i,type:e.name})}},r=0,i=a;r<i.length;r++){n(i[r])}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return u})),n.d(e,"c",(function(){return s}));var r=n(0),i=n(1),o=function(){function t(t,e,n){this.name=t,this.instanceFactory=e,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY"}return t.prototype.setInstantiationMode=function(t){return this.instantiationMode=t,this},t.prototype.setMultipleInstances=function(t){return this.multipleInstances=t,this},t.prototype.setServiceProps=function(t){return this.serviceProps=t,this},t}(),a="[DEFAULT]",s=function(){function t(t,e){this.name=t,this.container=e,this.component=null,this.instances=new Map,this.instancesDeferred=new Map}return t.prototype.get=function(t){void 0===t&&(t=a);var e=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(e)){var n=new i.a;this.instancesDeferred.set(e,n);try{var r=this.getOrInitializeService(e);r&&n.resolve(r)}catch(o){}}return this.instancesDeferred.get(e).promise},t.prototype.getImmediate=function(t){var e=Object(r.a)({identifier:a,optional:!1},t),n=e.identifier,i=e.optional,o=this.normalizeInstanceIdentifier(n);try{var s=this.getOrInitializeService(o);if(!s){if(i)return null;throw Error("Service "+this.name+" is not available")}return s}catch(u){if(i)return null;throw u}},t.prototype.getComponent=function(){return this.component},t.prototype.setComponent=function(t){var e,n;if(t.name!==this.name)throw Error("Mismatching Component "+t.name+" for Provider "+this.name+".");if(this.component)throw Error("Component for "+this.name+" has already been provided");
2if(this.component=t,function(t){return"EAGER"===t.instantiationMode}(t))try{this.getOrInitializeService(a)}catch(h){}try{for(var i=Object(r.h)(this.instancesDeferred.entries()),o=i.next();!o.done;o=i.next()){var s=Object(r.e)(o.value,2),u=s[0],c=s[1],l=this.normalizeInstanceIdentifier(u);try{var f=this.getOrInitializeService(l);c.resolve(f)}catch(h){}}}catch(p){e={error:p}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}},t.prototype.clearInstance=function(t){void 0===t&&(t=a),this.instancesDeferred.delete(t),this.instances.delete(t)},t.prototype.delete=function(){return Object(r.b)(this,void 0,void 0,(function(){var t;return Object(r.d)(this,(function(e){switch(e.label){case 0:return t=Array.from(this.instances.values()),[4,Promise.all(Object(r.f)(t.filter((function(t){return"INTERNAL"in t})).map((function(t){return t.INTERNAL.delete()})),t.filter((function(t){return"_delete"in t})).map((function(t){return t._delete()}))))];case 1:return e.sent(),[2]}}))}))},t.prototype.isComponentSet=function(){return null!=this.component},t.prototype.getOrInitializeService=function(t){var e=this.instances.get(t);return!e&&this.component&&(e=this.component.instanceFactory(this.container,function(t){return t===a?void 0:t}(t)),this.instances.set(t,e)),e||null},t.prototype.normalizeInstanceIdentifier=function(t){return this.component?this.component.multipleInstances?t:a:t},t}();var u=function(){function t(t){this.name=t,this.providers=new Map}return t.prototype.addComponent=function(t){var e=this.getProvider(t.name);if(e.isComponentSet())throw new Error("Component "+t.name+" has already been registered with "+this.name);e.setComponent(t)},t.prototype.addOrOverwriteComponent=function(t){this.getProvider(t.name).isComponentSet()&&this.providers.delete(t.name),this.addComponent(t)},t.prototype.getProvider=function(t){if(this.providers.has(t))return this.providers.get(t);var e=new s(t,this);return this.providers.set(t,e),e},t.prototype.getProviders=function(){return Array.from(this.providers.values())},t}()},,function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return vc})),n.d(e,"b",(function(){return gc})),n.d(e,"c",(function(){return j})),n.d(e,"d",(function(){return cc})),n.d(e,"e",(function(){return fc})),n.d(e,"f",(function(){return lc})),n.d(e,"g",(function(){return pc})),n.d(e,"h",(function(){return Ou})),n.d(e,"i",(function(){return Tu})),n.d(e,"j",(function(){return Rs})),n.d(e,"k",(function(){return _c})),n.d(e,"l",(function(){return Ac})),n.d(e,"m",(function(){return Nc})),n.d(e,"n",(function(){return Tc})),n.d(e,"o",(function(){return Ic})),n.d(e,"p",(function(){return dc})),n.d(e,"q",(function(){return kc})),n.d(e,"r",(function(){return Sc})),n.d(e,"s",(function(){return Ec})),n.d(e,"t",(function(){return xc}));var r=n(5),i=n(1),o=n(9),a=n(0),s=function(t,e,n,r,i,o){this.t=t,this.persistenceKey=e,this.host=n,this.ssl=r,this.forceLongPolling=i,this.i=o},u=function(){function t(t,e){this.projectId=t,this.database=e||"(default)"}return Object.defineProperty(t.prototype,"o",{get:function(){return"(default)"===this.database},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(e){return e instanceof t&&e.projectId===this.projectId&&e.database===this.database},t}(),c=new r.b("@firebase/firestore");function l(){return c.logLevel}function f(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(c.logLevel<=r.a.DEBUG){var i=e.map(d);c.debug.apply(c,Object(a.g)(["Firestore (8.2.7): "+t],i))}}function h(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(c.logLevel<=r.a.ERROR){var i=e.map(d);c.error.apply(c,Object(a.g)(["Firestore (8.2.7): "+t],i))}}function p(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(c.logLevel<=r.a.WARN){var i=e.map(d);c.warn.apply(c,Object(a.g)(["Firestore (8.2.7): "+t],i))}}function d(t){if("string"==typeof t)return t;try{return e=t,JSON.stringify(e)}catch(e){return t}var e}function v(t){void 0===t&&(t="Unexpected state");var e="FIRESTORE (8.2.7) INTERNAL ASSERTION FAILED: "+t;throw h(e),new Error(e)}function y(t,e){t||v()}function g(t,e){return t}function m(t){var e="undefined"!=typeof self&&(self.crypto||self.msCrypto),n=new Uint8Array(t);if(e&&"function"==typeof e.getRandomValues)e.getRandomValues(n);else for(var r=0;r<t;
2r++)n[r]=Math.floor(256*Math.random());return n}var b=function(){function t(){}return t.u=function(){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",e=Math.floor(256/t.length)*t.length,n="";n.length<20;)for(var r=m(40),i=0;i<r.length;++i)n.length<20&&r[i]<e&&(n+=t.charAt(r[i]%t.length));return n},t}();function w(t,e){return t<e?-1:t>e?1:0}function _(t,e,n){return t.length===e.length&&t.every((function(t,r){return n(t,e[r])}))}function E(t){return t+"\0"}var T=function(){function t(t){this.h=t}return t.fromBase64String=function(e){return new t(atob(e))},t.fromUint8Array=function(e){return new t(function(t){for(var e="",n=0;n<t.length;++n)e+=String.fromCharCode(t[n]);return e}(e))},t.prototype.toBase64=function(){return t=this.h,btoa(t);var t},t.prototype.toUint8Array=function(){return function(t){for(var e=new Uint8Array(t.length),n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}(this.h)},t.prototype.l=function(){return 2*this.h.length},t.prototype._=function(t){return w(this.h,t.h)},t.prototype.isEqual=function(t){return this.h===t.h},t}();T.T=new T("");var O={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"},S=function(t){function e(e,n){var r=this;return(r=t.call(this,n)||this).code=e,r.message=n,r.name="FirebaseError",r.toString=function(){return r.name+": [code="+r.code+"]: "+r.message},r}return Object(a.c)(e,t),e}(Error),I=function(){function t(t){this.I=t}return t.fromBase64String=function(e){try{return new t(T.fromBase64String(e))}catch(e){throw new S(O.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+e)}},t.fromUint8Array=function(e){return new t(T.fromUint8Array(e))},t.prototype.toBase64=function(){return this.I.toBase64()},t.prototype.toUint8Array=function(){return this.I.toUint8Array()},t.prototype.toString=function(){return"Bytes(base64: "+this.toBase64()+")"},t.prototype.isEqual=function(t){return this.I.isEqual(t.I)},t}(),C=function(){function t(t){this.uid=t}return t.prototype.m=function(){return null!=this.uid},t.prototype.A=function(){return this.m()?"uid:"+this.uid:"anonymous-user"},t.prototype.isEqual=function(t){return t.uid===this.uid},t}();C.UNAUTHENTICATED=new C(null),C.R=new C("google-credentials-uid"),C.P=new C("first-party-uid");var k=function(t,e){this.user=e,this.type="OAuth",this.g={},this.g.Authorization="Bearer "+t},N=function(){function t(){this.V=null}return t.prototype.getToken=function(){return Promise.resolve(null)},t.prototype.p=function(){},t.prototype.v=function(t){this.V=t,t(C.UNAUTHENTICATED)},t.prototype.S=function(){this.V=null},t}(),A=function(){function t(t){var e=this;this.D=null,this.currentUser=C.UNAUTHENTICATED,this.C=!1,this.N=0,this.V=null,this.forceRefresh=!1,this.D=function(){e.N++,e.currentUser=e.$(),e.C=!0,e.V&&e.V(e.currentUser)},this.N=0,this.auth=t.getImmediate({optional:!0}),this.auth?this.auth.addAuthTokenListener(this.D):(this.D(null),t.get().then((function(t){e.auth=t,e.D&&e.auth.addAuthTokenListener(e.D)}),(function(){})))}return t.prototype.getToken=function(){var t=this,e=this.N,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then((function(n){return t.N!==e?(f("FirebaseCredentialsProvider","getToken aborted due to token change."),t.getToken()):n?(y("string"==typeof n.accessToken),new k(n.accessToken,t.currentUser)):null})):Promise.resolve(null)},t.prototype.p=function(){this.forceRefresh=!0},t.prototype.v=function(t){this.V=t,this.C&&t(this.currentUser)},t.prototype.S=function(){this.auth&&this.auth.removeAuthTokenListener(this.D),this.D=null,this.V=null},t.prototype.$=function(){var t=this.auth&&this.auth.getUid();return y(null===t||"string"==typeof t),new C(t)},t}(),x=function(){function t(t,e){this.F=t,this.O=e,this.type="FirstParty",this.user=C.P}return Object.defineProperty(t.prototype,"g",{get:function(){var t={"X-Goog-AuthUser":this.O},e=this.F.auth.getAuthHeaderValueForFirstParty([]);return e&&(t.Authorization=e),t}
2,enumerable:!1,configurable:!0}),t}(),P=function(){function t(t,e){this.F=t,this.O=e}return t.prototype.getToken=function(){return Promise.resolve(new x(this.F,this.O))},t.prototype.v=function(t){t(C.P)},t.prototype.S=function(){},t.prototype.p=function(){},t}(),R=function(){function t(t,e){var n=this;this.previousValue=t,e&&(e.k=function(t){return n.M(t)},this.L=function(t){return e.B(t)})}return t.prototype.M=function(t){return this.previousValue=Math.max(t,this.previousValue),this.previousValue},t.prototype.next=function(){var t=++this.previousValue;return this.L&&this.L(t),t},t}();R.q=-1;var j=function(){function t(t,e){if(this.seconds=t,this.nanoseconds=e,e<0)throw new S(O.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(e>=1e9)throw new S(O.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(t<-62135596800)throw new S(O.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t);if(t>=253402300800)throw new S(O.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t)}return t.now=function(){return t.fromMillis(Date.now())},t.fromDate=function(e){return t.fromMillis(e.getTime())},t.fromMillis=function(e){var n=Math.floor(e/1e3);return new t(n,1e6*(e-1e3*n))},t.prototype.toDate=function(){return new Date(this.toMillis())},t.prototype.toMillis=function(){return 1e3*this.seconds+this.nanoseconds/1e6},t.prototype.U=function(t){return this.seconds===t.seconds?w(this.nanoseconds,t.nanoseconds):w(this.seconds,t.seconds)},t.prototype.isEqual=function(t){return t.seconds===this.seconds&&t.nanoseconds===this.nanoseconds},t.prototype.toString=function(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"},t.prototype.toJSON=function(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}},t.prototype.valueOf=function(){var t=this.seconds- -62135596800;return String(t).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")},t}(),D=function(){function t(t){this.timestamp=t}return t.K=function(e){return new t(e)},t.min=function(){return new t(new j(0,0))},t.prototype._=function(t){return this.timestamp.U(t.timestamp)},t.prototype.isEqual=function(t){return this.timestamp.isEqual(t.timestamp)},t.prototype.W=function(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3},t.prototype.toString=function(){return"SnapshotVersion("+this.timestamp.toString()+")"},t.prototype.j=function(){return this.timestamp},t}(),L=function(){function t(t,e,n){void 0===e?e=0:e>t.length&&v(),void 0===n?n=t.length-e:n>t.length-e&&v(),this.segments=t,this.offset=e,this.G=n}return Object.defineProperty(t.prototype,"length",{get:function(){return this.G},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(e){return 0===t.H(this,e)},t.prototype.child=function(e){var n=this.segments.slice(this.offset,this.limit());return e instanceof t?e.forEach((function(t){n.push(t)})):n.push(e),this.J(n)},t.prototype.limit=function(){return this.offset+this.length},t.prototype.Y=function(t){return t=void 0===t?1:t,this.J(this.segments,this.offset+t,this.length-t)},t.prototype.X=function(){return this.J(this.segments,this.offset,this.length-1)},t.prototype.Z=function(){return this.segments[this.offset]},t.prototype.tt=function(){return this.get(this.length-1)},t.prototype.get=function(t){return this.segments[this.offset+t]},t.prototype.et=function(){return 0===this.length},t.prototype.nt=function(t){if(t.length<this.length)return!1;for(var e=0;e<this.length;e++)if(this.get(e)!==t.get(e))return!1;return!0},t.prototype.st=function(t){if(this.length+1!==t.length)return!1;for(var e=0;e<this.length;e++)if(this.get(e)!==t.get(e))return!1;return!0},t.prototype.forEach=function(t){for(var e=this.offset,n=this.limit();e<n;e++)t(this.segments[e])},t.prototype.it=function(){return this.segments.slice(this.offset,this.limit())},t.H=function(t,e){for(var n=Math.min(t.length,e.length),r=0;r<n;r++){var i=t.get(r),o=e.get(r);if(i<o)return-1;if(i>o)return 1}return t.length<e.length?-1:t.length>e.length?1:0},t}(),M=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.prototype.J=function(t,n,r){return new e(t,n,r)},e.prototype.rt=function(){return this.it().join("/")},e.prototype.toString=function(){return this.rt()},e.ot=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=[],i=0,o=t;i<o.length;i++){var a=o[i];if(a.indexOf("//")>=0)throw new S(O.INVALID_ARGUMENT,"Invalid segment ("+a+"). Paths must not contain // in them.");r.push.apply(r,a.split("/").filter((function(t){return t.length>0})))}return new e(r)},e.ct=function(){return new e([])},e}(L),F=/^[_a-zA-Z][_a-zA-Z0-9]*$/,U=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.prototype.J=function(t,n,r){return new e(t,n,r)},e.at=function(t){return F.test(t)},e.prototype.rt=function(){return this.it().map((function(t){return t=t.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),e.at(t)||(t="`"+t+"`"),t})).join(".")},e.prototype.toString=function(){return this.rt()},e.prototype.ut=function(){return 1===this.length&&"__name__"===this.get(0)},e.ht=function(){return new e(["__name__"])},e.lt=function(t){for(var n=[],r="",i=0,o=function(){if(0===r.length)throw new S(O.INVALID_ARGUMENT,"Invalid field path ("+t+"). Paths must not be empty, begin with '.', end with '.', or contain '..'");n.push(r),r=""},a=!1;i<t.length;){var s=t[i];if("\\"===s){if(i+1===t.length)throw new S(O.INVALID_ARGUMENT,"Path has trailing escape character: "+t);var u=t[i+1];if("\\"!==u&&"."!==u&&"`"!==u)throw new S(O.INVALID_ARGUMENT,"Path has invali
2d escape sequence: "+t);r+=u,i+=2}else"`"===s?(a=!a,i++):"."!==s||a?(r+=s,i++):(o(),i++)}if(o(),a)throw new S(O.INVALID_ARGUMENT,"Unterminated ` in path: "+t);return new e(n)},e.ct=function(){return new e([])},e}(L),V=function(){function t(t){this.path=t}return t._t=function(e){return new t(M.ot(e))},t.ft=function(e){return new t(M.ot(e).Y(5))},t.prototype.dt=function(t){return this.path.length>=2&&this.path.get(this.path.length-2)===t},t.prototype.isEqual=function(t){return null!==t&&0===M.H(this.path,t.path)},t.prototype.toString=function(){return this.path.toString()},t.H=function(t,e){return M.H(t.path,e.path)},t.wt=function(t){return t.length%2==0},t.Et=function(e){return new t(new M(e.slice()))},t}();function q(t){var e=0;for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}function B(t,e){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])}function z(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}var H=function(){function t(t){this.fields=t,t.sort(U.H)}return t.prototype.Tt=function(t){for(var e=0,n=this.fields;e<n.length;e++)if(n[e].nt(t))return!0;return!1},t.prototype.isEqual=function(t){return _(this.fields,t.fields,(function(t,e){return t.isEqual(e)}))},t}(),W=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function K(t){if(y(!!t),"string"==typeof t){var e=0,n=W.exec(t);if(y(!!n),n[1]){var r=n[1];r=(r+"000000000").substr(0,9),e=Number(r)}var i=new Date(t);return{seconds:Math.floor(i.getTime()/1e3),nanos:e}}return{seconds:G(t.seconds),nanos:G(t.nanos)}}function G(t){return"number"==typeof t?t:"string"==typeof t?Number(t):0}function Q(t){return"string"==typeof t?T.fromBase64String(t):T.fromUint8Array(t)}function Y(t){var e,n;return"server_timestamp"===(null===(n=((null===(e=null==t?void 0:t.mapValue)||void 0===e?void 0:e.fields)||{}).__type__)||void 0===n?void 0:n.stringValue)}function X(t){var e=t.mapValue.fields.__previous_value__;return Y(e)?X(e):e}function $(t){var e=K(t.mapValue.fields.__local_write_time__.timestampValue);return new j(e.seconds,e.nanos)}function J(t){return null==t}function Z(t){return 0===t&&1/t==-1/0}function tt(t){return"number"==typeof t&&Number.isInteger(t)&&!Z(t)&&t<=Number.MAX_SAFE_INTEGER&&t>=Number.MIN_SAFE_INTEGER}function et(t){return"nullValue"in t?0:"booleanValue"in t?1:"integerValue"in t||"doubleValue"in t?2:"timestampValue"in t?3:"stringValue"in t?5:"bytesValue"in t?6:"referenceValue"in t?7:"geoPointValue"in t?8:"arrayValue"in t?9:"mapValue"in t?Y(t)?4:10:v()}function nt(t,e){var n=et(t);if(n!==et(e))return!1;switch(n){case 0:return!0;case 1:return t.booleanValue===e.booleanValue;case 4:return $(t).isEqual($(e));case 3:return function(t,e){if("string"==typeof t.timestampValue&&"string"==typeof e.timestampValue&&t.timestampValue.length===e.timestampValue.length)return t.timestampValue===e.timestampValue;var n=K(t.timestampValue),r=K(e.timestampValue);return n.seconds===r.seconds&&n.nanos===r.nanos}(t,e);case 5:return t.stringValue===e.stringValue;case 6:return function(t,e){return Q(t.bytesValue).isEqual(Q(e.bytesValue))}(t,e);case 7:return t.referenceValue===e.referenceValue;case 8:return function(t,e){return G(t.geoPointValue.latitude)===G(e.geoPointValue.latitude)&&G(t.geoPointValue.longitude)===G(e.geoPointValue.longitude)}(t,e);case 2:return function(t,e){if("integerValue"in t&&"integerValue"in e)return G(t.integerValue)===G(e.integerValue);if("doubleValue"in t&&"doubleValue"in e){var n=G(t.doubleValue),r=G(e.doubleValue);return n===r?Z(n)===Z(r):isNaN(n)&&isNaN(r)}return!1}(t,e);case 9:return _(t.arrayValue.values||[],e.arrayValue.values||[],nt);case 10:return function(t,e){var n=t.mapValue.fields||{},r=e.mapValue.fields||{};if(q(n)!==q(r))return!1;for(var i in n)if(n.hasOwnProperty(i)&&(void 0===r[i]||!nt(n[i],r[i])))return!1;return!0}(t,e);default:return v()}}function rt(t,e){return void 0!==(t.values||[]).find((function(t){return nt(t,e)}))}function it(t,e){var n=et(t),r=et(e);if(n!==r)return w(n,r);switch(n){case 0:return 0;case 1:return w(t.booleanValue,e.booleanValue);case 2:return function(t,e){var n=G(t.integerValue||t.doubleValue),r=G(e.integerValue||e.doubleValue);return n<r?-1:n>r?1:n===r?0:isNaN(n)?isNaN(r)?0:-1:1}(t,e);case 3:return ot(t.timestampValue,e.timestampValue);case 4:return ot($(t),$(e));case 5:return w(t.stringValue,e.stringValue);case 6:return function(t,e){var n=Q(t),r=Q(e);return n._(r)}(t.bytesValue,e.bytesValue);case 7:return function(t,e){for(var n=t.split("/"),r=e.split("/"),i=0;i<n.length&&i<r.length;i++){var o=w(n[i],r[i]);if(0!==o)return o}return w(n.length,r.length)}(t.referenceValue,e.referenceValue);case 8:return function(t,e){var n=w(G(t.latitude),G(e.latitude));return 0!==n?n:w(G(t.longitude),G(e.longitude))}(t.geoPointValue,e.geoPointValue);case 9:return function(t,e){for(var n=t.values||[],r=e.values||[],i=0;i<n.length&&i<r.length;++i){var o=it(n[i],r[i]);if(o)return o}return w(n.length,r.length)}(t.arrayValue,e.arrayValue);case 10:return function(t,e){var n=t.fields||{},r=Object.keys(n),i=e.fields||{},o=Object.keys(i);r.sort(),o.sort();for(var a=0;a<r.length&&a<o.length;++a){var s=w(r[a],o[a]);if(0!==s)return s;var u=it(n[r[a]],i[o[a]]);if(0!==u)return u}return w(r.length,o.length)}(t.mapValue,e.mapValue);default:throw v()}}function ot(t,e){if("string"==typeof t&&"string"==typeof e&&t.length===e.length)return w(t,e);var n=K(t),r=K(e),i=w(n.seconds,r.seconds);return 0!==i?i:w(n.nanos,r.nanos)}function at(t){return st(t)}function st(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(t){var e=K(t);return"time("+e.seconds+","+e.nanos+")"}
2(t.timestampValue):"stringValue"in t?t.stringValue:"bytesValue"in t?Q(t.bytesValue).toBase64():"referenceValue"in t?(n=t.referenceValue,V.ft(n).toString()):"geoPointValue"in t?"geo("+(e=t.geoPointValue).latitude+","+e.longitude+")":"arrayValue"in t?function(t){for(var e="[",n=!0,r=0,i=t.values||[];r<i.length;r++)n?n=!1:e+=",",e+=st(i[r]);return e+"]"}(t.arrayValue):"mapValue"in t?function(t){for(var e="{",n=!0,r=0,i=Object.keys(t.fields||{}).sort();r<i.length;r++){var o=i[r];n?n=!1:e+=",",e+=o+":"+st(t.fields[o])}return e+"}"}(t.mapValue):v();var e,n}function ut(t,e){return{referenceValue:"projects/"+t.projectId+"/databases/"+t.database+"/documents/"+e.path.rt()}}function ct(t){return!!t&&"integerValue"in t}function lt(t){return!!t&&"arrayValue"in t}function ft(t){return!!t&&"nullValue"in t}function ht(t){return!!t&&"doubleValue"in t&&isNaN(Number(t.doubleValue))}function pt(t){return!!t&&"mapValue"in t}var dt=function(){function t(t){this.proto=t}return t.empty=function(){return new t({mapValue:{}})},t.prototype.field=function(t){if(t.et())return this.proto;for(var e=this.proto,n=0;n<t.length-1;++n){if(!e.mapValue.fields)return null;if(!pt(e=e.mapValue.fields[t.get(n)]))return null}return(e=(e.mapValue.fields||{})[t.tt()])||null},t.prototype.isEqual=function(t){return nt(this.proto,t.proto)},t}(),vt=function(){function t(t){void 0===t&&(t=dt.empty()),this.It=t,this.At=new Map}return t.prototype.set=function(t,e){return this.Rt(t,e),this},t.prototype.delete=function(t){return this.Rt(t,null),this},t.prototype.Rt=function(t,e){for(var n=this.At,r=0;r<t.length-1;++r){var i=t.get(r),o=n.get(i);o instanceof Map?n=o:o&&10===et(o)?(o=new Map(Object.entries(o.mapValue.fields||{})),n.set(i,o),n=o):(o=new Map,n.set(i,o),n=o)}n.set(t.tt(),e)},t.prototype.Pt=function(){var t=this.yt(U.ct(),this.At);return null!=t?new dt(t):this.It},t.prototype.yt=function(t,e){var n=this,r=!1,i=this.It.field(t),o=pt(i)?Object.assign({},i.mapValue.fields):{};return e.forEach((function(e,i){if(e instanceof Map){var a=n.yt(t.child(i),e);null!=a&&(o[i]=a,r=!0)}else null!==e?(o[i]=e,r=!0):o.hasOwnProperty(i)&&(delete o[i],r=!0)})),r?{mapValue:{fields:o}}:null},t}();function yt(t){var e=[];return B(t.fields||{},(function(t,n){var r=new U([t]);if(pt(n)){var i=yt(n.mapValue).fields;if(0===i.length)e.push(r);else for(var o=0,a=i;o<a.length;o++){var s=a[o];e.push(r.child(s))}}else e.push(r)})),new H(e)}var gt=function(t,e){this.key=t,this.version=e},mt=function(t){function e(e,n,r,i){var o=this;return(o=t.call(this,e,n)||this).gt=r,o.Vt=!!i.Vt,o.hasCommittedMutations=!!i.hasCommittedMutations,o}return Object(a.c)(e,t),e.prototype.field=function(t){return this.gt.field(t)},e.prototype.data=function(){return this.gt},e.prototype.bt=function(){return this.gt.proto},e.prototype.isEqual=function(t){return t instanceof e&&this.key.isEqual(t.key)&&this.version.isEqual(t.version)&&this.Vt===t.Vt&&this.hasCommittedMutations===t.hasCommittedMutations&&this.gt.isEqual(t.gt)},e.prototype.toString=function(){return"Document("+this.key+", "+this.version+", "+this.gt.toString()+", {hasLocalMutations: "+this.Vt+"}), {hasCommittedMutations: "+this.hasCommittedMutations+"})"},Object.defineProperty(e.prototype,"hasPendingWrites",{get:function(){return this.Vt||this.hasCommittedMutations},enumerable:!1,configurable:!0}),e}(gt),bt=function(t){function e(e,n,r){var i=this;return(i=t.call(this,e,n)||this).hasCommittedMutations=!(!r||!r.hasCommittedMutations),i}return Object(a.c)(e,t),e.prototype.toString=function(){return"NoDocument("+this.key+", "+this.version+")"},Object.defineProperty(e.prototype,"hasPendingWrites",{get:function(){return this.hasCommittedMutations},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(t){return t instanceof e&&t.hasCommittedMutations===this.hasCommittedMutations&&t.version.isEqual(this.version)&&t.key.isEqual(this.key)},e}(gt),wt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.prototype.toString=function(){return"UnknownDocument("+this.key+", "+this.version+")"},Object.defineProperty(e.prototype,"hasPendingWrites",{get:function(){return!0}
2,enumerable:!1,configurable:!0}),e.prototype.isEqual=function(t){return t instanceof e&&t.version.isEqual(this.version)&&t.key.isEqual(this.key)},e}(gt),_t=function(t,e,n,r,i,o,a){void 0===e&&(e=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=t,this.collectionGroup=e,this.orderBy=n,this.filters=r,this.limit=i,this.startAt=o,this.endAt=a,this.vt=null};function Et(t,e,n,r,i,o,a){return void 0===e&&(e=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 _t(t,e,n,r,i,o,a)}function Tt(t){var e=g(t);if(null===e.vt){var n=e.path.rt();null!==e.collectionGroup&&(n+="|cg:"+e.collectionGroup),n+="|f:",n+=e.filters.map((function(t){return function(t){return t.field.rt()+t.op.toString()+at(t.value)}(t)})).join(","),n+="|ob:",n+=e.orderBy.map((function(t){return function(t){return t.field.rt()+t.dir}(t)})).join(","),J(e.limit)||(n+="|l:",n+=e.limit),e.startAt&&(n+="|lb:",n+=Lt(e.startAt)),e.endAt&&(n+="|ub:",n+=Lt(e.endAt)),e.vt=n}return e.vt}function Ot(t,e){if(t.limit!==e.limit)return!1;if(t.orderBy.length!==e.orderBy.length)return!1;for(var n=0;n<t.orderBy.length;n++)if(!Ft(t.orderBy[n],e.orderBy[n]))return!1;if(t.filters.length!==e.filters.length)return!1;for(var r=0;r<t.filters.length;r++)if(i=t.filters[r],o=e.filters[r],i.op!==o.op||!i.field.isEqual(o.field)||!nt(i.value,o.value))return!1;var i,o;return t.collectionGroup===e.collectionGroup&&!!t.path.isEqual(e.path)&&!!Vt(t.startAt,e.startAt)&&Vt(t.endAt,e.endAt)}function St(t){return V.wt(t.path)&&null===t.collectionGroup&&0===t.filters.length}var It=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).field=e,i.op=n,i.value=r,i}return Object(a.c)(e,t),e.create=function(t,n,r){return t.ut()?"in"===n||"not-in"===n?this.St(t,n,r):new Ct(t,n,r):"array-contains"===n?new xt(t,r):"in"===n?new Pt(t,r):"not-in"===n?new Rt(t,r):"array-contains-any"===n?new jt(t,r):new e(t,n,r)},e.St=function(t,e,n){return"in"===e?new kt(t,n):new Nt(t,n)},e.prototype.matches=function(t){var e=t.field(this.field);return"!="===this.op?null!==e&&this.Dt(it(e,this.value)):null!==e&&et(this.value)===et(e)&&this.Dt(it(e,this.value))},e.prototype.Dt=function(t){switch(this.op){case"<":return t<0;case"<=":return t<=0;case"==":return 0===t;case"!=":return 0!==t;case">":return t>0;case">=":return t>=0;default:return v()}},e.prototype.Ct=function(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0},e}((function(){})),Ct=function(t){function e(e,n,r){var i=this;return(i=t.call(this,e,n,r)||this).key=V.ft(r.referenceValue),i}return Object(a.c)(e,t),e.prototype.matches=function(t){var e=V.H(t.key,this.key);return this.Dt(e)},e}(It),kt=function(t){function e(e,n){var r=this;return(r=t.call(this,e,"in",n)||this).keys=At("in",n),r}return Object(a.c)(e,t),e.prototype.matches=function(t){return this.keys.some((function(e){return e.isEqual(t.key)}))},e}(It),Nt=function(t){function e(e,n){var r=this;return(r=t.call(this,e,"not-in",n)||this).keys=At("not-in",n),r}return Object(a.c)(e,t),e.prototype.matches=function(t){return!this.keys.some((function(e){return e.isEqual(t.key)}))},e}(It);function At(t,e){var n;return((null===(n=e.arrayValue)||void 0===n?void 0:n.values)||[]).map((function(t){return V.ft(t.referenceValue)}))}var xt=function(t){function e(e,n){return t.call(this,e,"array-contains",n)||this}return Object(a.c)(e,t),e.prototype.matches=function(t){var e=t.field(this.field);return lt(e)&&rt(e.arrayValue,this.value)},e}(It),Pt=function(t){function e(e,n){return t.call(this,e,"in",n)||this}return Object(a.c)(e,t),e.prototype.matches=function(t){var e=t.field(this.field);return null!==e&&rt(this.value.arrayValue,e)},e}(It),Rt=function(t){function e(e,n){return t.call(this,e,"not-in",n)||this}return Object(a.c)(e,t),e.prototype.matches=function(t){if(rt(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;var e=t.field(this.field);return null!==e&&!rt(this.value.arrayValue,e)},e}(It),jt=function(t){function e(e,n){return t.call(this,e,"array-contains-any",n)||this}return Object(a.c)(e,t),e.prototype.matches=function(t){var e=this,n=t.field(this.field);return!(!lt(n)||!n.arrayValue.values)&&n.arrayValue.values.some((function(t){return rt(e.value.arrayValue,t)}))},e}(It),Dt=function(t,e){this.position=t,this.before=e};function Lt(t){return(t.before?"b":"a")+":"+t.position.map((function(t){return at(t)})).join(",")}var Mt=function(t,e){void 0===e&&(e="asc"),this.field=t,this.dir=e};function Ft(t,e){return t.dir===e.dir&&t.field.isEqual(e.field)}function Ut(t,e,n){for(var r=0,i=0;i<t.position.length;i++){var o=e[i],a=t.position[i];if(r=o.field.ut()?V.H(V.ft(a.referenceValue),n.key):it(a,n.field(o.field)),"desc"===o.dir&&(r*=-1),0!==r)break}return t.before?r<=0:r<0}function Vt(t,e){if(null===t)return null===e;if(null===e)return!1;if(t.before!==e.before||t.position.length!==e.position.length)return!1;for(var n=0;n<t.position.length;n++)if(!nt(t.position[n],e.position[n]))return!1;return!0}var qt=function(t,e,n,r,i,o,a,s){void 0===e&&(e=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=t,this.collectionGroup=e,this.xt=n,this.filters=r,this.limit=i,this.limitType=o,this.startAt=a,this.endAt=s,this.Nt=null,this.$t
2=null,this.startAt,this.endAt};function Bt(t,e,n,r,i,o,a,s){return new qt(t,e,n,r,i,o,a,s)}function zt(t){return new qt(t)}function Ht(t){return!J(t.limit)&&"F"===t.limitType}function Wt(t){return!J(t.limit)&&"L"===t.limitType}function Kt(t){return t.xt.length>0?t.xt[0].field:null}function Gt(t){for(var e=0,n=t.filters;e<n.length;e++){var r=n[e];if(r.Ct())return r.field}return null}function Qt(t){return null!==t.collectionGroup}function Yt(t){var e=g(t);if(null===e.Nt){e.Nt=[];var n=Gt(e),r=Kt(e);if(null!==n&&null===r)n.ut()||e.Nt.push(new Mt(n)),e.Nt.push(new Mt(U.ht(),"asc"));else{for(var i=!1,o=0,a=e.xt;o<a.length;o++){var s=a[o];e.Nt.push(s),s.field.ut()&&(i=!0)}if(!i){var u=e.xt.length>0?e.xt[e.xt.length-1].dir:"asc";e.Nt.push(new Mt(U.ht(),u))}}}return e.Nt}function Xt(t){var e=g(t);if(!e.$t)if("F"===e.limitType)e.$t=Et(e.path,e.collectionGroup,Yt(e),e.filters,e.limit,e.startAt,e.endAt);else{for(var n=[],r=0,i=Yt(e);r<i.length;r++){var o=i[r],a="desc"===o.dir?"asc":"desc";n.push(new Mt(o.field,a))}var s=e.endAt?new Dt(e.endAt.position,!e.endAt.before):null,u=e.startAt?new Dt(e.startAt.position,!e.startAt.before):null;e.$t=Et(e.path,e.collectionGroup,n,e.filters,e.limit,s,u)}return e.$t}function $t(t,e,n){return new qt(t.path,t.collectionGroup,t.xt.slice(),t.filters.slice(),e,n,t.startAt,t.endAt)}function Jt(t,e){return Ot(Xt(t),Xt(e))&&t.limitType===e.limitType}function Zt(t){return Tt(Xt(t))+"|lt:"+t.limitType}function te(t){return"Query(target="+function(t){var e=t.path.rt();return null!==t.collectionGroup&&(e+=" collectionGroup="+t.collectionGroup),t.filters.length>0&&(e+=", filters: ["+t.filters.map((function(t){return(e=t).field.rt()+" "+e.op+" "+at(e.value);var e})).join(", ")+"]"),J(t.limit)||(e+=", limit: "+t.limit),t.orderBy.length>0&&(e+=", orderBy: ["+t.orderBy.map((function(t){return function(t){return t.field.rt()+" ("+t.dir+")"}(t)})).join(", ")+"]"),t.startAt&&(e+=", startAt: "+Lt(t.startAt)),t.endAt&&(e+=", endAt: "+Lt(t.endAt)),"Target("+e+")"}(Xt(t))+"; limitType="+t.limitType+")"}function ee(t,e){return function(t,e){var n=e.key.path;return null!==t.collectionGroup?e.key.dt(t.collectionGroup)&&t.path.nt(n):V.wt(t.path)?t.path.isEqual(n):t.path.st(n)}(t,e)&&function(t,e){for(var n=0,r=t.xt;n<r.length;n++){var i=r[n];if(!i.field.ut()&&null===e.field(i.field))return!1}return!0}(t,e)&&function(t,e){for(var n=0,r=t.filters;n<r.length;n++)if(!r[n].matches(e))return!1;return!0}(t,e)&&function(t,e){return!(t.startAt&&!Ut(t.startAt,Yt(t),e))&&(!t.endAt||!Ut(t.endAt,Yt(t),e))}(t,e)}function ne(t){return function(e,n){for(var r=!1,i=0,o=Yt(t);i<o.length;i++){var a=o[i],s=re(a,e,n);if(0!==s)return s;r=r||a.field.ut()}return 0}}function re(t,e,n){var r=t.field.ut()?V.H(e.key,n.key):function(t,e,n){var r=e.field(t),i=n.field(t);return null!==r&&null!==i?it(r,i):v()}(t.field,e,n);switch(t.dir){case"asc":return r;case"desc":return-1*r;default:return v()}}var ie=function(){function t(t,e,n,r,i,o,a){void 0===i&&(i=D.min()),void 0===o&&(o=D.min()),void 0===a&&(a=T.T),this.target=t,this.targetId=e,this.Ft=n,this.sequenceNumber=r,this.Ot=i,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=a}return t.prototype.kt=function(e){return new t(this.target,this.targetId,this.Ft,e,this.Ot,this.lastLimboFreeSnapshotVersion,this.resumeToken)},t.prototype.Mt=function(e,n){return new t(this.target,this.targetId,this.Ft,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,e)},t.prototype.Lt=function(e){return new t(this.target,this.targetId,this.Ft,this.sequenceNumber,this.Ot,e,this.resumeToken)},t}();function oe(t,e){if(t.Bt){if(isNaN(e))return{doubleValue:"NaN"};if(e===1/0)return{doubleValue:"Infinity"};if(e===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:Z(e)?"-0":e}}function ae(t){return{integerValue:""+t}}function se(t,e){return tt(e)?ae(e):oe(t,e)}var ue=function(){this.qt=void 0};function ce(t,e,n){return t instanceof he?function(t,e){var n={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:t.seconds,nanos:t.nanoseconds}}}};return e&&(n.fields.__previous_value__=e),{mapValue:n}}(n,e):t instanceof pe?de(t,e):t instanceof ve?ye(t,e):function(t,e){var n=fe(t,e),r=me(n)+me(t.Ut);return ct(n)&&ct(t.Ut)?ae(r):oe(t.Qt,r)}(t,e)}function le(t,e,n){return t instanceof pe?de(t,e):t instanceof ve?ye(t,e):n}function fe(t,e){return t instanceof ge?ct(n=e)||function(t){return!!t&&"doubleValue"in t}(n)?e:{integerValue:0}:null;var n}var he=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e}(ue),pe=function(t){function e(e){var n=this;return(n=t.call(this)||this).elements=e,n}return Object(a.c)(e,t),e}(ue);function de(t,e){for(var n=be(e),r=function(t){n.some((function(e){return nt(e,t)}))||n.push(t)},i=0,o=t.elements;i<o.length;i++)r(o[i]);return{arrayValue:{values:n}}}var ve=function(t){function e(e){var n=this;return(n=t.call(this)||this).elements=e,n}return Object(a.c)(e,t),e}(ue);function ye(t,e){for(var n=be(e),r=function(t){n=n.filter((function(e){return!nt(e,t)}))},i=0,o=t.elements;i<o.length;i++)r(o[i]);return{arrayValue:{values:n}}}var ge=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).Qt=e,r.Ut=n,r}return Object(a.c)(e,t),e}(ue);function me(t){return G(t.integerValue||t.doubleValue)}function be(t){return lt(t)&&t.arrayValue.values?t.arrayValue.values.slice():[]}var we=function(t,e){this.field=t,this.transform=e},_e=function(t,e){this.version=t,this.transformResults=e},Ee=function(){function t(t,e){this.updateTime=t,this.exists=e}return t.Kt=function(){return new t},t.exists=function(e){return new t(void 0,e)},t.updateTime=function(e){return new t(e)},Object.defineProperty(t.prototype,"Wt",{get:function(){return void 0===this.updateTime&&void 0===this.exists}
2,enumerable:!1,configurable:!0}),t.prototype.isEqual=function(t){return this.exists===t.exists&&(this.updateTime?!!t.updateTime&&this.updateTime.isEqual(t.updateTime):!t.updateTime)},t}();function Te(t,e){return void 0!==t.updateTime?e instanceof mt&&e.version.isEqual(t.updateTime):void 0===t.exists||t.exists===e instanceof mt}var Oe=function(){};function Se(t,e,n){return t instanceof Ae?function(t,e,n){var r=t.value;if(n.transformResults){var i=Re(t.fieldTransforms,e,n.transformResults);r=De(t.fieldTransforms,r,i)}return new mt(t.key,n.version,r,{hasCommittedMutations:!0})}(t,e,n):t instanceof xe?function(t,e,n){if(!Te(t.jt,e))return new wt(t.key,n.version);var r=Pe(t,e,n.transformResults?Re(t.fieldTransforms,e,n.transformResults):[]);return new mt(t.key,n.version,r,{hasCommittedMutations:!0})}(t,e,n):function(t,e,n){return new bt(t.key,n.version,{hasCommittedMutations:!0})}(t,0,n)}function Ie(t,e,n){return t instanceof Ae?function(t,e,n){if(!Te(t.jt,e))return e;var r=t.value,i=je(t.fieldTransforms,n,e);r=De(t.fieldTransforms,r,i);var o=Ne(e);return new mt(t.key,o,r,{Vt:!0})}(t,e,n):t instanceof xe?function(t,e,n){if(!Te(t.jt,e))return e;var r=Ne(e),i=Pe(t,e,je(t.fieldTransforms,n,e));return new mt(t.key,r,i,{Vt:!0})}(t,e,n):function(t,e){return Te(t.jt,e)?new bt(t.key,D.min()):e}(t,e)}function Ce(t,e){return function(t,e){for(var n=null,r=0,i=t;r<i.length;r++){var o=i[r],a=e instanceof mt?e.field(o.field):void 0,s=fe(o.transform,a||null);null!=s&&(n=null==n?(new vt).set(o.field,s):n.set(o.field,s))}return n?n.Pt():null}(t.fieldTransforms,e)}function ke(t,e){return t.type===e.type&&!!t.key.isEqual(e.key)&&!!t.jt.isEqual(e.jt)&&!!function(t,e){return void 0===t&&void 0===e||!(!t||!e)&&_(t,e,(function(t,e){return function(t,e){return t.field.isEqual(e.field)&&function(t,e){return t instanceof pe&&e instanceof pe||t instanceof ve&&e instanceof ve?_(t.elements,e.elements,nt):t instanceof ge&&e instanceof ge?nt(t.Ut,e.Ut):t instanceof he&&e instanceof he}(t.transform,e.transform)}(t,e)}))}(t.fieldTransforms,e.fieldTransforms)&&(0===t.type?t.value.isEqual(e.value):1!==t.type||t.data.isEqual(e.data)&&t.Gt.isEqual(e.Gt))}function Ne(t){return t instanceof mt?t.version:D.min()}var Ae=function(t){function e(e,n,r,i){void 0===i&&(i=[]);var o=this;return(o=t.call(this)||this).key=e,o.value=n,o.jt=r,o.fieldTransforms=i,o.type=0,o}return Object(a.c)(e,t),e}(Oe),xe=function(t){function e(e,n,r,i,o){void 0===o&&(o=[]);var a=this;return(a=t.call(this)||this).key=e,a.data=n,a.Gt=r,a.jt=i,a.fieldTransforms=o,a.type=1,a}return Object(a.c)(e,t),e}(Oe);function Pe(t,e,n){var r;return r=function(t,e){var n=new vt(e);return t.Gt.fields.forEach((function(e){if(!e.et()){var r=t.data.field(e);null!==r?n.set(e,r):n.delete(e)}})),n.Pt()}(t,r=e instanceof mt?e.data():dt.empty()),De(t.fieldTransforms,r,n)}function Re(t,e,n){var r=[];y(t.length===n.length);for(var i=0;i<n.length;i++){var o=t[i],a=o.transform,s=null;e instanceof mt&&(s=e.field(o.field)),r.push(le(a,s,n[i]))}return r}function je(t,e,n){for(var r=[],i=0,o=t;i<o.length;i++){var a=o[i],s=a.transform,u=null;n instanceof mt&&(u=n.field(a.field)),r.push(ce(s,u,e))}return r}function De(t,e,n){for(var r=new vt(e),i=0;i<t.length;i++){var o=t[i];r.set(o.field,n[i])}return r.Pt()}var Le,Me,Fe=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).key=e,r.jt=n,r.type=2,r.fieldTransforms=[],r}return Object(a.c)(e,t),e}(Oe),Ue=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).key=e,r.jt=n,r.type=3,r.fieldTransforms=[],r}return Object(a.c)(e,t),e}(Oe),Ve=function(t){this.count=t};function qe(t){switch(t){case O.OK:return v();case O.CANCELLED:case O.UNKNOWN:case O.DEADLINE_EXCEEDED:case O.RESOURCE_EXHAUSTED:case O.INTERNAL:case O.UNAVAILABLE:case O.UNAUTHENTICATED:return!1;case O.INVALID_ARGUMENT:case O.NOT_FOUND:case O.ALREADY_EXISTS:case O.PERMISSION_DENIED:case O.FAILED_PRECONDITION:case O.ABORTED:case O.OUT_OF_RANGE:case O.UNIMPLEMENTED:case O.DATA_LOSS:return!0;default:return v()}}function Be(t){if(void 0===t)return h("GRPC error has no .code"),O.UNKNOWN;switch(t){case Le.OK:return O.OK;case Le.CANCELLED:return O.CANCELLED;case Le.UNKNOWN:return O.UNKNOWN;case Le.DEADLINE_EXCEEDED:return O.DEADLINE_EXCEEDED;case Le.RESOURCE_EXHAUSTED:return O.RESOURCE_EXHAUSTED;case Le.INTERNAL:return O.INTERNAL;case Le.UNAVAILABLE:return O.UNAVAILABLE;case Le.UNAUTHENTICATED:return O.UNAUTHENTICATED;case Le.INVALID_ARGUMENT:return O.INVALID_ARGUMENT;case Le.NOT_FOUND:return O.NOT_FOUND;case Le.ALREADY_EXISTS:return O.ALREADY_EXISTS;case Le.PERMISSION_DENIED:return O.PERMISSION_DENIED;case Le.FAILED_PRECONDITION:return O.FAILED_PRECONDITION;case Le.ABORTED:return O.ABORTED;case Le.OUT_OF_RANGE:return O.OUT_OF_RANGE;
2case Le.UNIMPLEMENTED:return O.UNIMPLEMENTED;case Le.DATA_LOSS:return O.DATA_LOSS;default:return v()}}(Me=Le||(Le={}))[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.UNIMPLEMENTED=12]="UNIMPLEMENTED",Me[Me.INTERNAL=13]="INTERNAL",Me[Me.UNAVAILABLE=14]="UNAVAILABLE",Me[Me.DATA_LOSS=15]="DATA_LOSS";var ze=function(){function t(t,e){this.H=t,this.root=e||We.EMPTY}return t.prototype.zt=function(e,n){return new t(this.H,this.root.zt(e,n,this.H).copy(null,null,We.Ht,null,null))},t.prototype.remove=function(e){return new t(this.H,this.root.remove(e,this.H).copy(null,null,We.Ht,null,null))},t.prototype.get=function(t){for(var e=this.root;!e.et();){var n=this.H(t,e.key);if(0===n)return e.value;n<0?e=e.left:n>0&&(e=e.right)}return null},t.prototype.indexOf=function(t){for(var e=0,n=this.root;!n.et();){var r=this.H(t,n.key);if(0===r)return e+n.left.size;r<0?n=n.left:(e+=n.left.size+1,n=n.right)}return-1},t.prototype.et=function(){return this.root.et()},Object.defineProperty(t.prototype,"size",{get:function(){return this.root.size},enumerable:!1,configurable:!0}),t.prototype.Jt=function(){return this.root.Jt()},t.prototype.Yt=function(){return this.root.Yt()},t.prototype.Xt=function(t){return this.root.Xt(t)},t.prototype.forEach=function(t){this.Xt((function(e,n){return t(e,n),!1}))},t.prototype.toString=function(){var t=[];return this.Xt((function(e,n){return t.push(e+":"+n),!1})),"{"+t.join(", ")+"}"},t.prototype.Zt=function(t){return this.root.Zt(t)},t.prototype.te=function(){return new He(this.root,null,this.H,!1)},t.prototype.ee=function(t){return new He(this.root,t,this.H,!1)},t.prototype.ne=function(){return new He(this.root,null,this.H,!0)},t.prototype.se=function(t){return new He(this.root,t,this.H,!0)},t}(),He=function(){function t(t,e,n,r){this.ie=r,this.re=[];for(var i=1;!t.et();)if(i=e?n(t.key,e):1,r&&(i*=-1),i<0)t=this.ie?t.left:t.right;else{if(0===i){this.re.push(t);break}this.re.push(t),t=this.ie?t.right:t.left}}return t.prototype.oe=function(){var t=this.re.pop(),e={key:t.key,value:t.value};if(this.ie)for(t=t.left;!t.et();)this.re.push(t),t=t.right;else for(t=t.right;!t.et();)this.re.push(t),t=t.left;return e},t.prototype.ce=function(){return this.re.length>0},t.prototype.ae=function(){if(0===this.re.length)return null;var t=this.re[this.re.length-1];return{key:t.key,value:t.value}},t}(),We=function(){function t(e,n,r,i,o){this.key=e,this.value=n,this.color=null!=r?r:t.RED,this.left=null!=i?i:t.EMPTY,this.right=null!=o?o:t.EMPTY,this.size=this.left.size+1+this.right.size}return t.prototype.copy=function(e,n,r,i,o){return new t(null!=e?e:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=i?i:this.left,null!=o?o:this.right)},t.prototype.et=function(){return!1},t.prototype.Xt=function(t){return this.left.Xt(t)||t(this.key,this.value)||this.right.Xt(t)},t.prototype.Zt=function(t){return this.right.Zt(t)||t(this.key,this.value)||this.left.Zt(t)},t.prototype.min=function(){return this.left.et()?this:this.left.min()},t.prototype.Jt=function(){return this.min().key},t.prototype.Yt=function(){return this.right.et()?this.key:this.right.Yt()},t.prototype.zt=function(t,e,n){var r=this,i=n(t,r.key);return(r=i<0?r.copy(null,null,null,r.left.zt(t,e,n),null):0===i?r.copy(null,e,null,null,null):r.copy(null,null,null,null,r.right.zt(t,e,n))).ue()},t.prototype.he=function(){if(this.left.et())return t.EMPTY;var e=this;return e.left.le()||e.left.left.le()||(e=e._e()),(e=e.copy(null,null,null,e.left.he(),null)).ue()},t.prototype.remove=function(e,n){var r,i=this;if(n(e,i.key)<0)i.left.et()||i.left.le()||i.left.left.le()||(i=i._e()),i=i.copy(null,null,null,i.left.remove(e,n),null);else{if(i.left.le()&&(i=i.fe()),i.right.et()||i.right.le()||i.right.left.le()||(i=i.de()),0===n(e,i.key)){if(i.right.et())return t.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.he())}i=i.copy(null,null,null,null,i.right.remove(e,n))}return i.ue()},t.prototype.le=function(){return this.color},t.prototype.ue=function(){var t=this;return t.right.le()&&!t.left.le()&&(t=t.we()),t.left.le()&&t.left.left.le()&&(t=t.fe()),t.left.le()&&t.right.le()&&(t=t.Ee()),t},t.prototype._e=function(){var t=this.Ee();return t.right.left.le()&&(t=(t=(t=t.copy(null,null,null,null,t.right.fe())).we()).Ee()),t},t.prototype.de=function(){var t=this.Ee();
2return t.left.left.le()&&(t=(t=t.fe()).Ee()),t},t.prototype.we=function(){var e=this.copy(null,null,t.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)},t.prototype.fe=function(){var e=this.copy(null,null,t.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)},t.prototype.Ee=function(){var t=this.left.copy(null,null,!this.left.color,null,null),e=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,e)},t.prototype.Te=function(){var t=this.Ie();return Math.pow(2,t)<=this.size+1},t.prototype.Ie=function(){if(this.le()&&this.left.le())throw v();if(this.right.le())throw v();var t=this.left.Ie();if(t!==this.right.Ie())throw v();return t+(this.le()?0:1)},t}();We.EMPTY=null,We.RED=!0,We.Ht=!1,We.EMPTY=new(function(){function t(){this.size=0}return Object.defineProperty(t.prototype,"key",{get:function(){throw v()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){throw v()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){throw v()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){throw v()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){throw v()},enumerable:!1,configurable:!0}),t.prototype.copy=function(t,e,n,r,i){return this},t.prototype.zt=function(t,e,n){return new We(t,e)},t.prototype.remove=function(t,e){return this},t.prototype.et=function(){return!0},t.prototype.Xt=function(t){return!1},t.prototype.Zt=function(t){return!1},t.prototype.Jt=function(){return null},t.prototype.Yt=function(){return null},t.prototype.le=function(){return!1},t.prototype.Te=function(){return!0},t.prototype.Ie=function(){return 0},t}());var Ke=function(){function t(t){this.H=t,this.data=new ze(this.H)}return t.prototype.has=function(t){return null!==this.data.get(t)},t.prototype.first=function(){return this.data.Jt()},t.prototype.last=function(){return this.data.Yt()},Object.defineProperty(t.prototype,"size",{get:function(){return this.data.size},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){return this.data.indexOf(t)},t.prototype.forEach=function(t){this.data.Xt((function(e,n){return t(e),!1}))},t.prototype.me=function(t,e){for(var n=this.data.ee(t[0]);n.ce();){var r=n.oe();if(this.H(r.key,t[1])>=0)return;e(r.key)}},t.prototype.Ae=function(t,e){var n;for(n=void 0!==e?this.data.ee(e):this.data.te();n.ce();)if(!t(n.oe().key))return},t.prototype.Re=function(t){var e=this.data.ee(t);return e.ce()?e.oe().key:null},t.prototype.te=function(){return new Ge(this.data.te())},t.prototype.ee=function(t){return new Ge(this.data.ee(t))},t.prototype.add=function(t){return this.copy(this.data.remove(t).zt(t,!0))},t.prototype.delete=function(t){return this.has(t)?this.copy(this.data.remove(t)):this},t.prototype.et=function(){return this.data.et()},t.prototype.Pe=function(t){var e=this;return e.size<t.size&&(e=t,t=this),t.forEach((function(t){e=e.add(t)})),e},t.prototype.isEqual=function(e){if(!(e instanceof t))return!1;if(this.size!==e.size)return!1;for(var n=this.data.te(),r=e.data.te();n.ce();){var i=n.oe().key,o=r.oe().key;if(0!==this.H(i,o))return!1}return!0},t.prototype.it=function(){var t=[];return this.forEach((function(e){t.push(e)})),t},t.prototype.toString=function(){var t=[];return this.forEach((function(e){return t.push(e)})),"SortedSet("+t.toString()+")"},t.prototype.copy=function(e){var n=new t(this.H);return n.data=e,n},t}(),Ge=function(){function t(t){this.ye=t}return t.prototype.oe=function(){return this.ye.oe().key},t.prototype.ce=function(){return this.ye.ce()},t}(),Qe=new ze(V.H);function Ye(){return Qe}function Xe(){return Ye()}var $e=new ze(V.H);function Je(){return $e}var Ze=new ze(V.H);function tn(){return Ze}var en=new Ke(V.H);function nn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=en,r=0,i=t;r<i.length;r++){var o=i[r];n=n.add(o)}return n}var rn=new Ke(w);function on(){return rn}var an=function(){function t(t){this.H=t?function(e,n){return t(e,n)||V.H(e.key,n.key)}:function(t,e){return V.H(t.key,e.key)},this.ge=Je(),this.Ve=new ze(this.H)}return t.pe=function(e){return new t(e.H)},t.prototype.has=function(t){return null!=this.ge.get(t)},t.prototype.get=function(t){return this.ge.get(t)},t.prototype.first=function(){return this.Ve.Jt()},t.prototype.last=function(){return this.Ve.Yt()},t.prototype.et=function(){return this.Ve.et()},t.prototype.indexOf=function(t){var e=this.ge.get(t);return e?this.Ve.indexOf(e):-1},Object.defineProperty(t.prototype,"size",{get:function(){return this.Ve.size}
2,enumerable:!1,configurable:!0}),t.prototype.forEach=function(t){this.Ve.Xt((function(e,n){return t(e),!1}))},t.prototype.add=function(t){var e=this.delete(t.key);return e.copy(e.ge.zt(t.key,t),e.Ve.zt(t,null))},t.prototype.delete=function(t){var e=this.get(t);return e?this.copy(this.ge.remove(t),this.Ve.remove(e)):this},t.prototype.isEqual=function(e){if(!(e instanceof t))return!1;if(this.size!==e.size)return!1;for(var n=this.Ve.te(),r=e.Ve.te();n.ce();){var i=n.oe().key,o=r.oe().key;if(!i.isEqual(o))return!1}return!0},t.prototype.toString=function(){var t=[];return this.forEach((function(e){t.push(e.toString())})),0===t.length?"DocumentSet ()":"DocumentSet (\n "+t.join(" \n")+"\n)"},t.prototype.copy=function(e,n){var r=new t;return r.H=this.H,r.ge=e,r.Ve=n,r},t}(),sn=function(){function t(){this.be=new ze(V.H)}return t.prototype.track=function(t){var e=t.doc.key,n=this.be.get(e);n?0!==t.type&&3===n.type?this.be=this.be.zt(e,t):3===t.type&&1!==n.type?this.be=this.be.zt(e,{type:n.type,doc:t.doc}):2===t.type&&2===n.type?this.be=this.be.zt(e,{type:2,doc:t.doc}):2===t.type&&0===n.type?this.be=this.be.zt(e,{type:0,doc:t.doc}):1===t.type&&0===n.type?this.be=this.be.remove(e):1===t.type&&2===n.type?this.be=this.be.zt(e,{type:1,doc:n.doc}):0===t.type&&1===n.type?this.be=this.be.zt(e,{type:2,doc:t.doc}):v():this.be=this.be.zt(e,t)},t.prototype.ve=function(){var t=[];return this.be.Xt((function(e,n){t.push(n)})),t},t}(),un=function(){function t(t,e,n,r,i,o,a,s){this.query=t,this.docs=e,this.Se=n,this.docChanges=r,this.De=i,this.fromCache=o,this.Ce=a,this.xe=s}return t.Ne=function(e,n,r,i){var o=[];return n.forEach((function(t){o.push({type:0,doc:t})})),new t(e,n,an.pe(n),o,r,i,!0,!1)},Object.defineProperty(t.prototype,"hasPendingWrites",{get:function(){return!this.De.et()},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(t){if(!(this.fromCache===t.fromCache&&this.Ce===t.Ce&&this.De.isEqual(t.De)&&Jt(this.query,t.query)&&this.docs.isEqual(t.docs)&&this.Se.isEqual(t.Se)))return!1;var e=this.docChanges,n=t.docChanges;if(e.length!==n.length)return!1;for(var r=0;r<e.length;r++)if(e[r].type!==n[r].type||!e[r].doc.isEqual(n[r].doc))return!1;return!0},t}(),cn=function(){function t(t,e,n,r,i){this.Ot=t,this.$e=e,this.Fe=n,this.Oe=r,this.ke=i}return t.Me=function(e,n){var r=new Map;return r.set(e,ln.Le(e,n)),new t(D.min(),r,on(),Ye(),nn())},t}(),ln=function(){function t(t,e,n,r,i){this.resumeToken=t,this.Be=e,this.qe=n,this.Ue=r,this.Qe=i}return t.Le=function(e,n){return new t(T.T,n,nn(),nn(),nn())},t}(),fn=function(t,e,n,r){this.Ke=t,this.removedTargetIds=e,this.key=n,this.We=r},hn=function(t,e){this.targetId=t,this.je=e},pn=function(t,e,n,r){void 0===n&&(n=T.T),void 0===r&&(r=null),this.state=t,this.targetIds=e,this.resumeToken=n,this.cause=r},dn=function(){function t(){this.Ge=0,this.ze=gn(),this.He=T.T,this.Je=!1,this.Ye=!0}return Object.defineProperty(t.prototype,"Be",{get:function(){return this.Je},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"resumeToken",{get:function(){return this.He},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Xe",{get:function(){return 0!==this.Ge},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Ze",{get:function(){return this.Ye},enumerable:!1,configurable:!0}),t.prototype.tn=function(t){t.l()>0&&(this.Ye=!0,this.He=t)},t.prototype.en=function(){var t=nn(),e=nn(),n=nn();return this.ze.forEach((function(r,i){switch(i){case 0:t=t.add(r);break;case 2:e=e.add(r);break;case 1:n=n.add(r);break;default:v()}})),new ln(this.He,this.Je,t,e,n)},t.prototype.nn=function(){this.Ye=!1,this.ze=gn()},t.prototype.sn=function(t,e){this.Ye=!0,this.ze=this.ze.zt(t,e)},t.prototype.rn=function(t){this.Ye=!0,this.ze=this.ze.remove(t)},t.prototype.on=function(){this.Ge+=1},t.prototype.cn=function(){this.Ge-=1},t.prototype.an=function(){this.Ye=!0,this.Je=!0},t}(),vn=function(){function t(t){this.un=t,this.hn=new Map,this.ln=Ye(),this._n=yn(),this.fn=new Ke(w)}return t.prototype.dn=function(t){for(var e=0,n=t.Ke;e<n.length;e++){var r=n[e];t.We instanceof mt?this.wn(r,t.We):t.We instanceof bt&&this.En(r,t.key,t.We)}for(var i=0,o=t.removedTargetIds;i<o.length;i++)r=o[i],this.En(r,t.key,t.We)},t.prototype.Tn=function(t){var e=this;this.In(t,(function(n){var r=e.mn(n);switch(t.state){case 0:e.An(n)&&r.tn(t.resumeToken);break;case 1:r.cn(),r.Xe||r.nn(),r.tn(t.resumeToken);break;case 2:r.cn(),r.Xe||e.removeTarget(n);break;case 3:e.An(n)&&(r.an(),r.tn(t.resumeToken));break;case 4:e.An(n)&&(e.Rn(n),r.tn(t.resumeToken));break;default:v()}}))},t.prototype.In=function(t,e){var n=this;t.targetIds.length>0?t.targetIds.forEach(e):this.hn.forEach((function(t,r){n.An(r)&&e(r)}))},t.prototype.Pn=function(t){var e=t.targetId,n=t.je.count,r=this.yn(e);if(r){var i=r.target;if(St(i))if(0===n){var o=new V(i.path);this.En(e,o,new bt(o,D.min()))}else y(1===n);else this.gn(e)!==n&&(this.Rn(e),this.fn=this.fn.add(e))}},t.prototype.Vn=function(t){var e=this,n=new Map;this.hn.forEach((function(r,i){var o=e.yn(i);if(o){if(r.Be&&St(o.target)){var a=new V(o.target.path);null!==e.ln.get(a)||e.pn(i,a)||e.En(i,a,new bt(a,t))}r.Ze&&(n.set(i,r.en()),r.nn())}}));var r=nn();
2this._n.forEach((function(t,n){var i=!0;n.Ae((function(t){var n=e.yn(t);return!n||2===n.Ft||(i=!1,!1)})),i&&(r=r.add(t))}));var i=new cn(t,n,this.fn,this.ln,r);return this.ln=Ye(),this._n=yn(),this.fn=new Ke(w),i},t.prototype.wn=function(t,e){if(this.An(t)){var n=this.pn(t,e.key)?2:0;this.mn(t).sn(e.key,n),this.ln=this.ln.zt(e.key,e),this._n=this._n.zt(e.key,this.bn(e.key).add(t))}},t.prototype.En=function(t,e,n){if(this.An(t)){var r=this.mn(t);this.pn(t,e)?r.sn(e,1):r.rn(e),this._n=this._n.zt(e,this.bn(e).delete(t)),n&&(this.ln=this.ln.zt(e,n))}},t.prototype.removeTarget=function(t){this.hn.delete(t)},t.prototype.gn=function(t){var e=this.mn(t).en();return this.un.vn(t).size+e.qe.size-e.Qe.size},t.prototype.on=function(t){this.mn(t).on()},t.prototype.mn=function(t){var e=this.hn.get(t);return e||(e=new dn,this.hn.set(t,e)),e},t.prototype.bn=function(t){var e=this._n.get(t);return e||(e=new Ke(w),this._n=this._n.zt(t,e)),e},t.prototype.An=function(t){var e=null!==this.yn(t);return e||f("WatchChangeAggregator","Detected inactive target",t),e},t.prototype.yn=function(t){var e=this.hn.get(t);return e&&e.Xe?null:this.un.Sn(t)},t.prototype.Rn=function(t){var e=this;this.hn.set(t,new dn),this.un.vn(t).forEach((function(n){e.En(t,n,null)}))},t.prototype.pn=function(t,e){return this.un.vn(t).has(e)},t}();function yn(){return new ze(V.H)}function gn(){return new ze(V.H)}var mn={asc:"ASCENDING",desc:"DESCENDING"},bn={"<":"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"},wn=function(t,e){this.t=t,this.Bt=e};function _n(t,e){return t.Bt?new Date(1e3*e.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")+"."+("000000000"+e.nanoseconds).slice(-9)+"Z":{seconds:""+e.seconds,nanos:e.nanoseconds}}function En(t,e){return t.Bt?e.toBase64():e.toUint8Array()}function Tn(t,e){return _n(t,e.j())}function On(t){return y(!!t),D.K(function(t){var e=K(t);return new j(e.seconds,e.nanos)}(t))}function Sn(t,e){return function(t){return new M(["projects",t.projectId,"databases",t.database])}(t).child("documents").child(e).rt()}function In(t){var e=M.ot(t);return y(Xn(e)),e}function Cn(t,e){return Sn(t.t,e.path)}function kn(t,e){var n=In(e);if(n.get(1)!==t.t.projectId)throw new S(O.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+t.t.projectId);if(n.get(3)!==t.t.database)throw new S(O.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+t.t.database);return new V(Pn(n))}function Nn(t,e){return Sn(t.t,e)}function An(t){var e=In(t);return 4===e.length?M.ct():Pn(e)}function xn(t){return new M(["projects",t.t.projectId,"databases",t.t.database]).rt()}function Pn(t){return y(t.length>4&&"documents"===t.get(4)),t.Y(5)}function Rn(t,e,n){return{name:Cn(t,e),fields:n.proto.mapValue.fields}}function jn(t,e,n){var r=kn(t,e.name),i=On(e.updateTime),o=new dt({mapValue:{fields:e.fields}});return new mt(r,i,o,{hasCommittedMutations:!!n})}function Dn(t,e){var n;if(e instanceof Ae)n={update:Rn(t,e.key,e.value)};else if(e instanceof Fe)n={delete:Cn(t,e.key)};else if(e instanceof xe)n={update:Rn(t,e.key,e.data),updateMask:Yn(e.Gt)};else{if(!(e instanceof Ue))return v();n={verify:Cn(t,e.key)}}return e.fieldTransforms.length>0&&(n.updateTransforms=e.fieldTransforms.map((function(t){return function(t,e){var n=e.transform;if(n instanceof he)return{fieldPath:e.field.rt(),setToServerValue:"REQUEST_TIME"};if(n instanceof pe)return{fieldPath:e.field.rt(),appendMissingElements:{values:n.elements}};if(n instanceof ve)return{fieldPath:e.field.rt(),removeAllFromArray:{values:n.elements}};if(n instanceof ge)return{fieldPath:e.field.rt(),increment:n.Ut};throw v()}(0,t)}))),e.jt.Wt||(n.currentDocument=function(t,e){return void 0!==e.updateTime?{updateTime:Tn(t,e.updateTime)}:void 0!==e.exists?{exists:e.exists}:v()}(t,e.jt)),n}function Ln(t,e){var n=e.currentDocument?function(t){return void 0!==t.updateTime?Ee.updateTime(On(t.updateTime)):void 0!==t.exists?Ee.exists(t.exists):Ee.Kt()}(e.currentDocument):Ee.Kt(),r=e.updateTransforms?e.updateTransforms.map((function(e){return function(t,e){var n=null;if("setToServerValue"in e)y("REQUEST_TIME"===e.setToServerValue),n=new he;else if("appendMissingElements"in e){var r=e.appendMissingElements.values||[];n=new pe(r)}else if("removeAllFromArray"in e){var i=e.removeAllFromArray.values||[];n=new ve(i)}else"increment"in e?n=new ge(t,e.increment):v();var o=U.lt(e.fieldPath);return new we(o,n)}(t,e)})):[];if(e.update){e.update.name;var i=kn(t,e.update.name),o=new dt({mapValue:{fields:e.update.fields}});if(e.updateMask){var a=function(t){var e=t.fieldPaths||[];return new H(e.map((function(t){return U.lt(t)})))}(e.updateMask);return new xe(i,o,a,n,r)}return new Ae(i,o,n,r)}if(e.delete){var s=kn(t,e.delete);return new Fe(s,n)}if(e.verify){var u=kn(t,e.verify);return new Ue(u,n)}return v()}function Mn(t,e){return{documents:[Nn(t,e.path)]}}function Fn(t,e){var n={structuredQuery:{}},r=e.path;null!==e.collectionGroup?(n.parent=Nn(t,r),n.structuredQuery.from=[{collectionId:e.collectionGroup,allDescendants:!0}]):(n.parent=Nn(t,r.X()),n.structuredQuery.from=[{collectionId:r.tt()}]);var i=function(t){if(0!==t.length){var e=t.map((function(t){return function(t){if("=="===t.op){if(ht(t.value))return{unaryFilter:{field:Wn(t.field),op:"IS_NAN"}};if(ft(t.value))return{unaryFilter:{field:Wn(t.field),op:"IS_NULL"}}}else if("!="===t.op){if(ht(t.value))return{unaryFilter:{field:Wn(t.field),op:"IS_NOT_NA
2N"}};if(ft(t.value))return{unaryFilter:{field:Wn(t.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:Wn(t.field),op:Hn(t.op),value:t.value}}}(t)}));return 1===e.length?e[0]:{compositeFilter:{op:"AND",filters:e}}}}(e.filters);i&&(n.structuredQuery.where=i);var o=function(t){if(0!==t.length)return t.map((function(t){return function(t){return{field:Wn(t.field),direction:zn(t.dir)}}(t)}))}(e.orderBy);o&&(n.structuredQuery.orderBy=o);var a=function(t,e){return t.Bt||J(e)?e:{value:e}}(t,e.limit);return null!==a&&(n.structuredQuery.limit=a),e.startAt&&(n.structuredQuery.startAt=qn(e.startAt)),e.endAt&&(n.structuredQuery.endAt=qn(e.endAt)),n}function Un(t){var e=An(t.parent),n=t.structuredQuery,r=n.from?n.from.length:0,i=null;if(r>0){y(1===r);var o=n.from[0];o.allDescendants?i=o.collectionId:e=e.child(o.collectionId)}var a=[];n.where&&(a=Vn(n.where));var s=[];n.orderBy&&(s=n.orderBy.map((function(t){return function(t){return new Mt(Kn(t.field),function(t){switch(t){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(t.direction))}(t)})));var u=null;n.limit&&(u=function(t){var e;return J(e="object"==typeof t?t.value:t)?null:e}(n.limit));var c=null;n.startAt&&(c=Bn(n.startAt));var l=null;return n.endAt&&(l=Bn(n.endAt)),Bt(e,i,s,a,u,"F",c,l)}function Vn(t){return t?void 0!==t.unaryFilter?[Qn(t)]:void 0!==t.fieldFilter?[Gn(t)]:void 0!==t.compositeFilter?t.compositeFilter.filters.map((function(t){return Vn(t)})).reduce((function(t,e){return t.concat(e)})):v():[]}function qn(t){return{before:t.before,values:t.position}}function Bn(t){var e=!!t.before,n=t.values||[];return new Dt(n,e)}function zn(t){return mn[t]}function Hn(t){return bn[t]}function Wn(t){return{fieldPath:t.rt()}}function Kn(t){return U.lt(t.fieldPath)}function Gn(t){return It.create(Kn(t.fieldFilter.field),function(t){switch(t){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 v()}}(t.fieldFilter.op),t.fieldFilter.value)}function Qn(t){switch(t.unaryFilter.op){case"IS_NAN":var e=Kn(t.unaryFilter.field);return It.create(e,"==",{doubleValue:NaN});case"IS_NULL":var n=Kn(t.unaryFilter.field);return It.create(n,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":var r=Kn(t.unaryFilter.field);return It.create(r,"!=",{doubleValue:NaN});case"IS_NOT_NULL":var i=Kn(t.unaryFilter.field);return It.create(i,"!=",{nullValue:"NULL_VALUE"});case"OPERATOR_UNSPECIFIED":default:return v()}}function Yn(t){var e=[];return t.fields.forEach((function(t){return e.push(t.rt())})),{fieldPaths:e}}function Xn(t){return t.length>=4&&"projects"===t.get(0)&&"databases"===t.get(2)}var $n=function(){var t=this;this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))},Jn=function(){function t(t){var e=this;this.Dn=null,this.Cn=null,this.result=void 0,this.error=void 0,this.xn=!1,this.Nn=!1,t((function(t){e.xn=!0,e.result=t,e.Dn&&e.Dn(t)}),(function(t){e.xn=!0,e.error=t,e.Cn&&e.Cn(t)}))}return t.prototype.catch=function(t){return this.next(void 0,t)},t.prototype.next=function(e,n){var r=this;return this.Nn&&v(),this.Nn=!0,this.xn?this.error?this.$n(n,this.error):this.Fn(e,this.result):new t((function(t,i){r.Dn=function(n){r.Fn(e,n).next(t,i)},r.Cn=function(e){r.$n(n,e).next(t,i)}}))},t.prototype.On=function(){var t=this;return new Promise((function(e,n){t.next(e,n)}))},t.prototype.kn=function(e){try{var n=e();return n instanceof t?n:t.resolve(n)}catch(e){return t.reject(e)}},t.prototype.Fn=function(e,n){return e?this.kn((function(){return e(n)})):t.resolve(n)},t.prototype.$n=function(e,n){return e?this.kn((function(){return e(n)})):t.reject(n)},t.resolve=function(e){return new t((function(t,n){t(e)}))},t.reject=function(e){return new t((function(t,n){n(e)}))},t.Mn=function(e){return new t((function(t,n){var r=0,i=0,o=!1;e.forEach((function(e){++r,e.next((function(){++i,o&&i===r&&t()}),(function(t){return n(t)}))})),o=!0,i===r&&t()}))},t.Ln=function(e){for(var n=t.resolve(!1),r=function(e){n=n.next((function(n){return n?t.resolve(n):e()}))},i=0,o=e;i<o.length;i++)r(o[i]);return n},t.forEach=function(t,e){var n=this,r=[];return t.forEach((function(t,i){r.push(e.call(n,t,i))})),this.Mn(r)},t}(),Zn=function(){function t(t,e){var n=this;this.action=t,this.transaction=e,this.aborted=!1,this.Bn=new $n,this.transaction.oncomplete=function(){n.Bn.resolve()},this.transaction.onabort=function(){e.error?n.Bn.reject(new nr(t,e.error)):n.Bn.resolve()},this.transaction.onerror=function(e){var r=sr(e.target.error);n.Bn.reject(new nr(t,r))}}return t.open=function(e,n,r,i){try{return new t(n,e.transaction(i,r))}catch(e){throw new nr(n,e)}},Object.defineProperty(t.prototype,"qn",{get:function(){return this.Bn.promise}
2,enumerable:!1,configurable:!0}),t.prototype.abort=function(t){t&&this.Bn.reject(t),this.aborted||(f("SimpleDb","Aborting transaction:",t?t.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())},t.prototype.store=function(t){var e=this.transaction.objectStore(t);return new ir(e)},t}(),tr=function(){function e(t,n,r){this.name=t,this.version=n,this.Un=r,12.2===e.Qn(Object(i.p)())&&h("Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.")}return e.delete=function(t){return f("SimpleDb","Removing database:",t),or(window.indexedDB.deleteDatabase(t)).On()},e.Kn=function(){if("undefined"==typeof indexedDB)return!1;if(e.Wn())return!0;var t=Object(i.p)(),n=e.Qn(t),r=0<n&&n<10,o=e.jn(t),a=0<o&&o<4.5;return!(t.indexOf("MSIE ")>0||t.indexOf("Trident/")>0||t.indexOf("Edge/")>0||r||a)},e.Wn=function(){var e;return"undefined"!=typeof t&&"YES"===(null===(e=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}))||void 0===e?void 0:e.Gn)},e.zn=function(t,e){return t.store(e)},e.Qn=function(t){var e=t.match(/i(?:phone|pad|pod) os ([\d_]+)/i),n=e?e[1].split("_").slice(0,2).join("."):"-1";return Number(n)},e.jn=function(t){var e=t.match(/Android ([\d.]+)/i),n=e?e[1].split(".").slice(0,2).join("."):"-1";return Number(n)},e.prototype.Hn=function(t){return Object(a.b)(this,void 0,void 0,(function(){var e,n=this;return Object(a.d)(this,(function(r){switch(r.label){case 0:return this.db?[3,2]:(f("SimpleDb","Opening database:",this.name),e=this,[4,new Promise((function(e,r){var i=indexedDB.open(n.name,n.version);i.onsuccess=function(t){var n=t.target.result;e(n)},i.onblocked=function(){r(new nr(t,"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},i.onerror=function(e){var n=e.target.error;"VersionError"===n.name?r(new S(O.FAILED_PRECONDITION,"A newer version of the Firestore SDK was previously used and so the persisted data is not compatible with the version of the SDK you are now using. The SDK will operate with persistence disabled. If you need persistence, please re-upgrade to a newer version of the SDK or else clear the persisted IndexedDB data for your app to start fresh.")):r(new nr(t,n))},i.onupgradeneeded=function(t){f("SimpleDb",'Database "'+n.name+'" requires upgrade from version:',t.oldVersion);var e=t.target.result;n.Un.Jn(e,i.transaction,t.oldVersion,n.version).next((function(){f("SimpleDb","Database upgrade to version "+n.version+" complete")}))}}))]);case 1:e.db=r.sent(),r.label=2;case 2:return[2,(this.Yn&&(this.db.onversionchange=function(t){return n.Yn(t)}),this.db)]}}))}))},e.prototype.Xn=function(t){this.Yn=t,this.db&&(this.db.onversionchange=function(e){return t(e)})},e.prototype.runTransaction=function(t,e,n,r){return Object(a.b)(this,void 0,void 0,(function(){var i,o,s,u,c;return Object(a.d)(this,(function(l){switch(l.label){case 0:i="readonly"===e,o=0,s=function(){var e,s,c,l,h;return Object(a.d)(this,(function(a){switch(a.label){case 0:++o,a.label=1;case 1:return a.trys.push([1,4,,5]),[4,u.Hn(t)];case 2:return u.db=a.sent(),e=Zn.open(u.db,t,i?"readonly":"readwrite",n),s=r(e).catch((function(t){return e.abort(t),Jn.reject(t)})).On(),c={},s.catch((function(){})),[4,e.qn];case 3:return[2,(c.value=(a.sent(),s),c)];case 4:return l=a.sent(),h="FirebaseError"!==l.name&&o<3,f("SimpleDb","Transaction failed with error:",l.message,"Retrying:",h),u.close(),h?[3,5]:[2,{value:Promise.reject(l)}];case 5:return[2]}}
2))},u=this,l.label=1;case 1:return[5,s()];case 2:if("object"==typeof(c=l.sent()))return[2,c.value];l.label=3;case 3:return[3,1];case 4:return[2]}}))}))},e.prototype.close=function(){this.db&&this.db.close(),this.db=void 0},e}(),er=function(){function t(t){this.Zn=t,this.ts=!1,this.es=null}return Object.defineProperty(t.prototype,"xn",{get:function(){return this.ts},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ns",{get:function(){return this.es},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cursor",{set:function(t){this.Zn=t},enumerable:!1,configurable:!0}),t.prototype.done=function(){this.ts=!0},t.prototype.ss=function(t){this.es=t},t.prototype.delete=function(){return or(this.Zn.delete())},t}(),nr=function(t){function e(e,n){var r=this;return(r=t.call(this,O.UNAVAILABLE,"IndexedDB transaction '"+e+"' failed: "+n)||this).name="IndexedDbTransactionError",r}return Object(a.c)(e,t),e}(S);function rr(t){return"IndexedDbTransactionError"===t.name}var ir=function(){function t(t){this.store=t}return t.prototype.put=function(t,e){var n;return void 0!==e?(f("SimpleDb","PUT",this.store.name,t,e),n=this.store.put(e,t)):(f("SimpleDb","PUT",this.store.name,"<auto-key>",t),n=this.store.put(t)),or(n)},t.prototype.add=function(t){return f("SimpleDb","ADD",this.store.name,t,t),or(this.store.add(t))},t.prototype.get=function(t){var e=this;return or(this.store.get(t)).next((function(n){return void 0===n&&(n=null),f("SimpleDb","GET",e.store.name,t,n),n}))},t.prototype.delete=function(t){return f("SimpleDb","DELETE",this.store.name,t),or(this.store.delete(t))},t.prototype.count=function(){return f("SimpleDb","COUNT",this.store.name),or(this.store.count())},t.prototype.rs=function(t,e){var n=this.cursor(this.options(t,e)),r=[];return this.os(n,(function(t,e){r.push(e)})).next((function(){return r}))},t.prototype.cs=function(t,e){f("SimpleDb","DELETE ALL",this.store.name);var n=this.options(t,e);n.us=!1;var r=this.cursor(n);return this.os(r,(function(t,e,n){return n.delete()}))},t.prototype.hs=function(t,e){var n;e?n=t:(n={},e=t);var r=this.cursor(n);return this.os(r,e)},t.prototype.ls=function(t){var e=this.cursor({});return new Jn((function(n,r){e.onerror=function(t){var e=sr(t.target.error);r(e)},e.onsuccess=function(e){var r=e.target.result;r?t(r.primaryKey,r.value).next((function(t){t?r.continue():n()})):n()}}))},t.prototype.os=function(t,e){var n=[];return new Jn((function(r,i){t.onerror=function(t){i(t.target.error)},t.onsuccess=function(t){var i=t.target.result;if(i){var o=new er(i),a=e(i.primaryKey,i.value,o);if(a instanceof Jn){var s=a.catch((function(t){return o.done(),Jn.reject(t)}));n.push(s)}o.xn?r():null===o.ns?i.continue():i.continue(o.ns)}else r()}})).next((function(){return Jn.Mn(n)}))},t.prototype.options=function(t,e){var n;return void 0!==t&&("string"==typeof t?n=t:e=t),{index:n,range:e}},t.prototype.cursor=function(t){var e="next";if(t.reverse&&(e="prev"),t.index){var n=this.store.index(t.index);return t.us?n.openKeyCursor(t.range,e):n.openCursor(t.range,e)}return this.store.openCursor(t.range,e)},t}();function or(t){return new Jn((function(e,n){t.onsuccess=function(t){var n=t.target.result;e(n)},t.onerror=function(t){var e=sr(t.target.error);n(e)}}))}var ar=!1;function sr(t){var e=tr.Qn(Object(i.p)());if(e>=12.2&&e<13){var n="An internal error was encountered in the Indexed Database server";if(t.message.indexOf(n)>=0){var r=new S("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 ar||(ar=!0,setTimeout((function(){throw r}),0)),r}}return t}var ur=function(){function t(t,e,n,r,i){this._s=t,this.fs=e,this.ds=n,this.op=r,this.ws=i,this.Es=new $n,this.then=this.Es.promise.then.bind(this.Es.promise),this.Es.promise.catch((function(t){}))}return t.Ts=function(e,n,r,i,o){var a=new t(e,n,Date.now()+r,i,o);return a.start(r),a},t.prototype.start=function(t){var e=this;this.Is=setTimeout((function(){return e.As()}),t)},t.prototype.Rs=function(){return this.As()},t.prototype.cancel=function(t){null!==this.Is&&(this.clearTimeout(),this.Es.reject(new S(O.CANCELLED,"Operation cancelled"+(t?": "+t:"")))
2)},t.prototype.As=function(){var t=this;this._s.Ps((function(){return null!==t.Is?(t.clearTimeout(),t.op().then((function(e){return t.Es.resolve(e)}))):Promise.resolve()}))},t.prototype.clearTimeout=function(){null!==this.Is&&(this.ws(this),clearTimeout(this.Is),this.Is=null)},t}();function cr(t,e){if(h("AsyncQueue",e+": "+t),rr(t))return new S(O.UNAVAILABLE,e+": "+t);throw t}var lr="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.",fr=function(){function t(){this.ys=[]}return t.prototype.gs=function(t){this.ys.push(t)},t.prototype.Vs=function(){this.ys.forEach((function(t){return t()}))},t}();function hr(t){for(var e="",n=0;n<t.length;n++)e.length>0&&(e=dr(e)),e=pr(t.get(n),e);return dr(e)}function pr(t,e){for(var n=e,r=t.length,i=0;i<r;i++){var o=t.charAt(i);switch(o){case"\0":n+="\x01\x10";break;case"\x01":n+="\x01\x11";break;default:n+=o}}return n}function dr(t){return t+"\x01\x01"}function vr(t){var e=t.length;if(y(e>=2),2===e)return y("\x01"===t.charAt(0)&&"\x01"===t.charAt(1)),M.ct();for(var n=e-2,r=[],i="",o=0;o<e;){var a=t.indexOf("\x01",o);switch((a<0||a>n)&&v(),t.charAt(a+1)){case"\x01":var s=t.substring(o,a),u=void 0;0===i.length?u=s:(u=i+=s,i=""),r.push(u);break;case"\x10":i+=t.substring(o,a),i+="\0";break;case"\x11":i+=t.substring(o,a+1);break;default:v()}o=a+2}return new M(r)}var yr=function(t,e){this.seconds=t,this.nanoseconds=e},gr=function(t,e,n){this.ownerId=t,this.allowTabSynchronization=e,this.leaseTimestampMs=n};gr.store="owner",gr.key="owner";var mr=function(t,e,n){this.userId=t,this.lastAcknowledgedBatchId=e,this.lastStreamToken=n};mr.store="mutationQueues",mr.keyPath="userId";var br=function(t,e,n,r,i){this.userId=t,this.batchId=e,this.localWriteTimeMs=n,this.baseMutations=r,this.mutations=i};br.store="mutations",br.keyPath="batchId",br.userMutationsIndex="userMutationsIndex",br.userMutationsKeyPath=["userId","batchId"];var wr=function(){function t(){}return t.prefixForUser=function(t){return[t]},t.prefixForPath=function(t,e){return[t,hr(e)]},t.key=function(t,e,n){return[t,hr(e),n]},t}();wr.store="documentMutations",wr.PLACEHOLDER=new wr;var _r=function(t,e){this.path=t,this.readTime=e},Er=function(t,e){this.path=t,this.version=e},Tr=function(t,e,n,r,i,o){this.unknownDocument=t,this.noDocument=e,this.document=n,this.hasCommittedMutations=r,this.readTime=i,this.parentPath=o};Tr.store="remoteDocuments",Tr.readTimeIndex="readTimeIndex",Tr.readTimeIndexPath="readTime",Tr.collectionReadTimeIndex="collectionReadTimeIndex",Tr.collectionReadTimeIndexPath=["parentPath","readTime"];var Or=function(t){this.byteSize=t};Or.store="remoteDocumentGlobal",Or.key="remoteDocumentGlobalKey";var Sr=function(t,e,n,r,i,o,a){this.targetId=t,this.canonicalId=e,this.readTime=n,this.resumeToken=r,this.lastListenSequenceNumber=i,this.lastLimboFreeSnapshotVersion=o,this.query=a};Sr.store="targets",Sr.keyPath="targetId",Sr.queryTargetsIndexName="queryTargetsIndex",Sr.queryTargetsKeyPath=["canonicalId","targetId"];var Ir=function(t,e,n){this.targetId=t,this.path=e,this.sequenceNumber=n};Ir.store="targetDocuments",Ir.keyPath=["targetId","path"],Ir.documentTargetsIndex="documentTargetsIndex",Ir.documentTargetsKeyPath=["path","targetId"];var Cr=function(t,e,n,r){this.highestTargetId=t,this.highestListenSequenceNumber=e,this.lastRemoteSnapshotVersion=n,this.targetCount=r};Cr.key="targetGlobalKey",Cr.store="targetGlobal";var kr=function(t,e){this.collectionId=t,this.parent=e};kr.store="collectionParents",kr.keyPath=["collectionId","parent"];var Nr=function(t,e,n,r){this.clientId=t,this.updateTimeMs=e,this.networkEnabled=n,this.inForeground=r};Nr.store="clientMetadata",Nr.keyPath="clientId";var Ar=function(t,e,n){this.bundleId=t,this.createTime=e,this.version=n};Ar.store="bundles",Ar.keyPath="bundleId";var xr=function(t,e,n){this.name=t,this.readTime=e,this.bundledQuery=n};xr.store="namedQueries",xr.keyPath="name";var Pr=Object(a.g)(Object(a.g)(Object(a.g)(Object(a.g)([mr.store,br.store,wr.store,Tr.store,Sr.store,gr.store,Cr.store,Ir.store],[Nr.store]),[Or.store]),[kr.store]),[Ar.store,xr.store]),Rr=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).ps=e,r.bs=n,r}return Object(a.c)(e,t),e}(fr);function jr(t,e){var n=g(t);return tr.zn(n.ps,e)}var Dr=function(){function t(t,e,n,r){this.batchId=t,this.vs=e,this.baseMutations=n,this.mutations=r}return t.prototype.Ss=function(t,e,n){for(var r=n.Ds,i=0;i<this.mutations.length;i++){var o=this.mutations[i];o.key.isEqual(t)&&(e=Se(o,e,r[i]))}return e},t.prototype.Cs=function(t,e){for(var n=0,r=this.baseMutations;n<r.length;n++)(a=r[n]).key.isEqual(t)&&(e=Ie(a,e,this.vs));for(var i=0,o=this.mutations;i<o.length;i++){var a;(a=o[i]).key.isEqual(t)&&(e=Ie(a,e,this.vs))}return e},t.prototype.xs=function(t){var e=this,n=t;return this.mutations.forEach((function(r){var i=e.Cs(r.key,t.get(r.key));i&&(n=n.zt(r.key,i))})),n},t.prototype.keys=function(){return this.mutations.reduce((function(t,e){return t.add(e.key)}),nn())},t.prototype.isEqual=function(t){return this.batchId===t.batchId&&_(this.mutations,t.mutations,(function(t,e){return ke(t,e)}))&&_(this.baseMutations,t.baseMutations,(function(t,e){return ke(t,e)}))},t}(),Lr=function(){function t(t,e,n,r){this.batch=t,this.Ns=e,this.Ds=n,this.$s=r}return t.from=function(e,n,r){y(e.mutations.length===r.length);for(var i=tn(),o=e.mutations,a=0;a<o.length;
2a++)i=i.zt(o[a].key,r[a].version);return new t(e,n,r,i)},t}(),Mr=function(t){this.Fs=t};function Fr(t,e){if(e.document)return jn(t.Fs,e.document,!!e.hasCommittedMutations);if(e.noDocument){var n=V.Et(e.noDocument.path),r=zr(e.noDocument.readTime);return new bt(n,r,{hasCommittedMutations:!!e.hasCommittedMutations})}if(e.unknownDocument){var i=V.Et(e.unknownDocument.path);return r=zr(e.unknownDocument.version),new wt(i,r)}return v()}function Ur(t,e,n){var r=Vr(n),i=e.key.path.X().it();if(e instanceof mt){var o=function(t,e){return{name:Cn(t,e.key),fields:e.bt().mapValue.fields,updateTime:_n(t,e.version.j())}}(t.Fs,e),a=e.hasCommittedMutations;return new Tr(null,null,o,a,r,i)}if(e instanceof bt){var s=e.key.path.it(),u=Br(e.version);return a=e.hasCommittedMutations,new Tr(null,new _r(s,u),null,a,r,i)}if(e instanceof wt){var c=e.key.path.it(),l=Br(e.version);return new Tr(new Er(c,l),null,null,!0,r,i)}return v()}function Vr(t){var e=t.j();return[e.seconds,e.nanoseconds]}function qr(t){var e=new j(t[0],t[1]);return D.K(e)}function Br(t){var e=t.j();return new yr(e.seconds,e.nanoseconds)}function zr(t){var e=new j(t.seconds,t.nanoseconds);return D.K(e)}function Hr(t,e){for(var n=(e.baseMutations||[]).map((function(e){return Ln(t.Fs,e)})),r=0;r<e.mutations.length-1;++r){var i=e.mutations[r];if(r+1<e.mutations.length&&void 0!==e.mutations[r+1].transform){var o=e.mutations[r+1];i.updateTransforms=o.transform.fieldTransforms,e.mutations.splice(r+1,1),++r}}var a=e.mutations.map((function(e){return Ln(t.Fs,e)})),s=j.fromMillis(e.localWriteTimeMs);return new Dr(e.batchId,s,n,a)}function Wr(t){var e,n,r=zr(t.readTime),i=void 0!==t.lastLimboFreeSnapshotVersion?zr(t.lastLimboFreeSnapshotVersion):D.min();return void 0!==t.query.documents?(y(1===(n=t.query).documents.length),e=Xt(zt(An(n.documents[0])))):e=function(t){return Xt(Un(t))}(t.query),new ie(e,t.targetId,0,t.lastListenSequenceNumber,r,i,T.fromBase64String(t.resumeToken))}function Kr(t,e){var n,r=Br(e.Ot),i=Br(e.lastLimboFreeSnapshotVersion);n=St(e.target)?Mn(t.Fs,e.target):Fn(t.Fs,e.target);var o=e.resumeToken.toBase64();return new Sr(e.targetId,Tt(e.target),r,o,e.sequenceNumber,i,n)}function Gr(t){var e=Un({parent:t.parent,structuredQuery:t.structuredQuery});return"LAST"===t.limitType?$t(e,e.limit,"L"):e}var Qr=function(){function t(){}return t.prototype.Os=function(t,e){return Yr(t).get(e).next((function(t){if(t)return{id:(e=t).bundleId,createTime:zr(e.createTime),version:e.version};var e}))},t.prototype.ks=function(t,e){return Yr(t).put({bundleId:(n=e).id,createTime:Br(On(n.createTime)),version:n.version});var n},t.prototype.Ms=function(t,e){return Xr(t).get(e).next((function(t){if(t)return{name:(e=t).name,query:Gr(e.bundledQuery),readTime:zr(e.readTime)};var e}))},t.prototype.Ls=function(t,e){return Xr(t).put(function(t){return{name:t.name,readTime:Br(On(t.readTime)),bundledQuery:t.bundledQuery}}(e))},t}();function Yr(t){return jr(t,Ar.store)}function Xr(t){return jr(t,xr.store)}var $r=function(){function t(){this.Bs=new Jr}return t.prototype.qs=function(t,e){return this.Bs.add(e),Jn.resolve()},t.prototype.Us=function(t,e){return Jn.resolve(this.Bs.getEntries(e))},t}(),Jr=function(){function t(){this.index={}}return t.prototype.add=function(t){var e=t.tt(),n=t.X(),r=this.index[e]||new Ke(M.H),i=!r.has(n);return this.index[e]=r.add(n),i},t.prototype.has=function(t){var e=t.tt(),n=t.X(),r=this.index[e];return r&&r.has(n)},t.prototype.getEntries=function(t){return(this.index[t]||new Ke(M.H)).it()},t}(),Zr=function(){function t(){this.Qs=new Jr}return t.prototype.qs=function(t,e){var n=this;if(!this.Qs.has(e)){var r=e.tt(),i=e.X();t.gs((function(){n.Qs.add(e)}));var o={collectionId:r,parent:hr(i)};return ti(t).put(o)}return Jn.resolve()},t.prototype.Us=function(t,e){var n=[],r=IDBKeyRange.bound([e,""],[E(e),""],!1,!0);return ti(t).rs(r).next((function(t){for(var r=0,i=t;r<i.length;r++){var o=i[r];if(o.collectionId!==e)break;n.push(vr(o.parent))}return n}))},t}();function ti(t){return jr(t,kr.store)}var ei={Ks:!1,Ws:0,js:0,Gs:0},ni=function(){function t(t,e,n){this.zs=t,this.Hs=e,this.Js=n}return t.Ys=function(e){return new t(e,t.Xs,t.Zs)},t}();function ri(t){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(e){if(t.code!==O.FAILED_PRECONDITION||t.message!==lr)throw t;return f("LocalStore","Unexpectedly lost primary lease"),[2]}))}
2))}ni.Xs=10,ni.Zs=1e3,ni.ti=new ni(41943040,ni.Xs,ni.Zs),ni.ei=new ni(-1,0,0);var ii=function(){function t(t,e){this.ni=t,this.si=e,this.ii={}}return t.prototype.get=function(t){var e=this.ni(t),n=this.ii[e];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.si(a,t))return s}},t.prototype.has=function(t){return void 0!==this.get(t)},t.prototype.set=function(t,e){var n=this.ni(t),r=this.ii[n];if(void 0!==r){for(var i=0;i<r.length;i++)if(this.si(r[i][0],t))return void(r[i]=[t,e]);r.push([t,e])}else this.ii[n]=[[t,e]]},t.prototype.delete=function(t){var e=this.ni(t),n=this.ii[e];if(void 0===n)return!1;for(var r=0;r<n.length;r++)if(this.si(n[r][0],t))return 1===n.length?delete this.ii[e]:n.splice(r,1),!0;return!1},t.prototype.forEach=function(t){B(this.ii,(function(e,n){for(var r=0,i=n;r<i.length;r++){var o=i[r],a=o[0],s=o[1];t(a,s)}}))},t.prototype.et=function(){return z(this.ii)},t}(),oi=function(){function t(){this.ri=new ii((function(t){return t.toString()}),(function(t,e){return t.isEqual(e)})),this.oi=!1}return t.prototype.ci=function(t){var e=this.ri.get(t);return e?e.readTime:D.min()},t.prototype.ai=function(t,e){this.ui(),this.ri.set(t.key,{hi:t,readTime:e})},t.prototype.li=function(t,e){void 0===e&&(e=null),this.ui(),this.ri.set(t,{hi:null,readTime:e})},t.prototype._i=function(t,e){this.ui();var n=this.ri.get(e);return void 0!==n?Jn.resolve(n.hi):this.fi(t,e)},t.prototype.getEntries=function(t,e){return this.di(t,e)},t.prototype.apply=function(t){return this.ui(),this.oi=!0,this.wi(t)},t.prototype.ui=function(){},t}();function ai(t,e,n){var r=t.store(br.store),i=t.store(wr.store),o=[],a=IDBKeyRange.only(n.batchId),s=0,u=r.hs({range:a},(function(t,e,n){return s++,n.delete()}));o.push(u.next((function(){y(1===s)})));for(var c=[],l=0,f=n.mutations;l<f.length;l++){var h=f[l],p=wr.key(e,h.key.path,n.batchId);o.push(i.delete(p)),c.push(h.key)}return Jn.Mn(o).next((function(){return c}))}function si(t){var e;if(t.document)e=t.document;else if(t.unknownDocument)e=t.unknownDocument;else{if(!t.noDocument)throw v();e=t.noDocument}return JSON.stringify(e).length}var ui=function(){function t(t,e,n,r){this.userId=t,this.Qt=e,this.Ei=n,this.Ti=r,this.Ii={}}return t.mi=function(e,n,r,i){return y(""!==e.uid),new t(e.m()?e.uid:"",n,r,i)},t.prototype.Ai=function(t){var e=!0,n=IDBKeyRange.bound([this.userId,Number.NEGATIVE_INFINITY],[this.userId,Number.POSITIVE_INFINITY]);return li(t).hs({index:br.userMutationsIndex,range:n},(function(t,n,r){e=!1,r.done()})).next((function(){return e}))},t.prototype.Ri=function(t,e,n,r){var i=this,o=fi(t),a=li(t);return a.add({}).next((function(s){y("number"==typeof s);for(var u=new Dr(s,e,n,r),c=function(t,e,n){var r=n.baseMutations.map((function(e){return Dn(t.Fs,e)})),i=n.mutations.map((function(e){return Dn(t.Fs,e)}));return new br(e,n.batchId,n.vs.toMillis(),r,i)}(i.Qt,i.userId,u),l=[],f=new Ke((function(t,e){return w(t.rt(),e.rt())})),h=0,p=r;h<p.length;h++){var d=p[h],v=wr.key(i.userId,d.key.path,s);f=f.add(d.key.path.X()),l.push(a.put(c)),l.push(o.put(v,wr.PLACEHOLDER))}return f.forEach((function(e){l.push(i.Ei.qs(t,e))})),t.gs((function(){i.Ii[s]=u.keys()})),Jn.Mn(l).next((function(){return u}))}))},t.prototype.Pi=function(t,e){var n=this;return li(t).get(e).next((function(t){return t?(y(t.userId===n.userId),Hr(n.Qt,t)):null}))},t.prototype.yi=function(t,e){var n=this;return this.Ii[e]?Jn.resolve(this.Ii[e]):this.Pi(t,e).next((function(t){if(t){var r=t.keys();return n.Ii[e]=r,r}return null}))},t.prototype.gi=function(t,e){var n=this,r=e+1,i=IDBKeyRange.lowerBound([this.userId,r]),o=null;return li(t).hs({index:br.userMutationsIndex,range:i},(function(t,e,i){e.userId===n.userId&&(y(e.batchId>=r),o=Hr(n.Qt,e)),i.done()})).next((function(){return o}))},t.prototype.Vi=function(t){var e=IDBKeyRange.upperBound([this.userId,Number.POSITIVE_INFINITY]),n=-1;return li(t).hs({index:br.userMutationsIndex,range:e,reverse:!0},(function(t,e,r){n=e.batchId,r.done()})).next((function(){return n}))},t.prototype.pi=function(t){var e=this,n=IDBKeyRange.bound([this.userId,-1],[this.userId,Number.POSITIVE_INFINITY]);return li(t).rs(br.userMutationsIndex,n).next((function(t){return t.map((function(t){return Hr(e.Qt,t)}))}))},t.prototype.bi=function(t,e){var n=this,r=wr.prefixForPath(this.userId,e.path),i=IDBKeyRange.lowerBound(r),o=[];return fi(t).hs({range:i},(function(r,i,a){var s=r[0],u=r[1],c=r[2],l=vr(u);if(s===n.userId&&e.path.isEqual(l))return li(t).get(c).next((function(t){if(!t)throw v();y(t.userId===n.userId),o.push(Hr(n.Qt,t))}));a.done()})).next((function(){return o}
2))},t.prototype.vi=function(t,e){var n=this,r=new Ke(w),i=[];return e.forEach((function(e){var o=wr.prefixForPath(n.userId,e.path),a=IDBKeyRange.lowerBound(o),s=fi(t).hs({range:a},(function(t,i,o){var a=t[0],s=t[1],u=t[2],c=vr(s);a===n.userId&&e.path.isEqual(c)?r=r.add(u):o.done()}));i.push(s)})),Jn.Mn(i).next((function(){return n.Si(t,r)}))},t.prototype.Di=function(t,e){var n=this,r=e.path,i=r.length+1,o=wr.prefixForPath(this.userId,r),a=IDBKeyRange.lowerBound(o),s=new Ke(w);return fi(t).hs({range:a},(function(t,e,o){var a=t[0],u=t[1],c=t[2],l=vr(u);a===n.userId&&r.nt(l)?l.length===i&&(s=s.add(c)):o.done()})).next((function(){return n.Si(t,s)}))},t.prototype.Si=function(t,e){var n=this,r=[],i=[];return e.forEach((function(e){i.push(li(t).get(e).next((function(t){if(null===t)throw v();y(t.userId===n.userId),r.push(Hr(n.Qt,t))})))})),Jn.Mn(i).next((function(){return r}))},t.prototype.Ci=function(t,e){var n=this;return ai(t.ps,this.userId,e).next((function(r){return t.gs((function(){n.xi(e.batchId)})),Jn.forEach(r,(function(e){return n.Ti.Ni(t,e)}))}))},t.prototype.xi=function(t){delete this.Ii[t]},t.prototype.$i=function(t){var e=this;return this.Ai(t).next((function(n){if(!n)return Jn.resolve();var r=IDBKeyRange.lowerBound(wr.prefixForUser(e.userId)),i=[];return fi(t).hs({range:r},(function(t,n,r){if(t[0]===e.userId){var o=vr(t[1]);i.push(o)}else r.done()})).next((function(){y(0===i.length)}))}))},t.prototype.Fi=function(t,e){return ci(t,this.userId,e)},t.prototype.Oi=function(t){var e=this;return hi(t).get(this.userId).next((function(t){return t||new mr(e.userId,-1,"")}))},t}();function ci(t,e,n){var r=wr.prefixForPath(e,n.path),i=r[1],o=IDBKeyRange.lowerBound(r),a=!1;return fi(t).hs({range:o,us:!0},(function(t,n,r){var o=t[0],s=t[1];t[2],o===e&&s===i&&(a=!0),r.done()})).next((function(){return a}))}function li(t){return jr(t,br.store)}function fi(t){return jr(t,wr.store)}function hi(t){return jr(t,mr.store)}var pi=function(){function t(t){this.ki=t}return t.prototype.next=function(){return this.ki+=2,this.ki},t.Mi=function(){return new t(0)},t.Li=function(){return new t(-1)},t}(),di=function(){function t(t,e){this.Ti=t,this.Qt=e}return t.prototype.Bi=function(t){var e=this;return this.qi(t).next((function(n){var r=new pi(n.highestTargetId);return n.highestTargetId=r.next(),e.Ui(t,n).next((function(){return n.highestTargetId}))}))},t.prototype.Qi=function(t){return this.qi(t).next((function(t){return D.K(new j(t.lastRemoteSnapshotVersion.seconds,t.lastRemoteSnapshotVersion.nanoseconds))}))},t.prototype.Ki=function(t){return this.qi(t).next((function(t){return t.highestListenSequenceNumber}))},t.prototype.Wi=function(t,e,n){var r=this;return this.qi(t).next((function(i){return i.highestListenSequenceNumber=e,n&&(i.lastRemoteSnapshotVersion=n.j()),e>i.highestListenSequenceNumber&&(i.highestListenSequenceNumber=e),r.Ui(t,i)}))},t.prototype.ji=function(t,e){var n=this;return this.Gi(t,e).next((function(){return n.qi(t).next((function(r){return r.targetCount+=1,n.zi(e,r),n.Ui(t,r)}))}))},t.prototype.Hi=function(t,e){return this.Gi(t,e)},t.prototype.Ji=function(t,e){var n=this;return this.Yi(t,e.targetId).next((function(){return vi(t).delete(e.targetId)})).next((function(){return n.qi(t)})).next((function(e){return y(e.targetCount>0),e.targetCount-=1,n.Ui(t,e)}))},t.prototype.Xi=function(t,e,n){var r=this,i=0,o=[];return vi(t).hs((function(a,s){var u=Wr(s);u.sequenceNumber<=e&&null===n.get(u.targetId)&&(i++,o.push(r.Ji(t,u)))})).next((function(){return Jn.Mn(o)})).next((function(){return i}))},t.prototype.In=function(t,e){return vi(t).hs((function(t,n){var r=Wr(n);e(r)}))},t.prototype.qi=function(t){return yi(t).get(Cr.key).next((function(t){return y(null!==t),t}))},t.prototype.Ui=function(t,e){return yi(t).put(Cr.key,e)},t.prototype.Gi=function(t,e){return vi(t).put(Kr(this.Qt,e))},t.prototype.zi=function(t,e){var n=!1;return t.targetId>e.highestTargetId&&(e.highestTargetId=t.targetId,n=!0),t.sequenceNumber>e.highestListenSequenceNumber&&(e.highestListenSequenceNumber=t.sequenceNumber,n=!0),n},t.prototype.Zi=function(t){return this.qi(t).next((function(t){return t.targetCount}))},t.prototype.tr=function(t,e){var n=Tt(e),r=IDBKeyRange.bound([n,Number.NEGATIVE_INFINITY],[n,Number.POSITIVE_INFINITY]),i=null;return vi(t).hs({range:r,index:Sr.queryTargetsIndexName},(function(t,n,r){var o=Wr(n);Ot(e,o.target)&&(i=o,r.done())})).next((function(){return i}))},t.prototype.er=function(t,e,n){var r=this,i=[],o=gi(t);return e.forEach((function(e){var a=hr(e.path);i.push(o.put(new Ir(n,a))),i.push(r.Ti.nr(t,n,e))})),Jn.Mn(i)},t.prototype.sr=function(t,e,n){var r=this,i=gi(t);
2return Jn.forEach(e,(function(e){var o=hr(e.path);return Jn.Mn([i.delete([n,o]),r.Ti.ir(t,n,e)])}))},t.prototype.Yi=function(t,e){var n=gi(t),r=IDBKeyRange.bound([e],[e+1],!1,!0);return n.delete(r)},t.prototype.rr=function(t,e){var n=IDBKeyRange.bound([e],[e+1],!1,!0),r=gi(t),i=nn();return r.hs({range:n,us:!0},(function(t,e,n){var r=vr(t[1]),o=new V(r);i=i.add(o)})).next((function(){return i}))},t.prototype.Fi=function(t,e){var n=hr(e.path),r=IDBKeyRange.bound([n],[E(n)],!1,!0),i=0;return gi(t).hs({index:Ir.documentTargetsIndex,us:!0,range:r},(function(t,e,n){var r=t[0];t[1],0!==r&&(i++,n.done())})).next((function(){return i>0}))},t.prototype.Sn=function(t,e){return vi(t).get(e).next((function(t){return t?Wr(t):null}))},t}();function vi(t){return jr(t,Sr.store)}function yi(t){return jr(t,Cr.store)}function gi(t){return jr(t,Ir.store)}function mi(t,e){var n=t[0],r=t[1],i=e[0],o=e[1],a=w(n,i);return 0===a?w(r,o):a}var bi=function(){function t(t){this.cr=t,this.buffer=new Ke(mi),this.ar=0}return t.prototype.ur=function(){return++this.ar},t.prototype.hr=function(t){var e=[t,this.ur()];if(this.buffer.size<this.cr)this.buffer=this.buffer.add(e);else{var n=this.buffer.last();mi(e,n)<0&&(this.buffer=this.buffer.delete(n).add(e))}},Object.defineProperty(t.prototype,"maxValue",{get:function(){return this.buffer.last()[0]},enumerable:!1,configurable:!0}),t}(),wi=function(){function t(t,e){this.lr=t,this._s=e,this._r=!1,this.dr=null}return t.prototype.start=function(t){-1!==this.lr.params.zs&&this.wr(t)},t.prototype.stop=function(){this.dr&&(this.dr.cancel(),this.dr=null)},Object.defineProperty(t.prototype,"Er",{get:function(){return null!==this.dr},enumerable:!1,configurable:!0}),t.prototype.wr=function(t){var e=this,n=this._r?3e5:6e4;f("LruGarbageCollector","Garbage collection scheduled in "+n+"ms"),this.dr=this._s.Tr("lru_garbage_collection",n,(function(){return Object(a.b)(e,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){switch(n.label){case 0:this.dr=null,this._r=!0,n.label=1;case 1:return n.trys.push([1,3,,7]),[4,t.Ir(this.lr)];case 2:return n.sent(),[3,7];case 3:return rr(e=n.sent())?(f("LruGarbageCollector","Ignoring IndexedDB error during garbage collection: ",e),[3,6]):[3,4];case 4:return[4,ri(e)];case 5:n.sent(),n.label=6;case 6:return[3,7];case 7:return[4,this.wr(t)];case 8:return n.sent(),[2]}}))}))}))},t}(),_i=function(){function t(t,e){this.mr=t,this.params=e}return t.prototype.Ar=function(t,e){return this.mr.Rr(t).next((function(t){return Math.floor(e/100*t)}))},t.prototype.Pr=function(t,e){var n=this;if(0===e)return Jn.resolve(R.q);var r=new bi(e);return this.mr.In(t,(function(t){return r.hr(t.sequenceNumber)})).next((function(){return n.mr.yr(t,(function(t){return r.hr(t)}))})).next((function(){return r.maxValue}))},t.prototype.Xi=function(t,e,n){return this.mr.Xi(t,e,n)},t.prototype.gr=function(t,e){return this.mr.gr(t,e)},t.prototype.Vr=function(t,e){var n=this;return-1===this.params.zs?(f("LruGarbageCollector","Garbage collection skipped; disabled"),Jn.resolve(ei)):this.pr(t).next((function(r){return r<n.params.zs?(f("LruGarbageCollector","Garbage collection skipped; Cache size "+r+" is lower than threshold "+n.params.zs),ei):n.br(t,e)}))},t.prototype.pr=function(t){return this.mr.pr(t)},t.prototype.br=function(t,e){var n,i,o,a,s,u,c,h=this,p=Date.now();return this.Ar(t,this.params.Hs).next((function(e){return e>h.params.Js?(f("LruGarbageCollector","Capping sequence numbers to collect down to the maximum of "+h.params.Js+" from "+e),i=h.params.Js):i=e,a=Date.now(),h.Pr(t,i)})).next((function(r){return n=r,s=Date.now(),h.Xi(t,n,e)})).next((function(e){return o=e,u=Date.now(),h.gr(t,n)})).next((function(t){return c=Date.now(),l()<=r.a.DEBUG&&f("LruGarbageCollector","LRU Garbage Collection\n\tCounted targets in "+(a-p)+"ms\n\tDetermined least recently used "+i+" in "+(s-a)+"ms\n\tRemoved "+o+" targets in "+(u-s)+"ms\n\tRemoved "+t+" documents in "+(c-u)+"ms\nTotal Duration: "+(c-p)+"ms"),Jn.resolve({Ks:!0,Ws:i,js:o,Gs:t})}))},t}(),Ei=function(){function t(t,e){this.db=t,this.lr=function(t,e){return new _i(t,e)}(this,e)}return t.prototype.Rr=function(t){var e=this.vr(t);return this.db.Sr().Zi(t).next((function(t){return e.next((function(e){return t+e}))}))},t.prototype.vr=function(t){var e=0;return this.yr(t,(function(t){e++})).next((function(){return e}))},t.prototype.In=function(t,e){return this.db.Sr().In(t,e)},t.prototype.yr=function(t,e){return this.Dr(t,(function(t,n){return e(n)}))},t.prototype.nr=function(t,e,n){return Ti(t,n)},t.prototype.ir=function(t,e,n){return Ti(t,n)},t.prototype.Xi=function(t,e,n){return this.db.Sr().Xi(t,e,n)},t.prototype.Ni=function(t,e){return Ti(t,e)},t.prototype.Cr=function(t,e){return function(t,e){var n=!1;return hi(t).ls((function(r){return ci(t,r,e).next((function(t){return t&&(n=!0),Jn.resolve(!t)}))})).next((function(){return n}))}(t,e)},t.prototype.gr=function(t,e){var n=this,r=this.db.$r().Nr(),i=[],o=0;return this.Dr(t,(function(a,s){if(s<=e){var u=n.Cr(t,a).next((function(e){if(!e)return o++,r._i(t,a).next((function(){return r.li(a),gi(t).delete([0,hr(a.path)])}))}));i.push(u)}})).next((function(){return Jn.Mn(i)})).next((function(){return r.apply(t)})).next((function(){return o}
2))},t.prototype.removeTarget=function(t,e){var n=e.kt(t.bs);return this.db.Sr().Hi(t,n)},t.prototype.Fr=function(t,e){return Ti(t,e)},t.prototype.Dr=function(t,e){var n,r=gi(t),i=R.q;return r.hs({index:Ir.documentTargetsIndex},(function(t,r){var o=t[0],a=(t[1],r.path),s=r.sequenceNumber;0===o?(i!==R.q&&e(new V(vr(n)),i),i=s,n=a):i=R.q})).next((function(){i!==R.q&&e(new V(vr(n)),i)}))},t.prototype.pr=function(t){return this.db.$r().Or(t)},t}();function Ti(t,e){return gi(t).put(function(t,e){return new Ir(0,hr(t.path),e)}(e,t.bs))}var Oi=function(){function t(t,e){this.Qt=t,this.Ei=e}return t.prototype.ai=function(t,e,n){return Ci(t).put(ki(e),n)},t.prototype.li=function(t,e){var n=Ci(t),r=ki(e);return n.delete(r)},t.prototype.updateMetadata=function(t,e){var n=this;return this.getMetadata(t).next((function(r){return r.byteSize+=e,n.kr(t,r)}))},t.prototype._i=function(t,e){var n=this;return Ci(t).get(ki(e)).next((function(t){return n.Mr(t)}))},t.prototype.Lr=function(t,e){var n=this;return Ci(t).get(ki(e)).next((function(t){var e=n.Mr(t);return e?{hi:e,size:si(t)}:null}))},t.prototype.getEntries=function(t,e){var n=this,r=Xe();return this.Br(t,e,(function(t,e){var i=n.Mr(e);r=r.zt(t,i)})).next((function(){return r}))},t.prototype.qr=function(t,e){var n=this,r=Xe(),i=new ze(V.H);return this.Br(t,e,(function(t,e){var o=n.Mr(e);o?(r=r.zt(t,o),i=i.zt(t,si(e))):(r=r.zt(t,null),i=i.zt(t,0))})).next((function(){return{Ur:r,Qr:i}}))},t.prototype.Br=function(t,e,n){if(e.et())return Jn.resolve();var r=IDBKeyRange.bound(e.first().path.it(),e.last().path.it()),i=e.te(),o=i.oe();return Ci(t).hs({range:r},(function(t,e,r){for(var a=V.Et(t);o&&V.H(o,a)<0;)n(o,null),o=i.oe();o&&o.isEqual(a)&&(n(o,e),o=i.ce()?i.oe():null),o?r.ss(o.path.it()):r.done()})).next((function(){for(;o;)n(o,null),o=i.ce()?i.oe():null}))},t.prototype.Kr=function(t,e,n){var r=this,i=Je(),o=e.path.length+1,a={};if(n.isEqual(D.min())){var s=e.path.it();a.range=IDBKeyRange.lowerBound(s)}else{var u=e.path.it(),c=Vr(n);a.range=IDBKeyRange.lowerBound([u,c],!0),a.index=Tr.collectionReadTimeIndex}return Ci(t).hs(a,(function(t,n,a){if(t.length===o){var s=Fr(r.Qt,n);e.path.nt(s.key.path)?s instanceof mt&&ee(e,s)&&(i=i.zt(s.key,s)):a.done()}})).next((function(){return i}))},t.prototype.Nr=function(t){return new Si(this,!!t&&t.Wr)},t.prototype.Or=function(t){return this.getMetadata(t).next((function(t){return t.byteSize}))},t.prototype.getMetadata=function(t){return Ii(t).get(Or.key).next((function(t){return y(!!t),t}))},t.prototype.kr=function(t,e){return Ii(t).put(Or.key,e)},t.prototype.Mr=function(t){if(t){var e=Fr(this.Qt,t);return e instanceof bt&&e.version.isEqual(D.min())?null:e}return null},t}(),Si=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).jr=e,r.Wr=n,r.Gr=new ii((function(t){return t.toString()}),(function(t,e){return t.isEqual(e)})),r}return Object(a.c)(e,t),e.prototype.wi=function(t){var e=this,n=[],r=0,i=new Ke((function(t,e){return w(t.rt(),e.rt())}));return this.ri.forEach((function(o,a){var s=e.Gr.get(o);if(a.hi){var u=Ur(e.jr.Qt,a.hi,e.ci(o));i=i.add(o.path.X());var c=si(u);r+=c-s,n.push(e.jr.ai(t,o,u))}else if(r-=s,e.Wr){var l=Ur(e.jr.Qt,new bt(o,D.min()),e.ci(o));n.push(e.jr.ai(t,o,l))}else n.push(e.jr.li(t,o))})),i.forEach((function(r){n.push(e.jr.Ei.qs(t,r))})),n.push(this.jr.updateMetadata(t,r)),Jn.Mn(n)},e.prototype.fi=function(t,e){var n=this;return this.jr.Lr(t,e).next((function(t){return null===t?(n.Gr.set(e,0),null):(n.Gr.set(e,t.size),t.hi)}))},e.prototype.di=function(t,e){var n=this;return this.jr.qr(t,e).next((function(t){var e=t.Ur;return t.Qr.forEach((function(t,e){n.Gr.set(t,e)})),e}))},e}(oi);function Ii(t){return jr(t,Or.store)}function Ci(t){return jr(t,Tr.store)}function ki(t){return t.path.it()}var Ni=function(){function t(t){this.Qt=t}return t.prototype.Jn=function(t,e,n,r){var i=this;y(n<r&&n>=0&&r<=11);var o=new Zn("createOrUpgrade",e);n<1&&r>=1&&(function(t){t.createObjectStore(gr.store)}(t),function(t){t.createObjectStore(mr.store,{keyPath:mr.keyPath}),t.createObjectStore(br.store,{keyPath:br.keyPath,autoIncrement:!0}).createIndex(br.userMutationsIndex,br.userMutationsKeyPath,{unique:!0}),t.createObjectStore(wr.store)}(t),Ai(t),function(t){t.createObjectStore(Tr.store)}(t));var a=Jn.resolve();return n<3&&r>=3&&(0!==n&&(function(t){t.deleteObjectStore(Ir.store),t.deleteObjectStore(Sr.store),t.deleteObjectStore(Cr.store)}(t),Ai(t)),a=a.next((function(){return function(t){var e=t.store(Cr.store),n=new Cr(0,0,D.min().j(),0);return e.put(Cr.key,n)}(o)}))),n<4&&r>=4&&(0!==n&&(a=a.next((function(){return function(t,e){return e.store(br.store).rs().next((function(n){t.deleteObjectStore(br.store),t.createObjectStore(br.store,{keyPath:br.keyPath,autoIncrement:!0}).createIndex(br.userMutationsIndex,br.userMutationsKeyPath,{unique:!0});var r=e.store(br.store),i=n.map((function(t){return r.put(t)}));return Jn.Mn(i)}))}(t,o)}))),a=a.next((function(){!function(t){t.createObjectStore(Nr.store,{keyPath:Nr.keyPath})}(t)}))),n<5&&r>=5&&(a=a.next((function(){return i.zr(o)}))),n<6&&r>=6&&(a=a.next((function(){return function(t){t.createObjectStore(Or.store)}(t),i.Hr(o)}))),n<7&&r>=7&&(a=a.next((function(){return i.Jr(o)}))),n<8&&r>=8&&(a=a.next((function(){return i.Yr(t,o)}))),n<9&&r>=9&&(a=a.next((function(){!function(t){t.objectStoreNames.contains("remoteDocumentChanges")&&t.deleteObjectStore("remoteDocumentChanges")}
2(t),function(t){var e=t.objectStore(Tr.store);e.createIndex(Tr.readTimeIndex,Tr.readTimeIndexPath,{unique:!1}),e.createIndex(Tr.collectionReadTimeIndex,Tr.collectionReadTimeIndexPath,{unique:!1})}(e)}))),n<10&&r>=10&&(a=a.next((function(){return i.Xr(o)}))),n<11&&r>=11&&(a=a.next((function(){!function(t){t.createObjectStore(Ar.store,{keyPath:Ar.keyPath})}(t),function(t){t.createObjectStore(xr.store,{keyPath:xr.keyPath})}(t)}))),a},t.prototype.Hr=function(t){var e=0;return t.store(Tr.store).hs((function(t,n){e+=si(n)})).next((function(){var n=new Or(e);return t.store(Or.store).put(Or.key,n)}))},t.prototype.zr=function(t){var e=this,n=t.store(mr.store),r=t.store(br.store);return n.rs().next((function(n){return Jn.forEach(n,(function(n){var i=IDBKeyRange.bound([n.userId,-1],[n.userId,n.lastAcknowledgedBatchId]);return r.rs(br.userMutationsIndex,i).next((function(r){return Jn.forEach(r,(function(r){y(r.userId===n.userId);var i=Hr(e.Qt,r);return ai(t,n.userId,i).next((function(){}))}))}))}))}))},t.prototype.Jr=function(t){var e=t.store(Ir.store),n=t.store(Tr.store);return t.store(Cr.store).get(Cr.key).next((function(t){var r=[];return n.hs((function(n,i){var o=new M(n),a=function(t){return[0,hr(t)]}(o);r.push(e.get(a).next((function(n){return n?Jn.resolve():function(n){return e.put(new Ir(0,hr(n),t.highestListenSequenceNumber))}(o)})))})).next((function(){return Jn.Mn(r)}))}))},t.prototype.Yr=function(t,e){t.createObjectStore(kr.store,{keyPath:kr.keyPath});var n=e.store(kr.store),r=new Jr,i=function(t){if(r.add(t)){var e=t.tt(),i=t.X();return n.put({collectionId:e,parent:hr(i)})}};return e.store(Tr.store).hs({us:!0},(function(t,e){var n=new M(t);return i(n.X())})).next((function(){return e.store(wr.store).hs({us:!0},(function(t,e){t[0];var n=t[1],r=(t[2],vr(n));return i(r.X())}))}))},t.prototype.Xr=function(t){var e=this,n=t.store(Sr.store);return n.hs((function(t,r){var i=Wr(r),o=Kr(e.Qt,i);return n.put(o)}))},t}();function Ai(t){t.createObjectStore(Ir.store,{keyPath:Ir.keyPath}).createIndex(Ir.documentTargetsIndex,Ir.documentTargetsKeyPath,{unique:!0}),t.createObjectStore(Sr.store,{keyPath:Sr.keyPath}).createIndex(Sr.queryTargetsIndexName,Sr.queryTargetsKeyPath,{unique:!0}),t.createObjectStore(Cr.store)}var xi="Failed to obtain exclusive access to the persistence layer. To allow shared access, multi-tab synchronization has to be enabled in all tabs. If you are using `experimentalForceOwningTab:true`, make sure that only one tab has persistence enabled at any given time.",Pi=function(){function t(e,n,r,i,o,a,s,u,c,l){if(this.allowTabSynchronization=e,this.persistenceKey=n,this.clientId=r,this.Zr=o,this.window=a,this.document=s,this.eo=c,this.no=l,this.so=null,this.io=!1,this.isPrimary=!1,this.networkEnabled=!0,this.ro=null,this.inForeground=!1,this.oo=null,this.co=null,this.ao=Number.NEGATIVE_INFINITY,this.uo=function(t){return Promise.resolve()},!t.Kn())throw new S(O.UNIMPLEMENTED,"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");this.Ti=new Ei(this,i),this.ho=n+"main",this.Qt=new Mr(u),this.lo=new tr(this.ho,11,new Ni(this.Qt)),this._o=new di(this.Ti,this.Qt),this.Ei=new Zr,this.fo=function(t,e){return new Oi(t,e)}(this.Qt,this.Ei),this.wo=new Qr,this.window&&this.window.localStorage?this.Eo=this.window.localStorage:(this.Eo=null,!1===l&&h("IndexedDbPersistence","LocalStorage is unavailable. As a result, persistence may not work reliably. In particular enablePersistence() could fail immediately after refreshing the page."))}return t.prototype.start=function(){var t=this;return this.To().then((function(){if(!t.isPrimary&&!t.allowTabSynchronization)throw new S(O.FAILED_PRECONDITION,xi);return t.Io(),t.mo(),t.Ao(),t.runTransaction("getHighestListenSequenceNumber","readonly",(function(e){return t._o.Ki(e)}))})).then((function(e){t.so=new R(e,t.eo)})).then((function(){t.io=!0})).catch((function(e){return t.lo&&t.lo.close(),Promise.reject(e)}))},t.prototype.Ro=function(t){var e=this;return this.uo=function(n){return Object(a.b)(e,void 0,void 0,(function(){return Object(a.d)(this,(function(e){return this.Er?[2,t(n)]:[2]}))}))},t(this.isPrimary)},t.prototype.Po=function(t){var e=this;this.lo.Xn((function(n){return Object(a.b)(e,void 0,void 0,(function(){return Object(a.d)(this,(function(e){switch(e.label){case 0:return null===n.newVersion?[4,t()]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}
2))}))}))},t.prototype.yo=function(t){var e=this;this.networkEnabled!==t&&(this.networkEnabled=t,this.Zr.Ps((function(){return Object(a.b)(e,void 0,void 0,(function(){return Object(a.d)(this,(function(t){switch(t.label){case 0:return this.Er?[4,this.To()]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))})))},t.prototype.To=function(){var t=this;return this.runTransaction("updateClientMetadataAndTryBecomePrimary","readwrite",(function(e){return ji(e).put(new Nr(t.clientId,Date.now(),t.networkEnabled,t.inForeground)).next((function(){if(t.isPrimary)return t.Vo(e).next((function(e){e||(t.isPrimary=!1,t.Zr.po((function(){return t.uo(!1)})))}))})).next((function(){return t.bo(e)})).next((function(n){return t.isPrimary&&!n?t.vo(e).next((function(){return!1})):!!n&&t.So(e).next((function(){return!0}))}))})).catch((function(e){if(rr(e))return f("IndexedDbPersistence","Failed to extend owner lease: ",e),t.isPrimary;if(!t.allowTabSynchronization)throw e;return f("IndexedDbPersistence","Releasing owner lease after error during lease refresh",e),!1})).then((function(e){t.isPrimary!==e&&t.Zr.po((function(){return t.uo(e)})),t.isPrimary=e}))},t.prototype.Vo=function(t){var e=this;return Ri(t).get(gr.key).next((function(t){return Jn.resolve(e.Do(t))}))},t.prototype.Co=function(t){return ji(t).delete(this.clientId)},t.prototype.xo=function(){return Object(a.b)(this,void 0,void 0,(function(){var t,e,n,r,i=this;return Object(a.d)(this,(function(o){switch(o.label){case 0:return!this.isPrimary||this.No(this.ao,18e5)?[3,2]:(this.ao=Date.now(),[4,this.runTransaction("maybeGarbageCollectMultiClientState","readwrite-primary",(function(t){var e=jr(t,Nr.store);return e.rs().next((function(t){var n=i.$o(t,18e5),r=t.filter((function(t){return-1===n.indexOf(t)}));return Jn.forEach(r,(function(t){return e.delete(t.clientId)})).next((function(){return r}))}))})).catch((function(){return[]}))]);case 1:if(t=o.sent(),this.Eo)for(e=0,n=t;e<n.length;e++)r=n[e],this.Eo.removeItem(this.Fo(r.clientId));o.label=2;case 2:return[2]}}
2))}))},t.prototype.Ao=function(){var t=this;this.co=this.Zr.Tr("client_metadata_refresh",4e3,(function(){return t.To().then((function(){return t.xo()})).then((function(){return t.Ao()}))}))},t.prototype.Do=function(t){return!!t&&t.ownerId===this.clientId},t.prototype.bo=function(t){var e=this;return this.no?Jn.resolve(!0):Ri(t).get(gr.key).next((function(n){if(null!==n&&e.No(n.leaseTimestampMs,5e3)&&!e.Oo(n.ownerId)){if(e.Do(n)&&e.networkEnabled)return!0;if(!e.Do(n)){if(!n.allowTabSynchronization)throw new S(O.FAILED_PRECONDITION,xi);return!1}}return!(!e.networkEnabled||!e.inForeground)||ji(t).rs().next((function(t){return void 0===e.$o(t,5e3).find((function(t){if(e.clientId!==t.clientId){var n=!e.networkEnabled&&t.networkEnabled,r=!e.inForeground&&t.inForeground,i=e.networkEnabled===t.networkEnabled;if(n||r&&i)return!0}return!1}))}))})).next((function(t){return e.isPrimary!==t&&f("IndexedDbPersistence","Client "+(t?"is":"is not")+" eligible for a primary lease."),t}))},t.prototype.ko=function(){return Object(a.b)(this,void 0,void 0,(function(){var t=this;return Object(a.d)(this,(function(e){switch(e.label){case 0:return this.io=!1,this.Mo(),this.co&&(this.co.cancel(),this.co=null),this.Lo(),this.Bo(),[4,this.lo.runTransaction("shutdown","readwrite",[gr.store,Nr.store],(function(e){var n=new Rr(e,R.q);return t.vo(n).next((function(){return t.Co(n)}))}))];case 1:return e.sent(),this.lo.close(),this.qo(),[2]}}))}))},t.prototype.$o=function(t,e){var n=this;return t.filter((function(t){return n.No(t.updateTimeMs,e)&&!n.Oo(t.clientId)}))},t.prototype.Uo=function(){var t=this;return this.runTransaction("getActiveClients","readonly",(function(e){return ji(e).rs().next((function(e){return t.$o(e,18e5).map((function(t){return t.clientId}))}))}))},Object.defineProperty(t.prototype,"Er",{get:function(){return this.io},enumerable:!1,configurable:!0}),t.prototype.Qo=function(t){return ui.mi(t,this.Qt,this.Ei,this.Ti)},t.prototype.Sr=function(){return this._o},t.prototype.$r=function(){return this.fo},t.prototype.Ko=function(){return this.Ei},t.prototype.Wo=function(){return this.wo},t.prototype.runTransaction=function(t,e,n){var r=this;f("IndexedDbPersistence","Starting transaction:",t);var i,o="readonly"===e?"readonly":"readwrite";return this.lo.runTransaction(t,o,Pr,(function(o){return i=new Rr(o,r.so?r.so.next():R.q),"readwrite-primary"===e?r.Vo(i).next((function(t){return!!t||r.bo(i)})).next((function(e){if(!e)throw h("Failed to obtain primary lease for action '"+t+"'."),r.isPrimary=!1,r.Zr.po((function(){return r.uo(!1)})),new S(O.FAILED_PRECONDITION,lr);return n(i)})).next((function(t){return r.So(i).next((function(){return t}))})):r.jo(i).next((function(){return n(i)}))})).then((function(t){return i.Vs(),t}))},t.prototype.jo=function(t){var e=this;return Ri(t).get(gr.key).next((function(t){if(null!==t&&e.No(t.leaseTimestampMs,5e3)&&!e.Oo(t.ownerId)&&!e.Do(t)&&!(e.no||e.allowTabSynchronization&&t.allowTabSynchronization))throw new S(O.FAILED_PRECONDITION,xi)}))},t.prototype.So=function(t){var e=new gr(this.clientId,this.allowTabSynchronization,Date.now());return Ri(t).put(gr.key,e)},t.Kn=function(){return tr.Kn()},t.prototype.vo=function(t){var e=this,n=Ri(t);return n.get(gr.key).next((function(t){return e.Do(t)?(f("IndexedDbPersistence","Releasing primary lease."),n.delete(gr.key)):Jn.resolve()}))},t.prototype.No=function(t,e){var n=Date.now();return!(t<n-e||t>n&&(h("Detected an update time that is in the future: "+t+" > "+n),1))},t.prototype.Io=function(){var t=this;null!==this.document&&"function"==typeof this.document.addEventListener&&(this.oo=function(){t.Zr.Ps((function(){return t.inForeground="visible"===t.document.visibilityState,t.To()}))},this.document.addEventListener("visibilitychange",this.oo),this.inForeground="visible"===this.document.visibilityState)},t.prototype.Lo=function(){this.oo&&(this.document.removeEventListener("visibilitychange",this.oo),this.oo=null)},t.prototype.mo=function(){var t,e=this;"function"==typeof(null===(t=this.window)||void 0===t?void 0:t.addEventListener)&&(this.ro=function(){e.Mo(),e.Zr.Ps((function(){return e.ko()}))},this.window.addEventListener("unload",this.ro))},t.prototype.Bo=function(){this.ro&&(this.window.removeEventListener("unload",this.ro),this.ro=null)},t.prototype.Oo=function(t){var e;try{var n=null!==(null===(e=this.Eo)||void 0===e?void 0:e.getItem(this.Fo(t)));return f("IndexedDbPersistence","Client '"+t+"' "+(n?"is":"is not")+" zombied in LocalStorage"),n}catch(t){return h("IndexedDbPersistence","Failed to get zombied client id.",t),!1}},t.prototype.Mo=function(){if(this.Eo)try{this.Eo.setItem(this.Fo(this.clientId),String(Date.now()))}catch(t){h("Failed to set zombie client id.",t)}},t.prototype.qo=function(){if(this.Eo)try{this.Eo.removeItem(this.Fo(this.clientId))}catch(t){}},t.prototype.Fo=function(t){return"firestore_zombie_"+this.persistenceKey+"_"+t},t}();function Ri(t){return jr(t,gr.store)}function ji(t){return jr(t,Nr.store)}function Di(t,e){var n=t.projectId;return t.o||(n+="."+t.database),"firestore/"+e+"/"+n+"/"}var Li=function(t,e){this.progress=t,this.Go=e},Mi=function(){function t(t,e,n){this.fo=t,this.zo=e,this.Ei=n}return t.prototype.Ho=function(t,e){var n=this;return this.zo.bi(t,e).next((function(r){return n.Jo(t,e,r)}))},t.prototype.Jo=function(t,e,n){return this.fo._i(t,e).next((function(t){for(var r=0,i=n;r<i.length;r++)t=i[r].Cs(e,t);return t}))},t.prototype.Yo=function(t,e,n){var r=Xe();return e.forEach((function(t,e){for(var i=0,o=n;i<o.length;i++)e=o[i].Cs(t,e);r=r.zt(t,e)})),r},t.prototype.Xo=function(t,e){var n=this;return this.fo.getEntries(t,e).next((function(e){return n.Zo(t,e)}))},t.prototype.Zo=function(t,e){var n=this;return this.zo.vi(t,e).next((function(r){var i=n.Yo(t,e,r),o=Ye();
2return i.forEach((function(t,e){e||(e=new bt(t,D.min())),o=o.zt(t,e)})),o}))},t.prototype.Kr=function(t,e,n){return function(t){return V.wt(t.path)&&null===t.collectionGroup&&0===t.filters.length}(e)?this.tc(t,e.path):Qt(e)?this.ec(t,e,n):this.nc(t,e,n)},t.prototype.tc=function(t,e){return this.Ho(t,new V(e)).next((function(t){var e=Je();return t instanceof mt&&(e=e.zt(t.key,t)),e}))},t.prototype.ec=function(t,e,n){var r=this,i=e.collectionGroup,o=Je();return this.Ei.Us(t,i).next((function(a){return Jn.forEach(a,(function(a){var s=function(t,e){return new qt(e,null,t.xt.slice(),t.filters.slice(),t.limit,t.limitType,t.startAt,t.endAt)}(e,a.child(i));return r.nc(t,s,n).next((function(t){t.forEach((function(t,e){o=o.zt(t,e)}))}))})).next((function(){return o}))}))},t.prototype.nc=function(t,e,n){var r,i,o=this;return this.fo.Kr(t,e,n).next((function(n){return r=n,o.zo.Di(t,e)})).next((function(e){return i=e,o.sc(t,i,r).next((function(t){r=t;for(var e=0,n=i;e<n.length;e++)for(var o=n[e],a=0,s=o.mutations;a<s.length;a++){var u=s[a],c=u.key,l=Ie(u,r.get(c),o.vs);r=l instanceof mt?r.zt(c,l):r.remove(c)}}))})).next((function(){return r.forEach((function(t,n){ee(e,n)||(r=r.remove(t))})),r}))},t.prototype.sc=function(t,e,n){for(var r=nn(),i=0,o=e;i<o.length;i++)for(var a=0,s=o[i].mutations;a<s.length;a++){var u=s[a];u instanceof xe&&null===n.get(u.key)&&(r=r.add(u.key))}var c=n;return this.fo.getEntries(t,r).next((function(t){return t.forEach((function(t,e){null!==e&&e instanceof mt&&(c=c.zt(t,e))})),c}))},t}(),Fi=function(){function t(t,e,n,r){this.targetId=t,this.fromCache=e,this.ic=n,this.rc=r}return t.oc=function(e,n){for(var r=nn(),i=nn(),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 t(e,n.fromCache,r,i)},t}(),Ui=function(){function t(){}return t.prototype.cc=function(t){this.ac=t},t.prototype.Kr=function(t,e,n,i){var o=this;return function(t){return 0===t.filters.length&&null===t.limit&&null==t.startAt&&null==t.endAt&&(0===t.xt.length||1===t.xt.length&&t.xt[0].field.ut())}(e)||n.isEqual(D.min())?this.uc(t,e):this.ac.Xo(t,i).next((function(a){var s=o.hc(e,a);return(Ht(e)||Wt(e))&&o.lc(e.limitType,s,i,n)?o.uc(t,e):(l()<=r.a.DEBUG&&f("QueryEngine","Re-using previous result from %s to execute query: %s",n.toString(),te(e)),o.ac.Kr(t,e,n).next((function(t){return s.forEach((function(e){t=t.zt(e.key,e)})),t})))}))},t.prototype.hc=function(t,e){var n=new Ke(ne(t));return e.forEach((function(e,r){r instanceof mt&&ee(t,r)&&(n=n.add(r))})),n},t.prototype.lc=function(t,e,n,r){if(n.size!==e.size)return!0;var i="F"===t?e.last():e.first();return!!i&&(i.hasPendingWrites||i.version._(r)>0)},t.prototype.uc=function(t,e){return l()<=r.a.DEBUG&&f("QueryEngine","Using full collection scan to execute query:",te(e)),this.ac.Kr(t,e,D.min())},t}(),Vi=function(){function t(t,e,n,r){this.persistence=t,this._c=e,this.Qt=r,this.fc=new ze(w),this.dc=new ii((function(t){return Tt(t)}),Ot),this.wc=D.min(),this.zo=t.Qo(n),this.Ec=t.$r(),this._o=t.Sr(),this.Tc=new Mi(this.Ec,this.zo,this.persistence.Ko()),this.wo=t.Wo(),this._c.cc(this.Tc)}return t.prototype.Ir=function(t){var e=this;return this.persistence.runTransaction("Collect garbage","readwrite-primary",(function(n){return t.Vr(n,e.fc)}))},t}();function qi(t,e,n,r){return new Vi(t,e,n,r)}function Bi(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i,o;return Object(a.d)(this,(function(a){switch(a.label){case 0:return n=g(t),r=n.zo,i=n.Tc,[4,n.persistence.runTransaction("Handle user change","readonly",(function(t){var o;return n.zo.pi(t).next((function(a){return o=a,r=n.persistence.Qo(e),i=new Mi(n.Ec,r,n.persistence.Ko()),r.pi(t)})).next((function(e){for(var n=[],r=[],a=nn(),s=0,u=o;s<u.length;s++){var c=u[s];n.push(c.batchId);for(var l=0,f=c.mutations;l<f.length;l++){var h=f[l];a=a.add(h.key)}}for(var p=0,d=e;p<d.length;p++){var v=d[p];r.push(v.batchId);for(var y=0,g=v.mutations;y<g.length;y++){var m=g[y];a=a.add(m.key)}}return i.Xo(t,a).next((function(t){return{Ic:t,mc:n,Ac:r}}))}))}))];case 1:return o=a.sent(),[2,(n.zo=r,n.Tc=i,n._c.cc(n.Tc),o)]}}))}))}function zi(t,e){var n=g(t);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",(function(t){var r=e.batch.keys(),i=n.Ec.Nr({Wr:!0});return function(t,e,n,r){var i=n.batch,o=i.keys(),a=Jn.resolve();return o.forEach((function(t){a=a.next((function(){return r._i(e,t)})).next((function(e){var o=e,a=n.$s.get(t);y(null!==a),(!o||o.version._(a)<0)&&(o=i.Ss(t,o,n))&&r.ai(o,n.Ns)}))})),a.next((function(){return t.zo.Ci(e,i)}))}(n,t,e,i).next((function(){return i.apply(t)})).next((function(){return n.zo.$i(t)})).next((function(){return n.Tc.Xo(t,r)}
2))}))}function Hi(t){var e=g(t);return e.persistence.runTransaction("Get last remote snapshot version","readonly",(function(t){return e._o.Qi(t)}))}function Wi(t,e){var n=g(t),r=e.Ot,i=n.fc;return n.persistence.runTransaction("Apply remote event","readwrite-primary",(function(t){var o=n.Ec.Nr({Wr:!0});i=n.fc;var a=[];e.$e.forEach((function(e,o){var s=i.get(o);if(s){a.push(n._o.sr(t,e.Qe,o).next((function(){return n._o.er(t,e.qe,o)})));var u=e.resumeToken;if(u.l()>0){var c=s.Mt(u,r).kt(t.bs);i=i.zt(o,c),function(t,e,n){return y(e.resumeToken.l()>0),0===t.resumeToken.l()||e.Ot.W()-t.Ot.W()>=3e8||n.qe.size+n.Ue.size+n.Qe.size>0}(s,c,e)&&a.push(n._o.Hi(t,c))}}}));var s=Ye();if(e.Oe.forEach((function(r,i){e.ke.has(r)&&a.push(n.persistence.Ti.Fr(t,r))})),a.push(Ki(t,o,e.Oe,r,void 0).next((function(t){s=t}))),!r.isEqual(D.min())){var u=n._o.Qi(t).next((function(e){return n._o.Wi(t,t.bs,r)}));a.push(u)}return Jn.Mn(a).next((function(){return o.apply(t)})).next((function(){return n.Tc.Zo(t,s)}))})).then((function(t){return n.fc=i,t}))}function Ki(t,e,n,r,i){var o=nn();return n.forEach((function(t){return o=o.add(t)})),e.getEntries(t,o).next((function(t){var o=Ye();return n.forEach((function(n,a){var s=t.get(n),u=(null==i?void 0:i.get(n))||r;a instanceof bt&&a.version.isEqual(D.min())?(e.li(n,u),o=o.zt(n,a)):null==s||a.version._(s.version)>0||0===a.version._(s.version)&&s.hasPendingWrites?(e.ai(a,u),o=o.zt(n,a)):f("LocalStore","Ignoring outdated watch update for ",n,". Current version:",s.version," Watch version:",a.version)})),o}))}function Gi(t,e){var n=g(t);return n.persistence.runTransaction("Get next mutation batch","readonly",(function(t){return void 0===e&&(e=-1),n.zo.gi(t,e)}))}function Qi(t,e){var n=g(t);return n.persistence.runTransaction("Allocate target","readwrite",(function(t){var r;return n._o.tr(t,e).next((function(i){return i?(r=i,Jn.resolve(r)):n._o.Bi(t).next((function(i){return r=new ie(e,i,0,t.bs),n._o.ji(t,r).next((function(){return r}))}))}))})).then((function(t){var r=n.fc.get(t.targetId);return(null===r||t.Ot._(r.Ot)>0)&&(n.fc=n.fc.zt(t.targetId,t),n.dc.set(e,t.targetId)),t}))}function Yi(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r,i,o,s;return Object(a.d)(this,(function(a){switch(a.label){case 0:r=g(t),i=r.fc.get(e),o=n?"readwrite":"readwrite-primary",a.label=1;case 1:return a.trys.push([1,4,,5]),n?[3,3]:[4,r.persistence.runTransaction("Release target",o,(function(t){return r.persistence.Ti.removeTarget(t,i)}))];case 2:a.sent(),a.label=3;case 3:return[3,5];case 4:if(!rr(s=a.sent()))throw s;return f("LocalStore","Failed to update sequence numbers for target "+e+": "+s),[3,5];case 5:return r.fc=r.fc.remove(e),r.dc.delete(i.target),[2]}}))}))}function Xi(t,e,n){var r=g(t),i=D.min(),o=nn();return r.persistence.runTransaction("Execute query","readonly",(function(t){return function(t,e,n){var r=g(t),i=r.dc.get(n);return void 0!==i?Jn.resolve(r.fc.get(i)):r._o.tr(e,n)}(r,t,Xt(e)).next((function(e){if(e)return i=e.lastLimboFreeSnapshotVersion,r._o.rr(t,e.targetId).next((function(t){o=t}))})).next((function(){return r._c.Kr(t,e,n?i:D.min(),n?o:nn())})).next((function(t){return{documents:t,Rc:o}}))}))}function $i(t,e){var n=g(t),r=g(n._o),i=n.fc.get(e);return i?Promise.resolve(i.target):n.persistence.runTransaction("Get target data","readonly",(function(t){return r.Sn(t,e).next((function(t){return t?t.target:null}))}))}function Ji(t){var e=g(t);return e.persistence.runTransaction("Get new document changes","readonly",(function(t){return function(t,e,n){var r=g(t),i=Ye(),o=Vr(n),a=Ci(e),s=IDBKeyRange.lowerBound(o,!0);return a.hs({index:Tr.readTimeIndex,range:s},(function(t,e){var n=Fr(r.Qt,e);i=i.zt(n.key,n),o=e.readTime})).next((function(){return{Go:i,readTime:qr(o)}}))}(e.Ec,t,e.wc)})).then((function(t){var n=t.Go,r=t.readTime;return e.wc=r,n}))}function Zi(t){return Object(a.b)(this,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){return[2,(e=g(t)).persistence.runTransaction("Synchronize last document change read time","readonly",(function(t){return function(t){var e=Ci(t),n=D.min();return e.hs({index:Tr.readTimeIndex,reverse:!0},(function(t,e,r){e.readTime&&(n=qr(e.readTime)),r.done()})).next((function(){return n}))}(t)})).then((function(t){e.wc=t}))]}))}))}function to(t,e,n,r){return Object(a.b)(this,void 0,void 0,(function(){var i,o,s,u,c,l,f,h,p,d;return Object(a.d)(this,(function(a){switch(a.label){case 0:for(i=g(t),o=nn(),s=Ye(),u=tn(),c=0,l=n;c<l.length;c++)f=l[c],h=e.Pc(f.metadata.name),f.document&&(o=o.add(h)),s=s.zt(h,e.yc(f)),u=u.zt(h,e.gc(f.metadata.readTime));return p=i.Ec.Nr({Wr:!0}),[4,Qi(i,function(t){return Xt(zt(M.ot("__bundle__/docs/"+t)))}(r))];case 1:return d=a.sent(),[2,i.persistence.runTransaction("Apply bundle documents","readwrite",(function(t){return Ki(t,p,s,D.min(),u).next((function(e){return p.apply(t),e})).next((function(e){return i._o.Yi(t,d.targetId).next((function(){return i._o.er(t,o,d.targetId)})).next((function(){return i.Tc.Zo(t,e)}))}
2))}))]}}))}))}function eo(t,e,n){return void 0===n&&(n=nn()),Object(a.b)(this,void 0,void 0,(function(){var r,i;return Object(a.d)(this,(function(o){switch(o.label){case 0:return[4,Qi(t,Xt(Gr(e.bundledQuery)))];case 1:return r=o.sent(),[2,(i=g(t)).persistence.runTransaction("Save named query","readwrite",(function(t){var o=On(e.readTime);if(r.Ot._(o)>=0)return i.wo.Ls(t,e);var a=r.Mt(T.T,o);return i.fc=i.fc.zt(a.targetId,a),i._o.Hi(t,a).next((function(){return i._o.Yi(t,r.targetId)})).next((function(){return i._o.er(t,n,r.targetId)})).next((function(){return i.wo.Ls(t,e)}))}))]}}))}))}var no=function(){function t(t){this.Qt=t,this.Vc=new Map,this.bc=new Map}return t.prototype.Os=function(t,e){return Jn.resolve(this.Vc.get(e))},t.prototype.ks=function(t,e){var n;return this.Vc.set(e.id,{id:(n=e).id,version:n.version,createTime:On(n.createTime)}),Jn.resolve()},t.prototype.Ms=function(t,e){return Jn.resolve(this.bc.get(e))},t.prototype.Ls=function(t,e){return this.bc.set(e.name,function(t){return{name:t.name,query:Gr(t.bundledQuery),readTime:On(t.readTime)}}(e)),Jn.resolve()},t}(),ro=function(){function t(){this.vc=new Ke(io.Sc),this.Dc=new Ke(io.Cc)}return t.prototype.et=function(){return this.vc.et()},t.prototype.nr=function(t,e){var n=new io(t,e);this.vc=this.vc.add(n),this.Dc=this.Dc.add(n)},t.prototype.xc=function(t,e){var n=this;t.forEach((function(t){return n.nr(t,e)}))},t.prototype.ir=function(t,e){this.Nc(new io(t,e))},t.prototype.$c=function(t,e){var n=this;t.forEach((function(t){return n.ir(t,e)}))},t.prototype.Fc=function(t){var e=this,n=new V(new M([])),r=new io(n,t),i=new io(n,t+1),o=[];return this.Dc.me([r,i],(function(t){e.Nc(t),o.push(t.key)})),o},t.prototype.Oc=function(){var t=this;this.vc.forEach((function(e){return t.Nc(e)}))},t.prototype.Nc=function(t){this.vc=this.vc.delete(t),this.Dc=this.Dc.delete(t)},t.prototype.kc=function(t){var e=new V(new M([])),n=new io(e,t),r=new io(e,t+1),i=nn();return this.Dc.me([n,r],(function(t){i=i.add(t.key)})),i},t.prototype.Fi=function(t){var e=new io(t,0),n=this.vc.Re(e);return null!==n&&t.isEqual(n.key)},t}(),io=function(){function t(t,e){this.key=t,this.Mc=e}return t.Sc=function(t,e){return V.H(t.key,e.key)||w(t.Mc,e.Mc)},t.Cc=function(t,e){return w(t.Mc,e.Mc)||V.H(t.key,e.key)},t}(),oo=function(){function t(t,e){this.Ei=t,this.Ti=e,this.zo=[],this.Lc=1,this.Bc=new Ke(io.Sc)}return t.prototype.Ai=function(t){return Jn.resolve(0===this.zo.length)},t.prototype.Ri=function(t,e,n,r){var i=this.Lc;this.Lc++,this.zo.length>0&&this.zo[this.zo.length-1];var o=new Dr(i,e,n,r);this.zo.push(o);for(var a=0,s=r;a<s.length;a++){var u=s[a];this.Bc=this.Bc.add(new io(u.key,i)),this.Ei.qs(t,u.key.path.X())}return Jn.resolve(o)},t.prototype.Pi=function(t,e){return Jn.resolve(this.qc(e))},t.prototype.gi=function(t,e){var n=e+1,r=this.Uc(n),i=r<0?0:r;return Jn.resolve(this.zo.length>i?this.zo[i]:null)},t.prototype.Vi=function(){return Jn.resolve(0===this.zo.length?-1:this.Lc-1)},t.prototype.pi=function(t){return Jn.resolve(this.zo.slice())},t.prototype.bi=function(t,e){var n=this,r=new io(e,0),i=new io(e,Number.POSITIVE_INFINITY),o=[];return this.Bc.me([r,i],(function(t){var e=n.qc(t.Mc);o.push(e)})),Jn.resolve(o)},t.prototype.vi=function(t,e){var n=this,r=new Ke(w);return e.forEach((function(t){var e=new io(t,0),i=new io(t,Number.POSITIVE_INFINITY);n.Bc.me([e,i],(function(t){r=r.add(t.Mc)}))})),Jn.resolve(this.Qc(r))},t.prototype.Di=function(t,e){var n=e.path,r=n.length+1,i=n;V.wt(i)||(i=i.child(""));var o=new io(new V(i),0),a=new Ke(w);return this.Bc.Ae((function(t){var e=t.key.path;return!!n.nt(e)&&(e.length===r&&(a=a.add(t.Mc)),!0)}),o),Jn.resolve(this.Qc(a))},t.prototype.Qc=function(t){var e=this,n=[];return t.forEach((function(t){var r=e.qc(t);null!==r&&n.push(r)})),n},t.prototype.Ci=function(t,e){var n=this;y(0===this.Kc(e.batchId,"removed")),this.zo.shift();var r=this.Bc;return Jn.forEach(e.mutations,(function(i){var o=new io(i.key,e.batchId);return r=r.delete(o),n.Ti.Ni(t,i.key)})).next((function(){n.Bc=r}))},t.prototype.xi=function(t){},t.prototype.Fi=function(t,e){var n=new io(e,0),r=this.Bc.Re(n);return Jn.resolve(e.isEqual(r&&r.key))},t.prototype.$i=function(t){return this.zo.length,Jn.resolve()},t.prototype.Kc=function(t,e){return this.Uc(t)},t.prototype.Uc=function(t){return 0===this.zo.length?0:t-this.zo[0].batchId},t.prototype.qc=function(t){var e=this.Uc(t);return e<0||e>=this.zo.length?null:this.zo[e]},t}(),ao=function(){function t(t,e){this.Ei=t,this.Wc=e,this.docs=new ze(V.H),this.size=0}return t.prototype.ai=function(t,e,n){var r=e.key,i=this.docs.get(r),o=i?i.size:0,a=this.Wc(e);return this.docs=this.docs.zt(r,{hi:e,size:a,readTime:n}),this.size+=a-o,this.Ei.qs(t,r.path.X())},t.prototype.li=function(t){var e=this.docs.get(t);e&&(this.docs=this.docs.remove(t),this.size-=e.size)},t.prototype._i=function(t,e){var n=this.docs.get(e);return Jn.resolve(n?n.hi:null)},t.prototype.getEntries=function(t,e){var n=this,r=Xe();return e.forEach((function(t){var e=n.docs.get(t);r=r.zt(t,e?e.hi:null)})),Jn.resolve(r)},t.prototype.Kr=function(t,e,n){for(var r=Je(),i=new V(e.path.child("")),o=this.docs.ee(i);o.ce();){var a=o.oe(),s=a.key,u=a.value,c=u.hi,l=u.readTime;if(!e.path.nt(s.path))break;l._(n)<=0||c instanceof mt&&ee(e,c)&&(r=r.zt(c.key,c))}return Jn.resolve(r)}
2,t.prototype.jc=function(t,e){return Jn.forEach(this.docs,(function(t){return e(t)}))},t.prototype.Nr=function(t){return new so(this)},t.prototype.Or=function(t){return Jn.resolve(this.size)},t}(),so=function(t){function e(e){var n=this;return(n=t.call(this)||this).jr=e,n}return Object(a.c)(e,t),e.prototype.wi=function(t){var e=this,n=[];return this.ri.forEach((function(r,i){i&&i.hi?n.push(e.jr.ai(t,i.hi,e.ci(r))):e.jr.li(r)})),Jn.Mn(n)},e.prototype.fi=function(t,e){return this.jr._i(t,e)},e.prototype.di=function(t,e){return this.jr.getEntries(t,e)},e}(oi),uo=function(){function t(t){this.persistence=t,this.Gc=new ii((function(t){return Tt(t)}),Ot),this.lastRemoteSnapshotVersion=D.min(),this.highestTargetId=0,this.zc=0,this.Hc=new ro,this.targetCount=0,this.Jc=pi.Mi()}return t.prototype.In=function(t,e){return this.Gc.forEach((function(t,n){return e(n)})),Jn.resolve()},t.prototype.Qi=function(t){return Jn.resolve(this.lastRemoteSnapshotVersion)},t.prototype.Ki=function(t){return Jn.resolve(this.zc)},t.prototype.Bi=function(t){return this.highestTargetId=this.Jc.next(),Jn.resolve(this.highestTargetId)},t.prototype.Wi=function(t,e,n){return n&&(this.lastRemoteSnapshotVersion=n),e>this.zc&&(this.zc=e),Jn.resolve()},t.prototype.Gi=function(t){this.Gc.set(t.target,t);var e=t.targetId;e>this.highestTargetId&&(this.Jc=new pi(e),this.highestTargetId=e),t.sequenceNumber>this.zc&&(this.zc=t.sequenceNumber)},t.prototype.ji=function(t,e){return this.Gi(e),this.targetCount+=1,Jn.resolve()},t.prototype.Hi=function(t,e){return this.Gi(e),Jn.resolve()},t.prototype.Ji=function(t,e){return this.Gc.delete(e.target),this.Hc.Fc(e.targetId),this.targetCount-=1,Jn.resolve()},t.prototype.Xi=function(t,e,n){var r=this,i=0,o=[];return this.Gc.forEach((function(a,s){s.sequenceNumber<=e&&null===n.get(s.targetId)&&(r.Gc.delete(a),o.push(r.Yi(t,s.targetId)),i++)})),Jn.Mn(o).next((function(){return i}))},t.prototype.Zi=function(t){return Jn.resolve(this.targetCount)},t.prototype.tr=function(t,e){var n=this.Gc.get(e)||null;return Jn.resolve(n)},t.prototype.er=function(t,e,n){return this.Hc.xc(e,n),Jn.resolve()},t.prototype.sr=function(t,e,n){this.Hc.$c(e,n);var r=this.persistence.Ti,i=[];return r&&e.forEach((function(e){i.push(r.Ni(t,e))})),Jn.Mn(i)},t.prototype.Yi=function(t,e){return this.Hc.Fc(e),Jn.resolve()},t.prototype.rr=function(t,e){var n=this.Hc.kc(e);return Jn.resolve(n)},t.prototype.Fi=function(t,e){return Jn.resolve(this.Hc.Fi(e))},t}(),co=function(){function t(t,e){var n=this;this.Yc={},this.so=new R(0),this.io=!1,this.io=!0,this.Ti=t(this),this._o=new uo(this),this.Ei=new $r,this.fo=function(t,e){return new ao(t,(function(t){return n.Ti.Xc(t)}))}(this.Ei),this.Qt=new Mr(e),this.wo=new no(this.Qt)}return t.prototype.start=function(){return Promise.resolve()},t.prototype.ko=function(){return this.io=!1,Promise.resolve()},Object.defineProperty(t.prototype,"Er",{get:function(){return this.io},enumerable:!1,configurable:!0}),t.prototype.Po=function(){},t.prototype.yo=function(){},t.prototype.Ko=function(){return this.Ei},t.prototype.Qo=function(t){var e=this.Yc[t.A()];return e||(e=new oo(this.Ei,this.Ti),this.Yc[t.A()]=e),e},t.prototype.Sr=function(){return this._o},t.prototype.$r=function(){return this.fo},t.prototype.Wo=function(){return this.wo},t.prototype.runTransaction=function(t,e,n){var r=this;f("MemoryPersistence","Starting transaction:",t);var i=new lo(this.so.next());return this.Ti.Zc(),n(i).next((function(t){return r.Ti.ta(i).next((function(){return t}))})).On().then((function(t){return i.Vs(),t}))},t.prototype.ea=function(t,e){return Jn.Ln(Object.values(this.Yc).map((function(n){return function(){return n.Fi(t,e)}})))},t}(),lo=function(t){function e(e){var n=this;return(n=t.call(this)||this).bs=e,n}return Object(a.c)(e,t),e}(fr),fo=function(){function t(t){this.persistence=t,this.na=new ro,this.sa=null}return t.ia=function(e){return new t(e)},Object.defineProperty(t.prototype,"ra",{get:function(){if(this.sa)return this.sa;throw v()},enumerable:!1,configurable:!0}),t.prototype.nr=function(t,e,n){return this.na.nr(n,e),this.ra.delete(n.toString()),Jn.resolve()},t.prototype.ir=function(t,e,n){return this.na.ir(n,e),this.ra.add(n.toString()),Jn.resolve()},t.prototype.Ni=function(t,e){return this.ra.add(e.toString()),Jn.resolve()},t.prototype.removeTarget=function(t,e){var n=this;
2this.na.Fc(e.targetId).forEach((function(t){return n.ra.add(t.toString())}));var r=this.persistence.Sr();return r.rr(t,e.targetId).next((function(t){t.forEach((function(t){return n.ra.add(t.toString())}))})).next((function(){return r.Ji(t,e)}))},t.prototype.Zc=function(){this.sa=new Set},t.prototype.ta=function(t){var e=this,n=this.persistence.$r().Nr();return Jn.forEach(this.ra,(function(r){var i=V._t(r);return e.oa(t,i).next((function(t){t||n.li(i)}))})).next((function(){return e.sa=null,n.apply(t)}))},t.prototype.Fr=function(t,e){var n=this;return this.oa(t,e).next((function(t){t?n.ra.delete(e.toString()):n.ra.add(e.toString())}))},t.prototype.Xc=function(t){return 0},t.prototype.oa=function(t,e){var n=this;return Jn.Ln([function(){return Jn.resolve(n.na.Fi(e))},function(){return n.persistence.Sr().Fi(t,e)},function(){return n.persistence.ea(t,e)}])},t}();function ho(t,e){return"firestore_clients_"+t+"_"+e}function po(t,e,n){var r="firestore_mutations_"+t+"_"+n;return e.m()&&(r+="_"+e.uid),r}function vo(t,e){return"firestore_targets_"+t+"_"+e}var yo=function(){function t(t,e,n,r){this.user=t,this.batchId=e,this.state=n,this.error=r}return t.ca=function(e,n,r){var i,o=JSON.parse(r),a="object"==typeof o&&-1!==["pending","acknowledged","rejected"].indexOf(o.state)&&(void 0===o.error||"object"==typeof o.error);return a&&o.error&&(a="string"==typeof o.error.message&&"string"==typeof o.error.code)&&(i=new S(o.error.code,o.error.message)),a?new t(e,n,o.state,i):(h("SharedClientState","Failed to parse mutation state for ID '"+n+"': "+r),null)},t.prototype.aa=function(){var t={state:this.state,updateTimeMs:Date.now()};return this.error&&(t.error={code:this.error.code,message:this.error.message}),JSON.stringify(t)},t}(),go=function(){function t(t,e,n){this.targetId=t,this.state=e,this.error=n}return t.ca=function(e,n){var r,i=JSON.parse(n),o="object"==typeof i&&-1!==["not-current","current","rejected"].indexOf(i.state)&&(void 0===i.error||"object"==typeof i.error);return o&&i.error&&(o="string"==typeof i.error.message&&"string"==typeof i.error.code)&&(r=new S(i.error.code,i.error.message)),o?new t(e,i.state,r):(h("SharedClientState","Failed to parse target state for ID '"+e+"': "+n),null)},t.prototype.aa=function(){var t={state:this.state,updateTimeMs:Date.now()};return this.error&&(t.error={code:this.error.code,message:this.error.message}),JSON.stringify(t)},t}(),mo=function(){function t(t,e){this.clientId=t,this.activeTargetIds=e}return t.ca=function(e,n){for(var r=JSON.parse(n),i="object"==typeof r&&r.activeTargetIds instanceof Array,o=on(),a=0;i&&a<r.activeTargetIds.length;++a)i=tt(r.activeTargetIds[a]),o=o.add(r.activeTargetIds[a]);return i?new t(e,o):(h("SharedClientState","Failed to parse client data for instance '"+e+"': "+n),null)},t}(),bo=function(){function t(t,e){this.clientId=t,this.onlineState=e}return t.ca=function(e){var n=JSON.parse(e);return"object"==typeof n&&-1!==["Unknown","Online","Offline"].indexOf(n.onlineState)&&"string"==typeof n.clientId?new t(n.clientId,n.onlineState):(h("SharedClientState","Failed to parse online state: "+e),null)},t}(),wo=function(){function t(){this.activeTargetIds=on()}return t.prototype.ua=function(t){this.activeTargetIds=this.activeTargetIds.add(t)},t.prototype.ha=function(t){this.activeTargetIds=this.activeTargetIds.delete(t)},t.prototype.aa=function(){var t={activeTargetIds:this.activeTargetIds.it(),updateTimeMs:Date.now()};return JSON.stringify(t)},t}(),_o=function(){function t(t,e,n,r,i){this.window=t,this.Zr=e,this.persistenceKey=n,this.la=r,this._a=null,this.fa=null,this.k=null,this.da=this.wa.bind(this),this.Ea=new ze(w),this.Er=!1,this.Ta=[];var o=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");this.storage=this.window.localStorage,this.currentUser=i,this.Ia=ho(this.persistenceKey,this.la),this.ma=function(t){return"firestore_sequence_number_"+t}(this.persistenceKey),this.Ea=this.Ea.zt(this.la,new wo),this.Aa=new RegExp("^firestore_clients_"+o+"_([^_]*)$"),this.Ra=new RegExp("^firestore_mutations_"+o+"_(\\d+)(?:_(.*))?$"),this.Pa=new RegExp("^firestore_targets_"+o+"_(\\d+)$"),this.ya=function(t){return"firestore_online_state_"+t}(this.persistenceKey),this.ga=function(t){return"firestore_bundle_loaded_"+t}(this.persistenceKey),this.window.addEventListener("storage",this.da)}return t.Kn=function(t){return!(!t||!t.localStorage)},t.prototype.start=function(){return Object(a.b)(this,void 0,void 0,(function(){var t,e,n,r,i,o,s,u,c,l,f,h=this;return Object(a.d)(this,(function(a){switch(a.label){case 0:return[4,this._a.Uo()];case 1:for(t=a.sent(),e=0,n=t;e<n.length;e++)(r=n[e])!==this.la&&(i=this.getItem(ho(this.persistenceKey,r)))&&(o=mo.ca(r,i))&&(this.Ea=this.Ea.zt(o.clientId,o));
2for(this.Va(),(s=this.storage.getItem(this.ya))&&(u=this.pa(s))&&this.ba(u),c=0,l=this.Ta;c<l.length;c++)f=l[c],this.wa(f);return this.Ta=[],this.window.addEventListener("unload",(function(){return h.ko()})),this.Er=!0,[2]}}))}))},t.prototype.B=function(t){this.setItem(this.ma,JSON.stringify(t))},t.prototype.va=function(){return this.Sa(this.Ea)},t.prototype.Da=function(t){var e=!1;return this.Ea.forEach((function(n,r){r.activeTargetIds.has(t)&&(e=!0)})),e},t.prototype.Ca=function(t){this.xa(t,"pending")},t.prototype.Na=function(t,e,n){this.xa(t,e,n),this.$a(t)},t.prototype.Fa=function(t){var e="not-current";if(this.Da(t)){var n=this.storage.getItem(vo(this.persistenceKey,t));if(n){var r=go.ca(t,n);r&&(e=r.state)}}return this.Oa.ua(t),this.Va(),e},t.prototype.ka=function(t){this.Oa.ha(t),this.Va()},t.prototype.Ma=function(t){return this.Oa.activeTargetIds.has(t)},t.prototype.La=function(t){this.removeItem(vo(this.persistenceKey,t))},t.prototype.Ba=function(t,e,n){this.qa(t,e,n)},t.prototype.Ua=function(t,e,n){var r=this;e.forEach((function(t){r.$a(t)})),this.currentUser=t,n.forEach((function(t){r.Ca(t)}))},t.prototype.Qa=function(t){this.Ka(t)},t.prototype.Wa=function(){this.ja()},t.prototype.ko=function(){this.Er&&(this.window.removeEventListener("storage",this.da),this.removeItem(this.Ia),this.Er=!1)},t.prototype.getItem=function(t){var e=this.storage.getItem(t);return f("SharedClientState","READ",t,e),e},t.prototype.setItem=function(t,e){f("SharedClientState","SET",t,e),this.storage.setItem(t,e)},t.prototype.removeItem=function(t){f("SharedClientState","REMOVE",t),this.storage.removeItem(t)},t.prototype.wa=function(t){var e=this,n=t;if(n.storageArea===this.storage){if(f("SharedClientState","EVENT",n.key,n.newValue),n.key===this.Ia)return void h("Received WebStorage notification for local change. Another client might have garbage-collected our state");this.Zr.po((function(){return Object(a.b)(e,void 0,void 0,(function(){var t,e,r,i,o,s;return Object(a.d)(this,(function(a){if(this.Er){if(null!==n.key)if(this.Aa.test(n.key)){if(null==n.newValue)return t=this.Ga(n.key),[2,this.za(t,null)];if(e=this.Ha(n.key,n.newValue))return[2,this.za(e.clientId,e)]}else if(this.Ra.test(n.key)){if(null!==n.newValue&&(r=this.Ja(n.key,n.newValue)))return[2,this.Ya(r)]}else if(this.Pa.test(n.key)){if(null!==n.newValue&&(i=this.Xa(n.key,n.newValue)))return[2,this.Za(i)]}else if(n.key===this.ya){if(null!==n.newValue&&(o=this.pa(n.newValue)))return[2,this.ba(o)]}else if(n.key===this.ma)(s=function(t){var e=R.q;if(null!=t)try{var n=JSON.parse(t);y("number"==typeof n),e=n}catch(t){h("SharedClientState","Failed to read sequence number from WebStorage",t)}return e}(n.newValue))!==R.q&&this.k(s);else if(n.key===this.ga)return[2,this._a.tu()]}else this.Ta.push(n);return[2]}))}))}))}},Object.defineProperty(t.prototype,"Oa",{get:function(){return this.Ea.get(this.la)},enumerable:!1,configurable:!0}),t.prototype.Va=function(){this.setItem(this.Ia,this.Oa.aa())},t.prototype.xa=function(t,e,n){var r=new yo(this.currentUser,t,e,n),i=po(this.persistenceKey,this.currentUser,t);this.setItem(i,r.aa())},t.prototype.$a=function(t){var e=po(this.persistenceKey,this.currentUser,t);this.removeItem(e)},t.prototype.Ka=function(t){var e={clientId:this.la,onlineState:t};this.storage.setItem(this.ya,JSON.stringify(e))},t.prototype.qa=function(t,e,n){var r=vo(this.persistenceKey,t),i=new go(t,e,n);this.setItem(r,i.aa())},t.prototype.ja=function(){this.setItem(this.ga,"value-not-used")},t.prototype.Ga=function(t){var e=this.Aa.exec(t);return e?e[1]:null},t.prototype.Ha=function(t,e){var n=this.Ga(t);return mo.ca(n,e)},t.prototype.Ja=function(t,e){var n=this.Ra.exec(t),r=Number(n[1]),i=void 0!==n[2]?n[2]:null;return yo.ca(new C(i),r,e)},t.prototype.Xa=function(t,e){var n=this.Pa.exec(t),r=Number(n[1]);return go.ca(r,e)},t.prototype.pa=function(t){return bo.ca(t)},t.prototype.Ya=function(t){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(e){return t.user.uid===this.currentUser.uid?[2,this._a.eu(t.batchId,t.state,t.error)]:(f("SharedClientState","Ignoring mutation for non-active user "+t.user.uid),[2])}))}))},t.prototype.Za=function(t){return this._a.nu(t.targetId,t.state,t.error)},t.prototype.za=function(t,e){var n=this,r=e?this.Ea.zt(t,e):this.Ea.remove(t),i=this.Sa(this.Ea),o=this.Sa(r),a=[],s=[];return o.forEach((function(t){i.has(t)||a.push(t)}
2)),i.forEach((function(t){o.has(t)||s.push(t)})),this._a.su(a,s).then((function(){n.Ea=r}))},t.prototype.ba=function(t){this.Ea.get(t.clientId)&&this.fa(t.onlineState)},t.prototype.Sa=function(t){var e=on();return t.forEach((function(t,n){e=e.Pe(n.activeTargetIds)})),e},t}(),Eo=function(){function t(){this.iu=new wo,this.ru={},this.fa=null,this.k=null}return t.prototype.Ca=function(t){},t.prototype.Na=function(t,e,n){},t.prototype.Fa=function(t){return this.iu.ua(t),this.ru[t]||"not-current"},t.prototype.Ba=function(t,e,n){this.ru[t]=e},t.prototype.ka=function(t){this.iu.ha(t)},t.prototype.Ma=function(t){return this.iu.activeTargetIds.has(t)},t.prototype.La=function(t){delete this.ru[t]},t.prototype.va=function(){return this.iu.activeTargetIds},t.prototype.Da=function(t){return this.iu.activeTargetIds.has(t)},t.prototype.start=function(){return this.iu=new wo,Promise.resolve()},t.prototype.Ua=function(t,e,n){},t.prototype.Qa=function(t){},t.prototype.ko=function(){},t.prototype.B=function(t){},t.prototype.Wa=function(){},t}(),To=function(){function t(){}return t.prototype.ou=function(t){},t.prototype.ko=function(){},t}(),Oo=function(){function t(){var t=this;this.cu=function(){return t.au()},this.uu=function(){return t.hu()},this.lu=[],this._u()}return t.prototype.ou=function(t){this.lu.push(t)},t.prototype.ko=function(){window.removeEventListener("online",this.cu),window.removeEventListener("offline",this.uu)},t.prototype._u=function(){window.addEventListener("online",this.cu),window.addEventListener("offline",this.uu)},t.prototype.au=function(){f("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(var t=0,e=this.lu;t<e.length;t++)(0,e[t])(0)},t.prototype.hu=function(){f("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(var t=0,e=this.lu;t<e.length;t++)(0,e[t])(1)},t.Kn=function(){return"undefined"!=typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener},t}(),So={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery"},Io=function(){function t(t){this.fu=t.fu,this.du=t.du}return t.prototype.wu=function(t){this.Eu=t},t.prototype.Tu=function(t){this.Iu=t},t.prototype.onMessage=function(t){this.mu=t},t.prototype.close=function(){this.du()},t.prototype.send=function(t){this.fu(t)},t.prototype.Au=function(){this.Eu()},t.prototype.Ru=function(t){this.Iu(t)},t.prototype.Pu=function(t){this.mu(t)},t}(),Co=function(t){function e(e){var n=this;return(n=t.call(this,e)||this).forceLongPolling=e.forceLongPolling,n.i=e.i,n}return Object(a.c)(e,t),e.prototype.Su=function(t,e,n,r){return new Promise((function(i,a){var s=new o.f;s.listenOnce(o.c.COMPLETE,(function(){try{switch(s.getLastErrorCode()){case o.a.NO_ERROR:var e=s.getResponseJson();f("Connection","XHR received:",JSON.stringify(e)),i(e);break;case o.a.TIMEOUT:f("Connection",'RPC "'+t+'" timed out'),a(new S(O.DEADLINE_EXCEEDED,"Request time out"));break;case o.a.HTTP_ERROR:var n=s.getStatus();if(f("Connection",'RPC "'+t+'" failed with status:',n,"response text:",s.getResponseText()),n>0){var r=s.getResponseJson().error;if(r&&r.status&&r.message){var u=function(t){var e=t.toLowerCase().replace(/_/g,"-");return Object.values(O).indexOf(e)>=0?e:O.UNKNOWN}(r.status);a(new S(u,r.message))}else a(new S(O.UNKNOWN,"Server responded with status "+s.getStatus()))}else a(new S(O.UNAVAILABLE,"Connection failed."));break;default:v()}}finally{f("Connection",'RPC "'+t+'" completed.')}}));var u=JSON.stringify(r);s.send(e,"POST",u,n,15)}))},e.prototype.Cu=function(t,e){var n=[this.gu,"/","google.firestore.v1.Firestore","/",t,"/channel"],r=Object(o.g)(),a=Object(o.h)(),s={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:"projects/"+this.t.projectId+"/databases/"+this.t.database},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.i};this.vu(s.initMessageHeaders,e),Object(i.x)()||Object(i.A)()||Object(i.t)()||Object(i.v)()||Object(i.B)()||Object(i.s)()||(s.httpHeadersOverwriteParam="$httpHeaders");var u=n.join("");f("Connection","Creating WebChannel: "+u,s);var c=r.createWebChannel(u,s),l=!1,h=!1,d=new Io({fu:function(t){h?f("Connection","Not sending because WebChannel is closed:",t):(l||(f("Connection","Opening WebChannel transport."),c.open(),l=!0),f("Connection","WebChannel sending:",t),c.send(t))},du:function(){return c.close()}}),v=function(t,e,n){t.listen(e,(function(t){try{n(t)}catch(t){setTimeout((function(){throw t}),0)}}))};return v(c,o.e.EventType.OPEN,(function(){h||f("Connection","WebChannel transport opened.")})),v(c,o.e.EventType.CLOSE,(function(){h||(h=!0,f("Connection","WebChannel transport closed"),d.Ru())}
2)),v(c,o.e.EventType.ERROR,(function(t){h||(h=!0,p("Connection","WebChannel transport errored:",t),d.Ru(new S(O.UNAVAILABLE,"The operation could not be completed")))})),v(c,o.e.EventType.MESSAGE,(function(t){var e;if(!h){var n=t.data[0];y(!!n);var r=n,i=r.error||(null===(e=r[0])||void 0===e?void 0:e.error);if(i){f("Connection","WebChannel received error:",i);var o=i.status,a=function(t){var e=Le[t];if(void 0!==e)return Be(e)}(o),s=i.message;void 0===a&&(a=O.INTERNAL,s="Unknown error status: "+o+" with message "+i.message),h=!0,d.Ru(new S(a,s)),c.close()}else f("Connection","WebChannel received:",n),d.Pu(n)}})),v(a,o.b.STAT_EVENT,(function(t){t.stat===o.d.PROXY?f("Connection","Detected buffering proxy"):t.stat===o.d.NOPROXY&&f("Connection","Detected no buffering proxy")})),setTimeout((function(){d.Au()}),0),d},e}(function(){function t(t){this.yu=t,this.t=t.t;var e=t.ssl?"https":"http";this.gu=e+"://"+t.host,this.Vu="projects/"+this.t.projectId+"/databases/"+this.t.database+"/documents"}return t.prototype.pu=function(t,e,n,r){var i=this.bu(t,e);f("RestConnection","Sending: ",i,n);var o={};return this.vu(o,r),this.Su(t,i,o,n).then((function(t){return f("RestConnection","Received: ",t),t}),(function(e){throw p("RestConnection",t+" failed with error: ",e,"url: ",i,"request:",n),e}))},t.prototype.Du=function(t,e,n,r){return this.pu(t,e,n,r)},t.prototype.vu=function(t,e){if(t["X-Goog-Api-Client"]="gl-js/ fire/8.2.7",t["Content-Type"]="text/plain",e)for(var n in e.g)e.g.hasOwnProperty(n)&&(t[n]=e.g[n])},t.prototype.bu=function(t,e){var n=So[t];return this.gu+"/v1/"+e+":"+n},t}());function ko(){return"undefined"!=typeof window?window:null}function No(){return"undefined"!=typeof document?document:null}function Ao(t){return new wn(t,!0)}var xo=function(){function t(t,e,n,r,i){void 0===n&&(n=1e3),void 0===r&&(r=1.5),void 0===i&&(i=6e4),this.Zr=t,this.fs=e,this.xu=n,this.Nu=r,this.$u=i,this.Fu=0,this.Ou=null,this.ku=Date.now(),this.reset()}return t.prototype.reset=function(){this.Fu=0},t.prototype.Mu=function(){this.Fu=this.$u},t.prototype.Lu=function(t){var e=this;this.cancel();var n=Math.floor(this.Fu+this.Bu()),r=Math.max(0,Date.now()-this.ku),i=Math.max(0,n-r);i>0&&f("ExponentialBackoff","Backing off for "+i+" ms (base delay: "+this.Fu+" ms, delay with jitter: "+n+" ms, last attempt: "+r+" ms ago)"),this.Ou=this.Zr.Tr(this.fs,i,(function(){return e.ku=Date.now(),t()})),this.Fu*=this.Nu,this.Fu<this.xu&&(this.Fu=this.xu),this.Fu>this.$u&&(this.Fu=this.$u)},t.prototype.qu=function(){null!==this.Ou&&(this.Ou.Rs(),this.Ou=null)},t.prototype.cancel=function(){null!==this.Ou&&(this.Ou.cancel(),this.Ou=null)},t.prototype.Bu=function(){return(Math.random()-.5)*this.Fu},t}(),Po=function(){function t(t,e,n,r,i,o){this.Zr=t,this.Uu=n,this.Qu=r,this.Ku=i,this.listener=o,this.state=0,this.Wu=0,this.ju=null,this.stream=null,this.Gu=new xo(t,e)}return t.prototype.zu=function(){return 1===this.state||2===this.state||4===this.state},t.prototype.Hu=function(){return 2===this.state},t.prototype.start=function(){3!==this.state?this.auth():this.Ju()},t.prototype.stop=function(){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(t){switch(t.label){case 0:return this.zu()?[4,this.close(0)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}
2))}))},t.prototype.Yu=function(){this.state=0,this.Gu.reset()},t.prototype.Xu=function(){var t=this;this.Hu()&&null===this.ju&&(this.ju=this.Zr.Tr(this.Uu,6e4,(function(){return t.Zu()})))},t.prototype.th=function(t){this.eh(),this.stream.send(t)},t.prototype.Zu=function(){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(t){return this.Hu()?[2,this.close(0)]:[2]}))}))},t.prototype.eh=function(){this.ju&&(this.ju.cancel(),this.ju=null)},t.prototype.close=function(t,e){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(n){switch(n.label){case 0:return this.eh(),this.Gu.cancel(),this.Wu++,3!==t?this.Gu.reset():e&&e.code===O.RESOURCE_EXHAUSTED?(h(e.toString()),h("Using maximum backoff delay to prevent overloading the backend."),this.Gu.Mu()):e&&e.code===O.UNAUTHENTICATED&&this.Ku.p(),null!==this.stream&&(this.nh(),this.stream.close(),this.stream=null),this.state=t,[4,this.listener.Tu(e)];case 1:return n.sent(),[2]}}))}))},t.prototype.nh=function(){},t.prototype.auth=function(){var t=this;this.state=1;var e=this.sh(this.Wu),n=this.Wu;this.Ku.getToken().then((function(e){t.Wu===n&&t.ih(e)}),(function(n){e((function(){var e=new S(O.UNKNOWN,"Fetching auth token failed: "+n.message);return t.rh(e)}))}))},t.prototype.ih=function(t){var e=this,n=this.sh(this.Wu);this.stream=this.oh(t),this.stream.wu((function(){n((function(){return e.state=2,e.listener.wu()}))})),this.stream.Tu((function(t){n((function(){return e.rh(t)}))})),this.stream.onMessage((function(t){n((function(){return e.onMessage(t)}))}))},t.prototype.Ju=function(){var t=this;this.state=4,this.Gu.Lu((function(){return Object(a.b)(t,void 0,void 0,(function(){return Object(a.d)(this,(function(t){return this.state=0,this.start(),[2]}))}))}))},t.prototype.rh=function(t){return f("PersistentStream","close with error: "+t),this.stream=null,this.close(3,t)},t.prototype.sh=function(t){var e=this;return function(n){e.Zr.Ps((function(){return e.Wu===t?n():(f("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())}))}},t}(),Ro=function(t){function e(e,n,r,i,o){var a=this;return(a=t.call(this,e,"listen_stream_connection_backoff","listen_stream_idle",n,r,o)||this).Qt=i,a}return Object(a.c)(e,t),e.prototype.oh=function(t){return this.Qu.Cu("Listen",t)},e.prototype.onMessage=function(t){this.Gu.reset();var e=function(t,e){var n;if("targetChange"in e){e.targetChange;var r=function(t){return"NO_CHANGE"===t?0:"ADD"===t?1:"REMOVE"===t?2:"CURRENT"===t?3:"RESET"===t?4:v()}(e.targetChange.targetChangeType||"NO_CHANGE"),i=e.targetChange.targetIds||[],o=function(t,e){return t.Bt?(y(void 0===e||"string"==typeof e),T.fromBase64String(e||"")):(y(void 0===e||e instanceof Uint8Array),T.fromUint8Array(e||new Uint8Array))}(t,e.targetChange.resumeToken),a=(s=e.targetChange.cause)&&function(t){var e=void 0===t.code?O.UNKNOWN:Be(t.code);return new S(e,t.message||"")}(s);n=new pn(r,i,o,a||null)}else if("documentChange"in e){e.documentChange,(r=e.documentChange).document,r.document.name,r.document.updateTime,i=kn(t,r.document.name),o=On(r.document.updateTime);var s=new dt({mapValue:{fields:r.document.fields}}),u=(a=new mt(i,o,s,{}),r.targetIds||[]),c=r.removedTargetIds||[];n=new fn(u,c,a.key,a)}else if("documentDelete"in e)e.documentDelete,(r=e.documentDelete).document,i=kn(t,r.document),o=r.readTime?On(r.readTime):D.min(),s=new bt(i,o),a=r.removedTargetIds||[],n=new fn([],a,s.key,s);else if("documentRemove"in e)e.documentRemove,(r=e.documentRemove).document,i=kn(t,r.document),o=r.removedTargetIds||[],n=new fn([],o,i,null);else{if(!("filter"in e))return v();e.filter;var l=e.filter;l.targetId,r=l.count||0,i=new Ve(r),o=l.targetId,n=new hn(o,i)}return n}(this.Qt,t),n=function(t){if(!("targetChange"in t))return D.min();var e=t.targetChange;return e.targetIds&&e.targetIds.length?D.min():e.readTime?On(e.readTime):D.min()}(t);return this.listener.ah(e,n)},e.prototype.uh=function(t){var e={};e.database=xn(this.Qt),e.addTarget=function(t,e){var n,r=e.target;return(n=St(r)?{documents:Mn(t,r)}:{query:Fn(t,r)}).targetId=e.targetId,e.resumeToken.l()>0?n.resumeToken=En(t,e.resumeToken):e.Ot._(D.min())>0&&(n.readTime=_n(t,e.Ot.j())),n}(this.Qt,t);var n=function(t,e){var n=function(t,e){switch(e){case 0:return null;case 1:return"existence-filter-mismatch";case 2:return"limbo-document";default:return v()}}(0,e.Ft);return null==n?null:{"goog-listen-tags":n}}(this.Qt,t);n&&(e.labels=n),this.th(e)},e.prototype.hh=function(t){var e={};e.database=xn(this.Qt),e.removeTarget=t,this.th(e)},e}(Po),jo=function(t){function e(e,n,r,i,o){var a=this;return(a=t.call(this,e,"write_stream_connection_backoff","write_stream_idle",n,r,o)||this).Qt=i,a.lh=!1,a}return Object(a.c)(e,t),Object.defineProperty(e.prototype,"_h",{get:function(){return this.lh}
2,enumerable:!1,configurable:!0}),e.prototype.start=function(){this.lh=!1,this.lastStreamToken=void 0,t.prototype.start.call(this)},e.prototype.nh=function(){this.lh&&this.fh([])},e.prototype.oh=function(t){return this.Qu.Cu("Write",t)},e.prototype.onMessage=function(t){if(y(!!t.streamToken),this.lastStreamToken=t.streamToken,this.lh){this.Gu.reset();var e=function(t,e){return t&&t.length>0?(y(void 0!==e),t.map((function(t){return function(t,e){var n=t.updateTime?On(t.updateTime):On(e);n.isEqual(D.min())&&(n=On(e));var r=null;return t.transformResults&&t.transformResults.length>0&&(r=t.transformResults),new _e(n,r)}(t,e)}))):[]}(t.writeResults,t.commitTime),n=On(t.commitTime);return this.listener.dh(n,e)}return y(!t.writeResults||0===t.writeResults.length),this.lh=!0,this.listener.wh()},e.prototype.Eh=function(){var t={};t.database=xn(this.Qt),this.th(t)},e.prototype.fh=function(t){var e=this,n={streamToken:this.lastStreamToken,writes:t.map((function(t){return Dn(e.Qt,t)}))};this.th(n)},e}(Po),Do=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).credentials=e,i.Qu=n,i.Qt=r,i.Th=!1,i}return Object(a.c)(e,t),e.prototype.Ih=function(){if(this.Th)throw new S(O.FAILED_PRECONDITION,"The client has already been terminated.")},e.prototype.pu=function(t,e,n){var r=this;return this.Ih(),this.credentials.getToken().then((function(i){return r.Qu.pu(t,e,n,i)})).catch((function(t){throw t.code===O.UNAUTHENTICATED&&r.credentials.p(),t}))},e.prototype.Du=function(t,e,n){var r=this;return this.Ih(),this.credentials.getToken().then((function(i){return r.Qu.Du(t,e,n,i)})).catch((function(t){throw t.code===O.UNAUTHENTICATED&&r.credentials.p(),t}))},e.prototype.terminate=function(){this.Th=!1},e}((function(){})),Lo=function(){function t(t,e){this._s=t,this.fa=e,this.state="Unknown",this.mh=0,this.Ah=null,this.Rh=!0}return t.prototype.Ph=function(){var t=this;0===this.mh&&(this.yh("Unknown"),this.Ah=this._s.Tr("online_state_timeout",1e4,(function(){return t.Ah=null,t.gh("Backend didn't respond within 10 seconds."),t.yh("Offline"),Promise.resolve()})))},t.prototype.Vh=function(t){"Online"===this.state?this.yh("Unknown"):(this.mh++,this.mh>=1&&(this.ph(),this.gh("Connection failed 1 times. Most recent error: "+t.toString()),this.yh("Offline")))},t.prototype.set=function(t){this.ph(),this.mh=0,"Online"===t&&(this.Rh=!1),this.yh(t)},t.prototype.yh=function(t){t!==this.state&&(this.state=t,this.fa(t))},t.prototype.gh=function(t){var e="Could not reach Cloud Firestore backend. "+t+"\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.";this.Rh?(h(e),this.Rh=!1):f("OnlineStateTracker",e)},t.prototype.ph=function(){null!==this.Ah&&(this.Ah.cancel(),this.Ah=null)},t}(),Mo=function(t,e,n,r,i){var o=this;this.bh=t,this.Sh=e,this._s=n,this.Dh={},this.Ch=[],this.xh=new Map,this.Nh=new Set,this.$h=[],this.Fh=i,this.Fh.ou((function(t){n.Ps((function(){return Object(a.b)(o,void 0,void 0,(function(){return Object(a.d)(this,(function(t){switch(t.label){case 0:return Ko(this)?(f("RemoteStore","Restarting streams for network reachability change."),[4,function(t){return Object(a.b)(this,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return(e=g(t)).Nh.add(4),[4,Uo(e)];case 1:return n.sent(),e.Oh.set("Unknown"),e.Nh.delete(4),[4,Fo(e)];case 2:return n.sent(),[2]}}))}))}(this)]):[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}
2))}))}))})),this.Oh=new Lo(n,r)};function Fo(t){return Object(a.b)(this,void 0,void 0,(function(){var e,n;return Object(a.d)(this,(function(r){switch(r.label){case 0:if(!Ko(t))return[3,4];e=0,n=t.$h,r.label=1;case 1:return e<n.length?[4,(0,n[e])(!0)]:[3,4];case 2:r.sent(),r.label=3;case 3:return e++,[3,1];case 4:return[2]}}))}))}function Uo(t){return Object(a.b)(this,void 0,void 0,(function(){var e,n;return Object(a.d)(this,(function(r){switch(r.label){case 0:e=0,n=t.$h,r.label=1;case 1:return e<n.length?[4,(0,n[e])(!1)]:[3,4];case 2:r.sent(),r.label=3;case 3:return e++,[3,1];case 4:return[2]}}))}))}function Vo(t,e){var n=g(t);n.xh.has(e.targetId)||(n.xh.set(e.targetId,e),Wo(n)?Ho(n):sa(n).Hu()&&Bo(n,e))}function qo(t,e){var n=g(t),r=sa(n);n.xh.delete(e),r.Hu()&&zo(n,e),0===n.xh.size&&(r.Hu()?r.Xu():Ko(n)&&n.Oh.set("Unknown"))}function Bo(t,e){t.kh.on(e.targetId),sa(t).uh(e)}function zo(t,e){t.kh.on(e),sa(t).hh(e)}function Ho(t){t.kh=new vn({vn:function(e){return t.Dh.vn(e)},Sn:function(e){return t.xh.get(e)||null}}),sa(t).start(),t.Oh.Ph()}function Wo(t){return Ko(t)&&!sa(t).zu()&&t.xh.size>0}function Ko(t){return 0===g(t).Nh.size}function Go(t){t.kh=void 0}function Qo(t){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(e){return t.xh.forEach((function(e,n){Bo(t,e)})),[2]}))}))}function Yo(t,e){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(n){return Go(t),Wo(t)?(t.Oh.Vh(e),Ho(t)):t.Oh.set("Unknown"),[2]}))}))}function Xo(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r,i,o;return Object(a.d)(this,(function(s){switch(s.label){case 0:if(t.Oh.set("Online"),!(e instanceof pn&&2===e.state&&e.cause))return[3,6];s.label=1;case 1:return s.trys.push([1,3,,5]),[4,function(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i,o;return Object(a.d)(this,(function(a){switch(a.label){case 0:n=e.cause,r=0,i=e.targetIds,a.label=1;case 1:return r<i.length?(o=i[r],t.xh.has(o)?[4,t.Dh.Mh(o,n)]:[3,3]):[3,5];case 2:a.sent(),t.xh.delete(o),t.kh.removeTarget(o),a.label=3;case 3:a.label=4;case 4:return r++,[3,1];case 5:return[2]}}
2))}))}(t,e)];case 2:return s.sent(),[3,5];case 3:return r=s.sent(),f("RemoteStore","Failed to remove targets %s: %s ",e.targetIds.join(","),r),[4,$o(t,r)];case 4:return s.sent(),[3,5];case 5:return[3,13];case 6:if(e instanceof fn?t.kh.dn(e):e instanceof hn?t.kh.Pn(e):t.kh.Tn(e),n.isEqual(D.min()))return[3,13];s.label=7;case 7:return s.trys.push([7,11,,13]),[4,Hi(t.bh)];case 8:return i=s.sent(),n._(i)>=0?[4,function(t,e){var n=t.kh.Vn(e);return n.$e.forEach((function(n,r){if(n.resumeToken.l()>0){var i=t.xh.get(r);i&&t.xh.set(r,i.Mt(n.resumeToken,e))}})),n.Fe.forEach((function(e){var n=t.xh.get(e);if(n){t.xh.set(e,n.Mt(T.T,n.Ot)),zo(t,e);var r=new ie(n.target,e,1,n.sequenceNumber);Bo(t,r)}})),t.Dh.Lh(n)}(t,n)]:[3,10];case 9:s.sent(),s.label=10;case 10:return[3,13];case 11:return f("RemoteStore","Failed to raise snapshot:",o=s.sent()),[4,$o(t,o)];case 12:return s.sent(),[3,13];case 13:return[2]}}))}))}function $o(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r=this;return Object(a.d)(this,(function(i){switch(i.label){case 0:if(!rr(e))throw e;return t.Nh.add(1),[4,Uo(t)];case 1:return i.sent(),t.Oh.set("Offline"),n||(n=function(){return Hi(t.bh)}),t._s.po((function(){return Object(a.b)(r,void 0,void 0,(function(){return Object(a.d)(this,(function(e){switch(e.label){case 0:return f("RemoteStore","Retrying IndexedDB access"),[4,n()];case 1:return e.sent(),t.Nh.delete(1),[4,Fo(t)];case 2:return e.sent(),[2]}}))}))})),[2]}}))}))}function Jo(t,e){return e().catch((function(n){return $o(t,n,e)}))}function Zo(t){return Object(a.b)(this,void 0,void 0,(function(){var e,n,r,i,o;return Object(a.d)(this,(function(a){switch(a.label){case 0:e=g(t),n=ua(e),r=e.Ch.length>0?e.Ch[e.Ch.length-1].batchId:-1,a.label=1;case 1:if(!function(t){return Ko(t)&&t.Ch.length<10}(e))return[3,7];a.label=2;case 2:return a.trys.push([2,4,,6]),[4,Gi(e.bh,r)];case 3:return null===(i=a.sent())?(0===e.Ch.length&&n.Xu(),[3,7]):(r=i.batchId,function(t,e){t.Ch.push(e);var n=ua(t);n.Hu()&&n._h&&n.fh(e.mutations)}(e,i),[3,6]);case 4:return o=a.sent(),[4,$o(e,o)];case 5:return a.sent(),[3,6];case 6:return[3,1];case 7:return ta(e)&&ea(e),[2]}}))}))}function ta(t){return Ko(t)&&!ua(t).zu()&&t.Ch.length>0}function ea(t){ua(t).start()}function na(t){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(e){return ua(t).Eh(),[2]}))}
2))}function ra(t){return Object(a.b)(this,void 0,void 0,(function(){var e,n,r,i;return Object(a.d)(this,(function(o){for(e=ua(t),n=0,r=t.Ch;n<r.length;n++)i=r[n],e.fh(i.mutations);return[2]}))}))}function ia(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r,i;return Object(a.d)(this,(function(o){switch(o.label){case 0:return r=t.Ch.shift(),i=Lr.from(r,e,n),[4,Jo(t,(function(){return t.Dh.Bh(i)}))];case 1:return o.sent(),[4,Zo(t)];case 2:return o.sent(),[2]}}))}))}function oa(t,e){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(n){switch(n.label){case 0:return e&&ua(t)._h?[4,function(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r;return Object(a.d)(this,(function(i){switch(i.label){case 0:return qe(r=e.code)&&r!==O.ABORTED?(n=t.Ch.shift(),ua(t).Yu(),[4,Jo(t,(function(){return t.Dh.qh(n.batchId,e)}))]):[3,3];case 1:return i.sent(),[4,Zo(t)];case 2:i.sent(),i.label=3;case 3:return[2]}}))}))}(t,e)]:[3,2];case 1:n.sent(),n.label=2;case 2:return ta(t)&&ea(t),[2]}}))}))}function aa(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n;return Object(a.d)(this,(function(r){switch(r.label){case 0:return n=g(t),e?(n.Nh.delete(2),[4,Fo(n)]):[3,2];case 1:return r.sent(),[3,5];case 2:return e?[3,4]:(n.Nh.add(2),[4,Uo(n)]);case 3:r.sent(),n.Oh.set("Unknown"),r.label=4;case 4:r.label=5;case 5:return[2]}}
2))}))}function sa(t){var e=this;return t.Uh||(t.Uh=function(t,e,n){var r=g(t);return r.Ih(),new Ro(e,r.Qu,r.credentials,r.Qt,n)}(t.Sh,t._s,{wu:Qo.bind(null,t),Tu:Yo.bind(null,t),ah:Xo.bind(null,t)}),t.$h.push((function(n){return Object(a.b)(e,void 0,void 0,(function(){return Object(a.d)(this,(function(e){switch(e.label){case 0:return n?(t.Uh.Yu(),Wo(t)?Ho(t):t.Oh.set("Unknown"),[3,3]):[3,1];case 1:return[4,t.Uh.stop()];case 2:e.sent(),Go(t),e.label=3;case 3:return[2]}}))}))}))),t.Uh}function ua(t){var e=this;return t.Qh||(t.Qh=function(t,e,n){var r=g(t);return r.Ih(),new jo(e,r.Qu,r.credentials,r.Qt,n)}(t.Sh,t._s,{wu:na.bind(null,t),Tu:oa.bind(null,t),wh:ra.bind(null,t),dh:ia.bind(null,t)}),t.$h.push((function(n){return Object(a.b)(e,void 0,void 0,(function(){return Object(a.d)(this,(function(e){switch(e.label){case 0:return n?(t.Qh.Yu(),[4,Zo(t)]):[3,2];case 1:return e.sent(),[3,4];case 2:return[4,t.Qh.stop()];case 3:e.sent(),t.Ch.length>0&&(f("RemoteStore","Stopping write stream with "+t.Ch.length+" pending writes"),t.Ch=[]),e.label=4;case 4:return[2]}}
2))}))}))),t.Qh}var ca=function(){this.Kh=void 0,this.listeners=[]},la=function(){this.queries=new ii((function(t){return Zt(t)}),Jt),this.onlineState="Unknown",this.Wh=new Set};function fa(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i,o,s,u,c;return Object(a.d)(this,(function(a){switch(a.label){case 0:if(n=g(t),r=e.query,i=!1,(o=n.queries.get(r))||(i=!0,o=new ca),!i)return[3,4];a.label=1;case 1:return a.trys.push([1,3,,4]),s=o,[4,n.jh(r)];case 2:return s.Kh=a.sent(),[3,4];case 3:return u=a.sent(),c=cr(u,"Initialization of query '"+te(e.query)+"' failed"),[2,void e.onError(c)];case 4:return n.queries.set(r,o),o.listeners.push(e),e.Gh(n.onlineState),o.Kh&&e.zh(o.Kh)&&va(n),[2]}}))}))}function ha(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i,o,s;return Object(a.d)(this,(function(a){return n=g(t),r=e.query,i=!1,(o=n.queries.get(r))&&(s=o.listeners.indexOf(e))>=0&&(o.listeners.splice(s,1),i=0===o.listeners.length),i?[2,(n.queries.delete(r),n.Hh(r))]:[2]}))}))}function pa(t,e){for(var n=g(t),r=!1,i=0,o=e;i<o.length;i++){var a=o[i],s=a.query,u=n.queries.get(s);if(u){for(var c=0,l=u.listeners;c<l.length;c++)l[c].zh(a)&&(r=!0);u.Kh=a}}r&&va(n)}function da(t,e,n){var r=g(t),i=r.queries.get(e);if(i)for(var o=0,a=i.listeners;o<a.length;o++)a[o].onError(n);r.queries.delete(e)}function va(t){t.Wh.forEach((function(t){t.next()}))}var ya=function(){function t(t,e,n){this.query=t,this.Jh=e,this.Yh=!1,this.Xh=null,this.onlineState="Unknown",this.options=n||{}}return t.prototype.zh=function(t){if(!this.options.includeMetadataChanges){for(var e=[],n=0,r=t.docChanges;n<r.length;n++){var i=r[n];3!==i.type&&e.push(i)}t=new un(t.query,t.docs,t.Se,e,t.De,t.fromCache,t.Ce,!0)}var o=!1;return this.Yh?this.Zh(t)&&(this.Jh.next(t),o=!0):this.tl(t,this.onlineState)&&(this.el(t),o=!0),this.Xh=t,o},t.prototype.onError=function(t){this.Jh.error(t)},t.prototype.Gh=function(t){this.onlineState=t;var e=!1;return this.Xh&&!this.Yh&&this.tl(this.Xh,t)&&(this.el(this.Xh),e=!0),e},t.prototype.tl=function(t,e){if(!t.fromCache)return!0;var n="Offline"!==e;return!(this.options.nl&&n||t.docs.et()&&"Offline"!==e)},t.prototype.Zh=function(t){if(t.docChanges.length>0)return!0;var e=this.Xh&&this.Xh.hasPendingWrites!==t.hasPendingWrites;return!(!t.Ce&&!e)&&!0===this.options.includeMetadataChanges},t.prototype.el=function(t){t=un.Ne(t.query,t.docs,t.De,t.fromCache),this.Yh=!0,this.Jh.next(t)},t}(),ga=function(){function t(t,e){this.payload=t,this.byteLength=e}return t.prototype.sl=function(){return"metadata"in this.payload},t}(),ma=function(){function t(t){this.Qt=t}return t.prototype.Pc=function(t){return kn(this.Qt,t)},t.prototype.yc=function(t){return t.metadata.exists?jn(this.Qt,t.document,!1):new bt(this.Pc(t.metadata.name),this.gc(t.metadata.readTime))},t.prototype.gc=function(t){return On(t)},t}(),ba=function(){function t(t,e,n){this.il=t,this.bh=e,this.Qt=n,this.queries=[],this.documents=[],this.progress=wa(t)}return t.prototype.rl=function(t){this.progress.bytesLoaded+=t.byteLength;var e=this.progress.documentsLoaded;return t.payload.namedQuery?this.queries.push(t.payload.namedQuery):t.payload.documentMetadata?(this.documents.push({metadata:t.payload.documentMetadata}),t.payload.documentMetadata.exists||++e):t.payload.document&&(this.documents[this.documents.length-1].document=t.payload.document,++e),e!==this.progress.documentsLoaded?(this.progress.documentsLoaded=e,Object.assign({},this.progress)):null},t.prototype.ol=function(t){for(var e=new Map,n=new ma(this.Qt),r=0,i=t;r<i.length;r++){var o=i[r];if(o.metadata.queries)for(var a=n.Pc(o.metadata.name),s=0,u=o.metadata.queries;s<u.length;s++){var c=u[s],l=(e.get(c)||nn()).add(a);e.set(c,l)}}return e},t.prototype.complete=function(){return Object(a.b)(this,void 0,void 0,(function(){var t,e,n,r,i;return Object(a.d)(this,(function(o){switch(o.label){case 0:return[4,to(this.bh,new ma(this.Qt),this.documents,this.il.id)];case 1:t=o.sent(),e=this.ol(this.documents),n=0,r=this.queries,o.label=2;case 2:return n<r.length?(i=r[n],[4,eo(this.bh,i,e.get(i.name))]):[3,5];case 3:o.sent(),o.label=4;case 4:return n++,[3,2];case 5:return[2,(this.progress.taskState="Success",new Li(Object.assign({},this.progress),t))]}}))}))},t}();function wa(t){return{taskState:"Running",documentsLoaded:0,bytesLoaded:0,totalDocuments:t.totalDocuments,totalBytes:t.totalBytes}}var _a=function(t){this.key=t},Ea=function(t){this.key=t},Ta=function(){function t(t,e){this.query=t,this.cl=e,this.al=null,this.Be=!1,this.ul=nn(),this.De=nn(),this.hl=ne(t),this.ll=new an(this.hl)}return Object.defineProperty(t.prototype,"_l",{get:function(){return this.cl}
2,enumerable:!1,configurable:!0}),t.prototype.fl=function(t,e){var n=this,r=e?e.dl:new sn,i=e?e.ll:this.ll,o=e?e.De:this.De,a=i,s=!1,u=Ht(this.query)&&i.size===this.query.limit?i.last():null,c=Wt(this.query)&&i.size===this.query.limit?i.first():null;if(t.Xt((function(t,e){var l=i.get(t),f=e instanceof mt?e:null;f&&(f=ee(n.query,f)?f:null);var h=!!l&&n.De.has(l.key),p=!!f&&(f.Vt||n.De.has(f.key)&&f.hasCommittedMutations),d=!1;l&&f?l.data().isEqual(f.data())?h!==p&&(r.track({type:3,doc:f}),d=!0):n.wl(l,f)||(r.track({type:2,doc:f}),d=!0,(u&&n.hl(f,u)>0||c&&n.hl(f,c)<0)&&(s=!0)):!l&&f?(r.track({type:0,doc:f}),d=!0):l&&!f&&(r.track({type:1,doc:l}),d=!0,(u||c)&&(s=!0)),d&&(f?(a=a.add(f),o=p?o.add(t):o.delete(t)):(a=a.delete(t),o=o.delete(t)))})),Ht(this.query)||Wt(this.query))for(;a.size>this.query.limit;){var l=Ht(this.query)?a.last():a.first();a=a.delete(l.key),o=o.delete(l.key),r.track({type:1,doc:l})}return{ll:a,dl:r,lc:s,De:o}},t.prototype.wl=function(t,e){return t.Vt&&e.hasCommittedMutations&&!e.Vt},t.prototype.wi=function(t,e,n){var r=this,i=this.ll;this.ll=t.ll,this.De=t.De;var o=t.dl.ve();o.sort((function(t,e){return function(t,e){var n=function(t){switch(t){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return v()}};return n(t)-n(e)}(t.type,e.type)||r.hl(t.doc,e.doc)})),this.El(n);var a=e?this.Tl():[],s=0===this.ul.size&&this.Be?1:0,u=s!==this.al;return this.al=s,0!==o.length||u?{snapshot:new un(this.query,t.ll,i,o,t.De,0===s,u,!1),Il:a}:{Il:a}},t.prototype.Gh=function(t){return this.Be&&"Offline"===t?(this.Be=!1,this.wi({ll:this.ll,dl:new sn,De:this.De,lc:!1},!1)):{Il:[]}},t.prototype.ml=function(t){return!this.cl.has(t)&&!!this.ll.has(t)&&!this.ll.get(t).Vt},t.prototype.El=function(t){var e=this;t&&(t.qe.forEach((function(t){return e.cl=e.cl.add(t)})),t.Ue.forEach((function(t){})),t.Qe.forEach((function(t){return e.cl=e.cl.delete(t)})),this.Be=t.Be)},t.prototype.Tl=function(){var t=this;if(!this.Be)return[];var e=this.ul;this.ul=nn(),this.ll.forEach((function(e){t.ml(e.key)&&(t.ul=t.ul.add(e.key))}));var n=[];return e.forEach((function(e){t.ul.has(e)||n.push(new Ea(e))})),this.ul.forEach((function(t){e.has(t)||n.push(new _a(t))})),n},t.prototype.Al=function(t){this.cl=t.Rc,this.ul=nn();var e=this.fl(t.documents);return this.wi(e,!0)},t.prototype.Rl=function(){return un.Ne(this.query,this.ll,this.De,0===this.al)},t}(),Oa=function(t,e,n){this.query=t,this.targetId=e,this.view=n},Sa=function(t){this.key=t,this.Pl=!1},Ia=function(){function t(t,e,n,r,i,o){this.bh=t,this.yl=e,this.gl=n,this.Vl=r,this.currentUser=i,this.pl=o,this.bl={},this.vl=new ii((function(t){return Zt(t)}),Jt),this.Sl=new Map,this.Dl=new Set,this.Cl=new ze(V.H),this.xl=new Map,this.Nl=new ro,this.$l={},this.Fl=new Map,this.Ol=pi.Li(),this.onlineState="Unknown",this.kl=void 0}return Object.defineProperty(t.prototype,"Ml",{get:function(){return!0===this.kl},enumerable:!1,configurable:!0}),t}();function Ca(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i,o,s,u;return Object(a.d)(this,(function(a){switch(a.label){case 0:return n=ns(t),(o=n.vl.get(e))?(r=o.targetId,n.Vl.Fa(r),i=o.view.Rl(),[3,4]):[3,1];case 1:return[4,Qi(n.bh,Xt(e))];case 2:return s=a.sent(),u=n.Vl.Fa(s.targetId),r=s.targetId,[4,ka(n,e,r,"current"===u)];case 3:i=a.sent(),n.Ml&&Vo(n.yl,s),a.label=4;case 4:return[2,i]}}))}))}function ka(t,e,n,r){return Object(a.b)(this,void 0,void 0,(function(){var i,o,s,u,c,l;return Object(a.d)(this,(function(f){switch(f.label){case 0:return t.Ll=function(e,n,r){return function(t,e,n,r){return Object(a.b)(this,void 0,void 0,(function(){var i,o,s;return Object(a.d)(this,(function(a){switch(a.label){case 0:return(i=e.view.fl(n)).lc?[4,Xi(t.bh,e.query,!1).then((function(t){var n=t.documents;return e.view.fl(n,i)}))]:[3,2];case 1:i=a.sent(),a.label=2;case 2:return o=r&&r.$e.get(e.targetId),s=e.view.wi(i,t.Ml,o),[2,(qa(t,e.targetId,s.Il),s.snapshot)]}}))}))}(t,e,n,r)},[4,Xi(t.bh,e,!0)];case 1:return i=f.sent(),o=new Ta(e,i.Rc),s=o.fl(i.documents),u=ln.Le(n,r&&"Offline"!==t.onlineState),c=o.wi(s,t.Ml,u),qa(t,n,c.Il),l=new Oa(e,n,o),[2,(t.vl.set(e,l),t.Sl.has(n)?t.Sl.get(n).push(e):t.Sl.set(n,[e]),c.snapshot)]}}))}))}function Na(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i;return Object(a.d)(this,(function(o){switch(o.label){case 0:return n=g(t),r=n.vl.get(e),(i=n.Sl.get(r.targetId)).length>1?[2,(n.Sl.set(r.targetId,i.filter((function(t){return!Jt(t,e)}
2))),void n.vl.delete(e))]:n.Ml?(n.Vl.ka(r.targetId),n.Vl.Da(r.targetId)?[3,2]:[4,Yi(n.bh,r.targetId,!1).then((function(){n.Vl.La(r.targetId),qo(n.yl,r.targetId),Ua(n,r.targetId)})).catch(ri)]):[3,3];case 1:o.sent(),o.label=2;case 2:return[3,5];case 3:return Ua(n,r.targetId),[4,Yi(n.bh,r.targetId,!0)];case 4:o.sent(),o.label=5;case 5:return[2]}}))}))}function Aa(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r,i,o,s;return Object(a.d)(this,(function(a){switch(a.label){case 0:r=rs(t),a.label=1;case 1:return a.trys.push([1,5,,6]),[4,function(t,e){var n,r=g(t),i=j.now(),o=e.reduce((function(t,e){return t.add(e.key)}),nn());return r.persistence.runTransaction("Locally write mutations","readwrite",(function(t){return r.Tc.Xo(t,o).next((function(o){n=o;for(var a=[],s=0,u=e;s<u.length;s++){var c=u[s],l=Ce(c,n.get(c.key));null!=l&&a.push(new xe(c.key,l,yt(l.proto.mapValue),Ee.exists(!0)))}return r.zo.Ri(t,i,a,e)}))})).then((function(t){var e=t.xs(n);return{batchId:t.batchId,ri:e}}))}(r.bh,e)];case 2:return i=a.sent(),r.Vl.Ca(i.batchId),function(t,e,n){var r=t.$l[t.currentUser.A()];r||(r=new ze(w)),r=r.zt(e,n),t.$l[t.currentUser.A()]=r}(r,i.batchId,n),[4,Ha(r,i.ri)];case 3:return a.sent(),[4,Zo(r.yl)];case 4:return a.sent(),[3,6];case 5:return o=a.sent(),s=cr(o,"Failed to persist write"),n.reject(s),[3,6];case 6:return[2]}}
2))}))}function xa(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r;return Object(a.d)(this,(function(i){switch(i.label){case 0:n=g(t),i.label=1;case 1:return i.trys.push([1,4,,6]),[4,Wi(n.bh,e)];case 2:return r=i.sent(),e.$e.forEach((function(t,e){var r=n.xl.get(e);r&&(y(t.qe.size+t.Ue.size+t.Qe.size<=1),t.qe.size>0?r.Pl=!0:t.Ue.size>0?y(r.Pl):t.Qe.size>0&&(y(r.Pl),r.Pl=!1))})),[4,Ha(n,r,e)];case 3:return i.sent(),[3,6];case 4:return[4,ri(i.sent())];case 5:return i.sent(),[3,6];case 6:return[2]}}))}))}function Pa(t,e,n){var r=g(t);if(r.Ml&&0===n||!r.Ml&&1===n){var i=[];r.vl.forEach((function(t,n){var r=n.view.Gh(e);r.snapshot&&i.push(r.snapshot)})),function(t,e){var n=g(t);n.onlineState=e;var r=!1;n.queries.forEach((function(t,n){for(var i=0,o=n.listeners;i<o.length;i++)o[i].Gh(e)&&(r=!0)})),r&&va(n)}(r.gl,e),i.length&&r.bl.ah(i),r.onlineState=e,r.Ml&&r.Vl.Qa(e)}}function Ra(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r,i,o,s,u,c;return Object(a.d)(this,(function(a){switch(a.label){case 0:return(r=g(t)).Vl.Ba(e,"rejected",n),i=r.xl.get(e),(o=i&&i.key)?(s=(s=new ze(V.H)).zt(o,new bt(o,D.min())),u=nn().add(o),c=new cn(D.min(),new Map,new Ke(w),s,u),[4,xa(r,c)]):[3,2];case 1:return a.sent(),r.Cl=r.Cl.remove(o),r.xl.delete(e),za(r),[3,4];case 2:return[4,Yi(r.bh,e,!1).then((function(){return Ua(r,e,n)}
2)).catch(ri)];case 3:a.sent(),a.label=4;case 4:return[2]}}))}))}function ja(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i;return Object(a.d)(this,(function(o){switch(o.label){case 0:n=g(t),r=e.batch.batchId,o.label=1;case 1:return o.trys.push([1,4,,6]),[4,zi(n.bh,e)];case 2:return i=o.sent(),Fa(n,r,null),Ma(n,r),n.Vl.Na(r,"acknowledged"),[4,Ha(n,i)];case 3:return o.sent(),[3,6];case 4:return[4,ri(o.sent())];case 5:return o.sent(),[3,6];case 6:return[2]}}))}))}function Da(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r,i;return Object(a.d)(this,(function(o){switch(o.label){case 0:r=g(t),o.label=1;case 1:return o.trys.push([1,4,,6]),[4,function(t,e){var n=g(t);return n.persistence.runTransaction("Reject batch","readwrite-primary",(function(t){var r;return n.zo.Pi(t,e).next((function(e){return y(null!==e),r=e.keys(),n.zo.Ci(t,e)})).next((function(){return n.zo.$i(t)})).next((function(){return n.Tc.Xo(t,r)}))}))}(r.bh,e)];case 2:return i=o.sent(),Fa(r,e,n),Ma(r,e),r.Vl.Na(e,"rejected",n),[4,Ha(r,i)];case 3:return o.sent(),[3,6];case 4:return[4,ri(o.sent())];case 5:return o.sent(),[3,6];case 6:return[2]}}
2))}))}function La(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i,o,s;return Object(a.d)(this,(function(a){switch(a.label){case 0:Ko((n=g(t)).yl)||f("SyncEngine","The network is disabled. The task returned by 'awaitPendingWrites()' will not complete until the network is enabled."),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,function(t){var e=g(t);return e.persistence.runTransaction("Get highest unacknowledged batch id","readonly",(function(t){return e.zo.Vi(t)}))}(n.bh)];case 2:return-1===(r=a.sent())?[2,void e.resolve()]:((i=n.Fl.get(r)||[]).push(e),n.Fl.set(r,i),[3,4]);case 3:return o=a.sent(),s=cr(o,"Initialization of waitForPendingWrites() operation failed"),e.reject(s),[3,4];case 4:return[2]}}))}))}function Ma(t,e){(t.Fl.get(e)||[]).forEach((function(t){t.resolve()})),t.Fl.delete(e)}function Fa(t,e,n){var r=g(t),i=r.$l[r.currentUser.A()];if(i){var o=i.get(e);o&&(n?o.reject(n):o.resolve(),i=i.remove(e)),r.$l[r.currentUser.A()]=i}}function Ua(t,e,n){void 0===n&&(n=null),t.Vl.ka(e);for(var r=0,i=t.Sl.get(e);r<i.length;r++){var o=i[r];t.vl.delete(o),n&&t.bl.Bl(o,n)}t.Sl.delete(e),t.Ml&&t.Nl.Fc(e).forEach((function(e){t.Nl.Fi(e)||Va(t,e)}))}function Va(t,e){t.Dl.delete(e.path.rt());var n=t.Cl.get(e);null!==n&&(qo(t.yl,n),t.Cl=t.Cl.remove(e),t.xl.delete(n),za(t))}function qa(t,e,n){for(var r=0,i=n;r<i.length;r++){var o=i[r];o instanceof _a?(t.Nl.nr(o.key,e),Ba(t,o)):o instanceof Ea?(f("SyncEngine","Document no longer in limbo: "+o.key),t.Nl.ir(o.key,e),t.Nl.Fi(o.key)||Va(t,o.key)):v()}}function Ba(t,e){var n=e.key,r=n.path.rt();t.Cl.get(n)||t.Dl.has(r)||(f("SyncEngine","New document in limbo: "+n),t.Dl.add(r),za(t))}function za(t){for(;t.Dl.size>0&&t.Cl.size<t.pl;){var e=t.Dl.values().next().value;t.Dl.delete(e);var n=new V(M.ot(e)),r=t.Ol.next();t.xl.set(r,new Sa(n)),t.Cl=t.Cl.zt(n,r),Vo(t.yl,new ie(Xt(zt(n.path)),r,2,R.q))}}function Ha(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r,i,o,s;return Object(a.d)(this,(function(u){switch(u.label){case 0:return r=g(t),i=[],o=[],s=[],r.vl.et()?[3,3]:(r.vl.forEach((function(t,a){s.push(r.Ll(a,e,n).then((function(t){if(t){r.Ml&&r.Vl.Ba(a.targetId,t.fromCache?"not-current":"current"),i.push(t);var e=Fi.oc(a.targetId,t);o.push(e)}})))})),[4,Promise.all(s)]);case 1:return u.sent(),r.bl.ah(i),[4,function(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i,o,s,u,c,l,h;return Object(a.d)(this,(function(a){switch(a.label){case 0:n=g(t),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,n.persistence.runTransaction("notifyLocalViewChanges","readwrite",(function(t){return Jn.forEach(e,(function(e){return Jn.forEach(e.ic,(function(r){return n.persistence.Ti.nr(t,e.targetId,r)})).next((function(){return Jn.forEach(e.rc,(function(r){return n.persistence.Ti.ir(t,e.targetId,r)}))}))}))}))];case 2:return a.sent(),[3,4];case 3:if(!rr(r=a.sent()))throw r;return f("LocalStore","Failed to update sequence numbers: "+r),[3,4];case 4:for(i=0,o=e;i<o.length;i++)s=o[i],u=s.targetId,s.fromCache||(c=n.fc.get(u),l=c.Ot,h=c.Lt(l),n.fc=n.fc.zt(u,h));return[2]}}))}))}(r.bh,o)];case 2:u.sent(),u.label=3;case 3:return[2]}}
2))}))}function Wa(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r;return Object(a.d)(this,(function(i){switch(i.label){case 0:return(n=g(t)).currentUser.isEqual(e)?[3,3]:(f("SyncEngine","User change. New user:",e.A()),[4,Bi(n.bh,e)]);case 1:return r=i.sent(),n.currentUser=e,function(t,e){t.Fl.forEach((function(t){t.forEach((function(t){t.reject(new S(O.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))}))})),t.Fl.clear()}(n),n.Vl.Ua(e,r.mc,r.Ac),[4,Ha(n,r.Ic)];case 2:i.sent(),i.label=3;case 3:return[2]}}))}))}function Ka(t,e){var n=g(t),r=n.xl.get(e);if(r&&r.Pl)return nn().add(r.key);var i=nn(),o=n.Sl.get(e);if(!o)return i;for(var a=0,s=o;a<s.length;a++){var u=s[a],c=n.vl.get(u);i=i.Pe(c.view._l)}return i}function Ga(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i;return Object(a.d)(this,(function(o){switch(o.label){case 0:return[4,Xi((n=g(t)).bh,e.query,!0)];case 1:return r=o.sent(),i=e.view.Al(r),[2,(n.Ml&&qa(n,e.targetId,i.Il),i)]}}))}))}function Qa(t){return Object(a.b)(this,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){return[2,Ji((e=g(t)).bh).then((function(t){return Ha(e,t)}))]}))}))}function Ya(t,e,n,r){return Object(a.b)(this,void 0,void 0,(function(){var i,o;return Object(a.d)(this,(function(a){switch(a.label){case 0:return[4,function(t,e){var n=g(t),r=g(n.zo);return n.persistence.runTransaction("Lookup mutation documents","readonly",(function(t){return r.yi(t,e).next((function(e){return e?n.Tc.Xo(t,e):Jn.resolve(null)}))}))}((i=g(t)).bh,e)];case 1:return null===(o=a.sent())?[3,6]:"pending"!==n?[3,3]:[4,Zo(i.yl)];case 2:return a.sent(),[3,4];case 3:"acknowledged"===n||"rejected"===n?(Fa(i,e,r||null),Ma(i,e),function(t,e){g(g(t).zo).xi(e)}(i.bh,e)):v(),a.label=4;case 4:return[4,Ha(i,o)];case 5:return a.sent(),[3,7];case 6:f("SyncEngine","Cannot apply mutation batch with id: "+e),a.label=7;case 7:return[2]}}
2))}))}function Xa(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i,o,s,u,c,l;return Object(a.d)(this,(function(a){switch(a.label){case 0:return ns(n=g(t)),rs(n),!0!==e||!0===n.kl?[3,3]:(r=n.Vl.va(),[4,$a(n,r.it())]);case 1:return i=a.sent(),n.kl=!0,[4,aa(n.yl,!0)];case 2:for(a.sent(),o=0,s=i;o<s.length;o++)u=s[o],Vo(n.yl,u);return[3,7];case 3:return!1!==e||!1===n.kl?[3,7]:(c=[],l=Promise.resolve(),n.Sl.forEach((function(t,e){n.Vl.Ma(e)?c.push(e):l=l.then((function(){return Ua(n,e),Yi(n.bh,e,!0)})),qo(n.yl,e)})),[4,l]);case 4:return a.sent(),[4,$a(n,c)];case 5:return a.sent(),function(t){var e=g(t);e.xl.forEach((function(t,n){qo(e.yl,n)})),e.Nl.Oc(),e.xl=new Map,e.Cl=new ze(V.H)}(n),n.kl=!1,[4,aa(n.yl,!1)];case 6:a.sent(),a.label=7;case 7:return[2]}}))}))}function $a(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i,o,s,u,c,l,f,h,p,d,v,y;return Object(a.d)(this,(function(a){switch(a.label){case 0:n=g(t),r=[],i=[],o=0,s=e,a.label=1;case 1:return o<s.length?(u=s[o],c=void 0,(l=n.Sl.get(u))&&0!==l.length?[4,Qi(n.bh,Xt(l[0]))]:[3,7]):[3,13];case 2:c=a.sent(),f=0,h=l,a.label=3;case 3:return f<h.length?(p=h[f],d=n.vl.get(p),[4,Ga(n,d)]):[3,6];case 4:(v=a.sent()).snapshot&&i.push(v.snapshot),a.label=5;case 5:return f++,[3,3];case 6:return[3,11];case 7:return[4,$i(n.bh,u)];case 8:return y=a.sent(),[4,Qi(n.bh,y)];case 9:return c=a.sent(),[4,ka(n,Ja(y),u,!1)];case 10:a.sent(),a.label=11;case 11:r.push(c),a.label=12;case 12:return o++,[3,1];case 13:return[2,(n.bl.ah(i),r)]}}))}))}function Ja(t){return Bt(t.path,t.collectionGroup,t.orderBy,t.filters,t.limit,"F",t.startAt,t.endAt)}function Za(t){var e=g(t);return g(g(e.bh).persistence).Uo()}function ts(t,e,n,r){return Object(a.b)(this,void 0,void 0,(function(){var i,o,s;return Object(a.d)(this,(function(a){switch(a.label){case 0:return(i=g(t)).kl?(f("SyncEngine","Ignoring unexpected query state notification."),[3,8]):[3,1];case 1:if(!i.Sl.has(e))return[3,8];switch(n){case"current":case"not-current":return[3,2];case"rejected":return[3,5]}return[3,7];case 2:return[4,Ji(i.bh)];case 3:return o=a.sent(),s=cn.Me(e,"current"===n),[4,Ha(i,o,s)];case 4:return a.sent(),[3,8];case 5:return[4,Yi(i.bh,e,!0)];case 6:return a.sent(),Ua(i,e,r),[3,8];case 7:v(),a.label=8;case 8:return[2]}}
2))}))}function es(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r,i,o,s,u,c,l,h,p,d;return Object(a.d)(this,(function(v){switch(v.label){case 0:if(!(r=ns(t)).kl)return[3,10];i=0,o=e,v.label=1;case 1:return i<o.length?(s=o[i],r.Sl.has(s)?(f("SyncEngine","Adding an already active target "+s),[3,5]):[4,$i(r.bh,s)]):[3,6];case 2:return u=v.sent(),[4,Qi(r.bh,u)];case 3:return c=v.sent(),[4,ka(r,Ja(u),c.targetId,!1)];case 4:v.sent(),Vo(r.yl,c),v.label=5;case 5:return i++,[3,1];case 6:l=function(t){return Object(a.d)(this,(function(e){switch(e.label){case 0:return r.Sl.has(t)?[4,Yi(r.bh,t,!1).then((function(){qo(r.yl,t),Ua(r,t)})).catch(ri)]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}))},h=0,p=n,v.label=7;case 7:return h<p.length?(d=p[h],[5,l(d)]):[3,10];case 8:v.sent(),v.label=9;case 9:return h++,[3,7];case 10:return[2]}}))}))}function ns(t){var e=g(t);return e.yl.Dh.Lh=xa.bind(null,e),e.yl.Dh.vn=Ka.bind(null,e),e.yl.Dh.Mh=Ra.bind(null,e),e.bl.ah=pa.bind(null,e.gl),e.bl.Bl=da.bind(null,e.gl),e}function rs(t){var e=g(t);return e.yl.Dh.Bh=ja.bind(null,e),e.yl.Dh.qh=Da.bind(null,e),e}function is(t,e,n){var r=g(t);(function(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r,i,o,s,u,c;return Object(a.d)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,14,,15]),[4,e.getMetadata()];case 1:return r=a.sent(),[4,function(t,e){var n=g(t),r=On(e.createTime);return n.persistence.runTransaction("hasNewerBundle","readonly",(function(t){return n.wo.Os(t,e.id)})).then((function(t){return!!t&&t.createTime._(r)>=0}))}(t.bh,r)];case 2:return a.sent()?[4,e.close()]:[3,4];case 3:return[2,(a.sent(),void n.ql(function(t){return{taskState:"Success",documentsLoaded:t.totalDocuments,bytesLoaded:t.totalBytes,totalDocuments:t.totalDocuments,totalBytes:t.totalBytes}}(r)))];case 4:return n.Ul(wa(r)),i=new ba(r,t.bh,e.Qt),[4,e.Ql()];case 5:o=a.sent(),a.label=6;case 6:return o?[4,i.rl(o)]:[3,10];case 7:return(s=a.sent())&&n.Ul(s),[4,e.Ql()];case 8:o=a.sent(),a.label=9;case 9:return[3,6];case 10:return[4,i.complete()];case 11:return u=a.sent(),[4,Ha(t,u.Go,void 0)];case 12:return a.sent(),[4,function(t,e){var n=g(t);return n.persistence.runTransaction("Save bundle","readwrite",(function(t){return n.wo.ks(t,e)}))}(t.bh,r)];case 13:return a.sent(),n.ql(u.progress),[3,15];case 14:return p("SyncEngine","Loading bundle failed with "+(c=a.sent())),n.Kl(c),[3,15];case 15:return[2]}}
2))}))})(r,e,n).then((function(){r.Vl.Wa()}))}var os=function(){function t(){this.synchronizeTabs=!1}return t.prototype.initialize=function(t){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(e){switch(e.label){case 0:return this.Qt=Ao(t.yu.t),this.Vl=this.Wl(t),this.persistence=this.jl(t),[4,this.persistence.start()];case 1:return e.sent(),this.Gl=this.zl(t),this.bh=this.Hl(t),[2]}}))}))},t.prototype.zl=function(t){return null},t.prototype.Hl=function(t){return qi(this.persistence,new Ui,t.Jl,this.Qt)},t.prototype.jl=function(t){return new co(fo.ia,this.Qt)},t.prototype.Wl=function(t){return new Eo},t.prototype.terminate=function(){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(t){switch(t.label){case 0:return this.Gl&&this.Gl.stop(),[4,this.Vl.ko()];case 1:return t.sent(),[4,this.persistence.ko()];case 2:return t.sent(),[2]}}))}))},t}(),as=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).Yl=e,i.cacheSizeBytes=n,i.forceOwnership=r,i.synchronizeTabs=!1,i}return Object(a.c)(e,t),e.prototype.initialize=function(e){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(n){switch(n.label){case 0:return[4,t.prototype.initialize.call(this,e)];case 1:return n.sent(),[4,Zi(this.bh)];case 2:return n.sent(),[4,this.Yl.initialize(this,e)];case 3:return n.sent(),[4,rs(this.Yl._a)];case 4:return n.sent(),[4,Zo(this.Yl.yl)];case 5:return n.sent(),[2]}}))}))},e.prototype.Hl=function(t){return qi(this.persistence,new Ui,t.Jl,this.Qt)},e.prototype.zl=function(t){var e=this.persistence.Ti.lr;return new wi(e,t._s)},e.prototype.jl=function(t){var e=Di(t.yu.t,t.yu.persistenceKey),n=void 0!==this.cacheSizeBytes?ni.Ys(this.cacheSizeBytes):ni.ti;return new Pi(this.synchronizeTabs,e,t.clientId,n,t._s,ko(),No(),this.Qt,this.Vl,!!this.forceOwnership)},e.prototype.Wl=function(t){return new Eo},e}(os),ss=function(t){function e(e,n){var r=this;return(r=t.call(this,e,n,!1)||this).Yl=e,r.cacheSizeBytes=n,r.synchronizeTabs=!0,r}return Object(a.c)(e,t),e.prototype.initialize=function(e){return Object(a.b)(this,void 0,void 0,(function(){var n,r=this;return Object(a.d)(this,(function(i){switch(i.label){case 0:return[4,t.prototype.initialize.call(this,e)];case 1:return i.sent(),n=this.Yl._a,this.Vl instanceof _o?(this.Vl._a={eu:Ya.bind(null,n),nu:ts.bind(null,n),su:es.bind(null,n),Uo:Za.bind(null,n),tu:Qa.bind(null,n)},[4,this.Vl.start()]):[3,3];case 2:i.sent(),i.label=3;case 3:return[4,this.persistence.Ro((function(t){return Object(a.b)(r,void 0,void 0,(function(){return Object(a.d)(this,(function(e){switch(e.label){case 0:return[4,Xa(this.Yl._a,t)];case 1:return e.sent(),this.Gl&&(t&&!this.Gl.Er?this.Gl.start(this.bh):t||this.Gl.stop()),[2]}}))}))}))];case 4:return i.sent(),[2]}}))}))},e.prototype.Wl=function(t){var e=ko();if(!_o.Kn(e))throw new S(O.UNIMPLEMENTED,"IndexedDB persistence is only available on platforms that support LocalStorage.");var n=Di(t.yu.t,t.yu.persistenceKey);return new _o(e,t._s,n,t.clientId,t.Jl)},e}(as),us=function(){function t(){}return t.prototype.initialize=function(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n=this;return Object(a.d)(this,(function(r){switch(r.label){case 0:return this.bh?[3,2]:(this.bh=t.bh,this.Vl=t.Vl,this.Sh=this.Xl(e),this.yl=this.Zl(e),this.gl=this.t_(e),this._a=this.e_(e,!t.synchronizeTabs),this.Vl.fa=function(t){return Pa(n._a,t,1)},this.yl.Dh.n_=Wa.bind(null,this._a),[4,aa(this.yl,this._a.Ml)]);case 1:r.sent(),r.label=2;case 2:return[2]}}
2))}))},t.prototype.t_=function(t){return new la},t.prototype.Xl=function(t){var e,n=Ao(t.yu.t),r=(e=t.yu,new Co(e));return function(t,e,n){return new Do(t,e,n)}(t.credentials,r,n)},t.prototype.Zl=function(t){var e,n,r,i,o,a=this;return e=this.bh,n=this.Sh,r=t._s,i=function(t){return Pa(a._a,t,0)},o=Oo.Kn()?new Oo:new To,new Mo(e,n,r,i,o)},t.prototype.e_=function(t,e){return function(t,e,n,r,i,o,a){var s=new Ia(t,e,n,r,i,o);return a&&(s.kl=!0),s}(this.bh,this.yl,this.gl,this.Vl,t.Jl,t.pl,e)},t.prototype.terminate=function(){return function(t){return Object(a.b)(this,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return e=g(t),f("RemoteStore","RemoteStore shutting down."),e.Nh.add(5),[4,Uo(e)];case 1:return n.sent(),e.Fh.ko(),e.Oh.set("Unknown"),[2]}}))}))}(this.yl)},t}();function cs(t,e){void 0===e&&(e=10240);var n=0;return{read:function(){return Object(a.b)(this,void 0,void 0,(function(){var r;return Object(a.d)(this,(function(i){return n<t.byteLength?(r={value:t.slice(n,n+e),done:!1},[2,(n+=e,r)]):[2,{done:!0}]}))}))},cancel:function(){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(t){return[2]}))}))},releaseLock:function(){}}}var ls=function(){function t(t){this.observer=t,this.muted=!1}return t.prototype.next=function(t){this.observer.next&&this.s_(this.observer.next,t)},t.prototype.error=function(t){this.observer.error?this.s_(this.observer.error,t):console.error("Uncaught Error in snapshot listener:",t)},t.prototype.i_=function(){this.muted=!0},t.prototype.s_=function(t,e){var n=this;this.muted||setTimeout((function(){n.muted||t(e)}),0)},t}(),fs=function(){function t(t,e){var n=this;this.r_=t,this.Qt=e,this.metadata=new $n,this.buffer=new Uint8Array,this.o_=new TextDecoder("utf-8"),this.c_().then((function(t){t&&t.sl()?n.metadata.resolve(t.payload.metadata):n.metadata.reject(new Error("The first element of the bundle is not a metadata, it is\n "+JSON.stringify(null==t?void 0:t.payload)))}),(function(t){return n.metadata.reject(t)}))}return t.prototype.close=function(){return this.r_.cancel()},t.prototype.getMetadata=function(){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(t){return[2,this.metadata.promise]}))}))},t.prototype.Ql=function(){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(t){switch(t.label){case 0:return[4,this.getMetadata()];case 1:return[2,(t.sent(),this.c_())]}}))}))},t.prototype.c_=function(){return Object(a.b)(this,void 0,void 0,(function(){var t,e,n,r;return Object(a.d)(this,(function(i){switch(i.label){case 0:return[4,this.a_()];case 1:return null===(t=i.sent())?[2,null]:(e=this.o_.decode(t),n=Number(e),isNaN(n)&&this.u_("length string ("+e+") is not valid number"),[4,this.h_(n)]);case 2:return r=i.sent(),[2,new ga(JSON.parse(r),t.length+n)]}}))}))},t.prototype.l_=function(){return this.buffer.findIndex((function(t){return t==="{".charCodeAt(0)}))},t.prototype.a_=function(){return Object(a.b)(this,void 0,void 0,(function(){var t,e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return this.l_()<0?[4,this.__()]:[3,3];case 1:if(n.sent())return[3,3];n.label=2;case 2:return[3,0];case 3:return 0===this.buffer.length?[2,null]:((t=this.l_())<0&&this.u_("Reached the end of bundle when a length string is expected."),e=this.buffer.slice(0,t),[2,(this.buffer=this.buffer.slice(t),e)])}}))}))},t.prototype.h_=function(t){return Object(a.b)(this,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return this.buffer.length<t?[4,this.__()]:[3,3];case 1:n.sent()&&this.u_("Reached the end of bundle when more is expected."),n.label=2;case 2:return[3,0];case 3:return e=this.o_.decode(this.buffer.slice(0,t)),[2,(this.buffer=this.buffer.slice(t),e)]}}))}))},t.prototype.u_=function(t){throw this.r_.cancel(),new Error("Invalid bundle format: "+t)},t.prototype.__=function(){return Object(a.b)(this,void 0,void 0,(function(){var t,e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return[4,this.r_.read()];
2case 1:return(t=n.sent()).done||((e=new Uint8Array(this.buffer.length+t.value.length)).set(this.buffer),e.set(t.value,this.buffer.length),this.buffer=e),[2,t.done]}}))}))},t}(),hs=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=0;n<t.length;++n)if(0===t[n].length)throw new S(O.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this.f_=new U(t)}return t.prototype.isEqual=function(t){return this.f_.isEqual(t.f_)},t}(),ps=function(t){this._methodName=t},ds=function(t){this.d_=t};function vs(t,e,n){if(!n)throw new S(O.INVALID_ARGUMENT,"Function "+t+"() cannot be called with an empty "+e+".")}function ys(t,e){if(void 0===e)return{merge:!1};if(void 0!==e.mergeFields&&void 0!==e.merge)throw new S(O.INVALID_ARGUMENT,"Invalid options passed to function "+t+'(): You cannot specify both "merge" and "mergeFields".');return e}function gs(t,e,n,r){if(!0===e&&!0===r)throw new S(O.INVALID_ARGUMENT,t+" and "+n+" cannot be used together.")}function ms(t){if(!V.wt(t))throw new S(O.INVALID_ARGUMENT,"Invalid document reference. Document references must have an even number of segments, but "+t+" has "+t.length+".")}function bs(t){if(V.wt(t))throw new S(O.INVALID_ARGUMENT,"Invalid collection reference. Collection references must have an odd number of segments, but "+t+" has "+t.length+".")}function ws(t){if(void 0===t)return"undefined";if(null===t)return"null";if("string"==typeof t)return t.length>20&&(t=t.substring(0,20)+"..."),JSON.stringify(t);if("number"==typeof t||"boolean"==typeof t)return""+t;if("object"==typeof t){if(t instanceof Array)return"an array";var e=function(t){if(t.constructor){var e=/function\s+([^\s(]+)\s*\(/.exec(t.constructor.toString());if(e&&e.length>1)return e[1]}return null}(t);return e?"a custom "+e+" object":"an object"}return"function"==typeof t?"a function":v()}function _s(t,e){if("_delegate"in t&&(t=t.d_),!(t instanceof e)){if(e.name===t.constructor.name)throw new S(O.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");var n=ws(t);throw new S(O.INVALID_ARGUMENT,"Expected type '"+e.name+"', but it was: "+n)}return t}function Es(t,e){if(e<=0)throw new S(O.INVALID_ARGUMENT,"Function "+t+"() requires a positive number, but it was: "+e+".")}var Ts=function(){function t(t){var e;if(void 0===t.host){if(void 0!==t.ssl)throw new S(O.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=t.host,this.ssl=null===(e=t.ssl)||void 0===e||e;if(this.credentials=t.credentials,this.ignoreUndefinedProperties=!!t.ignoreUndefinedProperties,void 0===t.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==t.cacheSizeBytes&&t.cacheSizeBytes<1048576)throw new S(O.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=t.cacheSizeBytes}this.experimentalForceLongPolling=!!t.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!!t.experimentalAutoDetectLongPolling,g
2s("experimentalForceLongPolling",t.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",t.experimentalAutoDetectLongPolling)}return t.prototype.isEqual=function(t){return this.host===t.host&&this.ssl===t.ssl&&this.credentials===t.credentials&&this.cacheSizeBytes===t.cacheSizeBytes&&this.experimentalForceLongPolling===t.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===t.experimentalAutoDetectLongPolling&&this.ignoreUndefinedProperties===t.ignoreUndefinedProperties},t}(),Os=new Map,Ss=function(){function t(t,e){this.w_="(lite)",this.E_=new Ts({}),this.T_=!1,t instanceof u?(this.I_=t,this.m_=new N):(this.A_=t,this.I_=function(t){if(!Object.prototype.hasOwnProperty.apply(t.options,["projectId"]))throw new S(O.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new u(t.options.projectId)}(t),this.m_=new A(e))}return Object.defineProperty(t.prototype,"app",{get:function(){if(!this.A_)throw new S(O.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this.A_},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"R_",{get:function(){return this.T_},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"P_",{get:function(){return void 0!==this.y_},enumerable:!1,configurable:!0}),t.prototype.g_=function(t){if(this.T_)throw new S(O.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this.E_=new Ts(t),void 0!==t.credentials&&(this.m_=function(t){if(!t)return new N;switch(t.type){case"gapi":var e=t.client;return y(!("object"!=typeof e||null===e||!e.auth||!e.auth.getAuthHeaderValueForFirstParty)),new P(e,t.sessionIndex||"0");case"provider":return t.client;default:throw new S(O.INVALID_ARGUMENT,"makeCredentialsProvider failed due to invalid credential type")}}(t.credentials))},t.prototype.V_=function(){return this.E_},t.prototype.p_=function(){return this.T_=!0,this.E_},t.prototype._delete=function(){return this.y_||(this.y_=this.b_()),this.y_},t.prototype.toJSON=function(){return{app:this.A_,t:this.I_,settings:this.E_}},t.prototype.b_=function(){return this,(t=Os.get(this))&&(f("ComponentProvider","Removing Datastore"),Os.delete(this),t.terminate()),Promise.resolve();var t},t}(),Is=function(){function t(t,e,n){this.v_=e,this.S_=n,this.type="document",this.firestore=t}return Object.defineProperty(t.prototype,"D_",{get:function(){return this.S_.path},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return this.S_.path.tt()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return this.S_.path.rt()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return new ks(this.firestore,this.v_,this.S_.path.X())},enumerable:!1,configurable:!0}),t.prototype.withConverter=function(e){return new t(this.firestore,e,this.S_)},t}(),Cs=function(){function t(t,e,n){this.v_=e,this.C_=n,this.type="query",this.firestore=t}return t.prototype.withConverter=function(e){return new t(this.firestore,e,this.C_)},t}(),ks=function(t){function e(e,n,r){var i=this;return(i=t.call(this,e,n,zt(r))||this).firestore=e,i.D_=r,i.type="collection",i}return Object(a.c)(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this.C_.path.tt()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this.C_.path.rt()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){var t=this.D_.X();return t.et()?null:new Is(this.firestore,null,new V(t))},enumerable:!1,configurable:!0}),e.prototype.withConverter=function(t){return new e(this.firestore,t,this.D_)},e}(Cs);function Ns(t,e){for(var n,r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];if(t instanceof ds&&(t=t.d_),vs("collection","path",e),t instanceof Ss)return bs(n=M.ot.apply(M,Object(a.g)([e],r))),new ks(t,null,n);if(!(t instanceof Is||t instanceof ks))throw new S(O.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");return bs(n=M.ot.apply(M,Object(a.g)([t.path],r)).child(M.ot(e))),new ks(t.firestore,
2null,n)}function As(t,e){for(var n,r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];if(t instanceof ds&&(t=t.d_),1===arguments.length&&(e=b.u()),vs("doc","path",e),t instanceof Ss)return ms(n=M.ot.apply(M,Object(a.g)([e],r))),new Is(t,null,new V(n));if(!(t instanceof Is||t instanceof ks))throw new S(O.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");return ms(n=t.D_.child(M.ot.apply(M,Object(a.g)([e],r)))),new Is(t.firestore,t instanceof ks?t.v_:null,new V(n))}function xs(t,e){return t instanceof ds&&(t=t.d_),e instanceof ds&&(e=e.d_),(t instanceof Is||t instanceof ks)&&(e instanceof Is||e instanceof ks)&&t.firestore===e.firestore&&t.path===e.path&&t.v_===e.v_}function Ps(t,e){return t instanceof ds&&(t=t.d_),e instanceof ds&&(e=e.d_),t instanceof Cs&&e instanceof Cs&&t.firestore===e.firestore&&Jt(t.C_,e.C_)&&t.v_===e.v_}var Rs=function(){function t(t,e){if(!isFinite(t)||t<-90||t>90)throw new S(O.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+t);if(!isFinite(e)||e<-180||e>180)throw new S(O.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+e);this.x_=t,this.N_=e}return Object.defineProperty(t.prototype,"latitude",{get:function(){return this.x_},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"longitude",{get:function(){return this.N_},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(t){return this.x_===t.x_&&this.N_===t.N_},t.prototype.toJSON=function(){return{latitude:this.x_,longitude:this.N_}},t.prototype.U=function(t){return w(this.x_,t.x_)||w(this.N_,t.N_)},t}(),js=/^__.*__$/,Ds=function(){function t(t,e,n){this.data=t,this.Gt=e,this.fieldTransforms=n}return t.prototype.F_=function(t,e){return null!==this.Gt?new xe(t,this.data,this.Gt,e,this.fieldTransforms):new Ae(t,this.data,e,this.fieldTransforms)},t}(),Ls=function(){function t(t,e,n){this.data=t,this.Gt=e,this.fieldTransforms=n}return t.prototype.F_=function(t,e){return new xe(t,this.data,this.Gt,e,this.fieldTransforms)},t}();function Ms(t){switch(t){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw v()}}var Fs=function(){function t(t,e,n,r,i,o){this.settings=t,this.t=e,this.Qt=n,this.ignoreUndefinedProperties=r,void 0===i&&this.O_(),this.fieldTransforms=i||[],this.Gt=o||[]}return Object.defineProperty(t.prototype,"path",{get:function(){return this.settings.path},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"k_",{get:function(){return this.settings.k_},enumerable:!1,configurable:!0}),t.prototype.M_=function(e){return new t(Object.assign(Object.assign({},this.settings),e),this.t,this.Qt,this.ignoreUndefinedProperties,this.fieldTransforms,this.Gt)},t.prototype.L_=function(t){var e,n=null===(e=this.path)||void 0===e?void 0:e.child(t),r=this.M_({path:n,B_:!1});return r.q_(t),r},t.prototype.U_=function(t){var e,n=null===(e=this.path)||void 0===e?void 0:e.child(t),r=this.M_({path:n,B_:!1});return r.O_(),r},t.prototype.Q_=function(t){return this.M_({path:void 0,B_:!0})},t.prototype.K_=function(t){return iu(t,this.settings.methodName,this.settings.W_||!1,this.path,this.settings.j_)},t.prototype.contains=function(t){return void 0!==this.Gt.find((function(e){return t.nt(e)}))||void 0!==this.fieldTransforms.find((function(e){return t.nt(e.field)}))},t.prototype.O_=function(){if(this.path)for(var t=0;t<this.path.length;t++)this.q_(this.path.get(t))},t.prototype.q_=function(t){if(0===t.length)throw this.K_("Document fields must not be empty");if(Ms(this.k_)&&js.test(t))throw this.K_('Document fields cannot begin and end with "__"')},t}(),Us=function(){function t(t,e,n){this.t=t,this.ignoreUndefinedProperties=e,this.Qt=n||Ao(t)}return t.prototype.G_=function(t,e,n,r){return void 0===r&&(r=!1),new Fs({k_:t,methodName:e,j_:n,path:U.ct(),B_:!1,W_:r},this.t,this.Qt,this.ignoreUndefinedProperties)},t}();function Vs(t){var e=t.p_(),n=Ao(t.I_);return new Us(t.I_,!!e.ignoreUndefinedProperties,n)}function qs(t,e,n,r,i,o){void 0===o&&(o={});var a=t.G_(o.merge||o.mergeFields?2:0,e,n,i);tu("Data must be an object, but it was:",a,r);var s,u,c=Js(r,a);if(o.merge)s=new H(a.Gt),u=a.fieldTransforms;else if(o.mergeFields){for(var l=[],f=0,h=o.mergeFields;f<h.length;f++){var p=eu(e,h[f],n);if(!a.contains(p))throw new S(O.INVALID_ARGUMENT,"Field '"+p+"' is specified in your field mask but missing from your input data.");ou(l,p)||l.push(p)}s=new H(l),u=a.fieldTransforms.filter((function(t){return s.Tt(t.field)}))}else s=null,u=a.fieldTransforms;return new Ds(new dt(c),s,u)}var Bs=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.prototype.z_=function(t){if(2!==t.k_)throw 1===t.k_?t.K_(this._methodName+"() can only appear at the top level of your update data"):t.K_(this._methodName+"() cannot be used with set() unless you pass {merge:true}");return t.Gt.push(t.path),null},e.prototype.isEqual=function(t){return t instanceof e},e}(ps);function zs(t,e,n){return new Fs({k_:3,j_:e.settings.j_,methodName:t._methodName,B_:n},e.t,e.Qt,e.ignoreUndefinedProperties)}var Hs=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.prototype.z_=function(t){return new we(t.path,new he)},e.prototype.isEqual=function(t){return t instanceof e},e}(ps),Ws=function(t){function e(e,n){var r=this;return(r=t.call(this,e)||this).H_=n,r}return Object(a.c)(e,t),e.prototype.z_=function(t){var e=zs(this,t,!0),n=this.H_.map((function(t){return $s(t,e)})),r=new pe(n);return new we(t.path,r)},e.prototype.isEqual=function(t){return this===t},e}(ps),Ks=function(t){function e(e,n){var r=this;return(r=t.call(this,e)||this).H_=n,r}return Object(a.c)(e,t),e.prototype.z_=function(t){var e=zs(this,t,!0),n=this.H_.map((function(t){return $s(t,e)})),r=new ve(n);return new we(t.path,r)},e.prototype.isEqual=function(t){return this===t},e}(ps),Gs=function(t){function e(e,n){var r=this;return(r=t.call(this,e)||this).J_=n,r}return Object(a.c)(e,t),e.prototype.z_=function(t){var e=new ge(t.Qt,se(t.Qt,this.J_));return new we(t.path,e)},e.prototype.isEqual=function(t){return this===t},e}(ps);function Qs(t,e,n,r){var i=t.G_(1,e,n);tu("Data must be an object, but it was:",i,r);var o=[],a=new vt;B(r,(function(t,r){var s=ru(e,t,n);r instanceof ds&&(r=r.d_);var u=i.U_(s);if(r instanceof Bs)o.push(s);else{var c=$s(r,u);null!=c&&(o.push(s),a.set(s,c))}}));var s=new H(o);return new Ls(a.Pt(),s,i.fieldTransforms)}function Ys(t,e,n,r,i,o){var a=t.G_(1,e,n),s=[eu(e,r,n)],u=[i];if(o.length%2!=0)throw new S(O.INVALID_ARGUMENT,"Function "+e+"() needs to be called with an even number of arguments that alternate between field names and values.");for(var c=0;c<o.length;c+=2)s.push(eu(e,o[c])),u.push(o[c+1]);for(var l=[],f=new vt,h=s.length-1;h>=0;--h)if(!ou(l,s[h])){var p=s[h],d=u[h];d instanceof ds&&(d=d.d_);var v=a.U_(p);if(d instanceof Bs)l.push(p);else{var y=$s(d,v);null!=y&&(l.push(p),f.set(p,y))}}var g=new H(l);return new Ls(f.Pt(),g,a.fieldTransforms)}function Xs(t,e,n,r){return void 0===r&&(r=!1),$s(n,t.G_(r?4:3,e))}function $s(t,e){if(t instanceof ds&&(t=t.d_),Zs(t))return tu("Unsupported field value:",e,t),Js(t,e);if(t instanceof ps)return function(t,e){if(!Ms(e.k_))throw e.K_(t._methodName+"() can only be used with update(
2) and set()");if(!e.path)throw e.K_(t._methodName+"() is not currently supported inside arrays");var n=t.z_(e);n&&e.fieldTransforms.push(n)}(t,e),null;if(void 0===t&&e.ignoreUndefinedProperties)return null;if(e.path&&e.Gt.push(e.path),t instanceof Array){if(e.settings.B_&&4!==e.k_)throw e.K_("Nested arrays are not supported");return function(t,e){for(var n=[],r=0,i=0,o=t;i<o.length;i++){var a=$s(o[i],e.Q_(r));null==a&&(a={nullValue:"NULL_VALUE"}),n.push(a),r++}return{arrayValue:{values:n}}}(t,e)}return function(t,e){if(t instanceof ds&&(t=t.d_),null===t)return{nullValue:"NULL_VALUE"};if("number"==typeof t)return se(e.Qt,t);if("boolean"==typeof t)return{booleanValue:t};if("string"==typeof t)return{stringValue:t};if(t instanceof Date){var n=j.fromDate(t);return{timestampValue:_n(e.Qt,n)}}if(t instanceof j)return n=new j(t.seconds,1e3*Math.floor(t.nanoseconds/1e3)),{timestampValue:_n(e.Qt,n)};if(t instanceof Rs)return{geoPointValue:{latitude:t.latitude,longitude:t.longitude}};if(t instanceof I)return{bytesValue:En(e.Qt,t.I)};if(t instanceof Is){n=e.t;var r=t.firestore.I_;if(!r.isEqual(n))throw e.K_("Document reference is for database "+r.projectId+"/"+r.database+" but should be for database "+n.projectId+"/"+n.database);return{referenceValue:Sn(t.firestore.I_||e.t,t.S_.path)}}throw e.K_("Unsupported field value: "+ws(t))}(t,e)}function Js(t,e){var n={};return z(t)?e.path&&e.path.length>0&&e.Gt.push(e.path):B(t,(function(t,r){var i=$s(r,e.L_(t));null!=i&&(n[t]=i)})),{mapValue:{fields:n}}}function Zs(t){return!("object"!=typeof t||null===t||t instanceof Array||t instanceof Date||t instanceof j||t instanceof Rs||t instanceof I||t instanceof Is||t instanceof ps)}function tu(t,e,n){if(!Zs(n)||!function(t){return"object"==typeof t&&null!==t&&(Object.getPrototypeOf(t)===Object.prototype||null===Object.getPrototypeOf(t))}(n)){var r=ws(n);throw"an object"===r?e.K_(t+" a custom object"):e.K_(t+" "+r)}}function eu(t,e,n){if(e instanceof ds&&(e=e.d_),e instanceof hs)return e.f_;if("string"==typeof e)return ru(t,e);throw iu("Field path arguments must be of type string or FieldPath.",t,!1,void 0,n)}var nu=new RegExp("[~\\*/\\[\\]]");function ru(t,e,n){if(e.search(nu)>=0)throw iu("Invalid field path ("+e+"). Paths must not contain '~', '*', '/', '[', or ']'",t,!1,void 0,n);try{return(new(hs.bind.apply(hs,Object(a.g)([void 0],e.split("."))))).f_}catch(r){throw iu("Invalid field path ("+e+"). Paths must not be empty, begin with '.', end with '.', or contain '..'",t,!1,void 0,n)}}function iu(t,e,n,r,i){var o=r&&!r.et(),a=void 0!==i,s="Function "+e+"() called with invalid data";n&&(s+=" (via `toFirestore()`)");var u="";return(o||a)&&(u+=" (found",o&&(u+=" in field "+r),a&&(u+=" in document "+i),u+=")"),new S(O.INVALID_ARGUMENT,(s+=". ")+t+u)}function ou(t,e){return t.some((function(t){return t.isEqual(e)}))}var au=function(){function t(t){this.Sh=t,this.Y_=new Map,this.mutations=[],this.X_=!1,this.Z_=null,this.tf=new Set}return t.prototype.ef=function(t){return Object(a.b)(this,void 0,void 0,(function(){var e,n=this;return Object(a.d)(this,(function(r){switch(r.label){case 0:if(this.nf(),this.mutations.length>0)throw new S(O.INVALID_ARGUMENT,"Firestore transactions require all reads to be executed before all writes.");return[4,function(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i,o,s,u;return Object(a.d)(this,(function(a){switch(a.label){case 0:return n=g(t),r=xn(n.Qt)+"/documents",i={documents:e.map((function(t){return Cn(n.Qt,t)}))},[4,n.Du("BatchGetDocuments",r,i)];case 1:return o=a.sent(),s=new Map,o.forEach((function(t){var e=function(t,e){return"found"in e?function(t,e){y(!!e.found),e.found.name,e.found.updateTime;var n=kn(t,e.found.name),r=On(e.found.updateTime),i=new dt({mapValue:{fields:e.found.fields}});return new mt(n,r,i,{})}(t,e):"missing"in e?function(t,e){y(!!e.missing),y(!!e.readTime);var n=kn(t,e.missing),r=On(e.readTime);return new bt(n,r)}(t,e):v()}(n.Qt,t);s.set(e.key.toString(),e)})),u=[],[2,(e.forEach((function(t){var e=s.get(t.toString());y(!!e),u.push(e)})),u)]}}))}))}(this.Sh,t)];
2case 1:return[2,((e=r.sent()).forEach((function(t){t instanceof bt||t instanceof mt?n.sf(t):v()})),e)]}}))}))},t.prototype.set=function(t,e){this.write(e.F_(t,this.jt(t))),this.tf.add(t.toString())},t.prototype.update=function(t,e){try{this.write(e.F_(t,this.rf(t)))}catch(t){this.Z_=t}this.tf.add(t.toString())},t.prototype.delete=function(t){this.write(new Fe(t,this.jt(t))),this.tf.add(t.toString())},t.prototype.commit=function(){return Object(a.b)(this,void 0,void 0,(function(){var t,e=this;return Object(a.d)(this,(function(n){switch(n.label){case 0:if(this.nf(),this.Z_)throw this.Z_;return t=this.Y_,this.mutations.forEach((function(e){t.delete(e.key.toString())})),t.forEach((function(t,n){var r=V._t(n);e.mutations.push(new Ue(r,e.jt(r)))})),[4,function(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i;return Object(a.d)(this,(function(o){switch(o.label){case 0:return n=g(t),r=xn(n.Qt)+"/documents",i={writes:e.map((function(t){return Dn(n.Qt,t)}))},[4,n.pu("Commit",r,i)];case 1:return o.sent(),[2]}}))}))}(this.Sh,this.mutations)];case 1:return n.sent(),this.X_=!0,[2]}}))}))},t.prototype.sf=function(t){var e;if(t instanceof mt)e=t.version;else{if(!(t instanceof bt))throw v();e=D.min()}var n=this.Y_.get(t.key.toString());if(n){if(!e.isEqual(n))throw new S(O.ABORTED,"Document version changed between two reads.")}else this.Y_.set(t.key.toString(),e)},t.prototype.jt=function(t){var e=this.Y_.get(t.toString());return!this.tf.has(t.toString())&&e?Ee.updateTime(e):Ee.Kt()},t.prototype.rf=function(t){var e=this.Y_.get(t.toString());if(!this.tf.has(t.toString())&&e){if(e.isEqual(D.min()))throw new S(O.INVALID_ARGUMENT,"Can't update a document that doesn't exist.");return Ee.updateTime(e)}return Ee.exists(!0)},t.prototype.write=function(t){this.nf(),this.mutations.push(t)},t.prototype.nf=function(){},t}(),su=function(){function t(t,e,n,r){this._s=t,this.Sh=e,this.updateFunction=n,this.Es=r,this.cf=5,this.Gu=new xo(this._s,"transaction_retry")}return t.prototype.run=function(){this.af()},t.prototype.af=function(){var t=this;this.Gu.Lu((function(){return Object(a.b)(t,void 0,void 0,(function(){var t,e,n=this;return Object(a.d)(this,(function(r){return t=new au(this.Sh),(e=this.uf(t))&&e.then((function(e){n._s.Ps((function(){return t.commit().then((function(){n.Es.resolve(e)})).catch((function(t){n.hf(t)}))}))})).catch((function(t){n.hf(t)})),[2]}))}))}))},t.prototype.uf=function(t){try{var e=this.updateFunction(t);return!J(e)&&e.catch&&e.then?e:(this.Es.reject(Error("Transaction callback must return a Promise")),null)}catch(t){return this.Es.reject(t),null}},t.prototype.hf=function(t){var e=this;this.cf>0&&this.lf(t)?(this.cf-=1,this._s.Ps((function(){return e.af(),Promise.resolve()}))):this.Es.reject(t)},t.prototype.lf=function(t){if("FirebaseError"===t.name){var e=t.code;return"aborted"===e||"failed-precondition"===e||!qe(e)}return!1},t}(),uu=function(){function t(t,e,n){var r=this;this.credentials=t,this._s=e,this.yu=n,this.user=C.UNAUTHENTICATED,this.clientId=b.u(),this._f=function(){},this.C=new $n,this.credentials.v((function(t){f("FirestoreClient","Received user=",t.uid),r.user=t,r._f(t),r.C.resolve()}))}return t.prototype.getConfiguration=function(){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(t){switch(t.label){case 0:return[4,this.C.promise];case 1:return[2,(t.sent(),{_s:this._s,yu:this.yu,clientId:this.clientId,credentials:this.credentials,Jl:this.user,pl:100})]}}))}))},t.prototype.ff=function(t){var e=this;this._f=t,this.C.promise.then((function(){return e._f(e.user)}))},t.prototype.df=function(){if(this._s.wf)throw new S(O.FAILED_PRECONDITION,"The client has already been terminated.")},t.prototype.terminate=function(){var t=this;this._s.Ef();var e=new $n;return this._s.Tf((function(){return Object(a.b)(t,void 0,void 0,(function(){var t,n;return Object(a.d)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,5,,6]),this.If?[4,this.If.terminate()]:[3,2];case 1:r.sent(),r.label=2;case 2:return this.mf?[4,this.mf.terminate()]:[3,4];case 3:r.sent(),r.label=4;case 4:return this.credentials.S(),e.resolve(),[3,6];case 5:return t=r.sent(),n=cr(t,"Failed to shutdown persistence"),e.reject(n),[3,6];case 6:return[2]}}
2))}))})),e.promise},t}();function cu(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i=this;return Object(a.d)(this,(function(o){switch(o.label){case 0:return t._s.Af(),f("FirestoreClient","Initializing OfflineComponentProvider"),[4,t.getConfiguration()];case 1:return n=o.sent(),[4,e.initialize(n)];case 2:return o.sent(),r=n.Jl,t.ff((function(n){r.isEqual(n)||(r=n,t._s.po((function(){return Object(a.b)(i,void 0,void 0,(function(){return Object(a.d)(this,(function(t){switch(t.label){case 0:return[4,Bi(e.bh,n)];case 1:return t.sent(),[2]}}))}))})))})),e.persistence.Po((function(){return t.terminate()})),t.mf=e,[2]}}))}))}function lu(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r;return Object(a.d)(this,(function(i){switch(i.label){case 0:return t._s.Af(),[4,fu(t)];case 1:return n=i.sent(),f("FirestoreClient","Initializing OnlineComponentProvider"),[4,t.getConfiguration()];case 2:return r=i.sent(),[4,e.initialize(n,r)];case 3:return i.sent(),t.ff((function(n){return t._s.po((function(){return function(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r;return Object(a.d)(this,(function(i){switch(i.label){case 0:return(n=g(t))._s.Af(),f("RemoteStore","RemoteStore received new credentials"),r=Ko(n),n.Nh.add(3),[4,Uo(n)];case 1:return i.sent(),r&&n.Oh.set("Unknown"),[4,n.Dh.n_(e)];case 2:return i.sent(),n.Nh.delete(3),[4,Fo(n)];case 3:return i.sent(),[2]}}))}))}(e.yl,n)}))})),t.If=e,[2]}}))}))}function fu(t){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(e){switch(e.label){case 0:return t.mf?[3,2]:(f("FirestoreClient","Using default OfflineComponentProvider"),[4,cu(t,new os)]);case 1:e.sent(),e.label=2;case 2:return[2,t.mf]}}))}))}function hu(t){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(e){switch(e.label){case 0:return t.If?[3,2]:(f("FirestoreClient","Using default OnlineComponentProvider"),[4,lu(t,new us)]);case 1:e.sent(),e.label=2;case 2:return[2,t.If]}}))}))}function pu(t){return fu(t).then((function(t){return t.persistence}))}function du(t){return fu(t).then((function(t){return t.bh}))}function vu(t){return hu(t).then((function(t){return t.yl}))}function yu(t){return hu(t).then((function(t){return t._a}))}function gu(t){return Object(a.b)(this,void 0,void 0,(function(){var e,n;return Object(a.d)(this,(function(r){switch(r.label){case 0:return[4,hu(t)];case 1:return e=r.sent(),[2,((n=e.gl).jh=Ca.bind(null,e._a),n.Hh=Na.bind(null,e._a),n)]}}))}))}function mu(t,e,n){var r=this;void 0===n&&(n={});var i=new $n;return t._s.Ps((function(){return Object(a.b)(r,void 0,void 0,(function(){var r;return Object(a.d)(this,(function(o){switch(o.label){case 0:return r=function(t,e,n,r,i){var o=new ls({next:function(o){e.Ps((function(){return ha(t,a)}));var s=o.docs.has(n);!s&&o.fromCache?i.reject(new S(O.UNAVAILABLE,"Failed to get document because the client is offline.")):s&&o.fromCache&&r&&"server"===r.source?i.reject(new S(O.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):i.resolve(o)},error:function(t){return i.reject(t)}}),a=new ya(zt(n.path),o,{includeMetadataChanges:!0,nl:!0});return fa(t,a)},[4,gu(t)];case 1:return[2,r.apply(void 0,[o.sent(),t._s,e,n,i])]}}))}))})),i.promise}function bu(t,e,n){var r=this;void 0===n&&(n={});var i=new $n;return t._s.Ps((function(){return Object(a.b)(r,void 0,void 0,(function(){var r;return Object(a.d)(this,(function(o){switch(o.label){case 0:return r=function(t,e,n,r,i){var o=new ls({next:function(n){e.Ps((function(){return ha(t,a)})),n.fromCache&&"server"===r.source?i.reject(new S(O.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):i.resolve(n)},error:function(t){return i.reject(t)}}),a=new ya(n,o,{includeMetadataChanges:!0,nl:!0});return fa(t,a)},[4,gu(t)];case 1:return[2,r.apply(void 0,[o.sent(),t._s,e,n,i])]}}))}))})),i.promise}var wu=function(){function t(){var t=this;this.Rf=Promise.resolve(),this.Pf=[],this.yf=!1,this.gf=[],this.Vf=null,this.pf=!1,this.bf=[],this.Gu=new xo(this,"async_queue_retry"),this.vf=function(){var e=No();e&&f("AsyncQueue","Visibility state changed to "+e.visibilityState),t.Gu.qu()};var e=No();e&&"function"==typeof e.addEventListener&&e.addEventListener("visibilitychange",this.vf)}return Object.defineProperty(t.prototype,"wf",{get:function(){return this.yf}
2,enumerable:!1,configurable:!0}),t.prototype.Ps=function(t){this.enqueue(t)},t.prototype.Tf=function(t){this.Sf(),this.Df(t)},t.prototype.Ef=function(){if(!this.yf){this.yf=!0;var t=No();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this.vf)}},t.prototype.enqueue=function(t){return this.Sf(),this.yf?new Promise((function(t){})):this.Df(t)},t.prototype.po=function(t){var e=this;this.Ps((function(){return e.Pf.push(t),e.Cf()}))},t.prototype.Cf=function(){return Object(a.b)(this,void 0,void 0,(function(){var t,e=this;return Object(a.d)(this,(function(n){switch(n.label){case 0:if(0===this.Pf.length)return[3,5];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.Pf[0]()];case 2:return n.sent(),this.Pf.shift(),this.Gu.reset(),[3,4];case 3:if(!rr(t=n.sent()))throw t;return f("AsyncQueue","Operation failed with retryable error: "+t),[3,4];case 4:this.Pf.length>0&&this.Gu.Lu((function(){return e.Cf()})),n.label=5;case 5:return[2]}}))}))},t.prototype.Df=function(t){var e=this,n=this.Rf.then((function(){return e.pf=!0,t().catch((function(t){throw e.Vf=t,e.pf=!1,h("INTERNAL UNHANDLED ERROR: ",function(t){var e=t.message||"";return t.stack&&(e=t.stack.includes(t.message)?t.stack:t.message+"\n"+t.stack),e}(t)),t})).then((function(t){return e.pf=!1,t}))}));return this.Rf=n,n},t.prototype.Tr=function(t,e,n){var r=this;this.Sf(),this.bf.indexOf(t)>-1&&(e=0);var i=ur.Ts(this,t,e,n,(function(t){return r.xf(t)}));return this.gf.push(i),i},t.prototype.Sf=function(){this.Vf&&v()},t.prototype.Af=function(){},t.prototype.Nf=function(){return Object(a.b)(this,void 0,void 0,(function(){var t;return Object(a.d)(this,(function(e){switch(e.label){case 0:return[4,t=this.Rf];case 1:e.sent(),e.label=2;case 2:if(t!==this.Rf)return[3,0];e.label=3;case 3:return[2]}}
2))}))},t.prototype.$f=function(t){for(var e=0,n=this.gf;e<n.length;e++)if(n[e].fs===t)return!0;return!1},t.prototype.Ff=function(t){var e=this;return this.Nf().then((function(){e.gf.sort((function(t,e){return t.ds-e.ds}));for(var n=0,r=e.gf;n<r.length;n++){var i=r[n];if(i.Rs(),"all"!==t&&i.fs===t)break}return e.Nf()}))},t.prototype.Of=function(t){this.bf.push(t)},t.prototype.xf=function(t){var e=this.gf.indexOf(t);this.gf.splice(e,1)},t}();function _u(t){return function(t,e){if("object"!=typeof t||null===t)return!1;for(var n=t,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}(t)}var Eu=function(){function t(){this.kf={},this.Mf=new $n,this.Lf={taskState:"Running",totalBytes:0,totalDocuments:0,bytesLoaded:0,documentsLoaded:0}}return t.prototype.onProgress=function(t,e,n){this.kf={next:t,error:e,complete:n}},t.prototype.catch=function(t){return this.Mf.promise.catch(t)},t.prototype.then=function(t,e){return this.Mf.promise.then(t,e)},t.prototype.ql=function(t){this.Ul(t),this.kf.complete&&this.kf.complete(),this.Mf.resolve(t)},t.prototype.Kl=function(t){this.Lf.taskState="Error",this.kf.next&&this.kf.next(this.Lf),this.kf.error&&this.kf.error(t),this.Mf.reject(t)},t.prototype.Ul=function(t){this.Lf=t,this.kf.next&&this.kf.next(t)},t}(),Tu=-1,Ou=function(t){function e(e,n){var r=this;return(r=t.call(this,e,n)||this).Bf=new wu,r.w_="name"in e?e.name:"[DEFAULT]",r}return Object(a.c)(e,t),e.prototype.b_=function(){return this.qf||Iu(this),this.qf.terminate()},e}(Ss);function Su(t){return t.qf||Iu(t),t.qf.df(),t.qf}function Iu(t){var e=t.p_(),n=function(t,e,n){return new s(t,e,n.host,n.ssl,n.experimentalForceLongPolling,n.experimentalAutoDetectLongPolling)}(t.I_,t.w_,e);t.qf=new uu(t.m_,t.Bf,n)}function Cu(t,e,n){var r=this,i=new $n;return t._s.enqueue((function(){return Object(a.b)(r,void 0,void 0,(function(){var r;return Object(a.d)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),[4,cu(t,n)];case 1:return o.sent(),[4,lu(t,e)];case 2:return o.sent(),i.resolve(),[3,4];case 3:if(!function(t){return"FirebaseError"===t.name?t.code===O.FAILED_PRECONDITION||t.code===O.UNIMPLEMENTED:!("undefined"!=typeof DOMException&&t instanceof DOMException)||22===t.code||20===t.code||11===t.code}(r=o.sent()))throw r;return console.warn("Error enabling offline persistence. Falling back to persistence disabled: "+r),i.reject(r),[3,4];case 4:return[2]}}
2))}))})).then((function(){return i.promise}))}function ku(t){if(t.R_||t.P_)throw new S(O.FAILED_PRECONDITION,"Firestore has already been started and persistence can no longer be enabled. You can only enable persistence before calling any other methods on a Firestore object.")}var Nu=function(){function t(){}return t.prototype.Uf=function(t,e){switch(void 0===e&&(e="none"),et(t)){case 0:return null;case 1:return t.booleanValue;case 2:return G(t.integerValue||t.doubleValue);case 3:return this.Qf(t.timestampValue);case 4:return this.Kf(t,e);case 5:return t.stringValue;case 6:return this.Wf(Q(t.bytesValue));case 7:return this.jf(t.referenceValue);case 8:return this.Gf(t.geoPointValue);case 9:return this.zf(t.arrayValue,e);case 10:return this.Hf(t.mapValue,e);default:throw v()}},t.prototype.Hf=function(t,e){var n=this,r={};return B(t.fields||{},(function(t,i){r[t]=n.Uf(i,e)})),r},t.prototype.Gf=function(t){return new Rs(G(t.latitude),G(t.longitude))},t.prototype.zf=function(t,e){var n=this;return(t.values||[]).map((function(t){return n.Uf(t,e)}))},t.prototype.Kf=function(t,e){switch(e){case"previous":var n=X(t);return null==n?null:this.Uf(n,e);case"estimate":return this.Qf($(t));default:return null}},t.prototype.Qf=function(t){var e=K(t);return new j(e.seconds,e.nanos)},t.prototype.Jf=function(t,e){var n=M.ot(t);y(Xn(n));var r=new u(n.get(1),n.get(3)),i=new V(n.Y(5));return r.isEqual(e)||h("Document "+i+" contains a document reference within a different database ("+r.projectId+"/"+r.database+") which is not supported. It will be treated as a reference in the current database ("+e.projectId+"/"+e.database+") instead."),i},t}(),Au=function(){function t(t,e,n,r,i){this.Yf=t,this.Xf=e,this.S_=n,this.Zf=r,this.v_=i}return Object.defineProperty(t.prototype,"id",{get:function(){return this.S_.path.tt()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ref",{get:function(){return new Is(this.Yf,this.v_,this.S_)},enumerable:!1,configurable:!0}),t.prototype.exists=function(){return null!==this.Zf},t.prototype.data=function(){if(this.Zf){if(this.v_){var t=new xu(this.Yf,this.Xf,this.S_,this.Zf,null);return this.v_.fromFirestore(t)}return this.Xf.Uf(this.Zf.bt())}},t.prototype.get=function(t){if(this.Zf){var e=this.Zf.data().field(Pu("DocumentSnapshot.get",t));if(null!==e)return this.Xf.Uf(e)}},t}(),xu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.prototype.data=function(){return t.prototype.data.call(this)},e}(Au);function Pu(t,e){return"string"==typeof e?ru(t,e):e instanceof ds?e.d_.f_:e.f_}function Ru(t){if(Wt(t)&&0===t.xt.length)throw new S(O.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}var ju=function(){};function Du(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0,i=e;r<i.length;r++){var o=i[r];t=o.td(t)}return t}var Lu=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).ed=e,i.nd=n,i.sd=r,i.type="where",i}return Object(a.c)(e,t),e.prototype.td=function(t){var e=Vs(t.firestore),n=function(t,e,n,r,i,o,a){var s;if(i.ut()){if("array-contains"===o||"array-contains-any"===o)throw new S(O.INVALID_ARGUMENT,"Invalid Query. You can't perform '"+o+"' queries on FieldPath.documentId().");if("in"===o||"not-in"===o){zu(a,o);for(var u=[],c=0,l=a;c<l.length;c++){var f=l[c];u.push(Bu(r,t,f))}s={arrayValue:{values:u}}}else s=Bu(r,t,a)}else"in"!==o&&"not-in"!==o&&"array-contains-any"!==o||zu(a,o),s=Xs(n,"where",a,"in"===o||"not-in"===o);var h=It.create(i,o,s);return function(t,e){if(e.Ct()){var n=Gt(t);if(null!==n&&!n.isEqual(e.field))throw new S(O.INVALID_ARGUMENT,"Invalid query. All where filters with an inequality (<, <=, !=, not-in, >, or >=) must be on the same field. But you have inequality filters on '"+n.toString()+"' and '"+e.field.toString()+"'");var r=Kt(t);null!==r&&Hu(t,e.field,r)}var i=function(t,e){for(var n=0,r=t.filters;n<r.length;n++){var i=r[n];if(e.indexOf(i.op)>=0)return i.op}return null}(t,function(t){switch(t){case"!=":return["!=","not-in"];case"array-contains":return["array-contains","array-contains-any","
2not-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[]}}(e.op));if(null!==i)throw i===e.op?new S(O.INVALID_ARGUMENT,"Invalid query. You cannot use more than one '"+e.op.toString()+"' filter."):new S(O.INVALID_ARGUMENT,"Invalid query. You cannot use '"+e.op.toString()+"' filters with '"+i.toString()+"' filters.")}(t,h),h}(t.C_,0,e,t.firestore.I_,this.ed,this.nd,this.sd);return new Cs(t.firestore,t.v_,function(t,e){var n=t.filters.concat([e]);return new qt(t.path,t.collectionGroup,t.xt.slice(),n,t.limit,t.limitType,t.startAt,t.endAt)}(t.C_,n))},e}(ju),Mu=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).ed=e,r.rd=n,r.type="orderBy",r}return Object(a.c)(e,t),e.prototype.td=function(t){var e=function(t,e,n){if(null!==t.startAt)throw new S(O.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(null!==t.endAt)throw new S(O.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");var r=new Mt(e,n);return function(t,e){if(null===Kt(t)){var n=Gt(t);null!==n&&Hu(t,n,e.field)}}(t,r),r}(t.C_,this.ed,this.rd);return new Cs(t.firestore,t.v_,function(t,e){var n=t.xt.concat([e]);return new qt(t.path,t.collectionGroup,n,t.filters.slice(),t.limit,t.limitType,t.startAt,t.endAt)}(t.C_,e))},e}(ju),Fu=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).type=e,i.od=n,i.ad=r,i}return Object(a.c)(e,t),e.prototype.td=function(t){return new Cs(t.firestore,t.v_,$t(t.C_,this.od,this.ad))},e}(ju),Uu=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).type=e,i.ud=n,i.hd=r,i}return Object(a.c)(e,t),e.prototype.td=function(t){var e=qu(t,this.type,this.ud,this.hd);return new Cs(t.firestore,t.v_,function(t,e){return new qt(t.path,t.collectionGroup,t.xt.slice(),t.filters.slice(),t.limit,t.limitType,e,t.endAt)}(t.C_,e))},e}(ju),Vu=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).type=e,i.ud=n,i.hd=r,i}return Object(a.c)(e,t),e.prototype.td=function(t){var e=qu(t,this.type,this.ud,this.hd);return new Cs(t.firestore,t.v_,function(t,e){return new qt(t.path,t.collectionGroup,t.xt.slice(),t.filters.slice(),t.limit,t.limitType,t.startAt,e)}(t.C_,e))},e}(ju);function qu(t,e,n,r){if(n[0]instanceof ds&&(n[0]=n[0].d_),n[0]instanceof Au)return function(t,e,n,r,i){if(!r)throw new S(O.NOT_FOUND,"Can't use a DocumentSnapshot that doesn't exist for "+n+"().");for(var o=[],a=0,s=Yt(t);a<s.length;a++){var u=s[a];if(u.field.ut())o.push(ut(e,r.key));else{var c=r.field(u.field);if(Y(c))throw new S(O.INVALID_ARGUMENT,'Invalid query. You are trying to start or end a query using a document for which the field "'+u.field+'" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');if(null===c){var l=u.field.rt();throw new S(O.INVALID_ARGUMENT,"Invalid query. You are trying to start or end a query using a document for which the field '"+l+"' (used as the orderBy) does not exist.")}o.push(c)}}return new Dt(o,i)}(t.C_,t.firestore.I_,e,n[0].Zf,r);var i=Vs(t.firestore);return function(t,e,n,r,i,o){var a=t.xt;if(i.length>a.length)throw new S(O.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.ut()){if("string"!=typeof c)throw new S(O.INVALID_ARGUMENT,"Invalid query. Expected a string for document ID in "+r+"(), but got a "+typeof c);if(!Qt(t)&&-1!==c.indexOf("/"))throw new S(O.INVALID_ARGUMENT,"Invalid query. When querying a collection and ordering by FieldPath.documentId(), the value passed to "+r+"() must be a plain document ID, but '"+c+"' contains a slash.");var l=t.path.child(M.ot(c));if(!V.wt(l))throw new S(O.INVALID_ARGUMENT,"Invalid query. When querying a collection group and ordering by FieldPath.documentId(), the value passed to "+r+"() must result in a valid document path, but '"+l+"' is not because it c
2ontains an odd number of segments.");var f=new V(l);s.push(ut(e,f))}else{var h=Xs(n,r,c);s.push(h)}}return new Dt(s,o)}(t.C_,t.firestore.I_,i,e,n,r)}function Bu(t,e,n){if(n instanceof ds&&(n=n.d_),"string"==typeof n){if(""===n)throw new S(O.INVALID_ARGUMENT,"Invalid query. When querying with FieldPath.documentId(), you must provide a valid document ID, but it was an empty string.");if(!Qt(e)&&-1!==n.indexOf("/"))throw new S(O.INVALID_ARGUMENT,"Invalid query. When querying a collection by FieldPath.documentId(), you must provide a plain document ID, but '"+n+"' contains a '/' character.");var r=e.path.child(M.ot(n));if(!V.wt(r))throw new S(O.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(t,new V(r))}if(n instanceof Is)return ut(t,n.S_);throw new S(O.INVALID_ARGUMENT,"Invalid query. When querying with FieldPath.documentId(), you must provide a valid string or a DocumentReference, but it was: "+ws(n)+".")}function zu(t,e){if(!Array.isArray(t)||0===t.length)throw new S(O.INVALID_ARGUMENT,"Invalid Query. A non-empty array is required for '"+e.toString()+"' filters.");if(t.length>10)throw new S(O.INVALID_ARGUMENT,"Invalid Query. '"+e.toString()+"' filters support a maximum of 10 elements in the value array.")}function Hu(t,e,n){if(!n.isEqual(e))throw new S(O.INVALID_ARGUMENT,"Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '"+e.toString()+"' and so you must also use '"+e.toString()+"' as your first argument to orderBy(), but your first orderBy() is on field '"+n.toString()+"' instead.")}function Wu(t,e,n){return t?n&&(n.merge||n.mergeFields)?t.toFirestore(e,n):t.toFirestore(e):e}var Ku=function(t){function e(e){var n=this;return(n=t.call(this)||this).firestore=e,n}return Object(a.c)(e,t),e.prototype.Wf=function(t){return new I(t)},e.prototype.jf=function(t){var e=this.Jf(t,this.firestore.I_);return new Is(this.firestore,null,e)},e}(Nu),Gu=function(){function t(t,e){this.hasPendingWrites=t,this.fromCache=e}return t.prototype.isEqual=function(t){return this.hasPendingWrites===t.hasPendingWrites&&this.fromCache===t.fromCache},t}(),Qu=function(t){function e(e,n,r,i,o,a){var s=this;return(s=t.call(this,e,n,r,i,a)||this).Yf=e,s.ld=e,s.metadata=o,s}return Object(a.c)(e,t),e.prototype.exists=function(){return t.prototype.exists.call(this)},e.prototype.data=function(t){if(void 0===t&&(t={}),this.Zf){if(this.v_){var e=new Yu(this.Yf,this.Xf,this.S_,this.Zf,this.metadata,null);return this.v_.fromFirestore(e,t)}return this.Xf.Uf(this.Zf.bt(),t.serverTimestamps)}},e.prototype.get=function(t,e){if(void 0===e&&(e={}),this.Zf){var n=this.Zf.data().field(Pu("DocumentSnapshot.get",t));if(null!==n)return this.Xf.Uf(n,e.serverTimestamps)}},e}(Au),Yu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.prototype.data=function(e){return void 0===e&&(e={}),t.prototype.data.call(this,e)},e}(Qu),Xu=function(){function t(t,e,n,r){this.Yf=t,this.Xf=e,this._d=r,this.metadata=new Gu(r.hasPendingWrites,r.fromCache),this.query=n}return Object.defineProperty(t.prototype,"docs",{get:function(){var t=[];return this.forEach((function(e){return t.push(e)})),t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this._d.docs.size},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"empty",{get:function(){return 0===this.size},enumerable:!1,configurable:!0}),t.prototype.forEach=function(t,e){var n=this;this._d.docs.forEach((function(r){t.call(e,new Yu(n.Yf,n.Xf,r.key,r,new Gu(n._d.De.has(r.key),n._d.fromCache),n.query.v_))}))},t.prototype.docChanges=function(t){void 0===t&&(t={});var e=!!t.includeMetadataChanges;if(e&&this._d.xe)throw new S(O.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this.fd&&this.dd===e||(this.fd=function(t,e){if(t._d.Se.et()){var n=0;return t._d.docChanges.map((function(e){var r=new Yu(t.Yf,t.Xf,e.doc.key,e.doc,new Gu(t._d.De.has(e.doc.key),t._d.fromCache),t.query.v_);return e.doc,{type:"added",doc:r,oldIndex:-1,newIndex:n++}}))}var r=t._d.Se;return t._d.docChanges.filter((function(t){return e||3!==t.type})).map((function(e){var n=new Yu(t.Yf,t.Xf,e.doc.key,e.doc,new Gu(t._d.De.has(e.doc.key),t._d.fromCache),t.query.v_),i=-1,o=-1;return 0!==e.type&&(i=r.indexOf(e.doc.key),r=r.delete(e.doc.key)),1!==e.type&&(o=(r=r.add(e.doc)).indexOf(e.doc.key)),{type:$u(e.type),doc:n,oldIndex:i,newIndex:o}}))}(this,e),this.dd=e),this.fd},t}();function $u(t){switch(t){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return v()}}function Ju(t,e){return t instanceof Qu&&e instanceof Qu?t.Yf===e.Yf&&t.S_.isEqual(e.S_)&&(null===t.Zf?null===e.Zf:t.Zf.isEqual(e.Zf))&&t.v_===e.v_:t instanceof Xu&&e instanceof Xu&&t.Yf===e.Yf&&Ps(t.query,e.query)&&t.metadata.isEqual(e.metadata)&&t._d.isEqual(e._d)}var Zu=function(t){function e(e){var n=this;return(n=t.call(this)||this).firestore=e,n}return Object(a.c)(e,t),e.prototype.Wf=function(t){return new I(t)},e.prototype.jf=function(t){var e=this.Jf(t,this.firestore.I_);
2return new Is(this.firestore,null,e)},e}(Nu);function tc(t,e,n){for(var r=[],i=3;i<arguments.length;i++)r[i-3]=arguments[i];t=_s(t,Is);var o=_s(t.firestore,Ou),a=Vs(o);return e instanceof ds&&(e=e.d_),nc(o,[("string"==typeof e||e instanceof hs?Ys(a,"updateDoc",t.S_,e,n,r):Qs(a,"updateDoc",t.S_,e)).F_(t.S_,Ee.exists(!0))])}function ec(t){for(var e,n,r,i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];t instanceof ds&&(t=t.d_);var s={includeMetadataChanges:!1},u=0;"object"!=typeof i[u]||_u(i[u])||(s=i[u],u++);var c,l,f,h={includeMetadataChanges:s.includeMetadataChanges};if(_u(i[u])){var p=i[u];i[u]=null===(e=p.next)||void 0===e?void 0:e.bind(p),i[u+1]=null===(n=p.error)||void 0===n?void 0:n.bind(p),i[u+2]=null===(r=p.complete)||void 0===r?void 0:r.bind(p)}if(t instanceof Is)l=_s(t.firestore,Ou),f=zt(t.S_.path),c={next:function(e){i[u]&&i[u](rc(l,t,e))},error:i[u+1],complete:i[u+2]};else{var d=_s(t,Cs);l=_s(d.firestore,Ou),f=d.C_;var v=new Zu(l);c={next:function(t){i[u]&&i[u](new Xu(l,v,d,t))},error:i[u+1],complete:i[u+2]},Ru(t.C_)}return function(t,e,n,r){var i=this,o=new ls(r),s=new ya(e,o,n);return t._s.Ps((function(){return Object(a.b)(i,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return e=fa,[4,gu(t)];case 1:return[2,e.apply(void 0,[n.sent(),s])]}}))}))})),function(){o.i_(),t._s.Ps((function(){return Object(a.b)(i,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return e=ha,[4,gu(t)];case 1:return[2,e.apply(void 0,[n.sent(),s])]}}))}))}))}}(Su(l),f,h,c)}function nc(t,e){return function(t,e){var n=this,r=new $n;return t._s.Ps((function(){return Object(a.b)(n,void 0,void 0,(function(){var n;return Object(a.d)(this,(function(i){switch(i.label){case 0:return n=Aa,[4,yu(t)];case 1:return[2,n.apply(void 0,[i.sent(),e,r])]}}))}))})),r.promise}(Su(t),e)}function rc(t,e,n){var r=n.docs.get(e.S_),i=new Zu(t);return new Qu(t,i,e.S_,r,new Gu(n.hasPendingWrites,n.fromCache),e.v_)}var ic=function(){function t(t,e){this.Yf=t,this.wd=e,this.Ed=[],this.Td=!1,this.Id=Vs(t)}return t.prototype.set=function(t,e,n){this.md();var r=oc(t,this.Yf),i=Wu(r.v_,e,n),o=qs(this.Id,"WriteBatch.set",r.S_,i,null!==r.v_,n);return this.Ed.push(o.F_(r.S_,Ee.Kt())),this},t.prototype.update=function(t,e,n){for(var r=[],i=3;i<arguments.length;i++)r[i-3]=arguments[i];this.md();var o,a=oc(t,this.Yf);return e instanceof ds&&(e=e.d_),o="string"==typeof e||e instanceof hs?Ys(this.Id,"WriteBatch.update",a.S_,e,n,r):Qs(this.Id,"WriteBatch.update",a.S_,e),this.Ed.push(o.F_(a.S_,Ee.exists(!0))),this},t.prototype.delete=function(t){this.md();var e=oc(t,this.Yf);return this.Ed=this.Ed.concat(new Fe(e.S_,Ee.Kt())),this},t.prototype.commit=function(){return this.md(),this.Td=!0,this.Ed.length>0?this.wd(this.Ed):Promise.resolve()},t.prototype.md=function(){if(this.Td)throw new S(O.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")},t}();function oc(t,e){if(t instanceof ds&&(t=t.d_),t.firestore!==e)throw new S(O.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return t}var ac=function(t){function e(e,n){var r=this;return(r=t.call(this,e,n)||this).Yf=e,r}return Object(a.c)(e,t),e.prototype.get=function(e){var n=this,r=oc(e,this.Yf),i=new Zu(this.Yf);return t.prototype.get.call(this,e).then((function(t){return new Qu(n.Yf,i,r.S_,t.Zf,new Gu(!1,!1),r.v_)}))},e}(function(){function t(t,e){this.Yf=t,this.Ad=e,this.Id=Vs(t)}return t.prototype.get=function(t){var e=this,n=oc(t,this.Yf),r=new Ku(this.Yf);return this.Ad.ef([n.S_]).then((function(t){if(!t||1!==t.length)return v();var i=t[0];if(i instanceof bt)return new Au(e.Yf,r,n.S_,null,n.v_);if(i instanceof mt)return new Au(e.Yf,r,i.key,i,n.v_);throw v()}))},t.prototype.set=function(t,e,n){var r=oc(t,this.Yf),i=Wu(r.v_,e,n),o=qs(this.Id,"Transaction.set",r.S_,i,null!==r.v_,n);return this.Ad.set(r.S_,o),this},t.prototype.update=function(t,e,n){for(var r=[],i=3;i<arguments.length;i++)r[i-3]=arguments[i];var o,a=oc(t,this.Yf);return e instanceof ds&&(e=e.d_),o="string"==typeof e||e instanceof hs?Ys(this.Id,"Transaction.update",a.S_,e,n,r):Qs(this.Id,"Transaction.update",a.S_,e),this.Ad.update(a.S_,o),this},t.prototype.delete=function(t){var e=oc(t,this.Yf);return this.Ad.delete(e.S_),this},t}());function sc(){if("undefined"==typeof Uint8Array)throw new S(O.UNIMPLEMENT
2ED,"Uint8Arrays are not available in this environment.")}function uc(){if("undefined"==typeof atob)throw new S(O.UNIMPLEMENTED,"Blobs are unavailable in Firestore in this environment.")}var cc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.fromBase64String=function(t){return uc(),new e(I.fromBase64String(t))},e.fromUint8Array=function(t){return sc(),new e(I.fromUint8Array(t))},e.prototype.toBase64=function(){return uc(),this.d_.toBase64()},e.prototype.toUint8Array=function(){return sc(),this.d_.toUint8Array()},e.prototype.isEqual=function(t){return this.d_.isEqual(t.d_)},e.prototype.toString=function(){return"Blob(base64: "+this.toBase64()+")"},e}(ds),lc=function(){function t(){}return t.prototype.enableIndexedDbPersistence=function(t,e){return function(t,e){ku(t=_s(t,Ou));var n=Su(t),r=t.p_(),i=new us;return Cu(n,i,new as(i,r.cacheSizeBytes,null==e?void 0:e.forceOwnership))}(t.d_,{forceOwnership:e})},t.prototype.enableMultiTabIndexedDbPersistence=function(t){return function(t){ku(t=_s(t,Ou));var e=Su(t),n=t.p_(),r=new us;return Cu(e,r,new ss(r,n.cacheSizeBytes))}(t.d_)},t.prototype.clearIndexedDbPersistence=function(t){return function(t){var e=this;if(t.R_&&!t.P_)throw new S(O.FAILED_PRECONDITION,"Persistence can only be cleared before a Firestore instance is initialized or after it is terminated.");var n=new $n;return t.Bf.Tf((function(){return Object(a.b)(e,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,function(t){return Object(a.b)(this,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return tr.Kn()?(e=t+"main",[4,tr.delete(e)]):[2,Promise.resolve()];case 1:return n.sent(),[2]}}))}))}(Di(t.I_,t.w_))];case 1:return r.sent(),n.resolve(),[3,3];case 2:return e=r.sent(),n.reject(e),[3,3];case 3:return[2]}}
2))}))})),n.promise}(t.d_)},t}(),fc=function(t){function e(e,n,r){var i=this;return(i=t.call(this,n)||this).Rd=r,i.INTERNAL={delete:function(){return i.terminate()}},e instanceof u||(i.Pd=e),i}return Object(a.c)(e,t),Object.defineProperty(e.prototype,"I_",{get:function(){return this.d_.I_},enumerable:!1,configurable:!0}),e.prototype.settings=function(t){t.merge&&delete(t=Object.assign(Object.assign({},this.d_.V_()),t)).merge,this.d_.g_(t)},e.prototype.useEmulator=function(t,e){!function(t,e,n){var r=(t=_s(t,Ss)).V_();"firestore.googleapis.com"!==r.host&&r.host!==e&&p("Host has been set in both settings() and useEmulator(), emulator host will be used"),t.g_(Object.assign(Object.assign({},r),{host:e+":"+n,ssl:!1}))}(this.d_,t,e)},e.prototype.enableNetwork=function(){return function(t){var e=this;return t._s.enqueue((function(){return Object(a.b)(e,void 0,void 0,(function(){var e,n;return Object(a.d)(this,(function(r){switch(r.label){case 0:return[4,pu(t)];case 1:return e=r.sent(),[4,vu(t)];case 2:return n=r.sent(),[2,(e.yo(!0),function(t){var e=g(t);return e.Nh.delete(0),Fo(e)}(n))]}}))}))}))}(Su(_s(this.d_,Ou)))},e.prototype.disableNetwork=function(){return function(t){var e=this;return t._s.enqueue((function(){return Object(a.b)(e,void 0,void 0,(function(){var e,n;return Object(a.d)(this,(function(r){switch(r.label){case 0:return[4,pu(t)];case 1:return e=r.sent(),[4,vu(t)];case 2:return n=r.sent(),[2,(e.yo(!1),function(t){return Object(a.b)(this,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return(e=g(t)).Nh.add(0),[4,Uo(e)];case 1:return n.sent(),e.Oh.set("Offline"),[2]}}))}))}(n))]}}))}))}))}(Su(_s(this.d_,Ou)))},e.prototype.enablePersistence=function(t){var e=!1,n=!1;return t&&gs("synchronizeTabs",e=!!t.synchronizeTabs,"experimentalForceOwningTab",n=!!t.experimentalForceOwningTab),e?this.Rd.enableMultiTabIndexedDbPersistence(this):this.Rd.enableIndexedDbPersistence(this,n)},e.prototype.clearPersistence=function(){return this.Rd.clearIndexedDbPersistence(this)},e.prototype.terminate=function(){return this.Pd&&(this.Pd._removeServiceInstance("firestore"),this.Pd._removeServiceInstance("firestore-exp")),this.d_._delete()},e.prototype.waitForPendingWrites=function(){return function(t){var e=this,n=new $n;return t._s.Ps((function(){return Object(a.b)(e,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(r){switch(r.label){case 0:return e=La,[4,yu(t)];case 1:return[2,e.apply(void 0,[r.sent(),n])]}}))}))})),n.promise}(Su(_s(this.d_,Ou)))},e.prototype.onSnapshotsInSync=function(t){return function(t,e){return function(t,e){var n=this,r=new ls(e);return t._s.Ps((function(){return Object(a.b)(n,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return e=function(t,e){g(t).Wh.add(e),e.next()},[4,gu(t)];case 1:return[2,e.apply(void 0,[n.sent(),r])]}}))}))})),function(){r.i_(),t._s.Ps((function(){return Object(a.b)(n,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return e=function(t,e){g(t).Wh.delete(e)},[4,gu(t)];case 1:return[2,e.apply(void 0,[n.sent(),r])]}}))}))}))}}(Su(t=_s(t,Ou)),_u(e)?e:{next:e})}(this.d_,t)},Object.defineProperty(e.prototype,"app",{get:function(){if(!this.Pd)throw new S(O.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this.Pd},enumerable:!1,configurable:!0}),e.prototype.collection=function(t){try{return new Ic(this,Ns(this.d_,t))}catch(t){throw mc(t,"collection()","Firestore.collection()")}},e.prototype.doc=function(t){try{return new gc(this,As(this.d_,t))}catch(t){throw mc(t,"doc()","Firestore.doc()")}},e.prototype.collectionGroup=function(t){try{return new Tc(this,function(t,e){if(t=_s(t,Ss),vs("collectionGroup","collection id",e),e.indexOf("/")>=0)throw new S(O.INVALID_ARGUMENT,"Invalid collection ID '"+e+"' passed to function collectionGroup(). Collection IDs must not contain '/'.");return new Cs(t,null,function(t){return new qt(M.ct(),t)}(e))}(this.d_,t))}catch(t){throw mc(t,"collectionGroup()","Firestore.collectionGroup()")}},e.prototype.runTransaction=function(t){var e=this;return function(t,e){return function(t,e){var n=this,r=new $n;return t._s.Ps((function(){return Object(a.b)(n,void 0,void 0,(function(){var n;return Object(a.d)(this,(function(i){switch(i.label){case 0:return[4,function(t){return hu(t).then((function(t){return t.Sh}))}(t)];case 1:return n=i.sent(),new su(t._s,n,e,r).run(),[2]}}))}))})),r.promise}(Su(t),(function(n){return e(new ac(t,n))}
2))}(this.d_,(function(n){return t(new dc(e,n))}))},e.prototype.batch=function(){var t=this;return Su(this.d_),new vc(new ic(this.d_,(function(e){return nc(t.d_,e)})))},e.prototype.loadBundle=function(t){throw new S(O.FAILED_PRECONDITION,'"loadBundle()" does not exist, have you imported "firebase/firestore/bundle"?')},e.prototype.namedQuery=function(t){throw new S(O.FAILED_PRECONDITION,'"namedQuery()" does not exist, have you imported "firebase/firestore/bundle"?')},e}(ds),hc=function(t){function e(e){var n=this;return(n=t.call(this)||this).firestore=e,n}return Object(a.c)(e,t),e.prototype.Wf=function(t){return new cc(new I(t))},e.prototype.jf=function(t){var e=this.Jf(t,this.firestore.I_);return gc.yd(e,this.firestore,null)},e}(Nu);function pc(t){var e;e=t,c.setLogLevel(e)}var dc=function(t){function e(e,n){var r=this;return(r=t.call(this,n)||this).Yf=e,r.Xf=new hc(e),r}return Object(a.c)(e,t),e.prototype.get=function(t){var e=this,n=Cc(t);return this.d_.get(n).then((function(t){return new _c(e.Yf,new Qu(e.Yf.d_,e.Xf,t.S_,t.Zf,t.metadata,n.v_))}))},e.prototype.set=function(t,e,n){var r=Cc(t);return n?(ys("Transaction.set",n),this.d_.set(r,e,n)):this.d_.set(r,e),this},e.prototype.update=function(t,e,n){for(var r,i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var s=Cc(t);return 2===arguments.length?this.d_.update(s,e):(r=this.d_).update.apply(r,Object(a.g)([s,e,n],i)),this},e.prototype.delete=function(t){var e=Cc(t);return this.d_.delete(e),this},e}(ds),vc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.prototype.set=function(t,e,n){var r=Cc(t);return n?(ys("WriteBatch.set",n),this.d_.set(r,e,n)):this.d_.set(r,e),this},e.prototype.update=function(t,e,n){for(var r,i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var s=Cc(t);return 2===arguments.length?this.d_.update(s,e):(r=this.d_).update.apply(r,Object(a.g)([s,e,n],i)),this},e.prototype.delete=function(t){var e=Cc(t);return this.d_.delete(e),this},e.prototype.commit=function(){return this.d_.commit()},e}(ds),yc=function(t){function e(e,n,r){var i=this;return(i=t.call(this,r)||this).Yf=e,i.Xf=n,i}return Object(a.c)(e,t),e.prototype.fromFirestore=function(t,e){var n=new Yu(this.Yf.d_,this.Xf,t.S_,t.Zf,t.metadata,null);return this.d_.fromFirestore(new Ec(this.Yf,n),null!=e?e:{})},e.prototype.toFirestore=function(t,e){return e?this.d_.toFirestore(t,e):this.d_.toFirestore(t)},e.gd=function(t,n){var r=e.Vd,i=r.get(t);i||(i=new WeakMap,r.set(t,i));var o=i.get(n);return o||(o=new e(t,new hc(t),n),i.set(n,o)),o},e}(ds);yc.Vd=new WeakMap;var gc=function(t){function e(e,n){var r=this;return(r=t.call(this,n)||this).firestore=e,r.Xf=new hc(e),r}return Object(a.c)(e,t),e.pd=function(t,n,r){if(t.length%2!=0)throw new S(O.INVALID_ARGUMENT,"Invalid document reference. Document references must have an even number of segments, but "+t.rt()+" has "+t.length);return new e(n,new Is(n.d_,r,new V(t)))},e.yd=function(t,n,r){return new e(n,new Is(n.d_,r,t))},Object.defineProperty(e.prototype,"id",{get:function(){return this.d_.id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return new Ic(this.firestore,this.d_.parent)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this.d_.path},enumerable:!1,configurable:!0}),e.prototype.collection=function(t){try{return new Ic(this.firestore,Ns(this.d_,t))}catch(t){throw mc(t,"collection()","DocumentReference.collection()")}},e.prototype.isEqual=function(t){return t instanceof ds&&(t=t.d_),t instanceof Is&&xs(this.d_,t)},e.prototype.set=function(t,e){e=ys("DocumentReference.set",e);try{return function(t,e,n){t=_s(t,Is);var r=_s(t.firestore,Ou),i=Wu(t.v_,e,n);return nc(r,[qs(Vs(r),"setDoc",t.S_,i,null!==t.v_,n).F_(t.S_,Ee.Kt())])}(this.d_,t,e)}catch(t){throw mc(t,"setDoc()","DocumentReference.set()")}},e.prototype.update=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];try{return 1===arguments.length?tc(this.d_,t):tc.apply(void 0,Object(a.g)([this.d_,t,e],n))}
2catch(t){throw mc(t,"updateDoc()","DocumentReference.update()")}},e.prototype.delete=function(){return nc(_s((t=this.d_).firestore,Ou),[new Fe(t.S_,Ee.Kt())]);var t},e.prototype.onSnapshot=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=bc(e),i=wc(e,(function(e){return new _c(t.firestore,new Qu(t.firestore.d_,t.Xf,e.S_,e.Zf,e.metadata,t.d_.v_))}));return ec(this.d_,r,i)},e.prototype.get=function(t){var e=this;return("cache"===(null==t?void 0:t.source)?function(t){t=_s(t,Is);var e=_s(t.firestore,Ou),n=Su(e),r=new Zu(e);return function(t,e){var n=this,r=new $n;return t._s.Ps((function(){return Object(a.b)(n,void 0,void 0,(function(){var n;return Object(a.d)(this,(function(i){switch(i.label){case 0:return n=function(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r,i;return Object(a.d)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,function(t,e){var n=g(t);return n.persistence.runTransaction("read document","readonly",(function(t){return n.Tc.Ho(t,e)}))}(t,e)];case 1:return(i=o.sent())instanceof mt?n.resolve(i):i instanceof bt?n.resolve(null):n.reject(new S(O.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 r=o.sent(),i=cr(r,"Failed to get document '"+e+" from cache"),n.reject(i),[3,3];case 3:return[2]}}
2))}))},[4,du(t)];case 1:return[2,n.apply(void 0,[i.sent(),e,r])]}}))}))})),r.promise}(n,t.S_).then((function(n){return new Qu(e,r,t.S_,n,new Gu(n instanceof mt&&n.Vt,!0),t.v_)}))}(this.d_):"server"===(null==t?void 0:t.source)?function(t){t=_s(t,Is);var e=_s(t.firestore,Ou);return mu(Su(e),t.S_,{source:"server"}).then((function(n){return rc(e,t,n)}))}(this.d_):function(t){t=_s(t,Is);var e=_s(t.firestore,Ou);return mu(Su(e),t.S_).then((function(n){return rc(e,t,n)}))}(this.d_)).then((function(t){return new _c(e.firestore,new Qu(e.firestore.d_,e.Xf,t.S_,t.Zf,t.metadata,e.d_.v_))}))},e.prototype.withConverter=function(t){return new e(this.firestore,this.d_.withConverter(yc.gd(this.firestore,t)))},e}(ds);function mc(t,e,n){return t.message=t.message.replace(e,n),t}function bc(t){for(var e=0,n=t;e<n.length;e++){var r=n[e];if("object"==typeof r&&!_u(r))return r}return{}}function wc(t,e){var n,r,i;return{next:function(t){i.next&&i.next(e(t))},error:null===(n=(i=_u(t[0])?t[0]:_u(t[1])?t[1]:"function"==typeof t[0]?{next:t[0],error:t[1],complete:t[2]}:{next:t[1],error:t[2],complete:t[3]}).error)||void 0===n?void 0:n.bind(i),complete:null===(r=i.complete)||void 0===r?void 0:r.bind(i)}}var _c=function(t){function e(e,n){var r=this;return(r=t.call(this,n)||this).Yf=e,r}return Object(a.c)(e,t),Object.defineProperty(e.prototype,"ref",{get:function(){return new gc(this.Yf,this.d_.ref)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this.d_.id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"metadata",{get:function(){return this.d_.metadata},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"exists",{get:function(){return this.d_.exists()},enumerable:!1,configurable:!0}),e.prototype.data=function(t){return this.d_.data(t)},e.prototype.get=function(t,e){return this.d_.get(t,e)},e.prototype.isEqual=function(t){return Ju(this.d_,t.d_)},e}(ds),Ec=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.prototype.data=function(t){return this.d_.data(t)},e}(_c),Tc=function(t){function e(e,n){var r=this;return(r=t.call(this,n)||this).firestore=e,r.Xf=new hc(e),r}return Object(a.c)(e,t),e.prototype.where=function(t,n,r){try{return new e(this.firestore,Du(this.d_,function(t,e,n){var r=e,i=Pu("where",t);return new Lu(i,r,n)}(t,n,r)))}catch(t){throw mc(t,/(orderBy|where)\(\)/,"Query.$1()")}},e.prototype.orderBy=function(t,n){try{return new e(this.firestore,Du(this.d_,function(t,e){void 0===e&&(e="asc");var n=e,r=Pu("orderBy",t);return new Mu(r,n)}(t,n)))}catch(t){throw mc(t,/(orderBy|where)\(\)/,"Query.$1()")}},e.prototype.limit=function(t){try{return new e(this.firestore,Du(this.d_,function(t){return Es("limit",t),new Fu("limit",t,"F")}(t)))}catch(t){throw mc(t,"limit()","Query.limit()")}},e.prototype.limitToLast=function(t){try{return new e(this.firestore,Du(this.d_,function(t){return Es("limitToLast",t),new Fu("limitToLast",t,"L")}(t)))}catch(t){throw mc(t,"limitToLast()","Query.limitToLast()")}},e.prototype.startAt=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return new e(this.firestore,Du(this.d_,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new Uu("startAt",t,!0)}.apply(void 0,t)))}catch(t){throw mc(t,"startAt()","Query.startAt()")}},e.prototype.startAfter=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return new e(this.firestore,Du(this.d_,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new Uu("startAfter",t,!1)}.apply(void 0,t)))}catch(t){throw mc(t,"startAfter()","Query.startAfter()")}},e.prototype.endBefore=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return new e(this.firestore,Du(this.d_,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new Vu("endBefore",t,!0)}.apply(void 0,t)))}catch(t){throw mc(t,"endBefore()","Query.endBefore()")}},e.prototype.endAt=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return new e(this.firestore,Du(this.d_,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new Vu("endAt",t,!1)}.apply(void 0,t)))}catch(t){throw mc(t,"endAt()","Query.endAt()")}},e.prototype.isEqual=function(t){return Ps(this.d_,t.d_)},e.prototype.get=function(t){var e=this;
2return("cache"===(null==t?void 0:t.source)?function(t){t=_s(t,Cs);var e=_s(t.firestore,Ou),n=Su(e),r=new Zu(e);return function(t,e){var n=this,r=new $n;return t._s.Ps((function(){return Object(a.b)(n,void 0,void 0,(function(){var n;return Object(a.d)(this,(function(i){switch(i.label){case 0:return n=function(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r,i,o,s,u;return Object(a.d)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,Xi(t,e,!0)];case 1:return u=a.sent(),r=new Ta(e,u.Rc),i=r.fl(u.documents),o=r.wi(i,!1),n.resolve(o.snapshot),[3,3];case 2:return s=a.sent(),u=cr(s,"Failed to execute query '"+e+" against cache"),n.reject(u),[3,3];case 3:return[2]}}))}))},[4,du(t)];case 1:return[2,n.apply(void 0,[i.sent(),e,r])]}}))}))})),r.promise}(n,t.C_).then((function(n){return new Xu(e,r,t,n)}))}(this.d_):"server"===(null==t?void 0:t.source)?function(t){t=_s(t,Cs);var e=_s(t.firestore,Ou),n=Su(e),r=new Zu(e);return bu(n,t.C_,{source:"server"}).then((function(n){return new Xu(e,r,t,n)}))}(this.d_):function(t){t=_s(t,Cs);var e=_s(t.firestore,Ou),n=Su(e),r=new Zu(e);return Ru(t.C_),bu(n,t.C_).then((function(n){return new Xu(e,r,t,n)}))}(this.d_)).then((function(t){return new Sc(e.firestore,new Xu(e.firestore.d_,e.Xf,e.d_,t._d))}))},e.prototype.onSnapshot=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=bc(e),i=wc(e,(function(e){return new Sc(t.firestore,new Xu(t.firestore.d_,t.Xf,t.d_,e._d))}));return ec(this.d_,r,i)},e.prototype.withConverter=function(t){return new e(this.firestore,this.d_.withConverter(yc.gd(this.firestore,t)))},e}(ds),Oc=function(t){function e(e,n){var r=this;return(r=t.call(this,n)||this).Yf=e,r}return Object(a.c)(e,t),Object.defineProperty(e.prototype,"type",{get:function(){return this.d_.type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"doc",{get:function(){return new Ec(this.Yf,this.d_.doc)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"oldIndex",{get:function(){return this.d_.oldIndex},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"newIndex",{get:function(){return this.d_.newIndex},enumerable:!1,configurable:!0}),e}(ds),Sc=function(t){function e(e,n){var r=this;return(r=t.call(this,n)||this).Yf=e,r}return Object(a.c)(e,t),Object.defineProperty(e.prototype,"query",{get:function(){return new Tc(this.Yf,this.d_.query)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"metadata",{get:function(){return this.d_.metadata},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this.d_.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return this.d_.empty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"docs",{get:function(){var t=this;return this.d_.docs.map((function(e){return new Ec(t.Yf,e)}))},enumerable:!1,configurable:!0}),e.prototype.docChanges=function(t){var e=this;return this.d_.docChanges(t).map((function(t){return new Oc(e.Yf,t)}))},e.prototype.forEach=function(t,e){var n=this;this.d_.forEach((function(r){t.call(e,new Ec(n.Yf,r))}))},e.prototype.isEqual=function(t){return Ju(this.d_,t.d_)},e}(ds),Ic=function(t){function e(e,n){var r=this;return(r=t.call(this,e,n)||this).firestore=e,r.d_=n,r}return Object(a.c)(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this.d_.id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this.d_.path},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){var t=this.d_.parent;return t?new gc(this.firestore,t):null},enumerable:!1,configurable:!0}),e.prototype.doc=function(t){try{return new gc(this.firestore,void 0===t?As(this.d_):As(this.d_,t))}catch(t){throw mc(t,"doc()","CollectionReference.doc()")}},e.prototype.add=function(t){var e=this;return function(t,e){var n=_s(t.firestore,Ou),r=As(t),i=Wu(t.v_,e);return nc(n,[qs(Vs(t.firestore),"addDoc",r.S_,i,null!==t.v_,{}).F_(r.S_,Ee.exists(!1))]).then((function(){return r}))}(this.d_,t).then((function(t){return new gc(e.firestore,t)}))},e.prototype.isEqual=function(t){return xs(this.d_,t.d_)},e.prototype.withConverter=function(t){return new e(this.firestore,this.d_.withConverter(yc.gd(this.firestore,t)))},e}(Tc);function Cc(t){return t instanceof ds&&(t=t.d_),_s(t,Is)}var kc=function(t){function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.call(this,new(hs.bind.apply(hs,Object(a.g)([void 0],e))))||this}return Object(a.c)(e,t),e.documentId=function(){return new e(U.ht().rt())},e.prototype.isEqual=function(t){return t instanceof ds&&(t=t.d_),t instanceof hs&&this.d_.f_.isEqual(t.f_)},e}(ds),Nc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.serverTimestamp=function(){var t=new Hs("serverTimestamp");return t._methodName="FieldValue.serverTimestamp",new e(t)},e.delete=function(){var t=new Bs("deleteField");return t._methodName="FieldValue.delete",new e(t)},e.arrayUnion=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new Ws("arrayUnion",t)}.apply(void 0,t);return r._methodName="FieldValue.arrayUnion",new e(r)},e.arrayRemove=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new Ks("arrayRemove",t)}.apply(void 0,t);return r._methodName="FieldValue.arrayRemove",new e(r)},e.increment=function(t){var n=function(t){return new Gs("increment",t)}(t);return n._methodName="FieldValue.increment",new e(n)},e.prototype.isEqual=function(t){return this.d_.isEqual(t.d_)},e}(ds);function Ac(t){return function(t,e){var n=Su(t=_s(t,Ou)),r=new Eu;return function(t,e,n,r){var i=this,o=function(t,e){return function(t,e){return new fs(t,e)}(function(t,e){if(t instanceof Uint8Array)return cs(t,e);if(t instanceof ArrayBuffer)return cs(new Uint8Array(t),e);if(t instanceof ReadableStream)return t.getReader();throw new Error("Source of `toByteStreamReader` has to be a ArrayBuffer or ReadableStream")}
2("string"==typeof t?(new TextEncoder).encode(t):t),e)}(n,Ao(e));t._s.Ps((function(){return Object(a.b)(i,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return e=is,[4,yu(t)];case 1:return e.apply(void 0,[n.sent(),o,r]),[2]}}))}))}))}(n,t.I_,e,r),r}(this.d_,t)}function xc(t){var e,n,r=this;return(e=this.d_,n=t,function(t,e){var n=this;return t._s.enqueue((function(){return Object(a.b)(n,void 0,void 0,(function(){var n;return Object(a.d)(this,(function(r){switch(r.label){case 0:return n=function(t,e){var n=g(t);return n.persistence.runTransaction("Get named query","readonly",(function(t){return n.wo.Ms(t,e)}))},[4,du(t)];case 1:return[2,n.apply(void 0,[r.sent(),e])]}}))}))}))}(Su(e=_s(e,Ou)),n).then((function(t){return t?new Cs(e,null,t.query):null}))).then((function(t){return t?new Tc(r,t):null}))}}).call(this,n(16))},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return ir})),n.d(e,"b",(function(){return ar})),n.d(e,"c",(function(){return or})),n.d(e,"d",(function(){return sr})),n.d(e,"e",(function(){return ur})),n.d(e,"f",(function(){return cr})),n.d(e,"g",(function(){return nr})),n.d(e,"h",(function(){return rr}));var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function i(t){var e="function"===typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"===typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}var o,a="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{},s=s||{},u=a||self;function c(){}function l(t){var e=typeof t;return"array"==(e="object"!=e?e:t?Array.isArray(t)?"array":e:"null")||"object"==e&&"number"==typeof t.length}function f(t){var e=typeof t;return"object"==e&&null!=t||"function"==e}var h="closure_uid_"+(1e9*Math.random()>>>0),p=0;function d(t,e,n){return t.call.apply(t.bind,arguments)}function v(t,e,n){if(!t)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),t.apply(e,n)}}return function(){return t.apply(e,arguments)}}function y(t,e,n){return(y=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?d:v).apply(null,arguments)}function g(t,e){var n=Array.prototype.slice.call(arguments,1);return function(){var e=n.slice();return e.push.apply(e,arguments),t.apply(this,e)}}function m(){return Date.now()}function b(t,e){function n(){}n.prototype=e.prototype,t.X=e.prototype,t.prototype=new n,t.prototype.constructor=t,t.Kb=function(t,n,r){for(var i=Array(arguments.length-2),o=2;o<arguments.length;o++)i[o-2]=arguments[o];return e.prototype[n].apply(t,i)}}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(t){Object.prototype.hasOwnProperty.call(t,h)&&t[h]||(t[h]=++p)})(this)},w.prototype.G=function(){if(this.i)for(;this.i.length;)this.i.shift()()};var _=Array.prototype.indexOf?function(t,e){return Array.prototype.indexOf.call(t,e,void 0)}:function(t,e){if("string"===typeof t)return"string"!==typeof e||1!=e.length?-1:t.indexOf(e,0);for(var n=0;n<t.length;n++)if(n in t&&t[n]===e)return n;return-1},E=Array.prototype.forEach?function(t,e,n){Array.prototype.forEach.call(t,e,n)}:function(t,e,n){for(var r=t.length,i="string"===typeof t?t.split(""):t,o=0;o<r;o++)o in i&&e.call(n,i[o],o,t)};function T(t){return Array.prototype.concat.apply([],arguments)}function O(t){var e=t.length;if(0<e){for(var n=Array(e),r=0;r<e;r++)n[r]=t[r];return n}return[]}function S(t){return/^[\s\xa0]*$/.test(t)}var I,C=String.prototype.trim?function(t){return t.trim()}:function(t){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(t)[1]};function k(t,e){return-1!=t.indexOf(e)}function N(t,e){return t<e?-1:t>e?1:0}t:{var A=u.navigator;if(A){var x=A.userAgent;if(x){I=x;break t}}I=""}function P(t,e,n){for(var r in t)e.call(n,t[r],r,t)}function R(t){var e={};for(var n in t)e[n]=t[n];return e}var j="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleStr
2ing toString valueOf".split(" ");function D(t,e){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i])t[n]=r[n];for(var o=0;o<j.length;o++)n=j[o],Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}}function L(t){return L[" "](t),t}L[" "]=c;var M,F=k(I,"Opera"),U=k(I,"Trident")||k(I,"MSIE"),V=k(I,"Edge"),q=V||U,B=k(I,"Gecko")&&!(k(I.toLowerCase(),"webkit")&&!k(I,"Edge"))&&!(k(I,"Trident")||k(I,"MSIE"))&&!k(I,"Edge"),z=k(I.toLowerCase(),"webkit")&&!k(I,"Edge");function H(){var t=u.document;return t?t.documentMode:void 0}t:{var W="",K=function(){var t=I;return B?/rv:([^\);]+)(\)|;)/.exec(t):V?/Edge\/([\d\.]+)/.exec(t):U?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(t):z?/WebKit\/(\S+)/.exec(t):F?/(?:Version)[ \/]?(\S+)/.exec(t):void 0}();if(K&&(W=K?K[1]:""),U){var G=H();if(null!=G&&G>parseFloat(W)){M=String(G);break t}}M=W}var Q,Y={};function X(t){return function(t,e){var n=Y;return Object.prototype.hasOwnProperty.call(n,t)?n[t]:n[t]=e(t)}(t,(function(){for(var e=0,n=C(String(M)).split("."),r=C(String(t)).split("."),i=Math.max(n.length,r.length),o=0;0==e&&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;e=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==e)}return 0<=e}))}if(u.document&&U){var $=H();Q=$||(parseInt(M,10)||void 0)}else Q=void 0;var J=Q,Z=!U||9<=Number(J),tt=U&&!X("9"),et=function(){if(!u.addEventListener||!Object.defineProperty)return!1;var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}});try{u.addEventListener("test",c,e),u.removeEventListener("test",c,e)}catch(n){}return t}();function nt(t,e){this.type=t,this.a=this.target=e,this.defaultPrevented=!1}function rt(t,e){if(nt.call(this,t?t.type:""),this.relatedTarget=this.a=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.c=null,t){var n=this.type=t.type,r=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:null;if(this.target=t.target||t.srcElement,this.a=e,e=t.relatedTarget){if(B){t:{try{L(e.nodeName);var i=!0;break t}catch(o){}i=!1}i||(e=null)}}else"mouseover"==n?e=t.fromElement:"mouseout"==n&&(e=t.toElement);this.relatedTarget=e,r?(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=void 0!==t.clientX?t.clientX:t.pageX,this.clientY=void 0!==t.clientY?t.clientY:t.pageY,this.screenX=t.screenX||0,this.screenY=t.screenY||0),this.button=t.button,this.key=t.key||"",this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.pointerId=t.pointerId||0,this.pointerType="string"===typeof t.pointerType?t.pointerType:it[t.pointerType]||"",this.c=t,t.defaultPrevented&&this.b()}}nt.prototype.b=function(){this.defaultPrevented=!0},b(rt,nt);var it={2:"touch",3:"pen",4:"mouse"};rt.prototype.b=function(){rt.X.b.call(this);var t=this.c;if(t.preventDefault)t.preventDefault();else if(t.returnValue=!1,tt)try{(t.ctrlKey||112<=t.keyCode&&123>=t.keyCode)&&(t.keyCode=-1)}catch(e){}};var ot="closure_listenable_"+(1e6*Math.random()|0),at=0;function st(t,e,n,r,i){this.listener=t,this.proxy=null,this.src=e,this.type=n,this.capture=!!r,this.ca=i,this.key=++at,this.Y=this.Z=!1}function ut(t){t.Y=!0,t.listener=null,t.proxy=null,t.src=null,t.ca=null}function ct(t){this.src=t,this.a={},this.b=0}function lt(t,e){var n=e.type;if(n in t.a){var r,i=t.a[n],o=_(i,e);(r=0<=o)&&Array.prototype.splice.call(i,o,1),r&&(ut(e),0==t.a[n].length&&(delete t.a[n],t.b--))}}function ft(t,e,n,r){for(var i=0;i<t.length;++i){var o=t[i];if(!o.Y&&o.listener==e&&o.capture==!!n&&o.ca==r)return i}return-1}ct.prototype.add=function(t,e,n,r,i){var o=t.toString();(t=this.a[o])||(t=this.a[o]=[],this.b++);var a=ft(t,e,r,i);return-1<a?(e=t[a],n||(e.Z=!1)):((e=new st(e,this.src,o,!!r,i)).Z=n,t.push(e)),e};var ht="closure_lm_"+(1e6*Math.random()|0),pt={};function dt(t,e,n,r,i){if(r&&r.once)return yt(t,e,n,r,i);if(Array.isArray(e)){for(var o=0;o<e.length;o++)dt(t,e[o],n,r,i);return null}return n=Ot(n),t&&t[ot]?t.va(e,n,f(r)?!!r.capture:!!r,i):vt(t,e,n,!1,r,i)}function vt(t,e,n,r,i,o){if(!e)throw Error("Invalid event type");var a=f(i)?!!i.capture:!!i;if(a&&!Z)return null;var s=Et(t);if(s||(t[ht]=s=new ct(t)),(n=s.add(e,n,r,a,o)).proxy)return n;if(r=function(){var t=_t,e=Z?function(n){return t.call(e.src,e.listener,n)}:function(n){if(!(n=t.call(e.src,e.listener,n)))return n};return e}(),n.proxy=r,r.src=t,r.listener=n,t.addEventListener)et||(i=a),void 0===i&&(i=!1),t.addEventListener(e.toString(),r,i);else if(t.attachEvent)t.attachEvent(bt(e.toString()),r);else{if(!t.addListener||!t.removeListener)throw Error("addEventListener and attachEvent are unavailable.");t.addListener(r)}return n}function yt(t,e,n,r,i){if(Array.isArray(e)){for(var o=0;o<e.length;o++)yt(t,e[o],n,r,i);return null}return n=Ot(n),t&&t[ot]?t.wa(e,n,f(r)?!!r.capture:!!r,i):vt(t,e,n,!0,r,i)}function gt(t,e,n,r,i){if(Array.isArray(e))for(var o=0;o<e.length;o++)gt(t,e[o],n,r,i);else r=f(r)?!!r.capture:!!r,n=Ot(n),t&&t[ot]?(t=t.c,(e=String(e).toString())in t.a&&(-1<(n=ft(o=t.a[e],n,r,i))&&(ut(o[n]),Array.prototype.splice.call(o,n,1),0==o.length&&(delete t.a[e],t.b--)))):t&&(t=Et(t))&&(e=t.a[e.toString()],t=-1,e&&(t=ft(e,n,r,i)),(n=-1<t?e[t]:null)&&mt(n))}function mt(t){if("number"!==typeof t&&t&&!t.Y){var e=t.src;if(e&&e[ot])lt(e.c,t);else{var n=t.type,r=t.proxy;e.removeEventListener?e.removeEventListener(n,r,t.capture):e.detachEvent?e.detachEvent(bt(n),r):e.addListener&&e.removeListener&&e.removeListener(r),(n=Et(e))?(lt(n,t),0==n.b&&(n.src=null,e[ht]=null)):ut(t)}}}function bt(t){return t in pt?pt[t]:pt[t]="on"+t}function wt(t,e){var n=t.listener,r=t.ca||t.src;return t.Z&&mt(t),n.call(r,e)}function _t(t,e){if(t.Y)return!0;
2if(!Z){if(!e)t:{e=["window","event"];for(var n=u,r=0;r<e.length;r++)if(null==(n=n[e[r]])){e=null;break t}e=n}return wt(t,e=new rt(e,this))}return wt(t,new rt(e,this))}function Et(t){return(t=t[ht])instanceof ct?t:null}var Tt="__closure_events_fn_"+(1e9*Math.random()>>>0);function Ot(t){return"function"===typeof t?t:(t[Tt]||(t[Tt]=function(e){return t.handleEvent(e)}),t[Tt])}function St(){w.call(this),this.c=new ct(this),this.J=this,this.C=null}function It(t,e){var n,r=t.C;if(r)for(n=[];r;r=r.C)n.push(r);if(t=t.J,r=e.type||e,"string"===typeof e)e=new nt(e,t);else if(e instanceof nt)e.target=e.target||t;else{var i=e;D(e=new nt(r,t),i)}if(i=!0,n)for(var o=n.length-1;0<=o;o--){var a=e.a=n[o];i=Ct(a,r,!0,e)&&i}if(i=Ct(a=e.a=t,r,!0,e)&&i,i=Ct(a,r,!1,e)&&i,n)for(o=0;o<n.length;o++)i=Ct(a=e.a=n[o],r,!1,e)&&i}function Ct(t,e,n,r){if(!(e=t.c.a[String(e)]))return!0;e=e.concat();for(var i=!0,o=0;o<e.length;++o){var a=e[o];if(a&&!a.Y&&a.capture==n){var s=a.listener,u=a.ca||a.src;a.Z&<(t.c,a),i=!1!==s.call(u,r)&&i}}return i&&!r.defaultPrevented}b(St,w),St.prototype[ot]=!0,(o=St.prototype).addEventListener=function(t,e,n,r){dt(this,t,e,n,r)},o.removeEventListener=function(t,e,n,r){gt(this,t,e,n,r)},o.G=function(){if(St.X.G.call(this),this.c){var t,e=this.c;for(t in e.a){for(var n=e.a[t],r=0;r<n.length;r++)ut(n[r]);delete e.a[t],e.b--}}this.C=null},o.va=function(t,e,n,r){return this.c.add(String(t),e,!1,n,r)},o.wa=function(t,e,n,r){return this.c.add(String(t),e,!0,n,r)};var kt=u.JSON.stringify;function Nt(){this.b=this.a=null}var At,xt=new(function(){function t(t,e){this.c=t,this.f=e,this.b=0,this.a=null}return t.prototype.get=function(){var t;return 0<this.b?(this.b--,t=this.a,this.a=t.next,t.next=null):t=this.c(),t},t}())((function(){return new Rt}),(function(t){t.reset()}));function Pt(){var t=Mt,e=null;return t.a&&(e=t.a,t.a=t.a.next,t.a||(t.b=null),e.next=null),e}function Rt(){this.next=this.b=this.a=null}function jt(t){u.setTimeout((function(){throw t}),0)}function Dt(t,e){At||function(){var t=u.Promise.resolve(void 0);At=function(){t.then(Ft)}}(),Lt||(At(),Lt=!0),Mt.add(t,e)}Nt.prototype.add=function(t,e){var n=xt.get();n.set(t,e),this.b?this.b.next=n:this.a=n,this.b=n},Rt.prototype.set=function(t,e){this.a=t,this.b=e,this.next=null},Rt.prototype.reset=function(){this.next=this.b=this.a=null};var Lt=!1,Mt=new Nt;function Ft(){for(var t;t=Pt();){try{t.a.call(t.b)}catch(n){jt(n)}var e=xt;e.f(t),100>e.b&&(e.b++,t.next=e.a,e.a=t)}Lt=!1}function Ut(t,e){St.call(this),this.b=t||1,this.a=e||u,this.f=y(this.Za,this),this.g=m()}function Vt(t){t.aa=!1,t.M&&(t.a.clearTimeout(t.M),t.M=null)}function qt(t,e,n){if("function"===typeof t)n&&(t=y(t,n));else{if(!t||"function"!=typeof t.handleEvent)throw Error("Invalid listener argument");t=y(t.handleEvent,t)}return 2147483647<Number(e)?-1:u.setTimeout(t,e||0)}function Bt(t){t.a=qt((function(){t.a=null,t.c&&(t.c=!1,Bt(t))}),t.h);var e=t.b;t.b=null,t.g.apply(null,e)}b(Ut,St),(o=Ut.prototype).aa=!1,o.M=null,o.Za=function(){if(this.aa){var t=m()-this.g;0<t&&t<.8*this.b?this.M=this.a.setTimeout(this.f,this.b-t):(this.M&&(this.a.clearTimeout(this.M),this.M=null),It(this,"tick"),this.aa&&(Vt(this),this.start()))}},o.start=function(){this.aa=!0,this.M||(this.M=this.a.setTimeout(this.f,this.b),this.g=m())},o.G=function(){Ut.X.G.call(this),Vt(this),delete this.a};var zt=function(t){function e(e,n){var r=t.call(this)||this;return r.g=e,r.h=n,r.b=null,r.c=!1,r.a=null,r}return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype.f=function(t){this.b=arguments,this.a?this.c=!0:Bt(this)},e.prototype.G=function(){t.prototype.G.call(this),this.a&&(u.clearTimeout(this.a),this.a=null,this.c=!1,this.b=null)},e}(w);function Ht(t){w.call(this),this.b=t,this.a={}}b(Ht,w);var Wt=[];function Kt(t,e,n,r){Array.isArray(n)||(n&&(Wt[0]=n.toString()),n=Wt);for(var i=0;i<n.length;i++){var o=dt(e,n[i],r||t.handleEvent,!1,t.b||t);if(!o)break;t.a[o.key]=o}}function Gt(t){P(t.a,(function(t,e){this.a.hasOwnProperty(e)&&mt(t)}),t),t.a={}}function Qt(){this.a=!0}function Yt(t,e,n,r){t.info((function(){return"XMLHTTP TEXT ("+e+"): "+function(t,e){if(!t.a)return e;if(!e)return null;try{var n=JSON.parse(e);if(n)for(t=0;t<n.length;t++)if(Array.isArray(n[t])){var r=n[t];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 kt(n)}catch(s){return e}}(t,n)+(r?" "+r:"")}))}Ht.prototype.G=function(){Ht.X.G.call(this),Gt(this)},Ht.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},Qt.prototype.info=function(){};var Xt={},$t=null;function Jt(){return $t=$t||new St}function Zt(t){nt.call(this,Xt.Fa,t)}function te(t){var e=Jt();It(e,new Zt(e,t))}function ee(t,e){nt.call(this,Xt.STAT_EVENT,t),this.stat=e}function ne(t){var e=Jt();It(e,new ee(e,t))}function re(t){nt.call(this,Xt.Ga,t)}function ie(t,e){if("function"!==typeof t)throw Error("Fn must not be null and must be a function");return u.setTimeout((function(){t()}),e)}Xt.Fa="serverreachability",b(Zt,nt),Xt.STAT_EVENT="statevent",b(ee,nt),Xt.Ga="timingevent",b(re,nt);var oe={NO_ERROR:0,$a:1,nb:2,mb:3,hb:4,lb:5,ob:6,Da:7,TIMEOUT:8,rb:9},ae={fb:"complete",Bb:"success",Ea:"error",Da:"abort",tb:"ready",ub:"readystatechange",TIMEOUT:"timeout",pb:"incrementaldata",sb:"progress",ib:"downloadprogress",Jb:"uploadprogress"};function se(){}function ue(t){var e;return(e=t.a)||(e=t.a={}),e}function ce(){}se.prototype.a=null;var le,fe={OPEN:"a",eb:"b",Ea:"c",qb:"d"};function he(){nt.call(this,"d")}function pe(){nt.call(this,"c")}function de(){}function ve(t,e,n,r){this.g=t,this.c=e,this.f=n,this.S=r||1,this.J=new Ht(this),this.P=ye,t=q?125:void 0,this.R=new Ut(t),this.B=null,this.b=!1,this.j=this.l=this.i=this.H=this.u=this.T=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.V=this.C=this.U=this.I=!1}b(he,nt),b(pe,nt),b(de,se),le=new de;var ye=45e3,ge={},me={};function be(t,e,n){t.H=1,t.i=qe(De(e)),t.j=n,t.I=!0,we(t,null)}function we(t,e){t.u=m(),Te(t),t.l=De(t.i);var n=t.l,r=t.S;Array.isArray(r)||(r=[String(r)]),tn(n.b,"t",r),t.D=0,t.a=Yn(t.g,t.g.C?e:null),0<t.O&&(t.F=new zt(y(t.Ca,t,t.a),t.O)),Kt(t.J,t.a,"readystatechange",t.Xa),e=t.B?R(t.B):{},t.j?(t.m||(t.m="POST"),e["Content-Type"]="application/x-www-form-urlencoded",t.a.ba(t.l,t.m,t.j,e)):(t.m="GET",t.a.ba(t.l,t.m,null,e)),te(1),function(t,e,n,r,i,o){t.info((function(){if(t.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 f=l.split("_");a=2<=f.length&&"type"==f[1]?a+(l+"=")+c+"&":a+(l+"=redacted&")}}else a=null;else a=o;return"XMLHTTP REQ ("+r+") [attempt "+i+"]: "+e+"\n"+n+"\n"+a}))}(t.c,t.m,t.l,t.f,t.S,t.j)}function _e(t,e,n){for(var r=!0;!t.A&&t.D<n.length;){var i=Ee(t,n);if(i==me){4==e&&(t.h=4,ne(14),r=!1),Yt(t.c,t.f,null,"[Incomplete Response]");break}if(i==ge){t.h=4,ne(15),Yt(t.c,t.f,n,"[Invalid Chunk]"),r=!1;break}Yt(t.c,t.f,i,null),ke(t,i)}4==e&&0==n.length&&(t.h=1,ne(16),r=!1),t.b=t.b&&r,r?0<n.length&&!t.V&&(t.V=!0,(e=t.g).a==t&&e.U&&!e.F&&(e.c.info("Great, no buffering proxy detected. Bytes received: "+n.length),qn(e),e.F=!0,ne(11))):(Yt(t.c,t.f,n,"[Invalid Chunked Response]"),Ce(t),Ie(t))}function Ee(t,e){var n=t.D,r=e.indexOf("\n",n);return-1==r?me:(n=Number(e.substring(n,r)),isNaN(n)?ge:(r+=1)+n>e.length?me:(e=e.substr(r,n),t.D=r+n,e))}function Te(t){t.T=m()+t.P,Oe(t,t.P)}function Oe(t,e){if(null!=t.o)throw Error("WatchDog timer not null");t.o=ie(y(t.Va,t),e)}function Se(t){t.o&&(u.clearTimeout(t.o),t.o=null)}function Ie(t){0==t.g.v||t.A||Hn(t.g,t)}function Ce(t){Se(t);var e=t.F;e&&"function"==typeof e.ja&&e.ja(),t.F=null,Vt(t.R),Gt(t.J),t.a&&(e=t.a,t.a=null,e.abort(),e.ja())}function ke(t,e){try{var n=t.g;if(0!=n.v&&(n.a==t||un(n.b,t)))if(n.I=t.N,!t.C&&un(n.b,t)&&3==n.v){try{var r=n.ka.a.parse(e)}catch(g){r=null}if(Array.isArray(r)&&3==r.length){var i=r;
2if(0==i[0]){t:if(!n.j){if(n.a){if(!(n.a.u+3e3<t.u))break t;zn(n),Pn(n)}Vn(n),ne(18)}}else n.oa=i[1],0<n.oa-n.P&&37500>i[2]&&n.H&&0==n.o&&!n.m&&(n.m=ie(y(n.Sa,n),6e3));if(1>=sn(n.b)&&n.ea){try{n.ea()}catch(g){}n.ea=void 0}}else Kn(n,11)}else if((t.C||n.a==t)&&zn(n),!S(e))for(e=r=n.ka.a.parse(e),r=0;r<e.length;r++)if(i=e[r],n.P=i[0],i=i[1],2==n.v)if("c"==i[0]){n.J=i[1],n.ga=i[2];var o=i[3];null!=o&&(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=t.a;if(c){var l=c.a?c.a.getResponseHeader("X-Client-Wire-Protocol"):null;if(l){var f=u.b;!f.a&&(k(l,"spdy")||k(l,"quic")||k(l,"h2"))&&(f.f=f.g,f.a=new Set,f.b&&(cn(f,f.b),f.b=null))}if(u.A){var h=c.a?c.a.getResponseHeader("X-HTTP-Session-Id"):null;h&&(u.na=h,Ve(u.B,u.A,h))}}n.v=3,n.f&&n.f.ta(),n.U&&(n.N=m()-t.u,n.c.info("Handshake RTT: "+n.N+"ms"));var p=t;if((u=n).la=Qn(u,u.C?u.ga:null,u.fa),p.C){ln(u.b,p);var d=p,v=u.D;v&&d.setTimeout(v),d.o&&(Se(d),Te(d)),u.a=p}else Un(u);0<n.g.length&&Dn(n)}else"stop"!=i[0]&&"close"!=i[0]||Kn(n,7);else 3==n.v&&("stop"==i[0]||"close"==i[0]?"stop"==i[0]?Kn(n,7):xn(n):"noop"!=i[0]&&n.f&&n.f.sa(i),n.o=0);te(4)}catch(g){}}function Ne(t,e){if(t.forEach&&"function"==typeof t.forEach)t.forEach(e,void 0);else if(l(t)||"string"===typeof t)E(t,e,void 0);else{if(t.L&&"function"==typeof t.L)var n=t.L();else if(t.K&&"function"==typeof t.K)n=void 0;else if(l(t)||"string"===typeof t){n=[];for(var r=t.length,i=0;i<r;i++)n.push(i)}else for(i in n=[],r=0,t)n[r++]=i;i=(r=function(t){if(t.K&&"function"==typeof t.K)return t.K();if("string"===typeof t)return t.split("");if(l(t)){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e}for(r in e=[],n=0,t)e[n++]=t[r];return e}(t)).length;for(var o=0;o<i;o++)e.call(void 0,r[o],n&&n[o],t)}}function Ae(t,e){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(t)if(t instanceof Ae)for(n=t.L(),r=0;r<n.length;r++)this.set(n[r],t.get(n[r]));else for(r in t)this.set(r,t[r])}function xe(t){if(t.c!=t.a.length){for(var e=0,n=0;e<t.a.length;){var r=t.a[e];Pe(t.b,r)&&(t.a[n++]=r),e++}t.a.length=n}if(t.c!=t.a.length){var i={};for(n=e=0;e<t.a.length;)Pe(i,r=t.a[e])||(t.a[n++]=r,i[r]=1),e++;t.a.length=n}}function Pe(t,e){return Object.prototype.hasOwnProperty.call(t,e)}(o=ve.prototype).setTimeout=function(t){this.P=t},o.Xa=function(t){t=t.target;var e=this.F;e&&3==Cn(t)?e.f():this.Ca(t)},o.Ca=function(t){try{if(t==this.a)t:{var e=Cn(this.a),n=this.a.ua(),r=this.a.W();if(!(3>e||3==e&&!q&&!this.a.$())){this.A||4!=e||7==n||te(8==n||0>=r?3:2),Se(this);var i=this.a.W();this.N=i;var o=this.a.$();if(this.b=200==i,function(t,e,n,r,i,o,a){t.info((function(){return"XMLHTTP RESP ("+r+") [ attempt "+i+"]: "+e+"\n"+n+"\n"+o+" "+a}))}(this.c,this.m,this.l,this.f,this.S,e,i),this.b){if(this.U&&!this.C){e:{if(this.a){var a,s=this.a;if((a=s.a?s.a.getResponseHeader("X-HTTP-Initial-Response"):null)&&!S(a)){var u=a;break e}}u=null}if(!u){this.b=!1,this.h=3,ne(12),Ce(this),Ie(this);break t}Yt(this.c,this.f,u,"Initial handshake response via X-HTTP-Initial-Response"),this.C=!0,ke(this,u)}this.I?(_e(this,e,o),q&&this.b&&3==e&&(Kt(this.J,this.R,"tick",this.Wa),this.R.start())):(Yt(this.c,this.f,o,null),ke(this,o)),4==e&&Ce(this),this.b&&!this.A&&(4==e?Hn(this.g,this):(this.b=!1,Te(this)))}else 400==i&&0<o.indexOf("Unknown SID")?(this.h=3,ne(12)):(this.h=0,ne(13)),Ce(this),Ie(this)}}}catch(c){}},o.Wa=function(){if(this.a){var t=Cn(this.a),e=this.a.$();this.D<e.length&&(Se(this),_e(this,t,e),this.b&&4!=t&&Te(this))}},o.cancel=function(){this.A=!0,Ce(this)},o.Va=function(){this.o=null;var t=m();0<=t-this.T?(function(t,e){t.info((function(){return"TIMEOUT: "+e}))}(this.c,this.l),2!=this.H&&(te(3),ne(17)),Ce(this),this.h=2,Ie(this)):Oe(this,this.T-t)},(o=Ae.prototype).K=function(){xe(this);for(var t=[],e=0;e<this.a.length;e++)t.push(this.b[this.a[e]]);return t},o.L=function(){return xe(this),this.a.concat()},o.get=function(t,e){return Pe(this.b,t)?this.b[t]:e}
vendor: 4,328 bytes, line 2
2,o.set=function(t,e){Pe(this.b,t)||(this.c++,this.a.push(t)),this.b[t]=e},o.forEach=function(t,e){for(var n=this.L(),r=0;r<n.length;r++){var i=n[r],o=this.get(i);t.call(e,o,i,this)}};var Re=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function je(t,e){if(this.c=this.j=this.f="",this.h=null,this.i=this.g="",this.a=!1,t instanceof je){this.a=void 0!==e?e:t.a,Le(this,t.f),this.j=t.j,Me(this,t.c),Fe(this,t.h),this.g=t.g,e=t.b;var n=new Xe;n.c=e.c,e.a&&(n.a=new Ae(e.a),n.b=e.b),Ue(this,n),this.i=t.i}else t&&(n=String(t).match(Re))?(this.a=!!e,Le(this,n[1]||"",!0),this.j=Be(n[2]||""),Me(this,n[3]||"",!0),Fe(this,n[4]),this.g=Be(n[5]||"",!0),Ue(this,n[6]||"",!0),this.i=Be(n[7]||"")):(this.a=!!e,this.b=new Xe(null,this.a))}function De(t){return new je(t)}function Le(t,e,n){t.f=n?Be(e,!0):e,t.f&&(t.f=t.f.replace(/:$/,""))}function Me(t,e,n){t.c=n?Be(e,!0):e}function Fe(t,e){if(e){if(e=Number(e),isNaN(e)||0>e)throw Error("Bad port number "+e);t.h=e}else t.h=null}function Ue(t,e,n){e instanceof Xe?(t.b=e,function(t,e){e&&!t.f&&($e(t),t.c=null,t.a.forEach((function(t,e){var n=e.toLowerCase();e!=n&&(Je(this,e),tn(this,n,t))}),t)),t.f=e}(t.b,t.a)):(n||(e=ze(e,Qe)),t.b=new Xe(e,t.a))}function Ve(t,e,n){t.b.set(e,n)}function qe(t){return Ve(t,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^m()).toString(36)),t}function Be(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function ze(t,e,n){return"string"===typeof t?(t=encodeURI(t).replace(e,He),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function He(t){return"%"+((t=t.charCodeAt(0))>>4&15).toString(16)+(15&t).toString(16)}je.prototype.toString=function(){var t=[],e=this.f;e&&t.push(ze(e,We,!0),":");var n=this.c;return(n||"file"==e)&&(t.push("//"),(e=this.j)&&t.push(ze(e,We,!0),"@"),t.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.h)&&t.push(":",String(n))),(n=this.g)&&(this.c&&"/"!=n.charAt(0)&&t.push("/"),t.push(ze(n,"/"==n.charAt(0)?Ge:Ke,!0))),(n=this.b.toString())&&t.push("?",n),(n=this.i)&&t.push("#",ze(n,Ye)),t.join("")};var We=/[#\/\?@]/g,Ke=/[#\?:]/g,Ge=/[#\?]/g,Qe=/[#\?@]/g,Ye=/#/g;function Xe(t,e){this.b=this.a=null,this.c=t||null,this.f=!!e}function $e(t){t.a||(t.a=new Ae,t.b=0,t.c&&function(t,e){if(t){t=t.split("&");for(var n=0;n<t.length;n++){var r=t[n].indexOf("="),i=null;if(0<=r){var o=t[n].substring(0,r);i=t[n].substring(r+1)}else o=t[n];e(o,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(t.c,(function(e,n){t.add(decodeURIComponent(e.replace(/\+/g," ")),n)})))}function Je(t,e){$e(t),e=en(t,e),Pe(t.a.b,e)&&(t.c=null,t.b-=t.a.get(e).length,Pe((t=t.a).b,e)&&(delete t.b[e],t.c--,t.a.length>2*t.c&&xe(t)))}function Ze(t,e){return $e(t),e=en(t,e),Pe(t.a.b,e)}function tn(t,e,n){Je(t,e),0<n.length&&(t.c=null,t.a.set(en(t,e),O(n)),t.b+=n.length)}function en(t,e){return e=String(e),t.f&&(e=e.toLowerCase()),e}(o=Xe.prototype).add=function(t,e){$e(this),this.c=null,t=en(this,t);var n=this.a.get(t);return n||this.a.set(t,n=[]),n.push(e),this.b+=1,this},o.forEach=function(t,e){$e(this),this.a.forEach((function(n,r){E(n,(function(n){t.call(e,n,r,this)}),this)}),this)},o.L=function(){$e(this);for(var t=this.a.K(),e=this.a.L(),n=[],r=0;r<e.length;r++)for(var i=t[r],o=0;o<i.length;o++)n.push(e[r]);return n},o.K=function(t){$e(this);var e=[];if("string"===typeof t)Ze(this,t)&&(e=T(e,this.a.get(en(this,t))));else{t=this.a.K();for(var n=0;n<t.length;n++)e=T(e,t[n])}return e},o.set=function(t,e){return $e(this),this.c=null,Ze(this,t=en(this,t))&&(this.b-=this.a.get(t).length),this.a.set(t,[e]),this.b+=1,this},o.get=function(t,e){return t&&0<(t=this.K(t)).length?String(t[0]):e},o.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var t=[],e=this.a.L(),n=0;n<e.length;n++){var r=e[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]))),t.push(a)}}return this.c=t.join("&")};var nn=function(t,e){this.b=t,this.a=e};function rn(t){this.g=t||on,u.PerformanceNavigationTiming?t=0<(t=u.performance.getEntriesByType("navigation")).length&&("hq"==t[0].nextHopProtocol||"h2"==t[0].nextHopProtocol):t=!!(u.ia&&u.ia.ya&&u.ia.ya()&&u.
2ia.ya().Lb),this.f=t?this.g:1,this.a=null,1<this.f&&(this.a=new Set),this.b=null,this.c=[]}var on=10;function an(t){return!!t.b||!!t.a&&t.a.size>=t.f}function sn(t){return t.b?1:t.a?t.a.size:0}function un(t,e){return t.b?t.b==e:!!t.a&&t.a.has(e)}function cn(t,e){t.a?t.a.add(e):t.b=e}function ln(t,e){t.b&&t.b==e?t.b=null:t.a&&t.a.has(e)&&t.a.delete(e)}function fn(t){var e,n;if(null!=t.b)return t.c.concat(t.b.s);if(null!=t.a&&0!==t.a.size){var r=t.c;try{for(var o=i(t.a.values()),a=o.next();!a.done;a=o.next()){var s=a.value;r=r.concat(s.s)}}catch(u){e={error:u}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r}return O(t.c)}function hn(){}function pn(){this.a=new hn}function dn(t,e,n){var r=n||"";try{Ne(t,(function(t,n){var i=t;f(t)&&(i=kt(t)),e.push(r+n+"="+encodeURIComponent(i))}))}catch(i){throw e.push(r+"type="+encodeURIComponent("_badmap")),i}}function vn(t,e,n,r,i){try{e.onload=null,e.onerror=null,e.onabort=null,e.ontimeout=null,i(r)}catch(o){}}rn.prototype.cancel=function(){var t,e;if(this.c=fn(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){t={error:o}}finally{try{r&&!r.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}this.a.clear()}},hn.prototype.stringify=function(t){return u.JSON.stringify(t,void 0)},hn.prototype.parse=function(t){return u.JSON.parse(t,void 0)};var yn=u.JSON.parse;function gn(t){St.call(this),this.headers=new Ae,this.H=t||null,this.b=!1,this.s=this.a=null,this.B="",this.h=0,this.f="",this.g=this.A=this.l=this.u=!1,this.o=0,this.m=null,this.I=mn,this.D=this.F=!1}b(gn,St);var mn="",bn=/^https?$/i,wn=["POST","PUT"];function _n(t){return"content-type"==t.toLowerCase()}function En(t,e){t.b=!1,t.a&&(t.g=!0,t.a.abort(),t.g=!1),t.f=e,t.h=5,Tn(t),Sn(t)}function Tn(t){t.u||(t.u=!0,It(t,"complete"),It(t,"error"))}function On(t){if(t.b&&"undefined"!=typeof s&&(!t.s[1]||4!=Cn(t)||2!=t.W()))if(t.l&&4==Cn(t))qt(t.za,0,t);else if(It(t,"readystatechange"),4==Cn(t)){t.b=!1;try{var e,n=t.W();t:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r=!0;break t;default:r=!1}if(!(e=r)){var i;if(i=0===n){var o=String(t.B).match(Re)[1]||null;if(!o&&u.self&&u.self.location){var a=u.self.location.protocol;o=a.substr(0,a.length-1)}i=!bn.test(o?o.toLowerCase():"")}e=i}if(e)It(t,"complete"),It(t,"success");else{t.h=6;try{var c=2<Cn(t)?t.a.statusText:""}catch(n){c=""}t.f=c+" ["+t.W()+"]",Tn(t)}}finally{Sn(t)}}}function Sn(t,e){if(t.a){In(t);var n=t.a,r=t.s[0]?c:null;t.a=null,t.s=null,e||It(t,"ready");try{n.onreadystatechange=r}catch(i){}}}function In(t){t.a&&t.D&&(t.a.ontimeout=null),t.m&&(u.clearTimeout(t.m),t.m=null)}function Cn(t){return t.a?t.a.readyState:0}function kn(t,e,n){t:{for(r in n){var r=!1;break t}r=!0}r||(n=function(t){var e="";return P(t,(function(t,n){e+=n,e+=":",e+=t,e+="\r\n"})),e}(n),"string"===typeof t?null!=n&&encodeURIComponent(String(n)):Ve(t,e,n))}function Nn(t,e,n){return n&&n.internalChannelParams&&n.internalChannelParams[t]||e}function An(t){this.pa=0,this.g=[],this.c=new Qt,this.ga=this.la=this.B=this.fa=this.a=this.na=this.A=this.V=this.i=this.O=this.l=null,this.Oa=this.R=0,this.La=Nn("failFast",!1,t),this.H=this.m=this.j=this.h=this.f=null,this.S=!0,this.I=this.oa=this.P=-1,this.T=this.o=this.u=0,this.Ha=Nn("baseRetryDelayMs",5e3,t),this.Ra=Nn("retryDelaySeedMs",1e4,t),this.Ma=Nn("forwardChannelMaxRetries",2,t),this.ma=Nn("forwardChannelRequestTimeoutMs",2e4,t),this.Na=t&&t.g||void 0,this.D=void 0,this.C=t&&t.supportsCrossDomainXhr||!1,this.J="",this.b=new rn(t&&t.concurrentRequestLimit),this.ka=new pn,this.da=t&&t.fastHandshake||!1,this.Ia=t&&t.b||!1,t&&t.f&&(this.c.a=!1),t&&t.forceLongPolling&&(this.S=!1),this.U=!this.da&&this.S&&t&&t.detectBufferingProxy||!1,this.ea=void 0,this.N=0,this.F=!1,this.s=null,(this.Ka=t&&t.c||!1)&&this.c.info("Opt-in to enable Chrome Origin Trials.")}function xn(t){if(Rn(t),3==t.v){var e=t.R++,n=De(t.B);Ve(n,"SID",t.J),Ve(n,"RID",e),Ve(n,"TYPE","terminate"),Mn(t,n),(e=new ve(t,t.c,e,void 0)).H=2,e.i=qe(De(n)),n=!1,u.navigator&&u.navigator.sendBeacon&&(n=u.navigator.sendBeacon(e.i.toString(),"")),!n&&u.Image&&((new Image).src=e.i,n=!0),n||(e.a=Yn(e.g,null),e.a.ba(e.i)),e.u=m(),Te(e)}Gn(t)}function Pn(t){t.a&&(qn(t),t.a.cancel(),t.a=null)}function Rn(t){Pn(t),t.j&&(u.clearTimeout(t.j),t.j=null),zn(t),t.b.cancel(),t.h&&("number"===typeof t.h&&u.clearTimeout(t.h),t.h=null)}function jn(t,e){t.g.push(new nn(t.Oa++,e)),3==t.v&&Dn(t)}function Dn(t){an(t.b)||t.h||(t.h=!0,Dt(t.Ba,t),t.u=0)}function Ln(t,e){var n;n=e?e.f:t.R++;var r=De(t.B);Ve(r,"SID",t.J),Ve(r,"RID",n),Ve(r,"AID",t.P),Mn(t,r),t.i&&t.l&&kn(r,t.i,t.l),n=new ve(t,t.c,n,t.u+1),null===t.i&&(n.B=t.l),e&&(t.g=e.s.concat(t.g)),e=Fn(t,n,1e3),n.setTimeout(
2Math.round(.5*t.ma)+Math.round(.5*t.ma*Math.random())),cn(t.b,n),be(n,r,e)}function Mn(t,e){t.f&&Ne({},(function(t,n){Ve(e,n,t)}))}function Fn(t,e,n){n=Math.min(t.g.length,n);var r=t.f?y(t.f.Ja,t.f,t):null;t:for(var i=t.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{dn(l,a,"req"+c+"_")}catch(f){r&&r(l)}}if(s){r=a.join("&");break t}}return t=t.g.splice(0,n),e.s=t,r}function Un(t){t.a||t.j||(t.T=1,Dt(t.Aa,t),t.o=0)}function Vn(t){return!(t.a||t.j||3<=t.o)&&(t.T++,t.j=ie(y(t.Aa,t),Wn(t,t.o)),t.o++,!0)}function qn(t){null!=t.s&&(u.clearTimeout(t.s),t.s=null)}function Bn(t){t.a=new ve(t,t.c,"rpc",t.T),null===t.i&&(t.a.B=t.l),t.a.O=0;var e=De(t.la);Ve(e,"RID","rpc"),Ve(e,"SID",t.J),Ve(e,"CI",t.H?"0":"1"),Ve(e,"AID",t.P),Mn(t,e),Ve(e,"TYPE","xmlhttp"),t.i&&t.l&&kn(e,t.i,t.l),t.D&&t.a.setTimeout(t.D);var n=t.a;t=t.ga,n.H=1,n.i=qe(De(e)),n.j=null,n.I=!0,we(n,t)}function zn(t){null!=t.m&&(u.clearTimeout(t.m),t.m=null)}function Hn(t,e){var n=null;if(t.a==e){zn(t),qn(t),t.a=null;var r=2}else{if(!un(t.b,e))return;n=e.s,ln(t.b,e),r=1}if(t.I=e.N,0!=t.v)if(e.b)if(1==r){n=e.j?e.j.length:0,e=m()-e.u;var i=t.u;It(r=Jt(),new re(r,n,e,i)),Dn(t)}else Un(t);else if(3==(i=e.h)||0==i&&0<t.I||!(1==r&&function(t,e){return!(sn(t.b)>=t.b.f-(t.h?1:0))&&(t.h?(t.g=e.s.concat(t.g),!0):!(1==t.v||2==t.v||t.u>=(t.La?0:t.Ma))&&(t.h=ie(y(t.Ba,t,e),Wn(t,t.u)),t.u++,!0))}(t,e)||2==r&&Vn(t)))switch(n&&0<n.length&&(e=t.b,e.c=e.c.concat(n)),i){case 1:Kn(t,5);break;case 4:Kn(t,10);break;case 3:Kn(t,6);break;default:Kn(t,2)}}function Wn(t,e){var n=t.Ha+Math.floor(Math.random()*t.Ra);return t.f||(n*=2),n*e}function Kn(t,e){if(t.c.info("Error code "+e),2==e){var n=null;t.f&&(n=null);var r=y(t.Ya,t);n||(n=new je("//www.google.com/images/cleardot.gif"),u.location&&"http"==u.location.protocol||Le(n,"https"),qe(n)),function(t,e){var n=new Qt;if(u.Image){var r=new Image;r.onload=g(vn,n,r,"TestLoadImage: loaded",!0,e),r.onerror=g(vn,n,r,"TestLoadImage: error",!1,e),r.onabort=g(vn,n,r,"TestLoadImage: abort",!1,e),r.ontimeout=g(vn,n,r,"TestLoadImage: timeout",!1,e),u.setTimeout((function(){r.ontimeout&&r.ontimeout()}),1e4),r.src=t}else e(!1)}(n.toString(),r)}else ne(2);t.v=0,t.f&&t.f.ra(e),Gn(t),Rn(t)}function Gn(t){t.v=0,t.I=-1,t.f&&(0==fn(t.b).length&&0==t.g.length||(t.b.c.length=0,O(t.g),t.g.length=0),t.f.qa())}function Qn(t,e,n){var r=function(t){return t instanceof je?De(t):new je(t,void 0)}(n);if(""!=r.c)e&&Me(r,e+"."+r.c),Fe(r,r.h);else{var i=u.location;r=function(t,e,n,r){var i=new je(null,void 0);return t&&Le(i,t),e&&Me(i,e),n&&Fe(i,n),r&&(i.g=r),i}(i.protocol,e?e+"."+i.hostname:i.hostname,+i.port,n)}return t.V&&P(t.V,(function(t,e){Ve(r,e,t)})),e=t.A,n=t.na,e&&n&&Ve(r,e,n),Ve(r,"VER",t.ha),Mn(t,r),r}function Yn(t,e){if(e&&!t.C)throw Error("Can't create secondary domain capable XhrIo object.");return(e=new gn(t.Na)).F=t.C,e}function Xn(){}function $n(){if(U&&!(10<=Number(J)))throw Error("Environmental error: no available transport.")}function Jn(t,e){St.call(this),this.a=new An(e),this.o=t,this.b=e&&e.messageUrlParams||null,t=e&&e.messageHeaders||null,e&&e.clientProtocolHeaderRequired&&(t?t["X-Client-Protocol"]="webchannel":t={"X-Client-Protocol":"webchannel"}),this.a.l=t,t=e&&e.initMessageHeaders||null,e&&e.messageContentType&&(t?t["X-WebChannel-Content-Type"]=e.messageContentType:t={"X-WebChannel-Content-Type":e.messageContentType}),e&&e.a&&(t?t["X-WebChannel-Client-Profile"]=e.a:t={"X-WebChannel-Client-Profile":e.a}),this.a.O=t,(t=e&&e.httpHeadersOverwriteParam)&&!S(t)&&(this.a.i=t),this.m=e&&e.supportsCrossDomainXhr||!1,this.l=e&&e.sendRawJson||!1,(e=e&&e.httpSessionIdParam)&&!S(e)&&(this.a.A=e,null!==(t=this.b)&&e in t&&(e in(t=this.b)&&delete t[e])),this.f=new er(this)}function Zn(t){he.call(this);var e=t.__sm__;if(e){t:{for(var n in e){t=n;break t}t=void 0}(this.c=t)?(t=this.c,this.data=null!==e&&t in e?e[t]:void 0):this.data=e}else this.data=t}function tr(){pe.call(this),this.status=1}function er(t){this.a=t}(o=gn.prototype).ba=function(t,e,n,r){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.B+"; newUri="+t);e=e?e.toUpperCase():"GET",this.B=t,this.f="",this.h=0,this.u=!1,this.b=!0,this.a=new XMLHttpRequest,this.s=this.H?ue(this.H):ue(le),this.a.onreadystatechange=y(this.za,this);try{this.A=!0,this.a.open(e,String(t),!0),this.A=!1}catch(o){return void En(this,o)}t=n||"";var i=new Ae(this.headers);r&&Ne(r,(function(t,e){i.set(e,t)})),r=function(t){t:{for(var e=_n,n=t.length,r="string"===typeof t?t.split(""):t,i=0;i<n;i++)if(i in r&&e.call(void 0,r[i],i,t)){e=i;break t}e=-1}return 0>e?null:"string"===typeof t?t.charAt(e):t[e]}(i.L()),n=u.FormData&&t instanceof u.FormData,!(0<=_(wn,e))||r||n||i.set("Content-Type","application/x-www-form-urlencoded;
2charset=utf-8"),i.forEach((function(t,e){this.a.setRequestHeader(e,t)}),this),this.I&&(this.a.responseType=this.I),"withCredentials"in this.a&&this.a.withCredentials!==this.F&&(this.a.withCredentials=this.F);try{In(this),0<this.o&&((this.D=function(t){return U&&X(9)&&"number"===typeof t.timeout&&void 0!==t.ontimeout}(this.a))?(this.a.timeout=this.o,this.a.ontimeout=y(this.xa,this)):this.m=qt(this.xa,this.o,this)),this.l=!0,this.a.send(t),this.l=!1}catch(o){En(this,o)}},o.xa=function(){"undefined"!=typeof s&&this.a&&(this.f="Timed out after "+this.o+"ms, aborting",this.h=8,It(this,"timeout"),this.abort(8))},o.abort=function(t){this.a&&this.b&&(this.b=!1,this.g=!0,this.a.abort(),this.g=!1,this.h=t||7,It(this,"complete"),It(this,"abort"),Sn(this))},o.G=function(){this.a&&(this.b&&(this.b=!1,this.g=!0,this.a.abort(),this.g=!1),Sn(this,!0)),gn.X.G.call(this)},o.za=function(){this.j||(this.A||this.l||this.g?On(this):this.Ua())},o.Ua=function(){On(this)},o.W=function(){try{return 2<Cn(this)?this.a.status:-1}catch(t){return-1}},o.$=function(){try{return this.a?this.a.responseText:""}catch(t){return""}},o.Pa=function(t){if(this.a){var e=this.a.responseText;return t&&0==e.indexOf(t)&&(e=e.substring(t.length)),yn(e)}},o.ua=function(){return this.h},o.Qa=function(){return"string"===typeof this.f?this.f:String(this.f)},(o=An.prototype).ha=8,o.v=1,o.Ba=function(t){if(this.h)if(this.h=null,1==this.v){if(!t){this.R=Math.floor(1e5*Math.random()),t=this.R++;var e,n=new ve(this,this.c,t,void 0),r=this.l;if(this.O&&(r?D(r=R(r),this.O):r=this.O),null===this.i&&(n.B=r),this.da)t:{for(var i=e=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<(e+=o)){e=i;break t}if(4096===e||i===this.g.length-1){e=i+1;break t}}e=1e3}else e=1e3;e=Fn(this,n,e),Ve(i=De(this.B),"RID",t),Ve(i,"CVER",22),this.A&&Ve(i,"X-HTTP-Session-Id",this.A),Mn(this,i),this.i&&r&&kn(i,this.i,r),cn(this.b,n),this.Ia&&Ve(i,"TYPE","init"),this.da?(Ve(i,"$req",e),Ve(i,"SID","null"),n.U=!0,be(n,i,null)):be(n,i,e),this.v=2}}else 3==this.v&&(t?Ln(this,t):0==this.g.length||an(this.b)||Ln(this))},o.Aa=function(){if(this.j=null,Bn(this),this.U&&!(this.F||null==this.a||0>=this.N)){var t=2*this.N;this.c.info("BP detection timer enabled: "+t),this.s=ie(y(this.Ta,this),t)}},o.Ta=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,ne(10),Pn(this),Bn(this))},o.Sa=function(){null!=this.m&&(this.m=null,Pn(this),Vn(this),ne(19))},o.Ya=function(t){t?(this.c.info("Successfully pinged google.com"),ne(2)):(this.c.info("Failed to ping google.com"),ne(1))},(o=Xn.prototype).ta=function(){},o.sa=function(){},o.ra=function(){},o.qa=function(){},o.Ja=function(){},$n.prototype.a=function(t,e){return new Jn(t,e)},b(Jn,St),Jn.prototype.g=function(){this.a.f=this.f,this.m&&(this.a.C=!0);var t=this.a,e=this.o,n=this.b||void 0;ne(0),t.fa=e,t.V=n||{},t.H=t.S,t.B=Qn(t,null,t.fa),Dn(t)},Jn.prototype.close=function(){xn(this.a)},Jn.prototype.h=function(t){if("string"===typeof t){var e={};e.__data__=t,jn(this.a,e)}else this.l?((e={}).__data__=kt(t),jn(this.a,e)):jn(this.a,t)},Jn.prototype.G=function(){this.a.f=null,delete this.f,xn(this.a),delete this.a,Jn.X.G.call(this)},b(Zn,he),b(tr,pe),b(er,Xn),er.prototype.ta=function(){It(this.a,"a")},er.prototype.sa=function(t){It(this.a,new Zn(t))},er.prototype.ra=function(t){It(this.a,new tr(t))},er.prototype.qa=function(){It(this.a,"b")},$n.prototype.createWebChannel=$n.prototype.a,Jn.prototype.send=Jn.prototype.h,Jn.prototype.open=Jn.prototype.g,Jn.prototype.close=Jn.prototype.close,oe.NO_ERROR=0,oe.TIMEOUT=8,oe.HTTP_ERROR=6,ae.COMPLETE="complete",ce.EventType=fe,fe.OPEN="a",fe.CLOSE="b",fe.ERROR="c",fe.MESSAGE="d",St.prototype.listen=St.prototype.va,gn.prototype.listenOnce=gn.prototype.wa,gn.prototype.getLastError=gn.prototype.Qa,gn.prototype.getLastErrorCode=gn.prototype.ua,gn.prototype.getStatus=gn.prototype.W,gn.prototype.getResponseJson=gn.prototype.Pa,gn.prototype.getResponseText=gn.prototype.$,gn.prototype.send=gn.prototype.ba;var nr=function(){return new $n},rr=function(){return Jt()},ir=oe,or=ae,ar=Xt,sr={gb:0,jb:1,kb:2,Db:3,Ib:4,Fb:5,Gb:6,Eb:7,Cb:8,Hb:9,PROXY:10,NOPROXY:11,Ab:12,wb:13,xb:14,vb:15,yb:16,zb:17,bb:18,ab:19,cb:20},ur=ce,cr=gn}).call(this,n(10))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(t,e)||function(t,e){if(t){if("string"===typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}
2(t,e)||function(){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(e,"a",(function(){return i}))},,function(t,e,n){"use strict";var r=n(99),i=Object.prototype.toString;function o(t){return"[object Array]"===i.call(t)}function a(t){return"undefined"===typeof t}function s(t){return null!==t&&"object"===typeof t}function u(t){if("[object Object]"!==i.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function c(t){return"[object Function]"===i.call(t)}function l(t,e){if(null!==t&&"undefined"!==typeof t)if("object"!==typeof t&&(t=[t]),o(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}t.exports={isArray:o,isArrayBuffer:function(t){return"[object ArrayBuffer]"===i.call(t)},isBuffer:function(t){return null!==t&&!a(t)&&null!==t.constructor&&!a(t.constructor)&&"function"===typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!==typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"===typeof t},isNumber:function(t){return"number"===typeof t},isObject:s,isPlainObject:u,isUndefined:a,isDate:function(t){return"[object Date]"===i.call(t)},isFile:function(t){return"[object File]"===i.call(t)},isBlob:function(t){return"[object Blob]"===i.call(t)},isFunction:c,isStream:function(t){return s(t)&&c(t.pipe)},isURLSearchParams:function(t){return"undefined"!==typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)},forEach:l,merge:function t(){var e={};function n(n,r){u(e[r])&&u(n)?e[r]=t(e[r],n):u(n)?e[r]=t({},n):o(n)?e[r]=n.slice():e[r]=n}for(var r=0,i=arguments.length;r<i;r++)l(arguments[r],n);return e},extend:function(t,e,n){return l(e,(function(e,i){t[i]=n&&"function"===typeof e?r(e,n):e})),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}}},function(t,e,n){"use strict";function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}n.d(e,"a",(function(){return i}))},,function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"===typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var u,c=[],l=!1,f=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&p())}function p(){if(!l){var t=s(h);l=!0;for(var e=c.length;e;){for(u=c,c=[];++f<e;)u&&u[f].run();f=-1,e=c.length}u=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function v(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new d(t,e)),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(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){t.exports=n(115)()},,,function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){!function(t){"use strict";function e(t){return Array.prototype.slice.call(t)}function n(t){return new Promise((function(e,n){t.onsuccess=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function r(t,e,r){var i,o=new Promise((function(o,a){n(i=t[e].apply(t,r)).then(o,a)}));return o.request=i,o}function i(t,e,n){var i=r(t,e,n);return i.then((function(t){if(t)return new l(t,i.request)}))}
2function o(t,e,n){n.forEach((function(n){Object.defineProperty(t.prototype,n,{get:function(){return this[e][n]},set:function(t){this[e][n]=t}})}))}function a(t,e,n,i){i.forEach((function(i){i in n.prototype&&(t.prototype[i]=function(){return r(this[e],i,arguments)})}))}function s(t,e,n,r){r.forEach((function(r){r in n.prototype&&(t.prototype[r]=function(){return this[e][r].apply(this[e],arguments)})}))}function u(t,e,n,r){r.forEach((function(r){r in n.prototype&&(t.prototype[r]=function(){return i(this[e],r,arguments)})}))}function c(t){this._index=t}function l(t,e){this._cursor=t,this._request=e}function f(t){this._store=t}function h(t){this._tx=t,this.complete=new Promise((function(e,n){t.oncomplete=function(){e()},t.onerror=function(){n(t.error)},t.onabort=function(){n(t.error)}}))}function p(t,e,n){this._db=t,this.oldVersion=e,this.transaction=new h(n)}function d(t){this._db=t}function v(t,e,n){var i=r(indexedDB,"open",[t,e]),o=i.request;return o&&(o.onupgradeneeded=function(t){n&&n(new p(o.result,t.oldVersion,o.transaction))}),i.then((function(t){return new d(t)}))}function y(t){return r(indexedDB,"deleteDatabase",[t])}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(t){t in IDBCursor.prototype&&(l.prototype[t]=function(){var e=this,r=arguments;return Promise.resolve().then((function(){return e._cursor[t].apply(e._cursor,r),n(e._request).then((function(t){if(t)return new l(t,e._request)}))}))})})),f.prototype.createIndex=function(){return new c(this._store.createIndex.apply(this._store,arguments))},f.prototype.index=function(){return new c(this._store.index.apply(this._store,arguments))},o(f,"_store",["name","keyPath","indexNames","autoIncrement"]),a(f,"_store",IDBObjectStore,["put","add","delete","clear","get","getAll","getKey","getAllKeys","count"]),u(f,"_store",IDBObjectStore,["openCursor","openKeyCursor"]),s(f,"_store",IDBObjectStore,["deleteIndex"]),h.prototype.objectStore=function(){return new f(this._tx.objectStore.apply(this._tx,arguments))},o(h,"_tx",["objectStoreNames","mode"]),s(h,"_tx",IDBTransaction,["abort"]),p.prototype.createObjectStore=function(){return new f(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 h(this._db.transaction.apply(this._db,arguments))},o(d,"_db",["name","version","objectStoreNames"]),s(d,"_db",IDBDatabase,["close"]),["openCursor","o
2penKeyCursor"].forEach((function(t){[f,c].forEach((function(n){t in n.prototype&&(n.prototype[t.replace("open","iterate")]=function(){var n=e(arguments),r=n[n.length-1],i=this._store||this._index,o=i[t].apply(i,n.slice(0,-1));o.onsuccess=function(){r(o.result)}})}))})),[c,f].forEach((function(t){t.prototype.getAll||(t.prototype.getAll=function(t,e){var n=this,r=[];return new Promise((function(i){n.iterateCursor(t,(function(t){t?(r.push(t.value),void 0===e||r.length!=e?t.continue():i(r)):i(r)}))}))})})),t.openDb=v,t.deleteDb=y,Object.defineProperty(t,"__esModule",{value:!0})}(e)},function(t,e){var n=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},function(t,e,n){t.exports=!n(40)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e){"function"===typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}},function(t,e,n){var r=n(27),i=n(45);t.exports=n(23)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(39),i=n(75),o=n(55),a=Object.defineProperty;e.f=n(23)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(s){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},function(t,e,n){var r=n(78),i=n(56);t.exports=function(t){return r(i(t))}},function(t,e,n){var r=n(59)("wks"),i=n(48),o=n(20).Symbol,a="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))}).store=r},function(t,e,n){"use strict";(function(t){var r=n(171),i=n(172),o=n(86);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,n){if(!u.TYPED_ARRAY_SUPPORT&&!(this instanceof u))return new u(t,e,n);if("number"===typeof t){if("string"===typeof e)throw new Error("If encoding is specified then the first argument must be a string");return f(this,t)}return c(this,t,e,n)}function c(t,e,n,r){if("number"===typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=h(t,e);return t}(t,e,n,r):"string"===typeof e?function(t,e,n){"string"===typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(e,n),i=(t=s(t,r)).write(e,n);i!==r&&(t=t.slice(0,i));return t}(t,e,n):function(t,e){if(u.isBuffer(e)){var n=0|p(e.length);return 0===(t=s(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!==typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!==typeof e.length||(r=e.length)!==r?s(t,0):h(t,e);if("Buffer"===e.type&&o(e.data))return h(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(t){if("number"!==typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function f(t,e){if(l(e),t=s(t,e<0?0:0|p(e)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function h(t,e){var n=e.length<0?0:0|p(e.length);t=s(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function p(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&
vendor: 8,667 bytes, line 2
2(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!==typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return q(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return B(t).length;default:if(r)return q(t).length;e=(""+e).toLowerCase(),r=!0}}function v(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return A(this,e,n);case"utf8":case"utf-8":return I(this,e,n);case"ascii":return k(this,e,n);case"latin1":case"binary":return N(this,e,n);case"base64":return S(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function y(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function g(t,e,n,r,i){if(0===t.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"===typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:m(t,e,n,r,i);if("number"===typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):m(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,n,r,i){var o,a=1,s=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,n/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var l=-1;for(o=n;o<s;o++)if(c(t,o)===c(e,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*a}else-1!==l&&(o-=o-l),l=-1}else for(n+u>s&&(n=s-u),o=n;o>=0;o--){for(var f=!0,h=0;h<u;h++)if(c(t,o+h)!==c(e,h)){f=!1;break}if(f)return o}return-1}function b(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[n+a]=s}return a}function w(t,e,n,r){return z(q(e,t.length-n),t,n,r)}function _(t,e,n,r){return z(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function E(t,e,n,r){return _(t,e,n,r)}function T(t,e,n,r){return z(B(e),t,n,r)}function O(t,e,n,r){return z(function(t,e){for(var n,r,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)r=(n=t.charCodeAt(a))>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function S(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function I(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,a,s,u,c=t[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128===(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=t[i+1],a=t[i+2],128===(192&o)&&128===(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128===(192&o)&&128===(192&a)&&128===(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=f}return function(t){var e=t.length;if(e<=C)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=C));return n}(r)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"===typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(e){return!1}}(),e.kMaxLength=a(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,n){return c(null,t,e,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,n){return function(t,e,n,r){return l(e),e<=0?s(t,e):void 0!==n?"string"===typeof r?s(t,e).fill(n,r):s(t,e).fill(n):s(t,e)}(null,t,e,n)},u.allocUnsafe=function(t){return f(null,t)},u.allocUnsafeSlow=function(t){return f(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=u.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var a=t[n];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)y(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?I(this,0,t):v.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,n,r,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),s=Math.min(o,a),c=this.slice(r,i),l=t.slice(e,n),f=0;f<s;++f)if(c[f]!==l[f]){o=c[f],a=l[f];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},u.prototype.indexOf=function(t,e,n){return g(this,t,e,n,!0)},u.prototype.lastIndexOf=function(t,e,n){return g(this,t,e,n,!1)},u.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"===typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":return _(this,t,e,n);case"latin1":case"binary":return E(this,t,e,n);case"base64":return T(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function k(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function N(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function A(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;
vendor: 4,173 bytes, line 2
2++o)i+=V(t[o]);return i}function x(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function P(t,e,n){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function R(t,e,n,r,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function j(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i<o;++i)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function D(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i<o;++i)t[n+i]=e>>>8*(r?i:3-i)&255}function L(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function M(t,e,n,r,o){return o||L(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function F(t,e,n,r,o){return o||L(t,0,n,8),i.write(t,e,n,r,52,8),n+8}u.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=u.prototype;else{var i=e-t;n=new u(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+t]}return n},u.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},u.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},u.prototype.readUInt8=function(t,e){return e||P(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||P(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||P(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||P(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){e||P(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||P(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||P(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||P(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||P(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||R(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},u.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||R(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},u.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>
28,this[e+1]=255&t):j(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):D(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):D(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);R(this,t,e,n,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<n&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);R(this,t,e,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):D(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):D(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,n){return M(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return M(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return F(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return F(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,o=r-n;if(this===t&&n<e&&e<r)for(i=o-1;i>=0;--i)t[i+e]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o},u.prototype.fill=function(t,e,n,r){if("string"===typeof t){if("string"===typeof e?(r=e,e=0,n=this.length):"string"===typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!==typeof r)throw new TypeError("encoding must be a string");if("string"===typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"===typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"===typeof t)for(o=e;o<n;++o)this[o]=t;else{var a=u.isBuffer(t)?t:q(new u(t,r).toString()),s=a.length;for(o=0;o<n-e;++o)this[o+e]=a[o%s]}return this};var U=/[^+\/0-9A-Za-z-_]/g;function V(t){return t<16?"0"+t.toString(16):t.toString(16)}function q(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],a=0;a<r;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function B(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(U,"")).length<2)return"";for(;t.length%4!==0;)t+="=";return t}(t))}function z(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(this,n(10))},function(t,e,n){"use strict";var r=n(50),i=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=f;var o=Object.create(n(41));o.inherits=n(25);var a=n(90),s=n(94);o.inherits(f,a);for(var u=i(s.prototype),c=0;c<u.length;c++){var l=u[c];f.prototype[l]||(f.prototype[l]=s.prototype[l])}function f(t){if(!(this instanceof f))return new f(t);a.call(this,t),s.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||r.nextTick(p,this)}function p(t){t.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),f.prototype._destroy=function(t,e){this.push(null),this.end(),r.nextTick(e,t)}},function(t,e,n){"use strict";function r(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e){var n=e.left,r=e.right,i=e.up,o=e.down,a=e.top,s=e.bottom,u=e.mirror,c=e.opposite,f=(n?1:0)|(r?2:0)|(a||o?4:0)|(s||i?8:0)|(u?16:0)|(c?32:0)|(t?64:0);if(h.hasOwnProperty(f))return h[f];if(!u!=!(t&&c)){var p=[r,n,s,a,o,i];n=p[0],r=p[1],a=p[2],s=p[3],i=p[4],o=p[5]}var d=n||r,v=a||s||i||o,y=void 0;return d||v?t?y="40% {\n opacity: 1;\n transform: scale3d(.475, .475, .475) translate3d("+(d?(n?"":"-")+"42px":"0")+", "+(v?(o||a?"-":"")+"60px":"0")+", 0);\n }\n to {\n opacity: 0;
2\n transform: scale(.1) translate3d("+(d?(r?"":"-")+"2000px":"0")+", "+(v?(i||s?"":"-")+"2000px":"0")+", 0);\n transform-origin: "+(v?"center bottom":(n?"left":"right")+" center")+";\n }":y="from {\n opacity: 0;\n transform: scale3d(.1, .1, .1) translate3d("+(d?(n?"-":"")+"1000px":"0")+", "+(v?(o||a?"-":"")+"1000px":"0")+", 0);\n animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);\n }\n 60% {\n opacity: 1;\n transform: scale3d(.475, .475, .475) translate3d("+(d?(r?"-":"")+"10px":"0")+", "+(v?(i||s?"-":"")+"60px":"0")+", 0);\n animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);\n }":y=(t?"to":"from")+" {opacity: 0; transform: scale3d(.1, .1, .1);} "+(t?"from":"to")+" { opacity: 1; transform: none;}",h[f]=(0,l.animation)(y),h[f]}function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.defaults,e=t.children,n=(t.out,t.forever),o=t.timeout,a=t.duration,s=void 0===a?l.defaults.duration:a,u=t.delay,f=void 0===u?l.defaults.delay:u,h=t.count,p=void 0===h?l.defaults.count:h,d=r(t,["children","out","forever","timeout","duration","delay","count"]),v={make:i,duration:void 0===o?s:o,delay:f,forever:n,count:p,style:{animationFillMode:"both"},reverse:d.left};return(0,c.default)(d,v,v,e)}Object.defineProperty(e,"__esModule",{value:!0});var a,s=n(17),u=n(73),c=(a=u)&&a.__esModule?a:{default:a},l=n(54),f={out:s.bool,left:s.bool,right:s.bool,top:s.bool,bottom:s.bool,mirror:s.bool,opposite:s.bool,duration:s.number,timeout:s.number,delay:s.number,count:s.number,forever:s.bool},h={};o.propTypes=f,e.default=o,t.exports=e.default},function(t,e,n){"use strict";function r(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e){var n=e.distance,r=e.left,i=e.right,o=e.up,a=e.down,s=e.top,c=e.bottom,l=e.big,f=e.mirror,p=e.opposite,d=(n?n.toString():0)+((r?1:0)|(i?2:0)|(s||a?4:0)|(c||o?8:0)|(f?16:0)|(p?32:0)|(t?64:0)|(l?128:0));if(h.hasOwnProperty(d))return h[d];var v=r||i||o||a||s||c,y=void 0,g=void 0;if(v){if(!f!=!(t&&p)){var m=[i,r,c,s,a,o];r=m[0],i=m[1],s=m[2],c=m[3],o=m[4],a=m[5]}var b=n||(l?"2000px":"100%");y=r?"-"+b:i?b:"0",g=a||s?"-"+b:o||c?b:"0"}return h[d]=(0,u.animation)((t?"to":"from")+" {opacity: 0;"+(v?" transform: translate3d("+y+", "+g+", 0);":"")+"}\n "+(t?"from":"to")+" {opacity: 1;transform: none;} "),h[d]}function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.defaults,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.children,o=(t.out,t.forever),a=t.timeout,s=t.duration,c=void 0===s?u.defaults.duration:s,f=t.delay,h=void 0===f?u.defaults.delay:f,p=t.count,d=void 0===p?u.defaults.count:p,v=r(t,["children","out","forever","timeout","duration","delay","count"]),y={make:i,duration:void 0===a?c:a,delay:h,forever:o,count:d,style:{animationFillMode:"both"},reverse:v.left};return e?(0,l.default)(v,y,y,n):y}Object.defineProperty(e,"__esModule",{value:!0});var a,s=n(17),u=n(54),c=n(73),l=(a=c)&&a.__esModule?a:{default:a},f={out:s.bool,left:s.bool,right:s.bool,top:s.bool,bottom:s.bool,big:s.bool,mirror:s.bool,opposite:s.bool,duration:s.number,timeout:s.number,distance:s.string,delay:s.number,count:s.number,forever:s.bool},h={};o.propTypes=f,e.default=o,t.exports=e.default},function(t,e,n){"use strict";n.d(e,"a",(function(){return Q})),n.d(e,"b",(function(){return tt}));var r=n(14),i=n(3),o=n.n(i);n(17);function a(){return(a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function s(t){return"/"===t.charAt(0)}function u(t,e){for(var n=e,r=n+1,i=t.length;r<i;n+=1,r+=1)t[n]=t[r];t.pop()}var c=function(t,e){void 0===e&&(e="");var n,r=t&&t.split("/")||[],i=e&&e.split("/")||[],o=t&&s(t),a=e&&s(e),c=o||a;if(t&&s(t)?i=r:r.length&&(i.pop(),i=i.concat(r)),!i.length)return"/";if(i.length){var l=i[i.length-1];n="."===l||".."===l||""===l}else n=!1;for(var f=0,h=i.length;h>=0;h--){var p=i[h];"."===p?u(i,h):".."===p?(u(i,h),f++):f&&(u(i,h),f--)}if(!c)for(;f--;f)i.unshift("..");!c||""===i[0]||i[0]&&s(i[0])||i.unshift("");var d=i.join("/");return n&&"/"!==d.substr(-1)&&(d+="/"),d};var l="Invariant failed";var f=function(t,e){if(!t)throw new Error(l)};function h(t){return"/"===t.charAt(0)?t:"/"+t}function p(t){return"/"===t.charAt(0)?t.substr(1):t}function d(t,e){return function(t,e){return 0===t.toLowerCase().indexOf(e.toLowerCase())&&-1!=="/?#".indexOf(t.charAt(e.length))}(t,e)?t.substr(e.length):t}function v(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t}function y(t){var e=t.pathname,n=t.search,r=t.hash,i=e||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}function g(t,e,n,r){var i;"string"===typeof t?(i=function(t){var e=t||"/",n="",r="",i=e.indexOf("#");-1!==i&&(r=e.substr(i),e=e.substr(0,i));var o=e.indexOf("?");return-1!==o&&(n=e.substr(o),e=e.substr(0,o)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}}(t)).state=e:(void 0===(i=a({},t)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==e&&void 0===i.state&&(i.state=e));try{i.pathname=decodeURI(i.pathname)}catch(o){throw o instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invali
2d percent-encoding.'):o}return n&&(i.key=n),r?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=c(i.pathname,r.pathname)):i.pathname=r.pathname:i.pathname||(i.pathname="/"),i}function m(){var t=null;var e=[];return{setPrompt:function(e){return t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,n,r,i){if(null!=t){var o="function"===typeof t?t(e,n):t;"string"===typeof o?"function"===typeof r?r(o,i):i(!0):i(!1!==o)}else i(!0)},appendListener:function(t){var n=!0;function r(){n&&t.apply(void 0,arguments)}return e.push(r),function(){n=!1,e=e.filter((function(t){return t!==r}))}},notifyListeners:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e.forEach((function(t){return t.apply(void 0,n)}))}}}var b=!("undefined"===typeof window||!window.document||!window.document.createElement);function w(t,e){e(window.confirm(t))}var _="popstate",E="hashchange";function T(){try{return window.history.state||{}}catch(t){return{}}}function O(t){void 0===t&&(t={}),b||f(!1);var e=window.history,n=function(){var t=window.navigator.userAgent;return(-1===t.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history}(),r=!(-1===window.navigator.userAgent.indexOf("Trident")),i=t,o=i.forceRefresh,s=void 0!==o&&o,u=i.getUserConfirmation,c=void 0===u?w:u,l=i.keyLength,p=void 0===l?6:l,O=t.basename?v(h(t.basename)):"";function S(t){var e=t||{},n=e.key,r=e.state,i=window.location,o=i.pathname+i.search+i.hash;return O&&(o=d(o,O)),g(o,r,n)}function I(){return Math.random().toString(36).substr(2,p)}var C=m();function k(t){a(V,t),V.length=e.length,C.notifyListeners(V.location,V.action)}function N(t){(function(t){return void 0===t.state&&-1===navigator.userAgent.indexOf("CriOS")})(t)||P(S(t.state))}function A(){P(S(T()))}var x=!1;function P(t){if(x)x=!1,k();else{C.confirmTransitionTo(t,"POP",c,(function(e){e?k({action:"POP",location:t}):function(t){var e=V.location,n=j.indexOf(e.key);-1===n&&(n=0);var r=j.indexOf(t.key);-1===r&&(r=0);var i=n-r;i&&(x=!0,L(i))}(t)}))}}var R=S(T()),j=[R.key];function D(t){return O+y(t)}function L(t){e.go(t)}var M=0;function F(t){1===(M+=t)&&1===t?(window.addEventListener(_,N),r&&window.addEventListener(E,A)):0===M&&(window.removeEventListener(_,N),r&&window.removeEventListener(E,A))}var U=!1;var V={length:e.length,action:"POP",location:R,createHref:D,push:function(t,r){var i="PUSH",o=g(t,r,I(),V.location);C.confirmTransitionTo(o,i,c,(function(t){if(t){var r=D(o),a=o.key,u=o.state;if(n)if(e.pushState({key:a,state:u},null,r),s)window.location.href=r;else{var c=j.indexOf(V.location.key),l=j.slice(0,c+1);l.push(o.key),j=l,k({action:i,location:o})}else window.location.href=r}}))},replace:function(t,r){var i="REPLACE",o=g(t,r,I(),V.location);C.confirmTransitionTo(o,i,c,(function(t){if(t){var r=D(o),a=o.key,u=o.state;if(n)if(e.replaceState({key:a,state:u},null,r),s)window.location.replace(r);else{var c=j.indexOf(V.location.key);-1!==c&&(j[c]=o.key),k({action:i,location:o})}else window.location.replace(r)}}))},go:L,goBack:function(){L(-1)},goForward:function(){L(1)},block:function(t){void 0===t&&(t=!1);var e=C.setPrompt(t);return U||(F(1),U=!0),function(){return U&&(U=!1,F(-1)),e()}},listen:function(t){var e=C.appendListener(t);return F(1),function(){F(-1),e()}}};return V}var S="hashchange",I={hashbang:{encodePath:function(t){return"!"===t.charAt(0)?t:"!/"+p(t)},decodePath:function(t){return"!"===t.charAt(0)?t.substr(1):t}},noslash:{encodePath:p,decodePath:h},slash:{encodePath:h,decodePath:h}};function C(t){var e=t.indexOf("#");return-1===e?t:t.slice(0,e)}function k(){var t=window.location.href,e=t.indexOf("#");return-1===e?"":t.substring(e+1)}function N(t){window.location.replace(C(window.location.href)+"#"+t)}function A(t){void 0===t&&(t={}),b||f(!1);var e=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),t),r=n.getUserConfirmation,i=void 0===r?w:r,o=n.hashType,s=void 0===o?"slash":o,u=t.basename?v(h(t.basename)):"",c=I[s],l=c.encodePath,p=c.decodePath;function _(){var t=p(k());return u&&(t=d(t,u)),g(t)}var E=m();function T(t){a(V,t),V.length=e.length,E.notifyListeners(V.location,V.action)}var O=!1,A=null;function x(){var t,e,n=k(),r=l(n);if(n!==r)N(r);else{var o=_(),a=V.location;if(!O&&(e=o,(t=a).pathname===e.pathname&&t.search===e.search&&t.hash===e.hash))return;if(A===y(o))return;A=null,function(t){if(O)O=!1,T();else{var e="POP";E.confirmTransitionTo(t,e,i,(function(n){n?T({action:e,location:t}):function(t){var e=V.location,n=D.lastIndexOf(y(e));-1===n&&(n=0);var r=D.lastIndexOf(y(t));-1===r&&(r=0);var i=n-r;i&&(O=!0,L(i))}(t)}))}}(o)}}var P=k(),R=l(P);P!==R&&N(R);var j=_(),D=[y(j)];function L(t){e.go(t)}var M=0;function F(t){1===(M+=t)&&1===t?window.addEventListener(S,x):0===M&&window.removeEventListener(S,x)}var U=!1;var V={length:e.length,action:"POP",location:j,createHref:function(t){var e=document.querySelector("base"),n="";return e&&e.getAttribute("href")&&(n=C(window.location.href)),n+"#"+l(u+y(t))},push:function(t,e){var n="PUSH",r=g(t,void 0,void 0,V.location);E.confirmTransitionTo(r,n,i,(function(t){if(t){var e=y(r),i=l(u+e);if(k()!==i){A=e,function(t){window.location.hash=t}(i);var o=D.lastIndexOf(y(V.location)),a=D.slice(0,o+1);a.push(e),D=a,T({action:n,location:r})}else T()}}))},replace:function(t,e){var n="REPLACE",r=g(t,void 0,void 0,V.location);E.confirmTransitionTo(r,n,i,(function(t){if(t){var e=y(r),i=l(u+e);k()!==i&&(A=e,N(i));var o=D.indexOf(y(V.location));-1!==o&&(D[o]=e),T({action:n,location:r})}}))},go:L,goBack:function(){L(-1)},goForward:function(){L(1)},block:function(t){void 0===t&&(t=!1);var e=E.setPrompt(t);return U||(F(1),U=!0),function(){return U&&(U=!1,F(-1)),e()}},listen:function(t){var e=E.appendListener(t);return F(1),function(){F(-1),e()}}};return V}function x(t,e,n){return Math.min(Math.max(t,e),n)}function P(t){void 0===t&&(t={});var e=t,n=e.getUserConfirmation,r=e.initialEntries,i=void 0===r?["/"]:r,o=e.initialIndex,s=void 0===o?0:o,u=e.keyLength,c=void 0===u?6:u,l=m();function f(t){a(w,t),w.length=w.entries.length,l.notifyListeners(w.location,w.action)}function h(){return Math.random().toString(36).substr(2,c)}var p=x(s,0,i.length-1),d=i.map((function(t){return g(t,void 0,"string"===typeof t?h():t.key||h())})),v=y;function b(t){var e=x(w.index+t,0,w.entries.length-1),r=w.entries[e];l.confirmTransitionTo(r,"POP",n,(function(t){t?f({action:"POP",location:r,index:e}):f()}))}var w={length:d.length,action:"POP",location:d[p],index:p,entries:d,createHref:v,push:function(t,e){var r="PUSH",i=g(t,e,h(),w.location);l.confirmTransitionTo(i,r,n,(function(t){if(t){var e=w.index+1,n=w.entries.slice(0);n.length>e?n.splice(e,n.length-e,i):n.push(i),f({action:r,location:i,index:e,entries:n})}}))},replace:function(t,e){var r="REPLACE",i=g(t,e,h(),w.location);l.confirmTransitionTo(i,r,n,(function(t){t&&(w.entries[w.index]=i,f({action:r,location:i}))}))},go:b,goBack:function(){b(-1)},goForward:function(){b(1)},canGo:function(t){var e=w.index+t;return e>=0&&e<w.entries.length},block:function(t){return void 0===t&&(t=!1),l.setPrompt(t)},listen:function(t){return l.appendListener(t)}};return w}var R=n(69),j=n(70),D=n.n(j);n(85);function L(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}n(108);var M=function(t){var e=Object(R.a)();return e.displayName=t,e}("Router-History"),F=function(t){var e=Object(R.a)();return e.displayName=t,e}("Router"),U=function(t){function e(e){var n;return(n=t.call(this,e)||this).state={location:e.history.location},n._isMounted=!1,n._pendingLocation=null,e.staticContext||(n.unlisten=e.history.listen((function(t){n._isMounted?n.setState({location:t}):n._pendingLocation=t}))),n}Object(r.a)(e,t),e.computeRootMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}};var n=e.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pe
2ndingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return o.a.createElement(F.Provider,{value:{history:this.props.history,location:this.state.location,match:e.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},o.a.createElement(M.Provider,{children:this.props.children||null,value:this.props.history}))},e}(o.a.Component);o.a.Component;o.a.Component;var V={},q=0;function B(t,e){void 0===e&&(e={}),("string"===typeof e||Array.isArray(e))&&(e={path:e});var n=e,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(e,n){if(!n&&""!==n)return null;if(e)return e;var r=function(t,e){var n=""+e.end+e.strict+e.sensitive,r=V[n]||(V[n]={});if(r[t])return r[t];var i=[],o={regexp:D()(t,i,e),keys:i};return q<1e4&&(r[t]=o,q++),o}(n,{end:o,strict:s,sensitive:c}),i=r.regexp,a=r.keys,u=i.exec(t);if(!u)return null;var l=u[0],f=u.slice(1),h=t===l;return o&&!h?null:{path:n,url:"/"===n&&""===l?"/":l,isExact:h,params:a.reduce((function(t,e,n){return t[e.name]=f[n],t}),{})}}),null)}o.a.Component;function z(t){return"/"===t.charAt(0)?t:"/"+t}function H(t,e){if(!t)return e;var n=z(t);return 0!==e.pathname.indexOf(n)?e:a({},e,{pathname:e.pathname.substr(n.length)})}function W(t){return"string"===typeof t?t:y(t)}function K(t){return function(){f(!1)}}function G(){}o.a.Component;o.a.Component;o.a.useContext;var Q=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).history=O(e.props),e}return Object(r.a)(e,t),e.prototype.render=function(){return o.a.createElement(U,{history:this.history,children:this.props.children})},e}(o.a.Component);o.a.Component;var Y=function(t,e){return"function"===typeof t?t(e):t},X=function(t,e){return"string"===typeof t?g(t,null,null,e):t},$=function(t){return t},J=o.a.forwardRef;"undefined"===typeof J&&(J=$);var Z=J((function(t,e){var n=t.innerRef,r=t.navigate,i=t.onClick,s=L(t,["innerRef","navigate","onClick"]),u=s.target,c=a({},s,{onClick:function(t){try{i&&i(t)}catch(e){throw t.preventDefault(),e}t.defaultPrevented||0!==t.button||u&&"_self"!==u||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t)||(t.preventDefault(),r())}});return c.ref=$!==J&&e||n,o.a.createElement("a",c)}));var tt=J((function(t,e){var n=t.component,r=void 0===n?Z:n,i=t.replace,s=t.to,u=t.innerRef,c=L(t,["component","replace","to","innerRef"]);return o.a.createElement(F.Consumer,null,(function(t){t||f(!1);var n=t.history,l=X(Y(s,t.location),t.location),h=l?n.createHref(l):"",p=a({},c,{href:h,navigate:function(){var e=Y(s,t.location);(i?n.replace:n.push)(e)}});return $!==J?p.ref=e||u:p.innerRef=u,o.a.createElement(r,p)}))})),et=function(t){return t},nt=o.a.forwardRef;"undefined"===typeof nt&&(nt=et);nt((function(t,e){var n=t["aria-current"],r=void 0===n?"page":n,i=t.activeClassName,s=void 0===i?"active":i,u=t.activeStyle,c=t.className,l=t.exact,h=t.isActive,p=t.location,d=t.sensitive,v=t.strict,y=t.style,g=t.to,m=t.innerRef,b=L(t,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return o.a.createElement(F.Consumer,null,(function(t){t||f(!1);var n=p||t.location,i=X(Y(g,n),n),w=i.pathname,_=w&&w.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),E=_?B(n.pathname,{path:_,exact:l,sensitive:d,strict:v}):null,T=!!(h?h(E,n):E),O=T?function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.filter((function(t){return t})).join(" ")}(c,s):c,S=T?a({},y,{},u):y,I=a({"aria-current":T&&r||null,className:O,style:S,to:i},b);return et!==nt?I.ref=e||m:I.innerRef=m,o.a.createElement(tt,I)}))}))},,,function(t,e,n){var r=n(20),i=n(22),o=n(74),a=n(26),s=n(24),u=function t(e,n,u){var c,l,f,h=e&t.F,p=e&t.G,d=e&t.S,v=e&t.P,y=e&t.B,g=e&t.W,m=p?i:i[n]||(i[n]={}),b=m.prototype,w=p?r:d?r[n]:(r[n]||{}).prototype;for(c in p&&(u=n),u)(l=!h&&w&&void 0!==w[c])&&s(m,c)||(f=l?w[c]:u[c],m[c]=p&&"function"!=typeof w[c]?u[c]:y&&l?o(f,r):g&&w[c]==f?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(f):v&&"function"==typeof f?o(Function.call,f):f,v&&((m.virtual||(m.virtual={}
2))[c]=f,e&t.R&&b&&!b[c]&&a(b,c,f)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e,n){var r=n(28);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},function(t,e,n){(function(t){function n(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===n(t)},e.isBoolean=function(t){return"boolean"===typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"===typeof t},e.isString=function(t){return"string"===typeof t},e.isSymbol=function(t){return"symbol"===typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===n(t)},e.isObject=function(t){return"object"===typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===n(t)},e.isError=function(t){return"[object Error]"===n(t)||t instanceof Error},e.isFunction=function(t){return"function"===typeof t},e.isPrimitive=function(t){return null===t||"boolean"===typeof t||"number"===typeof t||"string"===typeof t||"symbol"===typeof t||"undefined"===typeof t},e.isBuffer=t.isBuffer}).call(this,n(31).Buffer)},,,function(t,e,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(t,e){for(var n,s,u=a(t),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 f=0;f<s.length;f++)o.call(n,s[f])&&(u[s[f]]=n[s[f]])}}return u}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(77),i=n(60);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e){t.exports=!0},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){"use strict";(function(e){"undefined"===typeof e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,n,r,i){if("function"!==typeof t)throw new TypeError('"callback" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,n)}));case 3:return e.nextTick((function(){t.call(null,n,r)}));case 4:return e.nextTick((function(){t.call(null,n,r,i)}));default:for(o=new Array(s-1),a=0;a<o.length;)o[a++]=arguments[a];return e.nextTick((function(){t.apply(null,o)}))}}}:t.exports=e}).call(this,n(16))},function(t,e,n){"use strict";!function t(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}(),t.exports=n(111)},,,function(t,e,n){"use strict";function r(t){try{return d.insertRule(t,d.cssRules.length)}catch(t){console.warn("react-reveal - animation failed")}}function i(){l||(e.globalHide=l=!0,window.removeEventListener("scroll",i,!0),r("."+o+" { opacity: 0; }"),window.removeEventListener("orientationchange",i,!0),window.document.removeEventListener("visibilitychange",i))}Object.defineProperty(e,"__esModule",{value:!0}),e.insertRule=r,e.cascade=function(t,e,n,r,i){var o=Math.log(r),a=(Math.log(i)-o)/(n-e);return Math.exp(o+a*(t-e))},e.animation=function(t){if(!d)return"";var e="@keyframes "+(v+h)+"{"+t+"}",n=p[t];return n?""+v+n:(d.insertRule(e,d.cssRules.length),p[t]=h,""+v+h++)},e.hideAll=i,e.default=function(t){var n=t.ssrFadeout;e.fadeOutEnabled=n};var o=e.namespace="react-reveal",a=(e.defaults={duration:1e3,delay:0,count:1},e.ssr=!0),s=e.observerMode=!1,u=e.raf=function(t){return window.setTimeout(t,66)},c=e.disableSsr=function(){return e.ssr=a=!1},l=(e.fadeOutEnabled=!1,e.ssrFadeout=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e.fadeOutEnabled=t},e.globalHide=!1),f=(e.ie10=!1,e.collapseend=void 0),h=1,p={},d=!1,v=o+"-"+Math.floor(1e15*Math.random())+"-";if("undefined"!=typeof window&&"nodejs"!==window.name&&window.document&&"undefined"!=typeof navigator){e.observerMode=s="IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype&&/\{\s*\[native code\]\s*\}/.test(""+IntersectionObserver),e.raf=u=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||u,e.ssr=a=window.document.querySelectorAll("div[data-reactroot]").length>0,-1!==navigator.appVersion.indexOf("MSIE 10")&&(e.ie10=!0),a&&"performance"in window&&"timing"in window.performance&&"domContentLoadedEventEnd"in window.performance.timing&&window.performance.timing.domLoading&&Date.now()-window.performance.timing.domLoading<300&&(e.ssr=a=!1),a&&window.setTimeout(c,1500),s||(e.collapseend=f=document.createEvent("Event"),f.initEvent("collapseend",!0,!0));var y=document.createElement("style");document.head.appendChild(y),y.sheet&&y.sheet.cssRules&&y.sheet.insertRule&&(d=y.sheet,window.addEventListener("scroll",i,!0),window.addEventListener("orientationchange",i,!0),window.document.addEventListener("visibilitychange",i
2))}},function(t,e,n){var r=n(28);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(59)("keys"),i=n(48);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e,n){var r=n(22),i=n(20),o="__core-js_shared__",a=i[o]||(i[o]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(47)?"pure":"global",copyright:"\xa9 2020 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(56);t.exports=function(t){return Object(r(t))}},function(t,e){t.exports={}},function(t,e,n){var r=n(39),i=n(137),o=n(60),a=n(58)("IE_PROTO"),s=function(){},u=function(){var t,e=n(76)("iframe"),r=o.length;for(e.style.display="none",n(138).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),u=t.F;r--;)delete u.prototype[o[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[a]=t):n=u(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(27).f,i=n(24),o=n(30)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){e.f=n(30)},function(t,e,n){var r=n(20),i=n(22),o=n(47),a=n(66),s=n(27).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e,n){var r=n(31),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function a(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=a),o(i,a),a.from=function(t,e,n){if("number"===typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},a.alloc=function(t,e,n){if("number"!==typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"===typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},a.allocUnsafe=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return i(t)},a.allocUnsafeSlow=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},function(t,e,n){"use strict";(function(t){var r=n(3),i=n.n(r),o=n(14),a=n(17),s=n.n(a),u=1073741823,c="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof t?t:{};function l(t){var e=[];return{on:function(t){e.push(t)},off:function(t){e=e.filter((function(e){return e!==t}))},get:function(){return t},set:function(n,r){t=n,e.forEach((function(e){return e(t,r)}))}}}var f=i.a.createContext||function(t,e){var n,i,a="__create-react-context-"+function(){var t="__global_unique_id__";return c[t]=(c[t]||0)+1}()+"__",f=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).emitter=l(e.props.value),e}Object(o.a)(n,t);var r=n.prototype;return r.getChildContext=function(){var t;return(t={})[a]=this.emitter,t},r.componentWillReceiveProps=function(t){if(this.props.value!==t.value){var n,r=this.props.value,i=t.value;((o=r)===(a=i)?0!==o||1/o===1/a:o!==o&&a!==a)?n=0:(n="function"===typeof e?e(r,i):u,0!==(n|=0)&&this.emitter.set(t.value,n))}var o,a},r.render=function(){return this.props.children},n}(r.Component);f.childContextTypes=((n={})[a]=s.a.object.isRequired,n);var h=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).state={value:t.getValue()},t.onUpdate=function(e,n){0!==((0|t.observedBits)&n)&&t.setState({value:t.getValue()})},t}Object(o.a)(n,e);var r=n.prototype;return r.componentWillReceiveProps=function(t){var e=t.observedBits;this.observedBits=void 0===e||null===e?u:e},r.componentDidMount=function(){this.context[a]&&this.context[a].on(this.onUpdate);var t=this.props.observedBits;this.observedBits=void 0===t||null===t?u:t},r.componentWillUnmount=function(){this.context[a]&&this.context[a].off(this.onUpdate)},r.getValue=function(){return this.context[a]?this.context[a].get():t},r.render=function(){return(t=this.props.children,Array.isArray(t)?t[0]:t)(this.state.value);var t},n}(r.Component);return h.contextTypes=((i={})[a]=s.a.object,i),{Provider:f,Consumer:h}};e.a=f}).call(this,n(10))},function(t,e,n){var r=n(162);t.exports=p,t.exports.parse=o,t.exports.compile=function(t,e){return s(o(t,e),e)},t.exports.tokensToFunction=s,t.exports.tokensToRegExp=h;var i=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(t,e){for(var n,r=[],o=0,a=0,s="",l=e&&e.delimiter||"/";null!=(n=i.exec(t));){var f=n[0],h=n[1],p=n.index;if(s+=t.slice(a,p),a=p+f.length,h)s+=h[1];else{var d=t[a],v=n[2],y=n[3],g=n[4],m=n[5],b=n[6],w=n[7];s&&(r.push(s),s="");var _=null!=v&&null!=d&&d!==v,E="+"===b||"*"===b,T="?"===b||"*"===b,O=n[2]||l,S=g||m;r.push({name:y||o++,prefix:v||"",delimiter:O,optional:T,repeat:E,partial:_,asterisk:!!w,pattern:S?c(S):w?".*":"[^"+u(O)+"]+?"})}}return a<t.length&&(s+=t.substr(a)),s&&r.push(s),r}function a(t){return encodeURI(t).replace(/[\/?#]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}))}function s(t,e){for(var n=new Array(t.length),i=0;i<t.length;i++)"object"===typeof t[i]&&(n[i]=new RegExp("^(?:"+t[i].pattern+")$",f(e)));return function(e,i){for(var o="",s=e||{},u=(i||{}).pretty?a:encodeURIComponent,c=0;c<t.length;c++){var l=t[c];if("string"!==typeof l){var f,h=s[l.name];if(null==h){if(l.optional){l.partial&&(o+=l.prefix);continue}throw new TypeError('Expected "'+l.name+'" to be defined')}if(r(h)){if(!l.repeat)throw new TypeError('Expected "'+l.name+'" to not repeat, but received `'+JSON.stringify(h)+"`");if(0===h.length){if(l.optional)continue;throw new TypeError('Expected "'+l.name+'" to not be empty')}for(var p=0;p<h.length;p++){if(f=u(h[p]),!n[c].test(f))throw new TypeError('Expected all "'+l.name+'" to match "'+l.pattern+'", but received `'+JSON.stringify(f)+"`");o+=(0===p?l.prefix:l.delimiter)+f}}else{if(f=l.asterisk?encodeURI(h).replace(/[?#]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})):u(h),!n[c].test(f))throw new TypeError('Expected "'+l.name+'" to match "'+l.pattern+'", but received "'+f+'"');o+=l.prefix+f}}else o+=l}return o}}function u(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function c(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function l(t,e){return t.keys=e,t}function f(t){return t&&t.sensitive?"":"i"}function h(t,e,n){r(e)||(n=e||n,e=[]);for(var i=(n=n||{}).strict,o=!1!==n.end,a="",s=0;s<t.length;s++){var c=t[s];if("string"===typeof c)a+=u(c);else{var h=u(c.prefix),p="(?:"+c.pattern+")";e.push(c),c.repeat&&(p+="(?:"+h+p+")*"),a+=p=c.optional?c.partial?h+"("+p+")?":"(?:"+h+"("+p+"))?":h+"("+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,f(n)),e)}function p(t,e,n){return r(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?function(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return l(t,e)}(t,e):r(t)?function(t,e,n){for(var r=[],i=0;i<t.length;i++)r.push(p(t[i],e,n).source);return l(new RegExp("(?:"+r.join("|")+")",f(n)),e)}(t,e,n):function(t,e,n){return h(o(t,n),e,n)}(t,e,n)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o.a}));var r,i,o=n(4),a=(n(206),n(207),n(5)),s=n(1),u=(n(9),n(8)),c=n(6),l={Firestore:u.e,GeoPoint:u.j,Timestamp:u.c,Blob:u.d,Transaction:u.p,WriteBatch:u.a,DocumentReference:u.b,DocumentSnapshot:u.k,Query:u.n,QueryDocumentSnapshot:u.s,QuerySnapshot:u.r,CollectionReference:u.o,FieldPath:u.q,FieldValue:u.m,setLogLevel:u.g,CACHE_SIZE_UNLIMITED:u.i};(function(t,e){t.INTERNAL.registerComponent(new c.a("firestore",(function(t){return function(t,e){return new u.e(t,new u.h(t,e),new u.f)}(t.getProvider("app").getImmediate(),t.getProvider("auth-internal"))}),"PUBLIC").setServiceProps(Object.assign({},l)))})(r=o.a),r.registerVersion("@firebase/firestore","2.1.6"),(i=u.e).prototype.loadBundle=u.l,i.prototype.namedQuery=u.t;var f=n(0),h={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"},p=function(t){function e(n,r,i){var o=t.call(this,r)||this;return Object.setPrototypeOf(o,e.prototype),o.code=n,o.details=i,o}return Object(f.c)(e,t),e}(Error);var d=function(){function t(t,e){var n=this;this.auth=null,this.messaging=null,this.auth=t.getImmediate({optional:!0}),this.messaging=e.getImmediate({optional:!0}),this.auth||t.get().then((function(t){return n.auth=t}),(function(){})),this.messaging||e.get().then((function(t){return n.messaging=t}),(function(){}))}return t.prototype.getAuthToken=function(){return Object(f.b)(this,void 0,void 0,(function(){var t;return Object(f.d)(this,(function(e){switch(e.label){case 0:if(!this.auth)return[2,void 0];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.auth.getToken()];case 2:return(t=e.sent())?[2,t.accessToken]:[2,void 0];case 3:return e.sent(),[2,void 0];case 4:return[2]}}
2))}))},t.prototype.getInstanceIdToken=function(){return Object(f.b)(this,void 0,void 0,(function(){return Object(f.d)(this,(function(t){if(!this.messaging||!("Notification"in self)||"granted"!==Notification.permission)return[2,void 0];try{return[2,this.messaging.getToken()]}catch(r){return[2,void 0]}return[2]}))}))},t.prototype.getContext=function(){return Object(f.b)(this,void 0,void 0,(function(){var t,e;return Object(f.d)(this,(function(n){switch(n.label){case 0:return[4,this.getAuthToken()];case 1:return t=n.sent(),[4,this.getInstanceIdToken()];case 2:return e=n.sent(),[2,{authToken:t,instanceIdToken:e}]}}))}))},t}();function v(t,e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=e(t[r]));return n}var y=function(){function t(){}return t.prototype.encode=function(t){var e=this;if(null==t)return null;if(t instanceof Number&&(t=t.valueOf()),"number"===typeof t&&isFinite(t))return t;if(!0===t||!1===t)return t;if("[object String]"===Object.prototype.toString.call(t))return t;if(Array.isArray(t))return t.map((function(t){return e.encode(t)}));if("function"===typeof t||"object"===typeof t)return v(t,(function(t){return e.encode(t)}));throw new Error("Data cannot be encoded in JSON: "+t)},t.prototype.decode=function(t){var e=this;if(null==t)return t;if(t["@type"])switch(t["@type"]){case"type.googleapis.com/google.protobuf.Int64Value":case"type.googleapis.com/google.protobuf.UInt64Value":var n=Number(t.value);if(isNaN(n))throw new Error("Data cannot be decoded from JSON: "+t);return n;default:throw new Error("Data cannot be decoded from JSON: "+t)}return Array.isArray(t)?t.map((function(t){return e.decode(t)})):"function"===typeof t||"object"===typeof t?v(t,(function(t){return e.decode(t)})):t},t}();var g=function(){function t(t,e,n,i,o){var a=this;void 0===i&&(i="us-central1"),this.app_=t,this.fetchImpl=o,this.serializer=new y,this.emulatorOrigin=null,this.INTERNAL={delete:function(){return Promise.resolve(a.deleteService())}},this.contextProvider=new d(e,n),this.cancelAllRequests=new Promise((function(t){a.deleteService=function(){return t()}}));try{var s=new URL(i);this.customDomain=s.origin,this.region="us-central1"}catch(r){this.customDomain=null,this.region=i}}return Object.defineProperty(t.prototype,"app",{get:function(){return this.app_},enumerable:!1,configurable:!0}),t.prototype._url=function(t){var e=this.app_.options.projectId;return null!==this.emulatorOrigin?this.emulatorOrigin+"/"+e+"/"+this.region+"/"+t:null!==this.customDomain?this.customDomain+"/"+t:"https://"+this.region+"-"+e+".cloudfunctions.net/"+t},t.prototype.useEmulator=function(t,e){this.emulatorOrigin="http://"+t+":"+e},t.prototype.useFunctionsEmulator=function(t){this.emulatorOrigin=t},t.prototype.httpsCallable=function(t,e){var n=this;return function(r){return n.call(t,r,e||{})}},t.prototype.postJSON=function(t,e,n){return Object(f.b)(this,void 0,void 0,(function(){var r,i;return Object(f.d)(this,(function(o){switch(o.label){case 0:n["Content-Type"]="application/json",o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.fetchImpl(t,{method:"POST",body:JSON.stringify(e),headers:n})];case 2:return r=o.sent(),[3,4];case 3:return o.sent(),[2,{status:0,json:null}];case 4:i=null,o.label=5;case 5:return o.trys.push([5,7,,8]),[4,r.json()];case 6:return i=o.sent(),[3,8];case 7:return o.sent(),[3,8];case 8:return[2,{status:r.status,json:i}]}}))}))},t.prototype.call=function(t,e,n){return Object(f.b)(this,void 0,void 0,(function(){var i,o,a,s,u,c,l,d,v,y,g;return Object(f.d)(this,(function(f){switch(f.label){case 0:return i=this._url(t),e=this.serializer.encode(e),o={data:e},a={},[4,this.contextProvider.getContext()];case 1:return(s=f.sent()).authToken&&(a.Authorization="Bearer "+s.authToken),s.instanceIdToken&&(a["Firebase-Instance-ID-Token"]=s.instanceIdToken),u=n.timeout||7e4,c=function(t){var e,n=new Promise((function(n,r){e=setTimeout((function(){r(new p("deadline-exceeded","deadline-exceeded"))}),t)}));return{timer:e,promise:n}}(u),l=c.timer,d=c.promise,[4,Promise.race([m(l,this.postJSON(i,o,a)),d,m(l,this.cancelAllRequests)])];case 2:if(!(v=f.sent()))throw new p("cancelled","Firebase Functions instance was deleted.");
2if(y=function(t,e,n){var i=function(t){if(t>=200&&t<300)return"ok";switch(t){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"}(t),o=i,a=void 0;try{var s=e&&e.error;if(s){var u=s.status;if("string"===typeof u){if(!h[u])return new p("internal","internal");i=h[u],o=u}var c=s.message;"string"===typeof c&&(o=c),void 0!==(a=s.details)&&(a=n.decode(a))}}catch(r){}return"ok"===i?null:new p(i,o,a)}(v.status,v.json,this.serializer))throw y;if(!v.json)throw new p("internal","Response is not valid JSON object.");if("undefined"===typeof(g=v.json.data)&&(g=v.json.result),"undefined"===typeof g)throw new p("internal","Response is missing data field.");return[2,{data:this.serializer.decode(g)}]}}))}))},t}();function m(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n;return Object(f.d)(this,(function(r){switch(r.label){case 0:return[4,e];case 1:return n=r.sent(),clearTimeout(t),[2,n]}}))}))}!function(t,e){var n={Functions:g};t.INTERNAL.registerComponent(new c.a("functions",(function(t,n){var r=t.getProvider("app").getImmediate(),i=t.getProvider("auth-internal"),o=t.getProvider("messaging");return new g(r,i,o,n,e)}),"PUBLIC").setServiceProps(n).setMultipleInstances(!0))}(o.a,fetch.bind(self)),o.a.registerVersion("@firebase/functions","0.6.1");var b,w=n(21),_="0.4.19",E=1e4,T="w:0.4.19",O="FIS_v2",S=36e5,I=((b={})["missing-app-config-values"]='Missing App configuration value: "{$valueName}"',b["not-registered"]="Firebase Installation is not registered.",b["installation-not-found"]="Firebase Installation not found.",b["request-failed"]='{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',b["app-offline"]="Could not process request. Application offline.",b["delete-pending-registration"]="Can't delete installation while there is a pending registration request.",b),C=new s.b("installations","Installations",I);function k(t){return t instanceof s.c&&t.code.includes("request-failed")}function N(t){return"https://firebaseinstallations.googleapis.com/v1/projects/"+t.projectId+"/installations"}function A(t){return{token:t.token,requestStatus:2,expiresIn:(e=t.expiresIn,Number(e.replace("s","000"))),creationTime:Date.now()};var e}function x(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n,r;return Object(f.d)(this,(function(i){switch(i.label){case 0:return[4,e.json()];case 1:return n=i.sent(),r=n.error,[2,C.create("request-failed",{requestName:t,serverCode:r.code,serverMessage:r.message,serverStatus:r.status})]}}))}))}function P(t){var e=t.apiKey;return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}function R(t,e){var n=e.refreshToken,r=P(t);return r.append("Authorization",function(t){return"FIS_v2 "+t}(n)),r}function j(t){return Object(f.b)(this,void 0,void 0,(function(){var e;return Object(f.d)(this,(function(n){switch(n.label){case 0:return[4,t()];case 1:return(e=n.sent()).status>=500&&e.status<600?[2,t()]:[2,e]}}))}))}function D(t,e){var n=e.fid;return Object(f.b)(this,void 0,void 0,(function(){var e,r,i,o,a,s;return Object(f.d)(this,(function(u){switch(u.label){case 0:return e=N(t),r=P(t),i={fid:n,authVersion:O,appId:t.appId,sdkVersion:T},o={method:"POST",headers:r,body:JSON.stringify(i)},[4,j((function(){return fetch(e,o)}))];case 1:return(a=u.sent()).ok?[4,a.json()]:[3,3];case 2:return s=u.sent(),[2,{fid:s.fid||n,registrationStatus:2,refreshToken:s.refreshToken,authToken:A(s.authToken)}];case 3:return[4,x("Create Installation",a)];case 4:throw u.sent()}}))}))}function L(t){return new Promise((function(e){setTimeout(e,t)}))}var M=/^[cdef][\w-]{21}$/;function F(){try{var t=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(t),t[0]=112+t[0]%16;var e=function(t){return(e=t,btoa(String.fromCharCode.apply(String,Object(f.f)(e))).replace(/\+/g,"-").replace(/\//g,"_")).substr(0,22);var e}(t);return M.test(e)?e:""}catch(n){return""}}function U(t){return t.appName+"!"+t.appId}var V=new Map;function q(t,e){var n=U(t);B(n,e),function(t,e){var n=H();n&&n.postMessage({key:t,fid:e});W()}(n,e)}function B(t,e){var n,r,i=V.get(t);if(i)try{for(var o=Object(f.h)(i),a=o.next();!a.done;a=o.next()){(0,a.value)(e)}}catch(s){n={error:s}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}var z=null;function H(){return!z&&"BroadcastChannel"in self&&((z=new BroadcastChannel("[Firebase] FID Change")).onmessage=function(t){B(t.data.key,t.data.fid)}),z}function W(){0===V.size&&z&&(z.close(),z=null)}var K,G,Q="firebase-installations-store",Y=null;function X(){return Y||(Y=Object(w.openDb)("firebase-installations-database",1,(function(t){switch(t.oldVersion){case 0:t.createObjectStore(Q)}}))),Y}function $(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n,r,i,o,a;return Object(f.d)(this,(function(s){switch(s.label){case 0:return n=U(t),[4,X()];case 1:return r=s.sent(),i=r.transaction(Q,"readwrite"),[4,(o=i.objectStore(Q)).get(n)];case 2:return a=s.sent(),[4,o.put(e,n)];case 3:return s.sent(),[4,i.complete];case 4:return s.sent(),a&&a.fid===e.fid||q(t,e.fid),[2,e]}}))}))}function J(t){return Object(f.b)(this,void 0,void 0,(function(){var e,n,r;return Object(f.d)(this,(function(i){switch(i.label){case 0:return e=U(t),[4,X()];case 1:return n=i.sent(),[4,(r=n.transaction(Q,"readwrite")).objectStore(Q).delete(e)];case 2:return i.sent(),[4,r.complete];case 3:return i.sent(),[2]}}))}))}function Z(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n,r,i,o,a,s;return Object(f.d)(this,(function(u){switch(u.label){case 0:return n=U(t),[4,X()];case 1:return r=u.sent(),i=r.transaction(Q,"readwrite"),[4,(o=i.objectStore(Q)).get(n)];case 2:return a=u.sent(),void 0!==(s=e(a))?[3,4]:[4,o.delete(n)];case 3:return u.sent(),[3,6];case 4:return[4,o.put(s,n)];case 5:u.sent(),u.label=6;case 6:return[4,i.complete];case 7:return u.sent(),!s||a&&a.fid===s.fid||q(t,s.fid),[2,s]}}))}))}function tt(t){return Object(f.b)(this,void 0,void 0,(function(){var e,n,r;return Object(f.d)(this,(function(i){switch(i.label){case 0:return[4,Z(t,(function(n){var r=function(t){return rt(t||{fid:F(),registrationStatus:0})}(n),i=function(t,e){if(0===e.registrationStatus){if(!navigator.onLine)return{installationEntry:e,registrationPromise:Promise.reject(C.create("app-offline"))};var n={fid:e.fid,registrationStatus:1,registrationTime:Date.now()};return{installationEntry:n,registrationPromise:function(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n,r;return Object(f.d)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,7]),[4,D(t,e)];case 1:return n=i.sent(),[2,$(t,n)];case 2:return k(r=i.sent())&&409===r.customData.serverCode?[4,J(t)]:[3,4];case 3:return i.sent(),[3,6];case 4:return[4,$(t,{fid:e.fid,registrationStatus:0})];case 5:i.sent(),i.label=6;case 6:throw r;case 7:return[2]}}
2))}))}(t,n)}}return 1===e.registrationStatus?{installationEntry:e,registrationPromise:et(t)}:{installationEntry:e}}(t,r);return e=i.registrationPromise,i.installationEntry}))];case 1:return""!==(n=i.sent()).fid?[3,3]:(r={},[4,e]);case 2:return[2,(r.installationEntry=i.sent(),r)];case 3:return[2,{installationEntry:n,registrationPromise:e}]}}))}))}function et(t){return Object(f.b)(this,void 0,void 0,(function(){var e,n,r,i;return Object(f.d)(this,(function(o){switch(o.label){case 0:return[4,nt(t)];case 1:e=o.sent(),o.label=2;case 2:return 1!==e.registrationStatus?[3,5]:[4,L(100)];case 3:return o.sent(),[4,nt(t)];case 4:return e=o.sent(),[3,2];case 5:return 0!==e.registrationStatus?[3,7]:[4,tt(t)];case 6:return n=o.sent(),r=n.installationEntry,(i=n.registrationPromise)?[2,i]:[2,r];case 7:return[2,e]}}))}))}function nt(t){return Z(t,(function(t){if(!t)throw C.create("installation-not-found");return rt(t)}))}function rt(t){return 1===(e=t).registrationStatus&&e.registrationTime+E<Date.now()?{fid:t.fid,registrationStatus:0}:t;var e}function it(t,e){var n=t.appConfig,r=t.platformLoggerProvider;return Object(f.b)(this,void 0,void 0,(function(){var t,i,o,a,s,u,c;return Object(f.d)(this,(function(l){switch(l.label){case 0:return t=function(t,e){var n=e.fid;return N(t)+"/"+n+"/authTokens:generate"}(n,e),i=R(n,e),(o=r.getImmediate({optional:!0}))&&i.append("x-firebase-client",o.getPlatformInfoString()),a={installation:{sdkVersion:T}},s={method:"POST",headers:i,body:JSON.stringify(a)},[4,j((function(){return fetch(t,s)}))];case 1:return(u=l.sent()).ok?[4,u.json()]:[3,3];case 2:return c=l.sent(),[2,A(c)];case 3:return[4,x("Generate Auth Token",u)];case 4:throw l.sent()}}))}))}function ot(t,e){return void 0===e&&(e=!1),Object(f.b)(this,void 0,void 0,(function(){var n,r,i;return Object(f.d)(this,(function(o){switch(o.label){case 0:return[4,Z(t.appConfig,(function(r){if(!st(r))throw C.create("not-registered");var i=r.authToken;if(!e&&function(t){return 2===t.requestStatus&&!function(t){var e=Date.now();return e<t.creationTime||t.creationTime+t.expiresIn<e+S}(t)}(i))return r;if(1===i.requestStatus)return n=function(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n,r;return Object(f.d)(this,(function(i){switch(i.label){case 0:return[4,at(t.appConfig)];case 1:n=i.sent(),i.label=2;case 2:return 1!==n.authToken.requestStatus?[3,5]:[4,L(100)];case 3:return i.sent(),[4,at(t.appConfig)];case 4:return n=i.sent(),[3,2];case 5:return 0===(r=n.authToken).requestStatus?[2,ot(t,e)]:[2,r]}}))}))}(t,e),r;if(!navigator.onLine)throw C.create("app-offline");var o=function(t){var e={requestStatus:1,requestTime:Date.now()};return Object(f.a)(Object(f.a)({},t),{authToken:e})}(r);return n=function(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n,r,i;return Object(f.d)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,8]),[4,it(t,e)];case 1:return n=o.sent(),i=Object(f.a)(Object(f.a)({},e),{authToken:n}),[4,$(t.appConfig,i)];case 2:return o.sent(),[2,n];case 3:return!k(r=o.sent())||401!==r.customData.serverCode&&404!==r.customData.serverCode?[3,5]:[4,J(t.appConfig)];case 4:return o.sent(),[3,7];case 5:return i=Object(f.a)(Object(f.a)({},e),{authToken:{requestStatus:0}}),[4,$(t.appConfig,i)];case 6:o.sent(),o.label=7;case 7:throw r;case 8:return[2]}}
2))}))}(t,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 at(t){return Z(t,(function(t){if(!st(t))throw C.create("not-registered");var e,n=t.authToken;return 1===(e=n).requestStatus&&e.requestTime+E<Date.now()?Object(f.a)(Object(f.a)({},t),{authToken:{requestStatus:0}}):t}))}function st(t){return void 0!==t&&2===t.registrationStatus}function ut(t){return Object(f.b)(this,void 0,void 0,(function(){var e;return Object(f.d)(this,(function(n){switch(n.label){case 0:return[4,tt(t)];case 1:return(e=n.sent().registrationPromise)?[4,e]:[3,3];case 2:n.sent(),n.label=3;case 3:return[2]}}))}))}function ct(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n,r,i,o;return Object(f.d)(this,(function(a){switch(a.label){case 0:return n=function(t,e){var n=e.fid;return N(t)+"/"+n}(t,e),r=R(t,e),i={method:"DELETE",headers:r},[4,j((function(){return fetch(n,i)}))];case 1:return(o=a.sent()).ok?[3,3]:[4,x("Delete Installation",o)];case 2:throw a.sent();case 3:return[2]}}
2))}))}function lt(t,e){var n=t.appConfig;return function(t,e){H();var n=U(t),r=V.get(n);r||(r=new Set,V.set(n,r)),r.add(e)}(n,e),function(){!function(t,e){var n=U(t),r=V.get(n);r&&(r.delete(e),0===r.size&&V.delete(n),W())}(n,e)}}function ft(t){return C.create("missing-app-config-values",{valueName:t})}(K=o.a).INTERNAL.registerComponent(new c.a("installations",(function(t){var e=t.getProvider("app").getImmediate(),n={appConfig:function(t){var e,n;if(!t||!t.options)throw ft("App Configuration");if(!t.name)throw ft("App Name");try{for(var r=Object(f.h)(["projectId","apiKey","appId"]),i=r.next();!i.done;i=r.next()){var o=i.value;if(!t.options[o])throw ft(o)}}catch(a){e={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return{appName:t.name,projectId:t.options.projectId,apiKey:t.options.apiKey,appId:t.options.appId}}(e),platformLoggerProvider:t.getProvider("platform-logger")};return{app:e,getId:function(){return function(t){return Object(f.b)(this,void 0,void 0,(function(){var e,n,r;return Object(f.d)(this,(function(i){switch(i.label){case 0:return[4,tt(t.appConfig)];case 1:return e=i.sent(),n=e.installationEntry,(r=e.registrationPromise)?r.catch(console.error):ot(t).catch(console.error),[2,n.fid]}}))}))}(n)},getToken:function(t){return function(t,e){return void 0===e&&(e=!1),Object(f.b)(this,void 0,void 0,(function(){return Object(f.d)(this,(function(n){switch(n.label){case 0:return[4,ut(t.appConfig)];case 1:return n.sent(),[4,ot(t,e)];case 2:return[2,n.sent().token]}}))}))}(n,t)},delete:function(){return function(t){return Object(f.b)(this,void 0,void 0,(function(){var e,n;return Object(f.d)(this,(function(r){switch(r.label){case 0:return[4,Z(e=t.appConfig,(function(t){if(!t||0!==t.registrationStatus)return t}))];case 1:if(!(n=r.sent()))return[3,6];if(1!==n.registrationStatus)return[3,2];throw C.create("delete-pending-registration");case 2:if(2!==n.registrationStatus)return[3,6];if(navigator.onLine)return[3,3];throw C.create("app-offline");case 3:return[4,ct(e,n)];case 4:return r.sent(),[4,J(e)];case 5:r.sent(),r.label=6;case 6:return[2]}}
2))}))}(n)},onIdChange:function(t){return lt(n,t)}}}),"PUBLIC")),K.registerVersion("@firebase/installations",_);var ht,pt=((G={})["missing-app-config-values"]='Missing App configuration value: "{$valueName}"',G["only-available-in-window"]="This method is available in a Window context.",G["only-available-in-sw"]="This method is available in a service worker context.",G["permission-default"]="The notification permission was not granted and dismissed instead.",G["permission-blocked"]="The notification permission was not granted and blocked instead.",G["unsupported-browser"]="This browser doesn't support the API's required to use the firebase SDK.",G["failed-service-worker-registration"]="We are unable to register the default service worker. {$browserErrorMessage}",G["token-subscribe-failed"]="A problem occurred while subscribing the user to FCM: {$errorInfo}",G["token-subscribe-no-token"]="FCM returned no token when subscribing the user to push.",G["token-unsubscribe-failed"]="A problem occurred while unsubscribing the user from FCM: {$errorInfo}",G["token-update-failed"]="A problem occurred while updating the user from FCM: {$errorInfo}",G["token-update-no-token"]="FCM returned no token when updating the user to push.",G["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.",G["invalid-sw-registration"]="The input to useServiceWorker() must be a ServiceWorkerRegistration.",G["invalid-bg-handler"]="The input to setBackgroundMessageHandler() must be a function.",G["invalid-vapid-key"]="The public VAPID key must be a string.",G["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.",G),dt=new s.b("messaging","Messaging",pt),vt="BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4",yt="google.c.a.c_id";function gt(t){var e=new Uint8Array(t);return btoa(String.fromCharCode.apply(String,Object(f.f)(e))).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function mt(t){for(var e=(t+"=".repeat((4-t.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=atob(e),r=new Uint8Array(n.length),i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r}!function(t){t.PUSH_RECEIVED="push-received",t.NOTIFICATION_CLICKED="notification-clicked"}(ht||(ht={}));var bt="fcm_token_details_db",wt="fcm_token_object_Store";function _t(t){return Object(f.b)(this,void 0,void 0,(function(){var e,n,r=this;return Object(f.d)(this,(function(i){switch(i.label){case 0:return"databases"in indexedDB?[4,indexedDB.databases()]:[3,2];case 1:if(e=i.sent(),!e.map((function(t){return t.name})).includes(bt))return[2,null];i.label=2;case 2:return n=null,[4,Object(w.openDb)(bt,5,(function(e){return Object(f.b)(r,void 0,void 0,(function(){var r,i,o,a;return Object(f.d)(this,(function(s){switch(s.label){case 0:return e.oldVersion<2?[2]:e.objectStoreNames.contains(wt)?[4,(r=e.transaction.objectStore(wt)).index("fcmSenderId").get(t)]:[2];case 1:return i=s.sent(),[4,r.clear()];case 2:if(s.sent(),!i)return[2];if(2===e.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:gt(o.vapidKey)}}}else(3===e.oldVersion||4===e.oldVersion)&&(n={token:(o=i).fcmToken,createTime:o.createTime,subscriptionOptions:{auth:gt(o.auth),p256dh:gt(o.p256dh),endpoint:o.endpoint,swScope:o.swScope,vapidKey:gt(o.vapidKey)}});return[2]}}))}))}))];case 3:return i.sent().close(),[4,Object(w.deleteDb)(bt)];case 4:return i.sent(),[4,Object(w.deleteDb)("fcm_vapid_details_db")];case 5:return i.sent(),[4,Object(w.deleteDb)("undefined")];case 6:return i.sent(),[2,Et(n)?n:null]}}))}))}function Et(t){if(!t||!t.subscriptionOptions)return!1;var e=t.subscriptionOptions;return"number"===typeof t.createTime&&t.createTime>0&&"string"===typeof t.token&&t.token.length>0&&"string"===typeof e.auth&&e.auth.length>0&&"string"===typeof e.p256dh&&e.p256dh.length>0&&"string"===typeof e.endpoint&&e.endpoint.length>0&&"string"===typeof e.swScope&&e.swScope.length>0&&"string"===typeof e.vapidKey&&e.vapidKey.length>0}var Tt="firebase-messaging-store",Ot=null;function St(){return Ot||(Ot=Object(w.openDb)("firebase-messaging-database",1,(function(t){switch(t.oldVersion){case 0:t.createObjectStore(Tt)}}))),Ot}function It(t){return Object(f.b)(this,void 0,void 0,(function(){var e,n,r;return Object(f.d)(this,(function(i){switch(i.label){case 0:return e=Nt(t),[4,St()];case 1:return[4,i.sent().transaction(Tt).objectStore(Tt).get(e)];case 2:return(n=i.sent())?[2,n]:[3,3];case 3:return[4,_t(t.appConfig.senderId)];
2case 4:return(r=i.sent())?[4,Ct(t,r)]:[3,6];case 5:return i.sent(),[2,r];case 6:return[2]}}))}))}function Ct(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n,r,i;return Object(f.d)(this,(function(o){switch(o.label){case 0:return n=Nt(t),[4,St()];case 1:return r=o.sent(),[4,(i=r.transaction(Tt,"readwrite")).objectStore(Tt).put(e,n)];case 2:return o.sent(),[4,i.complete];case 3:return o.sent(),[2,e]}}))}))}function kt(t){return Object(f.b)(this,void 0,void 0,(function(){var e,n,r;return Object(f.d)(this,(function(i){switch(i.label){case 0:return e=Nt(t),[4,St()];case 1:return n=i.sent(),[4,(r=n.transaction(Tt,"readwrite")).objectStore(Tt).delete(e)];case 2:return i.sent(),[4,r.complete];case 3:return i.sent(),[2]}}))}))}function Nt(t){return t.appConfig.appId}function At(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n,r,i,o,a,s;return Object(f.d)(this,(function(u){switch(u.label){case 0:return[4,jt(t)];case 1:n=u.sent(),r=Dt(e),i={method:"POST",headers:n,body:JSON.stringify(r)},u.label=2;case 2:return u.trys.push([2,5,,6]),[4,fetch(Rt(t.appConfig),i)];case 3:return[4,u.sent().json()];case 4:return o=u.sent(),[3,6];case 5:throw a=u.sent(),dt.create("token-subscribe-failed",{errorInfo:a});case 6:if(o.error)throw s=o.error.message,dt.create("token-subscribe-failed",{errorInfo:s});if(!o.token)throw dt.create("token-subscribe-no-token");return[2,o.token]}}))}))}function xt(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n,r,i,o,a,s;return Object(f.d)(this,(function(u){switch(u.label){case 0:return[4,jt(t)];case 1:n=u.sent(),r=Dt(e.subscriptionOptions),i={method:"PATCH",headers:n,body:JSON.stringify(r)},u.label=2;case 2:return u.trys.push([2,5,,6]),[4,fetch(Rt(t.appConfig)+"/"+e.token,i)];case 3:return[4,u.sent().json()];case 4:return o=u.sent(),[3,6];case 5:throw a=u.sent(),dt.create("token-update-failed",{errorInfo:a});case 6:if(o.error)throw s=o.error.message,dt.create("token-update-failed",{errorInfo:s});if(!o.token)throw dt.create("token-update-no-token");return[2,o.token]}}))}))}function Pt(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n,r,i,o,a;return Object(f.d)(this,(function(s){switch(s.label){case 0:return[4,jt(t)];case 1:n=s.sent(),r={method:"DELETE",headers:n},s.label=2;case 2:return s.trys.push([2,5,,6]),[4,fetch(Rt(t.appConfig)+"/"+e,r)];case 3:return[4,s.sent().json()];case 4:if((i=s.sent()).error)throw o=i.error.message,dt.create("token-unsubscribe-failed",{errorInfo:o});return[3,6];case 5:throw a=s.sent(),dt.create("token-unsubscribe-failed",{errorInfo:a});case 6:return[2]}}
2))}))}function Rt(t){return"https://fcmregistrations.googleapis.com/v1/projects/"+t.projectId+"/registrations"}function jt(t){var e=t.appConfig,n=t.installations;return Object(f.b)(this,void 0,void 0,(function(){var t;return Object(f.d)(this,(function(r){switch(r.label){case 0:return[4,n.getToken()];case 1:return t=r.sent(),[2,new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e.apiKey,"x-goog-firebase-installations-auth":"FIS "+t})]}}))}))}function Dt(t){var e=t.p256dh,n=t.auth,r=t.endpoint,i=t.vapidKey,o={web:{endpoint:r,auth:n,p256dh:e}};return i!==vt&&(o.web.applicationPubKey=i),o}function Lt(t,e,n){return Object(f.b)(this,void 0,void 0,(function(){var r,i,o,a;return Object(f.d)(this,(function(s){switch(s.label){case 0:if("granted"!==Notification.permission)throw dt.create("permission-blocked");return[4,Vt(e,n)];case 1:return r=s.sent(),[4,It(t)];case 2:return i=s.sent(),o={vapidKey:n,swScope:e.scope,endpoint:r.endpoint,auth:gt(r.getKey("auth")),p256dh:gt(r.getKey("p256dh"))},i?[3,3]:[2,Ut(t,o)];case 3:if(function(t,e){var n=e.vapidKey===t.vapidKey,r=e.endpoint===t.endpoint,i=e.auth===t.auth,o=e.p256dh===t.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,Pt(t,i.token)];case 5:return s.sent(),[3,7];case 6:return a=s.sent(),console.warn(a),[3,7];case 7:return[2,Ut(t,o)];case 8:return Date.now()>=i.createTime+6048e5?[2,Ft({token:i.token,createTime:Date.now(),subscriptionOptions:o},t,e)]:[2,i.token];case 9:return[2]}}
2))}))}function Mt(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n,r;return Object(f.d)(this,(function(i){switch(i.label){case 0:return[4,It(t)];case 1:return(n=i.sent())?[4,Pt(t,n.token)]:[3,4];case 2:return i.sent(),[4,kt(t)];case 3:i.sent(),i.label=4;case 4:return[4,e.pushManager.getSubscription()];case 5:return(r=i.sent())?[2,r.unsubscribe()]:[2,!0]}}))}))}function Ft(t,e,n){return Object(f.b)(this,void 0,void 0,(function(){var r,i,o;return Object(f.d)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,5]),[4,xt(e,t)];case 1:return r=a.sent(),i=Object(f.a)(Object(f.a)({},t),{token:r,createTime:Date.now()}),[4,Ct(e,i)];case 2:return a.sent(),[2,r];case 3:return o=a.sent(),[4,Mt(e,n)];case 4:throw a.sent(),o;case 5:return[2]}}))}))}function Ut(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n,r;return Object(f.d)(this,(function(i){switch(i.label){case 0:return[4,At(t,e)];case 1:return n=i.sent(),r={token:n,createTime:Date.now(),subscriptionOptions:e},[4,Ct(t,r)];case 2:return i.sent(),[2,r.token]}}))}))}function Vt(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n;return Object(f.d)(this,(function(r){switch(r.label){case 0:return[4,t.pushManager.getSubscription()];case 1:return(n=r.sent())?[2,n]:[2,t.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:mt(e)})]}}))}))}function qt(t){return"object"===typeof t&&!!t&&yt in t}function Bt(t){return new Promise((function(e){setTimeout(e,t)}))}var zt=function(){function t(t){var e=this;this.firebaseDependencies=t,this.isOnBackgroundMessageUsed=null,this.vapidKey=null,this.bgMessageHandler=null,self.addEventListener("push",(function(t){t.waitUntil(e.onPush(t))})),self.addEventListener("pushsubscriptionchange",(function(t){t.waitUntil(e.onSubChange(t))})),self.addEventListener("notificationclick",(function(t){t.waitUntil(e.onNotificationClick(t))}))}return Object.defineProperty(t.prototype,"app",{get:function(){return this.firebaseDependencies.app},enumerable:!1,configurable:!0}),t.prototype.setBackgroundMessageHandler=function(t){if(this.isOnBackgroundMessageUsed=!1,!t||"function"!==typeof t)throw dt.create("invalid-bg-handler");this.bgMessageHandler=t},t.prototype.onBackgroundMessage=function(t){var e=this;return this.isOnBackgroundMessageUsed=!0,this.bgMessageHandler=t,function(){e.bgMessageHandler=null}},t.prototype.getToken=function(){var t,e;return Object(f.b)(this,void 0,void 0,(function(){var n;return Object(f.d)(this,(function(r){switch(r.label){case 0:return this.vapidKey?[3,2]:[4,It(this.firebaseDependencies)];case 1:n=r.sent(),this.vapidKey=null!==(e=null===(t=null===n||void 0===n?void 0:n.subscriptionOptions)||void 0===t?void 0:t.vapidKey)&&void 0!==e?e:vt,r.label=2;case 2:return[2,Lt(this.firebaseDependencies,self.registration,this.vapidKey)]}}))}))},t.prototype.deleteToken=function(){return Mt(this.firebaseDependencies,self.registration)},t.prototype.requestPermission=function(){throw dt.create("only-available-in-window")},t.prototype.usePublicVapidKey=function(t){if(null!==this.vapidKey)throw dt.create("use-vapid-key-after-get-token");if("string"!==typeof t||0===t.length)throw dt.create("invalid-vapid-key");this.vapidKey=t},t.prototype.useServiceWorker=function(){throw dt.create("only-available-in-window")},t.prototype.onMessage=function(){throw dt.create("only-available-in-window")},t.prototype.onTokenRefresh=function(){throw dt.create("only-available-in-window")},t.prototype.onPush=function(t){return Object(f.b)(this,void 0,void 0,(function(){var e,n,r,i;return Object(f.d)(this,(function(o){switch(o.label){case 0:return(e=function(t){var e=t.data;if(!e)return null;try{return e.json()}catch(n){return null}}(t))?[4,Gt()]:(console.debug("FirebaseMessaging: failed to get parsed MessagePayload from the PushEvent. Skip handling the push."),[2]);case 1:return function(t){return t.some((function(t){return"visible"===t.visibilityState&&!t.url.startsWith("chrome-extension://")}))}(n=o.sent())?[2,Kt(n,e)]:(r=!1,e.notification?[4,Qt(Ht(e))]:[3,3]);case 2:o.sent(),r=!0,o.label=3;
2case 3:return!0===r&&!1===this.isOnBackgroundMessageUsed?[2]:(this.bgMessageHandler&&(i=function(t){var e={from:t.from,collapseKey:t.collapse_key};return function(t,e){if(e.notification){t.notification={};var n=e.notification.title;n&&(t.notification.title=n);var r=e.notification.body;r&&(t.notification.body=r);var i=e.notification.image;i&&(t.notification.image=i)}}(e,t),function(t,e){e.data&&(t.data=e.data)}(e,t),function(t,e){if(e.fcmOptions){t.fcmOptions={};var n=e.fcmOptions.link;n&&(t.fcmOptions.link=n);var r=e.fcmOptions.analytics_label;r&&(t.fcmOptions.analyticsLabel=r)}}(e,t),e}(e),"function"===typeof this.bgMessageHandler?this.bgMessageHandler(i):this.bgMessageHandler.next(i)),[4,Bt(1e3)]);case 4:return o.sent(),[2]}}))}))},t.prototype.onSubChange=function(t){var e,n;return Object(f.b)(this,void 0,void 0,(function(){var r;return Object(f.d)(this,(function(i){switch(i.label){case 0:return t.newSubscription?[3,2]:[4,Mt(this.firebaseDependencies,self.registration)];case 1:return i.sent(),[2];case 2:return[4,It(this.firebaseDependencies)];case 3:return r=i.sent(),[4,Mt(this.firebaseDependencies,self.registration)];case 4:return i.sent(),[4,Lt(this.firebaseDependencies,self.registration,null!==(n=null===(e=null===r||void 0===r?void 0:r.subscriptionOptions)||void 0===e?void 0:e.vapidKey)&&void 0!==n?n:vt)];case 5:return i.sent(),[2]}}))}))},t.prototype.onNotificationClick=function(t){var e,n;return Object(f.b)(this,void 0,void 0,(function(){var r,i,o,a,s;return Object(f.d)(this,(function(u){switch(u.label){case 0:return(r=null===(n=null===(e=t.notification)||void 0===e?void 0:e.data)||void 0===n?void 0:n.FCM_MSG)?t.action?[2]:(t.stopImmediatePropagation(),t.notification.close(),(i=function(t){var e,n,r,i=null!==(n=null===(e=t.fcmOptions)||void 0===e?void 0:e.link)&&void 0!==n?n:null===(r=t.notification)||void 0===r?void 0:r.click_action;if(i)return i;return qt(t.data)?self.location.origin:null}(r))?(o=new URL(i,self.location.href),a=new URL(self.location.origin),o.host!==a.host?[2]:[4,Wt(o)]):[2]):[2];case 1:return(s=u.sent())?[3,4]:[4,self.clients.openWindow(i)];case 2:return s=u.sent(),[4,Bt(3e3)];case 3:return u.sent(),[3,6];case 4:return[4,s.focus()];case 5:s=u.sent(),u.label=6;case 6:return s?(r.messageType=ht.NOTIFICATION_CLICKED,r.isFirebaseMessaging=!0,[2,s.postMessage(r)]):[2]}}))}))},t}();function Ht(t){var e,n=Object(f.a)({},t.notification);return n.data=((e={}).FCM_MSG=t,e),n}function Wt(t){return Object(f.b)(this,void 0,void 0,(function(){var e,n,r,i,o,a,s;return Object(f.d)(this,(function(u){switch(u.label){case 0:return[4,Gt()];case 1:e=u.sent();try{for(n=Object(f.h)(e),r=n.next();!r.done;r=n.next())if(i=r.value,o=new URL(i.url,self.location.href),t.host===o.host)return[2,i]}catch(c){a={error:c}}finally{try{r&&!r.done&&(s=n.return)&&s.call(n)}finally{if(a)throw a.error}}return[2,null]}}))}))}function Kt(t,e){var n,r;e.isFirebaseMessaging=!0,e.messageType=ht.PUSH_RECEIVED;try{for(var i=Object(f.h)(t),o=i.next();!o.done;o=i.next()){o.value.postMessage(e)}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}function Gt(){return self.clients.matchAll({type:"window",includeUncontrolled:!0})}function Qt(t){var e,n=t.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!==(e=t.title)&&void 0!==e?e:"",t)}var Yt=function(){function t(t){var e=this;this.firebaseDependencies=t,this.vapidKey=null,this.onMessageCallback=null,navigator.serviceWorker.addEventListener("message",(function(t){return e.messageEventListener(t)}))}return Object.defineProperty(t.prototype,"app",{get:function(){return this.firebaseDependencies.app},enumerable:!1,configurable:!0}),t.prototype.messageEventListener=function(t){return Object(f.b)(this,void 0,void 0,(function(){var e,n;return Object(f.d)(this,(function(r){switch(r.label){case 0:return(e=t.data).isFirebaseMessaging?(this.onMessageCallback&&e.messageType===ht.PUSH_RECEIVED&&("function"===typeof this.onMessageCallback?this.onMessageCallback(function(t){return delete t.messageType,delete t.isFirebaseMessaging,t}(Object.assign({},e))):this.onMessageCallback.next(Object.assign({},e))),qt(n=e.data)&&"1"===n["google.c.a.e"]?[4,this.logEvent(e.messageType,n)]:[3,2]):[2];case 1:r.sent(),r.label=2;case 2:return[2]}}
2))}))},t.prototype.getVapidKey=function(){return this.vapidKey},t.prototype.getSwReg=function(){return this.swRegistration},t.prototype.getToken=function(t){return Object(f.b)(this,void 0,void 0,(function(){return Object(f.d)(this,(function(e){switch(e.label){case 0:return"default"!==Notification.permission?[3,2]:[4,Notification.requestPermission()];case 1:e.sent(),e.label=2;case 2:if("granted"!==Notification.permission)throw dt.create("permission-blocked");return[4,this.updateVapidKey(null===t||void 0===t?void 0:t.vapidKey)];case 3:return e.sent(),[4,this.updateSwReg(null===t||void 0===t?void 0:t.serviceWorkerRegistration)];case 4:return e.sent(),[2,Lt(this.firebaseDependencies,this.swRegistration,this.vapidKey)]}}))}))},t.prototype.updateVapidKey=function(t){return Object(f.b)(this,void 0,void 0,(function(){return Object(f.d)(this,(function(e){return t?this.vapidKey=t:this.vapidKey||(this.vapidKey=vt),[2]}))}))},t.prototype.updateSwReg=function(t){return Object(f.b)(this,void 0,void 0,(function(){return Object(f.d)(this,(function(e){switch(e.label){case 0:return t||this.swRegistration?[3,2]:[4,this.registerDefaultSw()];case 1:e.sent(),e.label=2;case 2:if(!t&&this.swRegistration)return[2];if(!(t instanceof ServiceWorkerRegistration))throw dt.create("invalid-sw-registration");return this.swRegistration=t,[2]}}))}))},t.prototype.registerDefaultSw=function(){return Object(f.b)(this,void 0,void 0,(function(){var t,e;return Object(f.d)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),t=this,[4,navigator.serviceWorker.register("/firebase-messaging-sw.js",{scope:"/firebase-cloud-messaging-push-scope"})];case 1:return t.swRegistration=n.sent(),this.swRegistration.update().catch((function(){})),[3,3];case 2:throw e=n.sent(),dt.create("failed-service-worker-registration",{browserErrorMessage:e.message});case 3:return[2]}}
2))}))},t.prototype.deleteToken=function(){return Object(f.b)(this,void 0,void 0,(function(){return Object(f.d)(this,(function(t){switch(t.label){case 0:return this.swRegistration?[3,2]:[4,this.registerDefaultSw()];case 1:t.sent(),t.label=2;case 2:return[2,Mt(this.firebaseDependencies,this.swRegistration)]}}))}))},t.prototype.requestPermission=function(){return Object(f.b)(this,void 0,void 0,(function(){var t;return Object(f.d)(this,(function(e){switch(e.label){case 0:return"granted"===Notification.permission?[2]:[4,Notification.requestPermission()];case 1:if("granted"===(t=e.sent()))return[2];throw"denied"===t?dt.create("permission-blocked"):dt.create("permission-default")}}))}))},t.prototype.usePublicVapidKey=function(t){if(null!==this.vapidKey)throw dt.create("use-vapid-key-after-get-token");if("string"!==typeof t||0===t.length)throw dt.create("invalid-vapid-key");this.vapidKey=t},t.prototype.useServiceWorker=function(t){if(!(t instanceof ServiceWorkerRegistration))throw dt.create("invalid-sw-registration");if(this.swRegistration)throw dt.create("use-sw-after-get-token");this.swRegistration=t},t.prototype.onMessage=function(t){var e=this;return this.onMessageCallback=t,function(){e.onMessageCallback=null}},t.prototype.setBackgroundMessageHandler=function(){throw dt.create("only-available-in-sw")},t.prototype.onBackgroundMessage=function(){throw dt.create("only-available-in-sw")},t.prototype.onTokenRefresh=function(){return function(){}},t.prototype.logEvent=function(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n;return Object(f.d)(this,(function(r){switch(r.label){case 0:return n=function(t){switch(t){case ht.NOTIFICATION_CLICKED:return"notification_open";case ht.PUSH_RECEIVED:return"notification_foreground";default:throw new Error}}(t),[4,this.firebaseDependencies.analyticsProvider.get()];case 1:return r.sent().logEvent(n,{message_id:e["google.c.a.c_id"],message_name:e["google.c.a.c_l"],message_time:e["google.c.a.ts"],message_device_time:Math.floor(Date.now()/1e3)}),[2]}}))}))},t}();function Xt(t){return dt.create("missing-app-config-values",{valueName:t})}var $t={isSupported:Jt};function Jt(){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")}o.a.INTERNAL.registerComponent(new c.a("messaging",(function(t){var e=t.getProvider("app").getImmediate(),n={app:e,appConfig:function(t){var e,n;if(!t||!t.options)throw Xt("App Configuration Object");if(!t.name)throw Xt("App Name");var r=t.options;try{for(var i=Object(f.h)(["projectId","apiKey","appId","messagingSenderId"]),o=i.next();!o.done;o=i.next()){var a=o.value;if(!r[a])throw Xt(a)}}catch(s){e={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return{appName:t.name,projectId:r.projectId,apiKey:r.apiKey,appId:r.appId,senderId:r.messagingSenderId}}(e),installations:t.getProvider("installations").getImmediate(),analyticsProvider:t.getProvider("analytics-internal")};if(!Jt())throw dt.create("unsupported-browser");return self&&"ServiceWorkerGlobalScope"in self?new zt(n):new Yt(n)}),"PUBLIC").setServiceProps($t));n(107);var Zt,te,ee,ne="0.4.5",re=ne,ie="FB-PERF-TRACE-MEASURE",oe="_wt_",ae="_fcp",se="_fid",ue="@firebase/performance/config",ce="@firebase/performance/configexpire",le="Performance",fe=((Zt={})["trace started"]="Trace {$traceName} was started before.",Zt["trace stopped"]="Trace {$traceName} is not running.",Zt["nonpositive trace startTime"]="Trace {$traceName} startTime should be positive.",Zt["nonpositive trace duration"]="Trace {$traceName} duration should be positive.",Zt["no window"]="Window is not available.",Zt["no app id"]="App id is not available.",Zt["no project id"]="Project id is not available.",Zt["no api key"]="Api key is not available.",Zt["invali
2d cc log"]="Attempted to queue invalid cc event",Zt["FB not default"]="Performance can only start when Firebase app instance is the default one.",Zt["RC response not ok"]="RC response is not ok",Zt["invalid attribute name"]="Attribute name {$attributeName} is invalid.",Zt["invalid attribute value"]="Attribute value {$attributeValue} is invalid.",Zt["invalid custom metric name"]="Custom metric name {$customMetricName} is invalid",Zt["invalid String merger input"]="Input for String merger is invalid, contact support team to resolve.",Zt),he=new s.b("performance",le,fe),pe=new a.b(le);pe.logLevel=a.a.INFO;var de,ve=function(){function t(t){if(this.window=t,!t)throw he.create("no window");this.performance=t.performance,this.PerformanceObserver=t.PerformanceObserver,this.windowLocation=t.location,this.navigator=t.navigator,this.document=t.document,this.navigator&&this.navigator.cookieEnabled&&(this.localStorage=t.localStorage),t.perfMetrics&&t.perfMetrics.onFirstInputDelay&&(this.onFirstInputDelay=t.perfMetrics.onFirstInputDelay)}return t.prototype.getUrl=function(){return this.windowLocation.href.split("?")[0]},t.prototype.mark=function(t){this.performance&&this.performance.mark&&this.performance.mark(t)},t.prototype.measure=function(t,e,n){this.performance&&this.performance.measure&&this.performance.measure(t,e,n)},t.prototype.getEntriesByType=function(t){return this.performance&&this.performance.getEntriesByType?this.performance.getEntriesByType(t):[]},t.prototype.getEntriesByName=function(t){return this.performance&&this.performance.getEntriesByName?this.performance.getEntriesByName(t):[]},t.prototype.getTimeOrigin=function(){return this.performance&&(this.performance.timeOrigin||this.performance.timing.navigationStart)},t.prototype.requiredApisAvailable=function(){return fetch&&Promise&&this.navigator&&this.navigator.cookieEnabled?!!Object(s.w)()||(pe.info("IndexedDB is not supported by current browswer"),!1):(pe.info("Firebase Performance cannot start if browser does not support fetch and Promise or cookie is disabled."),!1)},t.prototype.setupObserver=function(t,e){this.PerformanceObserver&&new this.PerformanceObserver((function(t){for(var n=0,r=t.getEntries();n<r.length;n++){var i=r[n];e(i)}})).observe({entryTypes:[t]})},t.getInstance=function(){return void 0===te&&(te=new t(ee)),te},t}();function ye(t,e){var n=t.length-e.length;if(n<0||n>1)throw he.create("invalid String merger input");for(var r=[],i=0;i<t.length;i++)r.push(t.charAt(i)),e.length>i&&r.push(e.charAt(i));return r.join("")}var ge,me,be=function(){function t(){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=ye("hts/frbslgigp.ogepscmv/ieo/eaylg","tp:/ieaeogn-agolai.o/1frlglgc/o"),this.transportKey=ye("AzSC8r6ReiGqFMyfvgow","Iayx0u-XT3vksVM-pIV"),this.logSource=462,this.logTraceAfterSampling=!1,this.logNetworkAfterSampling=!1,this.configTimeToLive=12}return t.prototype.getAppId=function(){var t=this.firebaseAppInstance&&this.firebaseAppInstance.options&&this.firebaseAppInstance.options.appId;if(!t)throw he.create("no app id");return t},t.prototype.getProjectId=function(){var t=this.firebaseAppInstance&&this.firebaseAppInstance.options&&this.firebaseAppInstance.options.projectId;if(!t)throw he.create("no project id");return t},t.prototype.getApiKey=function(){var t=this.firebaseAppInstance&&this.firebaseAppInstance.options&&this.firebaseAppInstance.options.apiKey;if(!t)throw he.create("no api key");return t},t.prototype.getFlTransportFullUrl=function(){return this.flTransportEndpointUrl.concat("?key=",this.transportKey)},t.getInstance=function(){return void 0===de&&(de=new t),de},t}();function we(){return ge}!function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.VISIBLE=1]="VISIBLE",t[t.HIDDEN=2]="HIDDEN"}(me||(me={}));var _e=["firebase_","google_","ga_"],Ee=new RegExp("^[a-zA-Z]\\w*$");function Te(){var t=ve.getInstance().navigator;return"serviceWorker"in t?t.serviceWorker.controller?2:3:1}function Oe(){switch(ve.getInstance().document.visibilityState){case"visible":return me.VISIBLE;case"hidden":return me.HIDDEN;default:return me.UNKNOWN}}function Se(){var t=ve.getInstance().navigator.connection;switch(t&&t.effectiveType){case"slow-2g":return 1;case"2g":return 2;case"3g":return 3;case"4g":return 4;default:return 0}}var Ie="0.0.1",Ce=!0,ke="FIREBASE_INSTALLATIONS_AUTH";function Ne(t){var e=function(){var t=ve.getInstance().localStorage;if(!t)return;var e=t.getItem(ce);if(!e||(n=e,!(Number(n)>Date.now())))return;var n;var r=t.getItem(ue);if(!r)return;try{return JSON.parse(r)}catch(i){return}}();return e?(xe(e),Promise.resolve()):function(t){return function(){var t=be.getInstance().installationsService.getToken();return t.then((function(t){})),t}().then((function(e){var n="https://firebaseremoteconfig.googleapis.com/v1/projects/"+be.getInstance().getProjectId()+"/namespaces/fireperf:fetch?ke
2y="+be.getInstance().getApiKey(),r=new Request(n,{method:"POST",headers:{Authorization:ke+" "+e},body:JSON.stringify({app_instance_id:t,app_instance_id_token:e,app_id:be.getInstance().getAppId(),app_version:re,sdk_version:Ie})});return fetch(r).then((function(t){if(t.ok)return t.json();throw he.create("RC response not ok")}))})).catch((function(){pe.info(Ae)}))}(t).then(xe).then((function(t){return function(t){var e=ve.getInstance().localStorage;if(!t||!e)return;e.setItem(ue,JSON.stringify(t)),e.setItem(ce,String(Date.now()+60*be.getInstance().configTimeToLive*60*1e3))}(t)}),(function(){}))}var Ae="Could not fetch config, will use default configs";function xe(t){if(!t)return t;var e=be.getInstance(),n=t.entries||{};return void 0!==n.fpr_enabled?e.loggingEnabled="true"===String(n.fpr_enabled):e.loggingEnabled=Ce,n.fpr_log_source&&(e.logSource=Number(n.fpr_log_source)),n.fpr_log_endpoint_url&&(e.logEndPointUrl=n.fpr_log_endpoint_url),n.fpr_log_transport_key&&(e.transportKey=n.fpr_log_transport_key),void 0!==n.fpr_vc_network_request_sampling_rate&&(e.networkRequestsSamplingRate=Number(n.fpr_vc_network_request_sampling_rate)),void 0!==n.fpr_vc_trace_sampling_rate&&(e.tracesSamplingRate=Number(n.fpr_vc_trace_sampling_rate)),e.logTraceAfterSampling=Pe(e.tracesSamplingRate),e.logNetworkAfterSampling=Pe(e.networkRequestsSamplingRate),t}function Pe(t){return Math.random()<=t}var Re,je=1;function De(){return je=2,Re=Re||function(){var t=ve.getInstance().document;return new Promise((function(e){if(t&&"complete"!==t.readyState){var n=function n(){"complete"===t.readyState&&(t.removeEventListener("readystatechange",n),e())};t.addEventListener("readystatechange",n)}else e()}))}().then((function(){return function(){var t=be.getInstance().installationsService.getId();return t.then((function(t){ge=t})),t}()})).then((function(t){return Ne(t)})).then((function(){return Le()}),(function(){return Le()}))}function Le(){je=3}var Me,Fe=1e4,Ue=3,Ve=[],qe=!1;function Be(t){setTimeout((function(){if(0!==Ue)return Ve.length?void function(){var t=Ve.splice(0,1e3),e=t.map((function(t){return{source_extension_json_proto3:t.message,event_time_ms:String(t.eventTime)}}));(function(t,e){return function(t){var e=be.getInstance().getFlTransportFullUrl();return fetch(e,{method:"POST",body:JSON.stringify(t)})}(t).then((function(t){return t.ok||pe.info("Call to Firebase backend failed."),t.json()})).then((function(t){var n=Number(t.nextRequestWaitMillis),r=Fe;isNaN(n)||(r=Math.max(n,r));var i=t.logResponseDetails;Array.isArray(i)&&i.length>0&&"RETRY_REQUEST_LATER"===i[0].responseAction&&(Ve=Object(f.g)(e,Ve),pe.info("Retry transport request later.")),Ue=3,Be(r)}))})({request_time_ms:String(Date.now()),client_info:{client_type:1,js_client_info:{}},log_source:be.getInstance().logSource,log_event:e},t).catch((function(){Ve=Object(f.g)(t,Ve),Ue--,pe.info("Tries left: "+Ue+"."),Be(Fe)}))}():Be(Fe)}),t)}function ze(t){if(!t.eventTime||!t.message)throw he.create("invalid cc log");Ve=Object(f.g)(Ve,[t])}function He(t,e){Me||(Me=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];ze({message:t.apply(void 0,e),eventTime:Date.now()})}}(Ge)),Me(t,e)}function We(t){var e=be.getInstance();!e.instrumentationEnabled&&t.isAuto||(e.dataCollectionEnabled||t.isAuto)&&ve.getInstance().requiredApisAvailable()&&(t.isAuto&&Oe()!==me.VISIBLE||(3===je?Ke(t):De().then((function(){return Ke(t)}),(function(){return Ke(t)}))))}function Ke(t){if(we()){var e=be.getInstance();e.loggingEnabled&&e.logTraceAfterSampling&&setTimeout((function(){return He(t,1)}),0)}}function Ge(t,e){return 0===e?function(t){var e={url:t.url,http_method:t.httpMethod||0,http_response_code:200,response_payload_bytes:t.responsePayloadBytes,client_start_time_us:t.startTimeUs,time_to_response_initiated_us:t.timeToResponseInitiatedUs,time_to_response_completed_us:t.timeToResponseCompletedUs},n={application_info:Qe(),network_request_metric:e};return JSON.stringify(n)}(t):function(t){var e={name:t.name,is_auto:t.isAuto,client_start_time_us:t.startTimeUs,duration_us:t.durationUs};0!==Object.keys(t.counters).length&&(e.counters=t.counters);var n=t.getAttributes();0!==Object.keys(n).length&&(e.custom_attributes=n);var r={application_info:Qe(),trace_metric:e};return JSON.stringify(r)}(t)}function Qe(){return{google_app_id:be.getInstance().getAppId(),app_instance_id:we(),web_app_info:{sdk_version:re,page_url:ve.getInstance().getUrl(),service_worker_status:Te(),visibility_state:Oe(),effective_connection_type:Se()},application_process_state:0}}var Ye=["_fp",ae,se];var Xe=function(){function t(t,e,n){void 0===e&&(e=!1),this.name=t,this.isAuto=e,this.state=1,this.customAttributes={},this.counters={},this.api=ve.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 t.prototype.start=function(){if(1!==this.state)throw he.create("trace started",{traceName:this.name});this.api.mark(this.traceStartMark),this.state=2},t.prototype.stop=function(){if(2!==this.state)throw he.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(),We(this)},t.prototype.record=function(t,e,n){if(t<=0)throw he.create("nonpositive trace startTime",{traceName:this.name});if(e<=0)throw he.create("nonpositive trace duration",{traceName:this.name});if(this.durationUs=Math.floor(1e3*e),this.startTimeUs=Math.floor(1e3*t),n&&n.attributes&&(this.customAttributes=Object(f.a)({},n.attributes)),n&&n.metrics)for(var r=0,i=Object.keys(n.metrics);r<i.length;r++){var o=i[r];isNaN(Number(n.metrics[o]))||(this.counters[o]=Number(Math.floor(n.metrics[o])))}We(this)},t.prototype.incrementMetric=function(t,e){void 0===e&&(e=1),void 0===this.counters[t]?this.putMetric(t,e):this.putMetric(t,this.counters[t]+e)},t.prototype.putMetric=function(t,e){if(!function(t,e){return!(0===t.length||t.length>100)&&(e&&e.startsWith(oe)&&Ye.indexOf(t)>-1||!t.startsWith("_"))}(t,this.name))throw he.create("invalid custom metric name",{customMetricName:t});this.counters[t]=function(t){var e=Math.floor(t);return e<t&&pe.info("Metric value should be an Integer, setting the value as : "+e+"."),e}(e)},t.prototype.getMetric=function(t){return this.counters[t]||0},t.prototype.putAttribute=function(t,e){var n=function(t){return!(0===t.length||t.length>40)&&!_e.some((function(e){return t.startsWith(e)}))&&!!t.match(Ee)}(t),r=function(t){return 0!==t.length&&t.length<=100}(e);if(n&&r)this.customAttributes[t]=e;else{if(!n)throw he.create("invalid attribute name",{attributeName:t});if(!r)throw he.create("invalid attribute value",{attributeValue:e})}},t.prototype.getAttribute=function(t){return this.customAttributes[t]},t.prototype.removeAttribute=function(t){void 0!==this.customAttributes[t]&&delete this.customAttributes[t]},t.prototype.getAttributes=function(){return Object(f.a)({},this.customAttributes)},t.prototype.setStartTime=function(t){this.startTimeUs=t},t.prototype.setDuration=function(t){this.durationUs=t},t.prototype.calculateTraceMetrics=function(){var t=this.api.getEntriesByName(this.traceMeasure),e=t&&t[0];e&&(this.durationUs=Math.floor(1e3*e.duration),this.startTimeUs=Math.floor(1e3*(e.startTime+this.api.getTimeOrigin())))},t.createOobTrace=function(e,n,r){var i=ve.getInstance().getUrl();if(i){var o=new t(oe+i,!0),a=Math.floor(1e3*ve.getInstance().getTimeOrigin());o.setStartTime(a),e&&e[0]&&(o.setDuration(Math.floor(1e3*e[0].duration)),o.putMetric("domInteractive",Math.floor(1e3*e[0].domInteractive)),o.putMetric("domContentLoadedEventEnd",Math.floor(1e3*e[0].domContentLoadedEventEnd)),o.putMetric("loadEventEnd",Math.floor(1e3*e[0].loadEventEnd)));if(n){var s=n.find((function(t){return"first-paint"===t.name}));s&&s.startTime&&o.putMetric("_fp",Math.floor(1e3*s.startTime));var u=n.find((function(t){return"first-contentful-paint"===t.name}));u&&u.startTime&&o.putMetric(ae,Math.floor(1e3*u.startTime)),r&&o.putMetric(se,Math.floor(1e3*r))}We(o)}},t.createUserTimingTrace=function(e){We(new t(e,!1,e))},t}();function $e(t){var e=t;if(e&&void 0!==e.responseStart){var n=ve.getInstance().getTimeOrigin(),r=Math.floor(1e3*(e.startTime+n)),i=e.responseStart?Math.floor(1e3*(e.responseStart-e.startTime)):void 0,o=Math.floor(1e3*(e.responseEnd-e.startTime));!function(t){var e=be.getInstance();if(e.instrumentationEnabled){var n=t.url,r=e.logEndPointUrl.split("?")[0],i=e.flTransportEndpointUrl.split("?")[0];n!==r&&n!==i&&e.loggingEnabled&&e.logNetworkAfterSampling&&setTimeout((function(){return He(t,0)}),0)}}({url:e.name&&e.name.split("?")[0],responsePayloadBytes:e.transferSize,startTimeUs:r,timeToResponseInitiatedUs:i,timeToResponseCompletedUs:o})}}function Je(){we()&&(setTimeout((function(){return function(){var t=ve.getInstance(),e=t.getEntriesByType("navigation"),n=t.getEntriesByType("paint");if(t.onFirstInputDelay){var r=setTimeout((function(){Xe.createOobTrace(e,n),r=void 0}),5e3);t.onFirstInputDelay((function(t){r&&(clearTimeout(r),Xe.createOobTrace(e,n,t))}))}else Xe.createOobTrace(e,n)}()}),0),setTimeout((function(){return function(){for(var t=ve.getInstance(),e=t.getEntriesByType("resource"),n=0,r=e;n<r.length;n++){$e(r[n])}t.setupObserver("resource",$e)}()}),0),setTimeout((function(){return function(){for(var t=ve.getInstance(),e=t.getEntriesByType("measure"),n=0,r=e;n<r.length;n++){Ze(r[n])}t.setupObserver("measure",Ze)}()}),0))}function Ze(t){var e=t.name;e.substring(0,ie.length)!==ie&&Xe.createUserTimingTrace(e)}var tn=function(){function t(t){this.app=t,ve.getInstance().requiredApisAvailable()&&Object(s.N)().then((function(t){t&&(qe||(Be(5500),qe=!0),De().then(Je,Je))})).catch((function(t){pe.info("Environment doesn't support IndexedDB: "+t)}))}return t.prototype.trace=function(t){return new Xe(t)},Object.defineProperty(t.prototype,"instrumentationEnabled",{get:function(){return be.getInstance().instrumentationEnabled},set:function(t){be.getInstance().instrumentationEnabled=t}
2,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dataCollectionEnabled",{get:function(){return be.getInstance().dataCollectionEnabled},set:function(t){be.getInstance().dataCollectionEnabled=t},enumerable:!1,configurable:!0}),t}();!function(t){var e=function(t,e){if("[DEFAULT]"!==t.name)throw he.create("FB not default");if("undefined"===typeof window)throw he.create("no window");return function(t){ee=t}(window),be.getInstance().firebaseAppInstance=t,be.getInstance().installationsService=e,new tn(t)};t.INTERNAL.registerComponent(new c.a("performance",(function(t){var n=t.getProvider("app").getImmediate(),r=t.getProvider("installations").getImmediate();return e(n,r)}),"PUBLIC")),t.registerVersion("@firebase/performance",ne)}(o.a);var en,nn,rn="https://www.googletagmanager.com/gtag/js";!function(t){t.EVENT="event",t.SET="set",t.CONFIG="config"}(en||(en={})),function(t){t.ADD_SHIPPING_INFO="add_shipping_info",t.ADD_PAYMENT_INFO="add_payment_info",t.ADD_TO_CART="add_to_cart",t.ADD_TO_WISHLIST="add_to_wishlist",t.BEGIN_CHECKOUT="begin_checkout",t.CHECKOUT_PROGRESS="checkout_progress",t.EXCEPTION="exception",t.GENERATE_LEAD="generate_lead",t.LOGIN="login",t.PAGE_VIEW="page_view",t.PURCHASE="purchase",t.REFUND="refund",t.REMOVE_FROM_CART="remove_from_cart",t.SCREEN_VIEW="screen_view",t.SEARCH="search",t.SELECT_CONTENT="select_content",t.SELECT_ITEM="select_item",t.SELECT_PROMOTION="select_promotion",t.SET_CHECKOUT_OPTION="set_checkout_option",t.SHARE="share",t.SIGN_UP="sign_up",t.TIMING_COMPLETE="timing_complete",t.VIEW_CART="view_cart",t.VIEW_ITEM="view_item",t.VIEW_ITEM_LIST="view_item_list",t.VIEW_PROMOTION="view_promotion",t.VIEW_SEARCH_RESULTS="view_search_results"}(nn||(nn={}));var on,an=new a.b("@firebase/analytics");function sn(t,e,n,r,i,o){return Object(f.b)(this,void 0,void 0,(function(){var a,s,u,c;return Object(f.d)(this,(function(l){switch(l.label){case 0:a=r[i],l.label=1;case 1:return l.trys.push([1,7,,8]),a?[4,e[a]]:[3,3];case 2:return l.sent(),[3,6];case 3:return[4,Promise.all(n)];case 4:return s=l.sent(),(u=s.find((function(t){return t.measurementId===i})))?[4,e[u.appId]]:[3,6];case 5:l.sent(),l.label=6;case 6:return[3,8];case 7:return c=l.sent(),an.error(c),[3,8];case 8:return t(en.CONFIG,i,o),[2]}}))}))}function un(t,e,n,r,i){return Object(f.b)(this,void 0,void 0,(function(){var o,a,s,u,c,l,h,p;return Object(f.d)(this,(function(f){switch(f.label){case 0:return f.trys.push([0,4,,5]),o=[],i&&i.send_to?(a=i.send_to,Array.isArray(a)||(a=[a]),[4,Promise.all(n)]):[3,2];case 1:for(s=f.sent(),u=function(t){var n=s.find((function(e){return e.measurementId===t})),r=n&&e[n.appId];if(!r)return o=[],"break";o.push(r)},c=0,l=a;c<l.length&&(h=l[c],"break"!==u(h));c++);f.label=2;case 2:return 0===o.length&&(o=Object.values(e)),[4,Promise.all(o)];case 3:return f.sent(),t(en.EVENT,r,i||{}),[3,5];case 4:return p=f.sent(),an.error(p),[3,5];case 5:return[2]}}
2))}))}function cn(t,e,n,r,i){var o=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];window[r].push(arguments)};return window[i]&&"function"===typeof window[i]&&(o=window[i]),window[i]=function(t,e,n,r){return function(i,o,a){return Object(f.b)(this,void 0,void 0,(function(){var s;return Object(f.d)(this,(function(u){switch(u.label){case 0:return u.trys.push([0,6,,7]),i!==en.EVENT?[3,2]:[4,un(t,e,n,o,a)];case 1:return u.sent(),[3,5];case 2:return i!==en.CONFIG?[3,4]:[4,sn(t,e,n,r,o,a)];case 3:return u.sent(),[3,5];case 4:t(en.SET,o),u.label=5;case 5:return[3,7];case 6:return s=u.sent(),an.error(s),[3,7];case 7:return[2]}}))}))}}(o,t,e,n),{gtagCore:o,wrappedGtag:window[i]}}var ln=((on={})["already-exists"]="A Firebase Analytics instance with the appId {$id} already exists. Only one Firebase Analytics instance can be created for each appId.",on["already-initialized"]="Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.",on["interop-component-reg-failed"]="Firebase Analytics Interop Component failed to instantiate: {$reason}",on["invalid-analytics-context"]="Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}",on["indexeddb-unavailable"]="IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}",on["fetch-throttle"]="The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.",on["config-fetch-failed"]="Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}",on["no-api-key"]='The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',on["no-app-id"]='The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.',on),fn=new s.b("analytics","Analytics",ln),hn=new(function(){function t(t,e){void 0===t&&(t={}),void 0===e&&(e=1e3),this.throttleMetadata=t,this.intervalMillis=e}return t.prototype.getThrottleMetadata=function(t){return this.throttleMetadata[t]},t.prototype.setThrottleMetadata=function(t,e){this.throttleMetadata[t]=e},t.prototype.deleteThrottleMetadata=function(t){delete this.throttleMetadata[t]},t}());function pn(t){return new Headers({Accept:"application/json","x-goog-api-key":t})}function dn(t){var e;return Object(f.b)(this,void 0,void 0,(function(){var n,r,i,o,a,s,u;return Object(f.d)(this,(function(c){switch(c.label){case 0:return n=t.appId,r=t.apiKey,i={method:"GET",headers:pn(r)},o="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig".replace("{app-id}",n),[4,fetch(o,i)];case 1:if(200===(a=c.sent()).status||304===a.status)return[3,6];s="",c.label=2;case 2:return c.trys.push([2,4,,5]),[4,a.json()];case 3:return u=c.sent(),(null===(e=u.error)||void 0===e?void 0:e.message)&&(s=u.error.message),[3,5];case 4:return c.sent(),[3,5];case 5:throw fn.create("config-fetch-failed",{httpStatus:a.status,responseMessage:s});case 6:return[2,a.json()]}}))}))}function vn(t,e,n,r){var i=e.throttleEndTimeMillis,o=e.backoffCount;return void 0===r&&(r=hn),Object(f.b)(this,void 0,void 0,(function(){var e,a,u,c,l,h,p;return Object(f.d)(this,(function(f){switch(f.label){case 0:e=t.appId,a=t.measurementId,f.label=1;case 1:return f.trys.push([1,3,,4]),[4,yn(n,i)];case 2:return f.sent(),[3,4];case 3:if(u=f.sent(),a)return an.warn("Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID "+a+' provided in the "measurementId" field in the local Firebase config. ['+u.message+"]"),[2,{appId:e,measurementId:a}];throw u;case 4:return f.trys.push([4,6,,7]),[4,dn(t)];case 5:return c=f.sent(),r.deleteThrottleMetadata(e),[2,c];case 6:if(!function(t){if(!(t instanceof s.c)||!t.customData)return!1;var e=Number(t.customData.httpStatus);return 429===e||500===e||503===e||504===e}(l=f.sent())){if(r.deleteThrottleMetadata(e),a)return an.warn("Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID "+a+' provided in the "measurementId" field in the local Firebase config. ['+l.message+"]"),[2,{appId:e,measurementId:a}];throw l}
2return h=503===Number(l.customData.httpStatus)?Object(s.j)(o,r.intervalMillis,30):Object(s.j)(o,r.intervalMillis),p={throttleEndTimeMillis:Date.now()+h,backoffCount:o+1},r.setThrottleMetadata(e,p),an.debug("Calling attemptFetch again in "+h+" millis"),[2,vn(t,p,n,r)];case 7:return[2]}}))}))}function yn(t,e){return new Promise((function(n,r){var i=Math.max(e-Date.now(),0),o=setTimeout(n,i);t.addEventListener((function(){clearTimeout(o),r(fn.create("fetch-throttle",{throttleEndTimeMillis:e}))}))}))}var gn=function(){function t(){this.listeners=[]}return t.prototype.addEventListener=function(t){this.listeners.push(t)},t.prototype.abort=function(){this.listeners.forEach((function(t){return t()}))},t}();function mn(t,e,n,r,i,o){return Object(f.b)(this,void 0,void 0,(function(){var a,u,c,l,h,p,d;return Object(f.d)(this,(function(v){switch(v.label){case 0:return(a=function(t,e,n){return void 0===e&&(e=hn),Object(f.b)(this,void 0,void 0,(function(){var r,i,o,a,s,u,c=this;return Object(f.d)(this,(function(l){if(r=t.options,i=r.appId,o=r.apiKey,a=r.measurementId,!i)throw fn.create("no-app-id");if(!o){if(a)return[2,{measurementId:a,appId:i}];throw fn.create("no-api-key")}return s=e.getThrottleMetadata(i)||{backoffCount:0,throttleEndTimeMillis:Date.now()},u=new gn,setTimeout((function(){return Object(f.b)(c,void 0,void 0,(function(){return Object(f.d)(this,(function(t){return u.abort(),[2]}))}))}),void 0!==n?n:6e4),[2,vn({appId:i,apiKey:o,measurementId:a},s,u,e)]}))}))}(t)).then((function(e){n[e.measurementId]=e.appId,t.options.measurementId&&e.measurementId!==t.options.measurementId&&an.warn("The measurement ID in the local Firebase config ("+t.options.measurementId+") does not match the measurement ID fetched from the server ("+e.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(t){return an.error(t)})),e.push(a),u=function(){return Object(f.b)(this,void 0,void 0,(function(){var t;return Object(f.d)(this,(function(e){switch(e.label){case 0:return Object(s.w)()?[3,1]:(an.warn(fn.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),[2,!1]);case 1:return e.trys.push([1,3,,4]),[4,Object(s.N)()];case 2:return e.sent(),[3,4];case 3:return t=e.sent(),an.warn(fn.create("indexeddb-unavailable",{errorInfo:t}).message),[2,!1];case 4:return[2,!0]}}))}))}().then((function(t){return t?r.getId():void 0})),[4,Promise.all([a,u])];case 1:return c=v.sent(),l=c[0],h=c[1],function(){for(var t=window.document.getElementsByTagName("script"),e=0,n=Object.values(t);e<n.length;e++){var r=n[e];if(r.src&&r.src.includes(rn))return r}return null}()||function(t,e){var n=document.createElement("script");n.src=rn+"?l="+t+"&id="+e,n.async=!0,document.head.appendChild(n)}(o,l.measurementId),i("js",new Date),(d={}).origin="firebase",d.update=!0,p=d,null!=h&&(p.firebase_id=h),i(en.CONFIG,l.measurementId,p),[2,l.measurementId]}}))}))}var bn,wn,_n={},En=[],Tn={},On="dataLayer",Sn="gtag",In=!1;function Cn(t){if(In)throw fn.create("already-initialized");t.dataLayerName&&(On=t.dataLayerName),t.gtagName&&(Sn=t.gtagName)}function kn(t,e){!function(){var t=[];if(Object(s.s)()&&t.push("This is a browser extension environment."),Object(s.e)()||t.push("Cookies are not available."),t.length>0){var e=t.map((function(t,e){return"("+(e+1)+") "+t})).join(" "),n=fn.create("invalid-analytics-context",{errorInfo:e});an.warn(n.message)}}();var n=t.options.appId;if(!n)throw fn.create("no-app-id");if(!t.options.apiKey){if(!t.options.measurementId)throw fn.create("no-api-key");an.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 '+t.options.measurementId+' provided in the "measurementId" field in the local Firebase config.')}if(null!=_n[n])throw fn.create("already-exists",{id:n});if(!In){!function(t){var e=[];Array.isArray(window[t])?e=window[t]:window[t]=e}(On);var r=cn(_n,En,Tn,On,Sn),i=r.wrappedGtag,o=r.gtagCore;wn=i,bn=o,In=!0}return _n[n]=mn(t,En,Tn,e,bn,On),{app:t,logEvent:function(t,e,r){(function(t,e,n,r,i){return Object(f.b)(this,void 0,void 0,(function(){var o,a;return Object(f.d)(this,(function(s){switch(s.label){case 0:return i&&i.global?(t(en.EVENT,n,r),[2]):[3,1];case 1:return[4,e];case 2:o=s.sent(),a=Object(f.a)(Object(f.a)({},r),{send_to:o}),t(en.EVENT,n,a),s.label=3;case 3:return[2]}}
2))}))})(wn,_n[n],t,e,r).catch((function(t){return an.error(t)}))},setCurrentScreen:function(t,e){(function(t,e,n,r){return Object(f.b)(this,void 0,void 0,(function(){var i;return Object(f.d)(this,(function(o){switch(o.label){case 0:return r&&r.global?(t(en.SET,{screen_name:n}),[2,Promise.resolve()]):[3,1];case 1:return[4,e];case 2:i=o.sent(),t(en.CONFIG,i,{update:!0,screen_name:n}),o.label=3;case 3:return[2]}}))}))})(wn,_n[n],t,e).catch((function(t){return an.error(t)}))},setUserId:function(t,e){(function(t,e,n,r){return Object(f.b)(this,void 0,void 0,(function(){var i;return Object(f.d)(this,(function(o){switch(o.label){case 0:return r&&r.global?(t(en.SET,{user_id:n}),[2,Promise.resolve()]):[3,1];case 1:return[4,e];case 2:i=o.sent(),t(en.CONFIG,i,{update:!0,user_id:n}),o.label=3;case 3:return[2]}}))}))})(wn,_n[n],t,e).catch((function(t){return an.error(t)}))},setUserProperties:function(t,e){(function(t,e,n,r){return Object(f.b)(this,void 0,void 0,(function(){var i,o,a,s,u;return Object(f.d)(this,(function(c){switch(c.label){case 0:if(!r||!r.global)return[3,1];for(i={},o=0,a=Object.keys(n);o<a.length;o++)s=a[o],i["user_properties."+s]=n[s];return t(en.SET,i),[2,Promise.resolve()];case 1:return[4,e];case 2:u=c.sent(),t(en.CONFIG,u,{update:!0,user_properties:n}),c.label=3;case 3:return[2]}}
2))}))})(wn,_n[n],t,e).catch((function(t){return an.error(t)}))},setAnalyticsCollectionEnabled:function(t){(function(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n;return Object(f.d)(this,(function(r){switch(r.label){case 0:return[4,t];case 1:return n=r.sent(),window["ga-disable-"+n]=!e,[2]}}))}))})(_n[n],t).catch((function(t){return an.error(t)}))},INTERNAL:{delete:function(){return delete _n[n],Promise.resolve()}}}}var Nn="analytics";function An(){return Object(f.b)(this,void 0,void 0,(function(){return Object(f.d)(this,(function(t){switch(t.label){case 0:if(Object(s.s)())return[2,!1];if(!Object(s.e)())return[2,!1];if(!Object(s.w)())return[2,!1];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,Object(s.N)()];case 2:return[2,t.sent()];case 3:return t.sent(),[2,!1];case 4:return[2]}}))}))}!function(t){t.INTERNAL.registerComponent(new c.a(Nn,(function(t){return kn(t.getProvider("app").getImmediate(),t.getProvider("installations").getImmediate())}),"PUBLIC").setServiceProps({settings:Cn,EventName:nn,isSupported:An})),t.INTERNAL.registerComponent(new c.a("analytics-internal",(function(t){try{return{logEvent:t.getProvider(Nn).getImmediate().logEvent}}catch(r){throw fn.create("interop-component-reg-failed",{reason:r})}}),"PRIVATE")),t.registerVersion("@firebase/analytics","0.6.3")}(o.a);var xn,Pn=function(){function t(t,e,n,r){this.client=t,this.storage=e,this.storageCache=n,this.logger=r}return t.prototype.isCachedDataFresh=function(t,e){if(!e)return this.logger.debug("Config fetch cache check. Cache unpopulated."),!1;var n=Date.now()-e,r=n<=t;return this.logger.debug("Config fetch cache check. Cache age millis: "+n+". Cache max age millis (minimumFetchIntervalMillis setting): "+t+". Is cache hit: "+r+"."),r},t.prototype.fetch=function(t){return Object(f.b)(this,void 0,void 0,(function(){var e,n,r,i,o;return Object(f.d)(this,(function(a){switch(a.label){case 0:return[4,Promise.all([this.storage.getLastSuccessfulFetchTimestampMillis(),this.storage.getLastSuccessfulFetchResponse()])];case 1:return e=a.sent(),n=e[0],(r=e[1])&&this.isCachedDataFresh(t.cacheMaxAgeMillis,n)?[2,r]:(t.eTag=r&&r.eTag,[4,this.client.fetch(t)]);case 2:return i=a.sent(),o=[this.storageCache.setLastSuccessfulFetchTimestampMillis(Date.now())],200===i.status&&o.push(this.storage.setLastSuccessfulFetchResponse(i)),[4,Promise.all(o)];case 3:return a.sent(),[2,i]}}))}))},t}(),Rn=((xn={})["registration-window"]="Undefined window object. This SDK only supports usage in a browser environment.",xn["registration-project-id"]="Undefined project identifier. Check Firebase app initialization.",xn["registration-api-key"]="Undefined API key. Check Firebase app initialization.",xn["registration-app-id"]="Undefined app identifier. Check Firebase app initialization.",xn["storage-open"]="Error thrown when opening storage. Original error: {$originalErrorMessage}.",xn["storage-get"]="Error thrown when reading from storage. Original error: {$originalErrorMessage}.",xn["storage-set"]="Error thrown when writing to storage. Original error: {$originalErrorMessage}.",xn["storage-delete"]="Error thrown when deleting from storage. Original error: {$originalErrorMessage}.",xn["fetch-client-network"]="Fetch client failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.",xn["fetch-timeout"]='The config fetch request timed out. Configure timeout using "fetchTimeoutMillis" SDK setting.',xn["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}.',xn["fetch-client-parse"]="Fetch client could not parse response. Original error: {$originalErrorMessage}.",xn["fetch-status"]="Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.",xn),jn=new s.b("remoteconfig","Remote Config",Rn);var Dn=function(){function t(t,e,n,r,i,o){this.firebaseInstallations=t,this.sdkVersion=e,this.namespace=n,this.projectId=r,this.apiKey=i,this.appId=o}return t.prototype.fetch=function(t){return Object(f.b)(this,void 0,void 0,(function(){var e,n,r,i,o,a,s,u,c,l,h,p,d,v,y,g,m,b,w;return Object(f.d)(this,(function(f){switch(f.label){case 0:return[4,Promise.all([this.firebaseInstallations.getId(),this.firebaseInstallations.getToken()])];case 1:e=f.sent(),n=e[0],r=e[1],i=window.FIREBASE_REMOTE_CONFIG_URL_BASE||"https://firebaseremoteconfig.googleapis.com",o=i+"/v1/projects/"+this.projectId+"/namespaces/"+this.namespace+":fetch?ke
2y="+this.apiKey,a={"Content-Type":"application/json","Content-Encoding":"gzip","If-None-Match":t.eTag||"*"},s={sdk_version:this.sdkVersion,app_instance_id:n,app_instance_id_token:r,app_id:this.appId,language_code:(void 0===_&&(_=navigator),_.languages&&_.languages[0]||_.language)},u={method:"POST",headers:a,body:JSON.stringify(s)},c=fetch(o,u),l=new Promise((function(e,n){t.signal.addEventListener((function(){var t=new Error("The operation was aborted.");t.name="AbortError",n(t)}))})),f.label=2;case 2:return f.trys.push([2,5,,6]),[4,Promise.race([c,l])];case 3:return f.sent(),[4,c];case 4:return h=f.sent(),[3,6];case 5:throw p=f.sent(),d="fetch-client-network","AbortError"===p.name&&(d="fetch-timeout"),jn.create(d,{originalErrorMessage:p.message});case 6:if(v=h.status,y=h.headers.get("ETag")||void 0,200!==h.status)return[3,11];b=void 0,f.label=7;case 7:return f.trys.push([7,9,,10]),[4,h.json()];case 8:return b=f.sent(),[3,10];case 9:throw w=f.sent(),jn.create("fetch-client-parse",{originalErrorMessage:w.message});case 10:g=b.entries,m=b.state,f.label=11;case 11:if("INSTANCE_STATE_UNSPECIFIED"===m?v=500:"NO_CHANGE"===m?v=304:"NO_TEMPLATE"!==m&&"EMPTY_CONFIG"!==m||(g={}),304!==v&&200!==v)throw jn.create("fetch-status",{httpStatus:v});return[2,{status:v,eTag:y,config:g}]}var _}))}))},t}(),Ln=function(){function t(){this.listeners=[]}return t.prototype.addEventListener=function(t){this.listeners.push(t)},t.prototype.abort=function(){this.listeners.forEach((function(t){return t()}))},t}(),Mn=["1","true","t","yes","y","on"],Fn=function(){function t(t,e){void 0===e&&(e=""),this._source=t,this._value=e}return t.prototype.asString=function(){return this._value},t.prototype.asBoolean=function(){return"static"!==this._source&&Mn.indexOf(this._value.toLowerCase())>=0},t.prototype.asNumber=function(){if("static"===this._source)return 0;var t=Number(this._value);return isNaN(t)&&(t=0),t},t.prototype.getSource=function(){return this._source},t}(),Un=function(){function t(t,e,n,r,i){this.app=t,this._client=e,this._storageCache=n,this._storage=r,this._logger=i,this._isInitializationComplete=!1,this.settings={fetchTimeoutMillis:6e4,minimumFetchIntervalMillis:432e5},this.defaultConfig={}}return t.prototype.setLogLevel=function(t){switch(t){case"debug":this._logger.logLevel=a.a.DEBUG;break;case"silent":this._logger.logLevel=a.a.SILENT;break;default:this._logger.logLevel=a.a.ERROR}},Object.defineProperty(t.prototype,"fetchTimeMillis",{get:function(){return this._storageCache.getLastSuccessfulFetchTimestampMillis()||-1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastFetchStatus",{get:function(){return this._storageCache.getLastFetchStatus()||"no-fetch-yet"},enumerable:!1,configurable:!0}),t.prototype.activate=function(){return Object(f.b)(this,void 0,void 0,(function(){var t,e,n;return Object(f.d)(this,(function(r){switch(r.label){case 0:return[4,Promise.all([this._storage.getLastSuccessfulFetchResponse(),this._storage.getActiveConfigEtag()])];case 1:return t=r.sent(),e=t[0],n=t[1],e&&e.config&&e.eTag&&e.eTag!==n?[4,Promise.all([this._storageCache.setActiveConfig(e.config),this._storage.setActiveConfigEtag(e.eTag)])]:[2,!1];case 2:return r.sent(),[2,!0]}}))}))},t.prototype.ensureInitialized=function(){var t=this;return this._initializePromise||(this._initializePromise=this._storageCache.loadFromStorage().then((function(){t._isInitializationComplete=!0}))),this._initializePromise},t.prototype.fetch=function(){return Object(f.b)(this,void 0,void 0,(function(){var t,e,n,r=this;return Object(f.d)(this,(function(i){switch(i.label){case 0:t=new Ln,setTimeout((function(){return Object(f.b)(r,void 0,void 0,(function(){return Object(f.d)(this,(function(e){return t.abort(),[2]}))}))}),this.settings.fetchTimeoutMillis),i.label=1;case 1:return i.trys.push([1,4,,6]),[4,this._client.fetch({cacheMaxAgeMillis:this.settings.minimumFetchIntervalMillis,signal:t})];case 2:return i.sent(),[4,this._storageCache.setLastFetchStatus("success")];case 3:return i.sent(),[3,6];case 4:return e=i.sent(),n=function(t,e){return t instanceof s.c&&-1!==t.code.indexOf(e)}(e,"fetch-throttle")?"throttle":"failure",[4,this._storageCache.setLastFetchStatus(n)];case 5:throw i.sent(),e;case 6:return[2]}}
2))}))},t.prototype.fetchAndActivate=function(){return Object(f.b)(this,void 0,void 0,(function(){return Object(f.d)(this,(function(t){switch(t.label){case 0:return[4,this.fetch()];case 1:return t.sent(),[2,this.activate()]}}))}))},t.prototype.getAll=function(){var t=this;return function(t,e){void 0===t&&(t={});void 0===e&&(e={});return Object.keys(Object(f.a)(Object(f.a)({},t),e))}(this._storageCache.getActiveConfig(),this.defaultConfig).reduce((function(e,n){return e[n]=t.getValue(n),e}),{})},t.prototype.getBoolean=function(t){return this.getValue(t).asBoolean()},t.prototype.getNumber=function(t){return this.getValue(t).asNumber()},t.prototype.getString=function(t){return this.getValue(t).asString()},t.prototype.getValue=function(t){this._isInitializationComplete||this._logger.debug('A value was requested for key "'+t+'" before SDK initialization completed. Await on ensureInitialized if the intent was to get a previously activated value.');var e=this._storageCache.getActiveConfig();return e&&void 0!==e[t]?new Fn("remote",e[t]):this.defaultConfig&&void 0!==this.defaultConfig[t]?new Fn("default",String(this.defaultConfig[t])):(this._logger.debug('Returning static value for key "'+t+'". Define a default or remote value if this is unintentional.'),new Fn("static"))},t}();function Vn(t,e){var n=t.target.error||void 0;return jn.create(e,{originalErrorMessage:n&&n.message})}var qn="app_namespace_store";var Bn=function(){function t(t,e,n,r){void 0===r&&(r=new Promise((function(t,e){var n=indexedDB.open("firebase_remote_config",1);n.onerror=function(t){e(Vn(t,"storage-open"))},n.onsuccess=function(e){t(e.target.result)},n.onupgradeneeded=function(t){var e=t.target.result;switch(t.oldVersion){case 0:e.createObjectStore(qn,{keyPath:"compositeKey"})}}}))),this.appId=t,this.appName=e,this.namespace=n,this.openDbPromise=r}return t.prototype.getLastFetchStatus=function(){return this.get("last_fetch_status")},t.prototype.setLastFetchStatus=function(t){return this.set("last_fetch_status",t)},t.prototype.getLastSuccessfulFetchTimestampMillis=function(){return this.get("last_successful_fetch_timestamp_millis")},t.prototype.setLastSuccessfulFetchTimestampMillis=function(t){return this.set("last_successful_fetch_timestamp_millis",t)},t.prototype.getLastSuccessfulFetchResponse=function(){return this.get("last_successful_fetch_response")},t.prototype.setLastSuccessfulFetchResponse=function(t){return this.set("last_successful_fetch_response",t)},t.prototype.getActiveConfig=function(){return this.get("active_config")},t.prototype.setActiveConfig=function(t){return this.set("active_config",t)},t.prototype.getActiveConfigEtag=function(){return this.get("active_config_etag")},t.prototype.setActiveConfigEtag=function(t){return this.set("active_config_etag",t)},t.prototype.getThrottleMetadata=function(){return this.get("throttle_metadata")},t.prototype.setThrottleMetadata=function(t){return this.set("throttle_metadata",t)},t.prototype.deleteThrottleMetadata=function(){return this.delete("throttle_metadata")},t.prototype.get=function(t){return Object(f.b)(this,void 0,void 0,(function(){var e,n=this;return Object(f.d)(this,(function(i){switch(i.label){case 0:return[4,this.openDbPromise];case 1:return e=i.sent(),[2,new Promise((function(i,o){var a=e.transaction([qn],"readonly").objectStore(qn),s=n.createCompositeKey(t);try{var u=a.get(s);u.onerror=function(t){o(Vn(t,"storage-get"))},u.onsuccess=function(t){var e=t.target.result;i(e?e.value:void 0)}}catch(r){o(jn.create("storage-get",{originalErrorMessage:r&&r.message}))}}))]}}))}))},t.prototype.set=function(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n,i=this;return Object(f.d)(this,(function(o){switch(o.label){case 0:return[4,this.openDbPromise];case 1:return n=o.sent(),[2,new Promise((function(o,a){var s=n.transaction([qn],"readwrite").objectStore(qn),u=i.createCompositeKey(t);try{var c=s.put({compositeKey:u,value:e});c.onerror=function(t){a(Vn(t,"storage-set"))},c.onsuccess=function(){o()}}catch(r){a(jn.create("storage-set",{originalErrorMessage:r&&r.message}))}}))]}}))}))},t.prototype.delete=function(t){return Object(f.b)(this,void 0,void 0,(function(){var e,n=this;return Object(f.d)(this,(function(i){switch(i.label){case 0:return[4,this.openDbPromise];case 1:return e=i.sent(),[2,new Promise((function(i,o){var a=e.transaction([qn],"readwrite").objectStore(qn),s=n.createCompositeKey(t);try{var u=a.delete(s);u.onerror=function(t){o(Vn(t,"storage-delete"))},u.onsuccess=function(){i()}}catch(r){o(jn.create("storage-delete",{originalErrorMessage:r&&r.message}))}}))]}}))}))},t.prototype.createCompositeKey=function(t){return[this.appId,this.appName,this.namespace,t].join()},t}(),zn=function(){function t(t){this.storage=t}return t.prototype.getLastFetchStatus=function(){return this.lastFetchStatus},t.prototype.getLastSuccessfulFetchTimestampMillis=function(){return this.lastSuccessfulFetchTimestampMillis},t.prototype.getActiveConfig=function(){return this.activeConfig},t.prototype.loadFromStorage=function(){return Object(f.b)(this,void 0,void 0,(function(){var t,e,n,r,i,o;return Object(f.d)(this,(function(a){switch(a.label){case 0:return t=this.storage.getLastFetchStatus(),e=this.storage.getLastSuccessfulFetchTimestampMillis(),n=this.storage.getActiveConfig(),[4,t];case 1:return(r=a.sent())&&(this.lastFetchStatus=r),[4,e];case 2:return(i=a.sent())&&(this.lastSuccessfulFetchTimestampMillis=i),[4,n];case 3:return(o=a.sent())&&(this.activeConfig=o),[2]}}))}))},t.prototype.setLastFetchStatus=function(t){return this.lastFetchStatus=t,this.storage.setLastFetchStatus(t)},t.prototype.setLastSuccessfulFetchTimestampMillis=function(t){return this.lastSuccessfulFetchTimestampMillis=t,this.storage.setLastSuccessfulFetchTimestampMillis(t)},t.prototype.setActiveConfig=function(t){return this.activeConfig=t,this.storage.setActiveConfig(t)},t}();function Hn(t,e){return new Promise((function(n,r){var i=Math.max(e-Date.now(),0),o=setTimeout(n,i);t.addEventListener((function(){clearTimeout(o),r(jn.create("fetch-throttle",{throttleEndTimeMillis:e}))}))}))}var Wn,Kn=function(){function t(t,e){this.client=t,this.storage=e}return t.prototype.fetch=function(t){return Object(f.b)(this,void 0,void 0,(function(){var e;return Object(f.d)(this,(function(n){switch(n.label){case 0:return[4,this.storage.getThrottleMetadata()];case 1:return e=n.sent()||{backoffCount:0,throttleEndTimeMillis:Date.now()},[2,this.attemptFetch(t,e)]}}))}))},t.prototype.attemptFetch=function(t,e){var n=e.throttleEndTimeMillis,r=e.backoffCount;return Object(f.b)(this,void 0,void 0,(function(){var e,i,o;return Object(f.d)(this,(function(a){switch(a.label){case 0:return[4,Hn(t.signal,n)];case 1:a.sent(),a.label=2;case 2:return a.trys.push([2,5,,7]),[4,this.client.fetch(t)];case 3:return e=a.sent(),[4,this.storage.deleteThrottleMetadata()];case 4:return a.sent(),[2,e];case 5:if(!function(t){if(!(t instanceof s.c)||!t.customData)return!1;var e=Number(t.customData.httpStatus);return 429===e||500===e||503===e||504===e}(i=a.sent()))throw i;return o={throttleEndTimeMillis:Date.now()+Object(s.j)(r),backoffCount:r+1},[4,this.storage.setThrottleMetadata(o)];case 6:return a.sent(),[2,this.attemptFetch(t,o)];case 7:return[2]}}
2))}))},t}(),Gn="@firebase/remote-config";(Wn=o.a).INTERNAL.registerComponent(new c.a("remoteConfig",(function(t,e){var n=t.getProvider("app").getImmediate(),r=t.getProvider("installations").getImmediate();if("undefined"===typeof window)throw jn.create("registration-window");var i=n.options,o=i.projectId,s=i.apiKey,u=i.appId;if(!o)throw jn.create("registration-project-id");if(!s)throw jn.create("registration-api-key");if(!u)throw jn.create("registration-app-id");e=e||"firebase";var c=new Bn(u,n.name,e),l=new zn(c),f=new a.b(Gn);f.logLevel=a.a.ERROR;var h=new Dn(r,Wn.SDK_VERSION,e,o,s,u),p=new Kn(h,c),d=new Pn(p,c,l,f),v=new Un(n,d,l,c,f);return v.ensureInitialized(),v}),"PUBLIC").setMultipleInstances(!0)),Wn.registerVersion(Gn,"0.1.30");o.a.registerVersion("firebase","8.2.8","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 firebase from 'firebase/app';\nimport 'firebase/<PACKAGE>';\n"),o.a.registerVersion("firebase","8.2.8")},function(t,e,n){"use strict";t.exports=n(112)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};e.default=function(t,e,n,r){return"in"in t&&(t.when=t.in),o.default.Children.count(r)<2?o.default.createElement(a.default,i({},t,{inEffect:e,outEffect:n,children:r})):(r=o.default.Children.map(r,(function(r){return o.default.createElement(a.default,i({},t,{inEffect:e,outEffect:n,children:r}))})),"Fragment"in o.default?o.default.createElement(o.default.Fragment,null,r):o.default.createElement("span",null,r))};var o=r(n(3)),a=r(n(117));t.exports=e.default},function(t,e,n){var r=n(124);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){t.exports=!n(23)&&!n(40)((function(){return 7!=Object.defineProperty(n(76)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(28),i=n(20).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e,n){var r=n(24),i=n(29),o=n(126)(!1),a=n(58)("IE_PROTO");t.exports=function(t,e){var n,s=i(t),u=0,c=[];for(n in s)n!=a&&r(s,n)&&c.push(n);for(;e.length>u;)r(s,n=e[u++])&&(~o(c,n)||c.push(n));return c}},function(t,e,n){var r=n(79);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){"use strict";e.__esModule=!0;var r=a(n(132)),i=a(n(144)),o="function"===typeof i.default&&"symbol"===typeof r.default?function(t){return typeof t}:function(t){return t&&"function"===typeof i.default&&t.constructor===i.default&&t!==i.default.prototype?"symbol":typeof t};function a(t){return t&&t.__esModule?t:{default:t}}e.default="function"===typeof i.default&&"symbol"===o(r.default)?function(t){return"undefined"===typeof t?"undefined":o(t)}:function(t){return t&&"function"===typeof i.default&&t.constructor===i.default&&t!==i.default.prototype?"symbol":"undefined"===typeof t?"undefined":o(t)}},function(t,e,n){"use strict";var r=n(47),i=n(38),o=n(82),a=n(26),s=n(63),u=n(136),c=n(65),l=n(139),f=n(30)("iterator"),h=!([].keys&&"next"in[].keys()),p="keys",d="values",v=function(){return this};t.exports=function(t,e,n,y,g,m,b){u(n,e,y);var w,_,E,T=function(t){if(!h&&t in C)return C[t];switch(t){case p:case d:return function(){return new n(this,t)}}return function(){return new n(this,t)}},O=e+" Iterator",S=g==d,I=!1,C=t.prototype,k=C[f]||C["@@iterator"]||g&&C[g],N=k||T(g),A=g?S?T("entries"):N:void 0,x="Array"==e&&C.entr
2ies||k;if(x&&(E=l(x.call(new t)))!==Object.prototype&&E.next&&(c(E,O,!0),r||"function"==typeof E[f]||a(E,f,v)),S&&k&&k.name!==d&&(I=!0,N=function(){return k.call(this)}),r&&!b||!h&&!I&&C[f]||a(C,f,N),s[e]=N,s[O]=v,g)if(w={values:S?N:T(d),keys:m?N:T(p),entries:A},b)for(_ in w)_ in C||o(C,_,w[_]);else i(i.P+i.F*(h||I),e,w);return w}},function(t,e,n){t.exports=n(26)},function(t,e,n){var r=n(77),i=n(60).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){var r=n(49),i=n(45),o=n(29),a=n(55),s=n(24),u=n(75),c=Object.getOwnPropertyDescriptor;e.f=n(23)?c:function(t,e){if(t=o(t),e=a(e,!0),u)try{return c(t,e)}catch(n){}if(s(t,e))return i(!r.f.call(t,e),t[e])}},function(t,e,n){"use strict";t.exports=n(163)},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){(function(t){e.fetch=s(t.fetch)&&s(t.ReadableStream),e.writableStream=s(t.WritableStream),e.abortController=s(t.AbortController),e.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),e.blobConstructor=!0}catch(u){}var n;function r(){if(void 0!==n)return n;if(t.XMLHttpRequest){n=new t.XMLHttpRequest;try{n.open("GET",t.XDomainRequest?"/":"https://example.com")}catch(u){n=null}}else n=null;return n}function i(t){var e=r();if(!e)return!1;try{return e.responseType=t,e.responseType===t}catch(u){}return!1}var o="undefined"!==typeof t.ArrayBuffer,a=o&&s(t.ArrayBuffer.prototype.slice);function s(t){return"function"===typeof t}e.arraybuffer=e.fetch||o&&i("arraybuffer"),e.msstream=!e.fetch&&a&&i("ms-stream"),e.mozchunkedarraybuffer=!e.fetch&&o&&i("moz-chunked-arraybuffer"),e.overrideMimeType=e.fetch||!!r()&&s(r().overrideMimeType),e.vbArray=s(t.VBArray),n=null}).call(this,n(10))},function(t,e,n){(function(t,r,i){var o=n(87),a=n(25),s=n(89),u=e.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=e.IncomingMessage=function(e,n,a,u){var c=this;if(s.Readable.call(c),c._mode=a,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",(function(){t.nextTick((function(){c.emit("close")}))})),"fetch"===a){if(c._fetchResponse=n,c.url=n.url,c.statusCode=n.status,c.statusMessage=n.statusText,n.headers.forEach((function(t,e){c.headers[e.toLowerCase()]=t,c.rawHeaders.push(e,t)})),o.writableStream){var l=new WritableStream({write:function(t){return new Promise((function(e,n){c._destroyed?n():c.push(new r(t))?e():c._resumeFetch=e}))},close:function(){i.clearTimeout(u),c._destroyed||c.push(null)},abort:function(t){c._destroyed||c.emit("error",t)}});try{return void n.body.pipeTo(l).catch((function(t){i.clearTimeout(u),c._destroyed||c.emit("error",t)}))}catch(d){}}var f=n.body.getReader();!function t(){f.read().then((function(e){if(!c._destroyed){if(e.done)return i.clearTimeout(u),void c.push(null);c.push(new r(e.value)),t()}})).catch((function(t){i.clearTimeout(u),c._destroyed||c.emit("error",t)}))}()}else{if(c._xhr=e,c._pos=0,c.url=e.responseURL,c.statusCode=e.status,c.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(t){var e=t.match(/^([^:]+):\s*(.*)/);if(e){var n=e[1].toLowerCase();"set-cookie"===n?(void 0===c.headers[n]&&(c.headers[n]=[]),c.headers[n].push(e[2])):void 0!==c.headers[n]?c.headers[n]+=", "+e[2]:c.headers[n]=e[2],c.rawHeaders.push(e[1],e[2])}})),c._charset="x-user-defined",!o.overrideMimeType){var h=c.rawHeaders["mime-type"];if(h){var p=h.match(/;\s*charset=([^;])(;|$)/);p&&(c._charset=p[1].toLowerCase())}c._charset||(c._charset="utf-8")}}};a(c,s.Readable),c.prototype._read=function(){var t=this._resumeFetch;t&&(this._resumeFetch=null,t())},c.prototype._onXHRProgress=function(){var t=this,e=t._xhr,n=null;switch(t._mode){case"text:vbarray":if(e.readyState!==u.DONE)break;try{n=new i.VBArray(e.responseBody).toArray()}catch(l){}if(null!==n){t.push(new r(n));break}case"text":try{n=e.responseText}catch(l){t._mode="text:vbarray";break}if(n.length>t._pos){var o=n.substr(t._pos);if("x-user-defined"===t._charset){for(var a=new r(o.length),s=0;s<o.length;s++)a[s]=255&o.charCodeAt(s);t.push(a)}else t.push(o,t._charset);t._pos=n.length}break;case"arraybuffer":if(e.readyState!==u.DONE||!e.response)break;n=e.response,t.push(new r(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=e.response,e.readyState!==u.LOADING||!n)break;t.push(new r(new Uint8Array(n)));break;case"ms-stream":if(n=e.response,e.readyState!==u.LOADING)break;var c=new i.MSStreamReader;c.onprogress=function(){c.result.byteLength>t._pos&&(t.push(new r(new Uint8Array(c.result.slice(t._pos)))),t._pos=c.result.byteLength)},c.onload=function(){t.push(null)},c.readAsArrayBuffer(n)}t._xhr.readyState===u.DONE&&"ms-stream"!==t._mode&&t.push(null)}}).call(this,n(16),n(31).Buffer,n(10))},function(t,e,n){(e=t.exports=n(90)).Stream=e,e.Readable=e,e.Writable=n(94),e.Duplex=n(32),e.Transform=n(96),e.PassThrough=n(180)},function(t,e,n){"use strict";(function(e,r){var i=n(50);t.exports=b;var o,a=n(86);b.ReadableState=m;n(91).EventEmitter;var s=function(t,e){return t.listeners(e).length},u=n(92),c=n(68).Buffer,l=e.Uint8Array||function(){};var f=Object.create(n(41));f.inherits=n(25);var h=n(173),p=void 0;p=h&&h.debuglog?h.debuglog("stream"):function(){};var d,v=n(174),y=n(93);f.inherits(b,u);var g=["error","close","destroy","pause","resume"];function m(t,e){t=t||{};
vendor: 4,563 bytes, line 2
2var r=e instanceof(o=o||n(32));this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,a=t.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new v,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(d||(d=n(95).StringDecoder),this.decoder=new d(t.encoding),this.encoding=t.encoding)}function b(t){if(o=o||n(32),!(this instanceof b))return new b(t);this._readableState=new m(t,this),this.readable=!0,t&&("function"===typeof t.read&&(this._read=t.read),"function"===typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function w(t,e,n,r,i){var o,a=t._readableState;null===e?(a.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,O(t)}(t,a)):(i||(o=function(t,e){var n;r=e,c.isBuffer(r)||r instanceof l||"string"===typeof e||void 0===e||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var r;return n}(a,e)),o?t.emit("error",o):a.objectMode||e&&e.length>0?("string"===typeof e||a.objectMode||Object.getPrototypeOf(e)===c.prototype||(e=function(t){return c.from(t)}(e)),r?a.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):_(t,a,e,!0):a.ended?t.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!n?(e=a.decoder.write(e),a.objectMode||0!==e.length?_(t,a,e,!1):I(t,a)):_(t,a,e,!1))):r||(a.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(a)}function _(t,e,n,r){e.flowing&&0===e.length&&!e.sync?(t.emit("data",n),t.read(0)):(e.length+=e.objectMode?1:n.length,r?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&O(t)),I(t,e)}Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),b.prototype.destroy=y.destroy,b.prototype._undestroy=y.undestroy,b.prototype._destroy=function(t,e){this.push(null),e(t)},b.prototype.push=function(t,e){var n,r=this._readableState;return r.objectMode?n=!0:"string"===typeof t&&((e=e||r.defaultEncoding)!==r.encoding&&(t=c.from(t,e),e=""),n=!0),w(this,t,e,!1,n)},b.prototype.unshift=function(t){return w(this,t,null,!0,!1)},b.prototype.isPaused=function(){return!1===this._readableState.flowing},b.prototype.setEncoding=function(t){return d||(d=n(95).StringDecoder),this._readableState.decoder=new d(t),this._readableState.encoding=t,this};var E=8388608;function T(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=E?t=E:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function O(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(p("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(S,t):S(t))}function S(t){p("emit readable"),t.emit("readable"),A(t)}function I(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(C,t,e))}function C(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(p("maybeReadMore read 0"),t.read(0),n!==e.length);)n=e.length;e.readingMore=!1}function k(t){p("readable nexttick read 0"),t.read(0)}function N(t,e){e.reading||(p("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),A(t),e.flowing&&!e.reading&&t.read(0)}function A(t){var e=t._readableState;for(p("flow",e.flowing);e.flowing&&null!==t.read(););}function x(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):n=function(t,e,n){var r;t<e.head.data.length?(r=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):r=t===e.head.data.length?e.shift():n?function(t,e){var n=e.head,r=1,i=n.data;t-=i.length;for(;n=n.next;){var o=n.data,a=t>o.length?o.length:t;if(a===o.length?i+=o:i+=o.slice(0,t),0===(t-=a)){a===o.length?(++r,n.next?e.head=n.next:e.head=e.tail
vendor: 4,649 bytes, line 2
2=null):(e.head=n,n.data=o.slice(a));break}++r}return e.length-=r,i}(t,e):function(t,e){var n=c.allocUnsafe(t),r=e.head,i=1;r.data.copy(n),t-=r.data.length;for(;r=r.next;){var o=r.data,a=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,a),0===(t-=a)){a===o.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(a));break}++i}return e.length-=i,n}(t,e);return r}(t,e.buffer,e.decoder),n);var n}function P(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(R,e,t))}function R(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function j(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}b.prototype.read=function(t){p("read",t),t=parseInt(t,10);var e=this._readableState,n=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return p("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?P(this):O(this),null;if(0===(t=T(t,e))&&e.ended)return 0===e.length&&P(this),null;var r,i=e.needReadable;return p("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&p("length less than watermark",i=!0),e.ended||e.reading?p("reading or ended",i=!1):i&&(p("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=T(n,e))),null===(r=t>0?x(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&P(this)),null!==r&&this.emit("data",r),r},b.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(t,e){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,p("pipe count=%d opts=%j",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?l:b;function c(e,r){p("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,p("cleanup"),t.removeListener("close",g),t.removeListener("finish",m),t.removeListener("drain",f),t.removeListener("error",y),t.removeListener("unpipe",c),n.removeListener("end",l),n.removeListener("end",b),n.removeListener("data",v),h=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||f())}function l(){p("onend"),t.end()}o.endEmitted?i.nextTick(u):n.once("end",u),t.on("unpipe",c);var f=function(t){return function(){var e=t._readableState;p("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,A(t))}}(n);t.on("drain",f);var h=!1;var d=!1;function v(e){p("ondata"),d=!1,!1!==t.write(e)||d||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==j(o.pipes,t))&&!h&&(p("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function y(e){p("onerror",e),b(),t.removeListener("error",y),0===s(t,"error")&&t.emit("error",e)}function g(){t.removeListener("finish",m),b()}function m(){p("onfinish"),t.removeListener("close",g),b()}function b(){p("unpipe"),n.unpipe(t)}return n.on("data",v),function(t,e,n){if("function"===typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?a(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",y),t.once("close",g),t.once("finish",m),t.emit("pipe",n),o.flowing||(p("pipe resume"),n.resume()),t},b.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n)),this;if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,n);return this}var a=j(e.pipes,t);return-1===a||(e.pipes.splice(a,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,n)),this},b.prototype.on=function(t,e){var n=u.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&O(this):i.nextTick(k,this))}return n},b.prototype.addListener=b.prototype.on,b.prototype.resume=function(){var t=this._readableState;return t.flowing||(p("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(N,t,e))}(this,t)),this},b.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(p("pause"),this._readableState.flowing=!1,this.emit
2("pause")),this},b.prototype.wrap=function(t){var e=this,n=this._readableState,r=!1;for(var i in t.on("end",(function(){if(p("wrapped end"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(p("wrapped data"),n.decoder&&(i=n.decoder.write(i)),!n.objectMode||null!==i&&void 0!==i)&&((n.objectMode||i&&i.length)&&(e.push(i)||(r=!0,t.pause())))})),t)void 0===this[i]&&"function"===typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<g.length;o++)t.on(g[o],this.emit.bind(this,g[o]));return this._read=function(e){p("wrapped _read",e),r&&(r=!1,t.resume())},this},Object.defineProperty(b.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),b._fromList=x}).call(this,n(10),n(16))},function(t,e,n){"use strict";var r,i="object"===typeof Reflect?Reflect:null,o=i&&"function"===typeof i.apply?i.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};r=i&&"function"===typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var a=Number.isNaN||function(t){return t!==t};function s(){s.init.call(this)}t.exports=s,t.exports.once=function(t,e){return new Promise((function(n,r){function i(){void 0!==o&&t.removeListener("error",o),n([].slice.call(arguments))}var o;"error"!==e&&(o=function(n){t.removeListener(e,i),r(n)},t.once("error",o)),t.once(e,i)}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function c(t){if("function"!==typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function l(t){return void 0===t._maxListeners?s.defaultMaxListeners:t._maxListeners}function f(t,e,n,r){var i,o,a,s;if(c(n),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),o=t._events),a=o[e]),void 0===a)a=o[e]=n,++t._eventsCount;else if("function"===typeof a?a=o[e]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=l(t))>0&&a.length>i&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=a.length,s=u,console&&console.warn&&console.warn(s)}return t}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=h.bind(r);return i.listener=n,r.wrapFn=i,i}function d(t,e,n){var r=t._events;if(void 0===r)return[];var i=r[e];return void 0===i?[]:"function"===typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(i):y(i,i.length)}function v(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"===typeof n)return 1;if(void 0!==n)return n.length}return 0}function y(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(t){if("number"!==typeof t||t<0||a(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");u=t}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(t){if("number"!==typeof t||t<0||a(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},s.prototype.getMaxListeners=function(){return l(this)},s.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var r="error"===t,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var a;if(e.length>0&&(a=e[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=i[t];if(void 0===u)return!1;if("function"===typeof u)o(u,this,e);else{var c=u.length,l=y(u,c);for(n=0;n<c;++n)o(l[n],this,e)}return!0},s.prototype.addListener=function(t,e){return f(this,t,e,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(t,e){return f(this,t,e,!0)},s.prototype.once=function(t,e){return c(e),this.on(t,p(this,t,e)),this},s.prototype.prependOnceListener=function(t,e){return c(e),this.prependListener(t,p(this,t,e)),this},s.prototype.removeListener=function(t,e){var n,r,i,o,a;if(c(e),void 0===(r=this._events))return this;if(void 0===(n=r[t]))return this;if(n===e||n.listener===e)0===--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit
vendor: 5,930 bytes, line 2
2("removeListener",t,n.listener||e));else if("function"!==typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===e||n[o].listener===e){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,i),1===n.length&&(r[t]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",t,a||e)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(t){var e,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[t]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"===typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},s.prototype.listeners=function(t){return d(this,t,!0)},s.prototype.rawListeners=function(t){return d(this,t,!1)},s.listenerCount=function(t,e){return"function"===typeof t.listenerCount?t.listenerCount(e):v.call(t,e)},s.prototype.listenerCount=v,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(t,e,n){t.exports=n(91).EventEmitter},function(t,e,n){"use strict";var r=n(50);function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var n=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||r.nextTick(i,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?(r.nextTick(i,n,t),n._writableState&&(n._writableState.errorEmitted=!0)):e&&e(t)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(t,e,n){"use strict";(function(e,r,i){var o=n(50);function a(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,n){var r=t.entry;t.entry=null;for(;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=m;var s,u=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?r:o.nextTick;m.WritableState=g;var c=Object.create(n(41));c.inherits=n(25);var l={deprecate:n(178)},f=n(92),h=n(68).Buffer,p=i.Uint8Array||function(){};var d,v=n(93);function y(){}function g(t,e){s=s||n(32),t=t||{};var r=e instanceof s;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,c=t.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===t.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,r=n.sync,i=n.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,r,i){--e.pendingcb,n?(o.nextTick(i,r),o.nextTick(O,t,e),t._writableState.errorEmitted=!0,t.emit("error",r)):(i(r),t._writableState.errorEmitted=!0,t.emit("error",r),O(t,e))}(t,n,r,e,i);else{var a=E(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||_(t,n),r?u(w,t,n,a,i):w(t,n,a,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function m(t){if(s=s||n(32),!d.call(m,this)&&!(this instanceof s))return new m(t);this._writableState=new g(t,this),this.writable=!0,t&&("function"===typeof t.write&&(this._write=t.write),"function"===typeof t.writev&&(this._writev=t.writev),"function"===typeof t.destroy&&(this._destroy=t.destroy),"function"===typeof t.final&&(this._final=t.final)),f.call(this)}function b(t,e,n,r,i,o,a){e.writelen=r,e.writecb=a,e.writing=!0,e.sync=!0,n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function w(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),O(t,e)}function _(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,i=new Array(r),o=e.corkedRequestsFree;o.entry=n;for(var s=0,u=!0;n;)i[s]=n,n.isBuf||(u=!1),n=n.next,s+=1;i.allBuffers=u,b(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new a(e),e.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,l=n.encoding,f=n.callback;if(b(t,e,!1,e.objectMode?1:c.length,c,l,f),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function E(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function T(t,e){t._final((function(n){e.pendingcb--,n&&t.emit("error",n),e.prefinished=!0,t.emit("prefinish"),O(t,e)}))}function O(t,e){var n=E(e);return n&&(!function(t,e){e.prefinished||e.finalCalled||("function"===typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(T,t,e)):(e.prefinished=!0,t.emit("prefinish")))}
vendor: 7,154 bytes, line 2
2(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),n}c.inherits(m,f),g.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(g.prototype,"buffer",{get:l.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"===typeof Symbol&&Symbol.hasInstance&&"function"===typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(m,Symbol.hasInstance,{value:function(t){return!!d.call(this,t)||this===m&&(t&&t._writableState instanceof g)}})):d=function(t){return t instanceof this},m.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},m.prototype.write=function(t,e,n){var r,i=this._writableState,a=!1,s=!i.objectMode&&(r=t,h.isBuffer(r)||r instanceof p);return s&&!h.isBuffer(t)&&(t=function(t){return h.from(t)}(t)),"function"===typeof e&&(n=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),"function"!==typeof n&&(n=y),i.ended?function(t,e){var n=new Error("write after end");t.emit("error",n),o.nextTick(e,n)}(this,n):(s||function(t,e,n,r){var i=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"===typeof n||void 0===n||e.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(t.emit("error",a),o.nextTick(r,a),i=!1),i}(this,i,t,n))&&(i.pendingcb++,a=function(t,e,n,r,i,o){if(!n){var a=function(t,e,n){t.objectMode||!1===t.decodeStrings||"string"!==typeof e||(e=h.from(e,n));return e}(e,r,i);r!==a&&(n=!0,i="buffer",r=a)}var s=e.objectMode?1:r.length;e.length+=s;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else b(t,e,!1,s,r,i,o);return u}(this,i,s,t,e,n)),a},m.prototype.cork=function(){this._writableState.corked++},m.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||_(this,t))},m.prototype.setDefaultEncoding=function(t){if("string"===typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(m.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),m.prototype._write=function(t,e,n){n(new Error("_write() is not implemented"))},m.prototype._writev=null,m.prototype.end=function(t,e,n){var r=this._writableState;"function"===typeof t?(n=t,t=null,e=null):"function"===typeof e&&(n=e,e=null),null!==t&&void 0!==t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(t,e,n){e.ending=!0,O(t,e),n&&(e.finished?o.nextTick(n):t.once("finish",n));e.ended=!0,t.writable=!1}(this,r,n)},Object.defineProperty(m.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),m.prototype.destroy=v.destroy,m.prototype._undestroy=v.undestroy,m.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,n(16),n(176).setImmediate,n(10))},function(t,e,n){"use strict";var r=n(179).Buffer,i=r.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!==typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=c,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=l,this.end=f,e=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function a(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!==(192&e[0]))return t.lastNeed=0,"\ufffd";if(t.lastNeed>1&&e.length>1){if(128!==(192&e[1]))return t.lastNeed=1,"\ufffd";if(t.lastNeed>2&&e.length>2&&128!==(192&e[2]))return t.lastNeed=2,"\ufffd"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2===0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function l(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function f(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<t.length?e?e+this.text(t,n):this.text(t,n):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\ufffd":e},o.prototype.text=function(t,e){var n=function(t,e,n){var r=e.length-1;if(r<n)return 0;var i=a(e[r]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if((i=a(e[r]))>=0)return i>0&&(t.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if((i=a(e[r]))>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,n){"use strict";
vendor: 9,777 bytes, line 2
2t.exports=a;var r=n(32),i=Object.create(n(41));function o(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=e&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function a(t){if(!(this instanceof a))return new a(t);r.call(this,t),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"===typeof t.transform&&(this._transform=t.transform),"function"===typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",s)}function s(){var t=this;"function"===typeof this._flush?this._flush((function(e,n){u(t,e,n)})):u(this,null,null)}function u(t,e,n){if(e)return t.emit("error",e);if(null!=n&&t.push(n),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}i.inherits=n(25),i.inherits(a,r),a.prototype.push=function(t,e){return this._transformState.needTransform=!1,r.prototype.push.call(this,t,e)},a.prototype._transform=function(t,e,n){throw new Error("_transform() is not implemented")},a.prototype._write=function(t,e,n){var r=this._transformState;if(r.writecb=n,r.writechunk=t,r.writeencoding=e,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},a.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},a.prototype._destroy=function(t,e){var n=this;r.prototype._destroy.call(this,t,(function(t){e(t),n.emit("close")}))}},function(t,e,n){"use strict";var r=n(184),i=n(185);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}e.parse=b,e.resolve=function(t,e){return b(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?b(t,!1,!0).resolveObject(e):e},e.format=function(t){i.isString(t)&&(t=b(t));return t instanceof o?t.format():o.prototype.format.call(t)},e.Url=o;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),f=["%","/","?",";","#"].concat(l),h=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=n(186);function b(t,e,n){if(t&&i.isObject(t)&&t instanceof o)return t;var r=new o;return r.parse(t,e,n),r}o.prototype.parse=function(t,e,n){if(!i.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),s=-1!==o&&o<t.indexOf("#")?"?":"#",c=t.split(s);c[0]=c[0].replace(/\\/g,"/");var b=t=c.join(s);if(b=b.trim(),!n&&1===t.split("#").length){var w=u.exec(b);if(w)return this.path=b,this.href=b,this.pathname=w[1],w[2]?(this.search=w[2],this.query=e?m.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var _=a.exec(b);if(_){var E=(_=_[0]).toLowerCase();this.protocol=E,b=b.substr(_.length)}if(n||_||b.match(/^\/\/[^@\/]+@[^@\/]+/)){var T="//"===b.substr(0,2);!T||_&&y[_]||(b=b.substr(2),this.slashes=!0)}if(!y[_]&&(T||_&&!g[_])){for(var O,S,I=-1,C=0;C<h.length;C++){-1!==(k=b.indexOf(h[C]))&&(-1===I||k<I)&&(I=k)}-1!==(S=-1===I?b.lastIndexOf("@"):b.lastIndexOf("@",I))&&(O=b.slice(0,S),b=b.slice(S+1),this.auth=decodeURIComponent(O)),I=-1;for(C=0;C<f.length;C++){var k;-1!==(k=b.indexOf(f[C]))&&(-1===I||k<I)&&(I=k)}-1===I&&(I=b.length),this.host=b.slice(0,I),b=b.slice(I),this.parseHost(),this.hostname=this.hostname||"";var N="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!N)for(var A=this.hostname.split(/\./),x=(C=0,A.length);C<x;C++){var P=A[C];if(P&&!P.match(p)){for(var R="",j=0,D=P.length;j<D;j++)P.charCodeAt(j)>127?R+="x":R+=P[j];if(!R.match(p)){var L=A.slice(0,C),M=A.slice(C+1),F=P.match(d);F&&(L.push(F[1]),M.unshift(F[2])),M.length&&(b="/"+M.join(".")+b),this.hostname=L.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),N||(this.hostname=r.toASCII(this.hostname));var U=this.port?":"+this.port:"",V=this.hostname||"";this.host=V+U,this.href+=this.host,N&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!v[E])for(C=0,x=l.length;C<x;C++){var q=l[C];if(-1!==b.indexOf(q)){var B=encodeURIComponent(q);B===q&&(B=escape(q)),b=b.split(q).join(B)}}var z=b.indexOf("#");-1!==z&&(this.hash=b.substr(z),b=b.slice(0,z));var H=b.indexOf("?");if(-1!==H?(this.search=b.substr(H),this.query=b.substr(H+1),e&&(this.query=m.parse(this.query)),b=b.slice(0,H)):e&&(this.search="",this.query={}),b&&(this.pathname=b),g[E]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){U=this.pathname||"";var W=this.search||"";this.path=U+W}return this.href=this.format(),this},o.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,a="";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(a=m.stringify(this.query));var s=this.search||a&&"?"+a||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||g[e])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),e+o+(n=n.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(s=s.replace("#","%23"))+r},o.prototype.resolve=function(t){return this.resolveObject(b(t,!1,!0)).format()},o.prototype.resolveObject=function(t){if(i.isString(t)){var e=new o;e.parse(t,!1,!0),t=e}for(var n=new o,r=Object.keys(this),a=0;a<r.length;a++){var s=r[a];n[s]=this[s]}if(n.hash=t.hash,""===t.href)return n.href=n.format(),n;if(t.slashes&&!t.protocol){for(var u=Object.keys(t),c=0;c<u.length;c++){var l=u[c];"protocol"!==l&&(n[l]=t[l])}return g[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(t.protocol&&t.protocol!==n.protocol){if(!g[t.protocol]){for(var f=Object.keys(t),h=0;h<f.length;h++){var p=f[h];n[p]=t[p]}return n.href=n.format(),n}if(n.protocol=t.protocol,t.host||y[t.protocol])n.pathname=t.pathname;else{for(var d=(t.pathname||"").split("/");d.length&&!(t.host=d.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),n.pathname=d.join("/")}if(n.search=t.search,n.query=t.query,n.host=t.host||"",n.auth=t.auth,n.hostname=t.hostname||t.host,n.port=t.port,n.pathname||n.search){var v=n.pathname||"",m=n.search||"";n.path=v+m}return n.slashes=n.slashes||t.slashes,n.href=n.format(),n}var b=n.pathname&&"/"===n.pathname.charAt(0),w=t.host||t.pathname&&"/"===t.pathname.charAt(0),_=w||b||n.host&&t.pathname,E=_,T=n.pathname&&n.pathname.split("/")||[],O=(d=t.pathname&&t.pathname.split("/")||[],n.protocol&&!g[n.protocol]);if(O&&(n.hostname="",n.port=null,n.host&&(""===T[0]?T[0]=n.host:T.unshift(n.host)),n.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===d[0]?d[0]=t.host:d.unshift(t.host)),t.host=null),_=_&&(""===d[0]||""===T[0])),w)n.host=t.host||""===t.host?t.host:n.host,n.hostname=t.hostname||""===t.hostname?t.hostname:n.hostname,n.search=t.search,n.query=t.query,T=d;else if(d.length)T||(T=[]),T.pop(),T=T.concat(d),n.search=t.search,n.query=t.query;else if(!i.isNullOrUndefined(t.search)){if(O)n.hostname=n.host=T.shift(),(N=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=N.shift(),n.host=n.hostname=N.shift());return n.search=t.search,n.query=t.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!T.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var S=T.slice(-1)[0],I=(n.host||t.host||T.length>1)&&("."===S||".."===S)||""===S,C=0,k=T.length;k>=0;k--)"."===(S=T[k])?T.splice(k,1):".."===S?(T.splice(k,1),C++):C&&(T.splice(k,1),C--);if(!_&&!E)for(;C--;C)T.unshift("..");!_||""===T[0]||T[0]&&"/"===T[0].charAt(0)||T.unshift(""),I&&"/"!==T.join("/").substr(-1)&&T.push("");var N,A=""===T[0]||T[0]&&"/"===T[0].charAt(0);O&&(n.hostname=n.host=A?"":T.length?T.shift():"",(N=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=N.shift(),n.host=n.hostname=N.shift()));return(_=_||n.host&&T.length)&&!A&&T.unshift(""),T.length?n.pathname=T.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var t=this.host,e=s.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";
2t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},function(t,e,n){"use strict";var r=n(13);function i(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var o;if(n)o=n(e);else if(r.isURLSearchParams(e))o=e.toString();else{var a=[];r.forEach(e,(function(t,e){null!==t&&"undefined"!==typeof t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,(function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),a.push(i(e)+"="+i(t))})))})),o=a.join("&")}if(o){var s=t.indexOf("#");-1!==s&&(t=t.slice(0,s)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}},function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,n){"use strict";(function(e){var r=n(13),i=n(194),o={"Content-Type":"application/x-www-form-urlencoded"};function a(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var s={adapter:function(){var t;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof e&&"[object process]"===Object.prototype.toString.call(e))&&(t=n(103)),t}(),transformRequest:[function(t,e){return i(e,"Accept"),i(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(a(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)?(a(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"===typeof t)try{t=JSON.parse(t)}catch(e){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(t){s.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){s.headers[t]=r.merge(o)})),t.exports=s}).call(this,n(16))},function(t,e,n){"use strict";var r=n(13),i=n(195),o=n(197),a=n(100),s=n(198),u=n(201),c=n(202),l=n(104);t.exports=function(t){return new Promise((function(e,n){var f=t.data,h=t.headers;r.isFormData(f)&&delete h["Content-Type"];var p=new XMLHttpRequest;if(t.auth){var d=t.auth.username||"",v=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";h.Authorization="Basic "+btoa(d+":"+v)}var y=s(t.baseURL,t.url);if(p.open(t.method.toUpperCase(),a(y,t.params,t.paramsSerializer),!0),p.timeout=t.timeout,p.onreadystatechange=function(){if(p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in p?u(p.getAllResponseHeaders()):null,o={data:t.responseType&&"text"!==t.responseType?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:r,config:t,request:p};i(e,n,o),p=null}},p.onabort=function(){p&&(n(l("Request aborted",t,"ECONNABORTED",p)),p=null)},p.onerror=function(){n(l("Network Error",t,null,p)),p=null},p.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(l(e,t,"ECONNABORTED",p)),p=null},r.isStandardBrowserEnv()){var g=(t.withCredentials||c(y))&&t.xsrfCookieName?o.read(t.xsrfCookieName):void 0;g&&(h[t.xsrfHeaderName]=g)}if("setRequestHeader"in p&&r.forEach(h,(function(t,e){"undefined"===typeof f&&"content-type"===e.toLowerCase()?delete h[e]:p.setRequestHeader(e,t)}
2)),r.isUndefined(t.withCredentials)||(p.withCredentials=!!t.withCredentials),t.responseType)try{p.responseType=t.responseType}catch(m){if("json"!==t.responseType)throw m}"function"===typeof t.onDownloadProgress&&p.addEventListener("progress",t.onDownloadProgress),"function"===typeof t.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){p&&(p.abort(),n(t),p=null)})),f||(f=null),p.send(f)}))}},function(t,e,n){"use strict";var r=n(196);t.exports=function(t,e,n,i,o){var a=new Error(t);return r(a,e,n,i,o)}},function(t,e,n){"use strict";var r=n(13);t.exports=function(t,e){e=e||{};var n={},i=["url","method","data"],o=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function u(t,e){return r.isPlainObject(t)&&r.isPlainObject(e)?r.merge(t,e):r.isPlainObject(e)?r.merge({},e):r.isArray(e)?e.slice():e}function c(i){r.isUndefined(e[i])?r.isUndefined(t[i])||(n[i]=u(void 0,t[i])):n[i]=u(t[i],e[i])}r.forEach(i,(function(t){r.isUndefined(e[t])||(n[t]=u(void 0,e[t]))})),r.forEach(o,c),r.forEach(a,(function(i){r.isUndefined(e[i])?r.isUndefined(t[i])||(n[i]=u(void 0,t[i])):n[i]=u(void 0,e[i])})),r.forEach(s,(function(r){r in e?n[r]=u(t[r],e[r]):r in t&&(n[r]=u(void 0,t[r]))}));var l=i.concat(o).concat(a).concat(s),f=Object.keys(t).concat(Object.keys(e)).filter((function(t){return-1===l.indexOf(t)}));return r.forEach(f,c),n}},function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},function(t,e,n){"use strict";var r=n(4),i=n(0),o=n(1),a=n(6),s="firebasestorage.googleapis.com",u=function(t){function e(n,r){var i=t.call(this,k(n),"Firebase Storage: "+r+" ("+k(n)+")")||this;return i.customData={serverResponse:null},Object.setPrototypeOf(i,e.prototype),i}return Object(i.c)(e,t),e.prototype.codeEquals=function(t){return k(t)===this.code},Object.defineProperty(e.prototype,"message",{get:function(){return this.customData.serverResponse?this.message+"\n"+this.customData.serverResponse:this.message},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"serverResponse",{get:function(){return this.customData.serverResponse},set:function(t){this.customData.serverResponse=t},enumerable:!1,configurable:!0}),e}(o.c),c="unknown",l="object-not-found",f="quota-exceeded",h="unauthenticated",p="unauthorized",d="retry-limit-exceeded",v="canceled",y="invalid-url",g="invalid-default-bucket",m="no-default-bucket",b="cannot-slice-blob",w="server-file-wrong-size",_="no-download-url",E="invalid-argument",T="app-deleted",O="invalid-root-operation",S="invalid-format",I="internal-error",C="unsupported-environment";function k(t){return"storage/"+t}function N(){return new u(c,"An unknown error occurred, please check the error payload for server response.")}function A(){return new u(v,"User canceled the upload/download.")}function x(){return new u(b,"Cannot slice blob for upload. Please retry the upload.")}function P(t){return new u(E,t)}function R(){return new u(T,"The Firebase app was deleted.")}function j(t){return new u(O,"The operation '"+t+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}function D(t,e){return new u(S,"String does not match format '"+t+"': "+e)}function L(t){throw new u(I,"Internal error: "+t)}var M={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"},F=function(t,e){this.data=t,this.contentType=e||null};function U(t,e){switch(t){case M.RAW:return new F(V(e));case M.BASE64:case M.BASE64URL:return new F(q(t,e));case M.DATA_URL:return new F(function(t){var e=new B(t);return e.base64?q(M.BASE64,e.rest):function(t){var e;try{e=decodeURIComponent(t)}catch(n){throw D(M.DATA_URL,"Malformed data URL.")}return V(e)}(e.rest)}(e),new B(e).contentType)}throw N()}function V(t){for(var e=[],n=0;n<t.length;n++){var r=t.charCodeAt(n);if(r<=127)e.push(r);else if(r<=2047)e.push(192|r>>6,128|63&r);else if(55296===(64512&r))if(n<t.length-1&&56320===(64512&t.charCodeAt(n+1)))r=65536|(1023&r)<<10|1023&t.charCodeAt(++n),e.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r);else e.push(239,191,189);else 56320===(64512&r)?e.push(239,191,189):e.push(224|r>>12,128|r>>6&63,128|63&r)}return new Uint8Array(e)}function q(t,e){switch(t){case M.BASE64:var n=-1!==e.indexOf("-"),r=-1!==e.indexOf("_");if(n||r)throw D(t,"Invalid character '"+(n?"-":"_")+"' found: is it base64url encoded?");break;case M.BASE64URL:var i=-1!==e.indexOf("+"),o=-1!==e.indexOf("/");if(i||o)throw D(t,"Invalid character '"+(i?"+":"/")+"' found: is it base64 encoded?");e=e.replace(/-/g,"+").replace(/_/g,"/")}var a;try{a=atob(e)}catch(c){throw D(t,"Invalid character found")}for(var s=new Uint8Array(a.length),u=0;u<a.length;
2u++)s[u]=a.charCodeAt(u);return s}var B=function(t){this.base64=!1,this.contentType=null;var e=t.match(/^data:([^,]+)?,/);if(null===e)throw D(M.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");var n=e[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=t.substring(t.indexOf(",")+1);var r,i};var z,H={STATE_CHANGED:"state_changed"},W="running",K="pausing",G="paused",Q="success",Y="canceling",X="canceled",$="error",J={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};function Z(t){switch(t){case W:case K:case Y:return J.RUNNING;case G:return J.PAUSED;case Q:return J.SUCCESS;case X:return J.CANCELED;case $:default:return J.ERROR}}!function(t){t[t.NO_ERROR=0]="NO_ERROR",t[t.NETWORK_ERROR=1]="NETWORK_ERROR",t[t.ABORT=2]="ABORT"}(z||(z={}));var tt=function(){function t(){var t=this;this.sent_=!1,this.xhr_=new XMLHttpRequest,this.errorCode_=z.NO_ERROR,this.sendPromise_=new Promise((function(e){t.xhr_.addEventListener("abort",(function(){t.errorCode_=z.ABORT,e(t)})),t.xhr_.addEventListener("error",(function(){t.errorCode_=z.NETWORK_ERROR,e(t)})),t.xhr_.addEventListener("load",(function(){e(t)}))}))}return t.prototype.send=function(t,e,n,r){if(this.sent_)throw L("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(e,t,!0),void 0!==r)for(var i in r)r.hasOwnProperty(i)&&this.xhr_.setRequestHeader(i,r[i].toString());return void 0!==n?this.xhr_.send(n):this.xhr_.send(),this.sendPromise_},t.prototype.getErrorCode=function(){if(!this.sent_)throw L("cannot .getErrorCode() before sending");return this.errorCode_},t.prototype.getStatus=function(){if(!this.sent_)throw L("cannot .getStatus() before sending");try{return this.xhr_.status}catch(t){return-1}},t.prototype.getResponseText=function(){if(!this.sent_)throw L("cannot .getResponseText() before sending");return this.xhr_.responseText},t.prototype.abort=function(){this.xhr_.abort()},t.prototype.getResponseHeader=function(t){return this.xhr_.getResponseHeader(t)},t.prototype.addUploadProgressListener=function(t){null!=this.xhr_.upload&&this.xhr_.upload.addEventListener("progress",t)},t.prototype.removeUploadProgressListener=function(t){null!=this.xhr_.upload&&this.xhr_.upload.removeEventListener("progress",t)},t}(),et=function(){function t(){}return t.prototype.createXhrIo=function(){return new tt},t}();function nt(t){return"string"===typeof t||t instanceof String}function rt(t){return it()&&t instanceof Blob}function it(){return"undefined"!==typeof Blob}function ot(t,e,n,r){if(r<e)throw new u(E,"Invalid value for '"+t+"'. Expected "+e+" or greater.");if(r>n)throw new u(E,"Invalid value for '"+t+"'. Expected "+n+" or less.")}function at(){return"undefined"!==typeof BlobBuilder?BlobBuilder:"undefined"!==typeof WebKitBlobBuilder?WebKitBlobBuilder:void 0}function st(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=at();if(void 0!==n){for(var r=new n,i=0;i<t.length;i++)r.append(t[i]);return r.getBlob()}if(it())return new Blob(t);throw new u(C,"This browser doesn't seem to support creating Blobs")}var ut=function(){function t(t,e){var n=0,r="";rt(t)?(this.data_=t,n=t.size,r=t.type):t instanceof ArrayBuffer?(e?this.data_=new Uint8Array(t):(this.data_=new Uint8Array(t.byteLength),this.data_.set(new Uint8Array(t))),n=this.data_.length):t instanceof Uint8Array&&(e?this.data_=t:(this.data_=new Uint8Array(t.length),this.data_.set(t)),n=t.length),this.size_=n,this.type_=r}return t.prototype.size=function(){return this.size_},t.prototype.type=function(){return this.type_},t.prototype.slice=function(e,n){if(rt(this.data_)){var r=function(t,e,n){return t.webkitSlice?t.webkitSlice(e,n):t.mozSlice?t.mozSlice(e,n):t.slice?t.slice(e,n):null}(this.data_,e,n);return null===r?null:new t(r)}return new t(new Uint8Array(this.data_.buffer,e,n-e),!0)},t.getBlob=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(it()){var r=e.map((function(e){return e instanceof t?e.data_:e}));return new t(st.apply(null,r))}var i=e.map((function(t){return nt(t)?U(M.RAW,t).data:t.data_})),o=0;
2i.forEach((function(t){o+=t.byteLength}));var a=new Uint8Array(o),s=0;return i.forEach((function(t){for(var e=0;e<t.length;e++)a[s++]=t[e]})),new t(a,!0)},t.prototype.uploadData=function(){return this.data_},t}(),ct=function(){function t(t,e){this.bucket=t,this.path_=e}return Object.defineProperty(t.prototype,"path",{get:function(){return this.path_},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRoot",{get:function(){return 0===this.path.length},enumerable:!1,configurable:!0}),t.prototype.fullServerUrl=function(){var t=encodeURIComponent;return"/b/"+t(this.bucket)+"/o/"+t(this.path)},t.prototype.bucketOnlyServerUrl=function(){return"/b/"+encodeURIComponent(this.bucket)+"/o"},t.makeFromBucketSpec=function(e){var n;try{n=t.makeFromUrl(e)}catch(r){return new t(e,"")}if(""===n.path)return n;throw new u(g,"Invalid default bucket '"+e+"'.")},t.makeFromUrl=function(e){var n=null,r="([A-Za-z0-9.\\-_]+)";var i=new RegExp("^gs://"+r+"(/(.*))?$","i");function o(t){t.path_=decodeURIComponent(t.path)}for(var a=s.replace(/[.]/g,"\\."),c=[{regex:i,indices:{bucket:1,path:3},postModify:function(t){"/"===t.path.charAt(t.path.length-1)&&(t.path_=t.path_.slice(0,-1))}},{regex:new RegExp("^https?://"+a+"/v[A-Za-z0-9_]+/b/"+r+"/o(/([^?#]*).*)?$","i"),indices:{bucket:1,path:3},postModify:o},{regex:new RegExp("^https?://(?:storage.googleapis.com|storage.cloud.google.com)/"+r+"/([^?#]*)","i"),indices:{bucket:1,path:2},postModify:o}],l=0;l<c.length;l++){var f=c[l],h=f.regex.exec(e);if(h){var p=h[f.indices.bucket],d=h[f.indices.path];d||(d=""),n=new t(p,d),f.postModify(n);break}}if(null==n)throw function(t){return new u(y,"Invalid URL '"+t+"'.")}(e);return n},t}();function lt(t){var e,n;try{e=JSON.parse(t)}catch(r){return null}return"object"!==typeof(n=e)||Array.isArray(n)?null:e}function ft(t){var e=t.lastIndexOf("/",t.length-2);return-1===e?t:t.slice(e+1)}function ht(t){return"https://"+s+"/v0"+t}function pt(t){var e=encodeURIComponent,n="?";for(var r in t){if(t.hasOwnProperty(r))n=n+(e(r)+"="+e(t[r]))+"&"}return n=n.slice(0,-1)}function dt(t,e){return e}var vt=function(t,e,n,r){this.server=t,this.local=e||t,this.writable=!!n,this.xform=r||dt},yt=null;function gt(){if(yt)return yt;var t=[];t.push(new vt("bucket")),t.push(new vt("generation")),t.push(new vt("metageneration")),t.push(new vt("name","fullPath",!0));var e=new vt("name");e.xform=function(t,e){return function(t){return!nt(t)||t.length<2?t:ft(t)}(e)},t.push(e);var n=new vt("size");return n.xform=function(t,e){return void 0!==e?Number(e):e},t.push(n),t.push(new vt("timeCreated")),t.push(new vt("updated")),t.push(new vt("md5Hash",null,!0)),t.push(new vt("cacheControl",null,!0)),t.push(new vt("contentDisposition",null,!0)),t.push(new vt("contentEncoding",null,!0)),t.push(new vt("contentLanguage",null,!0)),t.push(new vt("contentType",null,!0)),t.push(new vt("metadata","customMetadata",!0)),yt=t}function mt(t,e,n){for(var r={type:"file"},i=n.length,o=0;o<i;o++){var a=n[o];r[a.local]=a.xform(r,e[a.server])}return function(t,e){Object.defineProperty(t,"ref",{get:function(){var n=t.bucket,r=t.fullPath,i=new ct(n,r);return e.makeStorageReference(i)}})}(r,t),r}function bt(t,e,n){var r=lt(e);return null===r?null:mt(t,r,n)}function wt(t,e){for(var n={},r=e.length,i=0;i<r;i++){var o=e[i];o.writable&&(n[o.server]=t[o.local])}return JSON.stringify(n)}function _t(t,e,n){var r=lt(n);return null===r?null:function(t,e,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=t.makeStorageReference(new ct(e,a));r.prefixes.push(s)}if(n.items)for(var u=0,c=n.items;u<c.length;u++){var l=c[u];s=t.makeStorageReference(new ct(e,l.name)),r.items.push(s)}return r}(t,e,r)}var Et=function(t,e,n,r){this.url=t,this.method=e,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 Tt(t){if(!t)throw N()}function Ot(t,e){return function(n,r){var i=bt(t,r,e);return Tt(null!==i),i}}function St(t,e){return function(n,r){var i=bt(t,r,e);return Tt(null!==i),function(t,e){var n=lt(e);if(null===n)return null;if(!nt(n.downloadTokens))return null;var r=n.downloadTokens;if(0===r.length)return null;var i=encodeURIComponent;return r.split(",").map((function(e){var n=t.bucket,r=t.fullPath;return ht("/b/"+i(n)+"/o/"+i(r))+pt({alt:"media",token:e})}))[0]}(i,r)}}function It(t){return function(e,n){var r,i,o;return 401===e.getStatus()?r=new u(h,"User is not authenticated, please authenticate using Firebase Authentication and try again."):402===e.getStatus()?(o=t.bucket,r=new u(f,"Quota for bucket '"+o+"' exceeded, please view quota on https://firebase.google.com/pricing/.")):403===e.getStatus()?(i=t.path,r=new u(p,"User does not have permission to access '"+i+"'.")):r=n,r.serverResponse=n.serverResponse,r}}function Ct(t){var e=It(t);return function(n,r){var i,o=e(n,r);
2return 404===n.getStatus()&&(i=t.path,o=new u(l,"Object '"+i+"' does not exist.")),o.serverResponse=r.serverResponse,o}}function kt(t,e,n){var r=ht(e.fullServerUrl()),i=t.maxOperationRetryTime,o=new Et(r,"GET",Ot(t,n),i);return o.errorHandler=Ct(e),o}function Nt(t,e,n,r,i){var o={};e.isRoot?o.prefix="":o.prefix=e.path+"/",n&&n.length>0&&(o.delimiter=n),r&&(o.pageToken=r),i&&(o.maxResults=i);var a=ht(e.bucketOnlyServerUrl()),s=t.maxOperationRetryTime,u=new Et(a,"GET",function(t,e){return function(n,r){var i=_t(t,e,r);return Tt(null!==i),i}}(t,e.bucket),s);return u.urlParams=o,u.errorHandler=It(e),u}function At(t,e,n){var r=Object.assign({},n);return r.fullPath=t.path,r.size=e.size(),r.contentType||(r.contentType=function(t,e){return t&&t.contentType||e&&e.type()||"application/octet-stream"}(null,e)),r}var xt=function(t,e,n,r){this.current=t,this.total=e,this.finalized=!!n,this.metadata=r||null};function Pt(t,e){var n=null;try{n=t.getResponseHeader("X-Goog-Upload-Status")}catch(r){Tt(!1)}return Tt(!!n&&-1!==(e||["active"]).indexOf(n)),n}var Rt=262144;function jt(t,e,n,r,i,o,a,s){var c=new xt(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 u(w,"Server recorded incorrect upload file size, please retry the upload.");var l=c.total-c.current,f=l;i>0&&(f=Math.min(f,i));var h=c.current,p=h+f,d={"X-Goog-Upload-Command":f===l?"upload, finalize":"upload","X-Goog-Upload-Offset":c.current},v=r.slice(h,p);if(null===v)throw x();var y=e.maxUploadRetryTime,g=new Et(n,"POST",(function(t,n){var i,a=Pt(t,["active","final"]),s=c.current+f,u=r.size();return i="final"===a?Ot(e,o)(t,n):null,new xt(s,u,"final"===a,i)}),y);return g.headers=d,g.body=v.uploadData(),g.progressCallback=s||null,g.errorHandler=It(t),g}var Dt=function(t,e,n){if("function"===typeof t||null!=e||null!=n)this.next=t,this.error=e,this.complete=n;else{var r=t;this.next=r.next,this.error=r.error,this.complete=r.complete}},Lt=function(t,e,n,r,i,o){this.bytesTransferred=t,this.totalBytes=e,this.state=n,this.metadata=r,this.task=i,this.ref=o};function Mt(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];Promise.resolve().then((function(){return t.apply(void 0,e)}))}}var Ft=function(){function t(t,e,n){var r=this;void 0===n&&(n=null),this._transferred=0,this._needToFetchStatus=!1,this._needToFetchMetadata=!1,this._observers=[],this._error=void 0,this._uploadUrl=void 0,this._request=void 0,this._chunkMultiplier=1,this._resolve=void 0,this._reject=void 0,this._ref=t,this._blob=e,this._metadata=n,this._mappings=gt(),this._resumable=this._shouldDoResumable(this._blob),this._state=W,this._errorHandler=function(t){r._request=void 0,r._chunkMultiplier=1,t.codeEquals(v)?(r._needToFetchStatus=!0,r.completeTransitions_()):(r._error=t,r._transition($))},this._metadataErrorHandler=function(t){r._request=void 0,t.codeEquals(v)?r.completeTransitions_():(r._error=t,r._transition($))},this._promise=new Promise((function(t,e){r._resolve=t,r._reject=e,r._start()})),this._promise.then(null,(function(){}))}return t.prototype._makeProgressCallback=function(){var t=this,e=this._transferred;return function(n){return t._updateProgress(e+n)}},t.prototype._shouldDoResumable=function(t){return t.size()>262144},t.prototype._start=function(){this._state===W&&void 0===this._request&&(this._resumable?void 0===this._uploadUrl?this._createResumable():this._needToFetchStatus?this._fetchStatus():this._needToFetchMetadata?this._fetchMetadata():this._continueUpload():this._oneShotUpload())},t.prototype._resolveToken=function(t){var e=this;this._ref.storage.getAuthToken().then((function(n){switch(e._state){case W:t(n);break;case Y:e._transition(X);break;case K:e._transition(G)}}))},t.prototype._createResumable=function(){var t=this;this._resolveToken((function(e){var n=function(t,e,n,r,i){var o=e.bucketOnlyServerUrl(),a=At(e,r,i),s={name:a.fullPath},u=ht(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=wt(a,n),f=t.maxUploadRetryTime,h=new Et(u,"POST",(function(t){var e;Pt(t);try{e=t.getResponseHeader("X-Goog-Upload-URL")}catch(n){Tt(!1)}return Tt(nt(e)),e}),f);
2return h.urlParams=s,h.headers=c,h.body=l,h.errorHandler=It(e),h}(t._ref.storage,t._ref._location,t._mappings,t._blob,t._metadata),r=t._ref.storage.makeRequest(n,e);t._request=r,r.getPromise().then((function(e){t._request=void 0,t._uploadUrl=e,t._needToFetchStatus=!1,t.completeTransitions_()}),t._errorHandler)}))},t.prototype._fetchStatus=function(){var t=this,e=this._uploadUrl;this._resolveToken((function(n){var r=function(t,e,n,r){var i=t.maxUploadRetryTime,o=new Et(n,"POST",(function(t){var e=Pt(t,["active","final"]),n=null;try{n=t.getResponseHeader("X-Goog-Upload-Size-Received")}catch(o){Tt(!1)}n||Tt(!1);var i=Number(n);return Tt(!isNaN(i)),new xt(i,r.size(),"final"===e)}),i);return o.headers={"X-Goog-Upload-Command":"query"},o.errorHandler=It(e),o}(t._ref.storage,t._ref._location,e,t._blob),i=t._ref.storage.makeRequest(r,n);t._request=i,i.getPromise().then((function(e){e=e,t._request=void 0,t._updateProgress(e.current),t._needToFetchStatus=!1,e.finalized&&(t._needToFetchMetadata=!0),t.completeTransitions_()}),t._errorHandler)}))},t.prototype._continueUpload=function(){var t=this,e=Rt*this._chunkMultiplier,n=new xt(this._transferred,this._blob.size()),r=this._uploadUrl;this._resolveToken((function(i){var o;try{o=jt(t._ref._location,t._ref.storage,r,t._blob,e,t._mappings,n,t._makeProgressCallback())}catch(s){return t._error=s,void t._transition($)}var a=t._ref.storage.makeRequest(o,i);t._request=a,a.getPromise().then((function(e){t._increaseMultiplier(),t._request=void 0,t._updateProgress(e.current),e.finalized?(t._metadata=e.metadata,t._transition(Q)):t.completeTransitions_()}),t._errorHandler)}))},t.prototype._increaseMultiplier=function(){Rt*this._chunkMultiplier<33554432&&(this._chunkMultiplier*=2)},t.prototype._fetchMetadata=function(){var t=this;this._resolveToken((function(e){var n=kt(t._ref.storage,t._ref._location,t._mappings),r=t._ref.storage.makeRequest(n,e);t._request=r,r.getPromise().then((function(e){t._request=void 0,t._metadata=e,t._transition(Q)}),t._metadataErrorHandler)}))},t.prototype._oneShotUpload=function(){var t=this;this._resolveToken((function(e){var n=function(t,e,n,r,i){var o=e.bucketOnlyServerUrl(),a={"X-Goog-Upload-Protocol":"multipart"},s=function(){for(var t="",e=0;e<2;e++)t+=Math.random().toString().slice(2);return t}();a["Content-Type"]="multipart/related; boundary="+s;var u=At(e,r,i),c="--"+s+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+wt(u,n)+"\r\n--"+s+"\r\nContent-Type: "+u.contentType+"\r\n\r\n",l="\r\n--"+s+"--",f=ut.getBlob(c,r,l);if(null===f)throw x();var h={name:u.fullPath},p=ht(o),d=t.maxUploadRetryTime,v=new Et(p,"POST",Ot(t,n),d);return v.urlParams=h,v.headers=a,v.body=f.uploadData(),v.errorHandler=It(e),v}(t._ref.storage,t._ref._location,t._mappings,t._blob,t._metadata),r=t._ref.storage.makeRequest(n,e);t._request=r,r.getPromise().then((function(e){t._request=void 0,t._metadata=e,t._updateProgress(t._blob.size()),t._transition(Q)}),t._errorHandler)}))},t.prototype._updateProgress=function(t){var e=this._transferred;this._transferred=t,this._transferred!==e&&this._notifyObservers()},t.prototype._transition=function(t){if(this._state!==t)switch(t){case Y:case K:this._state=t,void 0!==this._request&&this._request.cancel();break;case W:var e=this._state===G;this._state=t,e&&(this._notifyObservers(),this._start());break;case G:this._state=t,this._notifyObservers();break;case X:this._error=A(),this._state=t,this._notifyObservers();break;case $:case Q:this._state=t,this._notifyObservers()}},t.prototype.completeTransitions_=function(){switch(this._state){case K:this._transition(G);break;case Y:this._transition(X);break;case W:this._start()}},Object.defineProperty(t.prototype,"snapshot",{get:function(){var t=Z(this._state);return new Lt(this._transferred,this._blob.size(),t,this._metadata,this,this._ref)},enumerable:!1,configurable:!0}),t.prototype.on=function(t,e,n,r){var i=this,o=new Dt(e,n,r);return this._addObserver(o),function(){i._removeObserver(o)}},t.prototype.then=function(t,e){return this._promise.then(t,e)},t.prototype.catch=function(t){return this.then(null,t)},t.prototype._addObserver=function(t){this._observers.push(t),this._notifyObserver(t)},t.prototype._removeObserver=function(t){var e=this._observers.indexOf(t);-1!==e&&this._observers.splice(e,1)},t.prototype._notifyObservers=function(){var t=this;
2this._finishPromise(),this._observers.slice().forEach((function(e){t._notifyObserver(e)}))},t.prototype._finishPromise=function(){if(void 0!==this._resolve){var t=!0;switch(Z(this._state)){case J.SUCCESS:Mt(this._resolve.bind(null,this.snapshot))();break;case J.CANCELED:case J.ERROR:Mt(this._reject.bind(null,this._error))();break;default:t=!1}t&&(this._resolve=void 0,this._reject=void 0)}},t.prototype._notifyObserver=function(t){switch(Z(this._state)){case J.RUNNING:case J.PAUSED:t.next&&Mt(t.next.bind(t,this.snapshot))();break;case J.SUCCESS:t.complete&&Mt(t.complete.bind(t))();break;case J.CANCELED:case J.ERROR:t.error&&Mt(t.error.bind(t,this._error))();break;default:t.error&&Mt(t.error.bind(t,this._error))()}},t.prototype.resume=function(){var t=this._state===G||this._state===K;return t&&this._transition(W),t},t.prototype.pause=function(){var t=this._state===W;return t&&this._transition(K),t},t.prototype.cancel=function(){var t=this._state===W||this._state===K;return t&&this._transition(Y),t},t}(),Ut=function(){function t(t,e){this._service=t,this._location=e instanceof ct?e:ct.makeFromUrl(e)}return t.prototype.toString=function(){return"gs://"+this._location.bucket+"/"+this._location.path},t.prototype.newRef=function(e,n){return new t(e,n)},Object.defineProperty(t.prototype,"root",{get:function(){var t=new ct(this._location.bucket,"");return this.newRef(this._service,t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bucket",{get:function(){return this._location.bucket},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fullPath",{get:function(){return this._location.path},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return ft(this._location.path)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"storage",{get:function(){return this._service},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){var e=function(t){if(0===t.length)return null;var e=t.lastIndexOf("/");return-1===e?"":t.slice(0,e)}(this._location.path);if(null===e)return null;var n=new ct(this._location.bucket,e);return new t(this._service,n)},enumerable:!1,configurable:!0}),t.prototype._throwIfRoot=function(t){if(""===this._location.path)throw j(t)},t}();function Vt(t){var e={prefixes:[],items:[]};return qt(t,e).then((function(){return e}))}function qt(t,e,n){return Object(i.b)(this,void 0,void 0,(function(){var r,o,a;return Object(i.d)(this,(function(i){switch(i.label){case 0:return[4,Bt(t,{pageToken:n})];case 1:return r=i.sent(),(o=e.prefixes).push.apply(o,r.prefixes),(a=e.items).push.apply(a,r.items),null==r.nextPageToken?[3,3]:[4,qt(t,e,r.nextPageToken)];case 2:i.sent(),i.label=3;case 3:return[2]}}
2))}))}function Bt(t,e){return Object(i.b)(this,void 0,void 0,(function(){var n,r,o;return Object(i.d)(this,(function(i){switch(i.label){case 0:return null!=e&&"number"===typeof e.maxResults&&ot("options.maxResults",1,1e3,e.maxResults),[4,t.storage.getAuthToken()];case 1:return n=i.sent(),r=e||{},o=Nt(t.storage,t._location,"/",r.pageToken,r.maxResults),[2,t.storage.makeRequest(o,n).getPromise()]}}))}))}function zt(t,e){return Object(i.b)(this,void 0,void 0,(function(){var n,r;return Object(i.d)(this,(function(i){switch(i.label){case 0:return t._throwIfRoot("updateMetadata"),[4,t.storage.getAuthToken()];case 1:return n=i.sent(),r=function(t,e,n,r){var i=ht(e.fullServerUrl()),o=wt(n,r),a=t.maxOperationRetryTime,s=new Et(i,"PATCH",Ot(t,r),a);return s.headers={"Content-Type":"application/json; charset=utf-8"},s.body=o,s.errorHandler=Ct(e),s}(t.storage,t._location,e,gt()),[2,t.storage.makeRequest(r,n).getPromise()]}}))}))}function Ht(t){return Object(i.b)(this,void 0,void 0,(function(){var e,n;return Object(i.d)(this,(function(r){switch(r.label){case 0:return t._throwIfRoot("getDownloadURL"),[4,t.storage.getAuthToken()];case 1:return e=r.sent(),n=function(t,e,n){var r=ht(e.fullServerUrl()),i=t.maxOperationRetryTime,o=new Et(r,"GET",St(t,n),i);return o.errorHandler=Ct(e),o}(t.storage,t._location,gt()),[2,t.storage.makeRequest(n,e).getPromise().then((function(t){if(null===t)throw new u(_,"The given file does not have any download URLs.");return t}))]}}))}))}function Wt(t){return Object(i.b)(this,void 0,void 0,(function(){var e,n;return Object(i.d)(this,(function(r){switch(r.label){case 0:return t._throwIfRoot("deleteObject"),[4,t.storage.getAuthToken()];case 1:return e=r.sent(),n=function(t,e){var n=ht(e.fullServerUrl()),r=t.maxOperationRetryTime,i=new Et(n,"DELETE",(function(t,e){}),r);return i.successCodes=[200,204],i.errorHandler=Ct(e),i}(t.storage,t._location),[2,t.storage.makeRequest(n,e).getPromise()]}}))}))}function Kt(t,e){var n=function(t,e){var n=e.split("/").filter((function(t){return t.length>0})).join("/");return 0===t.length?n:t+"/"+n}(t._location.path,e),r=new ct(t._location.bucket,n);return new Ut(t.storage,r)}var Gt=function(){function t(t,e,n){this._delegate=t,this.task=e,this.ref=n}return Object.defineProperty(t.prototype,"bytesTransferred",{get:function(){return this._delegate.bytesTransferred},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"metadata",{get:function(){return this._delegate.metadata},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._delegate.state},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"totalBytes",{get:function(){return this._delegate.totalBytes},enumerable:!1,configurable:!0}),t}(),Qt=function(){function t(t,e){this._delegate=t,this._ref=e,this.cancel=this._delegate.cancel.bind(this._delegate),this.catch=this._delegate.catch.bind(this._delegate),this.pause=this._delegate.pause.bind(this._delegate),this.resume=this._delegate.resume.bind(this._delegate),this._snapshot=new Gt(this._delegate.snapshot,this,this._ref)}return Object.defineProperty(t.prototype,"snapshot",{get:function(){return this._snapshot},enumerable:!1,configurable:!0}),t.prototype.then=function(t,e){var n=this;return this._delegate.then((function(e){if(t)return t(new Gt(e,n,n._ref))}),e)},t.prototype.on=function(t,e,n,r){var i=this,o=void 0;return e&&(o="function"===typeof e?function(t){return e(new Gt(t,i,i._ref))}:{next:e.next?function(t){return e.next(new Gt(t,i,i._ref))}:void 0,complete:e.complete||void 0,error:e.error||void 0}),this._delegate.on(t,o,n||void 0,r||void 0)},t}(),Yt=function(){function t(t,e){this._delegate=t,this._service=e}return Object.defineProperty(t.prototype,"prefixes",{get:function(){var t=this;return this._delegate.prefixes.map((function(e){return new Xt(e,t._service)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"items",{get:function(){var t=this;return this._delegate.items.map((function(e){return new Xt(e,t._service)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextPageToken",{get:function(){return this._delegate.nextPageToken||null}
2,enumerable:!1,configurable:!0}),t}(),Xt=function(){function t(t,e){this._delegate=t,this.storage=e}return Object.defineProperty(t.prototype,"name",{get:function(){return this._delegate.name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bucket",{get:function(){return this._delegate.bucket},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fullPath",{get:function(){return this._delegate.fullPath},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return this._delegate.toString()},t.prototype.child=function(e){return new t(Kt(this._delegate,e),this.storage)},Object.defineProperty(t.prototype,"root",{get:function(){return new t(this._delegate.root,this.storage)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){var e=this._delegate.parent;return null==e?null:new t(e,this.storage)},enumerable:!1,configurable:!0}),t.prototype.put=function(t,e){return this._throwIfRoot("put"),new Qt(function(t,e,n){return void 0===n&&(n=null),t._throwIfRoot("uploadBytesResumable"),new Ft(t,new ut(e),n)}(this._delegate,t,e),this)},t.prototype.putString=function(t,e,n){return void 0===e&&(e=M.RAW),this._throwIfRoot("putString"),new Qt(function(t,e,n,r){void 0===n&&(n=M.RAW),t._throwIfRoot("putString");var o=U(n,e),a=Object(i.a)({},r);return null==a.contentType&&null!=o.contentType&&(a.contentType=o.contentType),new Ft(t,new ut(o.data,!0),a)}(this._delegate,t,e,n),this)},t.prototype.listAll=function(){var t=this;return Vt(this._delegate).then((function(e){return new Yt(e,t.storage)}))},t.prototype.list=function(t){var e=this;return Bt(this._delegate,t).then((function(t){return new Yt(t,e.storage)}))},t.prototype.getMetadata=function(){return function(t){return Object(i.b)(this,void 0,void 0,(function(){var e,n;return Object(i.d)(this,(function(r){switch(r.label){case 0:return t._throwIfRoot("getMetadata"),[4,t.storage.getAuthToken()];case 1:return e=r.sent(),n=kt(t.storage,t._location,gt()),[2,t.storage.makeRequest(n,e).getPromise()]}}))}))}(this._delegate)},t.prototype.updateMetadata=function(t){return zt(this._delegate,t)},t.prototype.getDownloadURL=function(){return Ht(this._delegate)},t.prototype.delete=function(){return this._throwIfRoot("delete"),Wt(this._delegate)},t.prototype._throwIfRoot=function(t){if(""===this._delegate._location.path)throw j(t)},t}(),$t=function(){function t(t){this.promise_=Promise.reject(t)}return t.prototype.getPromise=function(){return this.promise_},t.prototype.cancel=function(t){},t}();var Jt=function(){function t(t,e,n,r,i,o,a,s,u,c,l){var f=this;this.pendingXhr_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.url_=t,this.method_=e,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(t,e){f.resolve_=t,f.reject_=e,f.start_()}))}return t.prototype.start_=function(){var t=this;function e(e,n){var r,i=t.resolve_,o=t.reject_,a=n.xhr;if(n.wasSuccessCode)try{var s=t.callback_(a,a.getResponseText());void 0!==s?i(s):i()}catch(c){o(c)}else null!==a?((r=N()).serverResponse=a.getResponseText(),t.errorCallback_?o(t.errorCallback_(a,r)):o(r)):n.canceled?o(r=t.appDelete_?R():A()):o(r=new u(d,"Max retry time for operation exceeded, please try again."))}this.canceled_?e(0,new Zt(!1,null,!0)):this.backoffId_=function(t,e,n){var r=1,o=null,a=!1,s=0;function u(){return 2===s}var c=!1;function l(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];c||(c=!0,e.apply(null,t))}function f(e){o=setTimeout((function(){o=null,t(h,u())}),e)}function h(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!c)if(t)l.call.apply(l,Object(i.g)([null,t],e));else{var o;u()||a?l.call.apply(l,Object(i.g)([null,t],e)):(r<64&&(r*=2),1===s?(s=2,o=0):o=1e3*(r+Math.random()),f(o))}}var p=!1;function d(t){p||(p=!0,c||(null!==o?(t||(s=2),clearTimeout(o),f(0)):t||(s=1)))}return f(0),setTimeout((function(){a=!0,d(!0)}),n),d}((function(e,n){if(n)e(!1,new Zt(!1,null,!0));else{var r=t.pool_.createXhrIo();t.pendingXhr_=r,null!==t.progressCallback_&&r.addUploadProgressListener(i),r.send(t.url_,t.method_,t.body_,t.headers_).then((function(n){null!==t.progressCallback_&&n.removeUploadProgressListener(i),t.pendingXhr_=null;
2var r=(n=n).getErrorCode()===z.NO_ERROR,o=n.getStatus();if(r&&!t.isRetryStatusCode_(o)){var a=-1!==t.successCodes_.indexOf(o);e(!0,new Zt(a,n))}else{var s=n.getErrorCode()===z.ABORT;e(!1,new Zt(!1,null,s))}}))}function i(e){var n=e.loaded,r=e.lengthComputable?e.total:-1;null!==t.progressCallback_&&t.progressCallback_(n,r)}}),e,this.timeout_)},t.prototype.getPromise=function(){return this.promise_},t.prototype.cancel=function(t){this.canceled_=!0,this.appDelete_=t||!1,null!==this.backoffId_&&(0,this.backoffId_)(!1),null!==this.pendingXhr_&&this.pendingXhr_.abort()},t.prototype.isRetryStatusCode_=function(t){var e=t>=500&&t<600,n=-1!==[408,429].indexOf(t),r=-1!==this.additionalRetryCodes_.indexOf(t);return e||n||r},t}(),Zt=function(t,e,n){this.wasSuccessCode=t,this.xhr=e,this.canceled=!!n};function te(t,e,n,i){var o=pt(t.urlParams),a=t.url+o,s=Object.assign({},t.headers);return function(t,e){e&&(t["X-Firebase-GMPID"]=e)}(s,e),function(t,e){null!==e&&e.length>0&&(t.Authorization="Firebase "+e)}(s,n),function(t){var e="undefined"!==typeof r.a?r.a.SDK_VERSION:"AppManager";t["X-Firebase-Storage-Version"]="webjs/"+e}(s),new Jt(a,t.method,s,t.body,t.successCodes,t.additionalRetryCodes,t.handler,t.errorHandler,t.timeout,t.progressCallback,i)}function ee(t){return/^[A-Za-z]+:\/\//.test(t)}function ne(t,e){if(t instanceof ie){var n=t;if(null==n._bucket)throw new u(m,"No default bucket found. Did you set the 'storageBucket' property when initializing the app?");var r=new Ut(n,n._bucket);return null!=e?ne(r,e):r}if(void 0!==e){if(e.includes(".."))throw P('`path` param cannot contain ".."');return Kt(t,e)}return t}function re(t,e){if(e&&ee(e)){if(t instanceof ie)return new Ut(t,e);throw P("To use ref(service, url), the first argument must be a Storage instance.")}return ne(t,e)}var ie=function(){function t(t,e,n,r){this.app=t,this._authProvider=e,this._pool=n,this._url=r,this._bucket=null,this._appId=null,this._deleted=!1,this._maxOperationRetryTime=12e4,this._maxUploadRetryTime=6e5,this._requests=new Set,this._bucket=null!=r?ct.makeFromBucketSpec(r):function(t){var e=null===t||void 0===t?void 0:t.storageBucket;return null==e?null:ct.makeFromBucketSpec(e)}(this.app.options)}return Object.defineProperty(t.prototype,"maxUploadRetryTime",{get:function(){return this._maxUploadRetryTime},set:function(t){ot("time",0,Number.POSITIVE_INFINITY,t),this._maxUploadRetryTime=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxOperationRetryTime",{get:function(){return this._maxOperationRetryTime},set:function(t){ot("time",0,Number.POSITIVE_INFINITY,t),this._maxOperationRetryTime=t},enumerable:!1,configurable:!0}),t.prototype.getAuthToken=function(){return Object(i.b)(this,void 0,void 0,(function(){var t,e;return Object(i.d)(this,(function(n){switch(n.label){case 0:return(t=this._authProvider.getImmediate({optional:!0}))?[4,t.getToken()]:[3,2];case 1:if(null!==(e=n.sent()))return[2,e.accessToken];n.label=2;case 2:return[2,null]}}))}))},t.prototype._delete=function(){return this._deleted=!0,this._requests.forEach((function(t){return t.cancel()})),this._requests.clear(),Promise.resolve()},t.prototype.makeStorageReference=function(t){return new Ut(this,t)},t.prototype.makeRequest=function(t,e){var n=this;if(this._deleted)return new $t(R());var r=te(t,this._appId,e,this._pool);return this._requests.add(r),r.getPromise().then((function(){return n._requests.delete(r)}),(function(){return n._requests.delete(r)})),r},t}(),oe=function(){function t(t,e){var n=this;this.app=t,this._delegate=e,this.INTERNAL={delete:function(){return n._delegate._delete()}}}return Object.defineProperty(t.prototype,"maxOperationRetryTime",{get:function(){return this._delegate.maxOperationRetryTime},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxUploadRetryTime",{get:function(){return this._delegate.maxUploadRetryTime},enumerable:!1,configurable:!0}),t.prototype.ref=function(t){if(ee(t))throw P("ref() expected a child path but got a URL, use refFromURL instead.");return new Xt(re(this._delegate,t),this)},t.prototype.refFromURL=function(t){if(!ee(t))throw P("refFromURL() expected a full URL but got a child path, use ref() instead.");try{ct.makeFromUrl(t)}catch(e){throw P("refFromUrl() expected a valid full URL but got an invali
2d one.")}return new Xt(re(this._delegate,t),this)},t.prototype.setMaxUploadRetryTime=function(t){this._delegate.maxUploadRetryTime=t},t.prototype.setMaxOperationRetryTime=function(t){this._delegate.maxOperationRetryTime=t},t}();function ae(t,e){var n=t.getProvider("app").getImmediate(),r=t.getProvider("auth-internal");return new oe(n,new ie(n,r,new et,e))}!function(t){var e={TaskState:J,TaskEvent:H,StringFormat:M,Storage:ie,Reference:Xt};t.INTERNAL.registerComponent(new a.a("storage",ae,"PUBLIC").setServiceProps(e).setMultipleInstances(!0)),t.registerVersion("@firebase/storage","0.4.2")}(r.a)},function(t,e,n){"use strict";var r=n(85),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(t){return r.isMemo(t)?a:s[t.$$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,f=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,d=Object.prototype;t.exports=function t(e,n,r){if("string"!==typeof n){if(d){var i=p(n);i&&i!==d&&t(e,i,r)}var a=l(n);f&&(a=a.concat(f(n)));for(var s=u(e),v=u(n),y=0;y<a.length;++y){var g=a[y];if(!o[g]&&(!r||!r[g])&&(!v||!v[g])&&(!s||!s[g])){var m=h(n,g);try{c(e,g,m)}catch(b){}}}}return e}},function(t,e,n){t.exports=n(189)},function(t,e,n){"use strict";var r=n(44),i=60103,o=60106;e.Fragment=60107,e.StrictMode=60108,e.Profiler=60114;var a=60109,s=60110,u=60112;e.Suspense=60113;var c=60115,l=60116;if("function"===typeof Symbol&&Symbol.for){var f=Symbol.for;i=f("react.element"),o=f("react.portal"),e.Fragment=f("react.fragment"),e.StrictMode=f("react.strict_mode"),e.Profiler=f("react.profiler"),a=f("react.provider"),s=f("react.context"),u=f("react.forward_ref"),e.Suspense=f("react.suspense"),c=f("react.memo"),l=f("react.lazy")}var h="function"===typeof Symbol&&Symbol.iterator;function p(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var d={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v={};function y(t,e,n){this.props=t,this.context=e,this.refs=v,this.updater=n||d}function g(){}function m(t,e,n){this.props=t,this.context=e,this.refs=v,this.updater=n||d}y.prototype.isReactComponent={},y.prototype.setState=function(t,e){if("object"!==typeof t&&"function"!==typeof t&&null!=t)throw Error(p(85));this.updater.enqueueSetState(this,t,e,"setState")},y.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},g.prototype=y.prototype;var b=m.prototype=new g;b.constructor=m,r(b,y.prototype),b.isPureReactComponent=!0;var w={current:null},_=Object.prototype.hasOwnProperty,E={key:!0,ref:!0,__self:!0,__source:!0};function T(t,e,n){var r,o={},a=null,s=null;
vendor: 12,380 bytes, line 2
2if(null!=e)for(r in void 0!==e.ref&&(s=e.ref),void 0!==e.key&&(a=""+e.key),e)_.call(e,r)&&!E.hasOwnProperty(r)&&(o[r]=e[r]);var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){for(var c=Array(u),l=0;l<u;l++)c[l]=arguments[l+2];o.children=c}if(t&&t.defaultProps)for(r in u=t.defaultProps)void 0===o[r]&&(o[r]=u[r]);return{$$typeof:i,type:t,key:a,ref:s,props:o,_owner:w.current}}function O(t){return"object"===typeof t&&null!==t&&t.$$typeof===i}var S=/\/+/g;function I(t,e){return"object"===typeof t&&null!==t&&null!=t.key?function(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,(function(t){return e[t]}))}(""+t.key):e.toString(36)}function C(t,e,n,r,a){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 i:case o:u=!0}}if(u)return a=a(u=t),t=""===r?"."+I(u,0):r,Array.isArray(a)?(n="",null!=t&&(n=t.replace(S,"$&/")+"/"),C(a,e,n,"",(function(t){return t}))):null!=a&&(O(a)&&(a=function(t,e){return{$$typeof:i,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}(a,n+(!a.key||u&&u.key===a.key?"":(""+a.key).replace(S,"$&/")+"/")+t)),e.push(a)),1;if(u=0,r=""===r?".":r+":",Array.isArray(t))for(var c=0;c<t.length;c++){var l=r+I(s=t[c],c);u+=C(s,e,n,l,a)}else if("function"===typeof(l=function(t){return null===t||"object"!==typeof t?null:"function"===typeof(t=h&&t[h]||t["@@iterator"])?t:null}(t)))for(t=l.call(t),c=0;!(s=t.next()).done;)u+=C(s=s.value,e,n,l=r+I(s,c++),a);else if("object"===s)throw e=""+t,Error(p(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e));return u}function k(t,e,n){if(null==t)return t;var r=[],i=0;return C(t,r,"","",(function(t){return e.call(n,t,i++)})),r}function N(t){if(-1===t._status){var e=t._result;e=e(),t._status=0,t._result=e,e.then((function(e){0===t._status&&(e=e.default,t._status=1,t._result=e)}),(function(e){0===t._status&&(t._status=2,t._result=e)}))}if(1===t._status)return t._result;throw t._result}var A={current:null};function x(){var t=A.current;if(null===t)throw Error(p(321));return t}var P={ReactCurrentDispatcher:A,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:w,IsSomeRendererActing:{current:!1},assign:r};e.Children={map:k,forEach:function(t,e,n){k(t,(function(){e.apply(this,arguments)}),n)},count:function(t){var e=0;return k(t,(function(){e++})),e},toArray:function(t){return k(t,(function(t){return t}))||[]},only:function(t){if(!O(t))throw Error(p(143));return t}},e.Component=y,e.PureComponent=m,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=P,e.cloneElement=function(t,e,n){if(null===t||void 0===t)throw Error(p(267,t));var o=r({},t.props),a=t.key,s=t.ref,u=t._owner;if(null!=e){if(void 0!==e.ref&&(s=e.ref,u=w.current),void 0!==e.key&&(a=""+e.key),t.type&&t.type.defaultProps)var c=t.type.defaultProps;for(l in e)_.call(e,l)&&!E.hasOwnProperty(l)&&(o[l]=void 0===e[l]&&void 0!==c?c[l]:e[l])}var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){c=Array(l);for(var f=0;f<l;f++)c[f]=arguments[f+2];o.children=c}return{$$typeof:i,type:t.type,key:a,ref:s,props:o,_owner:u}},e.createContext=function(t,e){return void 0===e&&(e=null),(t={$$typeof:s,_calculateChangedBits:e,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:t},t.Consumer=t},e.createElement=T,e.createFactory=function(t){var e=T.bind(null,t);return e.type=t,e},e.createRef=function(){return{current:null}},e.forwardRef=function(t){return{$$typeof:u,render:t}},e.isValidElement=O,e.lazy=function(t){return{$$typeof:l,_payload:{_status:-1,_result:t},_init:N}},e.memo=function(t,e){return{$$typeof:c,type:t,compare:void 0===e?null:e}},e.useCallback=function(t,e){return x().useCallback(t,e)},e.useContext=function(t,e){return x().useContext(t,e)},e.useDebugValue=function(){},e.useEffect=function(t,e){return x().useEffect(t,e)},e.useImperativeHandle=function(t,e,n){return x().useImperativeHandle(t,e,n)},e.useLayoutEffect=function(t,e){return x().useLayoutEffect(t,e)},e.useMemo=function(t,e){return x().useMemo(t,e)},e.useReducer=function(t,e,n){return x().useReducer(t,e,n)},e.useRef=function(t){return x().useRef(t)},e.useState=function(t){return x().useState(t)},e.version="17.0.1"},function(t,e,n){"use strict";var r=n(3),i=n(44),o=n(72);function a(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));var s=new Set,u={};function c(t,e){l(t,e),l(t+"Capture",e)}function l(t,e){for(u[t]=e,t=0;t<e.length;t++)s.add(e[t])}var f=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),h=/^[: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]*$/,p=Object.prototype.hasOwnProperty,d={},v={};function y(t,e,n,r,i,o,a){this.acceptsBooleans=2===e||3===e||4===e,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=a}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(t){g[t]=new y(t,0,!1,t,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(t){var e=t[0];g[e]=new y(e,1,!1,t[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(t){g[t]=new y(t,2,!1,t.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(t){g[t]=new y(t,2,!1,t,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(t){g[t]=new y(t,3,!1,t.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(t){g[t]=new y(t,3,!0,t,null,!1,!1)})),["capture","download"].forEach((function(t){g[t]=new y(t,4,!1,t,null,!1,!1)})),["cols","rows","size","span"].forEach((function(t){g[t]=new y(t,6,!1,t,null,!1,!1)})),["rowSpan","start"].forEach((function(t){g[t]=new y(t,5,!1,t.toLowerCase(),null,!1,!1)}));var m=/[\-:]([a-z])/g;function b(t){return t[1].toUpperCase()}function w(t,e,n,r){var i=g.hasOwnProperty(e)?g[e]:null;(null!==i?0===i.type:!r&&(2<e.length&&("o"===e[0]||"O"===e[0])&&("n"===e[1]||"N"===e[1])))||(function(t,e,n,r){if(null===e||"undefined"===typeof e||function(t,e,n,r){if(null!==n&&0===n.type)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(t=t.toLowerCase().slice(0,5))&&"aria-"!==t);default:return!1}}(t,e,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!e;case 4:return!1===e;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}(e,n,i,r)&&(n=null),r||null===i?function(t){return!!p.call(v,t)||!p.call(d,t)&&(h.test(t)?v[t]=!0:(d[t]=!0,!1))}(e)&&(null===n?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=null===n?3!==i.type&&"":n:(e=i.attributeName,r=i.attributeNamespace,null===n?t.removeAttribute(e):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}"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(t){var e=t.replace(m,b);g[e]=new y(e,1,!1,t,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(t){var e=t.replace(m,b);g[e]=new y(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(t){var e=t.replace(m,b);g[e]=new y(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(t){g[t]=new y(t,1,!1,t.toLowerCase(),null,!1,!1)})),g.xlinkHref=new y("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(t){g[t]=new y(t,1,!1,t.toLowerCase(),null,!0,!0)}));var _=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,E=60103,T=60106,O=60107,S=60108,I=60114,C=60109,k=60110,N=60112,A=60113,x=60120,P=60115,R=60116,j=60121,D=60128,L=60129,M=60130,F=60131;if("function"===typeof Symbol&&Symbol.for){var U=Symbol.for;E=U("react.element"),T=U("react.portal"),O=U("react.fragment"),S=U("react.strict_mode"),I=U("react.profiler"),C=U("react.provider"),k=U("react.context"),N=U("react.forward_ref"),A=U("react.suspense"),x=U("react.suspense_list"),P=U("react.memo"),R=U("react.lazy"),j=U("react.block"),U("react.scope"),D=U("react.opaque.id"),L=U("react.debug_trace_mode"),M=U("react.offscreen"),F=U("react.legacy_hidden")}var V,q="function"===typeof Symbol&&Symbol.iterator;function B(t){return null===t||"object"!==typeof t?null:"function"===typeof(t=q&&t[q]||t["@@iterator"])?t:null}function z(t){if(void 0===V)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);V=e&&e[1]||""}return"\n"+V+t}var H=!1;function W(t,e){if(!t||H)return"";H=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(e,[])}catch(u){var r=u}Reflect.construct(t,[],e)}else{try{e.call()}catch(u){r=u}t.call(e.prototype)}else{try{throw Error()}catch(u){r=u}t()}}catch(u){if(u&&r&&"string"===typeof u.stack){for(var i=u.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s])return"\n"+i[a].replace(" at new "," at ")}while(1<=a&&0<=s);break}}}finally{H=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?z(t):""}function K(t){switch(t.tag){case 5:return z(t.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 2:case 15:return t=W(t.type,!1);case 11:return t=W(t.type.render,!1);case 22:return t=W(t.type._render,!1);case 1:return t=W(t.type,!0);default:return""}}function G(t){if(null==t)return null;if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t;switch(t){case O:return"Fragment";case T:return"Portal";case I:return"Profiler";case S:return"StrictMode";case A:return"Suspense";case x:return"SuspenseList"}if("object"===typeof t)switch(t.$$typeof){case k:return(t.displayName||"Context")+".Consumer";case C:return(t._context.displayName||"Context")+".Provider";case N:var e=t.render;return e=e.displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case P:return G(t.type);case j:return G(t._render);case R:e=t._payload,t=t._init;
vendor: 5,895 bytes, line 2
2try{return G(t(e))}catch(n){}}return null}function Q(t){switch(typeof t){case"boolean":case"number":case"object":case"string":case"undefined":return t;default:return""}}function Y(t){var e=t.type;return(t=t.nodeName)&&"input"===t.toLowerCase()&&("checkbox"===e||"radio"===e)}function X(t){t._valueTracker||(t._valueTracker=function(t){var e=Y(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(t){r=""+t,o.call(this,t)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(t){r=""+t},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}(t))}function $(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=Y(t)?t.checked?"true":"false":t.value),(t=r)!==n&&(e.setValue(t),!0)}function J(t){if("undefined"===typeof(t=t||("undefined"!==typeof document?document:void 0)))return null;try{return t.activeElement||t.body}catch(e){return t.body}}function Z(t,e){var n=e.checked;return i({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:t._wrapperState.initialChecked})}function tt(t,e){var n=null==e.defaultValue?"":e.defaultValue,r=null!=e.checked?e.checked:e.defaultChecked;n=Q(null!=e.value?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===e.type||"radio"===e.type?null!=e.checked:null!=e.value}}function et(t,e){null!=(e=e.checked)&&w(t,"checked",e,!1)}function nt(t,e){et(t,e);var n=Q(e.value),r=e.type;if(null!=n)"number"===r?(0===n&&""===t.value||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if("submit"===r||"reset"===r)return void t.removeAttribute("value");e.hasOwnProperty("value")?it(t,e.type,n):e.hasOwnProperty("defaultValue")&&it(t,e.type,Q(e.defaultValue)),null==e.checked&&null!=e.defaultChecked&&(t.defaultChecked=!!e.defaultChecked)}function rt(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!("submit"!==r&&"reset"!==r||void 0!==e.value&&null!==e.value))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}""!==(n=t.name)&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,""!==n&&(t.name=n)}function it(t,e,n){"number"===e&&J(t.ownerDocument)===t||(null==n?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}function ot(t,e){return t=i({children:void 0},e),(e=function(t){var e="";return r.Children.forEach(t,(function(t){null!=t&&(e+=t)})),e}(e.children))&&(t.children=e),t}function at(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+Q(n),e=null,i=0;i<t.length;i++){if(t[i].value===n)return t[i].selected=!0,void(r&&(t[i].defaultSelected=!0));null!==e||t[i].disabled||(e=t[i])}null!==e&&(e.selected=!0)}}function st(t,e){if(null!=e.dangerouslySetInnerHTML)throw Error(a(91));return i({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function ut(t,e){var n=e.value;if(null==n){if(n=e.children,e=e.defaultValue,null!=n){if(null!=e)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}e=n}null==e&&(e=""),n=e}t._wrapperState={initialValue:Q(n)}}function ct(t,e){var n=Q(e.value),r=Q(e.defaultValue);null!=n&&((n=""+n)!==t.value&&(t.value=n),null==e.defaultValue&&t.defaultValue!==n&&(t.defaultValue=n)),null!=r&&(t.defaultValue=""+r)}function lt(t){var e=t.textContent;e===t._wrapperState.initialValue&&""!==e&&null!==e&&(t.value=e)}var ft="http://www.w3.org/1999/xhtml",ht="http://www.w3.org/2000/svg";function pt(t){switch(t){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 dt(t,e){return null==t||"http://www.w3.org/1999/xhtml"===t?pt(e):"http://www.w3.org/2000/svg"===t&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":t}var vt,yt,gt=(yt=function(t,e){if(t.namespaceURI!==ht||"innerHTML"in t)t.innerHTML=e;else{for((vt=vt||document.createElement("div")).innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=vt.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,e,n,r){MSApp.execUnsafeLocalFunction((function(){return yt(t,e)}))}:yt);function mt(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType)return void(n.nodeValue=e)}t.textContent=e}var bt={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},wt=["Webkit","ms","Moz","O"];function _t(t,e,n){return null==e||"boolean"===typeof e||""===e?"":n||"number"!==typeof e||0===e||bt.hasOwnProperty(t)&&bt[t]?(""+e).trim():e+"px"}function Et(t,e){for(var n in t=t.style,e)if(e.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=_t(n,e[n],r);"float"===n&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}Object.keys(bt).forEach((function(t){wt.forEach((function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),bt[e]=bt[t]}))}
vendor: 4,785 bytes, line 2
2));var Tt=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 Ot(t,e){if(e){if(Tt[t]&&(null!=e.children||null!=e.dangerouslySetInnerHTML))throw Error(a(137,t));if(null!=e.dangerouslySetInnerHTML){if(null!=e.children)throw Error(a(60));if("object"!==typeof e.dangerouslySetInnerHTML||!("__html"in e.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=e.style&&"object"!==typeof e.style)throw Error(a(62))}}function St(t,e){if(-1===t.indexOf("-"))return"string"===typeof e.is;switch(t){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}}function It(t){return(t=t.target||t.srcElement||window).correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}var Ct=null,kt=null,Nt=null;function At(t){if(t=ti(t)){if("function"!==typeof Ct)throw Error(a(280));var e=t.stateNode;e&&(e=ni(e),Ct(t.stateNode,t.type,e))}}function xt(t){kt?Nt?Nt.push(t):Nt=[t]:kt=t}function Pt(){if(kt){var t=kt,e=Nt;if(Nt=kt=null,At(t),e)for(t=0;t<e.length;t++)At(e[t])}}function Rt(t,e){return t(e)}function jt(t,e,n,r,i){return t(e,n,r,i)}function Dt(){}var Lt=Rt,Mt=!1,Ft=!1;function Ut(){null===kt&&null===Nt||(Dt(),Pt())}function Vt(t,e){var n=t.stateNode;if(null===n)return null;var r=ni(n);if(null===r)return null;n=r[e];t:switch(e){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"===(t=t.type)||"input"===t||"select"===t||"textarea"===t)),t=!r;break t;default:t=!1}if(t)return null;if(n&&"function"!==typeof n)throw Error(a(231,e,typeof n));return n}var qt=!1;if(f)try{var Bt={};Object.defineProperty(Bt,"passive",{get:function(){qt=!0}}),window.addEventListener("test",Bt,Bt),window.removeEventListener("test",Bt,Bt)}catch(yt){qt=!1}function zt(t,e,n,r,i,o,a,s,u){var c=Array.prototype.slice.call(arguments,3);try{e.apply(n,c)}catch(l){this.onError(l)}}var Ht=!1,Wt=null,Kt=!1,Gt=null,Qt={onError:function(t){Ht=!0,Wt=t}};function Yt(t,e,n,r,i,o,a,s,u){Ht=!1,Wt=null,zt.apply(Qt,arguments)}function Xt(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do{0!==(1026&(e=t).flags)&&(n=e.return),t=e.return}while(t)}return 3===e.tag?n:null}function $t(t){if(13===t.tag){var e=t.memoizedState;if(null===e&&(null!==(t=t.alternate)&&(e=t.memoizedState)),null!==e)return e.dehydrated}return null}function Jt(t){if(Xt(t)!==t)throw Error(a(188))}function Zt(t){if(!(t=function(t){var e=t.alternate;if(!e){if(null===(e=Xt(t)))throw Error(a(188));return e!==t?null:t}for(var n=t,r=e;;){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 Jt(i),t;if(o===r)return Jt(i),e;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?t:e}(t)))return null;for(var e=t;;){if(5===e.tag||6===e.tag)return e;if(e.child)e.child.return=e,e=e.child;else{if(e===t)break;for(;!e.sibling;){if(!e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}}return null}function te(t,e){for(var n=t.alternate;null!==e;){if(e===t||e===n)return!0;e=e.return}return!1}var ee,ne,re,ie,oe=!1,ae=[],se=null,ue=null,ce=null,le=new Map,fe=new Map,he=[],pe="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function de(t,e,n,r,i){return{blockedOn:t,domEventName:e,eventSystemFlags:16|n,nativeEvent:i,targetContainers:[r]}}function ve(t,e){switch(t){case"focusin":case"focusout":se=null;break;case"dragenter":case"dragleave":ue=null;break;case"mouseover":case"mouseout":ce=null;break;case"pointerover":case"pointerout":le.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":fe.delete(e.pointerId)}}function ye(t,e,n,r,i,o){return null===t||t.nativeEvent!==o?(t=de(e,n,r,i,o),null!==e&&(null!==(e=ti(e))&&ne(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,null!==i&&-1===e.indexOf(i)&&e.push(i),t)}function ge(t){var e=Zr(t.target);if(null!==e){var n=Xt(e);
vendor: 8,994 bytes, line 2
2if(null!==n)if(13===(e=n.tag)){if(null!==(e=$t(n)))return t.blockedOn=e,void ie(t.lanePriority,(function(){o.unstable_runWithPriority(t.priority,(function(){re(n)}))}))}else if(3===e&&n.stateNode.hydrate)return void(t.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}t.blockedOn=null}function me(t){if(null!==t.blockedOn)return!1;for(var e=t.targetContainers;0<e.length;){var n=Ze(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(null!==n)return null!==(e=ti(n))&&ne(e),t.blockedOn=n,!1;e.shift()}return!0}function be(t,e,n){me(t)&&n.delete(e)}function we(){for(oe=!1;0<ae.length;){var t=ae[0];if(null!==t.blockedOn){null!==(t=ti(t.blockedOn))&&ee(t);break}for(var e=t.targetContainers;0<e.length;){var n=Ze(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(null!==n){t.blockedOn=n;break}e.shift()}null===t.blockedOn&&ae.shift()}null!==se&&me(se)&&(se=null),null!==ue&&me(ue)&&(ue=null),null!==ce&&me(ce)&&(ce=null),le.forEach(be),fe.forEach(be)}function _e(t,e){t.blockedOn===e&&(t.blockedOn=null,oe||(oe=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,we)))}function Ee(t){function e(e){return _e(e,t)}if(0<ae.length){_e(ae[0],t);for(var n=1;n<ae.length;n++){var r=ae[n];r.blockedOn===t&&(r.blockedOn=null)}}for(null!==se&&_e(se,t),null!==ue&&_e(ue,t),null!==ce&&_e(ce,t),le.forEach(e),fe.forEach(e),n=0;n<he.length;n++)(r=he[n]).blockedOn===t&&(r.blockedOn=null);for(;0<he.length&&null===(n=he[0]).blockedOn;)ge(n),null===n.blockedOn&&he.shift()}function Te(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var Oe={animationend:Te("Animation","AnimationEnd"),animationiteration:Te("Animation","AnimationIteration"),animationstart:Te("Animation","AnimationStart"),transitionend:Te("Transition","TransitionEnd")},Se={},Ie={};function Ce(t){if(Se[t])return Se[t];if(!Oe[t])return t;var e,n=Oe[t];for(e in n)if(n.hasOwnProperty(e)&&e in Ie)return Se[t]=n[e];return t}f&&(Ie=document.createElement("div").style,"AnimationEvent"in window||(delete Oe.animationend.animation,delete Oe.animationiteration.animation,delete Oe.animationstart.animation),"TransitionEvent"in window||delete Oe.transitionend.transition);var ke=Ce("animationend"),Ne=Ce("animationiteration"),Ae=Ce("animationstart"),xe=Ce("transitionend"),Pe=new Map,Re=new Map,je=["abort","abort",ke,"animationEnd",Ne,"animationIteration",Ae,"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",xe,"transitionEnd","waiting","waiting"];function De(t,e){for(var n=0;n<t.length;n+=2){var r=t[n],i=t[n+1];i="on"+(i[0].toUpperCase()+i.slice(1)),Re.set(r,e),Pe.set(r,i),c(i,[r])}}(0,o.unstable_now)();var Le=8;function Me(t){if(0!==(1&t))return Le=15,1;if(0!==(2&t))return Le=14,2;if(0!==(4&t))return Le=13,4;var e=24&t;return 0!==e?(Le=12,e):0!==(32&t)?(Le=11,32):0!==(e=192&t)?(Le=10,e):0!==(256&t)?(Le=9,256):0!==(e=3584&t)?(Le=8,e):0!==(4096&t)?(Le=7,4096):0!==(e=4186112&t)?(Le=6,e):0!==(e=62914560&t)?(Le=5,e):67108864&t?(Le=4,67108864):0!==(134217728&t)?(Le=3,134217728):0!==(e=805306368&t)?(Le=2,e):0!==(1073741824&t)?(Le=1,1073741824):(Le=8,t)}function Fe(t,e){var n=t.pendingLanes;if(0===n)return Le=0;var r=0,i=0,o=t.expiredLanes,a=t.suspendedLanes,s=t.pingedLanes;if(0!==o)r=o,i=Le=15;else if(0!==(o=134217727&n)){var u=o&~a;0!==u?(r=Me(u),i=Le):0!==(s&=o)&&(r=Me(s),i=Le)}else 0!==(o=n&~a)?(r=Me(o),i=Le):0!==s&&(r=Me(s),i=Le);if(0===r)return 0;if(r=n&((0>(r=31-He(r))?0:1<<r)<<1)-1,0!==e&&e!==r&&0===(e&a)){if(Me(e),i<=Le)return e;Le=i}if(0!==(e=t.entangledLanes))for(t=t.entanglements,e&=r;0<e;)i=1<<(n=31-He(e)),r|=t[n],e&=~i;return r}function Ue(t){return 0!==(t=-1073741825&t.pendingLanes)?t:1073741824&t?1073741824:0}function Ve(t,e){switch(t){case 15:return 1;case 14:return 2;case 12:return 0===(t=qe(24&~e))?Ve(10,e):t;case 10:return 0===(t=qe(192&~e))?Ve(8,e):t;case 8:return 0===(t=qe(3584&~e))&&(0===(t=qe(4186112&~e))&&(t=512)),t;case 2:return 0===(e=qe(805306368&~e))&&(e=268435456),e}throw Error(a(358,t))}function qe(t){return t&-t}function Be(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function ze(t,e,n){t.pendingLanes|=e;var r=e-1;t.suspendedLanes&=r,t.pingedLanes&=r,(t=t.eventTimes)[e=31-He(e)]=n}var He=Math.clz32?Math.clz32:function(t){return 0===t?32:31-(We(t)/Ke|0)|0},We=Math.log,Ke=Math.LN2;var Ge=o.unstable_UserBlockingPriority,Qe=o.unstable_runWithPriority,Ye=!0;function Xe(t,e,n,r){Mt||Dt();var i=Je,o=Mt;Mt=!0;try{jt(i,t,e,n,r)}finally{(Mt=o)||Ut()}}function $e(t,e,n,r){Qe(Ge,Je.bind(null,t,e,n,r))}function Je(t,e,n,r){var i;if(Ye)if((i=0===(4&e))&&0<ae.length&&-1<pe.indexOf(t))t=de(null,t,e,n,r),ae.push(t);else{var o=Ze(t,e,n,r);if(null===o)i&&ve(t,r);else{if(i){if(-1<pe.indexOf(t))return t=de(o,t,e,n,r),void ae.push(t);if(function(t,e,n,r,i){switch(e){case"focusin":return se=ye(se,t,e,n,r,i),!0;case"dragenter":return ue=ye(ue,t,e,n,r,i),!0;case"mouseover":return ce=ye(ce,t,e,n,r,i),!0;case"pointerover":var o=i.pointerId;return le.set(o,ye(le.get(o)||null,t,e,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,fe.set(o,ye(fe.get(o)||null,t,e,n,r,i)),!0}return!1}(o,t,e,n,r))return;ve(t,r)}Pr(t,e,r,null,n)}}}function Ze(t,e,n,r){var i=It(r);if(null!==(i=Zr(i))){var o=Xt(i);if(null===o)i=null;else{var a=o.tag;if(13===a){if(null!==(i=$t(o)))return i;i=null}else if(3===a){if(o.stateNode.hydrate)return 3===o.tag?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null)}}return Pr(t,e,r,i,n),null}var tn=null,en=null,nn=null;function rn(){if(nn)return nn;var t,e,n=en,r=n.length,i="value"in tn?tn.value:tn.textContent,o=i.length;for(t=0;t<r&&n[t]===i[t];t++);var a=r-t;for(e=1;e<=a&&n[r-e]===i[o-e];e++);return nn=i.slice(t,1<e?1-e:void 0)}function on(t){var e=t.keyCode;return"charCode"in t?0===(t=t.charCode)&&13===e&&(t=13):t=e,10===t&&(t=13),32<=t||13===t?t:0}function an(){return!0}function sn(){return!1}function un(t){function e(e,n,r,i,o){for(var a in this._reactName=e,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,t)t.hasOwnProperty(a)&&(e=t[a],this[a]=e?e(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?an:sn,this.isPropagationStopped=sn,this}return i(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():"unknown"!==typeof t.returnValue&&(t.returnValue=!1),this.isDefaultPrevented=an)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():"unknown"!==typeof t.cancelBubble&&(t.cancelBubble=!0),this.isPropagationStopped=an)},persist:function(){},isPersistent:an}),e}var cn,ln,fn,hn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pn=un(hn),dn=i({},hn,{view:0,detail:0}),vn=un(dn),yn=i({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cn,button:0,buttons:0,relatedTarget:function(t){return void 0===t.relatedTarget?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==fn&&(fn&&"mousemove"===t.type?(cn=t.screenX-fn.screenX,ln=t.screenY-fn.screenY):ln=cn=0,fn=t),cn)},movementY:function(t){return"movementY"in t?t.movementY:ln}}),gn=un(yn),mn=un(i({},yn,{dataTransfer:0})),bn=un(i({},dn,{relatedTarget:0})),wn=un(i({},hn,{animationName:0,elapsedTime:0,pseudoElement:0})),_n=un(i({},hn,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}})),En=un(i({},hn,{data:0})),Tn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},On={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"},Sn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function In(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):!!(t=Sn[t])&&!!e[t]}function Cn(){return In}var kn=un(i({},dn,{key:function(t){if(t.key){var e=Tn[t.key]||t.key;if("Unidentified"!==e)return e}return"keypress"===t.type?13===(t=on(t))?"Enter":String.fromCharCode(t):"keydown"===t.type||"ke
2yup"===t.type?On[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cn,charCode:function(t){return"keypress"===t.type?on(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?on(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}})),Nn=un(i({},yn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),An=un(i({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cn})),xn=un(i({},hn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Pn=un(i({},yn,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0})),Rn=[9,13,27,32],jn=f&&"CompositionEvent"in window,Dn=null;f&&"documentMode"in document&&(Dn=document.documentMode);var Ln=f&&"TextEvent"in window&&!Dn,Mn=f&&(!jn||Dn&&8<Dn&&11>=Dn),Fn=String.fromCharCode(32),Un=!1;function Vn(t,e){switch(t){case"keyup":return-1!==Rn.indexOf(e.keyCode);case"keydown":return 229!==e.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qn(t){return"object"===typeof(t=t.detail)&&"data"in t?t.data:null}var Bn=!1;var zn={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 Hn(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return"input"===e?!!zn[t.type]:"textarea"===e}function Wn(t,e,n,r){xt(r),0<(e=jr(e,"onChange")).length&&(n=new pn("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var Kn=null,Gn=null;function Qn(t){Ir(t,0)}function Yn(t){if($(ei(t)))return t}function Xn(t,e){if("change"===t)return e}var $n=!1;if(f){var Jn;if(f){var Zn="oninput"in document;if(!Zn){var tr=document.createElement("div");tr.setAttribute("oninput","return;"),Zn="function"===typeof tr.oninput}Jn=Zn}else Jn=!1;$n=Jn&&(!document.documentMode||9<document.documentMode)}function er(){Kn&&(Kn.detachEvent("onpropertychange",nr),Gn=Kn=null)}function nr(t){if("value"===t.propertyName&&Yn(Gn)){var e=[];if(Wn(e,Gn,t,It(t)),t=Qn,Mt)t(e);else{Mt=!0;try{Rt(t,e)}finally{Mt=!1,Ut()}}}}function rr(t,e,n){"focusin"===t?(er(),Gn=n,(Kn=e).attachEvent("onpropertychange",nr)):"focusout"===t&&er()}function ir(t){if("selectionchange"===t||"keyup"===t||"keydown"===t)return Yn(Gn)}function or(t,e){if("click"===t)return Yn(e)}function ar(t,e){if("input"===t||"change"===t)return Yn(e)}var sr="function"===typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t===1/e)||t!==t&&e!==e},ur=Object.prototype.hasOwnProperty;function cr(t,e){if(sr(t,e))return!0;if("object"!==typeof t||null===t||"object"!==typeof e||null===e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!ur.call(e,n[r])||!sr(t[n[r]],e[n[r]]))return!1;return!0}function lr(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function fr(t,e){var n,r=lr(t);for(t=0;r;){if(3===r.nodeType){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}t:{for(;r;){if(r.nextSibling){r=r.nextSibling;break t}r=r.parentNode}r=void 0}r=lr(r)}}function hr(t,e){return!(!t||!e)&&(t===e||(!t||3!==t.nodeType)&&(e&&3===e.nodeType?hr(t,e.parentNode):"contains"in t?t.contains(e):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(e))))}function pr(){for(var t=window,e=J();e instanceof t.HTMLIFrameElement;){try{var n="string"===typeof e.contentWindow.location.href}catch(r){n=!1}if(!n)break;e=J((t=e.contentWindow).document)}return e}function dr(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&("input"===e&&("text"===t.type||"search"===t.type||"tel"===t.type||"url"===t.type||"password"===t.type)||"textarea"===e||"true"===t.contentEditable)}var vr=f&&"documentMode"in document&&11>=document.documentMode,yr=null,gr=null,mr=null,br=!1;function wr(t,e,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;br||null==yr||yr!==J(r)||("selectionStart"in(r=yr)&&dr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focu
vendor: 13,313 bytes, line 2
2sNode:r.focusNode,focusOffset:r.focusOffset},mr&&cr(mr,r)||(mr=r,0<(r=jr(gr,"onSelect")).length&&(e=new pn("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=yr)))}De("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur 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),De("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),De(je,2);for(var _r="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Er=0;Er<_r.length;Er++)Re.set(_r[Er],0);l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Tr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Or=new Set("cancel close invalid load scroll toggle".split(" ").concat(Tr));function Sr(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,function(t,e,n,r,i,o,s,u,c){if(Yt.apply(this,arguments),Ht){if(!Ht)throw Error(a(198));var l=Wt;Ht=!1,Wt=null,Kt||(Kt=!0,Gt=l)}}(r,e,void 0,t),t.currentTarget=null}function Ir(t,e){e=0!==(4&e);for(var n=0;n<t.length;n++){var r=t[n],i=r.event;r=r.listeners;t:{var o=void 0;if(e)for(var a=r.length-1;0<=a;a--){var s=r[a],u=s.instance,c=s.currentTarget;if(s=s.listener,u!==o&&i.isPropagationStopped())break t;Sr(i,s,c),o=u}else for(a=0;a<r.length;a++){if(u=(s=r[a]).instance,c=s.currentTarget,s=s.listener,u!==o&&i.isPropagationStopped())break t;Sr(i,s,c),o=u}}}if(Kt)throw t=Gt,Kt=!1,Gt=null,t}function Cr(t,e){var n=ri(e),r=t+"__bubble";n.has(r)||(xr(e,t,2,!1),n.add(r))}var kr="_reactListening"+Math.random().toString(36).slice(2);function Nr(t){t[kr]||(t[kr]=!0,s.forEach((function(e){Or.has(e)||Ar(e,!1,t,null),Ar(e,!0,t,null)})))}function Ar(t,e,n,r){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=n;if("selectionchange"===t&&9!==n.nodeType&&(o=n.ownerDocument),null!==r&&!e&&Or.has(t)){if("scroll"!==t)return;i|=2,o=r}var a=ri(o),s=t+"__"+(e?"capture":"bubble");a.has(s)||(e&&(i|=4),xr(o,t,i,e),a.add(s))}function xr(t,e,n,r){var i=Re.get(e);switch(void 0===i?2:i){case 0:i=Xe;break;case 1:i=$e;break;default:i=Je}n=i.bind(null,e,n,t),i=void 0,!qt||"touchstart"!==e&&"touchmove"!==e&&"wheel"!==e||(i=!0),r?void 0!==i?t.addEventListener(e,n,{capture:!0,passive:i}):t.addEventListener(e,n,!0):void 0!==i?t.addEventListener(e,n,{passive:i}):t.addEventListener(e,n,!1)}function Pr(t,e,n,r,i){var o=r;if(0===(1&e)&&0===(2&e)&&null!==r)t:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var u=a.tag;if((3===u||4===u)&&((u=a.stateNode.containerInfo)===i||8===u.nodeType&&u.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=Zr(s)))return;if(5===(u=a.tag)||6===u){r=o=a;continue t}s=s.parentNode}}r=r.return}!function(t,e,n){if(Ft)return t(e,n);Ft=!0;try{Lt(t,e,n)}finally{Ft=!1,Ut()}}((function(){var r=o,i=It(n),a=[];t:{var s=Pe.get(t);if(void 0!==s){var u=pn,c=t;switch(t){case"keypress":if(0===on(n))break t;case"keydown":case"keyup":u=kn;break;case"focusin":c="focus",u=bn;break;case"focusout":c="blur",u=bn;break;case"beforeblur":case"afterblur":u=bn;break;case"click":if(2===n.button)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=gn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=mn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=An;break;case ke:case Ne:case Ae:u=wn;break;case xe:u=xn;break;case"scroll":u=vn;break;case"wheel":u=Pn;break;case"copy":case"cut":case"paste":u=_n;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=Nn}var l=0!==(4&e),f=!l&&"scroll"===t,h=l?null!==s?s+"Capture":null:s;l=[];for(var p,d=r;null!==d;){var v=(p=d).stateNode;if(5===p.tag&&null!==v&&(p=v,null!==h&&(null!=(v=Vt(d,h))&&l.push(Rr(d,v,p)))),f)break;d=d.return}0<l.length&&(s=new u(s,c,null,n,i),a.push({event:s,listeners:l}))}}if(0===(7&e)){if(u="mouseout"===t||"pointerout"===t,(!(s="mouseover"===t||"pointerover"===t)||0!==(16&e)||!(c=n.relatedTarget||n.fromElement)||!Zr(c)&&!c[$r])&&(u||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,u?(u=r,null!==(c=(c=n.relatedTarget||n.toElement)?Zr(c):null)&&(c!==(f=Xt(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(u=null,c=r),u!==c)){if(l=gn,v="onMouseLeave",h="onMouseEnter",d="mouse","pointerout"!==t&&"pointerover"!==t||(l=Nn,v="onPointerLeave",h="onPointerEnter",d="pointer"),f=null==u?s:ei(u),p=null==c?s:ei(c),(s=new l(v,d+"leave",u,n,i)).target=f,s.relatedTarget=p,v=null,Zr(i)===r&&((l=new l(h,d+"enter",c,n,i)).target=p,l.relatedTarget=f,v=l),f=v,u&&c)t:{for(h=c,d=0,p=l=u;p;p=Dr(p))d++;for(p=0,v=h;v;v=Dr(v))p++;for(;0<d-p;)l=Dr(l),d--;for(;0<p-d;)h=Dr(h),p--;for(;d--;){if(l===h||null!==h&&l===h.alternate)break t;l=Dr(l),h=Dr(h)}l=null}else l=null;null!==u&&Lr(a,s,u,l,!1),null!==c&&null!==f&&Lr(a,f,c,l,!0)}if("select"===(u=(s=r?ei(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===u&&"file"===s.type)var y=Xn;else if(Hn(s))if($n)y=ar;else{y=ir;var g=rr}else(u=s.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(y=or);switch(y&&(y=y(t,r))?Wn(a,y,n,i):(g&&g(t,s,r),"focusout"===t&&(g=s._wrapperState)&&g.controlled&&"number"===s.type&&it(s,"number",s.value)),g=r?ei(r):window,t){case"focusin":(Hn(g)||"true"===g.contentEditable)&&(yr=g,gr=r,mr=null);break;case"focusout":mr=gr=yr=null;break;case"mousedown":br=!0;break;case"contextmenu":case"mouseup":case"dragend":br=!1,wr(a,n,i);break;case"selectionchange":if(vr)break;case"keydown":case"keyup":wr(a,n,i)}var m;if(jn)t:{switch(t){case"compositionstart":var b="onCompositionStart";break t;case"compositionend":b="onCompositionEnd";break t;case"compositionupdate":b="onCompositionUpdate";break t}b=void 0}else Bn?Vn(t,n)&&(b="onCompositionEnd"):"keydown"===t&&229===n.keyCode&&(b="onCompositionStart");b&&(Mn&&"ko"!==n.locale&&(Bn||"onCompositionStart"!==b?"onCompositionEnd"===b&&Bn&&(m=rn()):(en="value"in(tn=i)?tn.value:tn.textContent,Bn=!0)),0<(g=jr(r,b)).length&&(b=new En(b,t,null,n,i),a.push({event:b,listeners:g}),m?b.data=m:null!==(m=qn(n))&&(b.data=m))),(m=Ln?function(t,e){switch(t){case"compositionend":return qn(e);case"keypress":return 32!==e.which?null:(Un=!0,Fn);case"textInput":return(t=e.data)===Fn&&Un?null:t;default:return null}}(t,n):function(t,e){if(Bn)return"compositionend"===t||!jn&&Vn(t,e)?(t=rn(),nn=en=tn=null,Bn=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return Mn&&"ko"!==e.locale?null:e.data;default:return null}}(t,n))&&(0<(r=jr(r,"onBeforeInput")).length&&(i=new En("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=m))}Ir(a,e)}))}function Rr(t,e,n){return{instance:t,listener:e,currentTarget:n}}function jr(t,e){for(var n=e+"Capture",r=[];null!==t;){var i=t,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=Vt(t,n))&&r.unshift(Rr(t,o,i)),null!=(o=Vt(t,e))&&r.push(Rr(t,o,i))),t=t.return}return r}function Dr(t){if(null===t)return null;do{t=t.return}while(t&&5!==t.tag);return t||null}function Lr(t,e,n,r,i){for(var o=e._reactName,a=[];null!==n&&n!==r;){var s=n,u=s.alternate,c=s.stateNode;if(null!==u&&u===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(u=Vt(n,o))&&a.unshift(Rr(n,u,s)):i||null!=(u=Vt(n,o))&&a.push(Rr(n,u,s))),n=n.return}0!==a.length&&t.push({event:e,listeners:a})}function Mr(){}var Fr=null,Ur=null;function Vr(t,e){switch(t){case"button":case"input":case"select":case"textarea":return!!e.autoFocus}return!1}function qr(t,e){return"textarea"===t||"option"===t||"noscript"===t||"string"===typeof e.children||"number"===typeof e.children||"object"===typeof e.dangerouslySetInnerHTML&&null!==e.dangerouslySetInnerHTML&&null!=e.dangerouslySetInnerHTML.__html}var Br="function"===typeof setTimeout?setTimeout:void 0,zr="function"===typeof clearTimeout?clearTimeout:void 0;function Hr(t){1===t.nodeType?t.textContent="":9===t.nodeType&&(null!=(t=t.body)&&(t.textContent=""))}function Wr(t){for(;null!=t;t=t.nextSibling){var e=t.nodeType;if(1===e||3===e)break}return t}function Kr(t){t=t.previousSibling;for(var e=0;t;){if(8===t.nodeType){var n=t.data;if("$"===n||"$!"===n||"$?"===n){if(0===e)return t;e--}else"/$"===n&&e++}t=t.previousSibling}return null}var Gr=0;var Qr=Math.random().toString(36).slice(2),Yr="__reactFiber$"+Qr,Xr="__reactProps$"+Qr,$r="__reactContainer$"+Qr,Jr="__reactEvents$"+Qr;function Zr(t){var e=t[Yr];if(e)return e;for(var n=t.parentNode;n;){if(e=n[$r]||n[Yr]){if(n=e.alternate,null!==e.child||null!==n&&null!==n.child)for(t=Kr(t);null!==t;){if(n=t[Yr])return n;t=Kr(t)}return e}n=(t=n).parentNode}return null}function ti(t){return!(t=t[Yr]||t[$r])||5!==t.tag&&6!==t.tag&&13!==t.tag&&3!==t.tag?null:t}function ei(t){if(5===t.tag||6===t.tag)return t.stateNode;throw Error(a(33))}function ni(t){return t[Xr]||null}function ri(t){var e=t[Jr];return void 0===e&&(e=t[Jr]=new Set),e}var ii=[],oi=-1;function ai(t){return{current:t}}function si(t){0>oi||(t.current=ii[oi],ii[oi]=null,oi--)}function ui(t,e){oi++,ii[oi]=t.current,t.current=e}var ci={},li=ai(ci),fi=ai(!1),hi=ci;function pi(t,e){var n=t.type.contextTypes;if(!n)return ci;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=e[i];return r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=o),o}function di(t){return null!==(t=t.childContextTypes)&&void 0!==t}function vi(){si(fi),si(li)}function yi(t,e,n){if(li.current!==ci)throw Error(a(168));ui(li,e),ui(fi,n)}function gi(t,e,n){var r=t.stateNode;if(t=e.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(a(108,G(e)||"Unknown",o));return i({},n,r)}function mi(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||ci,hi=li.current,ui(li,t),ui(fi,fi.current),!0}function bi(t,e,n){var r=t.stateNode;if(!r)throw Error(a(169));n?(t=gi(t,e,hi),r.__reactInternalMemoizedMergedChildContext=t,si(fi),si(li),ui(li,t)):si(fi),ui(fi,n)}var wi=null,_i=null,Ei=o.unstable_runWithPriority,Ti=o.unstable_scheduleCallback,Oi=o.unstable_cancelCallback,Si=o.unstable_shouldYield,Ii=o.unstable_requestPaint,Ci=o.unstable_now,ki=o.unstable_getCurrentPriorityLevel,Ni=o.unstable_ImmediatePriority,Ai=o.unstable_UserBlockingPriority,xi=o.unstable_NormalPriority,Pi=o.unstable_LowPriority,Ri=o.unstable_IdlePriority,ji={},Di=void 0!==Ii?Ii:function(){},Li=null,Mi=null,Fi=!1,Ui=Ci(),Vi=1e4>Ui?Ci:function(){return Ci()-Ui};function qi(){switch(ki()){case Ni:return 99;case Ai:return 98;case xi:return 97;case Pi:return 96;case Ri:return 95;default:throw Error(a(332))}}function Bi(t){switch(t){case 99:return Ni;case 98:return Ai;case 97:return xi;case 96:return Pi;case 95:return Ri;default:throw Error(a(332))}}function zi(t,e){return t=Bi(t),Ei(t,e)}function Hi(t,e,n){return t=Bi(t),Ti(t,e,n)}function Wi(){if(null!==Mi){var t=Mi;Mi=null,Oi(t)}Ki()}function Ki(){if(!Fi&&null!==Li){Fi=!0;var t=0;try{var e=Li;zi(99,(function(){for(;t<e.length;t++){var n=e[t];do{n=n(!0)}while(null!==n)}})),Li=null}catch(n){throw null!==Li&&(Li=Li.slice(t+1)),Ti(Ni,Wi),n}finally{Fi=!1}}}var Gi=_.ReactCurrentBatchConfig;function Qi(t,e){if(t&&t.defaultProps){for(var n in e=i({},e),t=t.defaultProps)void 0===e[n]&&(e[n]=t[n]);return e}return e}var Yi=ai(null),Xi=null,$i=null,Ji=null;function Zi(){Ji=$i=Xi=null}function to(t){var e=Yi.current;
2si(Yi),t.type._context._currentValue=e}function eo(t,e){for(;null!==t;){var n=t.alternate;if((t.childLanes&e)===e){if(null===n||(n.childLanes&e)===e)break;n.childLanes|=e}else t.childLanes|=e,null!==n&&(n.childLanes|=e);t=t.return}}function no(t,e){Xi=t,Ji=$i=null,null!==(t=t.dependencies)&&null!==t.firstContext&&(0!==(t.lanes&e)&&(ja=!0),t.firstContext=null)}function ro(t,e){if(Ji!==t&&!1!==e&&0!==e)if("number"===typeof e&&1073741823!==e||(Ji=t,e=1073741823),e={context:t,observedBits:e,next:null},null===$i){if(null===Xi)throw Error(a(308));$i=e,Xi.dependencies={lanes:0,firstContext:e,responders:null}}else $i=$i.next=e;return t._currentValue}var io=!1;function oo(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function ao(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function so(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function uo(t,e){if(null!==(t=t.updateQueue)){var n=(t=t.shared).pending;null===n?e.next=e:(e.next=n.next,n.next=e),t.pending=e}}function co(t,e){var n=t.updateQueue,r=t.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=e:o=o.next=e}else i=o=e;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(t.updateQueue=n)}null===(t=n.lastBaseUpdate)?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function lo(t,e,n,r){var o=t.updateQueue;io=!1;var a=o.firstBaseUpdate,s=o.lastBaseUpdate,u=o.shared.pending;if(null!==u){o.shared.pending=null;var c=u,l=c.next;c.next=null,null===s?a=l:s.next=l,s=c;var f=t.alternate;if(null!==f){var h=(f=f.updateQueue).lastBaseUpdate;h!==s&&(null===h?f.firstBaseUpdate=l:h.next=l,f.lastBaseUpdate=c)}}if(null!==a){for(h=o.baseState,s=0,f=l=c=null;;){u=a.lane;var p=a.eventTime;if((r&u)===u){null!==f&&(f=f.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});t:{var d=t,v=a;switch(u=e,p=n,v.tag){case 1:if("function"===typeof(d=v.payload)){h=d.call(p,h,u);break t}h=d;break t;case 3:d.flags=-4097&d.flags|64;case 0:if(null===(u="function"===typeof(d=v.payload)?d.call(p,h,u):d)||void 0===u)break t;h=i({},h,u);break t;case 2:io=!0}}null!==a.callback&&(t.flags|=32,null===(u=o.effects)?o.effects=[a]:u.push(a))}else p={eventTime:p,lane:u,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===f?(l=f=p,c=h):f=f.next=p,s|=u;if(null===(a=a.next)){if(null===(u=o.shared.pending))break;a=u.next,u.next=null,o.lastBaseUpdate=u,o.shared.pending=null}}null===f&&(c=h),o.baseState=c,o.firstBaseUpdate=l,o.lastBaseUpdate=f,Fs|=s,t.lanes=s,t.memoizedState=h}}function fo(t,e,n){if(t=e.effects,e.effects=null,null!==t)for(e=0;e<t.length;e++){var r=t[e],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!==typeof i)throw Error(a(191,i));i.call(r)}}}var ho=(new r.Component).refs;function po(t,e,n,r){n=null===(n=n(r,e=t.memoizedState))||void 0===n?e:i({},e,n),t.memoizedState=n,0===t.lanes&&(t.updateQueue.baseState=n)}var vo={isMounted:function(t){return!!(t=t._reactInternals)&&Xt(t)===t},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=cu(),i=lu(t),o=so(r,i);o.payload=e,void 0!==n&&null!==n&&(o.callback=n),uo(t,o),fu(t,i,r)},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=cu(),i=lu(t),o=so(r,i);o.tag=1,o.payload=e,void 0!==n&&null!==n&&(o.callback=n),uo(t,o),fu(t,i,r)},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=cu(),r=lu(t),i=so(n,r);i.tag=2,void 0!==e&&null!==e&&(i.callback=e),uo(t,i),fu(t,r,n)}};function yo(t,e,n,r,i,o,a){return"function"===typeof(t=t.stateNode).shouldComponentUpdate?t.shouldComponentUpdate(r,o,a):!e.prototype||!e.prototype.isPureReactComponent||(!cr(n,r)||!cr(i,o))}function go(t,e,n){var r=!1,i=ci,o=e.contextType;return"object"===typeof o&&null!==o?o=ro(o):(i=di(e)?hi:li.current,o=(r=null!==(r=e.contextTypes)&&void 0!==r)?pi(t,i):ci),e=new e(n,o),t.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,e.updater=vo,t.stateNode=e,e._reactInternals=t,r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=o),e}function mo(t,e,n,r){t=e.state,"function"===typeof e.componentWillReceiveProps&&e.componentWillReceiveProps(n,r),"function"===typeof e.UNSAFE_componentWillReceiveProps&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&vo.enqueueReplaceState(e,e.state,null)}function bo(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs=ho,oo(t);var o=e.contextType;"object"===typeof o&&null!==o?i.context=ro(o):(o=di(e)?hi:li.current,i.context=pi(t,o)),lo(t,n,i,r),i.state=t.memoizedState,"function"===typeof(o=e.getDerivedStateFromProps)&&(po(t,e,o,n),i.state=t.memoizedState),"function"===typeof e.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(e=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),e!==i.state&&vo.enqueueReplaceState(i,i.state,null),lo(t,n,i,r),i.state=t.memoizedState),"function"===typeof i.componentDidMount&&(t.flags|=4)}var wo=Array.isArray;function _o(t,e,n){if(null!==(t=n.ref)&&"function"!==typeof t&&"object"!==typeof t){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,t));var i=""+t;return null!==e&&null!==e.ref&&"function"===typeof e.ref&&e.ref._stringRef===i?e.ref:((e=function(t){var e=r.refs;e===ho&&(e=r.refs={}),null===t?delete e[i]:e[i]=t})._stringRef=i,e)}if("string"!==typeof t)throw Error(a(284));if(!n._owner)throw Error(a(290,t))}return t}function Eo(t,e){if("textarea"!==t.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(e)?"object with keys {"+Object.keys(e).join(", ")+"}":e))}function To(t){function e(e,n){if(t){var r=e.lastEffect;null!==r?(r.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!t)return null;for(;null!==r;)e(n,r),r=r.sibling;return null}function r(t,e){for(t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function i(t,e){return(t=zu(t,e)).index=0,t.sibling=null,t}function o(e,n,r){return e.index=r,t?null!==(r=e.alternate)?(r=r.index)<n?(e.flags=2,n):r:(e.flags=2,n):n}function s(e){return t&&null===e.alternate&&(e.flags=2),e}function u(t,e,n,r){return null===e||6!==e.tag?((e=Gu(n,t.mode,r)).return=t,e):((e=i(e,n)).return=t,e)}function c(t,e,n,r){return null!==e&&e.elementType===n.type?((r=i(e,n.props)).ref=_o(t,e,n),r.return=t,r):((r=Hu(n.type,n.key,n.props,null,t.mode,r)).ref=_o(t,e,n),r.return=t,r)}function l(t,e,n,r){return null===e||4!==e.tag||e.stateNode.containerInfo!==n.containerInfo||e.stateNode.implementation!==n.implementation?((e=Qu(n,t.mode,r)).return=t,e):((e=i(e,n.children||[])).return=t,e)}function f(t,e,n,r,o){return null===e||7!==e.tag?((e=Wu(n,t.mode,r,o)).return=t,e):((e=i(e,n)).return=t,e)}function h(t,e,n){if("string"===typeof e||"number"===typeof e)return(e=Gu(""+e,t.mode,n)).return=t,e;if("object"===typeof e&&null!==e){switch(e.$$typeof){case E:return(n=Hu(e.type,e.key,e.props,null,t.mode,n)).ref=_o(t,null,e),n.return=t,n;case T:return(e=Qu(e,t.mode,n)).return=t,e}if(wo(e)||B(e))return(e=Wu(e,t.mode,n,null)).return=t,e;Eo(t,e)}return null}function p(t,e,n,r){var i=null!==e?e.key:null;if("string"===typeof n||"number"===typeof n)return null!==i?null:u(t,e,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case E:return n.key===i?n.type===O?f(t,e,n.props.children,r,i):c(t,e,n,r):null;case T:return n.key===i?l(t,e,n,r):null}if(wo(n)||B(n))return null!==i?null:f(t,e,n,r,null);Eo(t,n)}return null}function d(t,e,n,r,i){if("string"===typeof r||"number"===typeof r)return u(e,t=t.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case E:return t=t.get(null===r.key?n:r.key)||null,r.type===O?f(e,t,r.props.children,i,r.key):c(e,t,r,i);case T:return l(e,t=t.get(null===r.key?n:r.key)||null,r,i)}if(wo(r)||B(r))return f(e,t=t.get(n)||null,r,i,null);Eo(e,r)}return null}function v(i,a,s,u){for(var c=null,l=null,f=a,v=a=0,y=null;null!==f&&v<s.length;v++){f.index>
vendor: 4,132 bytes, line 2
2v?(y=f,f=null):y=f.sibling;var g=p(i,f,s[v],u);if(null===g){null===f&&(f=y);break}t&&f&&null===g.alternate&&e(i,f),a=o(g,a,v),null===l?c=g:l.sibling=g,l=g,f=y}if(v===s.length)return n(i,f),c;if(null===f){for(;v<s.length;v++)null!==(f=h(i,s[v],u))&&(a=o(f,a,v),null===l?c=f:l.sibling=f,l=f);return c}for(f=r(i,f);v<s.length;v++)null!==(y=d(f,i,v,s[v],u))&&(t&&null!==y.alternate&&f.delete(null===y.key?v:y.key),a=o(y,a,v),null===l?c=y:l.sibling=y,l=y);return t&&f.forEach((function(t){return e(i,t)})),c}function y(i,s,u,c){var l=B(u);if("function"!==typeof l)throw Error(a(150));if(null==(u=l.call(u)))throw Error(a(151));for(var f=l=null,v=s,y=s=0,g=null,m=u.next();null!==v&&!m.done;y++,m=u.next()){v.index>y?(g=v,v=null):g=v.sibling;var b=p(i,v,m.value,c);if(null===b){null===v&&(v=g);break}t&&v&&null===b.alternate&&e(i,v),s=o(b,s,y),null===f?l=b:f.sibling=b,f=b,v=g}if(m.done)return n(i,v),l;if(null===v){for(;!m.done;y++,m=u.next())null!==(m=h(i,m.value,c))&&(s=o(m,s,y),null===f?l=m:f.sibling=m,f=m);return l}for(v=r(i,v);!m.done;y++,m=u.next())null!==(m=d(v,i,y,m.value,c))&&(t&&null!==m.alternate&&v.delete(null===m.key?y:m.key),s=o(m,s,y),null===f?l=m:f.sibling=m,f=m);return t&&v.forEach((function(t){return e(i,t)})),l}return function(t,r,o,u){var c="object"===typeof o&&null!==o&&o.type===O&&null===o.key;c&&(o=o.props.children);var l="object"===typeof o&&null!==o;if(l)switch(o.$$typeof){case E:t:{for(l=o.key,c=r;null!==c;){if(c.key===l){switch(c.tag){case 7:if(o.type===O){n(t,c.sibling),(r=i(c,o.props.children)).return=t,t=r;break t}break;default:if(c.elementType===o.type){n(t,c.sibling),(r=i(c,o.props)).ref=_o(t,c,o),r.return=t,t=r;break t}}n(t,c);break}e(t,c),c=c.sibling}o.type===O?((r=Wu(o.props.children,t.mode,u,o.key)).return=t,t=r):((u=Hu(o.type,o.key,o.props,null,t.mode,u)).ref=_o(t,r,o),u.return=t,t=u)}return s(t);case T:t:{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(t,r.sibling),(r=i(r,o.children||[])).return=t,t=r;break t}n(t,r);break}e(t,r),r=r.sibling}(r=Qu(o,t.mode,u)).return=t,t=r}return s(t)}if("string"===typeof o||"number"===typeof o)return o=""+o,null!==r&&6===r.tag?(n(t,r.sibling),(r=i(r,o)).return=t,t=r):(n(t,r),(r=Gu(o,t.mode,u)).return=t,t=r),s(t);if(wo(o))return v(t,r,o,u);if(B(o))return y(t,r,o,u);if(l&&Eo(t,o),"undefined"===typeof o&&!c)switch(t.tag){case 1:case 22:case 0:case 11:case 15:throw Error(a(152,G(t.type)||"Component"))}return n(t,r)}}var Oo=To(!0),So=To(!1),Io={},Co=ai(Io),ko=ai(Io),No=ai(Io);function Ao(t){if(t===Io)throw Error(a(174));return t}function xo(t,e){switch(ui(No,e),ui(ko,t),ui(Co,Io),t=e.nodeType){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:dt(null,"");break;default:e=dt(e=(t=8===t?e.parentNode:e).namespaceURI||null,t=t.tagName)}si(Co),ui(Co,e)}function Po(){si(Co),si(ko),si(No)}function Ro(t){Ao(No.current);var e=Ao(Co.current),n=dt(e,t.type);e!==n&&(ui(ko,t),ui(Co,n))}function jo(t){ko.current===t&&(si(Co),si(ko))}var Do=ai(0);function Lo(t){for(var e=t;null!==e;){if(13===e.tag){var n=e.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return e}else if(19===e.tag&&void 0!==e.memoizedProps.revealOrder){if(0!==(64&e.flags))return e}else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Mo=null,Fo=null,Uo=!1;function Vo(t,e){var n=qu(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=e,n.return=t,n.flags=8,null!==t.lastEffect?(t.lastEffect.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n}function qo(t,e){switch(t.tag){case 5:var n=t.type;return null!==(e=1!==e.nodeType||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e)&&(t.stateNode=e,!0);case 6:return null!==(e=""===t.pendingProps||3!==e.nodeType?null:e)&&(t.stateNode=e,!0);case 13:default:return!1}}function Bo(t){if(Uo){var e=Fo;if(e){var n=e;if(!qo(t,e)){if(!(e=Wr(n.nextSibling))||!qo(t,e))return t.flags=-1025&t.flags|2,Uo=!1,void(Mo=t);Vo(Mo,n)}
vendor: 8,833 bytes, line 2
2Mo=t,Fo=Wr(e.firstChild)}else t.flags=-1025&t.flags|2,Uo=!1,Mo=t}}function zo(t){for(t=t.return;null!==t&&5!==t.tag&&3!==t.tag&&13!==t.tag;)t=t.return;Mo=t}function Ho(t){if(t!==Mo)return!1;if(!Uo)return zo(t),Uo=!0,!1;var e=t.type;if(5!==t.tag||"head"!==e&&"body"!==e&&!qr(e,t.memoizedProps))for(e=Fo;e;)Vo(t,e),e=Wr(e.nextSibling);if(zo(t),13===t.tag){if(!(t=null!==(t=t.memoizedState)?t.dehydrated:null))throw Error(a(317));t:{for(t=t.nextSibling,e=0;t;){if(8===t.nodeType){var n=t.data;if("/$"===n){if(0===e){Fo=Wr(t.nextSibling);break t}e--}else"$"!==n&&"$!"!==n&&"$?"!==n||e++}t=t.nextSibling}Fo=null}}else Fo=Mo?Wr(t.stateNode.nextSibling):null;return!0}function Wo(){Fo=Mo=null,Uo=!1}var Ko=[];function Go(){for(var t=0;t<Ko.length;t++)Ko[t]._workInProgressVersionPrimary=null;Ko.length=0}var Qo=_.ReactCurrentDispatcher,Yo=_.ReactCurrentBatchConfig,Xo=0,$o=null,Jo=null,Zo=null,ta=!1,ea=!1;function na(){throw Error(a(321))}function ra(t,e){if(null===e)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!sr(t[n],e[n]))return!1;return!0}function ia(t,e,n,r,i,o){if(Xo=o,$o=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Qo.current=null===t||null===t.memoizedState?Aa:xa,t=n(r,i),ea){o=0;do{if(ea=!1,!(25>o))throw Error(a(301));o+=1,Zo=Jo=null,e.updateQueue=null,Qo.current=Pa,t=n(r,i)}while(ea)}if(Qo.current=Na,e=null!==Jo&&null!==Jo.next,Xo=0,Zo=Jo=$o=null,ta=!1,e)throw Error(a(300));return t}function oa(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Zo?$o.memoizedState=Zo=t:Zo=Zo.next=t,Zo}function aa(){if(null===Jo){var t=$o.alternate;t=null!==t?t.memoizedState:null}else t=Jo.next;var e=null===Zo?$o.memoizedState:Zo.next;if(null!==e)Zo=e,Jo=t;else{if(null===t)throw Error(a(310));t={memoizedState:(Jo=t).memoizedState,baseState:Jo.baseState,baseQueue:Jo.baseQueue,queue:Jo.queue,next:null},null===Zo?$o.memoizedState=Zo=t:Zo=Zo.next=t}return Zo}function sa(t,e){return"function"===typeof e?e(t):e}function ua(t){var e=aa(),n=e.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=t;var r=Jo,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.lane;if((Xo&l)===l)null!==u&&(u=u.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),r=c.eagerReducer===t?c.eagerState:t(r,c.action);else{var f={lane:l,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===u?(s=u=f,o=r):u=u.next=f,$o.lanes|=l,Fs|=l}c=c.next}while(null!==c&&c!==i);null===u?o=r:u.next=s,sr(r,e.memoizedState)||(ja=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=u,n.lastRenderedState=r}return[e.memoizedState,n.dispatch]}function ca(t){var e=aa(),n=e.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,o=e.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=t(o,s.action),s=s.next}while(s!==i);sr(o,e.memoizedState)||(ja=!0),e.memoizedState=o,null===e.baseQueue&&(e.baseState=o),n.lastRenderedState=o}return[o,r]}function la(t,e,n){var r=e._getVersion;r=r(e._source);var i=e._workInProgressVersionPrimary;if(null!==i?t=i===r:(t=t.mutableReadLanes,(t=(Xo&t)===t)&&(e._workInProgressVersionPrimary=r,Ko.push(e))),t)return n(e._source);throw Ko.push(e),Error(a(350))}function fa(t,e,n,r){var i=As;if(null===i)throw Error(a(349));var o=e._getVersion,s=o(e._source),u=Qo.current,c=u.useState((function(){return la(i,e,n)})),l=c[1],f=c[0];c=Zo;var h=t.memoizedState,p=h.refs,d=p.getSnapshot,v=h.source;h=h.subscribe;var y=$o;return t.memoizedState={refs:p,source:e,subscribe:r},u.useEffect((function(){p.getSnapshot=n,p.setSnapshot=l;var t=o(e._source);if(!sr(s,t)){t=n(e._source),sr(f,t)||(l(t),t=lu(y),i.mutableReadLanes|=t&i.pendingLanes),t=i.mutableReadLanes,i.entangledLanes|=t;for(var r=i.entanglements,a=t;0<a;){var u=31-He(a),c=1<<u;r[u]|=t,a&=~c}}}),[n,e,r]),u.useEffect((function(){return r(e._source,(function(){var t=p.getSnapshot,n=p.setSnapshot;try{n(t(e._source));var r=lu(y);i.mutableReadLanes|=r&i.pendingLanes}catch(o){n((function(){throw o}))}}))}),[e,r]),sr(d,n)&&sr(v,e)&&sr(h,r)||((t={pending:null,dispatch:null,lastRenderedReducer:sa,lastRenderedState:f}).dispatch=l=ka.bind(null,$o,t),c.queue=t,c.baseQueue=null,f=la(i,e,n),c.memoizedState=c.baseState=f),f}function ha(t,e,n){return fa(aa(),t,e,n)}function pa(t){var e=oa();return"function"===typeof t&&(t=t()),e.memoizedState=e.baseState=t,t=(t=e.queue={pending:null,dispatch:null,lastRenderedReducer:sa,lastRenderedState:t}).dispatch=ka.bind(null,$o,t),[e.memoizedState,t]}function da(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},null===(e=$o.updateQueue)?(e={lastEffect:null},$o.updateQueue=e,e.lastEffect=t.next=t):null===(n=e.lastEffect)?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t),t}function va(t){return t={current:t},oa().memoizedState=t}function ya(){return aa().memoizedState}function ga(t,e,n,r){var i=oa();$o.flags|=t,i.memoizedState=da(1|e,n,void 0,void 0===r?null:r)}function ma(t,e,n,r){var i=aa();r=void 0===r?null:r;var o=void 0;if(null!==Jo){var a=Jo.memoizedState;if(o=a.destroy,null!==r&&ra(r,a.deps))return void da(e,n,o,r)}$o.flags|=t,i.memoizedState=da(1|e,n,o,r)}function ba(t,e){return ga(516,4,t,e)}function wa(t,e){return ma(516,4,t,e)}function _a(t,e){return ma(4,2,t,e)}function Ea(t,e){return"function"===typeof e?(t=t(),e(t),function(){e(null)}):null!==e&&void 0!==e?(t=t(),e.current=t,function(){e.current=null}):void 0}function Ta(t,e,n){return n=null!==n&&void 0!==n?n.concat([t]):null,ma(4,2,Ea.bind(null,e,t),n)}function Oa(){}function Sa(t,e){var n=aa();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&ra(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function Ia(t,e){var n=aa();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&ra(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function Ca(t,e){var n=qi();zi(98>n?98:n,(function(){t(!0)})),zi(97<n?97:n,(function(){var n=Yo.transition;Yo.transition=1;try{t(!1),e()}finally{Yo.transition=n}}))}function ka(t,e,n){var r=cu(),i=lu(t),o={lane:i,action:n,eagerReducer:null,eagerState:null,next:null},a=e.pending;if(null===a?o.next=o:(o.next=a.next,a.next=o),e.pending=o,a=t.alternate,t===$o||null!==a&&a===$o)ea=ta=!0;else{if(0===t.lanes&&(null===a||0===a.lanes)&&null!==(a=e.lastRenderedReducer))try{var s=e.lastRenderedState,u=a(s,n);if(o.eagerReducer=a,o.eagerState=u,sr(u,s))return}catch(c){}fu(t,i,r)}}var Na={readContext:ro,useCallback:na,useContext:na,useEffect:na,useImperativeHandle:na,useLayoutEffect:na,useMemo:na,useReducer:na,useRef:na,useState:na,useDebugValue:na,useDeferredValue:na,useTransition:na,useMutableSource:na,useOpaqueIdentifier:na,unstable_isNewReconciler:!1},Aa={readContext:ro,useCallback:function(t,e){return oa().memoizedState=[t,void 0===e?null:e],t},useContext:ro,useEffect:ba,useImperativeHandle:function(t,e,n){return n=null!==n&&void 0!==n?n.concat([t]):null,ga(4,2,Ea.bind(null,e,t),n)},useLayoutEffect:function(t,e){return ga(4,2,t,e)},useMemo:function(t,e){var n=oa();return e=void 0===e?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=oa();return e=void 0!==n?n(e):e,r.memoizedState=r.baseState=e,t=(t=r.queue={pending:null,dispatch:null,lastRenderedReducer:t,lastRenderedState:e}).dispatch=ka.bind(null,$o,t),[r.memoizedState,t]},useRef:va,useState:pa,useDebugValue:Oa,useDeferredValue:function(t){var e=pa(t),n=e[0],r=e[1];return ba((function(){var e=Yo.transition;Yo.transition=1;try{r(t)}finally{Yo.transition=e}}),[t]),n},useTransition:function(){var t=pa(!1),e=t[0];return va(t=Ca.bind(null,t[1])),[t,e]},useMutableSource:function(t,e,n){var r=oa();return r.memoizedState={refs:{getSnapshot:e,setSnapshot:null},source:t,subscribe:n},fa(r,t,e,n)},useOpaqueIdentifier:function(){if(Uo){var t=!1,e=function(t){return{$$typeof:D,toString:t,valueOf:t}}((function(){throw t||(t=!0,n("r:"+(Gr++).toString(36))),Error(a(355))})),n=pa(e)[1];return 0===(2&$o.mode)&&($o.flags|=516,da(5,(function(){n("r:"+(Gr++).toString(36))}),void 0,null)),e}return pa(e="r:"+(Gr++).toString(36)),e},unstable_isNewReconciler:!1},xa={readContext:ro,useCallback:Sa,useContext:ro,useEffect:wa,useImperativeHandle:Ta,useLayoutEffect:_a,useMemo:Ia,useReducer:ua,useRef:ya,useState:function(){return ua(sa)},useDebugValue:Oa,useDeferredValue:function(t){var e=ua(sa),n=e[0],r=e[1];return wa((function(){var e=Yo.transition;Yo.transition=1;try{r(t)}finally{Yo.transition=e}}),[t]),n},useTransition:function(){var t=ua(sa)[0];return[ya().current,t]},useMutableSource:ha,useOpaqueIdentifier:function(){return ua(sa)[0]},unstable_isNewReconciler:!1},Pa={readContext:ro,useCallback:Sa,useContext:ro,useEffect:wa,useImperativeHandle:Ta,useLayoutEffect:_a,useMemo:Ia,useReducer:ca,useRef
2:ya,useState:function(){return ca(sa)},useDebugValue:Oa,useDeferredValue:function(t){var e=ca(sa),n=e[0],r=e[1];return wa((function(){var e=Yo.transition;Yo.transition=1;try{r(t)}finally{Yo.transition=e}}),[t]),n},useTransition:function(){var t=ca(sa)[0];return[ya().current,t]},useMutableSource:ha,useOpaqueIdentifier:function(){return ca(sa)[0]},unstable_isNewReconciler:!1},Ra=_.ReactCurrentOwner,ja=!1;function Da(t,e,n,r){e.child=null===t?So(e,null,n,r):Oo(e,t.child,n,r)}function La(t,e,n,r,i){n=n.render;var o=e.ref;return no(e,i),r=ia(t,e,n,r,o,i),null===t||ja?(e.flags|=1,Da(t,e,r,i),e.child):(e.updateQueue=t.updateQueue,e.flags&=-517,t.lanes&=~i,ns(t,e,i))}function Ma(t,e,n,r,i,o){if(null===t){var a=n.type;return"function"!==typeof a||Bu(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((t=Hu(n.type,null,r,e,e.mode,o)).ref=e.ref,t.return=e,e.child=t):(e.tag=15,e.type=a,Fa(t,e,a,r,i,o))}return a=t.child,0===(i&o)&&(i=a.memoizedProps,(n=null!==(n=n.compare)?n:cr)(i,r)&&t.ref===e.ref)?ns(t,e,o):(e.flags|=1,(t=zu(a,r)).ref=e.ref,t.return=e,e.child=t)}function Fa(t,e,n,r,i,o){if(null!==t&&cr(t.memoizedProps,r)&&t.ref===e.ref){if(ja=!1,0===(o&i))return e.lanes=t.lanes,ns(t,e,o);0!==(16384&t.flags)&&(ja=!0)}return qa(t,e,n,r,o)}function Ua(t,e,n){var r=e.pendingProps,i=r.children,o=null!==t?t.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0===(4&e.mode))e.memoizedState={baseLanes:0},bu(e,n);else{if(0===(1073741824&n))return t=null!==o?o.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t},bu(e,t),null;e.memoizedState={baseLanes:0},bu(e,null!==o?o.baseLanes:n)}else null!==o?(r=o.baseLanes|n,e.memoizedState=null):r=n,bu(e,r);return Da(t,e,i,n),e.child}function Va(t,e){var n=e.ref;(null===t&&null!==n||null!==t&&t.ref!==n)&&(e.flags|=128)}function qa(t,e,n,r,i){var o=di(n)?hi:li.current;return o=pi(e,o),no(e,i),n=ia(t,e,n,r,o,i),null===t||ja?(e.flags|=1,Da(t,e,n,i),e.child):(e.updateQueue=t.updateQueue,e.flags&=-517,t.lanes&=~i,ns(t,e,i))}function Ba(t,e,n,r,i){if(di(n)){var o=!0;mi(e)}else o=!1;if(no(e,i),null===e.stateNode)null!==t&&(t.alternate=null,e.alternate=null,e.flags|=2),go(e,n,r),bo(e,n,r,i),r=!0;else if(null===t){var a=e.stateNode,s=e.memoizedProps;a.props=s;var u=a.context,c=n.contextType;"object"===typeof c&&null!==c?c=ro(c):c=pi(e,c=di(n)?hi:li.current);var l=n.getDerivedStateFromProps,f="function"===typeof l||"function"===typeof a.getSnapshotBeforeUpdate;f||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||u!==c)&&mo(e,a,r,c),io=!1;var h=e.memoizedState;a.state=h,lo(e,r,a,i),u=e.memoizedState,s!==r||h!==u||fi.current||io?("function"===typeof l&&(po(e,n,l,r),u=e.memoizedState),(s=io||yo(e,n,s,r,h,u,c))?(f||"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&&(e.flags|=4)):("function"===typeof a.componentDidMount&&(e.flags|=4),e.memoizedProps=r,e.memoizedState=u),a.props=r,a.state=u,a.context=c,r=s):("function"===typeof a.componentDidMount&&(e.flags|=4),r=!1)}else{a=e.stateNode,ao(t,e),s=e.memoizedProps,c=e.type===e.elementType?s:Qi(e.type,s),a.props=c,f=e.pendingProps,h=a.context,"object"===typeof(u=n.contextType)&&null!==u?u=ro(u):u=pi(e,u=di(n)?hi:li.current);var p=n.getDerivedStateFromProps;(l="function"===typeof p||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==f||h!==u)&&mo(e,a,r,u),io=!1,h=e.memoizedState,a.state=h,lo(e,r,a,i);var d=e.memoizedState;s!==f||h!==d||fi.current||io?("function"===typeof p&&(po(e,n,p,r),d=e.memoizedState),(c=io||yo(e,n,c,r,h,d,u))?(l||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,d,u),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,d,u)),"function"===typeof a.componentDidUpdate&&(e.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(e.flags|=256)):("function"!==typeof a.componentDidUpdate||s===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===t.memoizedProps&&h===t.memoizedState||(e.flags|=256),e.memoizedProps=r,e.memoizedState=d),a.props=r,a.state=d,a.context=u,r=c):("function"!==typeof a.componentDidUpdate||s===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===t.memoizedProps&&h===t.memoizedState||(e.flags|=256),r=!1)}return za(t,e,n,r,o,i)}function za(t,e,n,r,i,o){Va(t,e);var a=0!==(64&e.flags);if(!r&&!a)return i&&bi(e,n,!1),ns(t,e,o);r=e.stateNode,Ra.current=e;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return e.flags|=1,null!==t&&a?(e.child=Oo(e,t.child,null,o),e.child=Oo(e,null,s,o)):Da(t,e,s,o),e.memoizedState=r.state,i&&bi(e,n,!0),e.child}function Ha(t){var e=t.stateNode;e.pendingContext?yi(0,e.pendingContext,e.pendingContext!==e.context):e.context&&yi(0,e.context,!1),xo(t,e.containerInfo)}var Wa,Ka,Ga,Qa={dehydrated:null,retryLane:0};function Ya(t,e,n){var r,i=e.pendingProps,o=Do.current,a=!1;return(r=0!==(64&e.flags))||(r=(null===t||null!==t.memoizedState)&&0!==(2&o)),r?
vendor: 4,221 bytes, line 2
2(a=!0,e.flags&=-65):null!==t&&null===t.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(o|=1),ui(Do,1&o),null===t?(void 0!==i.fallback&&Bo(e),t=i.children,o=i.fallback,a?(t=Xa(e,t,o,n),e.child.memoizedState={baseLanes:n},e.memoizedState=Qa,t):"number"===typeof i.unstable_expectedLoadTime?(t=Xa(e,t,o,n),e.child.memoizedState={baseLanes:n},e.memoizedState=Qa,e.lanes=33554432,t):((n=Ku({mode:"visible",children:t},e.mode,n,null)).return=e,e.child=n)):(t.memoizedState,a?(i=Ja(t,e,i.children,i.fallback,n),a=e.child,o=t.child.memoizedState,a.memoizedState=null===o?{baseLanes:n}:{baseLanes:o.baseLanes|n},a.childLanes=t.childLanes&~n,e.memoizedState=Qa,i):(n=$a(t,e,i.children,n),e.memoizedState=null,n))}function Xa(t,e,n,r){var i=t.mode,o=t.child;return e={mode:"hidden",children:e},0===(2&i)&&null!==o?(o.childLanes=0,o.pendingProps=e):o=Ku(e,i,0,null),n=Wu(n,i,r,null),o.return=t,n.return=t,o.sibling=n,t.child=o,n}function $a(t,e,n,r){var i=t.child;return t=i.sibling,n=zu(i,{mode:"visible",children:n}),0===(2&e.mode)&&(n.lanes=r),n.return=e,n.sibling=null,null!==t&&(t.nextEffect=null,t.flags=8,e.firstEffect=e.lastEffect=t),e.child=n}function Ja(t,e,n,r,i){var o=e.mode,a=t.child;t=a.sibling;var s={mode:"hidden",children:n};return 0===(2&o)&&e.child!==a?((n=e.child).childLanes=0,n.pendingProps=s,null!==(a=n.lastEffect)?(e.firstEffect=n.firstEffect,e.lastEffect=a,a.nextEffect=null):e.firstEffect=e.lastEffect=null):n=zu(a,s),null!==t?r=zu(t,r):(r=Wu(r,o,i,null)).flags|=2,r.return=e,n.return=e,n.sibling=r,e.child=n,r}function Za(t,e){t.lanes|=e;var n=t.alternate;null!==n&&(n.lanes|=e),eo(t.return,e)}function ts(t,e,n,r,i,o){var a=t.memoizedState;null===a?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,lastEffect:o}:(a.isBackwards=e,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i,a.lastEffect=o)}function es(t,e,n){var r=e.pendingProps,i=r.revealOrder,o=r.tail;if(Da(t,e,r.children,n),0!==(2&(r=Do.current)))r=1&r|2,e.flags|=64;else{if(null!==t&&0!==(64&t.flags))t:for(t=e.child;null!==t;){if(13===t.tag)null!==t.memoizedState&&Za(t,n);else if(19===t.tag)Za(t,n);else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;null===t.sibling;){if(null===t.return||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(ui(Do,r),0===(2&e.mode))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;null!==n;)null!==(t=n.alternate)&&null===Lo(t)&&(i=n),n=n.sibling;null===(n=i)?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),ts(e,!1,i,n,o,e.lastEffect);break;case"backwards":for(n=null,i=e.child,e.child=null;null!==i;){if(null!==(t=i.alternate)&&null===Lo(t)){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}ts(e,!0,n,null,o,e.lastEffect);break;case"together":ts(e,!1,null,null,void 0,e.lastEffect);break;default:e.memoizedState=null}return e.child}function ns(t,e,n){if(null!==t&&(e.dependencies=t.dependencies),Fs|=e.lanes,0!==(n&e.childLanes)){if(null!==t&&e.child!==t.child)throw Error(a(153));if(null!==e.child){for(n=zu(t=e.child,t.pendingProps),e.child=n,n.return=e;null!==t.sibling;)t=t.sibling,(n=n.sibling=zu(t,t.pendingProps)).return=e;n.sibling=null}return e.child}return null}function rs(t,e){if(!Uo)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;null!==e;)null!==e.alternate&&(n=e),e=e.sibling;null===n?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?e||null===t.tail?t.tail=null:t.tail.sibling=null:r.sibling=null}}function is(t,e,n){var r=e.pendingProps;switch(e.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 di(e.type)&&vi(),null;case 3:return Po(),si(fi),si(li),Go(),(r=e.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==t&&null!==t.child||(Ho(e)?e.flags|=4:r.hydrate||(e.flags|=256)),null;case 5:jo(e);var o=Ao(No.current);if(n=e.type,null!==t&&null!=e.stateNode)Ka(t,e,n,r),t.ref!==e.ref&&(e.flags|=128);else{if(!r){if(null===e.stateNode)throw Error(a(166));return null}if(t=Ao(Co.current),Ho(e)){r=e.stateNode,n=e.type;var s=e.memoizedProps;
2switch(r[Yr]=e,r[Xr]=s,n){case"dialog":Cr("cancel",r),Cr("close",r);break;case"iframe":case"object":case"embed":Cr("load",r);break;case"video":case"audio":for(t=0;t<Tr.length;t++)Cr(Tr[t],r);break;case"source":Cr("error",r);break;case"img":case"image":case"link":Cr("error",r),Cr("load",r);break;case"details":Cr("toggle",r);break;case"input":tt(r,s),Cr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Cr("invalid",r);break;case"textarea":ut(r,s),Cr("invalid",r)}for(var c in Ot(n,s),t=null,s)s.hasOwnProperty(c)&&(o=s[c],"children"===c?"string"===typeof o?r.textContent!==o&&(t=["children",o]):"number"===typeof o&&r.textContent!==""+o&&(t=["children",""+o]):u.hasOwnProperty(c)&&null!=o&&"onScroll"===c&&Cr("scroll",r));switch(n){case"input":X(r),rt(r,s,!0);break;case"textarea":X(r),lt(r);break;case"select":case"option":break;default:"function"===typeof s.onClick&&(r.onclick=Mr)}r=t,e.updateQueue=r,null!==r&&(e.flags|=4)}else{switch(c=9===o.nodeType?o:o.ownerDocument,t===ft&&(t=pt(n)),t===ft?"script"===n?((t=c.createElement("div")).innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):"string"===typeof r.is?t=c.createElement(n,{is:r.is}):(t=c.createElement(n),"select"===n&&(c=t,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):t=c.createElementNS(t,n),t[Yr]=e,t[Xr]=r,Wa(t,e),e.stateNode=t,c=St(n,r),n){case"dialog":Cr
vendor: 7,676 bytes, line 2
2("cancel",t),Cr("close",t),o=r;break;case"iframe":case"object":case"embed":Cr("load",t),o=r;break;case"video":case"audio":for(o=0;o<Tr.length;o++)Cr(Tr[o],t);o=r;break;case"source":Cr("error",t),o=r;break;case"img":case"image":case"link":Cr("error",t),Cr("load",t),o=r;break;case"details":Cr("toggle",t),o=r;break;case"input":tt(t,r),o=Z(t,r),Cr("invalid",t);break;case"option":o=ot(t,r);break;case"select":t._wrapperState={wasMultiple:!!r.multiple},o=i({},r,{value:void 0}),Cr("invalid",t);break;case"textarea":ut(t,r),o=st(t,r),Cr("invalid",t);break;default:o=r}Ot(n,o);var l=o;for(s in l)if(l.hasOwnProperty(s)){var f=l[s];"style"===s?Et(t,f):"dangerouslySetInnerHTML"===s?null!=(f=f?f.__html:void 0)&>(t,f):"children"===s?"string"===typeof f?("textarea"!==n||""!==f)&&mt(t,f):"number"===typeof f&&mt(t,""+f):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(u.hasOwnProperty(s)?null!=f&&"onScroll"===s&&Cr("scroll",t):null!=f&&w(t,s,f,c))}switch(n){case"input":X(t),rt(t,r,!1);break;case"textarea":X(t),lt(t);break;case"option":null!=r.value&&t.setAttribute("value",""+Q(r.value));break;case"select":t.multiple=!!r.multiple,null!=(s=r.value)?at(t,!!r.multiple,s,!1):null!=r.defaultValue&&at(t,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof o.onClick&&(t.onclick=Mr)}Vr(n,r)&&(e.flags|=4)}null!==e.ref&&(e.flags|=128)}return null;case 6:if(t&&null!=e.stateNode)Ga(0,e,t.memoizedProps,r);else{if("string"!==typeof r&&null===e.stateNode)throw Error(a(166));n=Ao(No.current),Ao(Co.current),Ho(e)?(r=e.stateNode,n=e.memoizedProps,r[Yr]=e,r.nodeValue!==n&&(e.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Yr]=e,e.stateNode=r)}return null;case 13:return si(Do),r=e.memoizedState,0!==(64&e.flags)?(e.lanes=n,e):(r=null!==r,n=!1,null===t?void 0!==e.memoizedProps.fallback&&Ho(e):n=null!==t.memoizedState,r&&!n&&0!==(2&e.mode)&&(null===t&&!0!==e.memoizedProps.unstable_avoidThisFallback||0!==(1&Do.current)?0===Ds&&(Ds=3):(0!==Ds&&3!==Ds||(Ds=4),null===As||0===(134217727&Fs)&&0===(134217727&Us)||vu(As,Ps))),(r||n)&&(e.flags|=4),null);case 4:return Po(),null===t&&Nr(e.stateNode.containerInfo),null;case 10:return to(e),null;case 17:return di(e.type)&&vi(),null;case 19:if(si(Do),null===(r=e.memoizedState))return null;if(s=0!==(64&e.flags),null===(c=r.rendering))if(s)rs(r,!1);else{if(0!==Ds||null!==t&&0!==(64&t.flags))for(t=e.child;null!==t;){if(null!==(c=Lo(t))){for(e.flags|=64,rs(r,!1),null!==(s=c.updateQueue)&&(e.updateQueue=s,e.flags|=4),null===r.lastEffect&&(e.firstEffect=null),e.lastEffect=r.lastEffect,r=n,n=e.child;null!==n;)t=r,(s=n).flags&=2,s.nextEffect=null,s.firstEffect=null,s.lastEffect=null,null===(c=s.alternate)?(s.childLanes=0,s.lanes=t,s.child=null,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,t=c.dependencies,s.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return ui(Do,1&Do.current|2),e.child}t=t.sibling}null!==r.tail&&Vi()>zs&&(e.flags|=64,s=!0,rs(r,!1),e.lanes=33554432)}else{if(!s)if(null!==(t=Lo(c))){if(e.flags|=64,s=!0,null!==(n=t.updateQueue)&&(e.updateQueue=n,e.flags|=4),rs(r,!0),null===r.tail&&"hidden"===r.tailMode&&!c.alternate&&!Uo)return null!==(e=e.lastEffect=r.lastEffect)&&(e.nextEffect=null),null}else 2*Vi()-r.renderingStartTime>zs&&1073741824!==n&&(e.flags|=64,s=!0,rs(r,!1),e.lanes=33554432);r.isBackwards?(c.sibling=e.child,e.child=c):(null!==(n=r.last)?n.sibling=c:e.child=c,r.last=c)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=e.lastEffect,r.renderingStartTime=Vi(),n.sibling=null,e=Do.current,ui(Do,s?1&e|2:1&e),n):null;case 23:case 24:return wu(),null!==t&&null!==t.memoizedState!==(null!==e.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(e.flags|=4),null}throw Error(a(156,e.tag))}function os(t){switch(t.tag){case 1:di(t.type)&&vi();var e=t.flags;return 4096&e?(t.flags=-4097&e|64,t):null;case 3:if(Po(),si(fi),si(li),Go(),0!==(64&(e=t.flags)))throw Error(a(285));return t.flags=-4097&e|64,t;case 5:return jo(t),null;case 13:return si(Do),4096&(e=t.flags)?(t.flags=-4097&e|64,t):null;case 19:return si(Do),null;case 4:return Po(),null;case 10:return to(t),null;case 23:case 24:return wu(),null;default:return null}}function as(t,e){try{var n="",r=e;do{n+=K(r),r=r.return}while(r);var i=n}catch(o){i="\nError generating stack: "+o.message+"\n"+o.stack}return{value:t,source:e,stack:i}}function ss(t,e){try{console.error(e.value)}catch(n){setTimeout((function(){throw n}))}}Wa=function(t,e){for(var n=e.child;null!==n;){if(5===n.tag||6===n.tag)t.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ka=function(t,e,n,r){var o=t.memoizedProps;if(o!==r){t=e.stateNode,Ao(Co.current);var a,s=null;switch(n){case"input":o=Z(t,o),r=Z(t,r),s=[];break;case"option":o=ot(t,o),r=ot(t,r),s=[];break;case"select":o=i({},o,{value:void 0}),r=i({},r,{value:void 0}),s=[];break;case"textarea":o=st(t,o),r=st(t,r),s=[];break;default:"function"!==typeof o.onClick&&"function"===typeof r.onClick&&(t.onclick=Mr)}for(f in Ot(n,r),n=null,o)if(!r.hasOwnProperty(f)&&o.hasOwnProperty(f)&&null!=o[f])if("style"===f){var c=o[f];for(a in c)c.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==f&&"children"!==f&&"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(u.hasOwnProperty(f)?s||(s=[]):(s=s||[]).push(f,null));for(f in r){var l=r[f];if(c=null!=o?o[f]:void 0,r.hasOwnProperty(f)&&l!==c&&(null!=l||null!=c))if("style"===f)if(c){for(a in c)!c.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&c[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(s||(s=[]),s.push(f,n)),n=l;else"dangerouslySetInnerHTML"===f?(l=l?l.__html:void 0,c=c?c.__html:void 0,null!=l&&c!==l&&(s=s||[]).push(f,l)):"children"===f?"string"!==typeof l&&"number"!==typeof l||(s=s||[]).push(f,""+l):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&(u.hasOwnProperty(f)?(null!=l&&"onScroll"===f&&Cr("scroll",t),s||c===l||(s=[])):"object"===typeof l&&null!==l&&l.$$typeof===D?l.toString():(s=s||[]).push(f,l))}n&&(s=s||[]).push("style",n);var f=s;(e.updateQueue=f)&&(e.flags|=4)}},Ga=function(t,e,n,r){n!==r&&(e.flags|=4)};var us="function"===typeof WeakMap?WeakMap:Map;function cs(t,e,n){(n=so(-1,n)).tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){Gs||(Gs=!0,Qs=r),ss(0,e)},n}function ls(t,e,n){(n=so(-1,n)).tag=3;var r=t.type.getDerivedStateFromError;if("function"===typeof r){var i=e.value;n.payload=function(){return ss(0,e),r(i)}}var o=t.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(n.callback=function(){"function"!==typeof r&&(null===Ys?Ys=new Set([this]):Ys.add(this),ss(0,e));var t=e.stack;this.componentDidCatch(e.value,{componentStack:null!==t?t:""})}),n}var fs="function"===typeof WeakSet?WeakSet:Set;function hs(t){var e=t.ref;if(null!==e)if("function"===typeof e)try{e(null)}catch(n){Mu(t,n)}else e.current=null}function ps(t,e){switch(e.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&e.flags&&null!==t){var n=t.memoizedProps,r=t.memoizedState;e=(t=e.stateNode).getSnapshotBeforeUpdate(e.elementType===e.type?n:Qi(e.type,n),r),t.__reactInternalSnapshotBeforeUpdate=e}return;case 3:return void(256&e.flags&&Hr(e.stateNode.containerInfo));
vendor: 4,942 bytes, line 2
2case 5:case 6:case 4:case 17:return}throw Error(a(163))}function ds(t,e,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(e=null!==(e=n.updateQueue)?e.lastEffect:null)){t=e=e.next;do{if(3===(3&t.tag)){var r=t.create;t.destroy=r()}t=t.next}while(t!==e)}if(null!==(e=null!==(e=n.updateQueue)?e.lastEffect:null)){t=e=e.next;do{var i=t;r=i.next,0!==(4&(i=i.tag))&&0!==(1&i)&&(ju(n,t),Ru(n,t)),t=r}while(t!==e)}return;case 1:return t=n.stateNode,4&n.flags&&(null===e?t.componentDidMount():(r=n.elementType===n.type?e.memoizedProps:Qi(n.type,e.memoizedProps),t.componentDidUpdate(r,e.memoizedState,t.__reactInternalSnapshotBeforeUpdate))),void(null!==(e=n.updateQueue)&&fo(n,e,t));case 3:if(null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}fo(n,e,t)}return;case 5:return t=n.stateNode,void(null===e&&4&n.flags&&Vr(n.type,n.memoizedProps)&&t.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&&Ee(n)))));case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(a(163))}function vs(t,e){for(var n=t;;){if(5===n.tag){var r=n.stateNode;if(e)"function"===typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var i=n.memoizedProps.style;i=void 0!==i&&null!==i&&i.hasOwnProperty("display")?i.display:null,r.style.display=_t("display",i)}}else if(6===n.tag)n.stateNode.nodeValue=e?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===t)&&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}}function ys(t,e){if(_i&&"function"===typeof _i.onCommitFiberUnmount)try{_i.onCommitFiberUnmount(wi,e)}catch(o){}switch(e.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(t=e.updateQueue)&&null!==(t=t.lastEffect)){var n=t=t.next;do{var r=n,i=r.destroy;if(r=r.tag,void 0!==i)if(0!==(4&r))ju(e,n);else{r=e;try{i()}catch(o){Mu(r,o)}}n=n.next}while(n!==t)}break;case 1:if(hs(e),"function"===typeof(t=e.stateNode).componentWillUnmount)try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(o){Mu(e,o)}break;case 5:hs(e);break;case 4:Es(t,e)}}function gs(t){t.alternate=null,t.child=null,t.dependencies=null,t.firstEffect=null,t.lastEffect=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.return=null,t.updateQueue=null}function ms(t){return 5===t.tag||3===t.tag||4===t.tag}function bs(t){t:{for(var e=t.return;null!==e;){if(ms(e))break t;e=e.return}throw Error(a(160))}var n=e;switch(e=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:e=e.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.flags&&(mt(e,""),n.flags&=-17);t:e:for(n=t;;){for(;null===n.sibling;){if(null===n.return||ms(n.return)){n=null;break t}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue e;if(null===n.child||4===n.tag)continue e;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break t}}r?ws(t,n,e):_s(t,n,e)}function ws(t,e,n){var r=t.tag,i=5===r||6===r;if(i)t=i?t.stateNode:t.stateNode.instance,e?8===n.nodeType?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(8===n.nodeType?(e=n.parentNode).insertBefore(t,n):(e=n).appendChild(t),null!==(n=n._reactRootContainer)&&void 0!==n||null!==e.onclick||(e.onclick=Mr));else if(4!==r&&null!==(t=t.child))for(ws(t,e,n),t=t.sibling;null!==t;)ws(t,e,n),t=t.sibling}function _s(t,e,n){var r=t.tag,i=5===r||6===r;if(i)t=i?t.stateNode:t.stateNode.instance,e?n.insertBefore(t,e):n.appendChild(t);else if(4!==r&&null!==(t=t.child))for(_s(t,e,n),t=t.sibling;null!==t;)_s(t,e,n),t=t.sibling}function Es(t,e){for(var n,r,i=e,o=!1;;){if(!o){o=i.return;t:for(;;){if(null===o)throw Error(a(160));switch(n=o.stateNode,o.tag){case 5:r=!1;break t;case 3:case 4:n=n.containerInfo,r=!0;break t}o=o.return}o=!0}if(5===i.tag||6===i.tag){t:for(var s=t,u=i,c=u;;)if(ys(s,c),null!==c.child&&4!==c.tag)c.child.return=c,c=c.child;else{if(c===u)break t;for(;null===c.sibling;){if(null===c.return||c.return===u)break t;c=c.return}c.sibling.return=c.return,c=c.sibling}r?(s=n,u=i.stateNode,8===s.nodeType?s.parentNode.removeChild(u):s.removeChild(u)):n.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){n=i.stateNode.containerInfo,r=!0,i.child.return=i,i=i.child;continue}}else if(ys(t,i),null!==i.child){i.child.return=i,i=i.child;continue}if(i===e)break;for(;null===i.sibling;){if(null===i.return||i.return===e)return;4===(i=i.return).tag&&(o=!1)}i.sibling.return=i.return,i=i.sibling}}function Ts(t,e){switch(e.tag){case 0:case 11:case 14:case 15:case 22:var n=e.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3===(3&r.tag)&&(t=r.destroy,r.destroy=void 0,void 0!==t&&t()),r=r.next}
vendor: 7,797 bytes, line 2
2while(r!==n)}return;case 1:return;case 5:if(null!=(n=e.stateNode)){r=e.memoizedProps;var i=null!==t?t.memoizedProps:r;t=e.type;var o=e.updateQueue;if(e.updateQueue=null,null!==o){for(n[Xr]=r,"input"===t&&"radio"===r.type&&null!=r.name&&et(n,r),St(t,i),e=St(t,r),i=0;i<o.length;i+=2){var s=o[i],u=o[i+1];"style"===s?Et(n,u):"dangerouslySetInnerHTML"===s?gt(n,u):"children"===s?mt(n,u):w(n,s,u,e)}switch(t){case"input":nt(n,r);break;case"textarea":ct(n,r);break;case"select":t=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(o=r.value)?at(n,!!r.multiple,o,!1):t!==!!r.multiple&&(null!=r.defaultValue?at(n,!!r.multiple,r.defaultValue,!0):at(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===e.stateNode)throw Error(a(162));return void(e.stateNode.nodeValue=e.memoizedProps);case 3:return void((n=e.stateNode).hydrate&&(n.hydrate=!1,Ee(n.containerInfo)));case 12:return;case 13:return null!==e.memoizedState&&(Bs=Vi(),vs(e.child,!0)),void Os(e);case 19:return void Os(e);case 17:return;case 23:case 24:return void vs(e,null!==e.memoizedState)}throw Error(a(163))}function Os(t){var e=t.updateQueue;if(null!==e){t.updateQueue=null;var n=t.stateNode;null===n&&(n=t.stateNode=new fs),e.forEach((function(e){var r=Uu.bind(null,t,e);n.has(e)||(n.add(e),e.then(r,r))}))}}function Ss(t,e){return null!==t&&(null===(t=t.memoizedState)||null!==t.dehydrated)&&(null!==(e=e.memoizedState)&&null===e.dehydrated)}var Is=Math.ceil,Cs=_.ReactCurrentDispatcher,ks=_.ReactCurrentOwner,Ns=0,As=null,xs=null,Ps=0,Rs=0,js=ai(0),Ds=0,Ls=null,Ms=0,Fs=0,Us=0,Vs=0,qs=null,Bs=0,zs=1/0;function Hs(){zs=Vi()+500}var Ws,Ks=null,Gs=!1,Qs=null,Ys=null,Xs=!1,$s=null,Js=90,Zs=[],tu=[],eu=null,nu=0,ru=null,iu=-1,ou=0,au=0,su=null,uu=!1;function cu(){return 0!==(48&Ns)?Vi():-1!==iu?iu:iu=Vi()}function lu(t){if(0===(2&(t=t.mode)))return 1;if(0===(4&t))return 99===qi()?1:2;if(0===ou&&(ou=Ms),0!==Gi.transition){0!==au&&(au=null!==qs?qs.pendingLanes:0),t=ou;var e=4186112&~au;return 0===(e&=-e)&&(0===(e=(t=4186112&~t)&-t)&&(e=8192)),e}return t=qi(),0!==(4&Ns)&&98===t?t=Ve(12,ou):t=Ve(t=function(t){switch(t){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(t),ou),t}function fu(t,e,n){if(50<nu)throw nu=0,ru=null,Error(a(185));if(null===(t=hu(t,e)))return null;ze(t,e,n),t===As&&(Us|=e,4===Ds&&vu(t,Ps));var r=qi();1===e?0!==(8&Ns)&&0===(48&Ns)?yu(t):(pu(t,n),0===Ns&&(Hs(),Wi())):(0===(4&Ns)||98!==r&&99!==r||(null===eu?eu=new Set([t]):eu.add(t)),pu(t,n)),qs=t}function hu(t,e){t.lanes|=e;var n=t.alternate;for(null!==n&&(n.lanes|=e),n=t,t=t.return;null!==t;)t.childLanes|=e,null!==(n=t.alternate)&&(n.childLanes|=e),n=t,t=t.return;return 3===n.tag?n.stateNode:null}function pu(t,e){for(var n=t.callbackNode,r=t.suspendedLanes,i=t.pingedLanes,o=t.expirationTimes,s=t.pendingLanes;0<s;){var u=31-He(s),c=1<<u,l=o[u];if(-1===l){if(0===(c&r)||0!==(c&i)){l=e,Me(c);var f=Le;o[u]=10<=f?l+250:6<=f?l+5e3:-1}}else l<=e&&(t.expiredLanes|=c);s&=~c}if(r=Fe(t,t===As?Ps:0),e=Le,0===r)null!==n&&(n!==ji&&Oi(n),t.callbackNode=null,t.callbackPriority=0);else{if(null!==n){if(t.callbackPriority===e)return;n!==ji&&Oi(n)}15===e?(n=yu.bind(null,t),null===Li?(Li=[n],Mi=Ti(Ni,Ki)):Li.push(n),n=ji):14===e?n=Hi(99,yu.bind(null,t)):n=Hi(n=function(t){switch(t){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(a(358,t))}}(e),du.bind(null,t)),t.callbackPriority=e,t.callbackNode=n}}function du(t){if(iu=-1,au=ou=0,0!==(48&Ns))throw Error(a(327));var e=t.callbackNode;if(Pu()&&t.callbackNode!==e)return null;var n=Fe(t,t===As?Ps:0);if(0===n)return null;var r=n,i=Ns;Ns|=16;var o=Tu();for(As===t&&Ps===r||(Hs(),_u(t,r));;)try{Iu();break}catch(u){Eu(t,u)}if(Zi(),Cs.current=o,Ns=i,null!==xs?r=0:(As=null,Ps=0,r=Ds),0!==(Ms&Us))_u(t,0);else if(0!==r){if(2===r&&(Ns|=64,t.hydrate&&(t.hydrate=!1,Hr(t.containerInfo)),0!==(n=Ue(t))&&(r=Ou(t,n))),1===r)throw e=Ls,_u(t,0),vu(t,n),pu(t,Vi()),e;switch(t.finishedWork=t.current.alternate,t.finishedLanes=n,r){case 0:case 1:throw Error(a(345));case 2:Nu(t);break;case 3:if(vu(t,n),(62914560&n)===n&&10<(r=Bs+500-Vi())){if(0!==Fe(t,0))break;if(((i=t.suspendedLanes)&n)!==n){cu(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=Br(Nu.bind(null,t),r);break}Nu(t);break;case 4:if(vu(t,n),(4186112&n)===n)break;for(r=t.eventTimes,i=-1;0<n;){var s=31-He(n);o=1<<s,(s=r[s])>i&&(i=s),n&=~o}if(n=i,10<(n=(120>(n=Vi()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Is(n/1960))-n)){t.timeoutHandle=Br(Nu.bind(null,t),n);break}Nu(t);break;case 5:Nu(t);break;default:throw Error(a(329))}}return pu(t,Vi()),t.callbackNode===e?du.bind(null,t):null}function vu(t,e){for(e&=~Vs,e&=~Us,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-He(e),r=1<<n;t[n]=-1,e&=~r}}function yu(t){if(0!==(48&Ns))throw Error(a(327));if(Pu(),t===As&&0!==(t.expiredLanes&Ps)){var e=Ps,n=Ou(t,e);0!==(Ms&Us)&&(n=Ou(t,e=Fe(t,e)))}else n=Ou(t,e=Fe(t,0));if(0!==t.tag&&2===n&&(Ns|=64,t.hydrate&&(t.hydrate=!1,Hr(t.containerInfo)),0!==(e=Ue(t))&&(n=Ou(t,e))),1===n)throw n=Ls,_u(t,0),vu(t,e),pu(t,Vi()),n;return t.finishedWork=t.current.alternate,t.finishedLanes=e,Nu(t),pu(t,Vi()),null}function gu(t,e){var n=Ns;Ns|=1;try{return t(e)}finally{0===(Ns=n)&&(Hs(),Wi())}}function mu(t,e){var n=Ns;Ns&=-2,Ns|=8;try{return t(e)}finally{0===(Ns=n)&&(Hs(),Wi())}}function bu(t,e){ui(js,Rs),Rs|=e,Ms|=e}function wu(){Rs=js.current,si(js)}function _u(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(-1!==n&&(t.timeoutHandle=-1,zr(n)),null!==xs)for(n=xs.return;null!==n;){var r=n;switch(r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&vi();break;case 3:Po(),si(fi),si(li),Go();break;case 5:jo(r);break;case 4:Po();break;case 13:case 19:si(Do);break;case 10:to(r);break;case 23:case 24:wu()}n=n.return}As=t,xs=zu(t.current,null),Ps=Rs=Ms=e,Ds=0,Ls=null,Vs=Us=Fs=0}function Eu(t,e){for(;;){var n=xs;try{if(Zi(),Qo.current=Na,ta){for(var r=$o.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}ta=!1}if(Xo=0,Zo=Jo=$o=null,ea=!1,ks.current=null,null===n||null===n.return){Ds=1,Ls=e,xs=null;break}t:{var o=t,a=n.return,s=n,u=e;if(e=Ps,s.flags|=2048,s.firstEffect=s.lastEffect=null,null!==u&&"object"===typeof u&&"function"===typeof u.then){var c=u;if(0===(2&s.mode)){var l=s.alternate;l?(s.updateQueue=l.updateQueue,s.memoizedState=l.memoizedState,s.lanes=l.lanes):(s.updateQueue=null,s.memoizedState=null)}var f=0!==(1&Do.current),h=a;do{var p;if(p=13===h.tag){var d=h.memoizedState;if(null!==d)p=null!==d.dehydrated;else{var v=h.memoizedProps;p=void 0!==v.fallback&&(!0!==v.unstable_avoidThisFallback||!f)}}if(p){var y=h.updateQueue;if(null===y){var g=new Set;g.add(c),h.updateQueue=g}else y.add(c);if(0===(2&h.mode)){if(h.flags|=64,s.flags|=16384,s.flags&=-2981,1===s.tag)if(null===s.alternate)s.tag=17;else{var m=so(-1,1);m.tag=2,uo(s,m)}s.lanes|=1;break t}u=void 0,s=e;var b=o.pingCache;if(null===b?(b=o.pingCache=new us,u=new Set,b.set(c,u)):void 0===(u=b.get(c))&&(u=new Set,b.set(c,u)),!u.has(s)){u.add(s);var w=Fu.bind(null,o,c,s);c.then(w,w)}h.flags|=4096,h.lanes=e;break t}h=h.return}while(null!==h);u=Error((G(s.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.")}5!==Ds&&(Ds=2),u=as(u,s),h=a;do{switch(h.tag){case 3:o=u,h.flags|=4096,e&=-e,h.lanes|=e,co(h,cs(0,o,e));break t;case 1:o=u;var _=h.type,E=h.stateNode;if(0===(64&h.flags)&&("function"===typeof _.getDerivedStateFromError||null!==E&&"function"===typeof E.componentDidCatch&&(null===Ys||!Ys.has(E))
vendor: 4,459 bytes, line 2
2)){h.flags|=4096,e&=-e,h.lanes|=e,co(h,ls(h,o,e));break t}}h=h.return}while(null!==h)}ku(n)}catch(T){e=T,xs===n&&null!==n&&(xs=n=n.return);continue}break}}function Tu(){var t=Cs.current;return Cs.current=Na,null===t?Na:t}function Ou(t,e){var n=Ns;Ns|=16;var r=Tu();for(As===t&&Ps===e||_u(t,e);;)try{Su();break}catch(i){Eu(t,i)}if(Zi(),Ns=n,Cs.current=r,null!==xs)throw Error(a(261));return As=null,Ps=0,Ds}function Su(){for(;null!==xs;)Cu(xs)}function Iu(){for(;null!==xs&&!Si();)Cu(xs)}function Cu(t){var e=Ws(t.alternate,t,Rs);t.memoizedProps=t.pendingProps,null===e?ku(t):xs=e,ks.current=null}function ku(t){var e=t;do{var n=e.alternate;if(t=e.return,0===(2048&e.flags)){if(null!==(n=is(n,e,Rs)))return void(xs=n);if(24!==(n=e).tag&&23!==n.tag||null===n.memoizedState||0!==(1073741824&Rs)||0===(4&n.mode)){for(var r=0,i=n.child;null!==i;)r|=i.lanes|i.childLanes,i=i.sibling;n.childLanes=r}null!==t&&0===(2048&t.flags)&&(null===t.firstEffect&&(t.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==t.lastEffect&&(t.lastEffect.nextEffect=e.firstEffect),t.lastEffect=e.lastEffect),1<e.flags&&(null!==t.lastEffect?t.lastEffect.nextEffect=e:t.firstEffect=e,t.lastEffect=e))}else{if(null!==(n=os(e)))return n.flags&=2047,void(xs=n);null!==t&&(t.firstEffect=t.lastEffect=null,t.flags|=2048)}if(null!==(e=e.sibling))return void(xs=e);xs=e=t}while(null!==e);0===Ds&&(Ds=5)}function Nu(t){var e=qi();return zi(99,Au.bind(null,t,e)),null}function Au(t,e){do{Pu()}while(null!==$s);if(0!==(48&Ns))throw Error(a(327));var n=t.finishedWork;if(null===n)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(a(177));t.callbackNode=null;var r=n.lanes|n.childLanes,i=r,o=t.pendingLanes&~i;t.pendingLanes=i,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=i,t.mutableReadLanes&=i,t.entangledLanes&=i,i=t.entanglements;for(var s=t.eventTimes,u=t.expirationTimes;0<o;){var c=31-He(o),l=1<<c;i[c]=0,s[c]=-1,u[c]=-1,o&=~l}if(null!==eu&&0===(24&r)&&eu.has(t)&&eu.delete(t),t===As&&(xs=As=null,Ps=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(i=Ns,Ns|=32,ks.current=null,Fr=Ye,dr(s=pr())){if("selectionStart"in s)u={start:s.selectionStart,end:s.selectionEnd};else t:if(u=(u=s.ownerDocument)&&u.defaultView||window,(l=u.getSelection&&u.getSelection())&&0!==l.rangeCount){u=l.anchorNode,o=l.anchorOffset,c=l.focusNode,l=l.focusOffset;try{u.nodeType,c.nodeType}catch(I){u=null;break t}var f=0,h=-1,p=-1,d=0,v=0,y=s,g=null;e:for(;;){for(var m;y!==u||0!==o&&3!==y.nodeType||(h=f+o),y!==c||0!==l&&3!==y.nodeType||(p=f+l),3===y.nodeType&&(f+=y.nodeValue.length),null!==(m=y.firstChild);)g=y,y=m;for(;;){if(y===s)break e;if(g===u&&++d===o&&(h=f),g===c&&++v===l&&(p=f),null!==(m=y.nextSibling))break;g=(y=g).parentNode}y=m}u=-1===h||-1===p?null:{start:h,end:p}}else u=null;u=u||{start:0,end:0}}else u=null;Ur={focusedElem:s,selectionRange:u},Ye=!1,su=null,uu=!1,Ks=r;do{try{xu()}catch(I){if(null===Ks)throw Error(a(330));Mu(Ks,I),Ks=Ks.nextEffect}}while(null!==Ks);su=null,Ks=r;do{try{for(s=t;null!==Ks;){var b=Ks.flags;if(16&b&&mt(Ks.stateNode,""),128&b){var w=Ks.alternate;if(null!==w){var _=w.ref;null!==_&&("function"===typeof _?_(null):_.current=null)}}switch(1038&b){case 2:bs(Ks),Ks.flags&=-3;break;case 6:bs(Ks),Ks.flags&=-3,Ts(Ks.alternate,Ks);break;case 1024:Ks.flags&=-1025;break;case 1028:Ks.flags&=-1025,Ts(Ks.alternate,Ks);break;case 4:Ts(Ks.alternate,Ks);break;case 8:Es(s,u=Ks);var E=u.alternate;gs(u),null!==E&&gs(E)}Ks=Ks.nextEffect}}catch(I){if(null===Ks)throw Error(a(330));Mu(Ks,I),Ks=Ks.nextEffect}}while(null!==Ks);if(_=Ur,w=pr(),b=_.focusedElem,s=_.selectionRange,w!==b&&b&&b.ownerDocument&&hr(b.ownerDocument.documentElement,b)){null!==s&&dr(b)&&(w=s.start,void 0===(_=s.end)&&(_=w),"selectionStart"in b?(b.selectionStart=w,b.selectionEnd=Math.min(_,b.value.length)):(_=(w=b.ownerDocument||document)&&w.defaultView||window).getSelection&&(_=_.getSelection(),u=b.textContent.length,E=Math.min(s.start,u),s=void 0===s.end?E:Math.min(s.end,u),!_.extend&&E>s&&(u=s,s=E,E=u),u=fr(b,E),o=fr(b,s),u&&o&&(1!==_.rangeCount||_.anchorNode!==u.node||_.anchorOffset!==u.offset||_.focusNode!==o.node||_.focusOffset!==o.offset)&&((w=w.createRange()).setStart(u.node,u.offset),_.removeAllRanges(),E>s?(_.addRange(w),_.extend(o.node,o.offset)):(w.setEnd(o.node,o.offset),_.addRange(w))))),w=[];for(_=b;_=_.parentNode;)1===_.nodeType&&w.push({element:_,left:_.scrollLeft,top:_.scrollTop});
2for("function"===typeof b.focus&&b.focus(),b=0;b<w.length;b++)(_=w[b]).element.scrollLeft=_.left,_.element.scrollTop=_.top}Ye=!!Fr,Ur=Fr=null,t.current=n,Ks=r;do{try{for(b=t;null!==Ks;){var T=Ks.flags;if(36&T&&ds(b,Ks.alternate,Ks),128&T){w=void 0;var O=Ks.ref;if(null!==O){var S=Ks.stateNode;switch(Ks.tag){case 5:w=S;break;default:w=S}"function"===typeof O?O(w):O.current=w}}Ks=Ks.nextEffect}}catch(I){if(null===Ks)throw Error(a(330));Mu(Ks,I),Ks=Ks.nextEffect}}while(null!==Ks);Ks=null,Di(),Ns=i}else t.current=n;if(Xs)Xs=!1,$s=t,Js=e;else for(Ks=r;null!==Ks;)e=Ks.nextEffect,Ks.nextEffect=null,8&Ks.flags&&((T=Ks).sibling=null,T.stateNode=null),Ks=e;if(0===(r=t.pendingLanes)&&(Ys=null),1===r?t===ru?nu++:(nu=0,ru=t):nu=0,n=n.stateNode,_i&&"function"===typeof _i.onCommitFiberRoot)try{_i.onCommitFiberRoot(wi,n,void 0,64===(64&n.current.flags))}catch(I){}if(pu(t,Vi()),Gs)throw Gs=!1,t=Qs,Qs=null,t;return 0!==(8&Ns)||Wi(),null}function xu(){for(;null!==Ks;){var t=Ks.alternate;uu||null===su||(0!==(8&Ks.flags)?te(Ks,su)&&(uu=!0):13===Ks.tag&&Ss(t,Ks)&&te(Ks,su)&&(uu=!0));var e=Ks.flags;0!==(256&e)&&ps(t,Ks),0===(512&e)||Xs||(Xs=!0,Hi(97,(function(){return Pu(),null}))),Ks=Ks.nextEffect}}function Pu(){if(90!==Js){var t=97<Js?97:Js;return Js=90,zi(t,Du)}return!1}function Ru(t,e){Zs.push(e,t),Xs||(Xs=!0,Hi(97,(function(){return Pu(),null})))}function ju(t,e){tu.push(e,t),Xs||(Xs=!0,Hi(97,(function(){return Pu(),null})))}function Du(){if(null===$s)return!1;var t=$s;if($s=null,0!==(48&Ns))throw Error(a(331));var e=Ns;Ns|=32;var n=tu;tu=[];for(var r=0;r<n.length;r+=2){var i=n[r],o=n[r+1],s=i.destroy;if(i.destroy=void 0,"function"===typeof s)try{s()}catch(c){if(null===o)throw Error(a(330));Mu(o,c)}}for(n=Zs,Zs=[],r=0;r<n.length;r+=2){i=n[r],o=n[r+1];try{var u=i.create;i.destroy=u()}catch(c){if(null===o)throw Error(a(330));Mu(o,c)}}for(u=t.current.firstEffect;null!==u;)t=u.nextEffect,u.nextEffect=null,8&u.flags&&(u.sibling=null,u.stateNode=null),u=t;return Ns=e,Wi(),!0}function Lu(t,e,n){uo(t,e=cs(0,e=as(n,e),1)),e=cu(),null!==(t=hu(t,1))&&(ze(t,1,e),pu(t,e))}function Mu(t,e){if(3===t.tag)Lu(t,t,e);else for(var n=t.return;null!==n;){if(3===n.tag){Lu(n,t,e);break}if(1===n.tag){var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Ys||!Ys.has(r))){var i=ls(n,t=as(e,t),1);if(uo(n,i),i=cu(),null!==(n=hu(n,1)))ze(n,1,i),pu(n,i);else if("function"===typeof r.componentDidCatch&&(null===Ys||!Ys.has(r)))try{r.componentDidCatch(e,t)}catch(o){}break}}n=n.return}}function Fu(t,e,n){var r=t.pingCache;null!==r&&r.delete(e),e=cu(),t.pingedLanes|=t.suspendedLanes&n,As===t&&(Ps&n)===n&&(4===Ds||3===Ds&&(62914560&Ps)===Ps&&500>Vi()-Bs?_u(t,0):Vs|=n),pu(t,e)}function Uu(t,e){var n=t.stateNode;null!==n&&n.delete(e),0===(e=0)&&(0===(2&(e=t.mode))?e=1:0===(4&e)?e=99===qi()?1:2:(0===ou&&(ou=Ms),0===(e=qe(62914560&~ou))&&(e=4194304))),n=cu(),null!==(t=hu(t,e))&&(ze(t,e,n),pu(t,n))}function Vu(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function qu(t,e,n,r){return new Vu(t,e,n,r)}function Bu(t){return!(!(t=t.prototype)||!t.isReactComponent)}function zu(t,e){var n=t.alternate;return null===n?((n=qu(t.tag,e,t.key,t.mode)).elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Hu(t,e,n,r,i,o){var s=2;if(r=t,"function"===typeof t)Bu(t)&&(s=1);else if("string"===typeof t)s=5;else t:switch(t){case O:return Wu(n.children,i,o,e);case L:s=8,i|=16;break;case S:s=8,i|=1;break;case I:return(t=qu(12,n,e,8|i)).elementType=I,t.type=I,t.lanes=o,t;
vendor: 6,809 bytes, line 2
2case A:return(t=qu(13,n,e,i)).type=A,t.elementType=A,t.lanes=o,t;case x:return(t=qu(19,n,e,i)).elementType=x,t.lanes=o,t;case M:return Ku(n,i,o,e);case F:return(t=qu(24,n,e,i)).elementType=F,t.lanes=o,t;default:if("object"===typeof t&&null!==t)switch(t.$$typeof){case C:s=10;break t;case k:s=9;break t;case N:s=11;break t;case P:s=14;break t;case R:s=16,r=null;break t;case j:s=22;break t}throw Error(a(130,null==t?t:typeof t,""))}return(e=qu(s,n,e,i)).elementType=t,e.type=r,e.lanes=o,e}function Wu(t,e,n,r){return(t=qu(7,t,r,e)).lanes=n,t}function Ku(t,e,n,r){return(t=qu(23,t,r,e)).elementType=M,t.lanes=n,t}function Gu(t,e,n){return(t=qu(6,t,null,e)).lanes=n,t}function Qu(t,e,n){return(e=qu(4,null!==t.children?t.children:[],t.key,e)).lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Yu(t,e,n){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Be(0),this.expirationTimes=Be(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Be(0),this.mutableSourceEagerHydrationData=null}function Xu(t,e,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:T,key:null==r?null:""+r,children:t,containerInfo:e,implementation:n}}function $u(t,e,n,r){var i=e.current,o=cu(),s=lu(i);t:if(n){e:{if(Xt(n=n._reactInternals)!==n||1!==n.tag)throw Error(a(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break e;case 1:if(di(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break e}}u=u.return}while(null!==u);throw Error(a(171))}if(1===n.tag){var c=n.type;if(di(c)){n=gi(n,c,u);break t}}n=u}else n=ci;return null===e.context?e.context=n:e.pendingContext=n,(e=so(o,s)).payload={element:t},null!==(r=void 0===r?null:r)&&(e.callback=r),uo(i,e),fu(i,s,o),s}function Ju(t){if(!(t=t.current).child)return null;switch(t.child.tag){case 5:default:return t.child.stateNode}}function Zu(t,e){if(null!==(t=t.memoizedState)&&null!==t.dehydrated){var n=t.retryLane;t.retryLane=0!==n&&n<e?n:e}}function tc(t,e){Zu(t,e),(t=t.alternate)&&Zu(t,e)}function ec(t,e,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new Yu(t,e,null!=n&&!0===n.hydrate),e=qu(3,null,null,2===e?7:1===e?3:0),n.current=e,e.stateNode=n,oo(e),t[$r]=n.current,Nr(8===t.nodeType?t.parentNode:t),r)for(t=0;t<r.length;t++){var i=(e=r[t])._getVersion;i=i(e._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[e,i]:n.mutableSourceEagerHydrationData.push(e,i)}this._internalRoot=n}function nc(t){return!(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType&&(8!==t.nodeType||" react-mount-point-unstable "!==t.nodeValue))}function rc(t,e,n,r,i){var o=n._reactRootContainer;if(o){var a=o._internalRoot;if("function"===typeof i){var s=i;i=function(){var t=Ju(a);s.call(t)}}$u(e,a,t,i)}else{if(o=n._reactRootContainer=function(t,e){if(e||(e=!(!(e=t?9===t.nodeType?t.documentElement:t.firstChild:null)||1!==e.nodeType||!e.hasAttribute("data-reactroot"))),!e)for(var n;n=t.lastChild;)t.removeChild(n);return new ec(t,0,e?{hydrate:!0}:void 0)}(n,r),a=o._internalRoot,"function"===typeof i){var u=i;i=function(){var t=Ju(a);u.call(t)}}mu((function(){$u(e,a,t,i)}))}return Ju(a)}function ic(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!nc(e))throw Error(a(200));return Xu(t,e,null,n)}Ws=function(t,e,n){var r=e.lanes;if(null!==t)if(t.memoizedProps!==e.pendingProps||fi.current)ja=!0;else{if(0===(n&r)){switch(ja=!1,e.tag){case 3:Ha(e),Wo();break;case 5:Ro(e);break;case 1:di(e.type)&&mi(e);break;case 4:xo(e,e.stateNode.containerInfo);break;case 10:r=e.memoizedProps.value;var i=e.type._context;ui(Yi,i._currentValue),i._currentValue=r;break;case 13:if(null!==e.memoizedState)return 0!==(n&e.child.childLanes)?Ya(t,e,n):(ui(Do,1&Do.current),null!==(e=ns(t,e,n))?e.sibling:null);ui(Do,1&Do.current);break;case 19:if(r=0!==(n&e.childLanes),0!==(64&t.flags)){if(r)return es(t,e,n);e.flags|=64}if(null!==(i=e.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),ui(Do,Do.current),r)break;return null;case 23:case 24:return e.lanes=0,Ua(t,e,n)}return ns(t,e,n)}ja=0!==(16384&t.flags)}else ja=!1;switch(e.lanes=0,e.tag){case 2:if(r=e.type,null!==t&&(t.alternate=null,e.alternate=null,e.flags|=2),t=e.pendingProps,i=pi(e,li.current),no(e,n),i=ia(null,e,r,t,i,n),e.flags|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof){if(e.tag=1,e.memoizedState=null,e.updateQueue=null,di(r)){var o=!0;mi(e)}else o=!1;e.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,oo(e);var s=r.getDerivedStateFromProps;"function"===typeof s&&po(e,r,s,t),i.updater=vo,e.stateNode=i,i._reactInternals=e,bo(e,r,t,n),e=za(null,e,r,!0,o,n)}else e.tag=0,Da(null,e,i,n),e=e.child;return e;case 16:i=e.elementType;t:{switch(null!==t&&(t.alternate=null,e.alternate=null,e.flags|=2),t=e.pendingProps,i=(o=i._init)(i._payload),e.type=i,o=e.tag=function(t){if("function"===typeof t)return Bu(t)?1:0;if(void 0!==t&&null!==t){if((t=t.$$typeof)===N)return 11;if(t===P)return 14}return 2}(i),t=Qi(i,t),o){case 0:e=qa(null,e,i,t,n);break t;case 1:e=Ba(null,e,i,t,n);break t;case 11:e=La(null,e,i,t,n);break t;case 14:e=Ma(null,e,i,Qi(i.type,t),r,n);break t}throw Error(a(306,i,""))}return e;case 0:return r=e.type,i=e.pendingProps,qa(t,e,r,i=e.elementType===r?i:Qi(r,i),n);case 1:return r=e.type,i=e.pendingProps,Ba(t,e,r,i=e.elementType===r?i:Qi(r,i),n);case 3:if(Ha(e),r=e.updateQueue,null===t||null===r)throw Error(a(282));if(r=e.pendingProps,i=null!==(i=e.memoizedState)?i.element:null,ao(t,e),lo(e,r,null,n),(r=e.memoizedState.element)===i)Wo(),e=ns(t,e,n);else{if((o=(i=e.stateNode).hydrate)&&(Fo=Wr(e.stateNode.containerInfo.firstChild),Mo=e,o=Uo=!0),o){if(null!=(t=i.mutableSourceEagerHydrationData))for(i=0;i<t.length;i+=2)(o=t[i])._workInProgressVersionPrimary=t[i+1],Ko.push(o);for(n=So(e,null,r,n),e.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Da(t,e,r,n),Wo();e=e.child}return e;case 5:return Ro(e),null===t&&Bo(e),r=e.type,i=e.pendingProps,o=null!==t?t.memoizedProps:null,s=i.children,qr(r,i)?s=null:null!==o&&qr(r,o)&&(e.flags|=16),Va(t,e),Da(t,e,s,n),e.child;case 6:return null===t&&Bo(e),null;case 13:return Ya(t,e,n);case 4:return xo(e,e.stateNode.containerInfo),r=e.pendingProps,null===t?e.child=Oo(e,null,r,n):Da(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,La(t,e,r,i=e.elementType===r?i:Qi(r,i),n);case 7:return Da(t,e,e.pendingProps,n),e.child;case 8:case 12:return Da(t,e,e.pendingProps.children,n),e.child;
vendor: 6,341 bytes, line 2
2case 10:t:{r=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value;var u=e.type._context;if(ui(Yi,u._currentValue),u._currentValue=o,null!==s)if(u=s.value,0===(o=sr(u,o)?0:0|("function"===typeof r._calculateChangedBits?r._calculateChangedBits(u,o):1073741823))){if(s.children===i.children&&!fi.current){e=ns(t,e,n);break t}}else for(null!==(u=e.child)&&(u.return=e);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(-1,n&-n)).tag=2,uo(u,l)),u.lanes|=n,null!==(l=u.alternate)&&(l.lanes|=n),eo(u.return,n),c.lanes|=n;break}l=l.next}}else s=10===u.tag&&u.type===e.type?null:u.child;if(null!==s)s.return=u;else for(s=u;null!==s;){if(s===e){s=null;break}if(null!==(u=s.sibling)){u.return=s.return,s=u;break}s=s.return}u=s}Da(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=(o=e.pendingProps).children,no(e,n),r=r(i=ro(i,o.unstable_observedBits)),e.flags|=1,Da(t,e,r,n),e.child;case 14:return o=Qi(i=e.type,e.pendingProps),Ma(t,e,i,o=Qi(i.type,o),r,n);case 15:return Fa(t,e,e.type,e.pendingProps,r,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Qi(r,i),null!==t&&(t.alternate=null,e.alternate=null,e.flags|=2),e.tag=1,di(r)?(t=!0,mi(e)):t=!1,no(e,n),go(e,r,i),bo(e,r,i,n),za(null,e,r,!0,t,n);case 19:return es(t,e,n);case 23:case 24:return Ua(t,e,n)}throw Error(a(156,e.tag))},ec.prototype.render=function(t){$u(t,this._internalRoot,null,null)},ec.prototype.unmount=function(){var t=this._internalRoot,e=t.containerInfo;$u(null,t,null,(function(){e[$r]=null}))},ee=function(t){13===t.tag&&(fu(t,4,cu()),tc(t,4))},ne=function(t){13===t.tag&&(fu(t,67108864,cu()),tc(t,67108864))},re=function(t){if(13===t.tag){var e=cu(),n=lu(t);fu(t,n,e),tc(t,n)}},ie=function(t,e){return e()},Ct=function(t,e,n){switch(e){case"input":if(nt(t,n),e=n.name,"radio"===n.type&&null!=e){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var i=ni(r);if(!i)throw Error(a(90));$(r),nt(r,i)}}}break;case"textarea":ct(t,n);break;case"select":null!=(e=n.value)&&at(t,!!n.multiple,e,!1)}},Rt=gu,jt=function(t,e,n,r,i){var o=Ns;Ns|=4;try{return zi(98,t.bind(null,e,n,r,i))}finally{0===(Ns=o)&&(Hs(),Wi())}},Dt=function(){0===(49&Ns)&&(function(){if(null!==eu){var t=eu;eu=null,t.forEach((function(t){t.expiredLanes|=24&t.pendingLanes,pu(t,Vi())}))}Wi()}(),Pu())},Lt=function(t,e){var n=Ns;Ns|=2;try{return t(e)}finally{0===(Ns=n)&&(Hs(),Wi())}};var oc={Events:[ti,ei,ni,xt,Pt,Pu,{current:!1}]},ac={findFiberByHostInstance:Zr,bundleType:0,version:"17.0.1",rendererPackageName:"react-dom"},sc={bundleType:ac.bundleType,version:ac.version,rendererPackageName:ac.rendererPackageName,rendererConfig:ac.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return null===(t=Zt(t))?null:t.stateNode},findFiberByHostInstance:ac.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var uc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!uc.isDisabled&&uc.supportsFiber)try{wi=uc.inject(sc),_i=uc}catch(yt){}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oc,e.createPortal=ic,e.findDOMNode=function(t){if(null==t)return null;if(1===t.nodeType)return t;var e=t._reactInternals;if(void 0===e){if("function"===typeof t.render)throw Error(a(188));throw Error(a(268,Object.keys(t)))}return t=null===(t=Zt(e))?null:t.stateNode},e.flushSync=function(t,e){var n=Ns;if(0!==(48&n))return t(e);Ns|=1;try{if(t)return zi(99,t.bind(null,e))}finally{Ns=n,Wi()}},e.hydrate=function(t,e,n){if(!nc(e))throw Error(a(200));return rc(null,t,e,!0,n)},e.render=function(t,e,n){if(!nc(e))throw Error(a(200));return rc(null,t,e,!1,n)},e.unmountComponentAtNode=function(t){if(!nc(t))throw Error(a(40));return!!t._reactRootContainer&&(mu((function(){rc(null,null,t,!1,(function(){t._reactRootContainer=null,t[$r]=null}))})),!0)},e.unstable_batchedUpdates=gu,e.unstable_createPortal=function(t,e){return ic(t,e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},e.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!nc(n))throw Error(a(200));if(null==t||void 0===t._reactInternals)throw Error(a(38));return rc(t,e,n,!1,r)},e.version="17.0.1"},function(t,e,n){"use strict";var r,i,o,a;if("object"===typeof performance&&"function"===typeof performance.now){var s=performance;e.unstable_now=function(){return s.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}if("undefined"===typeof window||"function"!==typeof MessageChannel){var l=null,f=null,h=function t(){if(null!==l)try{var n=e.unstable_now();l(!0,n),l=null}catch(r){throw setTimeout(t,0),r}};r=function(t){null!==l?setTimeout(r,0,t):(l=t,setTimeout(h,0))},i=function(t,e){f=setTimeout(t,e)},o=function(){clearTimeout(f)},e.unstable_shouldYield=function(){return!1},a=e.unstable_forceFrameRate=function(){}}else{var p=window.setTimeout,d=window.clearTimeout;if("undefined"!==typeof console){var v=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://reactjs.org/link/react-polyfills"),"function"!==typeof v&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var y=!1,g=null,m=-1,b=5,w=0;e.unstable_shouldYield=function(){return e.unstable_now()>=w},a=function(){},e.unstable_forceFrameRate=function(t){0>t||125<t?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):b=0<t?Math.floor(1e3/t):5};var _=new MessageChannel,E=_.port2;_.port1.onmessage=function(){if(null!==g){var t=e.unstable_now();w=t+b;try{g(!0,t)?E.postMessage(null):(y=!1,g=null)}catch(n){throw E.postMessage(null),n}}else y=!1}
vendor: 3,110 bytes, line 2
2,r=function(t){g=t,y||(y=!0,E.postMessage(null))},i=function(t,n){m=p((function(){t(e.unstable_now())}),n)},o=function(){d(m),m=-1}}function T(t,e){var n=t.length;t.push(e);t:for(;;){var r=n-1>>>1,i=t[r];if(!(void 0!==i&&0<I(i,e)))break t;t[r]=e,t[n]=i,n=r}}function O(t){return void 0===(t=t[0])?null:t}function S(t){var e=t[0];if(void 0!==e){var n=t.pop();if(n!==e){t[0]=n;t:for(var r=0,i=t.length;r<i;){var o=2*(r+1)-1,a=t[o],s=o+1,u=t[s];if(void 0!==a&&0>I(a,n))void 0!==u&&0>I(u,a)?(t[r]=u,t[s]=n,r=s):(t[r]=a,t[o]=n,r=o);else{if(!(void 0!==u&&0>I(u,n)))break t;t[r]=u,t[s]=n,r=s}}}return e}return null}function I(t,e){var n=t.sortIndex-e.sortIndex;return 0!==n?n:t.id-e.id}var C=[],k=[],N=1,A=null,x=3,P=!1,R=!1,j=!1;function D(t){for(var e=O(k);null!==e;){if(null===e.callback)S(k);else{if(!(e.startTime<=t))break;S(k),e.sortIndex=e.expirationTime,T(C,e)}e=O(k)}}function L(t){if(j=!1,D(t),!R)if(null!==O(C))R=!0,r(M);else{var e=O(k);null!==e&&i(L,e.startTime-t)}}function M(t,n){R=!1,j&&(j=!1,o()),P=!0;var r=x;try{for(D(n),A=O(C);null!==A&&(!(A.expirationTime>n)||t&&!e.unstable_shouldYield());){var a=A.callback;if("function"===typeof a){A.callback=null,x=A.priorityLevel;var s=a(A.expirationTime<=n);n=e.unstable_now(),"function"===typeof s?A.callback=s:A===O(C)&&S(C),D(n)}else S(C);A=O(C)}if(null!==A)var u=!0;else{var c=O(k);null!==c&&i(L,c.startTime-n),u=!1}return u}finally{A=null,x=r,P=!1}}var F=a;e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(t){t.callback=null},e.unstable_continueExecution=function(){R||P||(R=!0,r(M))},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return O(C)},e.unstable_next=function(t){switch(x){case 1:case 2:case 3:var e=3;break;default:e=x}var n=x;x=e;try{return t()}finally{x=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=F,e.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var n=x;x=t;try{return e()}finally{x=n}},e.unstable_scheduleCallback=function(t,n,a){var s=e.unstable_now();switch("object"===typeof a&&null!==a?a="number"===typeof(a=a.delay)&&0<a?s+a:s:a=s,t){case 1:var u=-1;break;case 2:u=250;break;case 5:u=1073741823;break;case 4:u=1e4;break;default:u=5e3}return t={id:N++,callback:n,priorityLevel:t,startTime:a,expirationTime:u=a+u,sortIndex:-1},a>s?(t.sortIndex=a,T(k,t),null===O(C)&&t===O(k)&&(j?o():j=!0,i(L,a-s))):(t.sortIndex=u,T(C,t),R||P||(R=!0,r(M))),t},e.unstable_wrapCallback=function(t){var e=x;return function(){var n=x;x=e;try{return t.apply(this,arguments)}finally{x=n}}}},,function(t,e,n){"use strict";n(44);var r=n(3),i=60103;if(e.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),e.Fragment=o("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function c(t,e,n){var r,o={},c=null,l=null;
2for(r in void 0!==n&&(c=""+n),void 0!==e.key&&(c=""+e.key),void 0!==e.ref&&(l=e.ref),e)s.call(e,r)&&!u.hasOwnProperty(r)&&(o[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps)void 0===o[r]&&(o[r]=e[r]);return{$$typeof:i,type:t,key:c,ref:l,props:o,_owner:a.current}}e.jsx=c,e.jsxs=c},function(t,e,n){"use strict";var r=n(116);function i(){}function o(){}o.resetWarningCache=i,t.exports=function(){function t(t,e,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 e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(3),c=(r=u)&&r.__esModule?r:{default:r},l=n(17),f=n(54),h=(0,l.shape)({make:l.func,duration:l.number.isRequired,delay:l.number.isRequired,forever:l.bool,count:l.number.isRequired,style:l.object.isRequired,reverse:l.bool}),p={collapse:l.bool,collapseEl:l.element,cascade:l.bool,wait:l.number,force:l.bool,disabled:l.bool,appear:l.bool,enter:l.bool,exit:l.bool,fraction:l.number,refProp:l.string,innerRef:l.func,onReveal:l.func,unmountOnExit:l.bool,mountOnEnter:l.bool,inEffect:h.isRequired,outEffect:(0,l.oneOfType)([h,(0,l.oneOf)([!1])]).isRequired,ssrReveal:l.bool,collapseOnly:l.bool,ssrFadeout:l.bool},d={transitionGroup:l.object},v=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.isOn=void 0===t.when||!!t.when,r.state={collapse:t.collapse?e.getInitialCollapseStyle(t):void 0,style:{opacity:r.isOn&&!t.ssrReveal||!t.outEffect?void 0:0}},r.savedChild=!1,r.isShown=!1,f.observerMode?r.handleObserve=r.handleObserve.bind(r):(r.revealHandler=r.makeHandler(r.reveal),r.resizeHandler=r.makeHandler(r.resize)),r.saveRef=r.saveRef.bind(r),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),s(e,[{key:"saveRef",value:function(t){this.childRef&&this.childRef(t),this.props.innerRef&&this.props.innerRef(t),this.el!==t&&(this.el=t&&"offsetHeight"in t?t:void 0,this.observe(this.props,!0))}},{key:"invisible",value:function(){this&&this.el&&(this.savedChild=!1,this.isShown||(this.setState({hasExited:!0,collapse:this.props.collapse?a({},this.state.collapse,{visibility:"hidden"}):null,style:{opacity:0}
2}),!f.observerMode&&this.props.collapse&&window.document.dispatchEvent(f.collapseend)))}},{key:"animationEnd",value:function(t,e,n){var r=this,i=n.forever,o=n.count,a=n.delay,s=n.duration;if(!i){this.animationEndTimeout=window.setTimeout((function(){r&&r.el&&(r.animationEndTimeout=void 0,t.call(r))}),a+(s+(e?s:0)*o))}}},{key:"getDimensionValue",value:function(){return this.el.offsetHeight+parseInt(window.getComputedStyle(this.el,null).getPropertyValue("margin-top"),10)+parseInt(window.getComputedStyle(this.el,null).getPropertyValue("margin-bottom"),10)}},{key:"collapse",value:function(t,e,n){var r=n.duration+(e.cascade?n.duration:0),i=this.isOn?this.getDimensionValue():0,o=void 0,a=void 0;if(e.collapseOnly)o=n.duration/3,a=n.delay;else{var s=r>>2,u=s>>1;o=s,a=n.delay+(this.isOn?0:r-s-u),t.style.animationDuration=r-s+(this.isOn?u:-u)+"ms",t.style.animationDelay=n.delay+(this.isOn?s-u:0)+"ms"}return t.collapse={height:i,transition:"height "+o+"ms ease "+a+"ms",overflow:e.collapseOnly?"hidden":void 0},t}},{key:"animate",value:function(t){if(this&&this.el&&(this.unlisten(),this.isShown!==this.isOn)){this.isShown=this.isOn;var e=!this.isOn&&t.outEffect,n=t[e?"outEffect":"inEffect"],r="style"in n&&n.style.animationName||void 0,i=void 0;t.collapseOnly?i={hasAppeared:!0,hasExited:!1,style:{opacity:1}}:((t.outEffect||this.isOn)&&n.make&&(r=n.make),i={hasAppeared:!0,hasExited:!1,collapse:void 0,style:a({},n.style,{animationDuration:n.duration+"ms",animationDelay:n.delay+"ms",animationIterationCount:n.forever?"infinite":n.count,opacity:1,animationName:r}),className:n.className}),this.setState(t.collapse?this.collapse(i,t,n):i),e?(this.savedChild=c.default.cloneElement(this.getChild()),this.animationEnd(this.invisible,t.cascade,n)):this.savedChild=!1,this.onReveal(t)}}},{key:"onReveal",value:function(t){t.onReveal&&this.isOn&&(this.onRevealTimeout&&(this.onRevealTimeout=window.clearTimeout(this.onRevealTimeout)),t.wait?this.onRevealTimeout=window.setTimeout(t.onReveal,t.wait):t.onReveal())}},{key:"componentWillUnmount",value:function(){this.unlisten(),f.ssr&&(0,f.disableSsr)()}},{key:"handleObserve",value:function(t,e){o(t,1)[0].intersectionRatio>0&&(e.disconnect(),this.observer=null,this.reveal(this.props,!0))}},{key:"observe",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.el&&f.observerMode){if(this.observer){if(!e)return;this.observer.disconnect()}else if(e)return;this.observer=new IntersectionObserver(this.handleObserve,{threshold:t.fraction}),this.observer.observe(this.el)}}},{key:"reveal",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];f.globalHide||(0,f.hideAll)(),this&&this.el&&(t||(t=this.props),f.ssr&&(0,f.disableSsr)(),this.isOn&&this.isShown&&void 0!==t.spy?(this.isShown=!1,this.setState({style:{}}),window.setTimeout((function(){return e.reveal(t)}),200)):n||this.inViewport(t)||t.force?this.animate(t):f.observerMode?this.observe(t):this.listen())}},{key:"componentDidMount",value:function(){var t=this;if(this.el&&!this.props.disabled){this.props.collapseOnly||("make"in this.props.inEffect&&this.props.inEffect.make(!1,this.props),void 0!==this.props.when&&this.props.outEffect&&"make"in this.props.outEffect&&this.props.outEffect.make(!0,this.props));var n=this.context.transitionGroup,r=n&&!n.isMounting?!("enter"in this.props&&!1===this.props.enter):this.props.appear;return this.isOn&&((void 0!==this.props.when||void 0!==this.props.spy)&&
2!r||f.ssr&&!f.fadeOutEnabled&&!this.props.ssrFadeout&&this.props.outEffect&&!this.props.ssrReveal&&e.getTop(this.el)<window.pageYOffset+window.innerHeight)?(this.isShown=!0,this.setState({hasAppeared:!0,collapse:this.props.collapse?{height:this.getDimensionValue()}:this.state.collapse,style:{opacity:1}}),void this.onReveal(this.props)):f.ssr&&(f.fadeOutEnabled||this.props.ssrFadeout)&&this.props.outEffect&&e.getTop(this.el)<window.pageYOffset+window.innerHeight?(this.setState({style:{opacity:0,transition:"opacity 1000ms 1000ms"}}),void window.setTimeout((function(){return t.reveal(t.props,!0)}),2e3)):void(this.isOn&&(this.props.force?this.animate(this.props):this.reveal(this.props)))}}},{key:"cascade",value:function(t){var e=this,n=void 0;n="string"==typeof t?t.split("").map((function(t,e){return c.default.createElement("span",{key:e,style:{display:"inline-block",whiteSpace:"pre"}},t)})):c.default.Children.toArray(t);var r=this.props[this.isOn||!this.props.outEffect?"inEffect":"outEffect"],o=r.duration,s=r.reverse,u=n.length,l=2*o;this.props.collapse&&(l=parseInt(this.state.style.animationDuration,10),o=l/2);var h=s?u:0;return n.map((function(t){return"object"===(void 0===t?"undefined":i(t))&&t?c.default.cloneElement(t,{style:a({},t.props.style,e.state.style,{animationDuration:Math.round((0,f.cascade)(s?h--:h++,0,u,o,l))+"ms"})}):t}))}},{key:"componentWillReceiveProps",value:function(t){void 0!==t.when&&(this.isOn=!!t.when),t.fraction!==this.props.fraction&&this.observe(t,!0),!this.isOn&&t.onExited&&"exit"in t&&!1===t.exit?t.onExited():t.disabled||(t.collapse&&!this.props.collapse&&(this.setState({style:{},collapse:e.getInitialCollapseStyle(t)}),this.isShown=!1),t.when===this.props.when&&t.spy===this.props.spy||this.reveal(t),this.onRevealTimeout&&!this.isOn&&(this.onRevealTimeout=window.clearTimeout(this.onRevealTimeout)))}},{key:"getChild",value:function(){if(this.savedChild&&!this.props.disabled)return this.savedChild;if("object"===i(this.props.children)){var t=c.default.Children.only(this.props.children);return"type"in t&&"string"==typeof t.type||"ref"!==this.props.refProp?t:c.default.createElement("div",null,t)}return c.default.createElement("div",null,this.props.children)}},{key:"render",value:function(){var t;t=this.state.hasAppeared?!this.props.unmountOnExit||!this.state.hasExited||this.isOn:!this.props.mountOnEnter||this.isOn;var e=this.getChild();"function"==typeof e.ref&&(this.childRef=e.ref);var n=!1,r=e.props,i=r.style,o=r.className,s=r.children,u=this.props.disabled?o:(this.props.outEffect?f.namespace:"")+(this.state.className?" "+this.state.className:"")+(o?" "+o:"")||void 0,l=void 0;"function"==typeof this.state.style.animationName&&(this.state.style.animationName=this.state.style.animationName(!this.isOn,this.props)),this.props.cascade&&!this.props.disabled&&s&&this.state.style.animationName?(n=this.cascade(s),l=a({},i,{opacity:1})):l=this.props.disabled?i:a({},i,this.state.style);var h=a({},this.props.props,function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({className:u,style:l},this.props.refProp,this.saveRef)),p=c.default.cloneElement(e,h,t?n||s:void 0);return void 0!==this.props.collapse?this.props.collapseEl?c.default.cloneElement(this.props.collapseEl,{style:a({},this.props.collapseEl.style,this.props.disabled?void 0:this.state.collapse),children:p}):c.default.createElement("div",{style:this.props.disabled?void 0:this.state.collapse,children:p}):p}},{key:"makeHandler",value:function(t){var e=this,n=function(){t.call(e,e.props),e.ticking=!1};return function(){e.ticking||((0,f.raf)(n),e.ticking=!0)}}},{key:"inViewport",value:function(t){if(!this.el||window.document.hidden)return!1;var n=this.el.offsetHeight,r=window.pageYOffset-e.getTop(this.el),i=Math.min(n,window.innerHeight)*(f.globalHide?t.fraction:0);return r>i-window.innerHeight&&r<n-i}},{key:"resize",value:function(t){this&&this.el&&this.isOn&&this.inViewport(t)&&(this.unlisten(),this.isShown=this.isOn,this.setState({hasExited:!this.isOn,hasAppeared:!0,collapse:void 0,style:{opacity:this.isOn||!t.outEffect?1:0}}),this.onReveal(t))}},{key:"listen",value:function(){f.observerMode||this.isListener||(this.isListener=!0,window.addEventListener("scroll",this.revealHandler,{passive:!0}),window.addEventListener("orientationchange",this.revealHandler,{passive:!0}),window.document.addEventListener("visibilitychange",this.revealHandler,{passive:!0}),window.document.addEventListener("collapseend",this.revealHandler,{passive:!0}),window.addEventListener("resize",this.resizeHandler,{passive:!0}))}},{key:"unlisten",value:function(){!f.observerMode&&this.isListener&&(window.removeEventListener("scroll",this.revealHandler,{passive:!0}),window.removeEventListener("orientationchange",this.revealHandler,{passive:!0}),window.document.removeEventListener("visibilitychange",this.revealHandler,{passive:!0}),window.document.removeEventListener("collapseend",this.revealHandler,{passive:!0}),window.removeEventListener("resize",this.resizeHandler,{passive:!0}),this.isListener=!1),this.onRevealTimeout&&(this.onRevealTimeout=window.clearTimeout(this.onRevealTimeout)),this.animationEndTimeout&&(this.animationEndTimeout=window.clearTimeout(this.animationEndTimeout))}}],[{key:"getInitialCollapseStyle",value:function(t){return{height:0,visibility:t.when?void 0:"hidden"}}},{key:"getTop",value:function(t){for(;void 0===t.offsetTop;)t=t.parentNode;for(var e=t.offsetTop;t.offsetParent;e+=t.offsetTop)t=t.offsetParent;return e}}]),e}(c.default.Component);v.propTypes=p,v.defaultProps={fraction:.2,refProp:"ref"},v.contextTypes=d,v.displayName="RevealBase",e.default=v,t.exports=e.default},function(t,e,n){"use strict";
2e.__esModule=!0;var r,i=n(119),o=(r=i)&&r.__esModule?r:{default:r};e.default=o.default},function(t,e,n){"use strict";e.__esModule=!0;var r=f(n(120)),i=f(n(129)),o=f(n(130)),a=f(n(131)),s=f(n(154)),u=n(3),c=f(u),l=f(n(17));function f(t){return t&&t.__esModule?t:{default:t}}var h=function(){},p=function(t){function e(n,r){(0,o.default)(this,e);var i=(0,a.default)(this,t.call(this,n,r));return i.domRef=null,i.state={isHydrated:n.isHydrating,additionalNode:null,removeAdditionalNode:null},i}return(0,s.default)(e,t),e.removeNode=function(t){t&&t.parentNode.removeChild(t)},e.prototype.appendAdditionalElement=function(){for(var t=this.props,e=t.onError,n=t.onLoad,r=t.nonce,i=document.createElement("script"),o=0,a=this.domRef.attributes.length;o<a;o++){var s=this.domRef.attributes[o];"nonce"===s.nodeName?i.setAttribute(s.nodeName,r):i.setAttribute(s.nodeName,s.nodeValue)}return""===this.domRef.src&&this.domRef.innerHTML&&""!==this.domRef.innerHTML&&(i.innerHTML=this.domRef.innerHTML),i.addEventListener("load",n),i.addEventListener("error",e),this.domRef.parentNode.appendChild(i),i},e.prototype.componentDidMount=function(){this.state.isHydrated||this.setState({additionalNode:this.appendAdditionalElement(),removeAdditionalNode:null})},e.prototype.componentWillReceiveProps=function(t){var e=this.props,n=e.src,r=e.dangerouslySetInnerHTML;n&&n===t.src||r&&r.__html===t.dangerouslySetInnerHTML.__html||this.setState({removeAdditionalNode:this.state.additionalNode,additionalNode:null})},e.prototype.componentWillUpdate=function(t,n){e.removeNode(n.removeAdditionalNode)},e.prototype.componentDidUpdate=function(){var t=this.state,e=t.additionalNode,n=t.removeAdditionalNode;null===e&&this.setState({additionalNode:this.appendAdditionalElement()}),null!==n&&this.setState({removeAdditionalNode:null})},e.prototype.componentWillUnmount=function(){e.removeNode(this.state.removeAdditionalNode),e.removeNode(this.state.additionalNode)},e.prototype.render=function(){var t=this;if(null!==this.state.additionalNode)return null;var e=this.props,n=(e.isHydrating,(0,i.default)(e,["isHydrating"]));return c.default.createElement("script",(0,r.default)({},n,{ref:function(e){return t.domRef=e}}))},e}(u.Component);p.propTypes={isHydrating:l.default.bool,async:l.default.oneOfType([l.default.bool,l.default.number]),crossOrigin:l.default.string,defer:l.default.bool,integrity:l.default.string,nonce:l.default.string,src:l.default.string,text:l.default.string,type:l.default.string,dangerouslySetInnerHTML:l.default.object,onError:l.default.func,onLoad:l.default.func},p.defaultProps={isHydrating:!1,onError:h,onLoad:h},e.default=p},function(t,e,n){"use strict";e.__esModule=!0;var r,i=n(121),o=(r=i)&&r.__esModule?r:{default:r};e.default=o.default||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}},function(t,e,n){t.exports={default:n(122),__esModule:!0}},function(t,e,n){n(123),t.exports=n(22).Object.assign},function(t,e,n){var r=n(38);r(r.S+r.F,"Object",{assign:n(125)})},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){"use strict";var r=n(23),i=n(46),o=n(61),a=n(49),s=n(62),u=n(78),c=Object.assign;t.exports=!c||n(40)((function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=c({},t)[n]||Object.keys(c({},e)).join("")!=r}))?function(t,e){for(var n=s(t),c=arguments.length,l=1,f=o.f,h=a.f;c>l;)for(var p,d=u(arguments[l++]),v=f?i(d).concat(f(d)):i(d),y=v.length,g=0;y>g;)p=v[g++],r&&!h.call(d,p)||(n[p]=d[p]);return n}:c},function(t,e,n){var r=n(29),i=n(127),o=n(128);t.exports=function(t){return function(e,n,a){var s,u=r(e),c=i(u.length),l=o(a,c);if(t&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){var r=n(57),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e,n){var r=n(57),i=Math.max,o=Math.min;t.exports=function(t,e){return(t=r(t))<0?i(t+e,0):o(t,e)}},function(t,e,n){"use strict";
vendor: 5,646 bytes, line 2
2e.__esModule=!0,e.default=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}},function(t,e,n){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){"use strict";e.__esModule=!0;var r,i=n(80),o=(r=i)&&r.__esModule?r:{default:r};e.default=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"===typeof e?"undefined":(0,o.default)(e))&&"function"!==typeof e?t:e}},function(t,e,n){t.exports={default:n(133),__esModule:!0}},function(t,e,n){n(134),n(140),t.exports=n(66).f("iterator")},function(t,e,n){"use strict";var r=n(135)(!0);n(81)(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})}))},function(t,e,n){var r=n(57),i=n(56);t.exports=function(t){return function(e,n){var o,a,s=String(i(e)),u=r(n),c=s.length;return u<0||u>=c?t?"":void 0:(o=s.charCodeAt(u))<55296||o>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?t?s.charAt(u):o:t?s.slice(u,u+2):a-56320+(o-55296<<10)+65536}}},function(t,e,n){"use strict";var r=n(64),i=n(45),o=n(65),a={};n(26)(a,n(30)("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(a,{next:i(1,n)}),o(t,e+" Iterator")}},function(t,e,n){var r=n(27),i=n(39),o=n(46);t.exports=n(23)?Object.defineProperties:function(t,e){i(t);for(var n,a=o(e),s=a.length,u=0;s>u;)r.f(t,n=a[u++],e[n]);return t}},function(t,e,n){var r=n(20).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(24),i=n(62),o=n(58)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,n){n(141);for(var r=n(20),i=n(26),o=n(63),a=n(30)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u<s.length;u++){var c=s[u],l=r[c],f=l&&l.prototype;f&&!f[a]&&i(f,a,c),o[c]=o.Array}},function(t,e,n){"use strict";var r=n(142),i=n(143),o=n(63),a=n(29);t.exports=n(81)(Array,"Array",(function(t,e){this._t=a(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){t.exports={default:n(145),__esModule:!0}},function(t,e,n){n(146),n(151),n(152),n(153),t.exports=n(22).Symbol},function(t,e,n){"use strict";var r=n(20),i=n(24),o=n(23),a=n(38),s=n(82),u=n(147).KEY,c=n(40),l=n(59),f=n(65),h=n(48),p=n(30),d=n(66),v=n(67),y=n(148),g=n(149),m=n(39),b=n(28),w=n(62),_=n(29),E=n(55),T=n(45),O=n(64),S=n(150),I=n(84),C=n(61),k=n(27),N=n(46),A=I.f,x=k.f,P=S.f,R=r.Symbol,j=r.JSON,D=j&&j.stringify,L=p("_hidden"),M=p("toPrimitive"),F={}.propertyIsEnumerable,U=l("symbol-registry"),V=l("symbols"),q=l("op-symbols"),B=Object.prototype,z="function"==typeof R&&!!C.f,H=r.QObject,W=!H||!H.prototype||!H.prototype.findChild,K=o&&c((function(){return 7!=O(x({},"a",{get:function(){return x(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=A(B,e);r&&delete B[e],x(t,e,n),r&&t!==B&&x(B,e,r)}:x,G=function(t){var e=V[t]=O(R.prototype);return e._k=t,e},Q=z&&"symbol"==typeof R.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof R},Y=function(t,e,n){return t===B&&Y(q,e,n),m(t),e=E(e,!0),m(n),i(V,e)?(n.enumerable?(i(t,L)&&t[L][e]&&(t[L][e]=!1),n=O(n,{enumerable:T(0,!1)})):(i(t,L)||x(t,L,T(1,{})),t[L][e]=!0),K(t,e,n)):x(t,e,n)},X=function(t,e){m(t);for(var n,r=y(e=_(e)),i=0,o=r.length;o>i;)Y(t,n=r[i++],e[n]);return t},$=function(t){var e=F.call(this,t=E(t,!0));return!(this===B&&i(V,t)&&!i(q,t))&&(!(e||!i(this,t)||!i(V,t)||i(this,L)&&this[L][t])||e)},J=function(t,e){if(t=_(t),e=E(e,!0),t!==B||!i(V,e)||i(q,e)){var n=A(t,e);return!n||!i(V,e)||i(t,L)&&t[L][e]||(n.enumerable=!0),n}},Z=function(t){for(var e,n=P(_(t)),r=[],o=0;n.length>o;)i(V,e=n[o++])||e==L||e==u||r.push(e);return r},tt=function(t){for(var e,n=t===B,r=P(n?q:_(t)),o=[],a=0;r.length>a;)!i(V,e=r[a++])||n&&!i(B,e)||o.push(V[e]);return o};z||(s((R=function(){if(this instanceof R)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),e=function e(n){this===B&&e.call(q,n),i(this,L)&&i(this[L],t)&&(this[L][t]=!1),K(this,t,T(1,n))};return o&&W&&K(B,t,{configurable:!0,set:e}),G(t)}).prototype,"toString",(function(){return this._k})),I.f=J,k.f=Y,n(83).f=S.f=Z,n(49).f=$,C.f=tt,o&&!n(47)&&s(B,"propertyIsEnumerable",$,!0),d.f=function(t){return G(p(t))}),a(a.G+a.W+a.F*!z,{Symbol:R});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)p(et[nt++]);for(var rt=N(p.store),it=0;rt.length>it;)v(rt[it++]);a(a.S+a.F*!z,"Symbol",{for:function(t){return i(U,t+="")?U[t]:U[t]=R(t)},keyFor:function(t){if(!Q(t))throw TypeError(t+" is not a symbol!");
2for(var e in U)if(U[e]===t)return e},useSetter:function(){W=!0},useSimple:function(){W=!1}}),a(a.S+a.F*!z,"Object",{create:function(t,e){return void 0===e?O(t):X(O(t),e)},defineProperty:Y,defineProperties:X,getOwnPropertyDescriptor:J,getOwnPropertyNames:Z,getOwnPropertySymbols:tt});var ot=c((function(){C.f(1)}));a(a.S+a.F*ot,"Object",{getOwnPropertySymbols:function(t){return C.f(w(t))}}),j&&a(a.S+a.F*(!z||c((function(){var t=R();return"[null]"!=D([t])||"{}"!=D({a:t})||"{}"!=D(Object(t))}))),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(b(e)||void 0!==t)&&!Q(t))return g(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!Q(e))return e}),r[1]=e,D.apply(j,r)}}),R.prototype[M]||n(26)(R.prototype,M,R.prototype.valueOf),f(R,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(t,e,n){var r=n(48)("meta"),i=n(28),o=n(24),a=n(27).f,s=0,u=Object.isExtensible||function(){return!0},c=!n(40)((function(){return u(Object.preventExtensions({}))})),l=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},f=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!u(t))return"F";if(!e)return"E";l(t)}return t[r].i},getWeak:function(t,e){if(!o(t,r)){if(!u(t))return!0;if(!e)return!1;l(t)}return t[r].w},onFreeze:function(t){return c&&f.NEED&&u(t)&&!o(t,r)&&l(t),t}}},function(t,e,n){var r=n(46),i=n(61),o=n(49);t.exports=function(t){var e=r(t),n=i.f;if(n)for(var a,s=n(t),u=o.f,c=0;s.length>c;)u.call(t,a=s[c++])&&e.push(a);return e}},function(t,e,n){var r=n(79);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(29),i=n(83).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(e){return a.slice()}}(t):i(r(t))}},function(t,e){},function(t,e,n){n(67)("asyncIterator")},function(t,e,n){n(67)("observable")},function(t,e,n){"use strict";e.__esModule=!0;var r=a(n(155)),i=a(n(159)),o=a(n(80));function a(t){return t&&t.__esModule?t:{default:t}}e.default=function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"===typeof e?"undefined":(0,o.default)(e)));t.prototype=(0,i.default)(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(r.default?(0,r.default)(t,e):t.__proto__=e)}},function(t,e,n){t.exports={default:n(156),__esModule:!0}},function(t,e,n){n(157),t.exports=n(22).Object.setPrototypeOf},function(t,e,n){var r=n(38);r(r.S,"Object",{setPrototypeOf:n(158).set})},function(t,e,n){var r=n(28),i=n(39),o=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(74)(Function.call,n(84).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(i){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:o}},function(t,e,n){t.exports={default:n(160),__esModule:!0}},function(t,e,n){n(161);var r=n(22).Object;t.exports=function(t,e){return r.create(t,e)}},function(t,e,n){var r=n(38);r(r.S,"Object",{create:n(64)})},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,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,f=r?Symbol.for("react.async_mode"):60111,h=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,y=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,m=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,_=r?Symbol.for("react.scope"):60119;function E(t){if("object"===typeof t&&null!==t){var e=t.$$typeof;switch(e){case i:switch(t=t.type){case f:case h:case a:case u:case s:case d:return t;default:switch(t=t&&t.$$typeof){case l:case p:case g:case y:case c:return t;default:return e}}case o:return e}}}
2function T(t){return E(t)===h}e.AsyncMode=f,e.ConcurrentMode=h,e.ContextConsumer=l,e.ContextProvider=c,e.Element=i,e.ForwardRef=p,e.Fragment=a,e.Lazy=g,e.Memo=y,e.Portal=o,e.Profiler=u,e.StrictMode=s,e.Suspense=d,e.isAsyncMode=function(t){return T(t)||E(t)===f},e.isConcurrentMode=T,e.isContextConsumer=function(t){return E(t)===l},e.isContextProvider=function(t){return E(t)===c},e.isElement=function(t){return"object"===typeof t&&null!==t&&t.$$typeof===i},e.isForwardRef=function(t){return E(t)===p},e.isFragment=function(t){return E(t)===a},e.isLazy=function(t){return E(t)===g},e.isMemo=function(t){return E(t)===y},e.isPortal=function(t){return E(t)===o},e.isProfiler=function(t){return E(t)===u},e.isStrictMode=function(t){return E(t)===s},e.isSuspense=function(t){return E(t)===d},e.isValidElementType=function(t){return"string"===typeof t||"function"===typeof t||t===a||t===h||t===u||t===s||t===d||t===v||"object"===typeof t&&null!==t&&(t.$$typeof===g||t.$$typeof===y||t.$$typeof===c||t.$$typeof===l||t.$$typeof===p||t.$$typeof===b||t.$$typeof===w||t.$$typeof===_||t.$$typeof===m)},e.typeOf=E},function(t,e,n){var r=n(165),i=n(167);t.exports=function(){"use strict";var t=function(t){return Object.keys(t).filter((function(t){return/^gsx\$/.test(t)}))},e=function(e){return t(e).reduce((function(t,n){return t[n.slice(4)]=e[n].$t,t}),{})},o=function(){var t=i(r.mark((function t(e){var i;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("undefined"===typeof fetch){t.next=7;break}return t.next=3,fetch(e);case 3:if((i=t.sent).ok){t.next=6;break}throw new Error("Error ".concat(i.status," retrieving ").concat(e));case 6:return t.abrupt("return",i.json());case 7:return t.abrupt("return",new Promise((function(t,r){var i=function(n){if(n.setEncoding("utf8"),n.statusCode<200||n.statusCode>=300)return r(new Error("Error ".concat(n.statusCode," retrieving ").concat(e)));var i="";n.on("data",(function(t){return i+=t})),n.on("end",(function(){return t(JSON.parse(i))}))};n(168).get(e,i).on("error",r)})));case 9:throw new Error("fetch() is not available, please polyfill it");case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(){var n=i(r.mark((function n(i,o){var a,s;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=JSON.stringify(i),s=new Date,!(e[a]&&s-e[a].time<o)){n.next=4;break}return n.abrupt("return",e[a].value);case 4:return n.next=6,t(i);case 6:return n.t0=n.sent,n.t1=s,e[a]={value:n.t0,time:n.t1},n.abrupt("return",e[a].value);case 10:case"end":return n.stop()}}),n)})));return function(t,e){return n.apply(this,arguments)}}()}(function(){var t=i(r.mark((function t(n){var i,a,s;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=n.sheet,a=n.tab,t.next=3,o("https://spreadsheets.google.com/feeds/list/".concat(i,"/").concat(a,"/public/values?alt=json"));case 3:return s=t.sent,t.abrupt("return",s.feed.entry.map(e));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());return function(){var t=i(r.mark((function t(e){var n,i,o,s,u,c,l;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=(n="object"===typeof e?e:{sheet:e}).sheet,o=void 0===i?"":i,s=n.tab,u=void 0===s?"default":s,c=n.cache,l=void 0===c?3600:c,o){t.next=4;break}throw new Error("Need a Google Drive sheet id to load");case 4:return t.abrupt("return",a({sheet:o,tab:u},l));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}()},function(t,e,n){t.exports=n(166)},function(t,e,n){var r=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,i="function"===typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(x){u=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var i=e&&e.prototype instanceof y?e:y,o=Object.create(i.prototype),a=new k(r||[]);return o._invoke=function(t,e,n){var r=f;return function(i,o){if(r===p)throw new Error("Generator is already running");if(r===d){if("throw"===i)throw o;return A()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=S(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var u=l(t,e,n);if("normal"===u.type){if(r=n.done?d:h,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=d,n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(x){return{type:"throw",arg:x}}}t.wrap=c;var f="suspendedStart",h="suspendedYield",p="executing",d="completed",v={};function y(){}function g(){}function m(){}var b={};b[o]=function(){return this};var w=Object.getPrototypeOf,_=w&&w(w(N([])));_&&_!==n&&r.call(_,o)&&(b=_);var E=m.prototype=y.prototype=Object.create(b);function T(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"===typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}}function S(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&
vendor: 4,466 bytes, line 2
2(n.method="return",n.arg=e,S(t,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=l(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var o=i.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function N(t){if(t){var n=t[o];if(n)return n.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}return{next:A}}function A(){return{value:e,done:!0}}return g.prototype=E.constructor=m,m.constructor=g,g.displayName=u(m,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"===typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,u(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},t.awrap=function(t){return{__await:t}},T(O.prototype),O.prototype[a]=function(){return this},t.AsyncIterator=O,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new O(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},T(E),u(E,s,"Generator"),E[o]=function(){return this},E.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=N,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:N(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=r}catch(i){Function("r","regeneratorRuntime = r")(r)}},function(t,e){function n(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(c){return void n(c)}s.done?e(u):Promise.resolve(u).then(r,i)}t.exports=function(t){return function(){var e=this,r=arguments;
vendor: 4,087 bytes, line 2
2return new Promise((function(i,o){var a=t.apply(e,r);function s(t){n(a,i,o,s,u,"next",t)}function u(t){n(a,i,o,s,u,"throw",t)}s(void 0)}))}}},function(t,e,n){var r=n(169),i=n(97),o=t.exports;for(var a in r)r.hasOwnProperty(a)&&(o[a]=r[a]);function s(t){if("string"===typeof t&&(t=i.parse(t)),t.protocol||(t.protocol="https:"),"https:"!==t.protocol)throw new Error('Protocol "'+t.protocol+'" not supported. Expected "https:"');return t}o.request=function(t,e){return t=s(t),r.request.call(this,t,e)},o.get=function(t,e){return t=s(t),r.get.call(this,t,e)}},function(t,e,n){(function(t){var r=n(170),i=n(88),o=n(182),a=n(183),s=n(97),u=e;u.request=function(e,n){e="string"===typeof e?s.parse(e):o(e);var i=-1===t.location.protocol.search(/^https?:$/)?"http:":"",a=e.protocol||i,u=e.hostname||e.host,c=e.port,l=e.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),e.url=(u?a+"//"+u:"")+(c?":"+c:"")+l,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var f=new r(e);return n&&f.on("response",n),f},u.get=function(t,e){var n=u.request(t,e);return n.end(),n},u.ClientRequest=r,u.IncomingMessage=i.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=a,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,n(10))},function(t,e,n){(function(e,r,i){var o=n(87),a=n(25),s=n(88),u=n(89),c=n(181),l=s.IncomingMessage,f=s.readyStates;var h=t.exports=function(t){var n,r=this;u.Writable.call(r),r._opts=t,r._body=[],r._headers={},t.auth&&r.setHeader("Authorization","Basic "+new e(t.auth).toString("base64")),Object.keys(t.headers).forEach((function(e){r.setHeader(e,t.headers[e])}));var i=!0;if("disable-fetch"===t.mode||"requestTimeout"in t&&!o.abortController)i=!1,n=!0;else if("prefer-streaming"===t.mode)n=!1;else if("allow-wrong-content-type"===t.mode)n=!o.overrideMimeType;else{if(t.mode&&"default"!==t.mode&&"prefer-fast"!==t.mode)throw new Error("Invalid value for opts.mode");n=!0}r._mode=function(t,e){return o.fetch&&e?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&t?"arraybuffer":o.vbArray&&t?"text:vbarray":"text"}(n,i),r._fetchTimer=null,r.on("finish",(function(){r._onFinish()}))};a(h,u.Writable),h.prototype.setHeader=function(t,e){var n=t.toLowerCase();-1===p.indexOf(n)&&(this._headers[n]={name:t,value:e})},h.prototype.getHeader=function(t){var e=this._headers[t.toLowerCase()];return e?e.value:null},h.prototype.removeHeader=function(t){delete this._headers[t.toLowerCase()]},h.prototype._onFinish=function(){var t=this;if(!t._destroyed){var n=t._opts,a=t._headers,s=null;"GET"!==n.method&&"HEAD"!==n.method&&(s=o.arraybuffer?c(e.concat(t._body)):o.blobConstructor?new r.Blob(t._body.map((function(t){return c(t)})),{type:(a["content-type"]||{}).value||""}):e.concat(t._body).toString());var u=[];if(Object.keys(a).forEach((function(t){var e=a[t].name,n=a[t].value;Array.isArray(n)?n.forEach((function(t){u.push([e,t])})):u.push([e,n])})),"fetch"===t._mode){var l=null;if(o.abortController){var h=new AbortController;l=h.signal,t._fetchAbortController=h,"requestTimeout"in n&&0!==n.requestTimeout&&(t._fetchTimer=r.setTimeout((function(){t.emit("requestTimeout"),t._fetchAbortController&&t._fetchAbortController.abort()}),n.requestTimeout))}r.fetch(t._opts.url,{method:t._opts.method,headers:u,body:s||void 0,mode:"cors",credentials:n.withCredentials?"include":"same-origin",signal:l}).then((function(e){t._fetchResponse=e,t._connect()}),(function(e){r.clearTimeout(t._fetchTimer),t._destroyed||t.emit("error",e)}))}else{var p=t._xhr=new r.XMLHttpRequest;try{p.open(t._opts.method,t._opts.url,!0)}catch(d){return void i.nextTick((function(){t.emit("error",d)}))}"responseType"in p&&(p.responseType=t._mode.split(":")[0]),"withCredentials"in p&&(p.withCredentials=!!n.withCredentials),"text"===t._mode&&"overrideMimeType"in p&&p.overrideMimeType("text/plain;
2 charset=x-user-defined"),"requestTimeout"in n&&(p.timeout=n.requestTimeout,p.ontimeout=function(){t.emit("requestTimeout")}),u.forEach((function(t){p.setRequestHeader(t[0],t[1])})),t._response=null,p.onreadystatechange=function(){switch(p.readyState){case f.LOADING:case f.DONE:t._onXHRProgress()}},"moz-chunked-arraybuffer"===t._mode&&(p.onprogress=function(){t._onXHRProgress()}),p.onerror=function(){t._destroyed||t.emit("error",new Error("XHR error"))};try{p.send(s)}catch(d){return void i.nextTick((function(){t.emit("error",d)}))}}}},h.prototype._onXHRProgress=function(){var t=this;(function(t){try{var e=t.status;return null!==e&&0!==e}catch(n){return!1}})(t._xhr)&&!t._destroyed&&(t._response||t._connect(),t._response._onXHRProgress())},h.prototype._connect=function(){var t=this;t._destroyed||(t._response=new l(t._xhr,t._fetchResponse,t._mode,t._fetchTimer),t._response.on("error",(function(e){t.emit("error",e)})),t.emit("response",t._response))},h.prototype._write=function(t,e,n){this._body.push(t),n()},h.prototype.abort=h.prototype.destroy=function(){var t=this;t._destroyed=!0,r.clearTimeout(t._fetchTimer),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort()},h.prototype.end=function(t,e,n){"function"===typeof t&&(n=t,t=void 0),u.Writable.prototype.end.call(this,t,e,n)},h.prototype.flushHeaders=function(){},h.prototype.setTimeout=function(){},h.prototype.setNoDelay=function(){},h.prototype.setSocketKeepAlive=function(){};var p=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this,n(31).Buffer,n(10),n(16))},function(t,e,n){"use strict";e.byteLength=function(t){var e=c(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,r=c(t),a=r[0],s=r[1],u=new o(function(t,e,n){return 3*(e+n)/4-n}(0,a,s)),l=0,f=s>0?a-4:a;for(n=0;n<f;n+=4)e=i[t.charCodeAt(n)]<<18|i[t.charCodeAt(n+1)]<<12|i[t.charCodeAt(n+2)]<<6|i[t.charCodeAt(n+3)],u[l++]=e>>16&255,u[l++]=e>>8&255,u[l++]=255&e;2===s&&(e=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,u[l++]=255&e);1===s&&(e=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,u[l++]=e>>8&255,u[l++]=255&e);return u},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],a=16383,s=0,u=n-i;s<u;s+=a)o.push(l(t,s,s+a>u?u:s+a));1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!==typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function l(t,e,n){for(var i,o,a=[],s=e;s<n;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,c=u>>1,l=-7,f=n?i-1:0,h=n?-1:1,p=t[e+f];for(f+=h,o=p&(1<<-l)-1,p>>=-l,l+=s;l>0;o=256*o+t[e+f],f+=h,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+t[e+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=c}return(p?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(e*u-1)*Math.pow(2,i),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;t[n+p]=255&s,p+=d,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;t[n+p]=255&a,p+=d,a/=256,c-=8);t[n+p-d]|=128*v}},,function(t,e,n){"use strict";var r=n(68).Buffer,i=n(175);t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n},t.prototype.concat=function(t){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var e,n,i,o=r.allocUnsafe(t>>>0),a=this.head,s=0;a;)e=a.data,n=o,i=s,e.copy(n,i),s+=a.data.length,a=a.next;return o},t}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},,function(t,e,n){(function(t){var r="undefined"!==typeof t&&t||"undefined"!==typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(177),e.setImmediate="undefined"!==typeof self&&self.setImmediate||"undefined"!==typeof t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!==typeof self&&self.clearImmediate||"undefined"!==typeof t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(10))},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i=1,o={},a=!1,s=t.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(t);u=u&&u.setTimeout?u:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){l(t)}))}:function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?function(){var e="setImmediate$"+Math.random()+"$",n=function(n){n.source===t&&"string"===typeof n.data&&0===n.data.indexOf(e)&&l(+n.data.slice(e.length))};t.addEventListener?t.addEventListener("message",n,!1):t.attachEvent("onmessage",n),r=function(n){t.postMessage(e+n,"*")}}():t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){l(t.data)},r=function(e){t.port2.postMessage(e)}}():s&&"onreadystatechange"in s.createElement("script")?function(){var t=s.documentElement;
2r=function(e){var n=s.createElement("script");n.onreadystatechange=function(){l(e),n.onreadystatechange=null,t.removeChild(n),n=null},t.appendChild(n)}}():r=function(t){setTimeout(l,0,t)},u.setImmediate=function(t){"function"!==typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var a={callback:t,args:e};return o[i]=a,r(i),i++},u.clearImmediate=c}function c(t){delete o[t]}function l(t){if(a)setTimeout(l,0,t);else{var e=o[t];if(e){a=!0;try{!function(t){var e=t.callback,n=t.args;switch(n.length){case 0:e();break;case 1:e(n[0]);break;case 2:e(n[0],n[1]);break;case 3:e(n[0],n[1],n[2]);break;default:e.apply(void 0,n)}}(e)}finally{c(t),a=!1}}}}}("undefined"===typeof self?"undefined"===typeof t?this:t:self)}).call(this,n(10),n(16))},function(t,e,n){(function(e){function n(t){try{if(!e.localStorage)return!1}catch(r){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}}).call(this,n(10))},function(t,e,n){var r=n(31),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function a(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(t,e,n){if("number"===typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},a.alloc=function(t,e,n){if("number"!==typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"===typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},a.allocUnsafe=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return i(t)},a.allocUnsafeSlow=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},function(t,e,n){"use strict";t.exports=o;var r=n(96),i=Object.create(n(41));function o(t){if(!(this instanceof o))return new o(t);r.call(this,t)}i.inherits=n(25),i.inherits(o,r),o.prototype._transform=function(t,e,n){n(null,t)}},function(t,e,n){var r=n(31).Buffer;t.exports=function(t){if(t instanceof Uint8Array){if(0===t.byteOffset&&t.byteLength===t.buffer.byteLength)return t.buffer;if("function"===typeof t.buffer.slice)return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}if(r.isBuffer(t)){for(var e=new Uint8Array(t.length),n=t.length,i=0;i<n;i++)e[i]=t[i];return e.buffer}throw new Error("Argument must be a Buffer")}},function(t,e){t.exports=function(){for(var t={},e=0;e<arguments.length;e++){var r=arguments[e];for(var i in r)n.call(r,i)&&(t[i]=r[i])}return t};var n=Object.prototype.hasOwnProperty},function(t,e){t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},function(t,e,n){(function(t,r){var i;!function(o){e&&e.nodeType,t&&t.nodeType;var a="object"==typeof r&&r;a.global!==a&&a.window!==a&&a.self;var s,u=2147483647,c=36,l=/^xn--/,f=/[^\x20-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >
2= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,v=String.fromCharCode;function y(t){throw new RangeError(p[t])}function g(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function m(t,e){var n=t.split("@"),r="";return n.length>1&&(r=n[0]+"@",t=n[1]),r+g((t=t.replace(h,".")).split("."),e).join(".")}function b(t){for(var e,n,r=[],i=0,o=t.length;i<o;)(e=t.charCodeAt(i++))>=55296&&e<=56319&&i<o?56320==(64512&(n=t.charCodeAt(i++)))?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),i--):r.push(e);return r}function w(t){return g(t,(function(t){var e="";return t>65535&&(e+=v((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=v(t)})).join("")}function _(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function E(t,e,n){var r=0;for(t=n?d(t/700):t>>1,t+=d(t/e);t>455;r+=c)t=d(t/35);return d(r+36*t/(t+38))}function T(t){var e,n,r,i,o,a,s,l,f,h,p,v=[],g=t.length,m=0,b=128,_=72;for((n=t.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)t.charCodeAt(r)>=128&&y("not-basic"),v.push(t.charCodeAt(r));for(i=n>0?n+1:0;i<g;){for(o=m,a=1,s=c;i>=g&&y("invalid-input"),((l=(p=t.charCodeAt(i++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:c)>=c||l>d((u-m)/a))&&y("overflow"),m+=l*a,!(l<(f=s<=_?1:s>=_+26?26:s-_));s+=c)a>d(u/(h=c-f))&&y("overflow"),a*=h;_=E(m-o,e=v.length+1,0==o),d(m/e)>u-b&&y("overflow"),b+=d(m/e),m%=e,v.splice(m++,0,b)}return w(v)}function O(t){var e,n,r,i,o,a,s,l,f,h,p,g,m,w,T,O=[];for(g=(t=b(t)).length,e=128,n=0,o=72,a=0;a<g;++a)(p=t[a])<128&&O.push(v(p));for(r=i=O.length,i&&O.push("-");r<g;){for(s=u,a=0;a<g;++a)(p=t[a])>=e&&p<s&&(s=p);for(s-e>d((u-n)/(m=r+1))&&y("overflow"),n+=(s-e)*m,e=s,a=0;a<g;++a)if((p=t[a])<e&&++n>u&&y("overflow"),p==e){for(l=n,f=c;!(l<(h=f<=o?1:f>=o+26?26:f-o));f+=c)T=l-h,w=c-h,O.push(v(_(h+T%w,0))),l=d(T/w);O.push(v(_(l,0))),o=E(n,m,r==i),n=0,++r}++n,++e}return O.join("")}s={version:"1.4.1",ucs2:{decode:b,encode:w},decode:T,encode:O,toASCII:function(t){return m(t,(function(t){return f.test(t)?"xn--"+O(t):t}))},toUnicode:function(t){return m(t,(function(t){return l.test(t)?T(t.slice(4).toLowerCase()):t}))}},void 0===(i=function(){return s}.call(e,n,e,t))||(t.exports=i)}()}).call(this,n(98)(t),n(10))},function(t,e,n){"use strict";t.exports={isString:function(t){return"string"===typeof t},isObject:function(t){return"object"===typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},function(t,e,n){"use strict";e.decode=e.parse=n(187),e.encode=e.stringify=n(188)},function(t,e,n){"use strict";function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,n,o){e=e||"&",n=n||"=";var a={};if("string"!==typeof t||0===t.length)return a;var s=/\+/g;t=t.split(e);var u=1e3;o&&"number"===typeof o.maxKeys&&(u=o.maxKeys);var c=t.length;u>0&&c>u&&(c=u);for(var l=0;l<c;++l){var f,h,p,d,v=t[l].replace(s,"%20"),y=v.indexOf(n);y>=0?(f=v.substr(0,y),h=v.substr(y+1)):(f=v,h=""),p=decodeURIComponent(f),d=decodeURIComponent(h),r(a,p)?i(a[p])?a[p].push(d):a[p]=[a[p],d]:a[p]=d}return a};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,n){"use strict";var r=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,n,s){return e=e||"&",n=n||"=",null===t&&(t=void 0),"object"===typeof t?o(a(t),(function(a){var s=encodeURIComponent(r(a))+n;return i(t[a])?o(t[a],(function(t){return s+encodeURIComponent(r(t))})).join(e):s+encodeURIComponent(r(t[a]))})).join(e):s?encodeURIComponent(r(s))+n+encodeURIComponent(r(t)):""};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function o(t,e){if(t.map)return t.map(e);for(var n=[],r=0;r<t.length;r++)n.push(e(t[r],r));return n}var a=Object.keys||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e}},function(t,e,n){"use strict";var r=n(13),i=n(99),o=n(190),a=n(105);function s(t){var e=new o(t),n=i(o.prototype.request,e);return r.extend(n,o.prototype,e),r.extend(n,e),n}var u=s(n(102));u.Axios=o,u.create=function(t){return s(a(u.defaults,t))},u.Cancel=n(106),u.CancelToken=n(203),u.isCancel=n(101),u.all=function(t){return Promise.all(t)},u.spread=n(204),u.isAxiosError=n(205),t.exports=u,t.exports.default=u},function(t,e,n){"use strict";var r=n(13),i=n(100),o=n(191),a=n(192),s=n(105);function u(t){this.defaults=t,this.interceptors={request:new o,response:new o}}u.prototype.request=function(t){"string"===typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=[a,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach((function(t){e.unshift(t.fulfilled,t.rejected)})),this.interceptors.response.forEach((function(t){e.push(t.fulfilled,t.rejected)}));e.length;)n=n.then(e.shift(),e.shift());return n},u.prototype.getUri=function(t){return t=s(this.defaults,t),i(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(t){u.prototype[t]=function(e,n){return this.request(s(n||{},{method:t,url:e,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(t){u.prototype[t]=function(e,n,r){return this.request(s(r||{},{method:t,url:e,data:n}))}})),t.exports=u},function(t,e,n){"use strict";var r=n(13);function i(){this.handlers=[]}i.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){r.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=i},function(t,e,n){"use strict";var r=n(13),i=n(193),o=n(101),a=n(102);function s(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return s(t),t.headers=t.headers||{},t.data=i(t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||a.adapter)(t).then((function(e){return s(t),e.data=i(e.data,e.headers,t.transformResponse),e}),(function(e){return o(e)||(s(t),e&&e.response&&(e.response.data=i(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},function(t,e,n){"use strict";var r=n(13);t.exports=function(t,e,n){return r.forEach(n,(function(n){t=n(t,e)})),t}},function(t,e,n){"use strict";var r=n(13);t.exports=function(t,e){r.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}},function(t,e,n){"use strict";var r=n(104);t.exports=function(t,e,n){var i=n.config.validateStatus;
2n.status&&i&&!i(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},function(t,e,n){"use strict";t.exports=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}},function(t,e,n){"use strict";var r=n(13);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,n){"use strict";var r=n(199),i=n(200);t.exports=function(t,e){return t&&!r(e)?i(t,e):e}},function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,n){"use strict";var r=n(13),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,o,a={};return t?(r.forEach(t.split("\n"),(function(t){if(o=t.indexOf(":"),e=r.trim(t.substr(0,o)).toLowerCase(),n=r.trim(t.substr(o+1)),e){if(a[e]&&i.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([n]):a[e]?a[e]+", "+n:n}})),a):a}},function(t,e,n){"use strict";var r=n(13);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=i(window.location.href),function(e){var n=r.isString(e)?i(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},function(t,e,n){"use strict";var r=n(106);function i(t){if("function"!==typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;t((function(t){n.reason||(n.reason=new r(t),e(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var t;return{token:new i((function(e){t=e})),cancel:t}},t.exports=i},function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,n){"use strict";t.exports=function(t){return"object"===typeof t&&!0===t.isAxiosError}},function(t,e,n){"use strict";(function(t){var e=n(4);(function(){var n,r="function"==typeof Object.defineProperties?Object.defineProperty:function(t,e,n){t!=Array.prototype&&t!=Object.prototype&&(t[e]=n.value)};var i=function(e){e=["object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof t&&t,e];for(var n=0;n<e.length;++n){var r=e[n];if(r&&r.Math==Math)return r}return globalThis}(this);function o(t){var e=0;return function(){return e<t.length?{done:!1,value:t[e++]}:{done:!0}}}function a(t){var e="undefined"!=typeof Symbol&&Symbol.iterator&&t[Symbol.iterator];return e?e.call(t):{next:o(t)}}!function(t,e){if(e){var n=i;t=t.split(".");for(var o=0;o<t.length-1;o++){var a=t[o];a in n||(n[a]={}),n=n[a]}(e=e(o=n[t=t[t.length-1]]))!=o&&null!=e&&r(n,t,{configurable:!0,writable:!0,value:e})}}("Promise",(function(t){function e(t){this.b=0,this.c=void 0,this.a=[];var e=this.f();try{t(e.resolve,e.reject)}catch(n){e.reject(n)}}function n(){this.a=null}function r(t){return t instanceof e?t:new e((function(e){e(t)}))}if(t)return t;n.prototype.b=function(t){if(null==this.a){this.a=[];var e=this;this.c((function(){e.g()}))}this.a.push(t)};var o=i.setTimeout;n.prototype.c=function(t){o(t,0)},n.prototype.g=function(){for(;this.a&&this.a.length;){var t=this.a;this.a=[];for(var e=0;e<t.length;++e){var n=t[e];t[e]=null;try{n()}catch(r){this.f(r)}}}this.a=null},n.prototype.f=function(t){this.c((function(){throw t}))},e.prototype.f=function(){function t(t){return function(r){n||(n=!0,t.call(e,r))}}var e=this,n=!1;return{resolve:t(this.m),reject:t(this.g)}}
vendor: 1,338 bytes, line 2
2,e.prototype.m=function(t){if(t===this)this.g(new TypeError("A Promise cannot resolve to itself"));else if(t instanceof e)this.s(t);else{t:switch(typeof t){case"object":var n=null!=t;break t;case"function":n=!0;break t;default:n=!1}n?this.v(t):this.h(t)}},e.prototype.v=function(t){var e=void 0;try{e=t.then}catch(n){return void this.g(n)}"function"==typeof e?this.u(e,t):this.h(t)},e.prototype.g=function(t){this.i(2,t)},e.prototype.h=function(t){this.i(1,t)},e.prototype.i=function(t,e){if(0!=this.b)throw Error("Cannot settle("+t+", "+e+"): Promise already settled in state"+this.b);this.b=t,this.c=e,this.l()},e.prototype.l=function(){if(null!=this.a){for(var t=0;t<this.a.length;++t)s.b(this.a[t]);this.a=null}};var s=new n;return e.prototype.s=function(t){var e=this.f();t.Qa(e.resolve,e.reject)},e.prototype.u=function(t,e){var n=this.f();try{t.call(e,n.resolve,n.reject)}catch(r){n.reject(r)}},e.prototype.then=function(t,n){function r(t,e){return"function"==typeof t?function(e){try{i(t(e))}catch(n){o(n)}}:e}var i,o,a=new e((function(t,e){i=t,o=e}));return this.Qa(r(t,i),r(n,o)),a},e.prototype.catch=function(t){return this.then(void 0,t)},e.prototype.Qa=function(t,e){function n(){switch(r.b){case 1:t(r.c);break;case 2:e(r.c);break;default:throw Error("Unexpected state: "+r.b)}}var r=this;null==this.a?s.b(n):this.a.push(n)}
2,e.resolve=r,e.reject=function(t){return new e((function(e,n){n(t)}))},e.race=function(t){return new e((function(e,n){for(var i=a(t),o=i.next();!o.done;o=i.next())r(o.value).Qa(e,n)}))},e.all=function(t){var n=a(t),i=n.next();return i.done?r([]):new e((function(t,e){function o(e){return function(n){a[e]=n,0==--s&&t(a)}}var a=[],s=0;do{a.push(void 0),s++,r(i.value).Qa(o(a.length-1),e),i=n.next()}while(!i.done)}))},e}));var s=s||{},u=this||self,c=/^[\w+/_-]+[=]{0,2}$/,l=null;function f(t){return(t=t.querySelector&&t.querySelector("script[nonce]"))&&(t=t.nonce||t.getAttribute("nonce"))&&c.test(t)?t:""}function h(){}function p(t){var e=typeof t;return"object"!=e?e:t?Array.isArray(t)?"array":e:"null"}function d(t){var e=p(t);return"array"==e||"object"==e&&"number"==typeof t.length}function v(t){return"function"==p(t)}function y(t){var e=typeof t;return"object"==e&&null!=t||"function"==e}function g(t){return Object.prototype.hasOwnProperty.call(t,m)&&t[m]||(t[m]=++b)}var m="closure_uid_"+(1e9*Math.random()>>>0),b=0;function w(t,e,n){return t.call.apply(t.bind,arguments)}function _(t,e,n){if(!t)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),t.apply(e,n)}}return function(){return t.apply(e,arguments)}}function E(t,e,n){return(E=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?w:_).apply(null,arguments)}function T(t,e){var n=Array.prototype.slice.call(arguments,1);return function(){var e=n.slice();return e.push.apply(e,arguments),t.apply(this,e)}}var O=Date.now;function S(t,e){function n(){}n.prototype=e.prototype,t.ab=e.prototype,t.prototype=new n,t.prototype.constructor=t}function I(t){return t}
2function C(t,e,n){this.code=A+t,this.message=e||x[t]||"",this.a=n||null}function k(t){var e=t&&t.code;return e?new C(e.substring(A.length),t.message,t.serverResponse):null}S(C,Error),C.prototype.w=function(){var t={code:this.code,message:this.message};return this.a&&(t.serverResponse=this.a),t},C.prototype.toJSON=function(){return this.w()};var N,A="auth/",x={"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."},P={ld:{Ta:"https://staging-identitytoolkit.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/",Za:"https://staging-securetoken.sandbox.googleapis.com/v1/token",Wa:"https://staging-identitytoolkit.sandbox.googleapis.com/v2/",id:"b"},sd:{Ta:"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",Za:"https://securetoken.googleapis.com/v1/token",Wa:"https://identitytoolkit.googleapis.com/v2/",id:"p"},ud:{Ta:"https://staging-www.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/",Za:"https://staging-securetoken.sandbox.googleapis.com/v1/token",Wa:"https://staging-identitytoolkit.sandbox.googleapis.com/v2/",id:"s"},vd:{Ta:"https://www-googleapis-test.sandbox.google.com/identitytoolkit/v3/relyingparty/",Za:"https://test-securetoken.sandbox.googleapis.com/v1/token",Wa:"https://test-identitytoolkit.sandbox.googleapis.com/v2/",id:"t"}};function R(t){for(var e in P)if(P[e].id===t)return{firebaseEndpoint:(t=P[e]).Ta,secureTokenEndpoint:t.Za,identityPlatformEndpoint:t.Wa};return null}function j(t){if(!t)return!1;
2try{return!!t.$goog_Thenable}catch(e){return!1}}function D(t){if(Error.captureStackTrace)Error.captureStackTrace(this,D);else{var e=Error().stack;e&&(this.stack=e)}t&&(this.message=String(t))}function L(t,e){for(var n="",r=(t=t.split("%s")).length-1,i=0;i<r;i++)n+=t[i]+(i<e.length?e[i]:"%s");D.call(this,n+t[r])}function M(t,e){throw new L("Failure"+(t?": "+t:""),Array.prototype.slice.call(arguments,1))}function F(t,e){this.c=t,this.f=e,this.b=0,this.a=null}function U(t,e){t.f(e),100>t.b&&(t.b++,e.next=t.a,t.a=e)}function V(){this.b=this.a=null}N=R("__EID__")?"__EID__":void 0,S(D,Error),D.prototype.name="CustomError",S(L,D),L.prototype.name="AssertionError",F.prototype.get=function(){if(0<this.b){this.b--;var t=this.a;this.a=t.next,t.next=null}else t=this.c();return t};var q=new F((function(){return new z}),(function(t){t.reset()}));function B(){var t=we,e=null;return t.a&&(e=t.a,t.a=t.a.next,t.a||(t.b=null),e.next=null),e}function z(){this.next=this.b=this.a=null}V.prototype.add=function(t,e){var n=q.get();n.set(t,e),this.b?this.b.next=n:this.a=n,this.b=n},z.prototype.set=function(t,e){this.a=t,this.b=e,this.next=null},z.prototype.reset=function(){this.next=this.b=this.a=null};var H=Array.prototype.indexOf?function(t,e){return Array.prototype.indexOf.call(t,e,void 0)}:function(t,e){if("string"===typeof t)return"string"!==typeof e||1!=e.length?-1:t.indexOf(e,0);for(var n=0;n<t.length;n++)if(n in t&&t[n]===e)return n;return-1},W=Array.prototype.forEach?function(t,e,n){Array.prototype.forEach.call(t,e,n)}:function(t,e,n){for(var r=t.length,i="string"===typeof t?t.split(""):t,o=0;o<r;o++)o in i&&e.call(n,i[o],o,t)};var K=Array.prototype.filter?function(t,e){return Array.prototype.filter.call(t,e,void 0)}:function(t,e){for(var n=t.length,r=[],i=0,o="string"===typeof t?t.split(""):t,a=0;a<n;a++)if(a in o){var s=o[a];e.call(void 0,s,a,t)&&(r[i++]=s)}return r},G=Array.prototype.map?function(t,e){return Array.prototype.map.call(t,e,void 0)}:function(t,e){for(var n=t.length,r=Array(n),i="string"===typeof t?t.split(""):t,o=0;o<n;o++)o in i&&(r[o]=e.call(void 0,i[o],o,t));return r},Q=Array.prototype.some?function(t,e){return Array.prototype.some.call(t,e,void 0)}:function(t,e){for(var n=t.length,r="string"===typeof t?t.split(""):t,i=0;i<n;i++)if(i in r&&e.call(void 0,r[i],i,t))return!0;return!1};function Y(t,e){return 0<=H(t,e)}function X(t,e){var n;return(n=0<=(e=H(t,e)))&&Array.prototype.splice.call(t,e,1),n}function $(t,e){!function(t,e){for(var n="string"===typeof t?t.split(""):t,r=t.length-1;0<=r;--r)r in n&&e.call(void 0,n[r],r,t)}(t,(function(n,r){e.call(void 0,n,r,t)&&1==Array.prototype.splice.call(t,r,1).length&&0}))}function J(t){return Array.prototype.concat.apply([],arguments)}function Z(t){var e=t.length;if(0<e){for(var n=Array(e),r=0;r<e;r++)n[r]=t[r];return n}return[]}var tt,et=String.prototype.trim?function(t){return t.trim()}:function(t){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(t)[1]},nt=/&/g,rt=/</g,it=/>/g,ot=/"/g,at=/'/g,st=/\x00/g,ut=/[\x00&<>"']/;function ct(t,e){return-1!=t.indexOf(e)}function lt(t,e){return t<e?-1:t>e?1:0}t:{var ft=u.navigator;if(ft){var ht=ft.userAgent;if(ht){tt=ht;break t}}tt=""}function pt(t){return ct(tt,t)}function dt(t,e){for(var n in t)e.call(void 0,t[n],n,t)}function vt(t){for(var e in t)return!1;return!0}function yt(t){var e,n={};for(e in t)n[e]=t[e];return n}var gt="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function mt(t,e){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i])t[n]=r[n];for(var o=0;o<gt.length;o++)n=gt[o],Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}}function bt(t,e){t:{try{var n=t&&t.ownerDocument,r=n&&(n.defaultView||n.parentWindow);if((r=r||u).Element&&r.Location){var i=r;break t}}catch(a){}i=null}if(i&&"undefined"!=typeof i[e]&&(!t||!(t instanceof i[e])&&(t instanceof i.Location||t instanceof i.Element))){if(y(t))try{var o=t.constructor.displayName||t.constructor.name||Object.prototype.toString.call(t)}catch(a){o="<object could not be stringified>"}else o=void 0===t?"undefined":null===t?"null":typeof t;M("Argument is not a %s (or a non-Element, non-Location mock); got: %s",e,o)}}function wt(t,e){this.a=t===Ot&&e||"",this.b=Tt}function _t(t){return t instanceof wt&&t.constructor===wt&&t.b===Tt?t.a:(M("expected object of type Const, got '"+t+"'"),"type_error:Const")}wt.prototype.sa=!0,wt.prototype.ra=function(){return this.a},wt.prototype.toString=function(){return"Const{"+this.a+"}"};var Et,Tt={},Ot={};function St(){if(void 0===Et){var t=null,e=u.trustedTypes;if(e&&e.createPolicy){try{t=e.createPolicy("goog#html",{createHTML:I,createScript:I,createScriptURL:I})}catch(n){u.console&&u.console.error(n.message)}Et=t}else Et=t}return Et}function It(t,e){this.a=e===xt?t:""}function Ct(t){return t instanceof It&&t.constructor===It?t.a:(M("expected object of type TrustedResourceUrl, got '"+t+"' of type "+p(t)),"type_error:TrustedResourceUrl")}function kt(t,e){var n=_t(t);if(!At.test(n))throw Error("Invalid TrustedResourceUrl format: "+n);return function(t){var e=St();return new It(t=e?e.createScriptURL(t):t,xt)}(t=n.replace(Nt,(function(t,r){if(!Object.prototype.hasOwnProperty.call(e,r))throw Error('Found marker, "'+r+'", in format str
2ing, "'+n+'", but no valid label mapping found in args: '+JSON.stringify(e));return(t=e[r])instanceof wt?_t(t):encodeURIComponent(String(t))})))}It.prototype.sa=!0,It.prototype.ra=function(){return this.a.toString()},It.prototype.toString=function(){return"TrustedResourceUrl{"+this.a+"}"};var Nt=/%{(\w+)}/g,At=/^((https:)?\/\/[0-9a-z.:[\]-]+\/|\/[^/\\]|[^:/\\%]+\/|[^:/\\%]*[?#]|about:blank#)/i,xt={};function Pt(t,e){this.a=e===Ut?t:""}function Rt(t){return t instanceof Pt&&t.constructor===Pt?t.a:(M("expected object of type SafeUrl, got '"+t+"' of type "+p(t)),"type_error:SafeUrl")}Pt.prototype.sa=!0,Pt.prototype.ra=function(){return this.a.toString()},Pt.prototype.toString=function(){return"SafeUrl{"+this.a+"}"};var jt=/^(?:audio\/(?:3gpp2|3gpp|aac|L16|midi|mp3|mp4|mpeg|oga|ogg|opus|x-m4a|x-matroska|x-wav|wav|webm)|font\/\w+|image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp|x-icon)|text\/csv|video\/(?:mpeg|mp4|ogg|webm|quicktime|x-matroska))(?:;\w+=(?:\w+|"[\w;,= ]+"))*$/i,Dt=/^data:(.*);base64,[a-z0-9+\/]+=*$/i,Lt=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;function Mt(t){if(t instanceof Pt)return t;if(t="object"==typeof t&&t.sa?t.ra():String(t),Lt.test(t))t=new Pt(t,Ut);else{var e=(t=(t=String(t)).replace(/(%0A|%0D)/g,"")).match(Dt);t=e&&jt.test(e[1])?new Pt(t,Ut):null}return t}function Ft(t){return t instanceof Pt?t:(t="object"==typeof t&&t.sa?t.ra():String(t),Lt.test(t)||(t="about:invalid#zClosurez"),new Pt(t,Ut))}var Ut={},Vt=new Pt("about:invalid#zClosurez",Ut);function qt(t,e,n){this.a=n===Bt?t:""}qt.prototype.sa=!0,qt.prototype.ra=function(){return this.a.toString()},qt.prototype.toString=function(){return"SafeHtml{"+this.a+"}"};var Bt={};function zt(t,e,n,r){return t=t instanceof Pt?t:Ft(t),e=e||u,n=n instanceof wt?_t(n):n||"",e.open(Rt(t),n,r,void 0)}function Ht(t,e){for(var n=t.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 Wt(t){return ut.test(t)&&(-1!=t.indexOf("&")&&(t=t.replace(nt,"&")),-1!=t.indexOf("<")&&(t=t.replace(rt,"<")),-1!=t.indexOf(">")&&(t=t.replace(it,">")),-1!=t.indexOf('"')&&(t=t.replace(ot,""")),-1!=t.indexOf("'")&&(t=t.replace(at,"'")),-1!=t.indexOf("\0")&&(t=t.replace(st,"�"))),t}function Kt(t){return Kt[" "](t),t}Kt[" "]=h;var Gt,Qt=pt("Opera"),Yt=pt("Trident")||pt("MSIE"),Xt=pt("Edge"),$t=Xt||Yt,Jt=pt("Gecko")&&!(ct(tt.toLowerCase(),"webkit")&&!pt("Edge"))&&!(pt("Trident")||pt("MSIE"))&&!pt("Edge"),Zt=ct(tt.toLowerCase(),"webkit")&&!pt("Edge");function te(){var t=u.document;return t?t.documentMode:void 0}t:{var ee="",ne=function(){var t=tt;return Jt?/rv:([^\);]+)(\)|;)/.exec(t):Xt?/Edge\/([\d\.]+)/.exec(t):Yt?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(t):Zt?/WebKit\/(\S+)/.exec(t):Qt?/(?:Version)[ \/]?(\S+)/.exec(t):void 0}();if(ne&&(ee=ne?ne[1]:""),Yt){var re=te();if(null!=re&&re>parseFloat(ee)){Gt=String(re);break t}}Gt=ee}var ie,oe={};function ae(t){return function(t,e){var n=oe;return Object.prototype.hasOwnProperty.call(n,t)?n[t]:n[t]=e(t)}(t,(function(){for(var e=0,n=et(String(Gt)).split("."),r=et(String(t)).split("."),i=Math.max(n.length,r.length),o=0;0==e&&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;e=lt(0==a[1].length?0:parseInt(a[1],10),0==s[1].length?0:parseInt(s[1],10))||lt(0==a[2].length,0==s[2].length)||lt(a[2],s[2]),a=a[3],s=s[3]}while(0==e)}return 0<=e}))}if(u.document&&Yt){var se=te();ie=se||(parseInt(Gt,10)||void 0)}else ie=void 0;var ue=ie;try{new self.OffscreenCanvas(0,0).getContext("2d")}catch(ha){}var ce=!Yt||9<=Number(ue);function le(t){var e=document;return"string"===typeof t?e.getElementById(t):t}function fe(t,e){dt(e,(function(e,n){e&&"object"==typeof e&&e.sa&&(e=e.ra()),"style"==n?t.style.cssText=e:"class"==n?t.className=e:"for"==n?t.htmlFor=e:de.hasOwnProperty(n)?t.setAttribute(de[n],e):0==n.lastIndexOf("aria-",0)||0==n.lastIndexOf("data-",0)?t.setAttribute(n,e):t[n]=e}))}var he,pe,de={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",
2nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};function ve(t,e,n){function r(n){n&&e.appendChild("string"===typeof n?t.createTextNode(n):n)}for(var i=2;i<n.length;i++){var o=n[i];if(!d(o)||y(o)&&0<o.nodeType)r(o);else{t:{if(o&&"number"==typeof o.length){if(y(o)){var a="function"==typeof o.item||"string"==typeof o.item;break t}if(v(o)){a="function"==typeof o.item;break t}}a=!1}W(a?Z(o):o,r)}}}function ye(t,e){return e=String(e),"application/xhtml+xml"===t.contentType&&(e=e.toLowerCase()),t.createElement(e)}function ge(t){u.setTimeout((function(){throw t}),0)}function me(t,e){pe||function(){if(u.Promise&&u.Promise.resolve){var t=u.Promise.resolve(void 0);pe=function(){t.then(_e)}}else pe=function(){var t=_e;!v(u.setImmediate)||u.Window&&u.Window.prototype&&!pt("Edge")&&u.Window.prototype.setImmediate==u.setImmediate?(he||(he=function(){var t=u.MessageChannel;if("undefined"===typeof t&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!pt("Presto")&&(t=function(){var t=ye(document,"IFRAME");t.style.display="none",document.documentElement.appendChild(t);var e=t.contentWindow;(t=e.document).open(),t.close();var n="callImmediate"+Math.random(),r="file:"==e.location.protocol?"*":e.location.protocol+"//"+e.location.host;t=E((function(t){"*"!=r&&t.origin!=r||t.data!=n||this.port1.onmessage()}),this),e.addEventListener("message",t,!1),this.port1={},this.port2={postMessage:function(){e.postMessage(n,r)}}}),"undefined"!==typeof t&&!pt("Trident")&&!pt("MSIE")){var e=new t,n={},r=n;return e.port1.onmessage=function(){if(void 0!==n.next){var t=(n=n.next).Gb;n.Gb=null,t()}},function(t){r.next={Gb:t},r=r.next,e.port2.postMessage(0)}}return function(t){u.setTimeout(t,0)}}()),he(t)):u.setImmediate(t)}}(),be||(pe(),be=!0),we.add(t,e)}var be=!1,we=new V;function _e(){for(var t;t=B();){try{t.a.call(t.b)}catch(e){ge(e)}U(q,t)}be=!1}function Ee(t,e){if(this.a=Te,this.i=void 0,this.f=this.b=this.c=null,this.g=this.h=!1,t!=h)try{var n=this;t.call(e,(function(t){Le(n,Oe,t)}),(function(t){if(!(t instanceof ze))try{if(t instanceof Error)throw t;throw Error("Promise rejected.")}catch(e){}Le(n,Se,t)}))}catch(r){Le(this,Se,r)}}var Te=0,Oe=2,Se=3;function Ie(){this.next=this.f=this.b=this.g=this.a=null,this.c=!1}Ie.prototype.reset=function(){this.f=this.b=this.g=this.a=null,this.c=!1};var Ce=new F((function(){return new Ie}),(function(t){t.reset()}));function ke(t,e,n){var r=Ce.get();return r.g=t,r.b=e,r.f=n,r}function Ne(t){if(t instanceof Ee)return t;var e=new Ee(h);return Le(e,Oe,t),e}
2function Ae(t){return new Ee((function(e,n){n(t)}))}function xe(t,e,n){Me(t,e,n,null)||me(T(e,t))}function Pe(t){return new Ee((function(e){var n=t.length,r=[];if(n)for(var i=function(t,i,o){n--,r[t]=i?{Pb:!0,value:o}:{Pb:!1,reason:o},0==n&&e(r)},o=0;o<t.length;o++)xe(t[o],T(i,o,!0),T(i,o,!1));else e(r)}))}function Re(t,e){if(t.a==Te)if(t.c){var n=t.c;if(n.b){for(var r=0,i=null,o=null,a=n.b;a&&(a.c||(r++,a.a==t&&(i=a),!(i&&1<r)));a=a.next)i||(o=a);i&&(n.a==Te&&1==r?Re(n,e):(o?((r=o).next==n.f&&(n.f=r),r.next=r.next.next):Ue(n),Ve(n,i,Se,e)))}t.c=null}else Le(t,Se,e)}function je(t,e){t.b||t.a!=Oe&&t.a!=Se||Fe(t),t.f?t.f.next=e:t.b=e,t.f=e}function De(t,e,n,r){var i=ke(null,null,null);return i.a=new Ee((function(t,o){i.g=e?function(n){try{var i=e.call(r,n);t(i)}catch(a){o(a)}}:t,i.b=n?function(e){try{var i=n.call(r,e);void 0===i&&e instanceof ze?o(e):t(i)}catch(a){o(a)}}:o})),i.a.c=t,je(t,i),i.a}function Le(t,e,n){t.a==Te&&(t===n&&(e=Se,n=new TypeError("Promise cannot resolve to itself")),t.a=1,Me(n,t.$c,t.ad,t)||(t.i=n,t.a=e,t.c=null,Fe(t),e!=Se||n instanceof ze||function(t,e){t.g=!0,me((function(){t.g&&Be.call(null,e)}))}(t,n)))}function Me(t,e,n,r){if(t instanceof Ee)return je(t,ke(e||h,n||null,r)),!0;if(j(t))return t.then(e,n,r),!0;if(y(t))try{var i=t.then;if(v(i))return function(t,e,n,r,i){function o(t){s||(s=!0,r.call(i,t))}function a(t){s||(s=!0,n.call(i,t))}var s=!1;try{e.call(t,a,o)}catch(u){o(u)}}(t,i,e,n,r),!0}catch(o){return n.call(r,o),!0}return!1}function Fe(t){t.h||(t.h=!0,me(t.gc,t))}function Ue(t){var e=null;return t.b&&(e=t.b,t.b=e.next,e.next=null),t.b||(t.f=null),e}function Ve(t,e,n,r){if(n==Se&&e.b&&!e.c)for(;t&&t.g;t=t.c)t.g=!1;if(e.a)e.a.c=null,qe(e,n,r);else try{e.c?e.g.call(e.f):qe(e,n,r)}catch(i){Be.call(null,i)}U(Ce,e)}function qe(t,e,n){e==Oe?t.g.call(t.f,n):t.b&&t.b.call(t.f,n)}Ee.prototype.then=function(t,e,n){return De(this,v(t)?t:null,v(e)?e:null,n)},Ee.prototype.$goog_Thenable=!0,(n=Ee.prototype).oa=function(t,e){return(t=ke(t,t,e)).c=!0,je(this,t),this},n.o=function(t,e){return De(this,null,t,e)},n.cancel=function(t){if(this.a==Te){var e=new ze(t);me((function(){Re(this,e)}),this)}},n.$c=function(t){this.a=Te,Le(this,Oe,t)},n.ad=function(t){this.a=Te,Le(this,Se,t)},n.gc=function(){for(var t;t=Ue(this);)Ve(this,t,this.a,this.i);this.h=!1};var Be=ge;function ze(t){D.call(this,t)}function He(){0!=We&&(Ke[g(this)]=this),this.xa=this.xa,this.pa=this.pa}S(ze,D),ze.prototype.name="cancel";var We=0,Ke={};function Ge(t){if(!t.xa&&(t.xa=!0,t.Da(),0!=We)){var e=g(t);if(0!=We&&t.pa&&0<t.pa.length)throw Error(t+" did not empty its onDisposeCallbacks queue. This probably means it overrode dispose() or disposeInternal() without calling the superclass' method.");delete Ke[e]}}He.prototype.xa=!1,He.prototype.Da=function(){if(this.pa)for(;this.pa.length;)this.pa.shift()()};var Qe=Object.freeze||function(t){return t},Ye=!Yt||9<=Number(ue),Xe=Yt&&!ae("9"),$e=function(){if(!u.addEventListener||!Object.defineProperty)return!1;var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}});try{u.addEventListener("test",h,e),u.removeEventListener("test",h,e)}catch(n){}return t}();function Je(t,e){this.type=t,this.b=this.target=e,this.defaultPrevented=!1}function Ze(t,e){if(Je.call(this,t?t.type:""),this.relatedTarget=this.b=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.a=null,t){var n=this.type=t.type,r=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:null;if(this.target=t.target||t.srcElement,this.b=e,e=t.relatedTarget){if(Jt){t:{try{Kt(e.nodeName);var i=!0;break t}catch(o){}i=!1}i||(e=null)}}else"mouseover"==n?e=t.fromElement:"mouseout"==n&&(e=t.toElement);this.relatedTarget=e,r?(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=void 0!==t.clientX?t.clientX:t.pageX,this.clientY=void 0!==t.clientY?t.clientY:t.pageY,this.screenX=t.screenX||0,this.screenY=t.screenY||0),this.button=t.button,this.key=t.key||"",this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.pointerId=t.pointerId||0,this.pointerType="string"===typeof t.pointerType?t.pointerType:tn[t.pointerType]||"",this.a=t,t.defaultPrevented&&this.preventDefault()}}Je.prototype.preventDefault=function(){this.defaultPrevented=!0},S(Ze,Je);
2var tn=Qe({2:"touch",3:"pen",4:"mouse"});Ze.prototype.preventDefault=function(){Ze.ab.preventDefault.call(this);var t=this.a;if(t.preventDefault)t.preventDefault();else if(t.returnValue=!1,Xe)try{(t.ctrlKey||112<=t.keyCode&&123>=t.keyCode)&&(t.keyCode=-1)}catch(e){}},Ze.prototype.g=function(){return this.a};var en="closure_listenable_"+(1e6*Math.random()|0),nn=0;function rn(t,e,n,r,i){this.listener=t,this.proxy=null,this.src=e,this.type=n,this.capture=!!r,this.Va=i,this.key=++nn,this.va=this.Pa=!1}function on(t){t.va=!0,t.listener=null,t.proxy=null,t.src=null,t.Va=null}function an(t){this.src=t,this.a={},this.b=0}function sn(t,e){var n=e.type;n in t.a&&X(t.a[n],e)&&(on(e),0==t.a[n].length&&(delete t.a[n],t.b--))}function un(t,e,n,r){for(var i=0;i<t.length;++i){var o=t[i];if(!o.va&&o.listener==e&&o.capture==!!n&&o.Va==r)return i}return-1}an.prototype.add=function(t,e,n,r,i){var o=t.toString();(t=this.a[o])||(t=this.a[o]=[],this.b++);var a=un(t,e,r,i);return-1<a?(e=t[a],n||(e.Pa=!1)):((e=new rn(e,this.src,o,!!r,i)).Pa=n,t.push(e)),e};var cn="closure_lm_"+(1e6*Math.random()|0),ln={};function fn(t,e,n,r,i){if(r&&r.once)pn(t,e,n,r,i);else if(Array.isArray(e))for(var o=0;o<e.length;o++)fn(t,e[o],n,r,i);else n=En(n),t&&t[en]?On(t,e,n,y(r)?!!r.capture:!!r,i):hn(t,e,n,!1,r,i)}function hn(t,e,n,r,i,o){if(!e)throw Error("Invalid event type");var a=y(i)?!!i.capture:!!i,s=wn(t);if(s||(t[cn]=s=new an(t)),!(n=s.add(e,n,r,a,o)).proxy){if(r=function(){var t=bn,e=Ye?function(n){return t.call(e.src,e.listener,n)}:function(n){if(!(n=t.call(e.src,e.listener,n)))return n};return e}(),n.proxy=r,r.src=t,r.listener=n,t.addEventListener)$e||(i=a),void 0===i&&(i=!1),t.addEventListener(e.toString(),r,i);else if(t.attachEvent)t.attachEvent(yn(e.toString()),r);else{if(!t.addListener||!t.removeListener)throw Error("addEventListener and attachEvent are unavailable.");t.addListener(r)}0}}function pn(t,e,n,r,i){if(Array.isArray(e))for(var o=0;o<e.length;o++)pn(t,e[o],n,r,i);else n=En(n),t&&t[en]?Sn(t,e,n,y(r)?!!r.capture:!!r,i):hn(t,e,n,!0,r,i)}function dn(t,e,n,r,i){if(Array.isArray(e))for(var o=0;o<e.length;o++)dn(t,e[o],n,r,i);else r=y(r)?!!r.capture:!!r,n=En(n),t&&t[en]?(t=t.v,(e=String(e).toString())in t.a&&(-1<(n=un(o=t.a[e],n,r,i))&&(on(o[n]),Array.prototype.splice.call(o,n,1),0==o.length&&(delete t.a[e],t.b--)))):t&&(t=wn(t))&&(e=t.a[e.toString()],t=-1,e&&(t=un(e,n,r,i)),(n=-1<t?e[t]:null)&&vn(n))}function vn(t){if("number"!==typeof t&&t&&!t.va){var e=t.src;if(e&&e[en])sn(e.v,t);else{var n=t.type,r=t.proxy;e.removeEventListener?e.removeEventListener(n,r,t.capture):e.detachEvent?e.detachEvent(yn(n),r):e.addListener&&e.removeListener&&e.removeListener(r),(n=wn(e))?(sn(n,t),0==n.b&&(n.src=null,e[cn]=null)):on(t)}}}function yn(t){return t in ln?ln[t]:ln[t]="on"+t}function gn(t,e,n,r){var i=!0;if((t=wn(t))&&(e=t.a[e.toString()]))for(e=e.concat(),t=0;t<e.length;t++){var o=e[t];o&&o.capture==n&&!o.va&&(o=mn(o,r),i=i&&!1!==o)}return i}function mn(t,e){var n=t.listener,r=t.Va||t.src;return t.Pa&&vn(t),n.call(r,e)}function bn(t,e){if(t.va)return!0;if(!Ye){if(!e)t:{e=["window","event"];for(var n=u,r=0;r<e.length;r++)if(null==(n=n[e[r]])){e=null;break t}e=n}if(e=new Ze(r=e,this),n=!0,!(0>r.keyCode||void 0!=r.returnValue)){t:{var i=!1;if(0==r.keyCode)try{r.keyCode=-1;break t}catch(a){i=!0}(i||void 0==r.returnValue)&&(r.returnValue=!0)}for(r=[],i=e.b;i;i=i.parentNode)r.push(i);for(t=t.type,i=r.length-1;0<=i;i--){e.b=r[i];var o=gn(r[i],t,!0,e);n=n&&o}for(i=0;i<r.length;i++)e.b=r[i],o=gn(r[i],t,!1,e),n=n&&o}return n}return mn(t,new Ze(e,this))}function wn(t){return(t=t[cn])instanceof an?t:null}var _n="__closure_events_fn_"+(1e9*Math.random()>>>0);function En(t){return v(t)?t:(t[_n]||(t[_n]=function(e){return t.handleEvent(e)}),t[_n])}function Tn(){He.call(this),this.v=new an(this),this.ac=this,this.gb=null}function On(t,e,n,r,i){t.v.add(String(e),n,!1,r,i)}function Sn(t,e,n,r,i){t.v.add(String(e),n,!0,r,i)}function In(t,e,n,r){if(!(e=t.v.a[String(e)]))return!0;e=e.concat();for(var i=!0,o=0;o<e.length;++o){var a=e[o];if(a&&!a.va&&a.capture==n){var s=a.listener,u=a.Va||a.src;a.Pa&&sn(t.v,a),i=!1!==s.call(u,r)&&i}}return i&&!r.defaultPrevented}function Cn(t,e,n){if(v(t))n&&(t=E(t,n));else{if(!t||"function"!=typeof t.handleEvent)throw Error("Invalid listener argument");t=E(t.handleEvent,t)}return 2147483647<Number(e)?-1:u.setTimeout(t,e||0)}function kn(t){var e=null;return new Ee((function(n,r){-1==(e=Cn((function(){n(void 0)}),t))&&r(Error("Failed to schedule timer."))})).o((function(t){throw u.clearTimeout(e),t}))}function Nn(t){if(t.W&&"function"==typeof t.W)return t.W();if("string"===typeof t)return t.split("");
2if(d(t)){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e}for(r in e=[],n=0,t)e[n++]=t[r];return e}function An(t){if(t.Y&&"function"==typeof t.Y)return t.Y();if(!t.W||"function"!=typeof t.W){if(d(t)||"string"===typeof t){var e=[];t=t.length;for(var n=0;n<t;n++)e.push(n);return e}for(var r in e=[],n=0,t)e[n++]=r;return e}}function xn(t,e){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(t)if(t instanceof xn)for(n=t.Y(),r=0;r<n.length;r++)this.set(n[r],t.get(n[r]));else for(r in t)this.set(r,t[r])}function Pn(t){if(t.c!=t.a.length){for(var e=0,n=0;e<t.a.length;){var r=t.a[e];Rn(t.b,r)&&(t.a[n++]=r),e++}t.a.length=n}if(t.c!=t.a.length){var i={};for(n=e=0;e<t.a.length;)Rn(i,r=t.a[e])||(t.a[n++]=r,i[r]=1),e++;t.a.length=n}}function Rn(t,e){return Object.prototype.hasOwnProperty.call(t,e)}S(Tn,He),Tn.prototype[en]=!0,Tn.prototype.addEventListener=function(t,e,n,r){fn(this,t,e,n,r)},Tn.prototype.removeEventListener=function(t,e,n,r){dn(this,t,e,n,r)},Tn.prototype.dispatchEvent=function(t){var e,n=this.gb;if(n)for(e=[];n;n=n.gb)e.push(n);n=this.ac;var r=t.type||t;if("string"===typeof t)t=new Je(t,n);else if(t instanceof Je)t.target=t.target||n;else{var i=t;mt(t=new Je(r,n),i)}if(i=!0,e)for(var o=e.length-1;0<=o;o--){var a=t.b=e[o];i=In(a,r,!0,t)&&i}if(i=In(a=t.b=n,r,!0,t)&&i,i=In(a,r,!1,t)&&i,e)for(o=0;o<e.length;o++)i=In(a=t.b=e[o],r,!1,t)&&i;return i},Tn.prototype.Da=function(){if(Tn.ab.Da.call(this),this.v){var t,e=this.v;for(t in e.a){for(var n=e.a[t],r=0;r<n.length;r++)on(n[r]);delete e.a[t],e.b--}}this.gb=null},(n=xn.prototype).W=function(){Pn(this);for(var t=[],e=0;e<this.a.length;e++)t.push(this.b[this.a[e]]);return t},n.Y=function(){return Pn(this),this.a.concat()},n.clear=function(){this.b={},this.c=this.a.length=0},n.get=function(t,e){return Rn(this.b,t)?this.b[t]:e},n.set=function(t,e){Rn(this.b,t)||(this.c++,this.a.push(t)),this.b[t]=e},n.forEach=function(t,e){for(var n=this.Y(),r=0;r<n.length;r++){var i=n[r],o=this.get(i);t.call(e,o,i,this)}};var jn=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function Dn(t,e){var n;this.a=this.l=this.c="",this.g=null,this.h=this.f="",this.i=!1,t instanceof Dn?(this.i=void 0!==e?e:t.i,Ln(this,t.c),this.l=t.l,this.a=t.a,Mn(this,t.g),this.f=t.f,Fn(this,rr(t.b)),this.h=t.h):t&&(n=String(t).match(jn))?(this.i=!!e,Ln(this,n[1]||"",!0),this.l=zn(n[2]||""),this.a=zn(n[3]||"",!0),Mn(this,n[4]),this.f=zn(n[5]||"",!0),Fn(this,n[6]||"",!0),this.h=zn(n[7]||"")):(this.i=!!e,this.b=new $n(null,this.i))}function Ln(t,e,n){t.c=n?zn(e,!0):e,t.c&&(t.c=t.c.replace(/:$/,""))}function Mn(t,e){if(e){if(e=Number(e),isNaN(e)||0>e)throw Error("Bad port number "+e);t.g=e}else t.g=null}function Fn(t,e,n){e instanceof $n?(t.b=e,function(t,e){e&&!t.f&&(Jn(t),t.c=null,t.a.forEach((function(t,e){var n=e.toLowerCase();e!=n&&(tr(this,e),nr(this,n,t))}),t)),t.f=e}(t.b,t.i)):(n||(e=Hn(e,Yn)),t.b=new $n(e,t.i))}function Un(t,e,n){t.b.set(e,n)}function Vn(t,e){return t.b.get(e)}function qn(t){return t instanceof Dn?new Dn(t):new Dn(t,void 0)}function Bn(t,e,n,r){var i=new Dn(null,void 0);return t&&Ln(i,t),e&&(i.a=e),n&&Mn(i,n),r&&(i.f=r),i}function zn(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function Hn(t,e,n){return"string"===typeof t?(t=encodeURI(t).replace(e,Wn),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function Wn(t){return"%"+((t=t.charCodeAt(0))>>4&15).toString(16)+(15&t).toString(16)}Dn.prototype.toString=function(){var t=[],e=this.c;e&&t.push(Hn(e,Kn,!0),":");var n=this.a;return(n||"file"==e)&&(t.push("//"),(e=this.l)&&t.push(Hn(e,Kn,!0),"@"),t.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.g)&&t.push(":",String(n))),(n=this.f)&&(this.a&&"/"!=n.charAt(0)&&t.push("/"),t.push(Hn(n,"/"==n.charAt(0)?Qn:Gn,!0))),(n=this.b.toString())&&t.push("?",n),(n=this.h)&&t.push("#",Hn(n,Xn)),t.join("")},Dn.prototype.resolve=function(t){var e=new Dn(this),n=!!t.c;n?Ln(e,t.c):n=!!t.l,n?e.l=t.l:n=!!t.a,n?e.a=t.a:n=null!=t.g;var r=t.f;if(n)Mn(e,t.g);else if(n=!!t.f){if("/"!=r.charAt(0))if(this.a&&!this.f)r="/"+r;else{var i=e.f.lastIndexOf("/");-1!=i&&(r=e.f.substr(0,i+1)+r)}if(".."==(i=r)||"."==i)r="";else if(ct(i,"./")||ct(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?e.f=r:n=""!==t.b.toString(),n?Fn(e,rr(t.b)):n=!!t.h,n&&(e.h=t.h),e};var Kn=/[#\/\?@]/g,Gn=/[#\?:]/g,Qn=/[#\?]/g,Yn=/[#\?@]/g,Xn=/#/g;function $n(t,e){this.b=this.a=null,this.c=t||null,this.f=!!e}function Jn(t){t.a||(t.a=new xn,t.b=0,t.c&&function(t,e){if(t){t=t.split("&");for(var n=0;n<t.length;n++){var r=t[n].indexOf("="),i=null;if(0<=r){var o=t[n].substring(0,r);i=t[n].substring(r+1)}else o=t[n];e(o,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(t.c,(function(e,n){t.add(decodeURIComponent(e.replace(/\+/g," ")),n)})))}function Zn(t){var e=An(t);
2if("undefined"==typeof e)throw Error("Keys are undefined");var n=new $n(null,void 0);t=Nn(t);for(var r=0;r<e.length;r++){var i=e[r],o=t[r];Array.isArray(o)?nr(n,i,o):n.add(i,o)}return n}function tr(t,e){Jn(t),e=ir(t,e),Rn(t.a.b,e)&&(t.c=null,t.b-=t.a.get(e).length,Rn((t=t.a).b,e)&&(delete t.b[e],t.c--,t.a.length>2*t.c&&Pn(t)))}function er(t,e){return Jn(t),e=ir(t,e),Rn(t.a.b,e)}function nr(t,e,n){tr(t,e),0<n.length&&(t.c=null,t.a.set(ir(t,e),Z(n)),t.b+=n.length)}function rr(t){var e=new $n;return e.c=t.c,t.a&&(e.a=new xn(t.a),e.b=t.b),e}function ir(t,e){return e=String(e),t.f&&(e=e.toLowerCase()),e}function or(t){var e=[];return sr(new ar,t,e),e.join("")}function ar(){}function sr(t,e,n){if(null==e)n.push("null");else{if("object"==typeof e){if(Array.isArray(e)){var r=e;e=r.length,n.push("[");for(var i="",o=0;o<e;o++)n.push(i),sr(t,r[o],n),i=",";return void n.push("]")}if(!(e instanceof String||e instanceof Number||e instanceof Boolean)){for(r in n.push("{"),i="",e)Object.prototype.hasOwnProperty.call(e,r)&&("function"!=typeof(o=e[r])&&(n.push(i),lr(r,n),n.push(":"),sr(t,o,n),i=","));return void n.push("}")}e=e.valueOf()}switch(typeof e){case"string":lr(e,n);break;case"number":n.push(isFinite(e)&&!isNaN(e)?String(e):"null");break;case"boolean":n.push(String(e));break;case"function":n.push("null");break;default:throw Error("Unknown type: "+typeof e)}}}(n=$n.prototype).add=function(t,e){Jn(this),this.c=null,t=ir(this,t);var n=this.a.get(t);return n||this.a.set(t,n=[]),n.push(e),this.b+=1,this},n.clear=function(){this.a=this.c=null,this.b=0},n.forEach=function(t,e){Jn(this),this.a.forEach((function(n,r){W(n,(function(n){t.call(e,n,r,this)}),this)}),this)},n.Y=function(){Jn(this);for(var t=this.a.W(),e=this.a.Y(),n=[],r=0;r<e.length;r++)for(var i=t[r],o=0;o<i.length;o++)n.push(e[r]);return n},n.W=function(t){Jn(this);var e=[];if("string"===typeof t)er(this,t)&&(e=J(e,this.a.get(ir(this,t))));else{t=this.a.W();for(var n=0;n<t.length;n++)e=J(e,t[n])}return e},n.set=function(t,e){return Jn(this),this.c=null,er(this,t=ir(this,t))&&(this.b-=this.a.get(t).length),this.a.set(t,[e]),this.b+=1,this},n.get=function(t,e){return t&&0<(t=this.W(t)).length?String(t[0]):e},n.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var t=[],e=this.a.Y(),n=0;n<e.length;n++){var r=e[n],i=encodeURIComponent(String(r));r=this.W(r);for(var o=0;o<r.length;o++){var a=i;""!==r[o]&&(a+="="+encodeURIComponent(String(r[o]))),t.push(a)}}return this.c=t.join("&")};var ur={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\u000b"},cr=/\uffff/.test("\uffff")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g;function lr(t,e){e.push('"',t.replace(cr,(function(t){var e=ur[t];return e||(e="\\u"+(65536|t.charCodeAt(0)).toString(16).substr(1),ur[t]=e),e})),'"')}function fr(){var t=xr();return Yt&&!!ue&&11==ue||/Edge\/\d+/.test(t)}function hr(){return u.window&&u.window.location.href||self&&self.location&&self.location.href||""}function pr(t,e){e=e||u.window;var n="about:blank";t&&(n=Rt(Mt(t)||Vt)),e.location.href=n}function dr(t,e){var n,r=[];for(n in t)n in e?typeof t[n]!=typeof e[n]?r.push(n):"object"==typeof t[n]&&null!=t[n]&&null!=e[n]?0<dr(t[n],e[n]).length&&r.push(n):t[n]!==e[n]&&r.push(n):r.push(n);for(n in e)n in t||r.push(n);return r}function vr(t){return!!((t=(t||xr()).toLowerCase()).match(/android/)||t.match(/webos/)||t.match(/iphone|ipad|ipod/)||t.match(/blackberry/)||t.match(/windows phone/)||t.match(/iemobile/))}function yr(t){t=t||u.window;try{t.close()}catch(e){}}function gr(t,e,n){var r=Math.floor(1e9*Math.random()).toString();e=e||500,n=n||600;var i=(window.screen.availHeight-n)/2,o=(window.screen.availWidth-e)/2;for(a in e={width:e,height:n,top:0<i?i:0,left:0<o?o:0,location:!0,resizable:!0,statusbar:!0,toolbar:!1},n=xr().toLowerCase(),r&&(e.target=r,ct(n,"crios/")&&(e.target="_blank")),kr(xr())==Ir&&(t=t||"http://localhost",e.scrollbars=!0),n=t||"",(t=e)||(t={}),r=window,e=n instanceof Pt?n:Mt("undefined"!=typeof n.href?n.href:String(n))||Vt,n=t.target||n.target,i=[],t)switch(a){case"width":case"height":case"top":case"left":i.push(a+"="+t[a]);break;case"target":case"noopener":case"noreferrer":break;default:i.push(a+"="+(t[a]?1:0))}var a=i.join(",");if((pt("iPhone")&&!pt("iPod")&&!pt("iPad")||pt("iPad")||pt("iPod"))&&r.navigator&&r.navigator.standalone&&n&&"_self"!=n?(bt(a=ye(document,"A"),"HTMLAnchorElement"),e=e instanceof Pt?e:Ft(e),a.href=Rt(e),a.setAttribute("target",n),t.noreferrer&&a.setAttribute("rel","noreferrer"),(t=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,r,1),a.dispatchEvent(t),a={}):t.noreferrer?(a=zt("",r,n,a),t=Rt(e),a&&($t&&ct(t,";")&&(t="'"+t.replace(/'/g,"%27")+"'"),a.opener=null,t='<meta name="referrer" content="no-referrer"><meta http-equiv="refresh" content="0; url='+Wt(t)+'">
2',t=new qt(t=(r=St())?r.createHTML(t):t,null,Bt),r=a.document)&&(r.write(function(t){return t instanceof qt&&t.constructor===qt?t.a:(M("expected object of type SafeHtml, got '"+t+"' of type "+p(t)),"type_error:SafeHtml")}(t)),r.close())):(a=zt(e,r,n,a))&&t.noopener&&(a.opener=null),a)try{a.focus()}catch(s){}return a}var mr=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,br=/^[^@]+@[^@]+$/;function wr(){var t=null;return new Ee((function(e){"complete"==u.document.readyState?e():(t=function(){e()},pn(window,"load",t))})).o((function(e){throw dn(window,"load",t),e}))}function _r(t){return t=t||xr(),!("file:"!==Lr()&&"ionic:"!==Lr()||!t.toLowerCase().match(/iphone|ipad|ipod|android/))}function Er(){var t=u.window;try{return!(!t||t==t.top)}catch(e){return!1}}function Tr(){return"undefined"!==typeof u.WorkerGlobalScope&&"function"===typeof u.importScripts}function Or(){return e.a.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":e.a.INTERNAL.hasOwnProperty("node")?"Node":Tr()?"Worker":"Browser"}function Sr(){var t=Or();return"ReactNative"===t||"Node"===t}var Ir="Firefox",Cr="Chrome";function kr(t){var e=t.toLowerCase();return ct(e,"opera/")||ct(e,"opr/")||ct(e,"opios/")?"Opera":ct(e,"iemobile")?"IEMobile":ct(e,"msie")||ct(e,"trident/")?"IE":ct(e,"edge/")?"Edge":ct(e,"firefox/")?Ir:ct(e,"silk/")?"Silk":ct(e,"blackberry")?"Blackberry":ct(e,"webos")?"Webos":!ct(e,"safari/")||ct(e,"chrome/")||ct(e,"crios/")||ct(e,"android")?!ct(e,"chrome/")&&!ct(e,"crios/")||ct(e,"edge/")?ct(e,"android")?"Android":(t=t.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/))&&2==t.length?t[1]:"Other":Cr:"Safari"}var Nr={md:"FirebaseCore-web",od:"FirebaseUI-web"};function Ar(t,e){e=e||[];var n,r=[],i={};for(n in Nr)i[Nr[n]]=!0;for(n=0;n<e.length;n++)"undefined"!==typeof i[e[n]]&&(delete i[e[n]],r.push(e[n]));return r.sort(),(e=r).length||(e=["FirebaseCore-web"]),"Browser"===(r=Or())?r=kr(i=xr()):"Worker"===r&&(r=kr(i=xr())+"-"+r),r+"/JsCore/"+t+"/"+e.join(",")}function xr(){return u.navigator&&u.navigator.userAgent||""}function Pr(t,e){t=t.split("."),e=e||u;for(var n=0;n<t.length&&"object"==typeof e&&null!=e;n++)e=e[t[n]];return n!=t.length&&(e=void 0),e}function Rr(){try{var t=u.localStorage,e=qr();if(t)return t.setItem(e,"1"),t.removeItem(e),!fr()||!!u.indexedDB}catch(n){return Tr()&&!!u.indexedDB}return!1}function jr(){return(Dr()||"chrome-extension:"===Lr()||_r())&&!Sr()&&Rr()&&!Tr()}function Dr(){return"http:"===Lr()||"https:"===Lr()}function Lr(){return u.location&&u.location.protocol||null}function Mr(t){return!vr(t=t||xr())&&kr(t)!=Ir}function Fr(t){return"undefined"===typeof t?null:or(t)}function Ur(t){var e,n={};for(e in t)t.hasOwnProperty(e)&&null!==t[e]&&void 0!==t[e]&&(n[e]=t[e]);return n}function Vr(t){if(null!==t)return JSON.parse(t)}function qr(t){return t||Math.floor(1e9*Math.random()).toString()}function Br(t){return"Safari"!=kr(t=t||xr())&&!t.toLowerCase().match(/iphone|ipad|ipod/)}function zr(){var t=u.___jsl;if(t&&t.H)for(var e in t.H)if(t.H[e].r=t.H[e].r||[],t.H[e].L=t.H[e].L||[],t.H[e].r=t.H[e].L.concat(),t.CP)for(var n=0;n<t.CP.length;n++)t.CP[n]=null}function Hr(t,e){if(t>e)throw Error("Short delay should be less than long delay!");this.a=t,this.c=e,t=xr(),e=Or(),this.b=vr(t)||"ReactNative"===e}function Wr(){var t=u.document;return!t||"undefined"===typeof t.visibilityState||"visible"==t.visibilityState}function Kr(t){try{var e=new Date(parseInt(t,10));if(!isNaN(e.getTime())&&!/[^0-9]/.test(t))return e.toUTCString()}catch(n){}return null}function Gr(){return!(!Pr("fireauth.oauthhelper",u)&&!Pr("fireauth.iframe",u))}Hr.prototype.get=function(){var t=u.navigator;return!t||"boolean"!==typeof t.onLine||!Dr()&&"chrome-extension:"!==Lr()&&"undefined"===typeof t.connection||t.onLine?this.b?this.c:this.a:Math.min(5e3,this.a)};var Qr,Yr={};function Xr(t){Yr[t]||(Yr[t]=!0,"undefined"!==typeof console&&"function"===typeof console.warn&&console.warn(t))}try{var $r={};Object.defineProperty($r,"abcd",{configurable:!0,enumerable:!0,value:1}),Object.defineProperty($r,"abcd",{configurable:!0,enumerable:!0,value:2}),Qr=2==$r.abcd}catch(ha){Qr=!1}function Jr(t,e,n){Qr?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,value:n}):t[e]=n}function Zr(t,e){if(e)for(var n in e)e.hasOwnProperty(n)&&Jr(t,n,e[n])}function ti(t){var e={};return Zr(e,t),e}function ei(t){var e=t;if("object"==typeof t&&null!=t)for(var n in e="length"in t?[]:{},t)Jr(e,n,ei(t[n]));return e}function ni(t){var e=t&&(t[si]?"phone":null);if(!(e&&t&&t[ai]))throw new C("internal-error","Internal assert: invalid MultiFactorInfo object");Jr(this,"uid",t[ai]),Jr(this,"displayName",t[ii]||null);var n=null;t[oi]&&(n=new Date(t[oi]).toUTCString()),Jr(this,"enrollmentTime",n),Jr(this,"factorId",e)}function ri(t){try{var e=new ui(t)}catch(n){e=null}return e}ni.prototype.w=function(){return{uid:this.uid,displayName:this.displayName,factorId:this.factorId,enrollmentTime:this.enrollmentTime}};var ii="displayName",oi="enrolledAt",ai="mfaEnrollmentId",si="phoneInfo";function ui(t){ni.call(this,t),Jr(this,"phoneNumber",t[si])}function ci(t){var e={},n=t[pi],r=t[vi],i=t[yi];if(t=ri(t[di]),!i||i!=fi&&i!=hi&&!n||i==hi&&!r||i==li&&!t)throw Error("Invalid checkActionCode response!");i==hi?(e[mi]=n||null,e[wi]=n||null,e[gi]=r):(e[mi]=r||null,e[wi]=r||null,e[gi]=n||null),e[bi]=t||null,Jr(this,Ei,i),Jr(this,_i,ei(e))}S(ui,ni),ui.prototype.w=function(){var t=ui.ab.w.call(this);return t.phoneNumber=this.phoneNumber,t};var li="REVERT_SECOND_FACTOR_ADDITION",fi="EMAIL_SIGNIN",hi="VERIFY_AND_CHANGE_EMAIL",pi="email",di="mfaInfo",vi="newEmail",yi="requestType",gi="email",mi="fromEmail",bi="multiFactorInfo",wi="previousEmail",_i="data",Ei="operation";function Ti(t){var e=Vn(t=qn(t),Oi)||null,n=Vn(t,Si)||null,r=Vn(t,ki)||null;if(r=r&&Ai[r]||null,!e||!n||!r)throw new C("argument-error",Oi+", "+Si+"and "+ki+" are required in a valid action code URL.");Zr(this,{apiKey:e,operation:r,code:n,continueUrl:Vn(t,Ii)||null,languageCode:Vn(t,Ci)||null,tenantId:Vn(t,Ni)||null})}var Oi="apiKey",Si="oobCode",Ii="continueUrl",Ci="languageCode",ki="mode",Ni="tenantId",Ai={recoverEmail:"RECOVER_EMAIL",resetPassword:"PASSWORD_RESET",revertSecondFactorAddition:li,signIn:fi,verifyAndChangeEmail:hi,verifyEmail:"VERIFY_EMAIL"};function xi(t){try{return new Ti(t)}catch(e){return null}}function Pi(t){var e=t[Mi];if("undefined"===typeof e)throw new C("missing-continue-uri");if("string"!==typeof e||"string"===typeof e&&!e.length)throw new C("invalid-continue-uri");this.h=e,this.b=this.a=null,this.g=!1;var n=t[Ri];if(n&&"object"===typeof n){e=n[Vi];var r=n[Fi];if(n=n[Ui],"string"===typeof e&&e.length){if(this.a=e,"undefined"!==typeof r&&"boolean"!==typeof r)throw new C("argument-error",Fi+" 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",Ui+" property must be a non empty string when specified.");this.b=n||null}else{if("undefined"!==typeof e)throw new C("argument-error",Vi+" 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",Ri+" property must be a non null object when specified.");if(this.f=null,(e=t[Li])&&"object"===typeof e){if("string"===typeof(e=e[qi])&&e.length)this.f=e;else if("undefined"!==typeof e)throw new C("argument-error",qi+" property must be a non empty string when specified.")}else if("undefined"!==typeof e)throw new C("argument-error",Li+" property must be a non null object when specified.");if("undefined"!==typeof(e=t[Di])&&"boolean"!==typeof e)throw new C("argument-error",Di+" property must be a boolean when specified.");if(this.c=!!e,"undefined"!==typeof(t=t[ji])&&("string"!==typeof t||"string"===typeof t&&!t.length))throw new C("argument-error",ji+" property must be a non empty string when specified.");this.i=t||null}var Ri="android",ji="dynamicLinkDomain",Di="handleCodeInApp",Li="iOS",Mi="url",Fi="installApp",Ui="minimumVersion",Vi="packageName",qi="bundleId";function Bi(t){var e={};for(var n in e.continueUrl=t.h,e.canHandleCodeInApp=t.c,(e.androidPackageName=t.a)&&(e.androidMinimumVersion=t.b,e.androidInstallApp=t.g),e.iOSBundleId=t.f,e.dynamicLinkDomain=t.i,e)null===e[n]&&delete e[n];return e}var zi=null;function Hi(t){var e=[];return function(t,e){function n(e){for(;r<t.length;){var n=t.charAt(r++),i=zi[n];if(null!=i)return i;if(!/^[\s\xa0]*$/.test(n))throw Error("Unknown base64 encoding at char: "+n)}return e}!function(){if(!zi){zi={};for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"],n=0;5>n;n++)for(var r=t.concat(e[n].split("")),i=0;i<r.length;i++){var o=r[i];void 0===zi[o]&&(zi[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;e(i<<2|o>>4),64!=a&&(e(o<<4&240|a>>2),64!=s&&e(a<<6&192|s))}}(t,(function(t){e.push(t)})),e}function Wi(t){var e=Gi(t);if(!(e&&e.sub&&e.iss&&e.aud&&e.exp))throw Error("Invalid JWT");this.h=t,this.a=e.exp,this.i=e.sub,t=Date.now()/1e3,this.g=e.iat||(t>this.a?this.a:t),this.b=e.provider_id||e.firebase&&e.firebase.sign_in_provider||null,this.f=e.firebase&&e.firebase.tenant||null,this.c=!!e.is_anonymous||"anonymous"==this.b}function Ki(t){try{return new Wi(t)}catch(e){return null}}function Gi(t){if(!t)return null;if(3!=(t=t.split(".")).length)return null;for(var e=(4-(t=t[1]).length%4)%4,n=0;n<e;n++)t+=".";try{var r=Hi(t);for(t=[],n=e=0;e<r.length;){var i=r[e++];if(128>i)t[n++]=String.fromCharCode(i);else if(191<i&&224>i){var o=r[e++];t[n++]=String.fromCharCode((31&i)<<6|63&o)}else if(239<i&&365>
2i){o=r[e++];var a=r[e++],s=((7&i)<<18|(63&o)<<12|(63&a)<<6|63&r[e++])-65536;t[n++]=String.fromCharCode(55296+(s>>10)),t[n++]=String.fromCharCode(56320+(1023&s))}else o=r[e++],a=r[e++],t[n++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&a)}return JSON.parse(t.join(""))}catch(u){}return null}Wi.prototype.T=function(){return this.f},Wi.prototype.l=function(){return this.c},Wi.prototype.toString=function(){return this.h};var Qi="oauth_consumer_key oauth_nonce oauth_signature oauth_signature_method oauth_timestamp oauth_token oauth_version".split(" "),Yi=["client_id","response_type","scope","redirect_uri","state"],Xi={nd:{Ja:"locale",ua:700,ta:600,fa:"facebook.com",Xa:Yi},pd:{Ja:null,ua:500,ta:750,fa:"github.com",Xa:Yi},qd:{Ja:"hl",ua:515,ta:680,fa:"google.com",Xa:Yi},wd:{Ja:"lang",ua:485,ta:705,fa:"twitter.com",Xa:Qi},kd:{Ja:"locale",ua:640,ta:600,fa:"apple.com",Xa:[]}};function $i(t){for(var e in Xi)if(Xi[e].fa==t)return Xi[e];return null}function Ji(t){var e={};e["facebook.com"]=ro,e["google.com"]=oo,e["github.com"]=io,e["twitter.com"]=ao;var n=t&&t[to];try{if(n)return e[n]?new e[n](t):new no(t);if("undefined"!==typeof t[Zi])return new eo(t)}catch(r){}return null}var Zi="idToken",to="providerId";function eo(t){var e=t[to];if(!e&&t[Zi]){var n=Ki(t[Zi]);n&&n.b&&(e=n.b)}if(!e)throw Error("Invalid additional user info!");"anonymous"!=e&&"custom"!=e||(e=null),n=!1,"undefined"!==typeof t.isNewUser?n=!!t.isNewUser:"identitytoolkit#SignupNewUserResponse"===t.kind&&(n=!0),Jr(this,"providerId",e),Jr(this,"isNewUser",n)}function no(t){eo.call(this,t),Jr(this,"profile",ei((t=Vr(t.rawUserInfo||"{}"))||{}))}function ro(t){if(no.call(this,t),"facebook.com"!=this.providerId)throw Error("Invalid provider ID!")}function io(t){if(no.call(this,t),"github.com"!=this.providerId)throw Error("Invalid provider ID!");Jr(this,"username",this.profile&&this.profile.login||null)}function oo(t){if(no.call(this,t),"google.com"!=this.providerId)throw Error("Invalid provider ID!")}function ao(t){if(no.call(this,t),"twitter.com"!=this.providerId)throw Error("Invalid provider ID!");Jr(this,"username",t.screenName||null)}function so(t){var e=qn(t),n=Vn(e,"link"),r=Vn(qn(n),"link");return e=Vn(e,"deep_link_id"),Vn(qn(e),"link")||e||r||n||t}function uo(t,e){if(!t&&!e)throw new C("internal-error","Internal assert: no raw session string available");if(t&&e)throw new C("internal-error","Internal assert: unable to determine the session type");this.a=t||null,this.b=e||null,this.type=this.a?co:lo}S(no,eo),S(ro,no),S(io,no),S(oo,no),S(ao,no);var co="enroll",lo="signin";function fo(){}function ho(t,e){return t.then((function(t){if(t[ns]){var n=Ki(t[ns]);if(!n||e!=n.i)throw new C("user-mismatch");return t}throw new C("user-mismatch")})).o((function(t){throw t&&t.code&&t.code==A+"user-not-found"?new C("user-mismatch"):t}))}function po(t,e){if(!e)throw new C("internal-error","failed to construct a credential");this.a=e,Jr(this,"providerId",t),Jr(this,"signInMethod",t)}function vo(t){return{pendingToken:t.a,requestUri:"http://localhost"}}function yo(t){if(t&&t.providerId&&t.signInMethod&&0==t.providerId.indexOf("saml.")&&t.pendingToken)try{return new po(t.providerId,t.pendingToken)}catch(e){}return null}function go(t,e,n){if(this.a=null,e.idToken||e.accessToken)e.idToken&&Jr(this,"idToken",e.idToken),e.accessToken&&Jr(this,"accessToken",e.accessToken),e.nonce&&!e.pendingToken&&Jr(this,"nonce",e.nonce),e.pendingToken&&(this.a=e.pendingToken);else{if(!e.oauthToken||!e.oauthTokenSecret)throw new C("internal-error","failed to construct a credential");Jr(this,"accessToken",e.oauthToken),Jr(this,"secret",e.oauthTokenSecret)}Jr(this,"providerId",t),Jr(this,"signInMethod",n)}function mo(t){var e={};return t.idToken&&(e.id_token=t.idToken),t.accessToken&&(e.access_token=t.accessToken),t.secret&&(e.oauth_token_secret=t.secret),e.providerId=t.providerId,t.nonce&&!t.a&&(e.nonce=t.nonce),e={postBody:Zn(e).toString(),requestUri:"http://localhost"},t.a&&(delete e.postBody,e.pendingToken=t.a),e}function bo(t){if(t&&t.providerId&&t.signInMethod){var e={idToken:t.oauthIdToken,accessToken:t.oauthTokenSecret?null:t.oauthAccessToken,oauthTokenSecret:t.oauthTokenSecret,oauthToken:t.oauthTokenSecret&&t.oauthAccessToken,nonce:t.nonce,pendingToken:t.pendingToken};try{return new go(t.providerId,e,t.signInMethod)}catch(n){}}return null}function wo(t,e){this.Qc=e||[],Zr(this,{providerId:t,isOAuthProvider:!0}),this.Ib={},this.pb=($i(t)||{}).Ja||null,this.ob=null}function _o(t){if("string"!==typeof t||0!=t.indexOf("saml."))throw new C("argument-error",'SAML provider IDs must be prefixed with "saml."');wo.call(this,t,[])}function Eo(t){wo.call(this,t,Yi),this.a=[]}
2function To(){Eo.call(this,"facebook.com")}function Oo(t){if(!t)throw new C("argument-error","credential failed: expected 1 argument (the OAuth access token).");var e=t;return y(t)&&(e=t.accessToken),(new To).credential({accessToken:e})}function So(){Eo.call(this,"github.com")}function Io(t){if(!t)throw new C("argument-error","credential failed: expected 1 argument (the OAuth access token).");var e=t;return y(t)&&(e=t.accessToken),(new So).credential({accessToken:e})}function Co(){Eo.call(this,"google.com"),this.Ca("profile")}function ko(t,e){var n=t;return y(t)&&(n=t.idToken,e=t.accessToken),(new Co).credential({idToken:n,accessToken:e})}function No(){wo.call(this,"twitter.com",Qi)}function Ao(t,e){var n=t;if(y(n)||(n={oauthToken:t,oauthTokenSecret:e}),!n.oauthToken||!n.oauthTokenSecret)throw new C("argument-error","credential failed: expected 2 arguments (the OAuth access token and secret).");return new go("twitter.com",n,"twitter.com")}function xo(t,e,n){this.a=t,this.f=e,Jr(this,"providerId","password"),Jr(this,"signInMethod",n===Ro.EMAIL_LINK_SIGN_IN_METHOD?Ro.EMAIL_LINK_SIGN_IN_METHOD:Ro.EMAIL_PASSWORD_SIGN_IN_METHOD)}function Po(t){return t&&t.email&&t.password?new xo(t.email,t.password,t.signInMethod):null}function Ro(){Zr(this,{providerId:"password",isOAuthProvider:!1})}function jo(t,e){if(!(e=Do(e)))throw new C("argument-error","Invalid email link!");return new xo(t,e.code,Ro.EMAIL_LINK_SIGN_IN_METHOD)}function Do(t){return(t=xi(t=so(t)))&&t.operation===fi?t:null}function Lo(t){if(!(t.eb&&t.cb||t.La&&t.ea))throw new C("internal-error");this.a=t,Jr(this,"providerId","phone"),this.fa="phone",Jr(this,"signInMethod","phone")}function Mo(t){if(t&&"phone"===t.providerId&&(t.verificationId&&t.verificationCode||t.temporaryProof&&t.phoneNumber)){var e={};return W(["verificationId","verificationCode","temporaryProof","phoneNumber"],(function(n){t[n]&&(e[n]=t[n])})),new Lo(e)}return null}function Fo(t){return t.a.La&&t.a.ea?{temporaryProof:t.a.La,phoneNumber:t.a.ea}:{sessionInfo:t.a.eb,code:t.a.cb}}function Uo(t){try{this.a=t||e.a.auth()}catch(n){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().")}Zr(this,{providerId:"phone",isOAuthProvider:!1})}function Vo(t,e){if(!t)throw new C("missing-verification-id");if(!e)throw new C("missing-verification-code");return new Lo({eb:t,cb:e})}function qo(t){if(t.temporaryProof&&t.phoneNumber)return new Lo({La:t.temporaryProof,ea:t.phoneNumber});var e=t&&t.providerId;if(!e||"password"===e)return null;var n=t&&t.oauthAccessToken,r=t&&t.oauthTokenSecret,i=t&&t.nonce,o=t&&t.oauthIdToken,a=t&&t.pendingToken;try{switch(e){case"google.com":return ko(o,n);case"facebook.com":return Oo(n);case"github.com":return Io(n);case"twitter.com":return Ao(n,r);default:return n||r||o||a?a?0==e.indexOf("saml.")?new po(e,a):new go(e,{pendingToken:a,idToken:t.oauthIdToken,accessToken:t.oauthAccessToken},e):new Eo(e).credential({idToken:o,accessToken:n,rawNonce:i}):null}}catch(s){return null}}function Bo(t){if(!t.isOAuthProvider)throw new C("invalid-oauth-provider")}function zo(t,e,n,r,i,o,a){if(this.c=t,this.b=e||null,this.g=n||null,this.f=r||null,this.i=o||null,this.h=a||null,this.a=i||null,!this.g&&!this.a)throw new C("invalid-auth-event");if(this.g&&this.a)throw new C("invalid-auth-event");if(this.g&&!this.f)throw new C("invalid-auth-event")}function Ho(t){return(t=t||{}).type?new zo(t.type,t.eventId,t.urlResponse,t.sessionId,t.error&&k(t.error),t.postBody,t.tenantId):null}function Wo(){this.b=null,this.a=[]}uo.prototype.Ha=function(){return this.a?Ne(this.a):Ne(this.b)},uo.prototype.w=function(){return this.type==co?{multiFactorSession:{idToken:this.a}}:{multiFactorSession:{pendingCredential:this.b}}},fo.prototype.ka=function(){},fo.prototype.b=function(){},fo.prototype.c=function(){},fo.prototype.w=function(){},po.prototype.ka=function(t){return Os(t,vo(this))},po.prototype.b=function(t,e){var n=vo(this);return n.idToken=e,Ss(t,n)},po.prototype.c=function(t,e){return ho(Is(t,vo(this)),e)},po.prototype.w=function(){return{providerId:this.providerId,sign
2InMethod:this.signInMethod,pendingToken:this.a}},go.prototype.ka=function(t){return Os(t,mo(this))},go.prototype.b=function(t,e){var n=mo(this);return n.idToken=e,Ss(t,n)},go.prototype.c=function(t,e){return ho(Is(t,mo(this)),e)},go.prototype.w=function(){var t={providerId:this.providerId,signInMethod:this.signInMethod};return this.idToken&&(t.oauthIdToken=this.idToken),this.accessToken&&(t.oauthAccessToken=this.accessToken),this.secret&&(t.oauthTokenSecret=this.secret),this.nonce&&(t.nonce=this.nonce),this.a&&(t.pendingToken=this.a),t},wo.prototype.Ka=function(t){return this.Ib=yt(t),this},S(_o,wo),S(Eo,wo),Eo.prototype.Ca=function(t){return Y(this.a,t)||this.a.push(t),this},Eo.prototype.Qb=function(){return Z(this.a)},Eo.prototype.credential=function(t,e){var n;if(!(n=y(t)?{idToken:t.idToken||null,accessToken:t.accessToken||null,nonce:t.rawNonce||null}:{idToken:t||null,accessToken:e||null}).idToken&&!n.accessToken)throw new C("argument-error","credential failed: must provide the ID token and/or the access token.");return new go(this.providerId,n,this.providerId)},S(To,Eo),Jr(To,"PROVIDER_ID","facebook.com"),Jr(To,"FACEBOOK_SIGN_IN_METHOD","facebook.com"),S(So,Eo),Jr(So,"PROVIDER_ID","github.com"),Jr(So,"GITHUB_SIGN_IN_METHOD","github.com"),S(Co,Eo),Jr(Co,"PROVIDER_ID","google.com"),Jr(Co,"GOOGLE_SIGN_IN_METHOD","google.com"),S(No,wo),Jr(No,"PROVIDER_ID","twitter.com"),Jr(No,"TWITTER_SIGN_IN_METHOD","twitter.com"),xo.prototype.ka=function(t){return this.signInMethod==Ro.EMAIL_LINK_SIGN_IN_METHOD?su(t,js,{email:this.a,oobCode:this.f}):su(t,nu,{email:this.a,password:this.f})},xo.prototype.b=function(t,e){return this.signInMethod==Ro.EMAIL_LINK_SIGN_IN_METHOD?su(t,Ds,{idToken:e,email:this.a,oobCode:this.f}):su(t,Qs,{idToken:e,email:this.a,password:this.f})},xo.prototype.c=function(t,e){return ho(this.ka(t),e)},xo.prototype.w=function(){return{email:this.a,password:this.f,signInMethod:this.signInMethod}},Zr(Ro,{PROVIDER_ID:"password"}),Zr(Ro,{EMAIL_LINK_SIGN_IN_METHOD:"emailLink"}),Zr(Ro,{EMAIL_PASSWORD_SIGN_IN_METHOD:"password"}),Lo.prototype.ka=function(t){return t.fb(Fo(this))},Lo.prototype.b=function(t,e){var n=Fo(this);return n.idToken=e,su(t,iu,n)},Lo.prototype.c=function(t,e){var n=Fo(this);return n.operation="REAUTH",ho(t=su(t,ou,n),e)},Lo.prototype.w=function(){var t={providerId:"phone"};return this.a.eb&&(t.verificationId=this.a.eb),this.a.cb&&(t.verificationCode=this.a.cb),this.a.La&&(t.temporaryProof=this.a.La),this.a.ea&&(t.phoneNumber=this.a.ea),t},Uo.prototype.fb=function(t,e){var n=this.a.a;return Ne(e.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(e.type){case"recaptcha":var i=y(t)?t.session:null,o=y(t)?t.phoneNumber:t;return(i&&i.type==co?i.Ha().then((function(t){return function(t,e){return su(t,Xs,e).then((function(t){return t.phoneSessionInfo.sessionInfo}))}(n,{idToken:t,phoneEnrollmentInfo:{phoneNumber:o,recaptchaToken:r}})})):i&&i.type==lo?i.Ha().then((function(e){return function(t,e){return su(t,$s,e).then((function(t){return t.phoneResponseInfo.sessionInfo}))}(n,{mfaPendingCredential:e,mfaEnrollmentId:t.multiFactorHint&&t.multiFactorHint.uid||t.multiFactorUid,phoneSignInInfo:{recaptchaToken:r}})})):function(t,e){return su(t,Ks,e)}(n,{phoneNumber:o,recaptchaToken:r})).then((function(t){return"function"===typeof e.reset&&e.reset(),t}),(function(t){throw"function"===typeof e.reset&&e.reset(),t}));default:throw new C("argument-error",'Only firebase.auth.ApplicationVerifiers with type="recaptcha" are currently supported.')}}))},Zr(Uo,{PROVIDER_ID:"phone"}),Zr(Uo,{PHONE_SIGN_IN_METHOD:"phone"}),zo.prototype.getUid=function(){var t=[];return t.push(this.c),this.b&&t.push(this.b),this.f&&t.push(this.f),this.h&&t.push(this.h),t.join("-")},zo.prototype.T=function(){return this.h},zo.prototype.w=function(){return{type:this.c,eventId:this.b,urlResponse:this.g,sessionId:this.f,postBody:this.i,tenantId:this.h,error:this.a&&this.a.w()}};var Ko,Go=null;function Qo(t){var e="unauthorized-domain",n=void 0,r=qn(t);t=r.a,"chrome-extension"==(r=r.c)?n=Ht("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.",t):"http"==r||"https"==r?n=Ht("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.",t):e="operation-not-supported-in-this-environment",C.call(this,e,n)}function Yo(t,e,n){C.call(this,t,n),(t=e||{}).Jb&&Jr(this,"email",t.Jb),t.ea&&Jr(this,"phoneNumber",t.ea),t.credential&&Jr(this,"credential",t.credential),t.Zb&&Jr(this,"tenantId",t.Zb)}function Xo(t){if(t.code){var e=t.code||"";0==e.indexOf(A)&&(e=e.substring(A.length));var n={credential:qo(t),Zb:t.tenantId};if(t.email)n.Jb=t.email;else if(t.phoneNumber)n.ea=t.phoneNumber;else if(!n.credential)return new C(e,t.message||void 0);return new Yo(e,n,t.message)}return null}function $o(){}function Jo(t){return t.c||(t.c=t.b())}function Zo(){}function ta(t){if(!t.f&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var e=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],n=0;n<e.length;n++){var r=e[n];try{return new ActiveXObject(r),t.f=r}catch(i){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return t.f}function ea(){}function na(){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.qc,this),this.a.onerror=E(this.Sb,this),this.a.onprogress=E(this.rc,this),this.a.ontimeout=E(this.vc,this)}function ra(t,e){t.readyState=e,t.onreadystatechange&&t.onreadystatechange()}function ia(t,e,n){this.reset(t,e,n,void 0,void 0)}S(Qo,C),S(Yo,C),Yo.prototype.w=function(){var t={code:this.code,message:this.message};this.email&&(t.email=this.email),this.phoneNumber&&(t.phoneNumber=this.phoneNumber),this.tenantId&&(t.tenantId=this.tenantId);var e=this.credential&&this.credential.w();return e&&mt(t,e),t},Yo.prototype.toJSON=function(){return this.w()},$o.prototype.c=null,S(Zo,$o),Zo.prototype.a=function(){var t=ta(this);return t?new ActiveXObject(t):new XMLHttpRequest},Zo.prototype.b=function(){var t={};return ta(this)&&(t[0]=!0,t[1]=!0),t},Ko=new Zo,S(ea,$o),ea.prototype.a=function(){var t=new XMLHttpRequest;if("withCredentials"in t)return t;if("undefined"!=typeof XDomainRequest)return new na;throw Error("Unsupported browser")},ea.prototype.b=function(){return{}},(n=na.prototype).open=function(t,e,n){if(null!=n&&!n)throw Error("Only async requests are supported.");this.a.open(t,e)},n.send=function(t){if(t){if("string"!=typeof t)throw Error("Only string data is supported");this.a.send(t)}else this.a.send()},n.abort=function(){this.a.abort()},n.setRequestHeader=function(){},n.getResponseHeader=function(t){return"content-type"==t.toLowerCase()?this.a.contentType:""},n.qc=function(){this.status=200,this.response=this.responseText=this.a.responseText,ra(this,4)},n.Sb=function(){this.status=500,this.response=this.responseText="",ra(this,4)},n.vc=function(){this.Sb()},n.rc=function(){this.status=200,ra(this,1)},n.getAllResponseHeaders=function(){return"content-type: "+this.a.contentType},ia.prototype.a=null;function oa(t){this.f=t,this.b=this.c=this.a=null}function aa(t,e){this.name=t,this.value=e}ia.prototype.reset=function(t,e,n,r,i){"number"==typeof i||0,r||O(),delete this.a},aa.prototype.toString=function(){return this.name};var sa=new aa("SEVERE",1e3),ua=new aa("WARNING",900),ca=new aa("CONFIG",700),la=new aa("FINE",500);function fa(t){return t.c?t.c:t.a?fa(t.a):(M("Root logger has no level set."),null)}oa.prototype.log=function(t,e,n){if(t.value>=fa(this).value)for(v(e)&&(e=e()),t=new ia(t,String(e),this.f),n&&(t.a=n),n=this;n;)n=n.a};var ha,pa={},da=null;function va(t){var e;if(da||(da=new oa(""),pa[""]=da,da.c=ca),!(e=pa[t])){e=new oa(t);var n=t.lastIndexOf("."),r=t.substr(n+1);(n=va(t.substr(0,n))).b||(n.b={}),n.b[r]=e,e.a=n,pa[t]=e}return e}function ya(t,e){t&&t.log(la,e,void 0)}function ga(t){this.f=t}function ma(t){Tn.call(this),this.u=t,this.h=void 0,this.readyState=ba,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.l=new Headers,this.b=null,this.s="GET",this.f="",this.a=!1,this.i=va("goog.net.FetchXmlHttp"),this.m=this.c=this.g=null}S(ga,$o),ga.prototype.a=function(){return new ma(this.f)},ga.prototype.b=(ha={},function(){return ha}),S(ma,Tn);var ba=0;function wa(t){t.c.read().then(t.pc.bind(t)).catch(t.Ua.bind(t))}function _a(t){t.readyState=4,t.g=null,t.c=null,t.m=null,Ea(t)}function Ea(t){t.onreadystatechange&&t.onreadystatechange.call(t)}function Ta(t){Tn.call(this),this.headers=new xn,this.D=t||null,this.c=!1,this.C=this.a=null,this.h=this.R=this.l="",this.f=this.O=this.i=this.J=!1,this.g=0,this.s=null,this.m=Oa,this.u=this.S=!1}(n=ma.prototype).open=function(t,e){if(this.readyState!=ba)throw this.abort(),Error("Error reopening a connection");this.s=t,this.f=e,this.readyState=1,Ea(this)},n.send=function(t){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.a=!0;var e={headers:this.l,method:this.s,credentials:this.h,cache:void 0};
2t&&(e.body=t),this.u.fetch(new Request(this.f,e)).then(this.uc.bind(this),this.Ua.bind(this))},n.abort=function(){this.response=this.responseText="",this.l=new Headers,this.status=0,this.c&&this.c.cancel("Request was aborted."),1<=this.readyState&&this.a&&4!=this.readyState&&(this.a=!1,_a(this)),this.readyState=ba},n.uc=function(t){this.a&&(this.g=t,this.b||(this.status=this.g.status,this.statusText=this.g.statusText,this.b=t.headers,this.readyState=2,Ea(this)),this.a&&(this.readyState=3,Ea(this),this.a&&("arraybuffer"===this.responseType?t.arrayBuffer().then(this.sc.bind(this),this.Ua.bind(this)):"undefined"!==typeof u.ReadableStream&&"body"in t?(this.response=this.responseText="",this.c=t.body.getReader(),this.m=new TextDecoder,wa(this)):t.text().then(this.tc.bind(this),this.Ua.bind(this)))))},n.pc=function(t){if(this.a){var e=this.m.decode(t.value?t.value:new Uint8Array(0),{stream:!t.done});e&&(this.response=this.responseText+=e),t.done?_a(this):Ea(this),3==this.readyState&&wa(this)}},n.tc=function(t){this.a&&(this.response=this.responseText=t,_a(this))},n.sc=function(t){this.a&&(this.response=t,_a(this))},n.Ua=function(t){var e=this.i;e&&e.log(ua,"Failed to fetch url "+this.f,t instanceof Error?t:Error(t)),this.a&&_a(this)},n.setRequestHeader=function(t,e){this.l.append(t,e)},n.getResponseHeader=function(t){return this.b?this.b.get(t.toLowerCase())||"":((t=this.i)&&t.log(ua,"Attempting to get response header but no headers have been received for url: "+this.f,void 0),"")},n.getAllResponseHeaders=function(){if(!this.b){var t=this.i;return t&&t.log(ua,"Attempting to get all response headers but no headers have been received for url: "+this.f,void 0),""}t=[];for(var e=this.b.entries(),n=e.next();!n.done;)n=n.value,t.push(n[0]+": "+n[1]),n=e.next();return t.join("\r\n")},Object.defineProperty(ma.prototype,"withCredentials",{get:function(){return"include"===this.h},set:function(t){this.h=t?"include":"same-origin"}}),S(Ta,Tn);var Oa="";Ta.prototype.b=va("goog.net.XhrIo");var Sa=/^https?$/i,Ia=["POST","PUT"];function Ca(t,e,n,r,i){if(t.a)throw Error("[goog.net.XhrIo] Object is active with another request="+t.l+"; newUri="+e);n=n?n.toUpperCase():"GET",t.l=e,t.h="",t.R=n,t.J=!1,t.c=!0,t.a=t.D?t.D.a():Ko.a(),t.C=t.D?Jo(t.D):Jo(Ko),t.a.onreadystatechange=E(t.Vb,t);try{ya(t.b,La(t,"Opening Xhr")),t.O=!0,t.a.open(n,String(e),!0),t.O=!1}catch(a){return ya(t.b,La(t,"Error opening Xhr: "+a.message)),void Na(t,a)}e=r||"";var o=new xn(t.headers);i&&function(t,e){if(t.forEach&&"function"==typeof t.forEach)t.forEach(e,void 0);else if(d(t)||"string"===typeof t)W(t,e,void 0);else for(var n=An(t),r=Nn(t),i=r.length,o=0;o<i;o++)e.call(void 0,r[o],n&&n[o],t)}(i,(function(t,e){o.set(e,t)})),i=function(t){t:{for(var e=ka,n=t.length,r="string"===typeof t?t.split(""):t,i=0;i<n;i++)if(i in r&&e.call(void 0,r[i],i,t)){e=i;break t}e=-1}return 0>e?null:"string"===typeof t?t.charAt(e):t[e]}(o.Y()),r=u.FormData&&e instanceof u.FormData,!Y(Ia,n)||i||r||o.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),o.forEach((function(t,e){this.a.setRequestHeader(e,t)}),t),t.m&&(t.a.responseType=t.m),"withCredentials"in t.a&&t.a.withCredentials!==t.S&&(t.a.withCredentials=t.S);try{Ra(t),0<t.g&&(t.u=function(t){return Yt&&ae(9)&&"number"===typeof t.timeout&&void 0!==t.ontimeout}(t.a),ya(t.b,La(t,"Will abort after "+t.g+"ms if incomplete, xhr2 "+t.u)),t.u?(t.a.timeout=t.g,t.a.ontimeout=E(t.Ma,t)):t.s=Cn(t.Ma,t.g,t)),ya(t.b,La(t,"Sending request")),t.i=!0,t.a.send(e),t.i=!1}catch(a){ya(t.b,La(t,"Send error: "+a.message)),Na(t,a)}}function ka(t){return"content-type"==t.toLowerCase()}function Na(t,e){t.c=!1,t.a&&(t.f=!0,t.a.abort(),t.f=!1),t.h=e,Aa(t),Pa(t)}function Aa(t){t.J||(t.J=!0,t.dispatchEvent("complete"),t.dispatchEvent("error"))}function xa(t){if(t.c&&"undefined"!=typeof s)if(t.C[1]&&4==ja(t)&&2==Da(t))ya(t.b,La(t,"Local request error detected and ignored"));else if(t.i&&4==ja(t))Cn(t.Vb,0,t);else if(t.dispatchEvent("readystatechange"),4==ja(t)){ya(t.b,La(t,"Request complete")),t.c=!1;try{var e,n=Da(t);t:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r
2=!0;break t;default:r=!1}if(!(e=r)){var i;if(i=0===n){var o=String(t.l).match(jn)[1]||null;if(!o&&u.self&&u.self.location){var a=u.self.location.protocol;o=a.substr(0,a.length-1)}i=!Sa.test(o?o.toLowerCase():"")}e=i}if(e)t.dispatchEvent("complete"),t.dispatchEvent("success");else{try{var c=2<ja(t)?t.a.statusText:""}catch(l){ya(t.b,"Can not get status: "+l.message),c=""}t.h=c+" ["+Da(t)+"]",Aa(t)}}finally{Pa(t)}}}function Pa(t,e){if(t.a){Ra(t);var n=t.a,r=t.C[0]?h:null;t.a=null,t.C=null,e||t.dispatchEvent("ready");try{n.onreadystatechange=r}catch(i){(t=t.b)&&t.log(sa,"Problem encountered resetting onreadystatechange: "+i.message,void 0)}}}function Ra(t){t.a&&t.u&&(t.a.ontimeout=null),t.s&&(u.clearTimeout(t.s),t.s=null)}function ja(t){return t.a?t.a.readyState:0}function Da(t){try{return 2<ja(t)?t.a.status:-1}catch(e){return-1}}function La(t,e){return e+" ["+t.R+" "+t.l+" "+Da(t)+"]"}function Ma(t){var e=Qa;this.g=[],this.u=e,this.s=t||null,this.f=this.a=!1,this.c=void 0,this.v=this.C=this.i=!1,this.h=0,this.b=null,this.l=0}function Fa(t,e,n){t.a=!0,t.c=n,t.f=!e,Ba(t)}function Ua(t){if(t.a){if(!t.v)throw new za(t);t.v=!1}}function Va(t,e,n,r){t.g.push([e,n,r]),t.a&&Ba(t)}function qa(t){return Q(t.g,(function(t){return v(t[1])}))}function Ba(t){if(t.h&&t.a&&qa(t)){var e=t.h,n=Ka[e];n&&(u.clearTimeout(n.a),delete Ka[e]),t.h=0}t.b&&(t.b.l--,delete t.b),e=t.c;for(var r=n=!1;t.g.length&&!t.i;){var i=t.g.shift(),o=i[0],a=i[1];if(i=i[2],o=t.f?a:o)try{var s=o.call(i||t.s,e);void 0!==s&&(t.f=t.f&&(s==e||s instanceof Error),t.c=e=s),(j(e)||"function"===typeof u.Promise&&e instanceof u.Promise)&&(r=!0,t.i=!0)}catch(c){e=c,t.f=!0,qa(t)||(n=!0)}}t.c=e,r&&(s=E(t.m,t,!0),r=E(t.m,t,!1),e instanceof Ma?(Va(e,s,r),e.C=!0):e.then(s,r)),n&&(e=new Wa(e),Ka[e.a]=e,t.h=e.a)}function za(){D.call(this)}function Ha(){D.call(this)}function Wa(t){this.a=u.setTimeout(E(this.c,this),0),this.b=t}(n=Ta.prototype).Ma=function(){"undefined"!=typeof s&&this.a&&(this.h="Timed out after "+this.g+"ms, aborting",ya(this.b,La(this,this.h)),this.dispatchEvent("timeout"),this.abort(8))},n.abort=function(){this.a&&this.c&&(ya(this.b,La(this,"Aborting")),this.c=!1,this.f=!0,this.a.abort(),this.f=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),Pa(this))},n.Da=function(){this.a&&(this.c&&(this.c=!1,this.f=!0,this.a.abort(),this.f=!1),Pa(this,!0)),Ta.ab.Da.call(this)},n.Vb=function(){this.xa||(this.O||this.i||this.f?xa(this):this.Jc())},n.Jc=function(){xa(this)},n.getResponse=function(){try{if(!this.a)return null;if("response"in this.a)return this.a.response;switch(this.m){case Oa:case"text":return this.a.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in this.a)return this.a.mozResponseArrayBuffer}var t=this.b;return t&&t.log(sa,"Response type "+this.m+" is not supported on this browser",void 0),null}catch(e){return ya(this.b,"Can not get response: "+e.message),null}},Ma.prototype.cancel=function(t){if(this.a)this.c instanceof Ma&&this.c.cancel();else{if(this.b){var e=this.b;delete this.b,t?e.cancel(t):(e.l--,0>=e.l&&e.cancel())}this.u?this.u.call(this.s,this):this.v=!0,this.a||(t=new Ha(this),Ua(this),Fa(this,!1,t))}},Ma.prototype.m=function(t,e){this.i=!1,Fa(this,t,e)},Ma.prototype.then=function(t,e,n){var r,i,o=new Ee((function(t,e){r=t,i=e}));return Va(this,r,(function(t){t instanceof Ha?o.cancel():i(t)})),o.then(t,e,n)},Ma.prototype.$goog_Thenable=!0,S(za,D),za.prototype.message="Deferred has already fired",za.prototype.name="AlreadyCalledError",S(Ha,D),Ha.prototype.message="Deferred was canceled",Ha.prototype.name="CanceledError",Wa.prototype.c=function(){throw delete Ka[this.a],this.b};var Ka={};function Ga(t){var e={},n=e.document||document,r=Ct(t).toString(),i=ye(document,"SCRIPT"),o={Wb:i,Ma:void 0},a=new Ma(o),s=null,c=null!=e.timeout?e.timeout:5e3;return 0<c&&(s=window.setTimeout((function(){Ya(i,!0);var t=new Ja($a,"Timeout reached for loading script "+r);Ua(a),Fa(a,!1,t)}),c),o.Ma=s),i.onload=i.onreadystatechange=function(){i.readyState&&"loaded"!=i.readyState&&"complete"!=i.readyState||(Ya(i,e.xd||!1,s),Ua(a),Fa(a,!0,null))},i.onerror=function(){Ya(i,!0,s);var t=new Ja(Xa,"Error while loading script "+r);Ua(a),Fa(a,!1,t)},mt(o=e.attributes||{}
2,{type:"text/javascript",charset:"UTF-8"}),fe(i,o),function(t,e){bt(t,"HTMLScriptElement"),t.src=Ct(e),(e=t.ownerDocument&&t.ownerDocument.defaultView)&&e!=u?e=f(e.document):(null===l&&(l=f(u.document)),e=l),e&&t.setAttribute("nonce",e)}(i,t),function(t){var e;return(e=(t||document).getElementsByTagName("HEAD"))&&0!=e.length?e[0]:t.documentElement}(n).appendChild(i),a}function Qa(){if(this&&this.Wb){var t=this.Wb;t&&"SCRIPT"==t.tagName&&Ya(t,!0,this.Ma)}}function Ya(t,e,n){null!=n&&u.clearTimeout(n),t.onload=h,t.onerror=h,t.onreadystatechange=h,e&&window.setTimeout((function(){t&&t.parentNode&&t.parentNode.removeChild(t)}),0)}var Xa=0,$a=1;function Ja(t,e){var n="Jsloader error (code #"+t+")";e&&(n+=": "+e),D.call(this,n),this.code=t}function Za(t){this.f=t}function ts(t,n,r){if(this.c=t,t=n||{},this.l=t.secureTokenEndpoint||"https://securetoken.googleapis.com/v1/token",this.m=t.secureTokenTimeout||rs,this.g=yt(t.secureTokenHeaders||is),this.h=t.firebaseEndpoint||"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",this.i=t.identityPlatformEndpoint||"https://identitytoolkit.googleapis.com/v2/",this.v=t.firebaseTimeout||os,this.a=yt(t.firebaseHeaders||as),r&&(this.a["X-Client-Version"]=r,this.g["X-Client-Version"]=r),r="Node"==Or(),!(r=u.XMLHttpRequest||r&&e.a.INTERNAL.node&&e.a.INTERNAL.node.XMLHttpRequest)&&!Tr())throw new C("internal-error","The XMLHttpRequest compatibility library was not found.");this.f=void 0,Tr()?this.f=new ga(self):Sr()?this.f=new Za(r):this.f=new ea,this.b=null}S(Ja,D),S(Za,$o),Za.prototype.a=function(){return new this.f},Za.prototype.b=function(){return{}};var es,ns="idToken",rs=new Hr(3e4,6e4),is={"Content-Type":"application/x-www-form-urlencoded"},os=new Hr(3e4,6e4),as={"Content-Type":"application/json"};function ss(t,e){e?t.a["X-Firebase-Locale"]=e:delete t.a["X-Firebase-Locale"]}function us(t,e){e&&(t.l=cs("https://securetoken.googleapis.com/v1/token",e),t.h=cs("https://www.googleapis.com/identitytoolkit/v3/relyingparty/",e),t.i=cs("https://identitytoolkit.googleapis.com/v2/",e))}function cs(t,e){return t=qn(t),e=qn(e.url),t.f=t.a+t.f,Ln(t,e.c),t.a=e.a,Mn(t,e.g),t.toString()}function ls(t,e){e?(t.a["X-Client-Version"]=e,t.g["X-Client-Version"]=e):(delete t.a["X-Client-Version"],delete t.g["X-Client-Version"])}function fs(t,e,n,r,i,o,a){(function(){var t=xr();return!((t=kr(t)!=Cr?null:(t=t.match(/\sChrome\/(\d+)/i))&&2==t.length?parseInt(t[1],10):null)&&30>t)&&(!Yt||!ue||9<ue)})()||Tr()?t=E(t.u,t):(es||(es=new Ee((function(t,e){!function(t,e){if(((window.gapi||{}).client||{}).request)t();else{u[ps]=function(){((window.gapi||{}).client||{}).request?t():e(Error("CORS_UNSUPPORTED"))},function(t,e){Va(t,null,e,void 0)}(Ga(kt(hs,{onload:ps})),(function(){e(Error("CORS_UNSUPPORTED"))}))}}(t,e)}))),t=E(t.s,t)),t(e,n,r,i,o,a)}ts.prototype.T=function(){return this.b},ts.prototype.u=function(t,e,n,r,i,o){if(Tr()&&("undefined"===typeof u.fetch||"undefined"===typeof u.Headers||"undefined"===typeof u.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 Ta(this.f);if(o){a.g=Math.max(0,o);var s=setTimeout((function(){a.dispatchEvent("timeout")}),o)}On(a,"complete",(function(){s&&clearTimeout(s);var t=null;try{t=JSON.parse(function(t){try{return t.a?t.a.responseText:""}catch(e){return ya(t.b,"Can not get responseText: "+e.message),""}}(this))||null}catch(n){t=null}e&&e(t)})),Sn(a,"ready",(function(){s&&clearTimeout(s),Ge(this)})),Sn(a,"timeout",(function(){s&&clearTimeout(s),Ge(this),e&&e(null)})),Ca(a,t,n,r,i)};var hs=new wt(Ot,"https://apis.google.com/js/client.js?onload=%{onload}"),ps="__fcb"+Math.floor(1e6*Math.random()).toString();function ds(t,e,n,r,i,o,a){var s=qn(e+n);Un(s,"key",t.c),a&&Un(s,"cb",O().toString());var u="GET"==r;if(u)for(var c in i)i.hasOwnProperty(c)&&Un(s,c,i[c]);return new Ee((function(e,n){fs(t,s.toString(),(function(t){t?t.error?n(cu(t,o||{})):e(t):n(new C("network-request-failed"))}),r,u?void 0:or(Ur(i)),t.a,t.v.get())}))}function vs(t){if("string"!==typeof(t=t.email)||!br.test(t))throw new C("invalid-email")}function ys(t){"email"in t&&vs(t)}function gs(t){if(!t[ns]){if(t.mfaPendingCredential)throw new C("multi-factor-auth-required",null,yt(t));throw new C("internal-error")}}function ms(t){if(t.phoneNumber||t.temporaryProof){if(!t.phoneNumber||!t.temporaryProof)throw new C("internal-error")}else{if(!t.sessionInfo)throw new C("missing-verification-id");if(!t.code)throw new C("missing-verification-code")}}ts.prototype.s=function(t,e,n,r,i){var o=this;es.then((function(){window.gapi.client.setApiKey(o.c);var a=window.gapi.auth.getToken();window.gapi.auth.setToken(null),window.gapi.client.request({path:t,method:n,body:r,headers:i,authType:"none",callback:function(t){window.gapi.auth.setToken(a),e&&e(t)}})})).o((function(t){e&&e({error:{message:t&&t.message||"CORS_UNSUPPORTED"}})}))},ts.prototype.zb=function(){return su(this,Ys,{})},ts.prototype.Bb=function(t,e){return su(this,Gs,{idToken:t,email:e})},ts.prototype.Cb=function(t,e){return su(this,Qs,{idToken:t,password:e})};
2var bs={displayName:"DISPLAY_NAME",photoUrl:"PHOTO_URL"};function ws(t){if(!t.phoneVerificationInfo)throw new C("internal-error");if(!t.phoneVerificationInfo.sessionInfo)throw new C("missing-verification-id");if(!t.phoneVerificationInfo.code)throw new C("missing-verification-code")}function _s(t){if(!t.requestUri||!t.sessionId&&!t.postBody&&!t.pendingToken)throw new C("internal-error")}function Es(t,e){return e.oauthIdToken&&e.providerId&&0==e.providerId.indexOf("oidc.")&&!e.pendingToken&&(t.sessionId?e.nonce=t.sessionId:t.postBody&&(er(t=new $n(t.postBody),"nonce")&&(e.nonce=t.get("nonce")))),e}function Ts(t){var e=null;if(t.needConfirmation?(t.code="account-exists-with-different-credential",e=Xo(t)):"FEDERATED_USER_ID_ALREADY_LINKED"==t.errorMessage?(t.code="credential-already-in-use",e=Xo(t)):"EMAIL_EXISTS"==t.errorMessage?(t.code="email-already-in-use",e=Xo(t)):t.errorMessage&&(e=uu(t.errorMessage)),e)throw e;gs(t)}function Os(t,e){return e.returnIdpCredential=!0,su(t,Js,e)}function Ss(t,e){return e.returnIdpCredential=!0,su(t,tu,e)}function Is(t,e){return e.returnIdpCredential=!0,e.autoCreate=!1,su(t,Zs,e)}function Cs(t){if(!t.oobCode)throw new C("invalid-action-code")}(n=ts.prototype).Db=function(t,e){var n={idToken:t},r=[];return dt(bs,(function(t,i){var o=e[i];null===o?r.push(t):i in e&&(n[i]=o)})),r.length&&(n.deleteAttribute=r),su(this,Gs,n)},n.vb=function(t,e){return mt(t={requestType:"PASSWORD_RESET",email:t},e),su(this,Bs,t)},n.wb=function(t,e){return mt(t={requestType:"EMAIL_SIGNIN",email:t},e),su(this,Us,t)},n.ub=function(t,e){return mt(t={requestType:"VERIFY_EMAIL",idToken:t},e),su(this,Vs,t)},n.Eb=function(t,e,n){return mt(t={requestType:"VERIFY_AND_CHANGE_EMAIL",idToken:t,newEmail:e},n),su(this,qs,t)},n.fb=function(t){return su(this,ru,t)},n.nb=function(t,e){return su(this,Ws,{oobCode:t,newPassword:e})},n.Ra=function(t){return su(this,Ns,{oobCode:t})},n.jb=function(t){return su(this,ks,{oobCode:t})};var ks={endpoint:"setAccountInfo",A:Cs,Z:"email",B:!0},Ns={endpoint:"resetPassword",A:Cs,G:function(t){var e=t.requestType;if(!e||!t.email&&"EMAIL_SIGNIN"!=e&&"VERIFY_AND_CHANGE_EMAIL"!=e)throw new C("internal-error")},B:!0},As={endpoint:"signupNewUser",A:function(t){if(vs(t),!t.password)throw new C("weak-password")},G:gs,V:!0,B:!0},xs={endpoint:"createAuthUri",B:!0},Ps={endpoint:"deleteAccount",N:["idToken"]},Rs={endpoint:"setAccountInfo",N:["idToken","deleteProvider"],A:function(t){if(!Array.isArray(t.deleteProvider))throw new C("internal-error")}},js={endpoint:"emailLinkSignin",N:["email","oobCode"],A:vs,G:gs,V:!0,B:!0},Ds={endpoint:"emailLinkSignin",N:["idToken","email","oobCode"],A:vs,G:gs,V:!0},Ls={endpoint:"accounts/mfaEnrollment:finalize",N:["idToken","phoneVerificationInfo"],A:ws,G:gs,B:!0,Na:!0},Ms={endpoint:"accounts/mfaSignIn:finalize",N:["mfaPendingCredential","phoneVerificationInfo"],A:ws,G:gs,B:!0,Na:!0},Fs={endpoint:"getAccountInfo"},Us={endpoint:"getOobConfirmationCode",N:["requestType"],A:function(t){if("EMAIL_SIGNIN"!=t.requestType)throw new C("internal-error");vs(t)},Z:"email",B:!0},Vs={endpoint:"getOobConfirmationCode",N:["idToken","requestType"],A:function(t){if("VERIFY_EMAIL"!=t.requestType)throw new C("internal-error")},Z:"email",B:!0},qs={endpoint:"getOobConfirmationCode",N:["idToken","newEmail","requestType"],A:function(t){if("VERIFY_AND_CHANGE_EMAIL"!=t.requestType)throw new C("internal-error")},Z:"email",B:!0},Bs={endpoint:"getOobConfirmationCode",N:["requestType"],A:function(t){if("PASSWORD_RESET"!=t.requestType)throw new C("internal-error");vs(t)},Z:"email",B:!0},zs={lb:!0,endpoint:"getProjectConfig",Ub:"GET"},Hs={lb:!0,endpoint:"getRecaptchaParam",Ub:"GET",G:function(t){if(!t.recaptchaSiteKey)throw new C("internal-error")}},Ws={endpoint:"resetPassword",A:Cs,Z:"email",B:!0},Ks={endpoint:"sendVerificationCode",N:["phoneNumber","recaptchaToken"],Z:"sessionInfo",B:!0},Gs={endpoint:"setAccountInfo",N:["idToken"],A:ys,V:!0},Qs={endpoint:"setAccountInfo",N:["idToken"],A:function(t){if(ys(t),!t.password)throw new C("weak-password")},G:gs,V:!0},Ys={endpoint:"signupNewUser",G:gs,V:!0,B:!0},Xs={endpoint:"accounts/mfaEnrollment:start",N:["idToken","phoneEnrollmentInfo"],A:function(t){if(!t.phone
2EnrollmentInfo)throw new C("internal-error");if(!t.phoneEnrollmentInfo.phoneNumber)throw new C("missing-phone-number");if(!t.phoneEnrollmentInfo.recaptchaToken)throw new C("missing-app-credential")},G:function(t){if(!t.phoneSessionInfo||!t.phoneSessionInfo.sessionInfo)throw new C("internal-error")},B:!0,Na:!0},$s={endpoint:"accounts/mfaSignIn:start",N:["mfaPendingCredential","mfaEnrollmentId","phoneSignInInfo"],A:function(t){if(!t.phoneSignInInfo||!t.phoneSignInInfo.recaptchaToken)throw new C("missing-app-credential")},G:function(t){if(!t.phoneResponseInfo||!t.phoneResponseInfo.sessionInfo)throw new C("internal-error")},B:!0,Na:!0},Js={endpoint:"verifyAssertion",A:_s,Ya:Es,G:Ts,V:!0,B:!0},Zs={endpoint:"verifyAssertion",A:_s,Ya:Es,G:function(t){if(t.errorMessage&&"USER_NOT_FOUND"==t.errorMessage)throw new C("user-not-found");if(t.errorMessage)throw uu(t.errorMessage);gs(t)},V:!0,B:!0},tu={endpoint:"verifyAssertion",A:function(t){if(_s(t),!t.idToken)throw new C("internal-error")},Ya:Es,G:Ts,V:!0},eu={endpoint:"verifyCustomToken",A:function(t){if(!t.token)throw new C("invalid-custom-token")},G:gs,V:!0,B:!0},nu={endpoint:"verifyPassword",A:function(t){if(vs(t),!t.password)throw new C("wrong-password")},G:gs,V:!0,B:!0},ru={endpoint:"verifyPhoneNumber",A:ms,G:gs,B:!0},iu={endpoint:"verifyPhoneNumber",A:function(t){if(!t.idToken)throw new C("internal-error");ms(t)},G:function(t){if(t.temporaryProof)throw t.code="credential-already-in-use",Xo(t);gs(t)}},ou={Hb:{USER_NOT_FOUND:"user-not-found"},endpoint:"verifyPhoneNumber",A:ms,G:gs,B:!0},au={endpoint:"accounts/mfaEnrollment:withdraw",N:["idToken","mfaEnrollmentId"],G:function(t){if(!!t[ns]^!!t.refreshToken)throw new C("internal-error")},B:!0,Na:!0};function su(t,e,n){if(!function(t,e){if(!e||!e.length)return!0;if(!t)return!1;for(var n=0;n<e.length;n++){var r=t[e[n]];if(void 0===r||null===r||""===r)return!1}return!0}(n,e.N))return Ae(new C("internal-error"));var r,i=!!e.Na,o=e.Ub||"POST";return Ne(n).then(e.A).then((function(){return e.V&&(n.returnSecureToken=!0),e.B&&t.b&&"undefined"===typeof n.tenantId&&(n.tenantId=t.b),ds(t,i?t.i:t.h,e.endpoint,o,n,e.Hb,e.lb||!1)})).then((function(t){return r=t,e.Ya?e.Ya(n,r):r})).then(e.G).then((function(){if(!e.Z)return r;if(!(e.Z in r))throw new C("internal-error");return r[e.Z]}))}function uu(t){return cu({error:{errors:[{message:t}],code:400,message:t}})}function cu(t,e){var n=(t.error&&t.error.errors&&t.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=t.error&&t.error.message||"",mt(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"},e||{}),e=(e=n.match(/^[^\s]+\s*:\s*([\s\S]*)$/))&&1<e.length?e[1]:void 0,r)if(0===n.indexOf(i))return new C(r[i],e);return!e&&t&&(e=Fr(t)),new C("internal-error",e)}function lu(t){this.b=t,this.a=null,this.rb=function(t){return(du||(du=new Ee((function(t,e){function n(){zr(),Pr("gapi.load")("gapi.iframes",{callback:t,ontimeout:function(){zr(),e(Error("Network Error"))},timeout:hu.get()})}if(Pr("gapi.iframes.Iframe"))t();else if(Pr("gapi.load"))n();else{var r="__iframefcb"+Math.floor(1e6*Math.random()).toString();u[r]=function(){Pr("gapi.load")?n():e(Error("Network Error"))},Ne(Ga(r=kt(fu,{onload:r}))).o((function(){e(Error("Network Error"))}))}})).o((function(t){throw du=null,t})))).then((function(){return new Ee((function(e,n){Pr("gapi.iframes.getContext")().open({where:document.body,url:t.b,messageHandlersFilter:Pr("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"),attributes:{style:{position:"absolute",top:"-100px",width:"1px",height:"1px"}},dontclear:!0},(function(r){function i(){clearTimeout(o),e()}t.a=r,t.a.restyle({setHideOnLeave:!1});var o=setTimeout((function(){n(Error("Network Error"))}),pu.get());r.ping(i).then(i,(function(){n(Error("Network Error"))}))}))}))}))}(this)}var fu=new wt(Ot,"https://apis.google.com/js/api.js?onload=%{onload}"),hu=new Hr(3e4,6e4),pu=new Hr(5e3,15e3),du=null;function vu(t,e,n,r){this.l=t,this.h=e,this.i=n,this.g=r,this.f=null,this.g?t=Bn((t=qn(this.g.url)).c,t.a,t.g,"/emulator/auth/iframe"):t=Bn("https",this.l,null,"/__/auth/iframe"),this.a=t,Un(this.a,"apiKey",this.h),Un(this.a,"appName",this.i),this.b=null,this.c=[]}function yu(t,e,n,r,i,o){this.u=t,this.s=e,this.c=n,this.m=r,this.v=o,this.i=this.g=this.l=null,this.a=i,this.h=this.f=null}function gu(t){try{return e.a.app(t).auth().Ga()}catch(n){return[]}}function mu(t,e,n,r,i,o){this.s=t,this.g=e,this.b=n,this.f=o,this.c=r||null,this.i=i||null,this.l=this.u=this.C=null,this.h=[],this.m=this.a=null}function bu(t){var e=hr();return function(t){return su(t,zs,{}).then((function(t){return t.authorizedDomains||[]}))}(t).then((function(t){t:{var n=qn(e),r=n.c;n=n.a;for(var i=0;i<t.length;i++){var o=t[i],a=n,s=r;if(0==o.indexOf("chrome-extension://")?a=qn(o).a==a&&"chrome-extension"==s:"http"!=s&&"https"!=s?a=!1:mr.test(o)?a=a==o:(o=o.split(".").join("\\."),a=new RegExp("^(.+\\."+o+"|"+o+")$","i").test(a)),a){t=!0;break t}}t=!1}if(!t)throw new Qo(hr())}))}function wu(t){return t.m||(t.m=wr().then((function(){if(!t.u){var e=t.c,n=t.i,r=gu(t.b),i=new vu(t.s,t.g,t.b,t.f);i.f=e,i.b=n,i.c=Z(r||[]),t.u=i.toString()}t.v=new lu(t.u),function(t){if(!t.v)throw Error("IfcHandler must be initialized!");!function(t,e){t.rb.then((function(){t.a.register("authEvent",e,Pr("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))}))}(t.v,(function(e){var n={};if(e&&e.authEvent){var r=!1;for(e=Ho(e.authEvent),n=0;n<t.h.length;n++)r=t.h[n](e)||r;return(n={}).status=r?"ACK":"ERROR",Ne(n)}return n.status="ERROR",Ne(n)}))}(t)}))),t.m}function _u(t){return t.l||(t.C=t.c?Ar(t.c,gu(t.b)):null,t.l=new ts(t.g,R(t.i),t.C),t.f&&us(t.l,t.f)),t.l}function Eu(t,e,n,r,i,o,a,s,u,c,l,f){return(t=new yu(t,e,n,r,i,f)).l=o,t.g=a,t.i=s,t.b=yt(u||null),t.f=c,t.yb(l).toString()}function Tu(t){if(this.a=t||e.a.INTERNAL.reactNative&&e.a.INTERNAL.reactNative.AsyncStorage,!this.a)throw new C("internal-error","The React Native compatibility library was not found.");this.type="asyncStorage"}function Ou(t){this.b=t,this.a={},this.f=E(this.c,this)}vu.prototype.toString=function(){return this.f?Un(this.a,"v",this.f):tr(this.a.b,"v"),this.b?Un(this.a,"eid",this.b):tr(this.a.b,"eid"),this.c.length?Un(this.a,"fw",this.c.join(",")):tr(this.a.b,"fw"),this.a.toString()},yu.prototype.yb=function(t){return this.h=t,this},yu.prototype.toString=function(){if(this.v){var t=qn(this.v.url);t=Bn(t.c,t.a,t.g,"/emulator/auth/handler")}else t=Bn("https",this.u,null,"/__/auth/handler");if(Un(t,"apiKey",this.s),Un(t,"appName",this.c),Un(t,"authType",this.m),this.a.isOAuthProvider){var n=this.a;try{var r=e.a.app(this.c).auth().la()}catch(u){r=null}for(var i in n.ob=r,Un(t,"providerId",this.a.providerId),n=Ur((r=this.a).Ib))n[i]=n[i].toString();i=r.Qc,n=yt(n);for(var o=0;o<i.length;o++){var a=i[o];a in n&&delete n[a]}r.pb&&r.ob&&!n[r.pb]&&(n[r.pb]=r.ob),vt(n)||Un(t,"customParameters",Fr(n))}if("function"===typeof this.a.Qb&&((r=this.a.Qb()).length&&Un(t,"scopes",r.join(","))),this.l?Un(t,"redirectUrl",this.l):tr(t.b,"redirectUrl"),this.g?Un(t,"eventId",this.g):tr(t.b,"eventId"),this.i?Un(t,"v",this.i):tr(t.b,"v"),this.b)for(var s in this.b)this.b.hasOwnProperty(s)&&!Vn(t,s)&&Un(t,s,this.b[s]);return this.h?Un(t,"tid",this.h):tr(t.b,"tid"),this.f?Un(t,"eid",this.f):tr(t.b,"eid"),(s=gu(this.c)).length&&Un(t,"fw",s.join(",")),t.toString()},(n=mu.prototype).Ob=function(t,e,n){var r=new C("popup-closed-by-user"),i=new C("web-storage-unsupported"),o=this,a=!1;return this.ma().then((function(){(function(t){var e={type:"webStorageSupport"};return wu(t).then((function(){return function(t,e){return t.rb.then((function(){return new Ee((function(n){t.a.send(e.type,e,n,Pr("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))}))}))}(t.v,e)})).then((function(t){if(t&&t.length&&"undefined"!==typeof t[0].webStorageSupport)return t[0].webStorageSupport;throw Error()}))})(o).then((function(n){n||(t&&yr(t),e(i),a=!0)}))})).o((function(){})).then((function(){if(!a)return function(t){return new Ee((function(e){return function n(){kn(2e3).then((function(){if(t&&!t.closed)return n();e()}
2))}()}))}(t)})).then((function(){if(!a)return kn(n).then((function(){e(r)}))}))},n.Xb=function(){var t=xr();return!Mr(t)&&!Br(t)},n.Tb=function(){return!1},n.Mb=function(t,e,n,r,i,o,a,s){if(!t)return Ae(new C("popup-blocked"));if(a&&!Mr())return this.ma().o((function(e){yr(t),i(e)})),r(),Ne();this.a||(this.a=bu(_u(this)));var u=this;return this.a.then((function(){var e=u.ma().o((function(e){throw yr(t),i(e),e}));return r(),e})).then((function(){(Bo(n),a)||pr(Eu(u.s,u.g,u.b,e,n,null,o,u.c,void 0,u.i,s,u.f),t)})).o((function(t){throw"auth/network-request-failed"==t.code&&(u.a=null),t}))},n.Nb=function(t,e,n,r){this.a||(this.a=bu(_u(this)));var i=this;return this.a.then((function(){Bo(e),pr(Eu(i.s,i.g,i.b,t,e,hr(),n,i.c,void 0,i.i,r,i.f))})).o((function(t){throw"auth/network-request-failed"==t.code&&(i.a=null),t}))},n.ma=function(){var t=this;return wu(this).then((function(){return t.v.rb})).o((function(){throw t.a=null,new C("network-request-failed")}))},n.$b=function(){return!0},n.Ea=function(t){this.h.push(t)},n.Sa=function(t){$(this.h,(function(e){return e==t}))},(n=Tu.prototype).get=function(t){return Ne(this.a.getItem(t)).then((function(t){return t&&Vr(t)}))},n.set=function(t,e){return Ne(this.a.setItem(t,Fr(e)))},n.U=function(t){return Ne(this.a.removeItem(t))},n.ca=function(){},n.ia=function(){};var Su,Iu=[];function Cu(t,e,n){vt(t.a)&&t.b.addEventListener("message",t.f),"undefined"===typeof t.a[e]&&(t.a[e]=[]),t.a[e].push(n)}function ku(t){this.a=t}function Nu(t){this.c=t,this.b=!1,this.a=[]}function Au(t,e,n,r){var i,o,a,s,u=n||{},c=null;if(t.b)return Ae(Error("connection_unavailable"));var l=r?800:50,f="undefined"!==typeof MessageChannel?new MessageChannel:null;return new Ee((function(n,r){f?(i=Math.floor(Math.random()*Math.pow(10,20)).toString(),f.port1.start(),a=setTimeout((function(){r(Error("unsupported_event"))}),l),c={messageChannel:f,onMessage:o=function(t){t.data.eventId===i&&("ack"===t.data.status?(clearTimeout(a),s=setTimeout((function(){r(Error("timeout"))}),3e3)):"done"===t.data.status?(clearTimeout(s),"undefined"!==typeof t.data.response?n(t.data.response):r(Error("unknown_error"))):(clearTimeout(a),clearTimeout(s),r(Error("invalid_response"))))}},t.a.push(c),f.port1.addEventListener("message",o),t.c.postMessage({eventType:e,eventId:i,data:u},[f.port2])):r(Error("connection_unavailable"))})).then((function(e){return xu(t,c),e})).o((function(e){throw xu(t,c),e}))}function xu(t,e){if(e){var n=e.messageChannel,r=e.onMessage;n&&(n.port1.removeEventListener("message",r),n.port1.close()),$(t.a,(function(t){return t==e}))}}function Pu(){if(!Lu())throw new C("web-storage-unsupported");this.c={},this.a=[],this.b=0,this.m=u.indexedDB,this.type="indexedDB",this.g=this.v=this.f=this.l=null,this.s=!1,this.h=null;var t=this;Tr()&&self?(this.v=function(){var t=Tr()?self:null;if(W(Iu,(function(n){n.b==t&&(e=n)})),!e){var e=new Ou(t);Iu.push(e)}return e}(),Cu(this.v,"keyChanged",(function(e,n){return qu(t).then((function(e){return 0<e.length&&W(t.a,(function(t){t(e)})),{keyProcessed:Y(e,n.key)}}))})),Cu(this.v,"ping",(function(){return Ne(["keyChanged"])}))):function(){var t=u.navigator;return t&&t.serviceWorker?Ne().then((function(){return t.serviceWorker.ready})).then((function(t){return t.active||null})).o((function(){return null})):Ne(null)}().then((function(e){(t.h=e)&&(t.g=new Nu(new ku(e)),Au(t.g,"ping",null,!0).then((function(e){e[0].fulfilled&&Y(e[0].value,"keyChanged")&&(t.s=!0)})).o((function(){})))}))}function Ru(t){return new Ee((function(e,n){var r=t.m.open("firebaseLocalStorageDb",1);r.onerror=function(t){try{t.preventDefault()}catch(e){}n(Error(t.target.error))},r.onupgradeneeded=function(t){t=t.target.result;try{t.createObjectStore("firebaseLocalStorage",{keyPath:"fbase_key"})}catch(e){n(e)}},r.onsuccess=function(r){(r=r.target.result).objectStoreNames.contains("firebaseLocalStorage")?e(r):function(t){return new Ee((function(e,n){var r=t.m.deleteDatabase("firebaseLocalStorageDb");r.onsuccess=function(){e()},r.onerror=function(t){n(Error(t.target.error))}}))}(t).then((function(){return Ru(t)})).then((function(t){e(t)})).o((function(t){n(t)}))}}))}function ju(t){return t.i||(t.i=Ru(t)),t.i}function Du(t,e){var n=0;return new Ee((function r(i,o){ju(t).then(e).then(i).o((function(e){if(!(3<++n))return ju(t).then((function(e){return e.close(),t.i=void 0,r(i,o)})).o((function(t){o(t)}));o(e)}))}))}function Lu(){try{return!!u.indexedDB}catch(ha){return!1}}function Mu(t){return t.objectStore("firebaseLocalStorage")}function Fu(t,e){return t.transaction(["firebaseLocalStorage"],e?"readwrite":"readonly")}function Uu(t){return new Ee((function(e,n){t.onsuccess=function(t){t&&t.target?e(t.target.result):e()},t.onerror=function(t){n(t.target.error)}}))}function Vu(t,e){return t.g&&t.h&&function(){var t=u.navigator;return t&&t.serviceWorker&&t.serviceWorker.controller||null}()===t.h?Au(t.g,"keyChanged",{key:e},t.s).then((function(){})).o((function(){})):Ne()}function qu(t){return ju(t).then((function(t){var e=Mu(Fu(t,!1));return e.getAll?Uu(e.getAll()):new Ee((function(t,n){var r=[],i=e.openCursor();i.onsuccess=function(e){(e=e.target.result)?(r.push(e.value),e.continue()):t(r)},i.onerror=function(t){n(t.target.error)}}))})).then((function(e){var n={},r=[];if(0==t.b){for(r=0;r<e.length;r++)n[e[r].fbase_key]=e[r].value;r=dr(t.c,n),t.c=n}return r}))}function Bu(t){t.l&&t.l.cancel("STOP_EVENT"),t.f&&(clearTimeout(t.f),t.f=null)}function zu(t){var e=this,n=null;this.a=[],this.type="indexedDB",this.c=t,this.b=Ne().then((function(){if(Lu()
2){var t=qr(),r="__sak"+t;return Su||(Su=new Pu),(n=Su).set(r,t).then((function(){return n.get(r)})).then((function(e){if(e!==t)throw Error("indexedDB not supported!");return n.U(r)})).then((function(){return n})).o((function(){return e.c}))}return e.c})).then((function(t){return e.type=t.type,t.ca((function(t){W(e.a,(function(e){e(t)}))})),t}))}function Hu(){this.a={},this.type="inMemory"}function Wu(){if(!function(){var t="Node"==Or();if(!(t=Ku()||t&&e.a.INTERNAL.node&&e.a.INTERNAL.node.localStorage))return!1;try{return t.setItem("__sak","1"),t.removeItem("__sak"),!0}catch(n){return!1}}()){if("Node"==Or())throw new C("internal-error","The LocalStorage compatibility library was not found.");throw new C("web-storage-unsupported")}this.a=Ku()||e.a.INTERNAL.node.localStorage,this.type="localStorage"}function Ku(){try{var t=u.localStorage,e=qr();return t&&(t.setItem(e,"1"),t.removeItem(e)),t}catch(n){return null}}function Gu(){this.type="nullStorage"}function Qu(){if(!function(){var t="Node"==Or();if(!(t=Yu()||t&&e.a.INTERNAL.node&&e.a.INTERNAL.node.sessionStorage))return!1;try{return t.setItem("__sak","1"),t.removeItem("__sak"),!0}catch(n){return!1}}()){if("Node"==Or())throw new C("internal-error","The SessionStorage compatibility library was not found.");throw new C("web-storage-unsupported")}this.a=Yu()||e.a.INTERNAL.node.sessionStorage,this.type="sessionStorage"}function Yu(){try{var t=u.sessionStorage,e=qr();return t&&(t.setItem(e,"1"),t.removeItem(e)),t}catch(n){return null}}function Xu(){var t={};t.Browser=Zu,t.Node=tc,t.ReactNative=ec,t.Worker=nc,this.a=t[Or()]}Ou.prototype.c=function(t){var e=t.data.eventType,n=t.data.eventId,r=this.a[e];if(r&&0<r.length){t.ports[0].postMessage({status:"ack",eventId:n,eventType:e,response:null});var i=[];W(r,(function(e){i.push(Ne().then((function(){return e(t.origin,t.data.data)})))})),Pe(i).then((function(r){var i=[];W(r,(function(t){i.push({fulfilled:t.Pb,value:t.value,reason:t.reason?t.reason.message:void 0})})),W(i,(function(t){for(var e in t)"undefined"===typeof t[e]&&delete t[e]})),t.ports[0].postMessage({status:"done",eventId:n,eventType:e,response:i})}))}},ku.prototype.postMessage=function(t,e){this.a.postMessage(t,e)},Nu.prototype.close=function(){for(;0<this.a.length;)xu(this,this.a[0]);this.b=!0},(n=Pu.prototype).set=function(t,e){var n=this,r=!1;return Du(this,(function(e){return Uu((e=Mu(Fu(e,!0))).get(t))})).then((function(i){return Du(n,(function(o){if(o=Mu(Fu(o,!0)),i)return i.value=e,Uu(o.put(i));n.b++,r=!0;var a={};return a.fbase_key=t,a.value=e,Uu(o.add(a))}))})).then((function(){return n.c[t]=e,Vu(n,t)})).oa((function(){r&&n.b--}))},n.get=function(t){return Du(this,(function(e){return Uu(Mu(Fu(e,!1)).get(t))})).then((function(t){return t&&t.value}))},n.U=function(t){var e=this,n=!1;return Du(this,(function(r){return n=!0,e.b++,Uu(Mu(Fu(r,!0)).delete(t))})).then((function(){return delete e.c[t],Vu(e,t)})).oa((function(){n&&e.b--}))},n.ca=function(t){0==this.a.length&&function(t){function e(){t.f=setTimeout((function(){t.l=qu(t).then((function(e){0<e.length&&W(t.a,(function(t){t(e)}))})).then((function(){e()})).o((function(t){"STOP_EVENT"!=t.message&&e()}))}),800)}Bu(t),e()}(this),this.a.push(t)},n.ia=function(t){$(this.a,(function(e){return e==t})),0==this.a.length&&Bu(this)},(n=zu.prototype).get=function(t){return this.b.then((function(e){return e.get(t)}))},n.set=function(t,e){return this.b.then((function(n){return n.set(t,e)}))},n.U=function(t){return this.b.then((function(e){return e.U(t)}))},n.ca=function(t){this.a.push(t)},n.ia=function(t){$(this.a,(function(e){return e==t}))},(n=Hu.prototype).get=function(t){return Ne(this.a[t])},n.set=function(t,e){return this.a[t]=e,Ne()},n.U=function(t){return delete this.a[t],Ne()},n.ca=function(){},n.ia=function(){},(n=Wu.prototype).get=function(t){var e=this;return Ne().then((function(){return Vr(e.a.getItem(t))}))},n.set=function(t,e){var n=this;return Ne().then((function(){var r=Fr(e);null===r?n.U(t):n.a.setItem(t,r)}))},n.U=function(t){var e=this;return Ne().then((function(){e.a.removeItem(t)}))},n.ca=function(t){u.window&&fn(u.window,"storage",t)},n.ia=function(t){u.window&&dn(u.window,"storage",t)},(n=Gu.prototype).get=function(){return Ne(null)},n.set=function(){return Ne()},n.U=function(){return Ne()},n.ca=function(){},n.ia=function(){},(n=Qu.prototype).get=function(t){var e=this;return Ne().then((function(){return Vr(e.a.getItem(t))}))},n.set=function(t,e){var n=this;return Ne().then((function(){var r=Fr(e);null===r?n.U(t):n.a.setItem(t,r)}))},n.U=function(t){var e=this;return Ne().then((function(){e.a.removeItem(t)}))},n.ca=function(){},n.ia=function(){};var $u,Ju,Zu={F:Wu,bb:Qu},tc={F:Wu,bb:Qu},ec={F:Tu,bb:Gu},nc={F:Wu,bb:Gu},rc={rd:"local",NONE:"none",td:"session"};function ic(){var t=!(Br(xr())||!Er()),e=Mr(),n=Rr();this.m=t,this.h=e,this.l=n,this.a={},$u||($u=new Xu),t=$u;try{this.g=!fr()&&Gr()||!u.indexedDB?new t.a.F:new zu(Tr()?new Hu:new t.a.F)}catch(r){this.g=new Hu,this.h=!0}try{this.i=new t.a.bb}catch(r){this.i=new Hu}this.v=new Hu,this.f=E(this.Yb,this),this.b={}}function oc(){return Ju||(Ju=new ic),Ju}function ac(t,e){switch(e){case"session":return t.i;case"none":return t.v;default:return t.g}}function sc(t,e){return"firebase:"+t.name+(e?":"+e:"")}function uc(t,e,n){return n=sc(e,n),"local"==e.F&&(t.b[n]=null),ac(t,e.F).U(n)}function cc(t){t.c&&(clearInterval(t.c),t.c=null)}function lc(t){this.a=t,this.b=oc()}(n=ic.prototype).get=function(t,e){return ac(this,t.F).get(sc(t,e))},n.set=function(t,e,n){var r=sc(t,n),i=this,o=ac(this,t.F);return o.set(r,e).then((function(){return o.get(r)})).then((function(e){"local"==t.F&&(i.b[r]=e)}))},n.addListener=function(t,e,n){t=sc(t,e),this.l&&(this.b[t]=u.localStorage.getItem(t)),vt(this.a)&&(ac(this,"local").ca(this.f),this.h||(fr()||!Gr())&&u.indexedDB||!this.l||function(t){cc(t),t.c=setInterval((function(){for(var e in t.a){var n=u.localStorage.getItem(e),r=t.b[e];n!=r&&(t.b[e]=n,n=new Ze({type:"storage",key:e,target:window,oldValue:r,newValue:n,a:!0}),t.Yb(n))}}),1e3)}(this)),this.a[t]||(this.a[t]=[]),this.a[t].push(n)},n.removeListener=function(t,e,n){t=sc(t,e),this.a[t]&&($(this.a[t],(function(t){return t==n})),0==this.a[t].length&&delete this.a[t]),vt(this.a)&&(ac(this,"local").ia(this.f),cc(this))},n.Yb=function(t){if(t&&t.g){var e=t.a.key;if(null==e)for(var n in this.a){var r=this.b[n];"undefined"===typeof r&&(r=null);var i=u.localStorage.getItem(n);i!==r&&(this.b[n]=i,this.mb(n))}else if(0==e.indexOf("firebase:")&&this.a[e]){if("undefined"!==typeof t.a.a?ac(this,"local").ia(this.f):cc(this),this.m)if(n=u.localStorage.getItem(e),(r=t.a.newValue)!==n)null!==r?u.localStorage.setItem(e,r):u.localStorage.removeItem(e);else if(this.b[e]===r&&"undefined"===typeof t.a.a)return;var o=this;n=function(){"undefined"===typeof t.a.a&&o.b[e]===u.localStorage.getItem(e)||(o.b[e]=u.localStorage.getItem(e),o.mb(e))},Yt&&ue&&10==ue&&u.localStorage.getItem(e)!==t.a.newValue&&t.a.newValue!==t.a.oldValue?setTimeout(n,10):n()}}else W(t,E(this.mb,this))},n.mb=function(t){this.a[t]&&W(this.a[t],(function(t){t()}))};var fc,hc={name:"authEvent",F:"local"};function pc(){this.a=oc()}function dc(t,e){this.b=vc,this.f=u.Uint8Array?new Uint8Array(this.b):Array(this.b),this.g=this.c=0,this.a=[],this.i=t,this.h=e,this.l=u.Int32Array?new Int32Array(64):Array(64),void 0===fc&&(fc=u.Int32Array?new Int32Array(Ec):Ec),this.reset()}S(dc,(function(){this.b=-1}));for(var vc=64,yc=vc-1,gc=[],mc=0;
2mc<yc;mc++)gc[mc]=0;var bc=J(128,gc);function wc(t){for(var e=t.f,n=t.l,r=0,i=0;i<e.length;)n[r++]=e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3],i=4*r;for(e=16;64>e;e++){i=0|n[e-15],r=0|n[e-2];var o=(0|n[e-16])+((i>>>7|i<<25)^(i>>>18|i<<14)^i>>>3)|0,a=(0|n[e-7])+((r>>>17|r<<15)^(r>>>19|r<<13)^r>>>10)|0;n[e]=o+a|0}r=0|t.a[0],i=0|t.a[1];var s=0|t.a[2],u=0|t.a[3],c=0|t.a[4],l=0|t.a[5],f=0|t.a[6];for(o=0|t.a[7],e=0;64>e;e++){var h=((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&f)+(0|fc[e])|0)+(0|n[e])|0)|0,o=f,f=l,l=c,c=u+a|0,u=s,s=i,i=r,r=a+h|0}t.a[0]=t.a[0]+r|0,t.a[1]=t.a[1]+i|0,t.a[2]=t.a[2]+s|0,t.a[3]=t.a[3]+u|0,t.a[4]=t.a[4]+c|0,t.a[5]=t.a[5]+l|0,t.a[6]=t.a[6]+f|0,t.a[7]=t.a[7]+o|0}function _c(t,e,n){void 0===n&&(n=e.length);var r=0,i=t.c;if("string"===typeof e)for(;r<n;)t.f[i++]=e.charCodeAt(r++),i==t.b&&(wc(t),i=0);else{if(!d(e))throw Error("message must be string or array");for(;r<n;){var o=e[r++];if(!("number"==typeof o&&0<=o&&255>=o&&o==(0|o)))throw Error("message must be a byte array");t.f[i++]=o,i==t.b&&(wc(t),i=0)}}t.c=i,t.g+=n}dc.prototype.reset=function(){this.g=this.c=0,this.a=u.Int32Array?new Int32Array(this.h):Z(this.h)};var Ec=[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 Tc(){dc.call(this,8,Oc)}S(Tc,dc);var Oc=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];function Sc(t,e,n,r,i,o){this.v=t,this.i=e,this.l=n,this.m=r||null,this.u=i||null,this.s=o,this.h=e+":"+n,this.C=new pc,this.g=new lc(this.h),this.f=null,this.b=[],this.a=this.c=null}function Ic(t){return new C("invalid-cordova-configuration",t)}function Cc(t){var e=new Tc;_c(e,t),t=[];var n=8*e.g;56>e.c?_c(e,bc,56-e.c):_c(e,bc,e.b-(e.c-56));for(var r=63;56<=r;r--)e.f[r]=255&n,n/=256;for(wc(e),r=n=0;r<e.i;r++)for(var i=24;0<=i;i-=8)t[n++]=e.a[r]>>i&255;return function(t){return G(t,(function(t){return 1<(t=t.toString(16)).length?t:"0"+t})).join("")}(t)}function kc(t,e){for(var n=0;n<t.b.length;n++)try{t.b[n](e)}catch(r){}}function Nc(t){return t.f||(t.f=t.ma().then((function(){return new Ee((function(e){t.Ea((function n(r){return e(r),t.Sa(n),!1})),function(t){function e(e){r=!0,i&&i.cancel(),Ac(t).then((function(r){var i=n;if(r&&e&&e.url){var o=null;-1!=(i=so(e.url)).indexOf("/__/auth/callback")&&(o=(o="object"===typeof(o=Vr(Vn(o=qn(i),"firebaseError")||null))?k(o):null)?new zo(r.c,r.b,null,null,o,null,r.T()):new zo(r.c,r.b,i,r.f,null,null,r.T())),i=o||n}kc(t,i)}))}var n=new zo("unknown",null,null,null,new C("no-auth-event")),r=!1,i=kn(500).then((function(){return Ac(t).then((function(){r||kc(t,n)}))})),o=u.handleOpenURL;u.handleOpenURL=function(t){if(0==t.toLowerCase().indexOf(Pr("BuildInfo.packageName",u).toLowerCase()+"://")&&e({url:t}),"function"===typeof o)try{o(t)}catch(n){console.error(n)}},Go||(Go=new Wo),function(t){var e=Go;e.a.push(t),e.b||(e.b=function(t){for(var n=0;n<e.a.length;n++)e.a[n](t)},"function"===typeof(t=Pr("universalLinks.subscribe",u))&&t(null,e.b))}(e)}(t)}))}))),t.f}function Ac(t){var e=null;return function(t){return t.b.get(hc,t.a).then((function(t){return Ho(t)}))}(t.g).then((function(n){return e=n,uc((n=t.g).b,hc,n.a)})).then((function(){return e}))}function xc(t){this.a=t,this.b=oc()}(n=Sc.prototype).ma=function(){return this.Ia?this.Ia:this.Ia=(_r(void 0)?wr().then((function(){return new Ee((function(t,e){var n=u.document,r=setTimeout((function(){e(Error("Cordova framework is not ready."))}),1e3);n.addEventListener("deviceready",(function(){clearTimeout(r),t()}),!1)}))})):Ae(Error("Cordova must run in an Android or iOS file scheme."))).then((function(){if("function"!==typeof Pr("universalLinks.subscribe",u))throw Ic("cordova-universal-links-plugin-fix is not installed");if("undefined"===typeof Pr("BuildInfo.packageName",u))throw Ic("cordova-plugin-buildinfo is not installed");if("function"!==typeof Pr("cordova.plugins.browsertab.openUrl",u))throw Ic("cordova-plugin-browsertab is not installed");if("function"!==typeof Pr("cordova.InAppBrowser.open",u))throw Ic("cordova-plugin-inappbrowser is not installed")}),(function(){throw new C("cordova-not-ready")}))}
2,n.Ob=function(t,e){return e(new C("operation-not-supported-in-this-environment")),Ne()},n.Mb=function(){return Ae(new C("operation-not-supported-in-this-environment"))},n.$b=function(){return!1},n.Xb=function(){return!0},n.Tb=function(){return!0},n.Nb=function(t,e,n,r){if(this.c)return Ae(new C("redirect-operation-pending"));var i=this,o=u.document,a=null,s=null,c=null,l=null;return this.c=Ne().then((function(){return Bo(e),Nc(i)})).then((function(){return function(t,e,n,r,i){var o=function(){for(var t=20,e=[];0<t;)e.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()))),t--;return e.join("")}(),a=new zo(e,r,null,o,new C("no-auth-event"),null,i),s=Pr("BuildInfo.packageName",u);if("string"!==typeof s)throw new C("invalid-cordova-configuration");var c=Pr("BuildInfo.displayName",u),l={};if(xr().toLowerCase().match(/iphone|ipad|ipod/))l.ibi=s;else{if(!xr().toLowerCase().match(/android/))return Ae(new C("operation-not-supported-in-this-environment"));l.apn=s}c&&(l.appDisplayName=c),o=Cc(o),l.sessionId=o;var f=Eu(t.v,t.i,t.l,e,n,null,r,t.m,l,t.u,i,t.s);return t.ma().then((function(){var e=t.h;return t.C.a.set(hc,a.w(),e)})).then((function(){var e=Pr("cordova.plugins.browsertab.isAvailable",u);if("function"!==typeof e)throw new C("invalid-cordova-configuration");var n=null;e((function(e){if(e){if("function"!==typeof(n=Pr("cordova.plugins.browsertab.openUrl",u)))throw new C("invalid-cordova-configuration");n(f)}else{if("function"!==typeof(n=Pr("cordova.InAppBrowser.open",u)))throw new C("invalid-cordova-configuration");e=xr(),t.a=n(f,e.match(/(iPad|iPhone|iPod).*OS 7_\d/i)||e.match(/(iPad|iPhone|iPod).*OS 8_\d/i)?"_blank":"_system","location=yes")}}))}))}(i,t,e,n,r)})).then((function(){return new Ee((function(t,e){s=function(){var e=Pr("cordova.plugins.browsertab.close",u);return t(),"function"===typeof e&&e(),i.a&&"function"===typeof i.a.close&&(i.a.close(),i.a=null),!1},i.Ea(s),c=function(){a||(a=kn(2e3).then((function(){e(new C("redirect-cancelled-by-user"))})))},l=function(){Wr()&&c()},o.addEventListener("resume",c,!1),xr().toLowerCase().match(/android/)||o.addEventListener("visibilitychange",l,!1)})).o((function(t){return Ac(i).then((function(){throw t}))}))})).oa((function(){c&&o.removeEventListener("resume",c,!1),l&&o.removeEventListener("visibilitychange",l,!1),a&&a.cancel(),s&&i.Sa(s),i.c=null}))},n.Ea=function(t){this.b.push(t),Nc(this).o((function(e){"auth/invalid-cordova-configuration"===e.code&&(e=new zo("unknown",null,null,null,new C("no-auth-event")),t(e))}))},n.Sa=function(t){$(this.b,(function(e){return e==t}))};var Pc={name:"pendingRedirect",F:"session"};function Rc(t){return uc(t.b,Pc,t.a)}function jc(t,e,n,r){this.i={},this.u=0,this.D=t,this.v=e,this.m=n,this.J=r,this.h=[],this.f=!1,this.l=E(this.s,this),this.b=new Yc,this.C=new tl,this.g=new xc(Gc(this.v,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.C,this.c.linkViaPopup=this.C,this.c.reauthViaPopup=this.C,this.a=Dc(this.D,this.v,this.m,N,this.J)}function Dc(t,n,r,i,o){var a=e.a.SDK_VERSION||null;return _r()?new Sc(t,n,r,a,i,o):new mu(t,n,r,a,i,o)}function Lc(t){t.f||(t.f=!0,t.a.Ea(t.l));var e=t.a;return t.a.ma().o((function(n){throw t.a==e&&t.reset(),n}))}function Mc(t){t.a.Xb()&&Lc(t).o((function(e){var n=new zo("unknown",null,null,null,new C("operation-not-supported-in-this-environment"));zc(e)&&t.s(n)})),t.a.Tb()||Xc(t.b)}function Fc(t,e){Y(t.h,e)||t.h.push(e),t.f||function(t){return t.b.get(Pc,t.a).then((function(t){return"pending"==t}))}(t.g).then((function(e){e?Rc(t.g).then((function(){Lc(t).o((function(e){var n=new zo("unknown",null,null,null,new C("operation-not-supported-in-this-environment"));zc(e)&&t.s(n)}))})):Mc(t)})).o((function(){Mc(t)}))}function Uc(t,e){$(t.h,(function(t){return t==e}))}jc.prototype.reset=function(){this.f=!1,this.a.Sa(this.l),this.a=Dc(this.D,this.v,this.m,null,this.J),this.i={}},jc.prototype.s=function(t){if(!t)throw new C("invalid-auth-event");if(6e5<=O()-this.u&&(this.i={},this.u=0),t&&t.getUid()&&this.i.hasOwnProperty(t.getUid()))return!1;for(var e=!1,n=0;n<this.h.length;n++){var r=this.h[n];if(r.Fb(t.c,t.b)){(e=this.c[t.c])&&(e.h(t,r),t&&(t.f||t.b)&&(this.i[t.getUid()]=!0,this.u=O())),e=!0;break}}return Xc(this.b),e};var Vc=new Hr(2e3,1e4),qc=new Hr(3e4,6e4);function Bc(t,e,n,r,i,o,a){return t.a.Mb(e,n,r,(function(){t.f||(t.f
2=!0,t.a.Ea(t.l))}),(function(){t.reset()}),i,o,a)}function zc(t){return!(!t||"auth/cordova-not-ready"!=t.code)}function Hc(t,e,n,r,i){var o;return function(t){return t.b.set(Pc,"pending",t.a)}(t.g).then((function(){return t.a.Nb(e,n,r,i).o((function(e){if(zc(e))throw new C("operation-not-supported-in-this-environment");return o=e,Rc(t.g).then((function(){throw o}))})).then((function(){return t.a.$b()?new Ee((function(){})):Rc(t.g).then((function(){return t.qa()})).then((function(){})).o((function(){}))}))}))}function Wc(t,e,n,r,i){return t.a.Ob(r,(function(t){e.na(n,null,t,i)}),Vc.get())}jc.prototype.qa=function(){return this.b.qa()};var Kc={};function Gc(t,e,n){return t=t+":"+e,n&&(t=t+":"+n.url),t}function Qc(t,e,n,r){var i=Gc(e,n,r);return Kc[i]||(Kc[i]=new jc(t,e,n,r)),Kc[i]}function Yc(){this.b=null,this.f=[],this.c=[],this.a=null,this.i=this.g=!1}function Xc(t){t.g||(t.g=!0,Zc(t,!1,null,null))}function $c(t){t.g&&!t.i&&Zc(t,!1,null,null)}function Jc(t,e){if(t.b=function(){return Ne(e)},t.f.length)for(var n=0;n<t.f.length;n++)t.f[n](e)}function Zc(t,e,n,r){e?r?function(t,e){if(t.b=function(){return Ae(e)},t.c.length)for(var n=0;n<t.c.length;n++)t.c[n](e)}(t,r):Jc(t,n):Jc(t,{user:null}),t.f=[],t.c=[]}function tl(){}function el(){this.ib=!1,Object.defineProperty(this,"appVerificationDisabled",{get:function(){return this.ib},set:function(t){this.ib=t},enumerable:!1})}function nl(t,e){this.a=e,Jr(this,"verificationId",t)}function rl(t,e,n,r){return new Uo(t).fb(e,n).then((function(t){return new nl(t,r)}))}function il(t){var e=Gi(t);if(!(e&&e.exp&&e.auth_time&&e.iat))throw new C("internal-error","An internal error occurred. The token obtained by Firebase appears to be malformed. Please retry the operation.");Zr(this,{token:t,expirationTime:Kr(1e3*e.exp),authTime:Kr(1e3*e.auth_time),issuedAtTime:Kr(1e3*e.iat),signInProvider:e.firebase&&e.firebase.sign_in_provider?e.firebase.sign_in_provider:null,signInSecondFactor:e.firebase&&e.firebase.sign_in_second_factor?e.firebase.sign_in_second_factor:null,claims:e})}function ol(t,e,n){var r=e&&e[sl];if(!r)throw new C("argument-error","Internal assert: Invalid MultiFactorResolver");this.a=t,this.f=yt(e),this.g=n,this.c=new uo(null,r),this.b=[];var i=this;W(e[al]||[],(function(t){(t=ri(t))&&i.b.push(t)})),Jr(this,"auth",this.a),Jr(this,"session",this.c),Jr(this,"hints",this.b)}Yc.prototype.reset=function(){this.b=null,this.a&&(this.a.cancel(),this.a=null)},Yc.prototype.h=function(t,e){if(t){this.reset(),this.g=!0;var n=t.c,r=t.b,i=t.a&&"auth/web-storage-unsupported"==t.a.code,o=t.a&&"auth/operation-not-supported-in-this-environment"==t.a.code;this.i=!(!i&&!o),"unknown"!=n||i||o?t.a?(Zc(this,!0,null,t.a),Ne()):e.Fa(n,r)?function(t,e,n){n=n.Fa(e.c,e.b);var r=e.g,i=e.f,o=e.i,a=e.T(),s=!!e.c.match(/Redirect$/);n(r,i,a,o).then((function(e){Zc(t,s,e,null)})).o((function(e){Zc(t,s,null,e)}))}(this,t,e):Ae(new C("invalid-auth-event")):(Zc(this,!1,null,null),Ne())}else Ae(new C("invalid-auth-event"))},Yc.prototype.qa=function(){var t=this;return new Ee((function(e,n){t.b?t.b().then(e,n):(t.f.push(e),t.c.push(n),function(t){var e=new C("timeout");t.a&&t.a.cancel(),t.a=kn(qc.get()).then((function(){t.b||(t.g=!0,Zc(t,!0,null,e))}))}(t))}))},tl.prototype.h=function(t,e){if(t){var n=t.c,r=t.b;t.a?(e.na(t.c,null,t.a,t.b),Ne()):e.Fa(n,r)?function(t,e){var n=t.b,r=t.c;e.Fa(r,n)(t.g,t.f,t.T(),t.i).then((function(t){e.na(r,t,null,n)})).o((function(t){e.na(r,null,t,n)}))}(t,e):Ae(new C("invalid-auth-event"))}else Ae(new C("invalid-auth-event"))},nl.prototype.confirm=function(t){return t=Vo(this.verificationId,t),this.a(t)};var al="mfaInfo",sl="mfaPendingCredential";function ul(t,e,n,r){C.call(this,"multi-factor-auth-required",r,e),this.b=new ol(t,e,n),Jr(this,"resolver",this.b)}function cl(t,e,n){if(t&&y(t.serverResponse)&&"auth/multi-factor-auth-required"===t.code)try{return new ul(e,t.serverResponse,n,t.message)}catch(r){}return null}function ll(){}function fl(t){Jr(this,"factorId",t.fa),this.a=t}function hl(t){if(fl.call(this,t),this.a.fa!=Uo.PROVIDER_ID)throw new C("argument-error","firebase.auth.PhoneMultiFactorAssertion requires a valid firebase.auth.PhoneAuthCredential")}function pl(t,e){for(var n in Je.call(this,t),e)this[n]=e[n]}function dl(t,e){this.a=t,this.b=[],this.c=E(this.yc,this),fn(this.a,"userReloaded",this.c);var n=[];e&&e.multiFactor&&e.multiFactor.enrolledFactors&&W(e.multiFactor.enrolledFactors,(function(t){var e=null,r={};
2if(t){t.uid&&(r[ai]=t.uid),t.displayName&&(r[ii]=t.displayName),t.enrollmentTime&&(r[oi]=new Date(t.enrollmentTime).toISOString()),t.phoneNumber&&(r[si]=t.phoneNumber);try{e=new ui(r)}catch(i){}t=e}else t=null;t&&n.push(t)})),vl(this,n)}function vl(t,e){t.b=e,Jr(t,"enrolledFactors",e)}function yl(t,e,n){if(this.h=t,this.i=e,this.g=n,this.c=3e4,this.f=96e4,this.b=null,this.a=this.c,this.f<this.c)throw Error("Proactive refresh lower bound greater than upper bound!")}function gl(t,e){t.stop(),t.b=kn(function(t,e){return e?(t.a=t.c,t.g()):(e=t.a,t.a*=2,t.a>t.f&&(t.a=t.f),e)}(t,e)).then((function(){return function(){var t=u.document,e=null;return Wr()||!t?Ne():new Ee((function(n){e=function(){Wr()&&(t.removeEventListener("visibilitychange",e,!1),n())},t.addEventListener("visibilitychange",e,!1)})).o((function(n){throw t.removeEventListener("visibilitychange",e,!1),n}))}()})).then((function(){return t.h()})).then((function(){gl(t,!0)})).o((function(e){t.i(e)&&gl(t,!1)}))}function ml(t){this.f=t,this.b=this.a=null,this.c=Date.now()}function bl(t,e){"undefined"===typeof e&&(t.b?e=(e=t.b).a-e.g:e=0),t.c=Date.now()+1e3*e}function wl(t,e){t.b=Ki(e[ns]||""),t.a=e.refreshToken,bl(t,"undefined"!==typeof(e=e.expiresIn)?Number(e):void 0)}function _l(t,e){return function(t,e){return new Ee((function(n,r){"refresh_token"==e.grant_type&&e.refresh_token||"authorization_code"==e.grant_type&&e.code?fs(t,t.l+"?key="+encodeURIComponent(t.c),(function(t){t?t.error?r(cu(t)):t.access_token&&t.refresh_token?n(t):r(new C("internal-error")):r(new C("network-request-failed"))}),"POST",Zn(e).toString(),t.g,t.m.get()):r(new C("internal-error"))}))}(t.f,e).then((function(e){return t.b=Ki(e.access_token),t.a=e.refresh_token,bl(t,e.expires_in),{accessToken:t.b.toString(),refreshToken:t.a}})).o((function(e){throw"auth/user-token-expired"==e.code&&(t.a=null),e}))}function El(t,e){this.a=t||null,this.b=e||null,Zr(this,{lastSignInTime:Kr(e||null),creationTime:Kr(t||null)})}function Tl(t,e,n,r,i,o){Zr(this,{uid:t,displayName:r||null,photoURL:i||null,email:n||null,phoneNumber:o||null,providerId:e})}function Ol(t,n,r){this.J=[],this.l=t.apiKey,this.m=t.appName,this.s=t.authDomain||null;var i=e.a.SDK_VERSION?Ar(e.a.SDK_VERSION):null;this.a=new ts(this.l,R(N),i),t.emulatorConfig&&us(this.a,t.emulatorConfig),this.b=new ml(this.a),Pl(this,n[ns]),wl(this.b,n),Jr(this,"refreshToken",this.b.a),Dl(this,r||{}),Tn.call(this),this.R=!1,this.s&&jr()&&(this.i=Qc(this.s,this.l,this.m)),this.S=[],this.h=null,this.u=function(t){return new yl((function(){return t.I(!0)}),(function(t){return!(!t||"auth/network-request-failed"!=t.code)}),(function(){var e=t.b.c-Date.now()-3e5;return 0<e?e:0}))}(this),this.aa=E(this.hb,this);var o=this;this.ya=null,this.Oa=function(t){o.wa(t.h)},this.ja=null,this.Aa=function(t){us(o.a,t.c)},this.X=null,this.$=[],this.Ba=function(t){Cl(o,t.f)},this.ba=null,this.O=new dl(this,r),Jr(this,"multiFactor",this.O)}function Sl(t,e){t.ja&&dn(t.ja,"languageCodeChanged",t.Oa),(t.ja=e)&&fn(e,"languageCodeChanged",t.Oa)}function Il(t,e){t.X&&dn(t.X,"emulatorConfigChanged",t.Aa),(t.X=e)&&fn(e,"emulatorConfigChanged",t.Aa)}function Cl(t,n){t.$=n,ls(t.a,e.a.SDK_VERSION?Ar(e.a.SDK_VERSION,t.$):null)}function kl(t,e){t.ba&&dn(t.ba,"frameworkChanged",t.Ba),(t.ba=e)&&fn(e,"frameworkChanged",t.Ba)}function Nl(t){try{return e.a.app(t.m).auth()}catch(n){throw new C("internal-error","No firebase.auth.Auth instance is available for the Firebase App '"+t.m+"'!")}}function Al(t){t.D||t.u.b||(t.u.start(),dn(t,"tokenChanged",t.aa),fn(t,"tokenChanged",t.aa))}function xl(t){dn(t,"tokenChanged",t.aa),t.u.stop()}function Pl(t,e){t.za=e,Jr(t,"_lat",e)}function Rl(t){for(var e=[],n=0;n<t.S.length;n++)e.push(t.S[n](t));return Pe(e).then((function(){return t}))}function jl(t){t.i&&!t.R&&(t.R=!0,Fc(t.i,t))}function Dl(t,e){Zr(t,{uid:e.uid,displayName:e.displayName||null,photoURL:e.photoURL||null,email:e.email||null,emailVerified:e.emailVerified||!1,phoneNumber:e.phoneNumber||null,isAnonymous:e.isAnonymous||!1,tenantId:e.tenantId||null,metadata:new El(e.createdAt,e.lastLoginAt),providerData:[]}),t.a.b=t.tenantId}function Ll(){}function Ml(t){return Ne().then((function(){if(t.D)throw new C("app-deleted")}))}function Fl(t){return G(t.providerData,(function(t){return t.providerId}))}function Ul(t,e){e&&(Vl(t,e.providerId),t.providerData.push(e))}function Vl(t,e){$(t.providerData,(function(t){return t.providerId==e}))}function ql(t,e,n){("uid"!=e||n)&&t.hasOwnProperty(e)&&Jr(t,e,n)}function Bl(t,e){t!=e&&(Zr(t,{uid:e.uid,displayName:e.displayName,photoURL:e.ph
2otoURL,email:e.email,emailVerified:e.emailVerified,phoneNumber:e.phoneNumber,isAnonymous:e.isAnonymous,tenantId:e.tenantId,providerData:[]}),e.metadata?Jr(t,"metadata",function(t){return new El(t.a,t.b)}(e.metadata)):Jr(t,"metadata",new El),W(e.providerData,(function(e){Ul(t,e)})),function(t,e){t.b=e.b,t.a=e.a,t.c=e.c}(t.b,e.b),Jr(t,"refreshToken",t.b.a),vl(t.O,e.O.b))}function zl(t){return t.I().then((function(e){var n=t.isAnonymous;return function(t,e){return su(t.a,Fs,{idToken:e}).then(E(t.Kc,t))}(t,e).then((function(){return n||ql(t,"isAnonymous",!1),e}))}))}function Hl(t,e){e[ns]&&t.za!=e[ns]&&(wl(t.b,e),t.dispatchEvent(new pl("tokenChanged")),Pl(t,e[ns]),ql(t,"refreshToken",t.b.a))}function Wl(t,e){return zl(t).then((function(){if(Y(Fl(t),e))return Rl(t).then((function(){throw new C("provider-already-linked")}))}))}function Kl(t,e,n){return ti({user:t,credential:qo(e),additionalUserInfo:e=Ji(e),operationType:n})}function Gl(t,e){return Hl(t,e),t.reload().then((function(){return t}))}function Ql(t,n,r,i,o){if(!jr())return Ae(new C("operation-not-supported-in-this-environment"));if(t.h&&!o)return Ae(t.h);var a=$i(r.providerId),s=qr(t.uid+":::"),u=null;(!Mr()||Er())&&t.s&&r.isOAuthProvider&&(u=Eu(t.s,t.l,t.m,n,r,null,s,e.a.SDK_VERSION||null,null,null,t.tenantId));var c=gr(u,a&&a.ua,a&&a.ta);return i=i().then((function(){if(Xl(t),!o)return t.I().then((function(){}))})).then((function(){return Bc(t.i,c,n,r,s,!!u,t.tenantId)})).then((function(){return new Ee((function(e,r){t.na(n,null,new C("cancelled-popup-request"),t.g||null),t.f=e,t.C=r,t.g=s,t.c=Wc(t.i,t,n,c,s)}))})).then((function(t){return c&&yr(c),t?ti(t):null})).o((function(t){throw c&&yr(c),t})),$l(t,i,o)}function Yl(t,e,n,r,i){if(!jr())return Ae(new C("operation-not-supported-in-this-environment"));if(t.h&&!i)return Ae(t.h);var o=null,a=qr(t.uid+":::");return r=r().then((function(){if(Xl(t),!i)return t.I().then((function(){}))})).then((function(){return t.ga=a,Rl(t)})).then((function(e){return t.ha&&(e=(e=t.ha).b.set(tf,t.w(),e.a)),e})).then((function(){return Hc(t.i,e,n,a,t.tenantId)})).o((function(e){if(o=e,t.ha)return ef(t.ha);throw o})).then((function(){if(o)throw o})),$l(t,r,i)}function Xl(t){if(!t.i||!t.R){if(t.i&&!t.R)throw new C("internal-error");throw new C("auth-domain-config-required")}}function $l(t,e,n){var r=function(t,e,n){return t.h&&!n?(e.cancel(),Ae(t.h)):e.o((function(e){throw!e||"auth/user-disabled"!=e.code&&"auth/user-token-expired"!=e.code||(t.h||t.dispatchEvent(new pl("userInvalidated")),t.h=e),e}))}(t,e,n);return t.J.push(r),r.oa((function(){X(t.J,r)})),r.o((function(e){var n=null;throw e&&"auth/multi-factor-auth-required"===e.code&&(n=cl(e.w(),Nl(t),E(t.jc,t))),n||e}))}function Jl(t){if(!t.apiKey)return null;var e={apiKey:t.apiKey,authDomain:t.authDomain,appName:t.appName,emulatorConfig:t.emulatorConfig},n={};if(!t.stsTokenManager||!t.stsTokenManager.accessToken)return null;n[ns]=t.stsTokenManager.accessToken,n.refreshToken=t.stsTokenManager.refreshToken||null;var r=t.stsTokenManager.expirationTime;r&&(n.expiresIn=(r-Date.now())/1e3);var i=new Ol(e,n,t);return t.providerData&&W(t.providerData,(function(t){t&&Ul(i,ti(t))})),t.redirectEventId&&(i.ga=t.redirectEventId),i}function Zl(t){this.a=t,this.b=oc()}ol.prototype.Rc=function(t){var e=this;return t.sb(this.a.a,this.c).then((function(t){var n=yt(e.f);return delete n[al],delete n[sl],mt(n,t),e.g(n)}))},S(ul,C),ll.prototype.sb=function(t,e,n){return e.type==co?function(t,e,n,r){return n.Ha().then((function(n){return n={idToken:n},"undefined"!==typeof r&&(n.displayName=r),mt(n,{phoneVerificationInfo:Fo(t.a)}),su(e,Ls,n)}))}(this,t,e,n):function(t,e,n){return n.Ha().then((function(n){return mt(n={mfaPendingCredential:n},{phoneVerificationInfo:Fo(t.a)}),su(e,Ms,n)}))}(this,t,e)},S(fl,ll),S(hl,fl),S(pl,Je),(n=dl.prototype).yc=function(t){vl(this,function(t){var e=[];return W(t.mfaInfo||[],(function(t){(t=ri(t))&&e.push(t)})),e}(t.hd))},n.Rb=function(){return this.a.I().then((function(t){return new uo(t,null)}))},n.fc=function(t,e){var n=this,r=this.a.a;return this.Rb().then((function(n){return t.sb(r,n,e)})).then((function(t){return Hl(n.a,t),n.a.reload()}))},n.bd=function(t){var e=this,n="string"===typeof t?t:t.uid,r=this.a.a;return this.a.I().then((function(t){return su(r,au,{idToken:t,mfaEnrollmentId:n})})).then((function(t){var r=K(e.b,(function(t){return t.uid!=n}));return vl(e,r),Hl(e.a,t),e.a.reload().o((function(t){if("auth/user-token-expired"!=t.code)throw t}))}))},n.w=function(){return{multiFactor:{enrolledFactors:G(this.b,(function(t){return t.w()}))}}},yl.prototype.start=function(){this.a=this.c,gl(this,!0)},yl.prototype.stop=function(){this.b&&(this.b.cancel(),this.b=null)},ml.prototype.w=function(){return{apiKey:this.f.c,refreshToken:this.a,accessToken:this.b&&this.b.toString(),expirationTime:this.c}},ml.prototype.getToken=function(t){return t=!!t,this.b&&!this.a?Ae(new C("user-token-expired")):t||!this.b||Date.now()>this.c-3e4?this.a?_l(this,{grant_type:"refresh_token",refresh_token:this.a}):Ne(null):Ne({accessToken:this.b.toString(),refreshToken:this.a})},El.prototype.w=function(){return{lastLoginAt:this.b,createdAt:this.a}},S(Ol,Tn),Ol.prototype.wa=function(t){this.ya=t,ss(this.a,t)},Ol.prototype.la=function(){return this.ya},Ol.prototype.Ga=function(){return Z(this.$)},Ol.prototype.hb=function(){this.u.b&&(this.u.stop(),this.u.start())},Jr(Ol.prototype,"providerId","firebase"),(n=Ol.prototype).reload=function(){var t=this;
2return $l(this,Ml(this).then((function(){return zl(t).then((function(){return Rl(t)})).then(Ll)})))},n.oc=function(t){return this.I(t).then((function(t){return new il(t)}))},n.I=function(t){var e=this;return $l(this,Ml(this).then((function(){return e.b.getToken(t)})).then((function(t){if(!t)throw new C("internal-error");return t.accessToken!=e.za&&(Pl(e,t.accessToken),e.dispatchEvent(new pl("tokenChanged"))),ql(e,"refreshToken",t.refreshToken),t.accessToken})))},n.Kc=function(t){if(!(t=t.users)||!t.length)throw new C("internal-error");Dl(this,{uid:(t=t[0]).localId,displayName:t.displayName,photoURL:t.photoUrl,email:t.email,emailVerified:!!t.emailVerified,phoneNumber:t.phoneNumber,lastLoginAt:t.lastLoginAt,createdAt:t.createdAt,tenantId:t.tenantId});for(var e=function(t){return(t=t.providerUserInfo)&&t.length?G(t,(function(t){return new Tl(t.rawId,t.providerId,t.email,t.displayName,t.photoUrl,t.phoneNumber)})):[]}(t),n=0;n<e.length;n++)Ul(this,e[n]);ql(this,"isAnonymous",!(this.email&&t.passwordHash)&&!(this.providerData&&this.providerData.length)),this.dispatchEvent(new pl("userReloaded",{hd:t}))},n.Lc=function(t){return Xr("firebase.User.prototype.reauthenticateAndRetrieveDataWithCredential is deprecated. Please use firebase.User.prototype.reauthenticateWithCredential instead."),this.tb(t)},n.tb=function(t){var e=this,n=null;return $l(this,t.c(this.a,this.uid).then((function(t){return Hl(e,t),n=Kl(e,t,"reauthenticate"),e.h=null,e.reload()})).then((function(){return n})),!0)},n.Cc=function(t){return Xr("firebase.User.prototype.linkAndRetrieveDataWithCredential is deprecated. Please use firebase.User.prototype.linkWithCredential instead."),this.qb(t)},n.qb=function(t){var e=this,n=null;return $l(this,Wl(this,t.providerId).then((function(){return e.I()})).then((function(n){return t.b(e.a,n)})).then((function(t){return n=Kl(e,t,"link"),Gl(e,t)})).then((function(){return n})))},n.Dc=function(t,e){var n=this;return $l(this,Wl(this,"phone").then((function(){return rl(Nl(n),t,e,E(n.qb,n))})))},n.Mc=function(t,e){var n=this;return $l(this,Ne().then((function(){return rl(Nl(n),t,e,E(n.tb,n))})),!0)},n.Bb=function(t){var e=this;return $l(this,this.I().then((function(n){return e.a.Bb(n,t)})).then((function(t){return Hl(e,t),e.reload()})))},n.ed=function(t){var e=this;return $l(this,this.I().then((function(n){return t.b(e.a,n)})).then((function(t){return Hl(e,t),e.reload()})))},n.Cb=function(t){var e=this;return $l(this,this.I().then((function(n){return e.a.Cb(n,t)})).then((function(t){return Hl(e,t),e.reload()})))},n.Db=function(t){if(void 0===t.displayName&&void 0===t.photoURL)return Ml(this);var e=this;return $l(this,this.I().then((function(n){return e.a.Db(n,{displayName:t.displayName,photoUrl:t.photoURL})})).then((function(t){return Hl(e,t),ql(e,"displayName",t.displayName||null),ql(e,"photoURL",t.photoUrl||null),W(e.providerData,(function(t){"password"===t.providerId&&(Jr(t,"displayName",e.displayName),Jr(t,"photoURL",e.photoURL))})),Rl(e)})).then(Ll))},n.cd=function(t){var e=this;return $l(this,zl(this).then((function(n){return Y(Fl(e),t)?function(t,e,n){return su(t,Rs,{idToken:e,deleteProvider:n})}(e.a,n,[t]).then((function(t){var n={};return W(t.providerUserInfo||[],(function(t){n[t.providerId]=!0})),W(Fl(e),(function(t){n[t]||Vl(e,t)})),n[Uo.PROVIDER_ID]||Jr(e,"phoneNumber",null),Rl(e)})):Rl(e).then((function(){throw new C("no-such-provider")}))})))},n.delete=function(){var t=this;return $l(this,this.I().then((function(e){return su(t.a,Ps,{idToken:e})})).then((function(){t.dispatchEvent(new pl("userDeleted"))}))).then((function(){for(var e=0;e<t.J.length;e++)t.J[e].cancel("app-deleted");Sl(t,null),Il(t,null),kl(t,null),t.J=[],t.D=!0,xl(t),Jr(t,"refreshToken",null),t.i&&Uc(t.i,t)}))},n.Fb=function(t,e){return!!("linkViaPopup"==t&&(this.g||null)==e&&this.f||"reauthViaPopup"==t&&(this.g||null)==e&&this.f||"linkViaRedirect"==t&&(this.ga||null)==e||"reauthViaRedirect"==t&&(this.ga||null)==e)},n.na=function(t,e,n,r){"linkViaPopup"!=t&&"reauthViaPopup"!=t||r!=(this.g||null)||(n&&this.C?this.C(n):e&&!n&&this.f&&this.f(e),this.c&&(this.c.cancel(),this.c=null),delete this.f,delete this.C)},n.Fa=function(t,e){return"linkViaPopup"==t&&e==(this.g||null)?E(this.Kb,this):"reauthViaPopup"==t&&e==(this.g||null)?E(this.Lb,this):"linkViaRedirect"==t&&(this.ga||null)==e?E(this.Kb,this):"reauthViaRedirect"==t&&(this.ga||null)==e?E(this.Lb,this):null},n.Ec=function(t){var e=this;return Ql(this,"linkViaPopup",t,(function(){return Wl(e,t.providerId).then((function(){return Rl(e)}))}),!1)},n.Nc=function(t){return Ql(this,"reauthViaPopup",t,(function(){return Ne()}),!0)},n.Fc=function(t){var e=this;return Yl(this,"linkViaRedirect",t,(function(){return Wl(e,t.providerId)}),!1)},n.Oc=function(t){return Yl(this,"reauthViaRedirect",t,(function(){return Ne()}),!0)},n.Kb=function(t,e,n,r){var i=this;this.c&&(this.c.cancel(),this.c=null);var o=null;
2return $l(this,this.I().then((function(n){return Ss(i.a,{requestUri:t,postBody:r,sessionId:e,idToken:n})})).then((function(t){return o=Kl(i,t,"link"),Gl(i,t)})).then((function(){return o})))},n.Lb=function(t,e,n,r){var i=this;this.c&&(this.c.cancel(),this.c=null);var o=null;return $l(this,Ne().then((function(){return ho(Is(i.a,{requestUri:t,sessionId:e,postBody:r,tenantId:n}),i.uid)})).then((function(t){return o=Kl(i,t,"reauthenticate"),Hl(i,t),i.h=null,i.reload()})).then((function(){return o})),!0)},n.ub=function(t){var e=this,n=null;return $l(this,this.I().then((function(e){return n=e,"undefined"===typeof t||vt(t)?{}:Bi(new Pi(t))})).then((function(t){return e.a.ub(n,t)})).then((function(t){if(e.email!=t)return e.reload()})).then((function(){})))},n.Eb=function(t,e){var n=this,r=null;return $l(this,this.I().then((function(t){return r=t,"undefined"===typeof e||vt(e)?{}:Bi(new Pi(e))})).then((function(e){return n.a.Eb(r,t,e)})).then((function(t){if(n.email!=t)return n.reload()})).then((function(){})))},n.jc=function(t){var e=null,n=this;return $l(this,t=ho(Ne(t),n.uid).then((function(t){return e=Kl(n,t,"reauthenticate"),Hl(n,t),n.h=null,n.reload()})).then((function(){return e})),!0)},n.toJSON=function(){return this.w()},n.w=function(){var t={uid:this.uid,displayName:this.displayName,photoURL:this.photoURL,email:this.email,emailVerified:this.emailVerified,phoneNumber:this.phoneNumber,isAnonymous:this.isAnonymous,tenantId:this.tenantId,providerData:[],apiKey:this.l,appName:this.m,authDomain:this.s,stsTokenManager:this.b.w(),redirectEventId:this.ga||null};return this.metadata&&mt(t,this.metadata.w()),W(this.providerData,(function(e){t.providerData.push(function(t){var e,n={};for(e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}(e))})),mt(t,this.O.w()),t};var tf={name:"redirectUser",F:"session"};function ef(t){return uc(t.b,tf,t.a)}function nf(t){this.a=t,this.b=oc(),this.c=null,this.f=function(t){var e=af("local"),n=af("session"),r=af("none");return function(t,e,n){var r=sc(e,n),i=ac(t,e.F);return t.get(e,n).then((function(o){var a=null;try{a=Vr(u.localStorage.getItem(r))}catch(s){}if(a&&!o)return u.localStorage.removeItem(r),t.set(e,a,n);a&&o&&"localStorage"!=i.type&&u.localStorage.removeItem(r)}))}(t.b,e,t.a).then((function(){return t.b.get(n,t.a)})).then((function(i){return i?n:t.b.get(r,t.a).then((function(n){return n?r:t.b.get(e,t.a).then((function(n){return n?e:t.b.get(of,t.a).then((function(t){return t?af(t):e}))}))}))})).then((function(e){return t.c=e,rf(t,e.F)})).o((function(){t.c||(t.c=e)}))}(this),this.b.addListener(af("local"),this.a,E(this.g,this))}function rf(t,e){var n,r=[];for(n in rc)rc[n]!==e&&r.push(uc(t.b,af(rc[n]),t.a));return r.push(uc(t.b,of,t.a)),function(t){return new Ee((function(e,n){var r=t.length,i=[];if(r)for(var o=function(t,n){r--,i[t]=n,0==r&&e(i)},a=function(t){n(t)},s=0;s<t.length;s++)xe(t[s],T(o,s),a);else e(i)}))}(r)}nf.prototype.g=function(){var t=this,e=af("local");lf(this,(function(){return Ne().then((function(){return t.c&&"local"!=t.c.F?t.b.get(e,t.a):null})).then((function(n){if(n)return rf(t,"local").then((function(){t.c=e}))}))}))};var of={name:"persistence",F:"session"};function af(t){return{name:"authUser",F:t}}function sf(t,e){return lf(t,(function(){return t.b.set(t.c,e.w(),t.a)}))}function uf(t){return lf(t,(function(){return uc(t.b,t.c,t.a)}))}function cf(t,e,n){return lf(t,(function(){return t.b.get(t.c,t.a).then((function(t){return t&&e&&(t.authDomain=e),t&&n&&(t.emulatorConfig=n),Jl(t||{})}))}))}function lf(t,e){return t.f=t.f.then(e,e),t.f}function ff(t){if(this.l=!1,Jr(this,"settings",new el),Jr(this,"app",t),!wf(this).options||!wf(this).options.apiKey)throw new C("invalid-api-key");t=e.a.SDK_VERSION?Ar(e.a.SDK_VERSION):null,this.a=new ts(wf(this).options&&wf(this).options.apiKey,R(N),t),this.R=[],this.s=[],this.O=[],this.hb=e.a.INTERNAL.createSubscribe(E(this.zc,this)),this.X=void 0,this.bc=e.a.INTERNAL.createSubscribe(E(this.Ac,this)),mf(this,null),this.i=new nf(wf(this).options.apiKey+":"+wf(this).name),this.D=new Zl(wf(this).options.apiKey+":"+wf(this).name),this.$=Of(this,function(t){var e=wf(t).options.authDomain,n=function(t){var e=function(t,e){return t.b.get(tf,t.a).then((function(t){return t&&e&&(t.authDomain=e),Jl(t||{})}))}(t.D,wf(t).options.authDomain).then((function(e){return(t.m=e)&&(e.ha=t.D),ef(t.D)}));return Of(t,e)}(t).then((function(){return cf(t.i,e,t.P)})).then((function(e){return e?(e.ha=t.D,t.m&&(t.m.ga||null)==(e.ga||null)?e:e.reload().then((function(){return sf(t.i,e).then((function(){return e}))})).o((function(n){return"auth/network-request-failed"==n.code?e:uf(t.i)}))):null})).then((function(e){mf(t,e||null)}));return Of(t,n)}(this)),this.h=Of(this,function(t){return t.$.then((function(){return yf(t)})).o((function(){})).then((function(){if(!t.l)return t.ja()})).o((function(){})).then((function(){if(!t.l){t.ba=!0;var e=t.i;e.b.addListener(af("local"),e.a,t.ja)}}))}(this)),this.ba=!1,this.ja=E(this.Zc,this),this.Ba=E(this.da,this),this.ya=E(this.mc,this),this.za=E(this.wc,this),this.Aa=E(this.xc,this),this.b=null,function(t){var e=wf(t).options.authDomain,n=wf(t).options.apiKey;e&&jr()&&(t.Oa=t.$.then((function(){if(!t.l){if(t.b=Qc(e,n,wf(t).name,t.P),Fc(t.b,t),_f(t)&&jl(_f(t)),t.m){jl(t.m);var r=t.m;r.wa(t.la()),Sl(r,t),Cl(r=t.m,t.J),kl(r,t),us((r=t.m).a,t.P),Il(r,t),t.m=null}return t.b}})))}(this),this.INTERNAL={},this.INTERNAL.delete=E(this.delete,this),this.INTERNAL.logFramework=E(this.Gc,this),this.u=0,Tn.call(this),function(t){Object.defineProperty(t,"lc",{get:function(){return this.la()},set:function(t){this.wa(t)},enumerable:!1}),t.aa=null,Object.defineProperty(t,"ti",{get:function(){return this.T()},set:function(t){this.yb(t)},enumerable:!1}),t.S=null,Object.defineProperty(t,"emulatorConfig",{get:function(){if(this.P){var t=qn(this.P.url);t=ti({protocol:t.c,host:t.a,port:t.g,options:ti({disableWarnings:this.P.ec})})}else t=null;return t},enumerable:!1})}(this),this.J=[],this.P=null}function hf(t){Je.call(this,"languageCodeChanged"),this.h=t}function pf(t){Je.call(this,"emulatorConfigChanged"),this.c=t}function df(t){Je.call(this,"frameworkChanged"),this.f=t}function vf(t){return t.Oa||Ae(new C("auth-domain-config-required"))}function yf(t){if(!jr())return Ae(new C("operation-not-supported-in-this-environment"));var e=vf(t).then((function(){return t.b.qa()})).then((function(t){return t?ti(t):null}));return Of(t,e)}function gf(t,e){var n={};return n.apiKey=wf(t).options.apiKey,n.authDomain=wf(t).options.authDomain,n.appName=wf(t).name,t.P&&(n.emulatorConfig=t.P),t.$.then((function(){return function(t,e,n,r){var i=new Ol(t,e);return n&&(i.ha=n),r&&Cl(i,r),i.reload().then((function(){return i}))}(n,e,t.D,t.Ga())})).then((function(e){return _f(t)&&e.uid==_f(t).uid?(Bl(_f(t),e),t.da(e)):(mf(t,e),jl(e),t.da(e))})).then((function(){Tf(t)}))}function mf(t,e){_f(t)&&(function(t,e){$(t.S,(function(t){return t==e}))}(_f(t),t.Ba),dn(_f(t),"tokenChanged",t.ya),dn(_f(t),"userDeleted",t.za),dn(_f(t),"userInvalidated",t.Aa),xl(_f(t))),e&&(e.S.push(t.Ba),fn(e,"tokenChanged",t.ya),fn(e,"userDeleted",t.za),fn(e,"userInvalidated",t.Aa),0<t.u&&Al(e)),Jr(t,"currentUser",e),e&&(e.wa(t.la()),Sl(e,t),Cl(e,t.J),kl(e,t),us(e.a,t.P),Il(e,t))}function bf(t,e){var n=null,r=null;return Of(t,e.then((function(e){return n=qo(e),r=Ji(e),gf(t,e)}),(function(e){var n=null;throw e&&"auth/multi-factor-auth-required"===e.code&&(n=cl(e.w(),t,E(t.kc,t))),n||e})).then((function(){return ti({user:_f(t),credential:n,additionalUserInfo:r,operationType:"signIn"})})))}function wf(t){return t.app}function _f(t){return t.currentUser}function Ef(t){return _f(t)&&_f(t)._lat||null}function Tf(t){if(t.ba){for(var e=0;e<t.s.length;e++)t.s[e]&&t.s[e](Ef(t));if(t.X!==t.getUid()&&t.O.length)for(t.X=t.getUid(),e=0;e<t.O.length;e++)t.O[e]&&t.O[e](Ef(t))}}function Of(t,e){return t.R.push(e),e.oa((function(){X(t.R,e)})),e}function Sf(){}function If(){this.a={},this.b=1e12}nf.prototype.xb=function(t){var e=null,n=this;return function(t){var e=new C("invalid-persistence-type"),n=new C("unsupported-persistence-type");t:{for(r in rc)if(rc[r]==t){var r=!0;break t}r=!1}if(!r||"string"!==typeof t)throw e;switch(Or()){case"ReactNative":if("session"===t)throw n;break;case"Node":if("none"!==t)throw n;break;case"Worker":if("session"===t||!Lu()&&"none"!==t)throw n;break;default:if(!Rr()&&"none"!==t)throw n}}(t),lf(this,(function(){return t!=n.c.F?n.b.get(n.c,n.a).then((function(r){return e=r,rf(n,t)})).then((function(){if(n.c=af(t),e)return n.b.set(n.c,e,n.a)})):Ne()}))},S(ff,Tn),S(hf,Je),S(pf,Je),S(df,Je),(n=ff.prototype).xb=function(t){return Of(this,t=this.i.xb(t))},n.wa=function(t){this.aa===t||this.l||(this.aa=t,ss(this.a,this.aa),this.dispatchEvent(new hf(this.la())))},n.la=function(){return this.aa},n.fd=function(){var t=u.navigator;this.wa(t&&(t.languages&&t.languages[0]||t.language||t.userLanguage)||null)},n.gd=function(t,e){if(!this.P){if(!/^https?:\/\//.test(t))throw new C("argument-error","Emulator URL must start with a valid scheme (http:// or https://).");(function(t){"undefined"!==typeof console&&"function"===typeof console.info&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),u.document&&!t&&wr().then((function(){var t=u.document.createElement("div");t.innerText="Running in emulator mode. Do not use with production credentials.",t.style.position="fixed",t.style.width="100%",t.style.backgroundColor="#ffffff",t.style.border=".1em solid #000000",t.style.color="#ff0000",t.style.bottom="0px",t.style.left="0px",t.style.margin="0px",t.style.zIndex=1e4,t.style.textAlign="center",t.classList.add("firebase-emulator-warning"),u.document.body.appendChild(t)}))})(e=!!e&&!!e.disableWarnings),this.P={url:t,ec:e},this.settings.ib=!0,us(this.a,this.P),this.dispatchEvent(new pf(this.P))}},n.Gc=function(t){this.J.push(t),ls(this.a,e.a.SDK_VERSION?Ar(e.a.SDK_VERSION,this.J):null),this.dispatchEvent(new df(this.J))},n.Ga=function(){return Z(this.J)},n.yb=function(t){this.S===t||this.l||(this.S=t,this.a.b=this.S)},n.T=function(){return this.S},n.toJSON=function(){return{apiKey:wf(this).options.apiKey,authDomain:wf(this).options.authDomain,appName:wf(this).name,currentUser:_f(this)&&_f(this).w()}},n.Fb=function(t,e){switch(t){case"unknown":case"signInViaRedirect":return!0;case"signInViaPopup":return this.g==e&&!!this.f;default:return!1}},n.na=function(t,e,n,r){"signInViaPopup"==t&&this.g==r&&(n&&this.C?this.C(n):e&&!n&&this.f&&this.f(e),this.c&&(this.c.cancel(),this.c=null),delete this.f,delete this.C)},n.Fa=function(t,e){return"signInViaRedirect"==t||"signInViaPopup"==t&&this.g==e&&this.f?E(this.ic,this):null},n.ic=function(t,e,n,r){var i=this,o={requestUri:t,postBody:r,sessionId:e,tenantId:n};return this.c&&(this.c.cancel(),this.c=null),i.$.then((function(){return bf(i,Os(i.a,o))}))},n.Xc=function(t){if(!jr())return Ae(new C("operation-not-supported-in-this-environment"));var n=this,r=$i(t.providerId),i=qr(),o=null;(!Mr()||Er())&&wf(this).options.authDomain&&t.isOAuthProvider&&(o=Eu(wf(this).options.authDomain,wf(this).options.apiKey,wf(this).name,"signInViaPopup",t,null,i,e.a.SDK_VERSION||null,null,null,this.T(),this.P));var a=gr(o,r&&r.ua,r&&r.ta);return Of(this,r=vf(this).then((function(e){return Bc(e,a,"signInViaPopup",t,i,!!o,n.T())})).then((function(){return new Ee((function(t,e){n.na("signInViaPopup",null,new C("cancelled-popup-request"),n.g),n.f=t,n.C=e,n.g=i,n.c=Wc(n.b,n,"signInViaPopup",a,i)}))})).then((function(t){return a&&yr(a),t?ti(t):null})).o((function(t){throw a&&yr(a),t})))},n.Yc=function(t){if(!jr())return Ae(new C("operation-not-supported-in-this-environment"));var e=this;return Of(this,vf(this).then((function(){return function(t){return lf(t,(function(){return t.b.set(of,t.c.F,t.a)}))}(e.i)})).then((function(){return Hc(e.b,"signInViaRedirect",t,void 0,e.T())})))},n.qa=function(){var t=this;return yf(this).then((function(e){return t.b&&$c(t.b.b),e})).o((function(e){throw t.b&&$c(t.b.b),e}))},n.dd=function(t){if(!t)return Ae(new C("null-user"));if(this.S!=t.tenantId)return Ae(new C("tenant-id-mismatch"));var e=this,n={};n.apiKey=wf(this).options.apiKey,n.authDomain=wf(this).options.authDomain,n.appName=wf(this).name;var r=function(t,e,n,r){var i=t.b,o={};return o[ns]=i.b&&i.b.toString(),o.refreshToken=i.a,e=new Ol(e||{apiKey:t.l,authDomain:t.s,appName:t.m},o),n&&(e.ha=n),r&&Cl(e,r),Bl(e,t),e}(t,n,e.D,e.Ga());return Of(this,this.h.then((function(){if(wf(e).options.apiKey!=t.l)return r.reload()})).then((function(){return _f(e)&&t.uid==_f(e).uid?(Bl(_f(e),t),e.da(t)):(mf(e,r),jl(r),e.da(r))})).then((function(){Tf(e)})))},n.Ab=function(){var t=this;return Of(this,this.h.then((function(){return t.b&&$c(t.b.b),_f(t)?(mf(t,null),uf(t.i).then((function(){Tf(t)}))):Ne()})))},n.Zc=function(){var t=this;return cf(this.i,wf(this).options.authDomain).then((function(e){if(!t.l){var n;if(n=_f(t)&&e){n=_f(t).uid;var r=e.uid;n=void 0!==n&&null!==n&&""!==n&&void 0!==r&&null!==r&&""!==r&&n==r}if(n)return Bl(_f(t),e),_f(t).I();(_f(t)||e)&&(mf(t,e),e&&(jl(e),e.ha=t.D),t.b&&Fc(t.b,t),Tf(t))}}))},n.da=function(t){return sf(this.i,t)},n.mc=function(){Tf(this),this.da(_f(this))},n.wc=function(){this.Ab()},n.xc=function(){this.Ab()},n.kc=function(t){var e=this;return this.h.then((function(){return bf(e,Ne(t))}))},n.zc=function(t){var e=this;this.addAuthTokenListener((function(){t.next(_f(e))}))},n.Ac=function(t){var e=this;!function(t,e){t.O.push(e),Of(t,t.h.then((function(){!t.l&&Y(t.O,e)&&t.X!==t.getUid()&&(t.X=t.getUid(),e(Ef(t)))})))}(this,(function(){t.next(_f(e))}))},n.Ic=function(t,e,n){var r=this;return this.ba&&Promise.resolve().then((function(){"function"===typeof t?t(_f(r)):"function"===typeof t.next&&t.next(_f(r))})),this.hb(t,e,n)},n.Hc=function(t,e,n){var r=this;return this.ba&&Promise.resolve().then((function(){r.X=r.getUid(),"function"===typeof t?t(_f(r)):"function"===typeof t.next&&t.next(_f(r))})),this.bc(t,e,n)},n.nc=function(t){var e=this;return Of(this,this.h.then((function(){return _f(e)?_f(e).I(t).then((function(t){return{accessToken:t}})):null})))},n.Tc=function(t){var e=this;return this.h.then((function(){return bf(e,su(e.a,eu,{token:t}))})).then((function(t){var n=t.user;return ql(n,"isAnonymous",!1),e.da(n),t}))},n.Uc=function(t,e){var n=this;return this.h.then((function(){return bf(n,su(n.a,nu,{email:t,password:e}))}))},n.dc=function(t,e){var n=this;return this.h.then((function(){return bf(n,su(n.a,As,{email:t,password:e}))}))},n.$a=function(t){var e=this;return this.h.then((function(){return bf(e,t.ka(e.a))}))},n.Sc=function(t){return Xr("firebase.auth.Auth.prototype.signInAndRetrieveDataWithCredential is deprecated. Please use firebase.auth.Auth.prototype.signInWithCredential instead."),this.$a(t)},n.zb=function(){var t=this;return this.h.then((function(){var e=_f(t);if(e&&e.isAnonymous){var n=ti({providerId:null,isNewUser:!1});return ti({user:e,credential:null,additionalUserInfo:n,operationType:"signIn"})}return bf(t,t.a.zb()).then((function(e){var n=e.user;return ql(n,"isAnonymous",!0),t.da(n),e}))}))},n.getUid=function(){return _f(this)&&_f(this).uid||null},n.cc=function(t){this.addAuthTokenListener(t),this.u++,0<this.u&&_f(this)&&Al(_f(this))},n.Pc=function(t){var e=this;W(this.s,(function(n){n==t&&e.u--})),0>this.u&&(this.u=0),0==this.u&&_f(this)&&xl(_f(this)),this.removeAuthTokenListener(t)},n.addAuthTokenListener=function(t){var e=this;this.s.push(t),Of(this,this.h.then((function(){e.l||Y(e.s,t)&&t(Ef(e))})))},n.removeAuthTokenListener=function(t){$(this.s,(function(e){return e==t}))},n.delete=function(){this.l=!0;for(var t=0;t<this.R.length;t++)this.R[t].cancel("app-deleted");return this.R=[],this.i&&(t=this.i).b.removeListener(af("local"),t.a,this.ja),this.b&&(Uc(this.b,this),$c(this.b.b)),Promise.resolve()},n.hc=function(t){return Of(this,function(t,e){return su(t,xs,{identifier:e,continueUri:Dr()?hr():"http://localhost"}).then((function(t){return t.signinMethods||[]}))}(this.a,t))},n.Bc=function(t){return!!Do(t)},n.wb=function(t,e){var n=this;return Of(this,Ne().then((function(){var t=new Pi(e);if(!t.c)throw new C("argument-error",Di+" must be true when sending sign in link to email");return Bi(t)})).then((function(e){return n.a.wb(t,e)})).then((function(){})))},n.jd=function(t){return this.Ra(t).then((function(t){return t.data.email
2}))},n.nb=function(t,e){return Of(this,this.a.nb(t,e).then((function(){})))},n.Ra=function(t){return Of(this,this.a.Ra(t).then((function(t){return new ci(t)})))},n.jb=function(t){return Of(this,this.a.jb(t).then((function(){})))},n.vb=function(t,e){var n=this;return Of(this,Ne().then((function(){return"undefined"===typeof e||vt(e)?{}:Bi(new Pi(e))})).then((function(e){return n.a.vb(t,e)})).then((function(){})))},n.Wc=function(t,e){return Of(this,rl(this,t,e,E(this.$a,this)))},n.Vc=function(t,e){var n=this;return Of(this,Ne().then((function(){var r=e||hr(),i=jo(t,r);if(!(r=Do(r)))throw new C("argument-error","Invalid email link!");if(r.tenantId!==n.T())throw new C("tenant-id-mismatch");return n.$a(i)})))},Sf.prototype.render=function(){},Sf.prototype.reset=function(){},Sf.prototype.getResponse=function(){},Sf.prototype.execute=function(){};var Cf=null;function kf(t,e){return(e=Nf(e))&&t.a[e]||null}function Nf(t){return(t="undefined"===typeof t?1e12:t)?t.toString():null}function Af(t,e){this.g=!1,this.c=e,this.a=this.b=null,this.h="invisible"!==this.c.size,this.f=le(t);var n=this;this.i=function(){n.execute()},this.h?this.execute():fn(this.f,"click",this.i)}function xf(t){if(t.g)throw Error("reCAPTCHA mock was already deleted!")}function Pf(){}function Rf(){}If.prototype.render=function(t,e){return this.a[this.b.toString()]=new Af(t,e),this.b++},If.prototype.reset=function(t){var e=kf(this,t);t=Nf(t),e&&t&&(e.delete(),delete this.a[t])},If.prototype.getResponse=function(t){return(t=kf(this,t))?t.getResponse():null},If.prototype.execute=function(t){(t=kf(this,t))&&t.execute()},Af.prototype.getResponse=function(){return xf(this),this.b},Af.prototype.execute=function(){xf(this);var t=this;this.a||(this.a=setTimeout((function(){t.b=function(){for(var t=50,e=[];0<t;)e.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()))),t--;return e.join("")}();var e=t.c.callback,n=t.c["expired-callback"];if(e)try{e(t.b)}catch(r){}t.a=setTimeout((function(){if(t.a=null,t.b=null,n)try{n()}catch(r){}t.h&&t.execute()}),6e4)}),500))},Af.prototype.delete=function(){xf(this),this.g=!0,clearTimeout(this.a),this.a=null,dn(this.f,"click",this.i)},Jr(Pf,"FACTOR_ID","phone"),Rf.prototype.g=function(){return Cf||(Cf=new If),Ne(Cf)},Rf.prototype.c=function(){};var jf=null;function Df(){this.b=u.grecaptcha?1/0:0,this.f=null,this.a="__rcb"+Math.floor(1e6*Math.random()).toString()}var Lf=new wt(Ot,"https://www.google.com/recaptcha/api.js?onload=%{onload}&render=explicit&hl=%{hl}"),Mf=new Hr(3e4,6e4);Df.prototype.g=function(t){var e=this;return new Ee((function(n,r){var i=setTimeout((function(){r(new C("network-request-failed"))}),Mf.get());!u.grecaptcha||t!==e.f&&!e.b?(u[e.a]=function(){if(u.grecaptcha){e.f=t;var o=u.grecaptcha.render;u.grecaptcha.render=function(t,n){return t=o(t,n),e.b++,t},clearTimeout(i),n(u.grecaptcha)}else clearTimeout(i),r(new C("internal-error"));delete u[e.a]},Ne(Ga(kt(Lf,{onload:e.a,hl:t||""}))).o((function(){clearTimeout(i),r(new C("internal-error","Unable to load external reCAPTCHA dependencies!"))}))):(clearTimeout(i),n(u.grecaptcha))}))},Df.prototype.c=function(){this.b--};var Ff=null;function Uf(t,e,n,r,i,o,a){if(Jr(this,"type","recaptcha"),this.c=this.f=null,this.D=!1,this.v=e,this.g=null,a?(jf||(jf=new Rf),a=jf):(Ff||(Ff=new Df),a=Ff),this.m=a,this.a=n||{theme:"light",type:"image"},this.h=[],this.a[Bf])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[zf],!u.document)throw new C("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment with DOM support.");if(!le(e)||!this.i&&le(e).hasChildNodes())throw new C("argument-error","reCAPTCHA container is either not found or already contains inner elements!");this.s=new ts(t,o||null,i||null),this.u=r||function(){return null};var s=this;this.l=[];var c=this.a[Vf];this.a[Vf]=function(t){if(Hf(s,t),"function"===typeof c)c(t);else if("string"===typeof c){var e=Pr(c,u);"function"===typeof e&&e(t)}};var l=this.a[qf];this.a[qf]=function(){if(Hf(s,null),"function"===typeof l)l();else if("string"===typeof l){var t=Pr(l,u);"function"===typeof t&&t()}}}var Vf="callback",qf="expired-callback",Bf="sitekey",zf="size";function Hf(t,e){for(var n=0;n<t.l.length;n++)try{t.l[n](e)}catch(r){}}function Wf(t,e){return t.h.push(e),e.oa((function(){X(t.h,e)})),e}function Kf(t){if(t.D)throw new C("internal-error","RecaptchaVerifier instance has been destroyed.")}function Gf(t,n,r){var i=!1;try{this.b=r||e.a.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");r=this.b.options.apiKey;var o=this,a=null;try{a=this.b.auth().Ga()}catch(s){}try{i=this.b.auth().settings.appVerificationDisabledForTesting}catch(s){}a=e.a.SDK_VERSION?Ar(e.a.SDK_VERSION,a):null,Uf.call(this,r,t,n,(function(){try{var t=o.b.auth().la()}catch(e){t=null}return t}),a,R(N),i)}function Qf(t,e,n,r){t:{n=Array.prototype.slice.call(n);for(var i=0,o=!1,a=0;a<e.length;a++)if(e[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=e.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=e[i].optional&&void 0===n[i],!e[i].M(n[i])&&!o){if(e=e[i],0>i||i>=Yf.length)throw new C("internal-error","Argument validator received an unsupported number of arguments.");
2n=Yf[i],r=(r?"":n+" argument ")+(e.name?'"'+e.name+'" ':"")+"must be "+e.K+".";break t}r=null}}if(r)throw new C("argument-error",t+" failed: "+r)}(n=Uf.prototype).Ia=function(){var t=this;return this.f?this.f:this.f=Wf(this,Ne().then((function(){if(Dr()&&!Tr())return wr();throw new C("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment.")})).then((function(){return t.m.g(t.u())})).then((function(e){return t.g=e,su(t.s,Hs,{})})).then((function(e){t.a[Bf]=e.recaptchaSiteKey})).o((function(e){throw t.f=null,e})))},n.render=function(){Kf(this);var t=this;return Wf(this,this.Ia().then((function(){if(null===t.c){var e=t.v;if(!t.i){var n=le(e);e=function(t,e,n){var r=arguments,i=document,o=String(r[0]),a=r[1];if(!ce&&a&&(a.name||a.type)){if(o=["<",o],a.name&&o.push(' name="',Wt(a.name),'"'),a.type){o.push(' type="',Wt(a.type),'"');var s={};mt(s,a),delete s.type,a=s}o.push(">"),o=o.join("")}return o=ye(i,o),a&&("string"===typeof a?o.className=a:Array.isArray(a)?o.className=a.join(" "):fe(o,a)),2<r.length&&ve(i,o,r),o}("DIV"),n.appendChild(e)}t.c=t.g.render(e,t.a)}return t.c})))},n.verify=function(){Kf(this);var t=this;return Wf(this,this.render().then((function(e){return new Ee((function(n){var r=t.g.getResponse(e);if(r)n(r);else{t.l.push((function e(r){r&&(function(t,e){$(t.l,(function(t){return t==e}))}(t,e),n(r))})),t.i&&t.g.execute(t.c)}}))})))},n.reset=function(){Kf(this),null!==this.c&&this.g.reset(this.c)},n.clear=function(){Kf(this),this.D=!0,this.m.c();for(var t=0;t<this.h.length;t++)this.h[t].cancel("RecaptchaVerifier instance has been destroyed.");if(!this.i){t=le(this.v);for(var e;e=t.firstChild;)t.removeChild(e)}},S(Gf,Uf);var Yf="First Second Third Fourth Fifth Sixth Seventh Eighth Ninth".split(" ");function Xf(t,e){return{name:t||"",K:"a valid string",optional:!!e,M:function(t){return"string"===typeof t}}}function $f(t,e){return{name:t||"",K:"a boolean",optional:!!e,M:function(t){return"boolean"===typeof t}}}function Jf(t,e){return{name:t||"",K:"a valid object",optional:!!e,M:y}}function Zf(t,e){return{name:t||"",K:"a function",optional:!!e,M:function(t){return"function"===typeof t}}}function th(t,e){return{name:t||"",K:"null",optional:!!e,M:function(t){return null===t}}}function eh(t){return{name:t?t+"Credential":"credential",K:t?"a valid "+t+" credential":"a valid credential",optional:!1,M:function(e){if(!e)return!1;var n=!t||e.providerId===t;return!(!e.ka||!n)}}}function nh(t,e){return y(t)&&"string"===typeof t.type&&t.type===e&&"function"===typeof t.Ha}function rh(t){return y(t)&&"string"===typeof t.uid}function ih(t,e,n,r){return{name:n||"",K:t.K+" or "+e.K,optional:!!r,M:function(n){return t.M(n)||e.M(n)}}}function oh(t,e){for(var n in e){var r=e[n].name;t[r]=uh(r,t[n],e[n].j)}}function ah(t,e){for(var n in e){var r=e[n].name;r!==n&&Object.defineProperty(t,r,{get:T((function(t){return this[t]}),n),set:T((function(t,e,n,r){Qf(t,[n],[r],!0),this[e]=r}),r,n,e[n].kb),enumerable:!0})}}function sh(t,e,n,r){t[e]=uh(e,n,r)}function uh(t,e,n){function r(){var t=Array.prototype.slice.call(arguments);return Qf(o,n,t),e.apply(this,t)}if(!n)return e;var i,o=function(t){return(t=t.split("."))[t.length-1]}(t);for(i in e)r[i]=e[i];for(i in e.prototype)r.prototype[i]=e.prototype[i];return r}oh(ff.prototype,{jb:{name:"applyActionCode",j:[Xf("code")]},Ra:{name:"checkActionCode",j:[Xf("code")]},nb:{name:"confirmPasswordReset",j:[Xf("code"),Xf("newPassword")]},dc:{name:"createUserWithEmailAndPassword",j:[Xf("email"),Xf("password")]},hc:{name:"fetchSignInMethodsForEmail",j:[Xf("email")]},qa:{name:"getRedirectResult",j:[]},Bc:{name:"isSignInWithEmailLink",j:[Xf("emailLink")]},Hc:{name:"onAuthStateChanged",j:[ih(Jf(),Zf(),"nextOrObserver"),Zf("opt_error",!0),Zf("opt_completed",!0)]},Ic:{name:"onIdTokenChanged",j:[ih(Jf(),Zf(),"nextOrObserver"),Zf("opt_error",!0),Zf("opt_completed",!0)]},vb:{name:"sendPasswordResetEmail",j:[Xf("email"),ih(Jf("opt_actionCodeSettings",!0),th(null,!0),"opt_actionCodeSettings",!0)]},wb:{name:"sendSignInLinkToEmail",j:[Xf("email"),Jf("actionCodeSettings")]},xb:{name:"setPersistence",j:[Xf("persistence")]},Sc:{name:"signInAndRetrieveDataWithCredential",j:[eh()]},zb:{name:"signInAnonymously",j:[]},$a:{name:"signInWithCredential",j:[eh()]},Tc:{name:"signInWithCustomToken",j:[Xf("token")]},Uc:{name:"signInWithEmailAndPassword",j:[Xf("email"),Xf("password")]},Vc:{name:"signInWithEmailLink",j:[Xf("email"),Xf("emailLink",!0)]}
2,Wc:{name:"signInWithPhoneNumber",j:[Xf("phoneNumber"),{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(t){return!(!t||"string"!==typeof t.type||"function"!==typeof t.verify)}}]},Xc:{name:"signInWithPopup",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},Yc:{name:"signInWithRedirect",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},dd:{name:"updateCurrentUser",j:[ih({name:"user",K:"an instance of Firebase User",optional:!1,M:function(t){return!!(t&&t instanceof Ol)}},th(),"user")]},Ab:{name:"signOut",j:[]},toJSON:{name:"toJSON",j:[Xf(null,!0)]},fd:{name:"useDeviceLanguage",j:[]},gd:{name:"useEmulator",j:[Xf("url"),Jf("options",!0)]},jd:{name:"verifyPasswordResetCode",j:[Xf("code")]}}),ah(ff.prototype,{lc:{name:"languageCode",kb:ih(Xf(),th(),"languageCode")},ti:{name:"tenantId",kb:ih(Xf(),th(),"tenantId")}}),ff.Persistence=rc,ff.Persistence.LOCAL="local",ff.Persistence.SESSION="session",ff.Persistence.NONE="none",oh(Ol.prototype,{delete:{name:"delete",j:[]},oc:{name:"getIdTokenResult",j:[$f("opt_forceRefresh",!0)]},I:{name:"getIdToken",j:[$f("opt_forceRefresh",!0)]},Cc:{name:"linkAndRetrieveDataWithCredential",j:[eh()]},qb:{name:"linkWithCredential",j:[eh()]},Dc:{name:"linkWithPhoneNumber",j:[Xf("phoneNumber"),{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(t){return!(!t||"string"!==typeof t.type||"function"!==typeof t.verify)}}]},Ec:{name:"linkWithPopup",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},Fc:{name:"linkWithRedirect",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},Lc:{name:"reauthenticateAndRetrieveDataWithCredential",j:[eh()]},tb:{name:"reauthenticateWithCredential",j:[eh()]},Mc:{name:"reauthenticateWithPhoneNumber",j:[Xf("phoneNumber"),{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(t){return!(!t||"string"!==typeof t.type||"function"!==typeof t.verify)}}]},Nc:{name:"reauthenticateWithPopup",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},Oc:{name:"reauthenticateWithRedirect",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},reload:{name:"reload",j:[]},ub:{name:"sendEmailVerification",j:[ih(Jf("opt_actionCodeSettings",!0),th(null,!0),"opt_actionCodeSettings",!0)]},toJSON:{name:"toJSON",j:[Xf(null,!0)]},cd:{name:"unlink",j:[Xf("provider")]},Bb:{name:"updateEmail",j:[Xf("email")]},Cb:{name:"updatePassword",j:[Xf("password")]},ed:{name:"updatePhoneNumber",j:[eh("phone")]},Db:{name:"updateProfile",j:[Jf("profile")]},Eb:{name:"verifyBeforeUpdateEmail",j:[Xf("email"),ih(Jf("opt_actionCodeSettings",!0),th(null,!0),"opt_actionCodeSettings",!0)]}}),oh(If.prototype,{execute:{name:"execute"},render:{name:"render"},reset:{name:"reset"},getResponse:{name:"getResponse"}}),oh(Sf.prototype,{execute:{name:"execute"},render:{name:"render"},reset:{name:"reset"},getResponse:{name:"getResponse"}}),oh(Ee.prototype,{oa:{name:"finally"},o:{name:"catch"},then:{name:"then"}}),ah(el.prototype,{appVerificationDisabled:{name:"appVerificationDisabledForTesting",kb:$f("appVerificationDisabledForTesting")}}),oh(nl.prototype,{confirm:{name:"confirm",j:[Xf("verificationCode")]}}),sh(fo,"fromJSON",(function(t){t="string"===typeof t?JSON.parse(t):t;for(var e,n=[bo,Po,Mo,yo],r=0;r<n.length;r++)if(e=n[r](t))return e;return null}),[ih(Xf(),Jf(),"json")]),sh(Ro,"credential",(function(t,e){return new xo(t,e)}),[Xf("email"),Xf("password")]),oh(xo.prototype,{w:{name:"toJSON",j:[Xf(null,!0)]}}),oh(To.prototype,{Ca:{name:"addScope",j:[Xf("scope")]},Ka:{name:"setCustomParameters",j:[Jf("customOAuthParameters")]}}),sh(To,"credential",Oo,[ih(Xf(),Jf(),"token")]),sh(Ro,"credentialWithLink",jo,[Xf("email"),Xf("emailLink")]),oh(So.prototype,{Ca:{name:"addScope",j:[Xf("scope")]},Ka:{name:"setCustomParameters",j:[Jf("customOAuthParameters")]}}),sh(So,"credential",Io,[ih(Xf(),Jf(),"token")]),oh(Co.prototype,{Ca:{name:"addScope",j:[Xf("scope")]},Ka:{name:"setCustomParameters",j:[Jf("customOAuthParameters")]}}),sh(Co,"credential",ko,[ih(Xf(),ih(Jf(),th()),"idToken"),ih(Xf(),th(),"accessToken",!0)]),oh(No.prototype,{Ka:{name:"setCustomParameters",j:[Jf("customOAuthParameters")]}}),sh(No,"credential",Ao,[ih(Xf(),Jf(),"token"),Xf("secret",!0)]),oh(Eo.prototype,{Ca:{name:"addScope",j:[Xf("scope")]},credential:{name:"credential",j:[ih(Xf(),ih(Jf(),th()),"optionsOrIdToken"),ih(Xf(),th(),"accessToken",!0)]},Ka:{name:"setCustomParameters",j:[Jf("customOAuthParameters")]}}),oh(go.prototype,{w:{name:"toJSON",j:[Xf(null,!0)]}}),oh(po.prototype,{w:{name:"toJSON",j:[Xf(null,!0)]}}),sh(Uo,"credential",Vo,[Xf("verificationId"),Xf("verificationCode")]),oh(Uo.prototype,{fb:{name:"verifyPhoneNumber",j:[ih(Xf(),{name:"phoneInfoOptions",K:"valid phone info o
2ptions",optional:!1,M:function(t){return!!t&&(t.session&&t.phoneNumber?nh(t.session,co)&&"string"===typeof t.phoneNumber:t.session&&t.multiFactorHint?nh(t.session,lo)&&rh(t.multiFactorHint):t.session&&t.multiFactorUid?nh(t.session,lo)&&"string"===typeof t.multiFactorUid:!!t.phoneNumber&&"string"===typeof t.phoneNumber)}},"phoneInfoOptions"),{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(t){return!(!t||"string"!==typeof t.type||"function"!==typeof t.verify)}}]}}),oh(Lo.prototype,{w:{name:"toJSON",j:[Xf(null,!0)]}}),oh(C.prototype,{toJSON:{name:"toJSON",j:[Xf(null,!0)]}}),oh(Yo.prototype,{toJSON:{name:"toJSON",j:[Xf(null,!0)]}}),oh(Qo.prototype,{toJSON:{name:"toJSON",j:[Xf(null,!0)]}}),oh(ul.prototype,{toJSON:{name:"toJSON",j:[Xf(null,!0)]}}),oh(ol.prototype,{Rc:{name:"resolveSignIn",j:[{name:"multiFactorAssertion",K:"a valid multiFactorAssertion",optional:!1,M:function(t){return!!t&&!!t.sb}}]}}),oh(dl.prototype,{Rb:{name:"getSession",j:[]},fc:{name:"enroll",j:[{name:"multiFactorAssertion",K:"a valid multiFactorAssertion",optional:!1,M:function(t){return!!t&&!!t.sb}},Xf("displayName",!0)]},bd:{name:"unenroll",j:[ih({name:"multiFactorInfo",K:"a valid multiFactorInfo",optional:!1,M:rh},Xf(),"multiFactorInfoIdentifier")]}}),oh(Gf.prototype,{clear:{name:"clear",j:[]},render:{name:"render",j:[]},verify:{name:"verify",j:[]}}),sh(Ti,"parseLink",xi,[Xf("link")]),sh(Pf,"assertion",(function(t){return new hl(t)}),[eh("phone")]),function(){if("undefined"===typeof e.a||!e.a.INTERNAL||!e.a.INTERNAL.registerComponent)throw Error("Cannot find the firebase namespace; be sure to include firebase-app.js before this library.");var t={ActionCodeInfo:{Operation:{EMAIL_SIGNIN:fi,PASSWORD_RESET:"PASSWORD_RESET",RECOVER_EMAIL:"RECOVER_EMAIL",REVERT_SECOND_FACTOR_ADDITION:li,VERIFY_AND_CHANGE_EMAIL:hi,VERIFY_EMAIL:"VERIFY_EMAIL"}},Auth:ff,AuthCredential:fo,Error:C};sh(t,"EmailAuthProvider",Ro,[]),sh(t,"FacebookAuthProvider",To,[]),sh(t,"GithubAuthProvider",So,[]),sh(t,"GoogleAuthProvider",Co,[]),sh(t,"TwitterAuthProvider",No,[]),sh(t,"OAuthProvider",Eo,[Xf("providerId")]),sh(t,"SAMLAuthProvider",_o,[Xf("providerId")]),sh(t,"PhoneAuthProvider",Uo,[{name:"auth",K:"an instance of Firebase Auth",optional:!0,M:function(t){return!!(t&&t instanceof ff)}}]),sh(t,"RecaptchaVerifier",Gf,[ih(Xf(),{name:"",K:"an HTML element",optional:!1,M:function(t){return!!(t&&t instanceof Element)}},"recaptchaContainer"),Jf("recaptchaParameters",!0),{name:"app",K:"an instance of Firebase App",optional:!0,M:function(t){return!!(t&&t instanceof e.a.app.App)}}]),sh(t,"ActionCodeURL",Ti,[]),sh(t,"PhoneMultiFactorGenerator",Pf,[]),e.a.INTERNAL.registerComponent({name:"auth",instanceFactory:function(t){return new ff(t=t.getProvider("app").getImmediate())},multipleInstances:!1,serviceProps:t,instantiationMode:"LAZY",type:"PUBLIC"}),e.a.INTERNAL.registerComponent({name:"auth-internal",instanceFactory:function(t){return{getUid:E((t=t.getProvider("auth").getImmediate()).getUid,t),getToken:E(t.nc,t),addAuthTokenListener:E(t.cc,t),removeAuthTokenListener:E(t.Pc,t)}},multipleInstances:!1,instantiationMode:"LAZY",type:"PRIVATE"}),e.a.registerVersion("@firebase/auth","0.16.4"),e.a.INTERNAL.extendNamespace({User:Ol})}()}).apply("undefined"!==typeof t?t:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})}).call(this,n(10))},function(t,e,n){"use strict";(function(t,e){var r=n(4),i=n(0),o=n(1),a=n(5),s=n(6),u=function(){function t(t){this.domStorage_=t,this.prefix_="firebase:"}return t.prototype.set=function(t,e){null==e?this.domStorage_.removeItem(this.prefixedName_(t)):this.domStorage_.setItem(this.prefixedName_(t),Object(o.J)(e))},t.prototype.get=function(t){var e=this.domStorage_.getItem(this.prefixedName_(t));return null==e?null:Object(o.D)(e)},t.prototype.remove=function(t){this.domStorage_.removeItem(this.prefixedName_(t))},t.prototype.prefixedName_=function(t){return this.prefix_+t},t.prototype.toString=function(){return this.domStorage_.toString()},t}(),c=function(){function t(){this.cache_={},this.isInMemoryStorage=!0}return t.prototype.set=function(t,e){null==e?delete this.cache_[t]:this.cache_[t]=e},t.prototype.get=function(t){return Object(o.k)(this.cache_,t)?this.cache_[t]:null},t.prototype.remove=function(t){delete this.cache_[t]},t}(),l=function(t){try{if("undefined"!==typeof window&&"undefined"!==typeof window[t]){var e=window[t];return e.setItem("firebase:sentinel","cache"),e.removeItem("firebase:sentinel"),new u(e)}}catch(n){}return new c},f=l("localStorage"),h=l("sessionStorage"),p=new a.b("@firebase/database"),d=function(){var t=1;return function(){return t++}}(),v=function(t){var e=Object(o.I)(t),n=new o.d;n.update(e);var r=n.digest();return o.h.encodeByteArray(r)},y=function t(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];for(var r="",i=0;i<e.length;i++){var a=e[i];Array.isArray(a)||a&&"object"===typeof a&&"number"===typeof a.length?r+=t.apply(null,a):r+="object"===typeof a?Object(o.J)(a):a,r+=" "}return r},g=null,m=!0,b=function(t,e){Object(o.f)(!e||!0===t||!1===t,"Can't turn on custom loggers persistently."),!0===t?(p.logLevel=a.a.VERBOSE,g=p.log.bind(p),e&&h.set("logging_enabled",!0)):"function"===typeof t?g=t:(g=null,h.remove("logging_enabled"))},w=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(!0===m&&(m=!1,null===g&&!0===h.get("logging_enabled")&&b(!0)),g){var n=y.apply(null,t);g(n)}},_=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];w.apply(void 0,Object(i.f)([t],e))}},E=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="FIREBASE INTERNAL ERROR: "+y.apply(void 0,Object(i.f)(t));p.error(n)},T=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="FIREBASE FATAL ERROR: "+y.apply(void 0,Object(i.f)(t));throw p.error(n),new Error(n)},O=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="FIREBASE WARNING: "+y.apply(void 0,Object(i.f)(t));p.warn(n)},S=function(t){return"number"===typeof t&&(t!==t||t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY)},I="[MIN_NAME]",C="[MAX_NAME]",k=function(t,e){if(t===e)return 0;if(t===I||e===C)return-1;if(e===I||t===C)return 1;var n=F(t),r=F(e);return null!==n?null!==r?n-r===0?t.length-e.length:n-r:-1:null!==r?1:t<e?-1:1},N=function(t,e){return t===e?0:t<e?-1:1},A=function(t,e){if(e&&t in e)return e[t];throw new Error("Missing required key ("+t+") in object: "+Object(o.J)(e))},x=function t(e){if("object"!==typeof e||null===e)return Object(o.J)(e);var n=[];for(var r in e)n.push(r);n.sort();for(var i="{",a=0;a<n.length;
2a++)0!==a&&(i+=","),i+=Object(o.J)(n[a]),i+=":",i+=t(e[n[a]]);return i+="}"},P=function(t,e){var n=t.length;if(n<=e)return[t];for(var r=[],i=0;i<n;i+=e)i+e>n?r.push(t.substring(i,n)):r.push(t.substring(i,i+e));return r};function R(t,e){for(var n in t)t.hasOwnProperty(n)&&e(n,t[n])}var j=function(t){Object(o.f)(!S(t),"Invalid JSON number");var e,n,r,i,a,s=1023;0===t?(n=0,r=0,e=1/t===-1/0?1:0):(e=t<0,(t=Math.abs(t))>=Math.pow(2,-1022)?(n=(i=Math.min(Math.floor(Math.log(t)/Math.LN2),s))+s,r=Math.round(t*Math.pow(2,52-i)-Math.pow(2,52))):(n=0,r=Math.round(t/Math.pow(2,-1074))));var u=[];for(a=52;a;a-=1)u.push(r%2?1:0),r=Math.floor(r/2);for(a=11;a;a-=1)u.push(n%2?1:0),n=Math.floor(n/2);u.push(e?1:0),u.reverse();var c=u.join(""),l="";for(a=0;a<64;a+=8){var f=parseInt(c.substr(a,8),2).toString(16);1===f.length&&(f="0"+f),l+=f}return l.toLowerCase()},D=new RegExp("^-?(0*)\\d{1,10}$"),L=-2147483648,M=2147483647,F=function(t){if(D.test(t)){var e=Number(t);if(e>=L&&e<=M)return e}return null},U=function(t){try{t()}catch(e){setTimeout((function(){var t=e.stack||"";throw O("Exception was thrown by user callback.",t),e}),Math.floor(0))}},V=function(t,e){var n=setTimeout(t,e);return"object"===typeof n&&n.unref&&n.unref(),n},q=function(){function t(t,e){if(void 0===e){this.pieces_=t.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_=t,this.pieceNum_=e}return Object.defineProperty(t,"Empty",{get:function(){return new t("")},enumerable:!1,configurable:!0}),t.prototype.getFront=function(){return this.pieceNum_>=this.pieces_.length?null:this.pieces_[this.pieceNum_]},t.prototype.getLength=function(){return this.pieces_.length-this.pieceNum_},t.prototype.popFront=function(){var e=this.pieceNum_;return e<this.pieces_.length&&e++,new t(this.pieces_,e)},t.prototype.getBack=function(){return this.pieceNum_<this.pieces_.length?this.pieces_[this.pieces_.length-1]:null},t.prototype.toString=function(){for(var t="",e=this.pieceNum_;e<this.pieces_.length;e++)""!==this.pieces_[e]&&(t+="/"+this.pieces_[e]);return t||"/"},t.prototype.toUrlEncodedString=function(){for(var t="",e=this.pieceNum_;e<this.pieces_.length;e++)""!==this.pieces_[e]&&(t+="/"+encodeURIComponent(String(this.pieces_[e])));return t||"/"},t.prototype.slice=function(t){return void 0===t&&(t=0),this.pieces_.slice(this.pieceNum_+t)},t.prototype.parent=function(){if(this.pieceNum_>=this.pieces_.length)return null;for(var e=[],n=this.pieceNum_;n<this.pieces_.length-1;n++)e.push(this.pieces_[n]);return new t(e,0)},t.prototype.child=function(e){for(var n=[],r=this.pieceNum_;r<this.pieces_.length;r++)n.push(this.pieces_[r]);if(e instanceof t)for(r=e.pieceNum_;r<e.pieces_.length;r++)n.push(e.pieces_[r]);else{var i=e.split("/");for(r=0;r<i.length;r++)i[r].length>0&&n.push(i[r])}return new t(n,0)},t.prototype.isEmpty=function(){return this.pieceNum_>=this.pieces_.length},t.relativePath=function(e,n){var r=e.getFront(),i=n.getFront();if(null===r)return n;if(r===i)return t.relativePath(e.popFront(),n.popFront());throw new Error("INTERNAL ERROR: innerPath ("+n+") is not within outerPath ("+e+")")},t.comparePaths=function(t,e){for(var n=t.slice(),r=e.slice(),i=0;i<n.length&&i<r.length;i++){var o=k(n[i],r[i]);if(0!==o)return o}return n.length===r.length?0:n.length<r.length?-1:1},t.prototype.equals=function(t){if(this.getLength()!==t.getLength())return!1;for(var e=this.pieceNum_,n=t.pieceNum_;e<=this.pieces_.length;e++,n++)if(this.pieces_[e]!==t.pieces_[n])return!1;return!0},t.prototype.contains=function(t){var e=this.pieceNum_,n=t.pieceNum_;if(this.getLength()>t.getLength())return!1;for(;e<this.pieces_.length;){if(this.pieces_[e]!==t.pieces_[n])return!1;++e,++n}return!0},t}(),B=function(){function t(t,e){this.errorPrefix_=e,this.parts_=t.slice(),this.byteLength_=Math.max(1,this.parts_.length);for(var n=0;n<this.parts_.length;n++)this.byteLength_+=Object(o.H)(this.parts_[n]);this.checkValid_()}return Object.defineProperty(t,"MAX_PATH_DEPTH",{get:function(){return 32},enumerable:!1,configurable:!0}),Object.defineProperty(t,"MAX_PATH_LENGTH_BYTES",{get:function(){return 768}
2,enumerable:!1,configurable:!0}),t.prototype.push=function(t){this.parts_.length>0&&(this.byteLength_+=1),this.parts_.push(t),this.byteLength_+=Object(o.H)(t),this.checkValid_()},t.prototype.pop=function(){var t=this.parts_.pop();this.byteLength_-=Object(o.H)(t),this.parts_.length>0&&(this.byteLength_-=1)},t.prototype.checkValid_=function(){if(this.byteLength_>t.MAX_PATH_LENGTH_BYTES)throw new Error(this.errorPrefix_+"has a key path longer than "+t.MAX_PATH_LENGTH_BYTES+" bytes ("+this.byteLength_+").");if(this.parts_.length>t.MAX_PATH_DEPTH)throw new Error(this.errorPrefix_+"path specified exceeds the maximum depth that can be written ("+t.MAX_PATH_DEPTH+") or object contains a cycle "+this.toErrorString())},t.prototype.toErrorString=function(){return 0===this.parts_.length?"":"in property '"+this.parts_.join(".")+"'"},t}(),z="5",H=/(console\.firebase|firebase-console-\w+\.corp|firebase\.corp)\.google\.com/,W="websocket",K="long_polling",G=function(){function t(t,e,n,r,i,o,a){void 0===i&&(i=!1),void 0===o&&(o=""),void 0===a&&(a=!1),this.secure=e,this.namespace=n,this.webSocketOnly=r,this.nodeAdmin=i,this.persistenceKey=o,this.includeNamespaceInQueryParams=a,this.host=t.toLowerCase(),this.domain=this.host.substr(this.host.indexOf(".")+1),this.internalHost=f.get("host:"+t)||this.host}return t.prototype.needsQueryParam=function(){return this.host!==this.internalHost||this.isCustomHost()||this.includeNamespaceInQueryParams},t.prototype.isCacheableHost=function(){return"s-"===this.internalHost.substr(0,2)},t.prototype.isDemoHost=function(){return"firebaseio-demo.com"===this.domain},t.prototype.isCustomHost=function(){return"firebaseio.com"!==this.domain&&"firebaseio-demo.com"!==this.domain},t.prototype.updateHost=function(t){t!==this.internalHost&&(this.internalHost=t,this.isCacheableHost()&&f.set("host:"+this.host,this.internalHost))},t.prototype.connectionURL=function(t,e){var n;if(Object(o.f)("string"===typeof t,"typeof type must == string"),Object(o.f)("object"===typeof e,"typeof params must == object"),t===W)n=(this.secure?"wss://":"ws://")+this.internalHost+"/.ws?";else{if(t!==K)throw new Error("Unknown connection type: "+t);n=(this.secure?"https://":"http://")+this.internalHost+"/.lp?"}this.needsQueryParam()&&(e.ns=this.namespace);var r=[];return R(e,(function(t,e){r.push(t+"="+e)})),n+r.join("&")},t.prototype.toString=function(){var t=this.toURLString();return this.persistenceKey&&(t+="<"+this.persistenceKey+">"),t},t.prototype.toURLString=function(){var t=this.secure?"https://":"http://",e=this.includeNamespaceInQueryParams?"?ns="+this.namespace:"";return""+t+this.host+"/"+e},t}();var Q,Y,X=function(t,e){var n=$(t),r=n.namespace;"firebase.com"===n.domain&&T(n.host+" is no longer supported. Please use <YOUR FIREBASE>.firebaseio.com instead"),r&&"undefined"!==r||"localhost"===n.domain||T("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:")&&O("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 G(n.host,n.secure,r,e,i,"",r!==n.subdomain),path:new q(n.pathString)}},$=function(t){var e="",n="",r="",o="",a="",s=!0,u="https",c=443;if("string"===typeof t){var l=t.indexOf("//");l>=0&&(u=t.substring(0,l-1),t=t.substring(l+2));var f=t.indexOf("/");-1===f&&(f=t.length);var h=t.indexOf("?");-1===h&&(h=t.length),e=t.substring(0,Math.min(f,h)),f<h&&(o=function(t){for(var e="",n=t.split("/"),r=0;r<n.length;r++)if(n[r].length>0){var i=n[r];try{i=decodeURIComponent(i.replace(/\+/g," "))}catch(o){}e+="/"+i}return e}(t.substring(f,h)));var p=function(t){var e,n,r={};"?"===t.charAt(0)&&(t=t.substring(1));try{for(var o=Object(i.h)(t.split("&")),a=o.next();!a.done;a=o.next()){var s=a.value;if(0!==s.length){var u=s.split("=");2===u.length?r[decodeURIComponent(u[0])]=decodeURIComponent(u[1]):O("Invalid query segment '"+s+"' in query '"+t+"'")}}}catch(c){e={error:c}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r}(t.substring(Math.min(t.length,h)));(l=e.indexOf(":"))>=0?(s="https"===u||"wss"===u,c=parseInt(e.substring(l+1),10)):l=e.length;var d=e.slice(0,l);if("localhost"===d.toLowerCase())n="localhost";else if(d.split(".").length<=2)n=d;else{var v=e.indexOf(".");r=e.substring(0,v).toLowerCase(),n=e.substring(v+1),a=r}"ns"in p&&(a=p.ns)}return{host:e,port:c,domain:n,subdomain:r,secure:s,scheme:u,pathString:o,namespace:a}},J=/[\[\].#$\/\u0000-\u001F\u007F]/,Z=/[\[\].#$\u0000-\u001F\u007F]/,tt=10485760,et=function(t){return"string"===typeof t&&0!==t.length&&!J.test(t)},nt=function(t){return"string"===typeof t&&0!==t.length&&!Z.test(t)},rt=function(t){return null===t||"string"===typeof t||"number"===typeof t&&!S(t)||t&&"object"===typeof t&&Object(o.k)(t,".sv")},it=function(t,e,n,r,i){i&&void 0===n||ot(Object(o.o)(t,e,i),n,r)},ot=function t(e,n,r){var i=r instanceof q?new B(r,e):r;if(void 0===n)throw new Error(e+"contains undefined "+i.toErrorString());if("function"===typeof n)throw new Error(e+"contains a function "+i.toErrorString()+" with contents = "+n.toString());if(S(n))throw new Error(e+"contains "+n.toString()+" "+i.toErrorString());if("string"===typeof n&&n.length>tt/3&&Object(o.H)(n)>tt)throw new Error(e+"contains a string greater than "+"10485760 utf8 bytes "+i.toErrorString()+" ('"+n.substring(0,50)+"...')");if(n&&"object"===typeof n){var a=!1,s=!1;if(R(n,(function(n,r){if(".value"===n)a=!0;else if(".priority"!==n&&".sv"!==n&&(s=!0,!et(n)))throw new Error(e+" contains an invali
2d key ("+n+") "+i.toErrorString()+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');i.push(n),t(e,r,i),i.pop()})),a&&s)throw new Error(e+' contains ".value" child '+i.toErrorString()+" in addition to actual children.")}},at=function(t,e,n,r,i){if(!i||void 0!==n){var a=Object(o.o)(t,e,i);if(!n||"object"!==typeof n||Array.isArray(n))throw new Error(a+" must be an object containing the children to replace.");var s=[];R(n,(function(t,e){var n=new q(t);if(ot(a,e,r.child(n)),".priority"===n.getBack()&&!rt(e))throw new Error(a+"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(t,e){var n,r;for(n=0;n<e.length;n++)for(var i=(r=e[n]).slice(),o=0;o<i.length;o++)if(".priority"===i[o]&&o===i.length-1);else if(!et(i[o]))throw new Error(t+"contains an invalid key ("+i[o]+") in path "+r.toString()+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');e.sort(q.comparePaths);var a=null;for(n=0;n<e.length;n++){if(r=e[n],null!==a&&a.contains(r))throw new Error(t+"contains a path "+a.toString()+" that is ancestor of another path "+r.toString());a=r}}(a,s)}},st=function(t,e,n,r){if(!r||void 0!==n){if(S(n))throw new Error(Object(o.o)(t,e,r)+"is "+n.toString()+", but must be a valid Firebase priority (a string, finite number, server value, or null).");if(!rt(n))throw new Error(Object(o.o)(t,e,r)+"must be a valid Firebase priority (a string, finite number, server value, or null).")}},ut=function(t,e,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(Object(o.o)(t,e,r)+'must be a valid event type = "value", "child_added", "child_removed", "child_changed", or "child_moved".')}},ct=function(t,e,n,r){if((!r||void 0!==n)&&!et(n))throw new Error(Object(o.o)(t,e,r)+'was an invalid key = "'+n+'". Firebase keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]").')},lt=function(t,e,n,r){if((!r||void 0!==n)&&!nt(n))throw new Error(Object(o.o)(t,e,r)+'was an invalid path = "'+n+'". Paths must be non-empty strings and can\'t contain ".", "#", "$", "[", or "]"')},ft=function(t,e,n,r){n&&(n=n.replace(/^\/*\.info(\/|$)/,"/")),lt(t,e,n,r)},ht=function(t,e){if(".info"===e.getFront())throw new Error(t+" failed = Can't modify data under /.info/")},pt=function(t,e,n){var r=n.path.toString();if("string"!==typeof n.repoInfo.host||0===n.repoInfo.host.length||!et(n.repoInfo.namespace)&&"localhost"!==n.repoInfo.host.split(":")[0]||0!==r.length&&!function(t){return t&&(t=t.replace(/^\/*\.info(\/|$)/,"/")),nt(t)}(r))throw new Error(Object(o.o)(t,e,!1)+'must be a valid firebase URL and the path can\'t contain ".", "#", "$", "[", or "]".')},dt=function(t,e,n,r){if((!r||void 0!==n)&&"boolean"!==typeof n)throw new Error(Object(o.o)(t,e,r)+"must be a boolean.")},vt=function(){function t(t,e){this.repo_=t,this.path_=e}return t.prototype.cancel=function(t){Object(o.K)("OnDisconnect.cancel",0,1,arguments.length),Object(o.L)("OnDisconnect.cancel",1,t,!0);var e=new o.a;return this.repo_.onDisconnectCancel(this.path_,e.wrapCallback(t)),e.promise},t.prototype.remove=function(t){Object(o.K)("OnDisconnect.remove",0,1,arguments.length),ht("OnDisconnect.remove",this.path_),Object(o.L)("OnDisconnect.remove",1,t,!0);var e=new o.a;return this.repo_.onDisconnectSet(this.path_,null,e.wrapCallback(t)),e.promise},t.prototype.set=function(t,e){Object(o.K)("OnDisconnect.set",1,2,arguments.length),ht("OnDisconnect.set",this.path_),it("OnDisconnect.set",1,t,this.path_,!1),Object(o.L)("OnDisconnect.set",2,e,!0);var n=new o.a;return this.repo_.onDisconnectSet(this.path_,t,n.wrapCallback(e)),n.promise},t.prototype.setWithPriority=function(t,e,n){Object(o.K)("OnDisconnect.setWithPriority",2,3,arguments.length),ht("OnDisconnect.setWithPriority",this.path_),it("OnDisconnect.setWithPriority",1,t,this.path_,!1),st("OnDisconnect.setWithPriority",2,e,!1),Object(o.L)("OnDisconnect.setWithPriority",3,n,!0);var r=new o.a;return this.repo_.onDisconnectSetWithPriority(this.path_,t,e,r.wrapCallback(n)),r.promise},t.prototype.update=function(t,e){if(Object(o.K)("OnDisconnect.update",1,2,arguments.length),ht("OnDisconnect.update",this.path_),Array.isArray(t)){for(var n={},r=0;r<t.length;++r)n[""+r]=t[r];t=n,O("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.")}at("OnDisconnect.update",1,t,this.path_,!1),Object(o.L)("OnDisconnect.update",2,e,!0);var i=new o.a;return this.repo_.onDisconnectUpdate(this.path_,t,i.wrapCallback(e)),i.promise},t}(),yt=function(){function t(t,e){this.committed=t,this.snapshot=e}return t.prototype.toJSON=function(){return Object(o.K)("TransactionResult.toJSON",0,1,arguments.length),{committed:this.committed,snapshot:this.snapshot.toJSON()}},t}
2(),gt="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",mt=function(){var t=0,e=[];return function(n){var r,i=n===t;t=n;var a=new Array(8);for(r=7;r>=0;r--)a[r]=gt.charAt(n%64),n=Math.floor(n/64);Object(o.f)(0===n,"Cannot push at time == 0");var s=a.join("");if(i){for(r=11;r>=0&&63===e[r];r--)e[r]=0;e[r]++}else for(r=0;r<12;r++)e[r]=Math.floor(64*Math.random());for(r=0;r<12;r++)s+=gt.charAt(e[r]);return Object(o.f)(20===s.length,"nextPushId: Length should be 20."),s}}(),bt=function(t){if("2147483647"===t)return"-";var e=F(t);if(null!=e)return""+(e+1);for(var n=new Array(t.length),r=0;r<n.length;r++)n[r]=t.charAt(r);if(n.length<786)return n.push("-"),n.join("");for(var i=n.length-1;i>=0&&"z"===n[i];)i--;if(-1===i)return C;var o=n[i],a=gt.charAt(gt.indexOf(o)+1);return n[i]=a,n.slice(0,i+1).join("")},wt=function(t){if("-2147483648"===t)return I;var e=F(t);if(null!=e)return""+(e-1);for(var n=new Array(t.length),r=0;r<n.length;r++)n[r]=t.charAt(r);return"-"===n[n.length-1]?1===n.length?"2147483647":(delete n[n.length-1],n.join("")):(n[n.length-1]=gt.charAt(gt.indexOf(n[n.length-1])-1),n.join("")+"z".repeat(786-n.length))},_t=function(){function t(t,e){this.name=t,this.node=e}return t.Wrap=function(e,n){return new t(e,n)},t}(),Et=function(){function t(){}return t.prototype.getCompare=function(){return this.compare.bind(this)},t.prototype.indexedValueChanged=function(t,e){var n=new _t(I,t),r=new _t(I,e);return 0!==this.compare(n,r)},t.prototype.minPost=function(){return _t.MIN},t}(),Tt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.c)(e,t),Object.defineProperty(e,"__EMPTY_NODE",{get:function(){return Q},set:function(t){Q=t},enumerable:!1,configurable:!0}),e.prototype.compare=function(t,e){return k(t.name,e.name)},e.prototype.isDefinedOn=function(t){throw Object(o.g)("KeyIndex.isDefinedOn not expected to be called.")},e.prototype.indexedValueChanged=function(t,e){return!1},e.prototype.minPost=function(){return _t.MIN},e.prototype.maxPost=function(){return new _t(C,Q)},e.prototype.makePost=function(t,e){return Object(o.f)("string"===typeof t,"KeyIndex indexValue must always be a string."),new _t(t,Q)},e.prototype.toString=function(){return".key"},e}(Et),Ot=new Tt;var St,It,Ct,kt=function(t){return"number"===typeof t?"number:"+j(t):"string:"+t},Nt=function(t){if(t.isLeafNode()){var e=t.val();Object(o.f)("string"===typeof e||"number"===typeof e||"object"===typeof e&&Object(o.k)(e,".sv"),"Priority must be a string or number.")}else Object(o.f)(t===Y||t.isEmpty(),"priority of unexpected type.");Object(o.f)(t===Y||t.getPriority().isEmpty(),"Priority nodes can't have a priority of their own.")},At=function(){function t(e,n){void 0===n&&(n=t.__childrenNodeConstructor.EMPTY_NODE),this.value_=e,this.priorityNode_=n,this.lazyHash_=null,Object(o.f)(void 0!==this.value_&&null!==this.value_,"LeafNode shouldn't be created with null/undefined value."),Nt(this.priorityNode_)}return Object.defineProperty(t,"__childrenNodeConstructor",{get:function(){return St},set:function(t){St=t},enumerable:!1,configurable:!0}),t.prototype.isLeafNode=function(){return!0},t.prototype.getPriority=function(){return this.priorityNode_},t.prototype.updatePriority=function(e){return new t(this.value_,e)},t.prototype.getImmediateChild=function(e){return".priority"===e?this.priorityNode_:t.__childrenNodeConstructor.EMPTY_NODE},t.prototype.getChild=function(e){return e.isEmpty()?this:".priority"===e.getFront()?this.priorityNode_:t.__childrenNodeConstructor.EMPTY_NODE},t.prototype.hasChild=function(){return!1},t.prototype.getPredecessorChildName=function(t,e){return null},t.prototype.updateImmediateChild=function(e,n){return".priority"===e?this.updatePriority(n):n.isEmpty()&&".priority"!==e?this:t.__childrenNodeConstructor.EMPTY_NODE.updateImmediateChild(e,n).updatePriority(this.priorityNode_)},t.prototype.updateChild=function(e,n){var r=e.getFront();return null===r?n:n.isEmpty()&&".priority"!==r?this:(Object(o.f)(".priority"!==r||1===e.getLength(),".priority must be the last token in a path"),this.updateImmediateChild(r,t.__childrenNodeConstructor.EMPTY_NODE.updateChild(e.popFront(),n)))},t.prototype.isEmpty=function(){return!1},t.prototype.numChildren=function(){return 0},t.prototype.forEachChild=function(t,e){return!1}
2,t.prototype.val=function(t){return t&&!this.getPriority().isEmpty()?{".value":this.getValue(),".priority":this.getPriority().val()}:this.getValue()},t.prototype.hash=function(){if(null===this.lazyHash_){var t="";this.priorityNode_.isEmpty()||(t+="priority:"+kt(this.priorityNode_.val())+":");var e=typeof this.value_;t+=e+":",t+="number"===e?j(this.value_):this.value_,this.lazyHash_=v(t)}return this.lazyHash_},t.prototype.getValue=function(){return this.value_},t.prototype.compareTo=function(e){return e===t.__childrenNodeConstructor.EMPTY_NODE?1:e instanceof t.__childrenNodeConstructor?-1:(Object(o.f)(e.isLeafNode(),"Unknown node type"),this.compareToLeafNode_(e))},t.prototype.compareToLeafNode_=function(e){var n=typeof e.value_,r=typeof this.value_,i=t.VALUE_TYPE_ORDER.indexOf(n),a=t.VALUE_TYPE_ORDER.indexOf(r);return Object(o.f)(i>=0,"Unknown leaf type: "+n),Object(o.f)(a>=0,"Unknown leaf type: "+r),i===a?"object"===r?0:this.value_<e.value_?-1:this.value_===e.value_?0:1:a-i},t.prototype.withIndex=function(){return this},t.prototype.isIndexed=function(){return!0},t.prototype.equals=function(t){if(t===this)return!0;if(t.isLeafNode()){var e=t;return this.value_===e.value_&&this.priorityNode_.equals(e.priorityNode_)}return!1},t.VALUE_TYPE_ORDER=["object","boolean","number","string"],t}();var xt,Pt,Rt=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.c)(e,t),e.prototype.compare=function(t,e){var n=t.node.getPriority(),r=e.node.getPriority(),i=n.compareTo(r);return 0===i?k(t.name,e.name):i},e.prototype.isDefinedOn=function(t){return!t.getPriority().isEmpty()},e.prototype.indexedValueChanged=function(t,e){return!t.getPriority().equals(e.getPriority())},e.prototype.minPost=function(){return _t.MIN},e.prototype.maxPost=function(){return new _t(C,new At("[PRIORITY-POST]",Ct))},e.prototype.makePost=function(t,e){var n=It(t);return new _t(e,new At("[PRIORITY-POST]",n))},e.prototype.toString=function(){return".priority"},e}(Et)),jt=function(){function t(t,e,n,r,i){void 0===i&&(i=null),this.isReverse_=r,this.resultGenerator_=i,this.nodeStack_=[];for(var o=1;!t.isEmpty();)if(t=t,o=e?n(t.key,e):1,r&&(o*=-1),o<0)t=this.isReverse_?t.left:t.right;else{if(0===o){this.nodeStack_.push(t);break}this.nodeStack_.push(t),t=this.isReverse_?t.right:t.left}}return t.prototype.getNext=function(){if(0===this.nodeStack_.length)return null;var t,e=this.nodeStack_.pop();if(t=this.resultGenerator_?this.resultGenerator_(e.key,e.value):{key:e.key,value:e.value},this.isReverse_)for(e=e.left;!e.isEmpty();)this.nodeStack_.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack_.push(e),e=e.left;return t},t.prototype.hasNext=function(){return this.nodeStack_.length>0},t.prototype.peek=function(){if(0===this.nodeStack_.length)return null;var t=this.nodeStack_[this.nodeStack_.length-1];return this.resultGenerator_?this.resultGenerator_(t.key,t.value):{key:t.key,value:t.value}},t}(),Dt=function(){function t(e,n,r,i,o){this.key=e,this.value=n,this.color=null!=r?r:t.RED,this.left=null!=i?i:Mt.EMPTY_NODE,this.right=null!=o?o:Mt.EMPTY_NODE}return t.prototype.copy=function(e,n,r,i,o){return new t(null!=e?e:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=i?i:this.left,null!=o?o:this.right)},t.prototype.count=function(){return this.left.count()+1+this.right.count()},t.prototype.isEmpty=function(){return!1},t.prototype.inorderTraversal=function(t){return this.left.inorderTraversal(t)||!!t(this.key,this.value)||this.right.inorderTraversal(t)},t.prototype.reverseTraversal=function(t){return this.right.reverseTraversal(t)||t(this.key,this.value)||this.left.reverseTraversal(t)},t.prototype.min_=function(){return this.left.isEmpty()?this:this.left.min_()},t.prototype.minKey=function(){return this.min_().key},t.prototype.maxKey=function(){return this.right.isEmpty()?this.key:this.right.maxKey()},t.prototype.insert=function(t,e,n){var r=this,i=n(t,r.key);return(r=i<0?r.copy(null,null,null,r.left.insert(t,e,n),null):0===i?r.copy(null,e,null,null,null):r.copy(null,null,null,null,r.right.insert(t,e,n))).fixUp_()},t.prototype.removeMin_=function(){if(this.left.isEmpty())return Mt.EMPTY_NODE;var t=this;return t.left.isRed_()||t.left.left.isRed_()||(t=t.moveRedLeft_()),(t=t.copy(null,null,null,t.left.removeMin_(),null)).fixUp_()},t.prototype.remove=function(t,e){var n,r;if(e(t,(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(t,e),null);else{if(n.left.isRed_()&&(n=n.rotateRight_()),n.right.isEmpty()||n.right.isRed_()||n.right.left.isRed_()||(n=n.moveRedRight_()),0===e(t,n.key)){if(n.right.isEmpty())return Mt.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(t,e))}return n.fixUp_()},t.prototype.isRed_=function(){return this.color},t.prototype.fixUp_=function(){var t=this;return t.right.isRed_()&&!t.left.isRed_()&&(t=t.rotateLeft_()),t.left.isRed_()&&t.left.left.isRed_()&&(t=t.rotateRight_()),t.left.isRed_()&&t.right.isRed_()&&(t=t.colorFlip_()),t},t.prototype.moveRedLeft_=function(){var t=this.colorFlip_();return t.right.left.isRed_()&&(t=(t=(t=t.copy(null,null,null,null,t.right.rotateRight_())).rotateLeft_()).colorFlip_()),t},t.prototype.moveRedRight_=function(){var t=this.colorFlip_();return t.left.left.isRed_()&&(t=(t=t.rotateRight_()).colorFlip_()),t},t.prototype.rotateLeft_=function(){var e=this.copy(null,null,t.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)},t.prototype.rotateRight_=function(){var e=this.copy(null,null,t.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)},t.prototype.colorFlip_=function(){var t=this.left.copy(null,null,!this.left.color,null,null),e=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,e)},t.prototype.checkMaxDepth_=function(){var t=this.check_();return Math.pow(2,t)<=this.count()+1},t.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 t=this.left.check_();if(t!==this.right.check_())throw new Error("Black depths differ");return t+(this.isRed_()?0:1)},t.RED=!0,t.BLACK=!1,t}(),Lt=function(){function t(){}return t.prototype.copy=function(t,e,n,r,i){return this},t.prototype.insert=function(t,e,n){return new Dt(t,e,null)},t.prototype.remove=function(t,e){return this},t.prototype.count=function(){return 0},t.prototype.isEmpty=function(){return!0},t.prototype.inorderTraversal=function(t){return!1},t.prototype.reverseTraversal=function(t){return!1},t.prototype.minKey=function(){return null},t.prototype.maxKey=function(){return null},t.prototype.check_=function(){return 0},t.prototype.isRed_=function(){return!1},t}(),Mt=function(){function t(e,n){void 0===n&&(n=t.EMPTY_NODE),this.comparator_=e,this.root_=n}return t.prototype.insert=function(e,n){return new t(this.comparator_,this.root_.insert(e,n,this.comparator_).copy(null,null,Dt.BLACK,null,null))},t.prototype.remove=function(e){return new t(this.comparator_,this.root_.remove(e,this.comparator_).copy(null,null,Dt.BLACK,null,null))},t.prototype.get=function(t){for(var e,n=this.root_;!n.isEmpty();){if(0===(e=this.comparator_(t,n.key)))return n.value;e<0?n=n.left:e>0&&(n=n.right)}return null},t.prototype.getPredecessorKey=function(t){for(var e,n=this.root_,r=null;!n.isEmpty();){if(0===(e=this.comparator_(t,n.key))){if(n.left.isEmpty())return r?r.key:null;for(n=n.left;!n.right.isEmpty();)n=n.right;return n.key}e<0?n=n.left:e>0&&(r=n,n=n.right)}throw new Error("Attempted to find predecessor key for a nonexistent key. What gives?")},t.prototype.isEmpty=function(){return this.root_.isEmpty()},t.prototype.count=function(){return this.root_.count()},t.prototype.minKey=function(){return this.root_.minKey()},t.prototype.maxKey=function(){return this.root_.maxKey()},t.prototype.inorderTraversal=function(t){return this.root_.inorderTraversal(t)},t.prototype.reverseTraversal=function(t){return this.root_.reverseTraversal(t)},t.prototype.getIterator=function(t){return new jt(this.root_,null,this.comparator_,!1,t)},t.prototype.getIteratorFrom=function(t,e){return new jt(this.root_,t,this.comparator_,!1,e)},t.prototype.getReverseIteratorFrom=function(t,e){return new jt(this.root_,t,this.comparator_,!0,e)},t.prototype.getReverseIterator=function(t){return new jt(this.root_,null,this.comparator_,!0,t)},t.EMPTY_NODE=new Lt,t}(),Ft=Math.log(2),Ut=function(){function t(t){var e;this.count=(e=t+1,parseInt(Math.log(e)/Ft,10)),this.current_=this.count-1;var n,r=(n=this.count,parseInt(Array(n+1).join("1"),2));this.bits_=t+1&r}return t.prototype.nextBitIsOne=function(){var t=!(this.bits_&1<<this.current_);return this.current_--,t},t}(),Vt=function(t,e,n,r){t.sort(e);var i=function e(r,i){var o,a,s=i-r;if(0===s)return null;if(1===s)return o=t[r],a=n?n(o):o,new Dt(a,o.node,Dt.BLACK,null,null);var u=parseInt(s/2,10)+r,c=e(r,u),l=e(u+1,i);return o=t[u],a=n?n(o):o,new Dt(a,o.node,Dt.BLACK,c,l)},o=function(e){for(var r=null,o=null,a=t.length,s=function(e,r){var o=a-e,s=a;a-=e;var c=i(o+1,s),l=t[o],f=n?n(l):l;u(new Dt(f,l.node,r,null,c))},u=function(t){r?(r.left=t,r=t):(o=t,r=t)},c=0;c<e.count;++c){var l=e.nextBitIsOne(),f=Math.pow(2,e.count-(c+1));l?s(f,Dt.BLACK):(s(f,Dt.BLACK),s(f,Dt.RED))}return o}(new Ut(t.length));return new Mt(r||e,o)},qt={},Bt=function(){function t(t,e){this.indexes_=t,this.indexSet_=e}return Object.defineProperty(t,"Default",{get:function(){return Object(o.f)(qt&&Rt,"ChildrenNode.ts has not been loaded"),xt=xt||new t({".priority":qt},{".priority":Rt})},enumerable:!1,configurable:!0}),t.prototype.get=function(t){var e=Object(o.G)(this.indexes_,t);if(!e)throw new Error("No index defined for "+t);return e instanceof Mt?e:null},t.prototype.hasIndex=function(t){return Object(o.k)(this.indexSet_,t.toString())},t.prototype.addIndex=function(e,n){Object(o.f)(e!==Ot,"KeyIndex always exists and isn't meant to be added to the IndexMap.");for(var r,a=[],s=!1,u=n.getIterator(_t.Wrap),c=u.getNext();c;)s=s||e.isDefinedOn(c.node),a.push(c),c=u.getNext();r=s?Vt(a,e.getCompare()):qt;var l=e.toString(),f=Object(i.a)({},this.indexSet_);f[l]=e;var h=Object(i.a)({},this.indexes_);return h[l]=r,new t(h,f)},t.prototype.addToIndexes=function(e,n){var r=this;return new t(Object(o.E)(this.indexes_,(function(t,i){var a=Object(o.G)(r.indexSet_,i);if(Object(o.f)(a,"Missing index implementation for "+i),t===qt){if(a.isDefinedOn(e.node)){for(var s=[],u=n.getIterator(_t.Wrap),c=u.getNext();c;)c.name!==e.name&&s.push(c),c=u.getNext();return s.push(e),Vt(s,a.getCompare())}return qt}var l=n.get(e.name),f=t;return l&&(f=f.remove(new _t(e.name,l))),f.insert(e,e.node)})),this.indexSet_)}
2,t.prototype.removeFromIndexes=function(e,n){return new t(Object(o.E)(this.indexes_,(function(t){if(t===qt)return t;var r=n.get(e.name);return r?t.remove(new _t(e.name,r)):t})),this.indexSet_)},t}();function zt(t,e){return k(t.name,e.name)}function Ht(t,e){return k(t,e)}var Wt=function(){function t(t,e,n){this.children_=t,this.priorityNode_=e,this.indexMap_=n,this.lazyHash_=null,this.priorityNode_&&Nt(this.priorityNode_),this.children_.isEmpty()&&Object(o.f)(!this.priorityNode_||this.priorityNode_.isEmpty(),"An empty node cannot have a priority")}return Object.defineProperty(t,"EMPTY_NODE",{get:function(){return Pt||(Pt=new t(new Mt(Ht),null,Bt.Default))},enumerable:!1,configurable:!0}),t.prototype.isLeafNode=function(){return!1},t.prototype.getPriority=function(){return this.priorityNode_||Pt},t.prototype.updatePriority=function(e){return this.children_.isEmpty()?this:new t(this.children_,e,this.indexMap_)},t.prototype.getImmediateChild=function(t){if(".priority"===t)return this.getPriority();var e=this.children_.get(t);return null===e?Pt:e},t.prototype.getChild=function(t){var e=t.getFront();return null===e?this:this.getImmediateChild(e).getChild(t.popFront())},t.prototype.hasChild=function(t){return null!==this.children_.get(t)},t.prototype.updateImmediateChild=function(e,n){if(Object(o.f)(n,"We should always be passing snapshot nodes"),".priority"===e)return this.updatePriority(n);var r=new _t(e,n),i=void 0,a=void 0;n.isEmpty()?(i=this.children_.remove(e),a=this.indexMap_.removeFromIndexes(r,this.children_)):(i=this.children_.insert(e,n),a=this.indexMap_.addToIndexes(r,this.children_));var s=i.isEmpty()?Pt:this.priorityNode_;return new t(i,s,a)},t.prototype.updateChild=function(t,e){var n=t.getFront();if(null===n)return e;Object(o.f)(".priority"!==t.getFront()||1===t.getLength(),".priority must be the last token in a path");var r=this.getImmediateChild(n).updateChild(t.popFront(),e);return this.updateImmediateChild(n,r)},t.prototype.isEmpty=function(){return this.children_.isEmpty()},t.prototype.numChildren=function(){return this.children_.count()},t.prototype.val=function(e){if(this.isEmpty())return null;var n={},r=0,i=0,o=!0;if(this.forEachChild(Rt,(function(a,s){n[a]=s.val(e),r++,o&&t.INTEGER_REGEXP_.test(a)?i=Math.max(i,Number(a)):o=!1})),!e&&o&&i<2*r){var a=[];for(var s in n)a[s]=n[s];return a}return e&&!this.getPriority().isEmpty()&&(n[".priority"]=this.getPriority().val()),n},t.prototype.hash=function(){if(null===this.lazyHash_){var t="";this.getPriority().isEmpty()||(t+="priority:"+kt(this.getPriority().val())+":"),this.forEachChild(Rt,(function(e,n){var r=n.hash();""!==r&&(t+=":"+e+":"+r)})),this.lazyHash_=""===t?"":v(t)}return this.lazyHash_},t.prototype.getPredecessorChildName=function(t,e,n){var r=this.resolveIndex_(n);if(r){var i=r.getPredecessorKey(new _t(t,e));return i?i.name:null}return this.children_.getPredecessorKey(t)},t.prototype.getFirstChildName=function(t){var e=this.resolveIndex_(t);if(e){var n=e.minKey();return n&&n.name}return this.children_.minKey()},t.prototype.getFirstChild=function(t){var e=this.getFirstChildName(t);return e?new _t(e,this.children_.get(e)):null},t.prototype.getLastChildName=function(t){var e=this.resolveIndex_(t);if(e){var n=e.maxKey();return n&&n.name}return this.children_.maxKey()},t.prototype.getLastChild=function(t){var e=this.getLastChildName(t);return e?new _t(e,this.children_.get(e)):null},t.prototype.forEachChild=function(t,e){var n=this.resolveIndex_(t);return n?n.inorderTraversal((function(t){return e(t.name,t.node)})):this.children_.inorderTraversal(e)},t.prototype.getIterator=function(t){return this.getIteratorFrom(t.minPost(),t)},t.prototype.getIteratorFrom=function(t,e){var n=this.resolveIndex_(e);if(n)return n.getIteratorFrom(t,(function(t){return t}));for(var r=this.children_.getIteratorFrom(t.name,_t.Wrap),i=r.peek();null!=i&&e.compare(i,t)<0;)r.getNext(),i=r.peek();return r},t.prototype.getReverseIterator=function(t){return this.getReverseIteratorFrom(t.maxPost(),t)},t.prototype.getReverseIteratorFrom=function(t,e){var n=this.resolveIndex_(e);if(n)return n.getReverseIteratorFrom(t,(function(t){return t}));for(var r=this.children_.getReverseIteratorFrom(t.name,_t.Wrap),i=r.peek();null!=i&&e.compare(i,t)>0;)r.getNext(),i=r.peek();return r},t.prototype.compareTo=function(t){return this.isEmpty()?t.isEmpty()?0:-1:t.isLeafNode()||t.isEmpty()?1:t===Kt?-1:0},t.prototype.withIndex=function(e){if(e===Ot||this.indexMap_.hasIndex(e))return this;var n=this.indexMap_.addIndex(e,this.children_);return new t(this.children_,this.priorityNode_,n)},t.prototype.isIndexed=function(t){return t===Ot||this.indexMap_.hasIndex(t)},t.prototype.equals=function(t){if(t===this)return!0;
2if(t.isLeafNode())return!1;var e=t;if(this.getPriority().equals(e.getPriority())){if(this.children_.count()===e.children_.count()){for(var n=this.getIterator(Rt),r=e.getIterator(Rt),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},t.prototype.resolveIndex_=function(t){return t===Ot?null:this.indexMap_.get(t.toString())},t.INTEGER_REGEXP_=/^(0|[1-9]\d*)$/,t}(),Kt=new(function(t){function e(){return t.call(this,new Mt(Ht),Wt.EMPTY_NODE,Bt.Default)||this}return Object(i.c)(e,t),e.prototype.compareTo=function(t){return t===this?0:1},e.prototype.equals=function(t){return t===this},e.prototype.getPriority=function(){return this},e.prototype.getImmediateChild=function(t){return Wt.EMPTY_NODE},e.prototype.isEmpty=function(){return!1},e}(Wt));Object.defineProperties(_t,{MIN:{value:new _t(I,Wt.EMPTY_NODE)},MAX:{value:new _t(C,Kt)}}),Tt.__EMPTY_NODE=Wt.EMPTY_NODE,At.__childrenNodeConstructor=Wt,Y=Kt,function(t){Ct=t}(Kt);function Gt(t,e){if(void 0===e&&(e=null),null===t)return Wt.EMPTY_NODE;if("object"===typeof t&&".priority"in t&&(e=t[".priority"]),Object(o.f)(null===e||"string"===typeof e||"number"===typeof e||"object"===typeof e&&".sv"in e,"Invalid priority type found: "+typeof e),"object"===typeof t&&".value"in t&&null!==t[".value"]&&(t=t[".value"]),"object"!==typeof t||".sv"in t)return new At(t,Gt(e));if(t instanceof Array){var n=Wt.EMPTY_NODE;return R(t,(function(e,r){if(Object(o.k)(t,e)&&"."!==e.substring(0,1)){var i=Gt(r);!i.isLeafNode()&&i.isEmpty()||(n=n.updateImmediateChild(e,i))}})),n.updatePriority(Gt(e))}var r=[],i=!1;if(R(t,(function(t,e){if("."!==t.substring(0,1)){var n=Gt(e);n.isEmpty()||(i=i||!n.getPriority().isEmpty(),r.push(new _t(t,n)))}})),0===r.length)return Wt.EMPTY_NODE;var a=Vt(r,zt,(function(t){return t.name}),Ht);if(i){var s=Vt(r,Rt.getCompare());return new Wt(a,Gt(e),new Bt({".priority":s},{".priority":Rt}))}return new Wt(a,Gt(e),Bt.Default)}!function(t){It=t}(Gt);var Qt,Yt=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.c)(e,t),e.prototype.compare=function(t,e){var n=t.node.compareTo(e.node);return 0===n?k(t.name,e.name):n},e.prototype.isDefinedOn=function(t){return!0},e.prototype.indexedValueChanged=function(t,e){return!t.equals(e)},e.prototype.minPost=function(){return _t.MIN},e.prototype.maxPost=function(){return _t.MAX},e.prototype.makePost=function(t,e){var n=Gt(t);return new _t(e,n)},e.prototype.toString=function(){return".value"},e}(Et)),Xt=function(t){function e(e){var n=t.call(this)||this;return n.indexPath_=e,Object(o.f)(!e.isEmpty()&&".priority"!==e.getFront(),"Can't create PathIndex with empty path or .priority key"),n}return Object(i.c)(e,t),e.prototype.extractChild=function(t){return t.getChild(this.indexPath_)},e.prototype.isDefinedOn=function(t){return!t.getChild(this.indexPath_).isEmpty()},e.prototype.compare=function(t,e){var n=this.extractChild(t.node),r=this.extractChild(e.node),i=n.compareTo(r);return 0===i?k(t.name,e.name):i},e.prototype.makePost=function(t,e){var n=Gt(t),r=Wt.EMPTY_NODE.updateChild(this.indexPath_,n);return new _t(e,r)},e.prototype.maxPost=function(){var t=Wt.EMPTY_NODE.updateChild(this.indexPath_,Kt);return new _t(C,t)},e.prototype.toString=function(){return this.indexPath_.slice().join("/")},e}(Et),$t=function(){function t(t,e,n){this.node_=t,this.ref_=e,this.index_=n}return t.prototype.val=function(){return Object(o.K)("DataSnapshot.val",0,0,arguments.length),this.node_.val()},t.prototype.exportVal=function(){return Object(o.K)("DataSnapshot.exportVal",0,0,arguments.length),this.node_.val(!0)},t.prototype.toJSON=function(){return Object(o.K)("DataSnapshot.toJSON",0,1,arguments.length),this.exportVal()},t.prototype.exists=function(){return Object(o.K)("DataSnapshot.exists",0,0,arguments.length),!this.node_.isEmpty()},t.prototype.child=function(e){Object(o.K)("DataSnapshot.child",0,1,arguments.length),e=String(e),lt("DataSnapshot.child",1,e,!1);var n=new q(e),r=this.ref_.child(n);return new t(this.node_.getChild(n),r,Rt)},t.prototype.hasChild=function(t){Object(o.K)("DataSnapshot.hasChild",1,1,arguments.length),lt("DataSnapshot.hasChild",1,t,!1);var e=new q(t);return!this.node_.getChild(e).isEmpty()},t.prototype.getPriority=function(){return Object(o.K)("DataSnapshot.getPriority",0,0,arguments.length),this.node_.getPriority().val()},t.prototype.forEach=function(e){var n=this;if(Object(o.K)("DataSnapshot.forEach",1,1,arguments.length),Object(o.L)("DataSnapshot.forEach",1,e,!1),this.node_.isLeafNode())return!1;var r=this.node_;return!!r.forEachChild(this.index_,(function(r,i){return e(new t(i,n.ref_.child(r),Rt))}))},t.prototype.hasChildren=function(){return Object(o.K)("DataSnapshot.hasChildren",0,0,arguments.length),!this.node_.isLeafNode()&&!this.node_.isEmpty()},Object.defineProperty(t.prototype,"key",{get:function(){return this.ref_.getKey()}
2,enumerable:!1,configurable:!0}),t.prototype.numChildren=function(){return Object(o.K)("DataSnapshot.numChildren",0,0,arguments.length),this.node_.numChildren()},t.prototype.getRef=function(){return Object(o.K)("DataSnapshot.ref",0,0,arguments.length),this.ref_},Object.defineProperty(t.prototype,"ref",{get:function(){return this.getRef()},enumerable:!1,configurable:!0}),t}(),Jt=function(){function t(t,e,n,r){this.eventType=t,this.eventRegistration=e,this.snapshot=n,this.prevName=r}return t.prototype.getPath=function(){var t=this.snapshot.getRef();return"value"===this.eventType?t.path:t.getParent().path},t.prototype.getEventType=function(){return this.eventType},t.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},t.prototype.toString=function(){return this.getPath().toString()+":"+this.eventType+":"+Object(o.J)(this.snapshot.exportVal())},t}(),Zt=function(){function t(t,e,n){this.eventRegistration=t,this.error=e,this.path=n}return t.prototype.getPath=function(){return this.path},t.prototype.getEventType=function(){return"cancel"},t.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},t.prototype.toString=function(){return this.path.toString()+":cancel"},t}(),te=function(){function t(t,e,n){this.callback_=t,this.cancelCallback_=e,this.context_=n}return t.prototype.respondsTo=function(t){return"value"===t},t.prototype.createEvent=function(t,e){var n=e.getQueryParams().getIndex();return new Jt("value",this,new $t(t.snapshotNode,e.getRef(),n))},t.prototype.getEventRunner=function(t){var e=this.context_;if("cancel"===t.getEventType()){Object(o.f)(this.cancelCallback_,"Raising a cancel event on a listener with no cancel callback");var n=this.cancelCallback_;return function(){n.call(e,t.error)}}var r=this.callback_;return function(){r.call(e,t.snapshot)}},t.prototype.createCancelEvent=function(t,e){return this.cancelCallback_?new Zt(this,t,e):null},t.prototype.matches=function(e){return e instanceof t&&(!e.callback_||!this.callback_||e.callback_===this.callback_&&e.context_===this.context_)},t.prototype.hasAnyCallback=function(){return null!==this.callback_},t}(),ee=function(){function t(t,e,n){this.callbacks_=t,this.cancelCallback_=e,this.context_=n}return t.prototype.respondsTo=function(t){var e="children_added"===t?"child_added":t;return e="children_removed"===e?"child_removed":e,Object(o.k)(this.callbacks_,e)},t.prototype.createCancelEvent=function(t,e){return this.cancelCallback_?new Zt(this,t,e):null},t.prototype.createEvent=function(t,e){Object(o.f)(null!=t.childName,"Child events should have a childName.");var n=e.getRef().child(t.childName),r=e.getQueryParams().getIndex();return new Jt(t.type,this,new $t(t.snapshotNode,n,r),t.prevName)},t.prototype.getEventRunner=function(t){var e=this.context_;if("cancel"===t.getEventType()){Object(o.f)(this.cancelCallback_,"Raising a cancel event on a listener with no cancel callback");var n=this.cancelCallback_;return function(){n.call(e,t.error)}}var r=this.callbacks_[t.eventType];return function(){r.call(e,t.snapshot,t.prevName)}},t.prototype.matches=function(e){var n=this;if(e instanceof t){if(!this.callbacks_||!e.callbacks_)return!0;if(this.context_===e.context_){var r=Object.keys(e.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&&(!e.callbacks_[a]||!this.callbacks_[s]||e.callbacks_[a]===this.callbacks_[s])}return i.every((function(t){return e.callbacks_[t]===n.callbacks_[t]}))}}}return!1},t.prototype.hasAnyCallback=function(){return null!==this.callbacks_},t}(),ne=function(){function t(t,e,n,r){this.repo=t,this.path=e,this.queryParams_=n,this.orderByCalled_=r}return Object.defineProperty(t,"__referenceConstructor",{get:function(){return Object(o.f)(Qt,"Reference.ts has not been loaded"),Qt},set:function(t){Qt=t},enumerable:!1,configurable:!0}),t.validateQueryEndpoints_=function(t){var e=null,n=null;if(t.hasStart()&&(e=t.getIndexStartValue()),t.hasEnd()&&(n=t.getIndexEndValue()),t.getIndex()===Ot){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(), startAfter(), endAt(), endBefore(), or equalTo() must be a string.";if(t.hasStart()){if(t.getIndexStartName()!==I)throw new Error(r);if("string"!==typeof e)throw new Error(i)}if(t.hasEnd()){if(t.getIndexEndName()!==C)throw new Error(r);if("string"!==typeof n)throw new Error(i)}}else if(t.getIndex()===Rt){if(null!=e&&!rt(e)||null!=n&&!rt(n))throw new Error("Query: When ordering by priority, the first argument passed to startAt(), startAfter() endAt(), endBefore(), or equalTo() must be a valid priority value (null, a number, or a string).")}else if(Object(o.f)(t.getIndex()instanceof Xt||t.getIndex()===Yt,"unknown index type."),null!=e&&"object"===typeof e||null!=n&&"object"===typeof n)throw new Error("Query: First argument passed to startAt(), startAfter(), endAt(), endBefore(), or equalTo() cannot be an object.")},t.validateLimit_=function(t){if(t.hasStart()&&t.hasEnd()&&t.hasLimit()&&!t.hasAnchoredLimit())throw new Error("Query: Can't combine startAt(), startAfter(), endAt(), endBefore(), and limit(). Use limitToFirst() or limitToLast() instead.")},t.prototype.validateNoPreviousOrderByCall_=function(t){if(!0===this.orderByCalled_)throw new Error(t+": You can't combine multiple orderBy calls.")},t.prototype.getQueryParams=function(){return this.queryParams_},t.prototype.getRef=function(){return Object(o.K)("Query.ref",0,0,arguments.length),new t.__referenceConstructor(this.repo,this.path)},t.prototype.on=function(e,n,r,i){Object(o.K)("Query.on",2,4,arguments.length),ut("Query.on",1,e,!1),Object(o.L)("Query.on",2,n,!1);var a=t.getCancelAndContextArgs_("Query.on",r,i);if("value"===e)this.onValueEvent(n,a.cancel,a.context);else{var s={};s[e]=n,this.onChildEvent(s,a.cancel,a.context)}return n},t.prototype.onValueEvent=function(t,e,n){var r=new te(t,e||null,n||null);this.repo.addEventCallbackForQuery(this,r)},t.prototype.onChildEvent=function(t,e,n){var r=new ee(t,e,n);this.repo.addEventCallbackForQuery(this,r)},t.prototype.off=function(t,e,n){Object(o.K)("Query.off",0,3,arguments.length),ut("Query.off",1,t,!0),Object(o.L)("Query.off",2,e,!0),Object(o.M)("Query.off",3,n,!0);var r=null,i=null;if("value"===t){var a=e||null;r=new te(a,null,n||null)}else t&&(e&&((i={}
2)[t]=e),r=new ee(i,null,n||null));this.repo.removeEventCallbackForQuery(this,r)},t.prototype.get=function(){return this.repo.getValue(this)},t.prototype.once=function(e,n,r,i){var a=this;Object(o.K)("Query.once",1,4,arguments.length),ut("Query.once",1,e,!1),Object(o.L)("Query.once",2,n,!0);var s=t.getCancelAndContextArgs_("Query.once",r,i),u=!0,c=new o.a;c.promise.catch((function(){}));var l=function t(r){u&&(u=!1,a.off(e,t),n&&n.bind(s.context)(r),c.resolve(r))};return this.on(e,l,(function(t){a.off(e,l),s.cancel&&s.cancel.bind(s.context)(t),c.reject(t)})),c.promise},t.prototype.limitToFirst=function(e){if(Object(o.K)("Query.limitToFirst",1,1,arguments.length),"number"!==typeof e||Math.floor(e)!==e||e<=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 t(this.repo,this.path,this.queryParams_.limitToFirst(e),this.orderByCalled_)},t.prototype.limitToLast=function(e){if(Object(o.K)("Query.limitToLast",1,1,arguments.length),"number"!==typeof e||Math.floor(e)!==e||e<=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 t(this.repo,this.path,this.queryParams_.limitToLast(e),this.orderByCalled_)},t.prototype.orderByChild=function(e){if(Object(o.K)("Query.orderByChild",1,1,arguments.length),"$key"===e)throw new Error('Query.orderByChild: "$key" is invalid. Use Query.orderByKey() instead.');if("$priority"===e)throw new Error('Query.orderByChild: "$priority" is invalid. Use Query.orderByPriority() instead.');if("$value"===e)throw new Error('Query.orderByChild: "$value" is invalid. Use Query.orderByValue() instead.');lt("Query.orderByChild",1,e,!1),this.validateNoPreviousOrderByCall_("Query.orderByChild");var n=new q(e);if(n.isEmpty())throw new Error("Query.orderByChild: cannot pass in empty path. Use Query.orderByValue() instead.");var r=new Xt(n),i=this.queryParams_.orderBy(r);return t.validateQueryEndpoints_(i),new t(this.repo,this.path,i,!0)},t.prototype.orderByKey=function(){Object(o.K)("Query.orderByKey",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByKey");var e=this.queryParams_.orderBy(Ot);return t.validateQueryEndpoints_(e),new t(this.repo,this.path,e,!0)},t.prototype.orderByPriority=function(){Object(o.K)("Query.orderByPriority",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByPriority");var e=this.queryParams_.orderBy(Rt);return t.validateQueryEndpoints_(e),new t(this.repo,this.path,e,!0)},t.prototype.orderByValue=function(){Object(o.K)("Query.orderByValue",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByValue");var e=this.queryParams_.orderBy(Yt);return t.validateQueryEndpoints_(e),new t(this.repo,this.path,e,!0)},t.prototype.startAt=function(e,n){void 0===e&&(e=null),Object(o.K)("Query.startAt",0,2,arguments.length),it("Query.startAt",1,e,this.path,!0),ct("Query.startAt",2,n,!0);var r=this.queryParams_.startAt(e,n);if(t.validateLimit_(r),t.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===e&&(e=null,n=null),new t(this.repo,this.path,r,this.orderByCalled_)},t.prototype.startAfter=function(e,n){void 0===e&&(e=null),Object(o.K)("Query.startAfter",0,2,arguments.length),it("Query.startAfter",1,e,this.path,!1),ct("Query.startAfter",2,n,!0);var r=this.queryParams_.startAfter(e,n);if(t.validateLimit_(r),t.validateQueryEndpoints_(r),this.queryParams_.hasStart())throw new Error("Query.startAfter: Starting point was already set (by another call to startAt, startAfter or equalTo).");return new t(this.repo,this.path,r,this.orderByCalled_)},t.prototype.endAt=function(e,n){void 0===e&&(e=null),Object(o.K)("Query.endAt",0,2,arguments.length),it("Query.endAt",1,e,this.path,!0),ct("Query.endAt",2,n,!0);var r=this.queryParams_.endAt(e,n);if(t.validateLimit_(r),t.validateQueryEndpoints_(r),this.queryParams_.hasEnd())throw new Error("Query.endAt: Ending point was already set
2(by another call to endAt, endBefore, or equalTo).");return new t(this.repo,this.path,r,this.orderByCalled_)},t.prototype.endBefore=function(e,n){void 0===e&&(e=null),Object(o.K)("Query.endBefore",0,2,arguments.length),it("Query.endBefore",1,e,this.path,!1),ct("Query.endBefore",2,n,!0);var r=this.queryParams_.endBefore(e,n);if(t.validateLimit_(r),t.validateQueryEndpoints_(r),this.queryParams_.hasEnd())throw new Error("Query.endBefore: Ending point was already set (by another call to endAt, endBefore, or equalTo).");return new t(this.repo,this.path,r,this.orderByCalled_)},t.prototype.equalTo=function(t,e){if(Object(o.K)("Query.equalTo",1,2,arguments.length),it("Query.equalTo",1,t,this.path,!1),ct("Query.equalTo",2,e,!0),this.queryParams_.hasStart())throw new Error("Query.equalTo: Starting point was already set (by another call to startAt/startAfter or equalTo).");if(this.queryParams_.hasEnd())throw new Error("Query.equalTo: Ending point was already set (by another call to endAt/endBefore or equalTo).");return this.startAt(t,e).endAt(t,e)},t.prototype.toString=function(){return Object(o.K)("Query.toString",0,0,arguments.length),this.repo.toString()+this.path.toUrlEncodedString()},t.prototype.toJSON=function(){return Object(o.K)("Query.toJSON",0,1,arguments.length),this.toString()},t.prototype.queryObject=function(){return this.queryParams_.getQueryObject()},t.prototype.queryIdentifier=function(){var t=this.queryObject(),e=x(t);return"{}"===e?"default":e},t.prototype.isEqual=function(e){if(Object(o.K)("Query.isEqual",1,1,arguments.length),!(e instanceof t)){var n="Query.isEqual failed: First argument must be an instance of firebase.database.Query.";throw new Error(n)}
2var r=this.repo===e.repo,i=this.path.equals(e.path),a=this.queryIdentifier()===e.queryIdentifier();return r&&i&&a},t.getCancelAndContextArgs_=function(t,e,n){var r={cancel:null,context:null};if(e&&n)r.cancel=e,Object(o.L)(t,3,r.cancel,!0),r.context=n,Object(o.M)(t,4,r.context,!0);else if(e)if("object"===typeof e&&null!==e)r.context=e;else{if("function"!==typeof e)throw new Error(Object(o.o)(t,3,!0)+" must either be a cancel callback or a context object.");r.cancel=e}return r},Object.defineProperty(t.prototype,"ref",{get:function(){return this.getRef()},enumerable:!1,configurable:!0}),t}(),re=function(){function t(t){this.node_=t}return t.prototype.getImmediateChild=function(e){return new t(this.node_.getImmediateChild(e))},t.prototype.node=function(){return this.node_},t}(),ie=function(){function t(t,e){this.syncTree_=t,this.path_=e}return t.prototype.getImmediateChild=function(e){var n=this.path_.child(e);return new t(this.syncTree_,n)},t.prototype.node=function(){return this.syncTree_.calcCompleteEventCache(this.path_)},t}(),oe=function(t,e,n){return t&&"object"===typeof t?(Object(o.f)(".sv"in t,"Unexpected leaf node or priority contents"),"string"===typeof t[".sv"]?ae(t[".sv"],e,n):"object"===typeof t[".sv"]?se(t[".sv"],e):void Object(o.f)(!1,"Unexpected server value: "+JSON.stringify(t,null,2))):t},ae=function(t,e,n){switch(t){case"timestamp":return n.timestamp;default:Object(o.f)(!1,"Unexpected server value: "+t)}},se=function(t,e,n){t.hasOwnProperty("increment")||Object(o.f)(!1,"Unexpected server value: "+JSON.stringify(t,null,2));var r=t.increment;"number"!==typeof r&&Object(o.f)(!1,"Unexpected increment value: "+r);var i=e.node();if(Object(o.f)(null!==i&&"undefined"!==typeof i,"Expected ChildrenNode.EMPTY_NODE for nulls"),!i.isLeafNode())return r;var a=i.getValue();return"number"!==typeof a?r:a+r},ue=function(t,e,n,r){return le(e,new ie(n,t),r)},ce=function(t,e,n){return le(t,new re(e),n)};function le(t,e,n){var r,i=t.getPriority().val(),o=oe(i,e.getImmediateChild(".priority"),n);if(t.isLeafNode()){var a=t,s=oe(a.getValue(),e,n);return s!==a.getValue()||o!==a.getPriority().val()?new At(s,Gt(o)):t}var u=t;return r=u,o!==u.getPriority().val()&&(r=r.updatePriority(new At(o))),u.forEachChild(Rt,(function(t,i){var o=le(i,e.getImmediateChild(t),n);o!==i&&(r=r.updateImmediateChild(t,o))})),r}var fe,he=function(){function t(){this.value=null,this.children=new Map}return t.prototype.find=function(t){if(null!=this.value)return this.value.getChild(t);if(!t.isEmpty()&&this.children.size>0){var e=t.getFront();return t=t.popFront(),this.children.has(e)?this.children.get(e).find(t):null}return null},t.prototype.remember=function(e,n){if(e.isEmpty())this.value=n,this.children.clear();else if(null!==this.value)this.value=this.value.updateChild(e,n);else{var r=e.getFront();this.children.has(r)||this.children.set(r,new t);var i=this.children.get(r);e=e.popFront(),i.remember(e,n)}},t.prototype.forget=function(t){if(t.isEmpty())return this.value=null,this.children.clear(),!0;if(null!==this.value){if(this.value.isLeafNode())return!1;var e=this.value;this.value=null;var n=this;return e.forEachChild(Rt,(function(t,e){n.remember(new q(t),e)})),this.forget(t)}if(this.children.size>0){var r=t.getFront();if(t=t.popFront(),this.children.has(r))this.children.get(r).forget(t)&&this.children.delete(r);return 0===this.children.size}return!0},t.prototype.forEachTree=function(t,e){null!==this.value?e(t,this.value):this.forEachChild((function(n,r){var i=new q(t.toString()+"/"+n);r.forEachTree(i,e)}))},t.prototype.forEachChild=function(t){this.children.forEach((function(e,n){t(n,e)}))},t}();!function(t){t[t.OVERWRITE=0]="OVERWRITE",t[t.MERGE=1]="MERGE",t[t.ACK_USER_WRITE=2]="ACK_USER_WRITE",t[t.LISTEN_COMPLETE=3]="LISTEN_COMPLETE"}(fe||(fe={}));var pe,de=function(){function t(t,e,n,r){this.fromUser=t,this.fromServer=e,this.queryId=n,this.tagged=r,Object(o.f)(!r||e,"Tagged queries must be from server.")}return t.user=function(){return new t(!0,!1,null,!1)},t.server=function(){return new t(!1,!0,null,!1)},t.forServerTaggedQuery=function(e){return new t(!1,!0,e,!0)},t}(),ve=function(){function t(t,e,n){this.path=t,this.affectedTree=e,this.revert=n,this.type=fe.ACK_USER_WRITE,this.source=de.user()}return t.prototype.operationForChild=function(e){if(this.path.isEmpty()){if(null!=this.affectedTree.value)return Object(o.f)(this.affectedTree.children.isEmpty(),"affectedTree should not have overlapping affected paths."),this;var n=this.affectedTree.subtree(new q(e));return new t(q.Empty,n,this.revert)}return Object(o.f)(this.path.getFront()===e,"operationForChild called for unrelated child."),new t(this.path.popFront(),this.affectedTree,this.revert)},t}(),ye=function(){function t(t,e){void 0===e&&(pe||(pe=new Mt(N)),e=pe),this.value=t,this.children=e}return t.fromObject=function(e){var n=new t(null);return R(e,(function(t,e){n=n.set(new q(t),e)})),n},t.prototype.isEmpty=function(){return null===this.value&&this.children.isEmpty()},t.prototype.findRootMostMatchingPathAndValue=function(t,e){if(null!=this.value&&e(this.value))return{path:q.Empty,value:this.value};if(t.isEmpty())return null;var n=t.getFront(),r=this.children.get(n);if(null!==r){var i=r.findRootMostMatchingPathAndValue(t.popFront(),e);return null!=i?{path:new q(n).child(i.path),value:i.value}:null}return null},t.prototype.findRootMostValueAndPath=function(t){return this.findRootMostMatchingPathAndValue(t,(function(){return!0}))},t.prototype.subtree=function(e){if(e.isEmpty())return this;var n=e.getFront(),r=this.children.get(n);return null!==r?r.subtree(e.popFront()):new t(null)},t.prototype.set=function(e,n){if(e.isEmpty())return new t(n,this.children);var r=e.getFront(),i=(this.children.get(r)||new t(null)).set(e.popFront(),n),o=this.children.insert(r,i);return new t(this.value,o)},t.prototype.remove=function(e){if(e.isEmpty())return this.children.isEmpty()?new t(null):new t(null,this.children);var n=e.getFront(),r=this.children.get(n);if(r){var i=r.remove(e.popFront()),o=void 0;return o=i.isEmpty()?this.children.remove(n):this.children.insert(n,i),null===this.value&&o.isEmpty()?new t(null):new t(this.value,o)}return this},t.prototype.get=function(t){if(t.isEmpty())return this.value;var e=t.getFront(),n=this.children.get(e);return n?n.get(t.popFront()):null},t.prototype.setTree=function(e,n){if(e.isEmpty())return n;var r=e.getFront(),i=(this.children.get(r)||new t(null)).setTree(e.popFront(),n),o=void 0;return o=i.isEmpty()?this.children.remove(r):this.children.insert(r,i),new t(this.value,o)},t.prototype.fold=function(t){return this.fold_(q.Empty,t)}
2,t.prototype.fold_=function(t,e){var n={};return this.children.inorderTraversal((function(r,i){n[r]=i.fold_(t.child(r),e)})),e(t,this.value,n)},t.prototype.findOnPath=function(t,e){return this.findOnPath_(t,q.Empty,e)},t.prototype.findOnPath_=function(t,e,n){var r=!!this.value&&n(e,this.value);if(r)return r;if(t.isEmpty())return null;var i=t.getFront(),o=this.children.get(i);return o?o.findOnPath_(t.popFront(),e.child(i),n):null},t.prototype.foreachOnPath=function(t,e){return this.foreachOnPath_(t,q.Empty,e)},t.prototype.foreachOnPath_=function(e,n,r){if(e.isEmpty())return this;this.value&&r(n,this.value);var i=e.getFront(),o=this.children.get(i);return o?o.foreachOnPath_(e.popFront(),n.child(i),r):new t(null)},t.prototype.foreach=function(t){this.foreach_(q.Empty,t)},t.prototype.foreach_=function(t,e){this.children.inorderTraversal((function(n,r){r.foreach_(t.child(n),e)})),this.value&&e(t,this.value)},t.prototype.foreachChild=function(t){this.children.inorderTraversal((function(e,n){n.value&&t(e,n.value)}))},t}(),ge=function(){function t(t,e){this.source=t,this.path=e,this.type=fe.LISTEN_COMPLETE}return t.prototype.operationForChild=function(e){return this.path.isEmpty()?new t(this.source,q.Empty):new t(this.source,this.path.popFront())},t}(),me=function(){function t(t,e,n){this.source=t,this.path=e,this.snap=n,this.type=fe.OVERWRITE}return t.prototype.operationForChild=function(e){return this.path.isEmpty()?new t(this.source,q.Empty,this.snap.getImmediateChild(e)):new t(this.source,this.path.popFront(),this.snap)},t}(),be=function(){function t(t,e,n){this.source=t,this.path=e,this.children=n,this.type=fe.MERGE}return t.prototype.operationForChild=function(e){if(this.path.isEmpty()){var n=this.children.subtree(new q(e));return n.isEmpty()?null:n.value?new me(this.source,q.Empty,n.value):new t(this.source,q.Empty,n)}return Object(o.f)(this.path.getFront()===e,"Can't get a merge for a child not on the path of the operation"),new t(this.source,this.path.popFront(),this.children)},t.prototype.toString=function(){return"Operation("+this.path+": "+this.source.toString()+" merge: "+this.children.toString()+")"},t}(),we=function(){function t(t,e,n){this.node_=t,this.fullyInitialized_=e,this.filtered_=n}return t.prototype.isFullyInitialized=function(){return this.fullyInitialized_},t.prototype.isFiltered=function(){return this.filtered_},t.prototype.isCompleteForPath=function(t){if(t.isEmpty())return this.isFullyInitialized()&&!this.filtered_;var e=t.getFront();return this.isCompleteForChild(e)},t.prototype.isCompleteForChild=function(t){return this.isFullyInitialized()&&!this.filtered_||this.node_.hasChild(t)},t.prototype.getNode=function(){return this.node_},t}(),_e=function(){function t(t,e){this.eventCache_=t,this.serverCache_=e}return t.prototype.updateEventSnap=function(e,n,r){return new t(new we(e,n,r),this.serverCache_)},t.prototype.updateServerSnap=function(e,n,r){return new t(this.eventCache_,new we(e,n,r))},t.prototype.getEventCache=function(){return this.eventCache_},t.prototype.getCompleteEventSnap=function(){return this.eventCache_.isFullyInitialized()?this.eventCache_.getNode():null},t.prototype.getServerCache=function(){return this.serverCache_},t.prototype.getCompleteServerSnap=function(){return this.serverCache_.isFullyInitialized()?this.serverCache_.getNode():null},t}();function Ee(t){return{type:"value",snapshotNode:t}}function Te(t,e){return{type:"child_added",snapshotNode:e,childName:t}}function Oe(t,e){return{type:"child_removed",snapshotNode:e,childName:t}}function Se(t,e,n){return{type:"child_changed",snapshotNode:e,childName:t,oldSnap:n}}var Ie,Ce=function(){function t(t){this.index_=t}return t.prototype.updateChild=function(t,e,n,r,i,a){Object(o.f)(t.isIndexed(this.index_),"A node must be indexed if only a child is updated");var s=t.getImmediateChild(e);return s.getChild(r).equals(n.getChild(r))&&s.isEmpty()===n.isEmpty()?t:(null!=a&&(n.isEmpty()?t.hasChild(e)?a.trackChildChange(Oe(e,s)):Object(o.f)(t.isLeafNode(),"A child remove without an old child only makes sense on a leaf node"):s.isEmpty()?a.trackChildChange(Te(e,n)):a.trackChildChange(Se(e,n,s))),t.isLeafNode()&&n.isEmpty()?t:t.updateImmediateChild(e,n).withIndex(this.index_))},t.prototype.updateFullNode=function(t,e,n){return null!=n&&(t.isLeafNode()||t.forEachChild(Rt,(function(t,r){e.hasChild(t)||n.trackChildChange(Oe(t,r))})),e.isLeafNode()||e.forEachChild(Rt,(function(e,r){if(t.hasChild(e)){var i=t.getImmediateChild(e);i.equals(r)||n.trackChildChange(Se(e,r,i))}else n.trackChildChange(Te(e,r))}))),e.withIndex(this.index_)},t.prototype.updatePriority=function(t,e){return t.isEmpty()?Wt.EMPTY_NODE:t.updatePriority(e)},t.prototype.filtersNodes=function(){return!1},t.prototype.getIndexedFilter=function(){return this},t.prototype.getIndex=function(){return this.index_},t}(),ke=function(){function t(){this.changeMap=new Map}return t.prototype.trackChildChange=function(t){var e=t.type,n=t.childName;Object(o.f)("child_added"===e||"child_changed"===e||"child_removed"===e,"Only child changes supported for tracking"),Object(o.f)(".priority"!==n,"Only non-priority child changes can be tracked.");var r=this.changeMap.get(n);if(r){var i=r.type;if("child_added"===e&&"child_removed"===i)this.changeMap.set(n,Se(n,t.snapshotNode,r.snapshotNode));else if("child_removed"===e&&"child_added"===i)this.changeMap.delete(n);else if("child_removed"===e&&"child_changed"===i)this.changeMap.set(n,Oe(n,r.oldSnap));else if("child_changed"===e&&"child_added"===i)this.changeMap.set(n,Te(n,t.snapshotNode));else{if("child_changed"!==e||"child_changed"!==i)throw Object(o.g)("Illegal combination of changes: "+t+" occurred after "+r);this.changeMap.set(n,Se(n,t.snapshotNode,r.oldSnap))}}else this.changeMap.set(n,t)},t.prototype.getChanges=function(){return Array.from(this.changeMap.values())},t}(),Ne=new(function(){function t(){}return t.prototype.getCompleteChild=function(t){return null},t.prototype.getChildAfterChild=function(t,e,n){return null},t}()),Ae=function(){function t(t,e,n){void 0===n&&(n=null),this.writes_=t,this.viewCache_=e,this.optCompleteServerCache_=n}return t.prototype.getCompleteChild=function(t){var e=this.viewCache_.getEventCache();if(e.isCompleteForChild(t))return e.getNode().getImmediateChild(t);var n=null!=this.optCompleteServerCache_?new we(this.optCompleteServerCache_,!0,!1):this.viewCache_.getServerCache();return this.writes_.calcCompleteChild(t,n)},t.prototype.getChildAfterChild=function(t,e,n){var r=null!=this.optCompleteServerCache_?this.optCompleteServerCache_:this.viewCache_.getCompleteServerSnap(),i=this.writes_.calcIndexedSlice(r,e,1,n,t);return 0===i.length?null:i[0]},t}(),xe=function(t,e){this.viewCache=t,this.changes=e},Pe=function(){function t(t){this.filter_=t}return t.prototype.assertIndexed=function(t){Object(o.f)(t.getEventCache().getNode().isIndexed(this.filter_.getIndex()),"Event snap not indexed"),Object(o.f)(t.getServerCache().getNode().isIndexed(this.filter_.getIndex()),"Server snap not indexed")},t.prototype.applyOperation=function(e,n,r,i){var a,s,u=new ke;if(n.type===fe.OVERWRITE){var c=n;c.source.fromUser?a=this.applyUserOverwrite_(e,c.path,c.snap,r,i,u):(Object(o.f)(c.source.fromServer,"Unknown source."),s=c.source.tagged||e.getServerCache().isFiltered()&&!c.path.isEmpty(),a=this.applyServerOverwrite_(e,c.path,c.snap,r,i,s,u))}else if(n.type===fe.MERGE){var l=n;l.source.fromUser?a=this.applyUserMerge_(e,l.path,l.children,r,i,u):(Object(o.f)(l.source.fromServer,"Unknown source."),s=l.source.tagged||e.getServerCache().isFiltered(),a=this.applyServerMerge_(e,l.path,l.children,r,i,s,u))}else if(n.type===fe.ACK_USER_WRITE){var f=n;a=f.revert?this.revertUserWrite_(e,f.path,r,i,u):this.ackUserWrite_(e,f.path,f.affectedTree,r,i,u)}else{if(n.type!==fe.LISTEN_COMPLETE)throw Object(o.g)("Unknown operation type: "+n.type);a=this.listenComplete_(e,n.path,r,u)}var h=u.getChanges();return t.maybeAddValueEvent_(e,a,h),new xe(a,h)},t.maybeAddValueEvent_=function(t,e,n){var r=e.getEventCache();if(r.isFullyInitialized()){var i=r.getNode().isLeafNode()||r.getNode().isEmpty(),o=t.getCompleteEventSnap();(n.length>
20||!t.getEventCache().isFullyInitialized()||i&&!r.getNode().equals(o)||!r.getNode().getPriority().equals(o.getPriority()))&&n.push(Ee(e.getCompleteEventSnap()))}},t.prototype.generateEventCacheAfterServerEvent_=function(t,e,n,r,i){var a=t.getEventCache();if(null!=n.shadowingWrite(e))return t;var s=void 0,u=void 0;if(e.isEmpty())if(Object(o.f)(t.getServerCache().isFullyInitialized(),"If change path is empty, we must have complete server data"),t.getServerCache().isFiltered()){var c=t.getCompleteServerSnap(),l=c instanceof Wt?c:Wt.EMPTY_NODE,f=n.calcCompleteEventChildren(l);s=this.filter_.updateFullNode(t.getEventCache().getNode(),f,i)}else{var h=n.calcCompleteEventCache(t.getCompleteServerSnap());s=this.filter_.updateFullNode(t.getEventCache().getNode(),h,i)}else{var p=e.getFront();if(".priority"===p){Object(o.f)(1===e.getLength(),"Can't have a priority with additional path components");var d=a.getNode();u=t.getServerCache().getNode();var v=n.calcEventCacheAfterServerOverwrite(e,d,u);s=null!=v?this.filter_.updatePriority(d,v):a.getNode()}else{var y=e.popFront(),g=void 0;if(a.isCompleteForChild(p)){u=t.getServerCache().getNode();var m=n.calcEventCacheAfterServerOverwrite(e,a.getNode(),u);g=null!=m?a.getNode().getImmediateChild(p).updateChild(y,m):a.getNode().getImmediateChild(p)}else g=n.calcCompleteChild(p,t.getServerCache());s=null!=g?this.filter_.updateChild(a.getNode(),p,g,y,r,i):a.getNode()}}return t.updateEventSnap(s,a.isFullyInitialized()||e.isEmpty(),this.filter_.filtersNodes())},t.prototype.applyServerOverwrite_=function(t,e,n,r,i,o,a){var s,u=t.getServerCache(),c=o?this.filter_:this.filter_.getIndexedFilter();if(e.isEmpty())s=c.updateFullNode(u.getNode(),n,null);else if(c.filtersNodes()&&!u.isFiltered()){var l=u.getNode().updateChild(e,n);s=c.updateFullNode(u.getNode(),l,null)}else{var f=e.getFront();if(!u.isCompleteForPath(e)&&e.getLength()>1)return t;var h=e.popFront(),p=u.getNode().getImmediateChild(f).updateChild(h,n);s=".priority"===f?c.updatePriority(u.getNode(),p):c.updateChild(u.getNode(),f,p,h,Ne,null)}var d=t.updateServerSnap(s,u.isFullyInitialized()||e.isEmpty(),c.filtersNodes()),v=new Ae(r,d,i);return this.generateEventCacheAfterServerEvent_(d,e,r,v,a)},t.prototype.applyUserOverwrite_=function(t,e,n,r,i,o){var a,s,u=t.getEventCache(),c=new Ae(r,t,i);if(e.isEmpty())s=this.filter_.updateFullNode(t.getEventCache().getNode(),n,o),a=t.updateEventSnap(s,!0,this.filter_.filtersNodes());else{var l=e.getFront();if(".priority"===l)s=this.filter_.updatePriority(t.getEventCache().getNode(),n),a=t.updateEventSnap(s,u.isFullyInitialized(),u.isFiltered());else{var f=e.popFront(),h=u.getNode().getImmediateChild(l),p=void 0;if(f.isEmpty())p=n;else{var d=c.getCompleteChild(l);p=null!=d?".priority"===f.getBack()&&d.getChild(f.parent()).isEmpty()?d:d.updateChild(f,n):Wt.EMPTY_NODE}if(h.equals(p))a=t;else{var v=this.filter_.updateChild(u.getNode(),l,p,f,c,o);a=t.updateEventSnap(v,u.isFullyInitialized(),this.filter_.filtersNodes())}}}return a},t.cacheHasChild_=function(t,e){return t.getEventCache().isCompleteForChild(e)},t.prototype.applyUserMerge_=function(e,n,r,i,o,a){var s=this,u=e;return r.foreach((function(r,c){var l=n.child(r);t.cacheHasChild_(e,l.getFront())&&(u=s.applyUserOverwrite_(u,l,c,i,o,a))})),r.foreach((function(r,c){var l=n.child(r);t.cacheHasChild_(e,l.getFront())||(u=s.applyUserOverwrite_(u,l,c,i,o,a))})),u},t.prototype.applyMerge_=function(t,e){return e.foreach((function(e,n){t=t.updateChild(e,n)})),t},t.prototype.applyServerMerge_=function(t,e,n,r,i,o,a){var s=this;if(t.getServerCache().getNode().isEmpty()&&!t.getServerCache().isFullyInitialized())return t;var u,c=t;u=e.isEmpty()?n:new ye(null).setTree(e,n);var l=t.getServerCache().getNode();return u.children.inorderTraversal((function(e,n){if(l.hasChild(e)){var u=t.getServerCache().getNode().getImmediateChild(e),f=s.applyMerge_(u,n);c=s.applyServerOverwrite_(c,new q(e),f,r,i,o,a)}})),u.children.inorderTraversal((function(e,n){var u=!t.getServerCache().isCompleteForChild(e)&&null==n.value;if(!l.hasChild(e)&&!u){var f=t.getServerCache().getNode().getImmediateChild(e),h=s.applyMerge_(f,n);c=s.applyServerOverwrite_(c,new q(e),h,r,i,o,a)}})),c},t.prototype.ackUserWrite_=function(t,e,n,r,i,o){if(null!=r.shadowingWrite(e))return t;var a=t.getServerCache().isFiltered(),s=t.getServerCache();if(null!=n.value){if(e.isEmpty()&&s.isFullyInitialized()||s.isCompleteForPath(e))return this.applyServerOverwrite_(t,e,s.getNode().getChild(e),r,i,a,o);if(e.isEmpty()){var u=new ye(null);
2return s.getNode().forEachChild(Ot,(function(t,e){u=u.set(new q(t),e)})),this.applyServerMerge_(t,e,u,r,i,a,o)}return t}var c=new ye(null);return n.foreach((function(t,n){var r=e.child(t);s.isCompleteForPath(r)&&(c=c.set(t,s.getNode().getChild(r)))})),this.applyServerMerge_(t,e,c,r,i,a,o)},t.prototype.listenComplete_=function(t,e,n,r){var i=t.getServerCache(),o=t.updateServerSnap(i.getNode(),i.isFullyInitialized()||e.isEmpty(),i.isFiltered());return this.generateEventCacheAfterServerEvent_(o,e,n,Ne,r)},t.prototype.revertUserWrite_=function(t,e,n,r,i){var a;if(null!=n.shadowingWrite(e))return t;var s=new Ae(n,t,r),u=t.getEventCache().getNode(),c=void 0;if(e.isEmpty()||".priority"===e.getFront()){var l=void 0;if(t.getServerCache().isFullyInitialized())l=n.calcCompleteEventCache(t.getCompleteServerSnap());else{var f=t.getServerCache().getNode();Object(o.f)(f instanceof Wt,"serverChildren would be complete if leaf node"),l=n.calcCompleteEventChildren(f)}l=l,c=this.filter_.updateFullNode(u,l,i)}else{var h=e.getFront(),p=n.calcCompleteChild(h,t.getServerCache());null==p&&t.getServerCache().isCompleteForChild(h)&&(p=u.getImmediateChild(h)),(c=null!=p?this.filter_.updateChild(u,h,p,e.popFront(),s,i):t.getEventCache().getNode().hasChild(h)?this.filter_.updateChild(u,h,Wt.EMPTY_NODE,e.popFront(),s,i):u).isEmpty()&&t.getServerCache().isFullyInitialized()&&(a=n.calcCompleteEventCache(t.getCompleteServerSnap())).isLeafNode()&&(c=this.filter_.updateFullNode(c,a,i))}return a=t.getServerCache().isFullyInitialized()||null!=n.shadowingWrite(q.Empty),t.updateEventSnap(c,a,this.filter_.filtersNodes())},t}(),Re=function(){function t(t){this.query_=t,this.index_=this.query_.getQueryParams().getIndex()}return t.prototype.generateEventsForChanges=function(t,e,n){var r=this,i=[],o=[];return t.forEach((function(t){var e;"child_changed"===t.type&&r.index_.indexedValueChanged(t.oldSnap,t.snapshotNode)&&o.push((e=t.childName,{type:"child_moved",snapshotNode:t.snapshotNode,childName:e}))})),this.generateEventsForType_(i,"child_removed",t,n,e),this.generateEventsForType_(i,"child_added",t,n,e),this.generateEventsForType_(i,"child_moved",o,n,e),this.generateEventsForType_(i,"child_changed",t,n,e),this.generateEventsForType_(i,"value",t,n,e),i},t.prototype.generateEventsForType_=function(t,e,n,r,i){var o=this,a=n.filter((function(t){return t.type===e}));a.sort(this.compareChanges_.bind(this)),a.forEach((function(e){var n=o.materializeSingleChange_(e,i);r.forEach((function(r){r.respondsTo(e.type)&&t.push(r.createEvent(n,o.query_))}))}))},t.prototype.materializeSingleChange_=function(t,e){return"value"===t.type||"child_removed"===t.type||(t.prevName=e.getPredecessorChildName(t.childName,t.snapshotNode,this.index_)),t},t.prototype.compareChanges_=function(t,e){if(null==t.childName||null==e.childName)throw Object(o.g)("Should only compare child_ events.");var n=new _t(t.childName,t.snapshotNode),r=new _t(e.childName,e.snapshotNode);return this.index_.compare(n,r)},t}(),je=function(){function t(t,e){this.query_=t,this.eventRegistrations_=[];var n=this.query_.getQueryParams(),r=new Ce(n.getIndex()),i=n.getNodeFilter();this.processor_=new Pe(i);var o=e.getServerCache(),a=e.getEventCache(),s=r.updateFullNode(Wt.EMPTY_NODE,o.getNode(),null),u=i.updateFullNode(Wt.EMPTY_NODE,a.getNode(),null),c=new we(s,o.isFullyInitialized(),r.filtersNodes()),l=new we(u,a.isFullyInitialized(),i.filtersNodes());this.viewCache_=new _e(l,c),this.eventGenerator_=new Re(this.query_)}return t.prototype.getQuery=function(){return this.query_},t.prototype.getServerCache=function(){return this.viewCache_.getServerCache().getNode()},t.prototype.getCompleteNode=function(){return this.viewCache_.getCompleteEventSnap()},t.prototype.getCompleteServerCache=function(t){var e=this.viewCache_.getCompleteServerSnap();return e&&(this.query_.getQueryParams().loadsAllData()||!t.isEmpty()&&!e.getImmediateChild(t.getFront()).isEmpty())?e.getChild(t):null},t.prototype.isEmpty=function(){return 0===this.eventRegistrations_.length},t.prototype.addEventRegistration=function(t){this.eventRegistrations_.push(t)},t.prototype.removeEventRegistration=function(t,e){var n=[];if(e){Object(o.f)(null==t,"A cancel should cancel all event registrations.");var r=this.query_.path;this.eventRegistrations_.forEach((function(t){var i=t.createCancelEvent(e,r);i&&n.push(i)}))}if(t){for(var i=[],a=0;a<this.eventRegistrations_.length;++a){var s=this.eventRegistrations_[a];if(s.matches(t)){if(t.hasAnyCallback()){i=i.concat(this.eventRegistrations_.slice(a+1));break}}else i.push(s)}this.eventRegistrations_=i}else this.eventRegistrations_=[];return n},t.prototype.applyOperation=function(t,e,n){t.type===fe.MERGE&&null!==t.source.queryId&&(Object(o.f)(this.viewCache_.getCompleteServerSnap(),"We should always have a full c
2ache before handling merges"),Object(o.f)(this.viewCache_.getCompleteEventSnap(),"Missing event cache, even though we have a server cache"));var r=this.viewCache_,i=this.processor_.applyOperation(r,t,e,n);return this.processor_.assertIndexed(i.viewCache),Object(o.f)(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)},t.prototype.getInitialEvents=function(t){var e=this.viewCache_.getEventCache(),n=[];e.getNode().isLeafNode()||e.getNode().forEachChild(Rt,(function(t,e){n.push(Te(t,e))}));return e.isFullyInitialized()&&n.push(Ee(e.getNode())),this.generateEventsForChanges_(n,e.getNode(),t)},t.prototype.generateEventsForChanges_=function(t,e,n){var r=n?[n]:this.eventRegistrations_;return this.eventGenerator_.generateEventsForChanges(t,e,r)},t}(),De=function(){function t(){this.views=new Map}return Object.defineProperty(t,"__referenceConstructor",{get:function(){return Object(o.f)(Ie,"Reference.ts has not been loaded"),Ie},set:function(t){Object(o.f)(!Ie,"__referenceConstructor has already been defined"),Ie=t},enumerable:!1,configurable:!0}),t.prototype.isEmpty=function(){return 0===this.views.size},t.prototype.applyOperation=function(t,e,n){var r,a,s=t.source.queryId;if(null!==s){var u=this.views.get(s);return Object(o.f)(null!=u,"SyncTree gave us an op for an invalid query."),u.applyOperation(t,e,n)}var c=[];try{for(var l=Object(i.h)(this.views.values()),f=l.next();!f.done;f=l.next()){u=f.value;c=c.concat(u.applyOperation(t,e,n))}}catch(h){r={error:h}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return c},t.prototype.getView=function(t,e,n,r){var i=t.queryIdentifier(),o=this.views.get(i);if(!o){var a=e.calcCompleteEventCache(r?n:null),s=!1;a?s=!0:n instanceof Wt?(a=e.calcCompleteEventChildren(n),s=!1):(a=Wt.EMPTY_NODE,s=!1);var u=new _e(new we(a,s,!1),new we(n,r,!1));return new je(t,u)}return o},t.prototype.addEventRegistration=function(t,e,n,r,i){var o=this.getView(t,n,r,i);return this.views.has(t.queryIdentifier())||this.views.set(t.queryIdentifier(),o),o.addEventRegistration(e),o.getInitialEvents(e)},t.prototype.removeEventRegistration=function(e,n,r){var o,a,s=e.queryIdentifier(),u=[],c=[],l=this.hasCompleteView();if("default"===s)try{for(var f=Object(i.h)(this.views.entries()),h=f.next();!h.done;h=f.next()){var p=Object(i.e)(h.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(y){o={error:y}}finally{try{h&&!h.done&&(a=f.return)&&a.call(f)}finally{if(o)throw o.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 t.__referenceConstructor(e.repo,e.path)),{removed:u,events:c}},t.prototype.getQueryViews=function(){var t,e,n=[];try{for(var r=Object(i.h)(this.views.values()),o=r.next();!o.done;o=r.next()){var a=o.value;a.getQuery().getQueryParams().loadsAllData()||n.push(a)}}catch(s){t={error:s}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return n},t.prototype.getCompleteServerCache=function(t){var e,n,r=null;try{for(var o=Object(i.h)(this.views.values()),a=o.next();!a.done;a=o.next()){var s=a.value;r=r||s.getCompleteServerCache(t)}}catch(u){e={error:u}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r},t.prototype.viewForQuery=function(t){if(t.getQueryParams().loadsAllData())return this.getCompleteView();var e=t.queryIdentifier();return this.views.get(e)},t.prototype.viewExistsForQuery=function(t){return null!=this.viewForQuery(t)},t.prototype.hasCompleteView=function(){return null!=this.getCompleteView()},t.prototype.getCompleteView=function(){var t,e;try{for(var n=Object(i.h)(this.views.values()),r=n.next();!r.done;r=n.next()){var o=r.value;if(o.getQuery().getQueryParams().loadsAllData())return o}}catch(a){t={error:a}}finally{try{r&&!r.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return null},t}(),Le=function(){function t(t){this.writeTree_=t}return t.empty=function(){return new t(new ye(null))},t}();function Me(t,e,n){if(e.isEmpty())return new Le(new ye(n));var r=t.writeTree_.findRootMostValueAndPath(e);if(null!=r){var i=r.path,o=r.value,a=q.relativePath(i,e);return o=o.updateChild(a,n),new Le(t.writeTree_.set(i,o))}var s=new ye(n),u=t.writeTree_.setTree(e,s);return new Le(u)}function Fe(t,e,n){var r=t;return R(n,(function(t,n){r=Me(r,e.child(t),n)})),r}function Ue(t,e){if(e.isEmpty())return Le.empty();
2var n=t.writeTree_.setTree(e,new ye(null));return new Le(n)}function Ve(t,e){return null!=qe(t,e)}function qe(t,e){var n=t.writeTree_.findRootMostValueAndPath(e);return null!=n?t.writeTree_.get(n.path).getChild(q.relativePath(n.path,e)):null}function Be(t){var e=[],n=t.writeTree_.value;return null!=n?n.isLeafNode()||n.forEachChild(Rt,(function(t,n){e.push(new _t(t,n))})):t.writeTree_.children.inorderTraversal((function(t,n){null!=n.value&&e.push(new _t(t,n.value))})),e}function ze(t,e){if(e.isEmpty())return t;var n=qe(t,e);return new Le(null!=n?new ye(n):t.writeTree_.subtree(e))}function He(t){return t.writeTree_.isEmpty()}function We(t,e){return Ke(q.Empty,t.writeTree_,e)}function Ke(t,e,n){if(null!=e.value)return n.updateChild(t,e.value);var r=null;return e.children.inorderTraversal((function(e,i){".priority"===e?(Object(o.f)(null!==i.value,"Priority writes must always be leaf nodes"),r=i.value):n=Ke(t.child(e),i,n)})),n.getChild(t).isEmpty()||null===r||(n=n.updateChild(t.child(".priority"),r)),n}var Ge=function(){function t(){this.visibleWrites_=Le.empty(),this.allWrites_=[],this.lastWriteId_=-1}return t.prototype.childWrites=function(t){return new Qe(t,this)},t.prototype.addOverwrite=function(t,e,n,r){Object(o.f)(n>this.lastWriteId_,"Stacking an older write on top of newer ones"),void 0===r&&(r=!0),this.allWrites_.push({path:t,snap:e,writeId:n,visible:r}),r&&(this.visibleWrites_=Me(this.visibleWrites_,t,e)),this.lastWriteId_=n},t.prototype.addMerge=function(t,e,n){Object(o.f)(n>this.lastWriteId_,"Stacking an older merge on top of newer ones"),this.allWrites_.push({path:t,children:e,writeId:n,visible:!0}),this.visibleWrites_=Fe(this.visibleWrites_,t,e),this.lastWriteId_=n},t.prototype.getWrite=function(t){for(var e=0;e<this.allWrites_.length;e++){var n=this.allWrites_[e];if(n.writeId===t)return n}return null},t.prototype.removeWrite=function(t){var e=this,n=this.allWrites_.findIndex((function(e){return e.writeId===t}));Object(o.f)(n>=0,"removeWrite called with nonexistent writeId.");var r=this.allWrites_[n];this.allWrites_.splice(n,1);for(var i=r.visible,a=!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)&&(a=!0)),s--}if(i){if(a)return this.resetTree_(),!0;r.snap?this.visibleWrites_=Ue(this.visibleWrites_,r.path):R(r.children,(function(t){e.visibleWrites_=Ue(e.visibleWrites_,r.path.child(t))}));return!0}return!1},t.prototype.getCompleteWriteData=function(t){return qe(this.visibleWrites_,t)},t.prototype.calcCompleteEventCache=function(e,n,r,i){if(r||i){var o=ze(this.visibleWrites_,e);if(!i&&He(o))return n;if(i||null!=n||Ve(o,q.Empty)){return We(t.layerTree_(this.allWrites_,(function(t){return(t.visible||i)&&(!r||!~r.indexOf(t.writeId))&&(t.path.contains(e)||e.contains(t.path))}),e),n||Wt.EMPTY_NODE)}return null}var a=qe(this.visibleWrites_,e);if(null!=a)return a;var s=ze(this.visibleWrites_,e);return He(s)?n:null!=n||Ve(s,q.Empty)?We(s,n||Wt.EMPTY_NODE):null},t.prototype.calcCompleteEventChildren=function(t,e){var n=Wt.EMPTY_NODE,r=qe(this.visibleWrites_,t);if(r)return r.isLeafNode()||r.forEachChild(Rt,(function(t,e){n=n.updateImmediateChild(t,e)})),n;if(e){var i=ze(this.visibleWrites_,t);return e.forEachChild(Rt,(function(t,e){var r=We(ze(i,new q(t)),e);n=n.updateImmediateChild(t,r)})),Be(i).forEach((function(t){n=n.updateImmediateChild(t.name,t.node)})),n}return Be(ze(this.visibleWrites_,t)).forEach((function(t){n=n.updateImmediateChild(t.name,t.node)})),n},t.prototype.calcEventCacheAfterServerOverwrite=function(t,e,n,r){Object(o.f)(n||r,"Either existingEventSnap or existingServerSnap must exist");var i=t.child(e);if(Ve(this.visibleWrites_,i))return null;var a=ze(this.visibleWrites_,i);return He(a)?r.getChild(e):We(a,r.getChild(e))},t.prototype.calcCompleteChild=function(t,e,n){var r=t.child(e),i=qe(this.visibleWrites_,r);return null!=i?i:n.isCompleteForChild(e)?We(ze(this.visibleWrites_,r),n.getNode().getImmediateChild(e)):null},t.prototype.shadowingWrite=function(t){return qe(this.visibleWrites_,t)},t.prototype.calcIndexedSlice=function(t,e,n,r,i,o){var a,s=ze(this.visibleWrites_,t),u=qe(s,q.Empty);if(null!=u)a=u;else{if(null==e)return[];a=We(s,e)}if((a=a.withIndex(o)).isEmpty()||a.isLeafNode())return[];for(var c=[],l=o.getCompare(),f=i?a.getReverseIteratorFrom(n,o):a.getIteratorFrom(n,o),h=f.getNext();
2h&&c.length<r;)0!==l(h,n)&&c.push(h),h=f.getNext();return c},t.prototype.recordContainsPath_=function(t,e){if(t.snap)return t.path.contains(e);for(var n in t.children)if(t.children.hasOwnProperty(n)&&t.path.child(n).contains(e))return!0;return!1},t.prototype.resetTree_=function(){this.visibleWrites_=t.layerTree_(this.allWrites_,t.DefaultFilter_,q.Empty),this.allWrites_.length>0?this.lastWriteId_=this.allWrites_[this.allWrites_.length-1].writeId:this.lastWriteId_=-1},t.DefaultFilter_=function(t){return t.visible},t.layerTree_=function(t,e,n){for(var r=Le.empty(),i=0;i<t.length;++i){var a=t[i];if(e(a)){var s=a.path,u=void 0;if(a.snap)n.contains(s)?r=Me(r,u=q.relativePath(n,s),a.snap):s.contains(n)&&(u=q.relativePath(s,n),r=Me(r,q.Empty,a.snap.getChild(u)));else{if(!a.children)throw Object(o.g)("WriteRecord should have .snap or .children");if(n.contains(s))r=Fe(r,u=q.relativePath(n,s),a.children);else if(s.contains(n))if((u=q.relativePath(s,n)).isEmpty())r=Fe(r,q.Empty,a.children);else{var c=Object(o.G)(a.children,u.getFront());if(c){var l=c.getChild(u.popFront());r=Me(r,q.Empty,l)}}}}}return r},t}(),Qe=function(){function t(t,e){this.treePath_=t,this.writeTree_=e}return t.prototype.calcCompleteEventCache=function(t,e,n){return this.writeTree_.calcCompleteEventCache(this.treePath_,t,e,n)},t.prototype.calcCompleteEventChildren=function(t){return this.writeTree_.calcCompleteEventChildren(this.treePath_,t)},t.prototype.calcEventCacheAfterServerOverwrite=function(t,e,n){return this.writeTree_.calcEventCacheAfterServerOverwrite(this.treePath_,t,e,n)},t.prototype.shadowingWrite=function(t){return this.writeTree_.shadowingWrite(this.treePath_.child(t))},t.prototype.calcIndexedSlice=function(t,e,n,r,i){return this.writeTree_.calcIndexedSlice(this.treePath_,t,e,n,r,i)},t.prototype.calcCompleteChild=function(t,e){return this.writeTree_.calcCompleteChild(this.treePath_,t,e)},t.prototype.child=function(e){return new t(this.treePath_.child(e),this.writeTree_)},t}(),Ye=function(){function t(t){this.listenProvider_=t,this.syncPointTree_=new ye(null),this.pendingWriteTree_=new Ge,this.tagToQueryMap=new Map,this.queryToTagMap=new Map}return t.prototype.applyUserOverwrite=function(t,e,n,r){return this.pendingWriteTree_.addOverwrite(t,e,n,r),r?this.applyOperationToSyncPoints_(new me(de.user(),t,e)):[]},t.prototype.applyUserMerge=function(t,e,n){this.pendingWriteTree_.addMerge(t,e,n);var r=ye.fromObject(e);return this.applyOperationToSyncPoints_(new be(de.user(),t,r))},t.prototype.ackUserWrite=function(t,e){void 0===e&&(e=!1);var n=this.pendingWriteTree_.getWrite(t);if(this.pendingWriteTree_.removeWrite(t)){var r=new ye(null);return null!=n.snap?r=r.set(q.Empty,!0):R(n.children,(function(t){r=r.set(new q(t),!0)})),this.applyOperationToSyncPoints_(new ve(n.path,r,e))}return[]},t.prototype.applyServerOverwrite=function(t,e){return this.applyOperationToSyncPoints_(new me(de.server(),t,e))},t.prototype.applyServerMerge=function(t,e){var n=ye.fromObject(e);return this.applyOperationToSyncPoints_(new be(de.server(),t,n))},t.prototype.applyListenComplete=function(t){return this.applyOperationToSyncPoints_(new ge(de.server(),t))},t.prototype.applyTaggedQueryOverwrite=function(e,n,r){var i=this.queryKeyForTag_(r);if(null!=i){var o=t.parseQueryKey_(i),a=o.path,s=o.queryId,u=q.relativePath(a,e),c=new me(de.forServerTaggedQuery(s),u,n);return this.applyTaggedOperation_(a,c)}return[]},t.prototype.applyTaggedQueryMerge=function(e,n,r){var i=this.queryKeyForTag_(r);if(i){var o=t.parseQueryKey_(i),a=o.path,s=o.queryId,u=q.relativePath(a,e),c=ye.fromObject(n),l=new be(de.forServerTaggedQuery(s),u,c);return this.applyTaggedOperation_(a,l)}return[]},t.prototype.applyTaggedListenComplete=function(e,n){var r=this.queryKeyForTag_(n);if(r){var i=t.parseQueryKey_(r),o=i.path,a=i.queryId,s=q.relativePath(o,e),u=new ge(de.forServerTaggedQuery(a),s);return this.applyTaggedOperation_(o,u)}return[]},t.prototype.addEventRegistration=function(e,n){var r=e.path,i=null,a=!1;this.syncPointTree_.foreachOnPath(r,(function(t,e){var n=q.relativePath(t,r);i=i||e.getCompleteServerCache(n),a=a||e.hasCompleteView()}));var s,u=this.syncPointTree_.get(r);(u?(a=a||u.hasCompleteView(),i=i||u.getCompleteServerCache(q.Empty)):(u=new De,this.syncPointTree_=this.syncPointTree_.set(r,u)),null!=i)?s=!0:(s=!1,i=Wt.EMPTY_NODE,this.syncPointTree_.subtree(r).foreachChild((function(t,e){var n=e.getCompleteServerCache(q.Empty);n&&(i=i.updateImmediateChild(t,n))}
2)));var c=u.viewExistsForQuery(e);if(!c&&!e.getQueryParams().loadsAllData()){var l=t.makeQueryKey_(e);Object(o.f)(!this.queryToTagMap.has(l),"View does not exist, but we have a tag");var f=t.getNextQueryTag_();this.queryToTagMap.set(l,f),this.tagToQueryMap.set(f,l)}var h=this.pendingWriteTree_.childWrites(r),p=u.addEventRegistration(e,n,h,i,s);if(!c&&!a){var d=u.viewForQuery(e);p=p.concat(this.setupListener_(e,d))}return p},t.prototype.removeEventRegistration=function(e,n,r){var i=this,o=e.path,a=this.syncPointTree_.get(o),s=[];if(a&&("default"===e.queryIdentifier()||a.viewExistsForQuery(e))){var u=a.removeEventRegistration(e,n,r);a.isEmpty()&&(this.syncPointTree_=this.syncPointTree_.remove(o));var c=u.removed;s=u.events;var l=-1!==c.findIndex((function(t){return t.getQueryParams().loadsAllData()})),f=this.syncPointTree_.findOnPath(o,(function(t,e){return e.hasCompleteView()}));if(l&&!f){var h=this.syncPointTree_.subtree(o);if(!h.isEmpty())for(var p=this.collectDistinctViewsForSubTree_(h),d=0;d<p.length;++d){var v=p[d],y=v.getQuery(),g=this.createListenerForView_(v);this.listenProvider_.startListening(t.queryForListening_(y),this.tagForQuery_(y),g.hashFn,g.onComplete)}}if(!f&&c.length>0&&!r)if(l){this.listenProvider_.stopListening(t.queryForListening_(e),null)}else c.forEach((function(e){var n=i.queryToTagMap.get(t.makeQueryKey_(e));i.listenProvider_.stopListening(t.queryForListening_(e),n)}));this.removeTags_(c)}return s},t.prototype.calcCompleteEventCache=function(t,e){var n=this.pendingWriteTree_,r=this.syncPointTree_.findOnPath(t,(function(e,n){var r=q.relativePath(e,t),i=n.getCompleteServerCache(r);if(i)return i}));return n.calcCompleteEventCache(t,r,e,!0)},t.prototype.getServerValue=function(t){var e=t.path,n=null;this.syncPointTree_.foreachOnPath(e,(function(t,r){var i=q.relativePath(t,e);n=n||r.getCompleteServerCache(i)}));var r=this.syncPointTree_.get(e);r?n=n||r.getCompleteServerCache(q.Empty):(r=new De,this.syncPointTree_=this.syncPointTree_.set(e,r));var i=null!=n,o=i?new we(n,!0,!1):null,a=this.pendingWriteTree_.childWrites(t.path);return r.getView(t,a,i?o.getNode():Wt.EMPTY_NODE,i).getCompleteNode()},t.prototype.collectDistinctViewsForSubTree_=function(t){return t.fold((function(t,e,n){if(e&&e.hasCompleteView())return[e.getCompleteView()];var r=[];return e&&(r=e.getQueryViews()),R(n,(function(t,e){r=r.concat(e)})),r}))},t.prototype.removeTags_=function(e){for(var n=0;n<e.length;++n){var r=e[n];if(!r.getQueryParams().loadsAllData()){var i=t.makeQueryKey_(r),o=this.queryToTagMap.get(i);this.queryToTagMap.delete(i),this.tagToQueryMap.delete(o)}}},t.queryForListening_=function(t){return t.getQueryParams().loadsAllData()&&
2!t.getQueryParams().isDefault()?t.getRef():t},t.prototype.setupListener_=function(e,n){var r=e.path,i=this.tagForQuery_(e),a=this.createListenerForView_(n),s=this.listenProvider_.startListening(t.queryForListening_(e),i,a.hashFn,a.onComplete),u=this.syncPointTree_.subtree(r);if(i)Object(o.f)(!u.value.hasCompleteView(),"If we're adding a query, it shouldn't be shadowed");else for(var c=u.fold((function(t,e,n){if(!t.isEmpty()&&e&&e.hasCompleteView())return[e.getCompleteView().getQuery()];var r=[];return e&&(r=r.concat(e.getQueryViews().map((function(t){return t.getQuery()})))),R(n,(function(t,e){r=r.concat(e)})),r})),l=0;l<c.length;++l){var f=c[l];this.listenProvider_.stopListening(t.queryForListening_(f),this.tagForQuery_(f))}return s},t.prototype.createListenerForView_=function(t){var e=this,n=t.getQuery(),r=this.tagForQuery_(n);return{hashFn:function(){return(t.getServerCache()||Wt.EMPTY_NODE).hash()},onComplete:function(t){if("ok"===t)return r?e.applyTaggedListenComplete(n.path,r):e.applyListenComplete(n.path);var i=function(t,e){var n="Unknown Error";"too_big"===t?n="The data requested exceeds the maximum size that can be accessed with a single request.":"permission_denied"===t?n="Client doesn't have permission to access the desired data.":"unavailable"===t&&(n="The service is unavailable");var r=new Error(t+" at "+e.path.toString()+": "+n);return r.code=t.toUpperCase(),r}(t,n);return e.removeEventRegistration(n,null,i)}}},t.makeQueryKey_=function(t){return t.path.toString()+"$"+t.queryIdentifier()},t.parseQueryKey_=function(t){var e=t.indexOf("$");return Object(o.f)(-1!==e&&e<t.length-1,"Bad queryKey."),{queryId:t.substr(e+1),path:new q(t.substr(0,e))}},t.prototype.queryKeyForTag_=function(t){return this.tagToQueryMap.get(t)},t.prototype.tagForQuery_=function(e){var n=t.makeQueryKey_(e);return this.queryToTagMap.get(n)},t.getNextQueryTag_=function(){return t.nextQueryTag_++},t.prototype.applyTaggedOperation_=function(t,e){var n=this.syncPointTree_.get(t);Object(o.f)(n,"Missing sync point for query tag that we're tracking");var r=this.pendingWriteTree_.childWrites(t);return n.applyOperation(e,r,null)},t.prototype.applyOperationToSyncPoints_=function(t){return this.applyOperationHelper_(t,this.syncPointTree_,null,this.pendingWriteTree_.childWrites(q.Empty))},t.prototype.applyOperationHelper_=function(t,e,n,r){if(t.path.isEmpty())return this.applyOperationDescendantsHelper_(t,e,n,r);var i=e.get(q.Empty);null==n&&null!=i&&(n=i.getCompleteServerCache(q.Empty));var o=[],a=t.path.getFront(),s=t.operationForChild(a),u=e.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(t,r,n))),o},t.prototype.applyOperationDescendantsHelper_=function(t,e,n,r){var i=this,o=e.get(q.Empty);null==n&&null!=o&&(n=o.getCompleteServerCache(q.Empty));var a=[];return e.children.inorderTraversal((function(e,o){var s=n?n.getImmediateChild(e):null,u=r.child(e),c=t.operationForChild(e);c&&(a=a.concat(i.applyOperationDescendantsHelper_(c,o,s,u)))})),o&&(a=a.concat(o.applyOperation(t,r,n))),a},t.nextQueryTag_=1,t}(),Xe=function(){function t(){this.rootNode_=Wt.EMPTY_NODE}return t.prototype.getNode=function(t){return this.rootNode_.getChild(t)},t.prototype.updateSnapshot=function(t,e){this.rootNode_=this.rootNode_.updateChild(t,e)},t}(),$e=function(){function t(){this.counters_={}}return t.prototype.incrementCounter=function(t,e){void 0===e&&(e=1),Object(o.k)(this.counters_,t)||(this.counters_[t]=0),this.counters_[t]+=e},t.prototype.get=function(){return Object(o.m)(this.counters_)},t}(),Je=function(){function t(){}return t.getCollection=function(t){var e=t.toString();return this.collections_[e]||(this.collections_[e]=new $e),this.collections_[e]},t.getOrCreateReporter=function(t,e){var n=t.toString();return this.reporters_[n]||(this.reporters_[n]=e()),this.reporters_[n]},t.collections_={},t.reporters_={},t}(),Ze=function(){function t(t){this.collection_=t,this.last_=null}return t.prototype.get=function(){var t=this.collection_.get(),e=Object(i.a)({},t);return this.last_&&R(this.last_,(function(t,n){e[t]=e[t]-n})),this.last_=t,e},t}(),tn=function(){function t(t,e){this.server_=e,this.statsToReport_={},this.statsListener_=new Ze(t);var n=1e4+2e4*Math.random();V(this.reportStats_.bind(this),Math.floor(n))}return t.prototype.includeStat=function(t){this.statsToReport_[t]=!0},t.prototype.reportStats_=function(){var t=this,e=this.statsListener_.get(),n={},r=!1;R(e,(function(e,i){i>0&&Object(o.k)(t.statsToReport_,e)&&(n[e]=i,r=!0)})),r&&this.server_.reportStats(n),V(this.reportStats_.bind(this),Math.floor(2*Math.random()*3e5))},t}(),en=function(){function t(){this.eventLists_=[],this.recursionDepth_=0}return t.prototype.queueEvents=function(t){for(var e=null,n=0;n<t.length;n++){var r=t[n],i=r.getPath();null===e||i.equals(e.getPath())||(this.eventLists_.push(e),e=null),null===e&&(e=new nn(i)),e.add(r)}e&&this.eventLists_.push(e)},t.prototype.raiseEventsAtPath=function(t,e){this.queueEvents(e),this.raiseQueuedEventsMatchingPredicate_((function(e){return e.equals(t)}))},t.prototype.raiseEventsForChangedPath=function(t,e){this.queueEvents(e),this.raiseQueuedEventsMatchingPredicate_((function(e){return e.contains(t)||t.contains(e)}))},t.prototype.raiseQueuedEventsMatchingPredicate_=function(t){this.recursionDepth_++;for(var e=!0,n=0;n<this.eventLists_.length;n++){var r=this.eventLists_[n];if(r)t(r.getPath())?(this.eventLists_[n].raise(),this.eventLists_[n]=null):e=!1}e&&(this.eventLists_=[]),this.recursionDepth_--},t}(),nn=function(){function t(t){this.path_=t,this.events_=[]}
2return t.prototype.add=function(t){this.events_.push(t)},t.prototype.raise=function(){for(var t=0;t<this.events_.length;t++){var e=this.events_[t];if(null!==e){this.events_[t]=null;var n=e.getEventRunner();g&&w("event: "+e.toString()),U(n)}}},t.prototype.getPath=function(){return this.path_},t}(),rn=function(){function t(t){this.allowedEvents_=t,this.listeners_={},Object(o.f)(Array.isArray(t)&&t.length>0,"Requires a non-empty array")}return t.prototype.trigger=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(Array.isArray(this.listeners_[t]))for(var r=Object(i.f)(this.listeners_[t]),o=0;o<r.length;o++)r[o].callback.apply(r[o].context,e)},t.prototype.on=function(t,e,n){this.validateEventType_(t),this.listeners_[t]=this.listeners_[t]||[],this.listeners_[t].push({callback:e,context:n});var r=this.getInitialEvent(t);r&&e.apply(n,r)},t.prototype.off=function(t,e,n){this.validateEventType_(t);for(var r=this.listeners_[t]||[],i=0;i<r.length;i++)if(r[i].callback===e&&(!n||n===r[i].context))return void r.splice(i,1)},t.prototype.validateEventType_=function(t){Object(o.f)(this.allowedEvents_.find((function(e){return e===t})),"Unknown event: "+t)},t}(),on=function(t){function e(){var e,n,r=t.call(this,["visible"])||this;return"undefined"!==typeof document&&"undefined"!==typeof document.addEventListener&&("undefined"!==typeof document.hidden?(n="visibilitychange",e="hidden"):"undefined"!==typeof document.mozHidden?(n="mozvisibilitychange",e="mozHidden"):"undefined"!==typeof document.msHidden?(n="msvisibilitychange",e="msHidden"):"undefined"!==typeof document.webkitHidden&&(n="webkitvisibilitychange",e="webkitHidden")),r.visible_=!0,n&&document.addEventListener(n,(function(){var t=!document[e];t!==r.visible_&&(r.visible_=t,r.trigger("visible",t))}),!1),r}return Object(i.c)(e,t),e.getInstance=function(){return new e},e.prototype.getInitialEvent=function(t){return Object(o.f)("visible"===t,"Unknown event type: "+t),[this.visible_]},e}(rn),an=function(t){function e(){var e=t.call(this,["online"])||this;return e.online_=!0,"undefined"===typeof window||"undefined"===typeof window.addEventListener||Object(o.x)()||(window.addEventListener("online",(function(){e.online_||(e.online_=!0,e.trigger("online",!0))}),!1),window.addEventListener("offline",(function(){e.online_&&(e.online_=!1,e.trigger("online",!1))}),!1)),e}return Object(i.c)(e,t),e.getInstance=function(){return new e},e.prototype.getInitialEvent=function(t){return Object(o.f)("online"===t,"Unknown event type: "+t),[this.online_]},e.prototype.currentlyOnline=function(){return this.online_},e}(rn),sn=function(){function t(t){this.onMessage_=t,this.pendingResponses=[],this.currentResponseNum=0,this.closeAfterResponse=-1,this.onClose=null}return t.prototype.closeAfter=function(t,e){this.closeAfterResponse=t,this.onClose=e,this.closeAfterResponse<this.currentResponseNum&&(this.onClose(),this.onClose=null)},t.prototype.handleResponse=function(t,e){var n=this;this.pendingResponses[t]=e;for(var r=function(){var t=i.pendingResponses[i.currentResponseNum];delete i.pendingResponses[i.currentResponseNum];for(var e=function(e){t[e]&&U((function(){n.onMessage_(t[e])}))},r=0;r<t.length;++r)e(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}},t}(),un="start",cn="close",ln=function(){function t(t,e,n,r,i){this.connId=t,this.repoInfo=e,this.applicationId=n,this.transportSessionId=r,this.lastSessionId=i,this.bytesSent=0,this.bytesReceived=0,this.everConnected_=!1,this.log_=_(t),this.stats_=Je.getCollection(e),this.urlFn=function(t){return e.connectionURL(K,t)}}return t.prototype.open=function(t,e){var n=this;this.curSegmentNum=0,this.onDisconnect_=e,this.myPacketOrderer=new sn(t),this.isClosed_=!1,this.connectTimeoutTimer_=setTimeout((function(){n.log_("Timed out trying to connect."),n.onClosed_(),n.connectTimeoutTimer_=null}),Math.floor(3e4)),function(t){if(Object(o.z)()||"complete"===document.readyState)t();else{var e=!1,n=function n(){document.body?e||(e=!0,t()):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 fn((function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=Object(i.e)(t,5),o=r[0],a=r[1],s=r[2];r[3],r[4];if(n.incrementIncomingBytes_(t),n.scriptTagHolder)if(n.connectTimeoutTimer_&&(clearTimeout(n.connectTimeoutTimer_),n.connectTimeoutTimer_=null),n.everConnected_=!0,o===un)n.id=a,n.password=s;else{if(o!==cn)throw new Error("Unrecognized command received: "+o);a?(n.scriptTagHolder.sendNewPolls=!1,n.myPacketOrderer.closeAfter(a,(function(){n.onClosed_()}))):n.onClosed_()}}),(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=Object(i.e)(t,2),o=r[0],a=r[1];n.incrementIncomingBytes_(t),n.myPacketOrderer.handleResponse(o,a)}),(function(){n.onClosed_()}),n.urlFn);var t={start:"t"};t.ser=Math.floor(1e8*Math.random()),n.scriptTagHolder.uniqueCallbackIdentifier&&(t.cb=n.scriptTagHolder.uniqueCallbackIdentifier),t.v=z,n.transportSessionId&&(t.s=n.transportSessionId),n.lastSessionId&&(t.ls=n.lastSessionId),n.applicationId&&(t.p=n.applicationId),"undefined"!==typeof location&&location.hostname&&H.test(location.hostname)&&(t.r="f");var e=n.urlFn(t);n.log_("Connecting via long-poll to "+e),n.scriptTagHolder.addTag(e,(function(){}))}}))},t.prototype.start=function(){this.scriptTagHolder.startLongPoll(this.id,this.password),this.addDisconnectPingFrame(this.id,this.password)},t.forceAllow=function(){t.forceAllow_=!0},t.forceDisallow=function(){t.forceDisallow_=!0},t.isAvailable=function(){return!Object(o.z)()&&(!!t.forceAllow_||!t.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))},t.prototype.markConnectionHealthy=function(){},t.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)},t.prototype.onClosed_=function(){this.isClosed_||(this.log_("Longpoll is closing itself"),this.shutdown_(),this.onDisconnect_&&(this.onDisconnect_(this.everConnected_),this.onDisconnect_=null))},t.prototype.close=function(){this.isClosed_||(this.log_("Longpoll is being closed."),this.shutdown_())},t.prototype.send=function(t){var e=Object(o.J)(t);this.bytesSent+=e.length,this.stats_.incrementCounter("bytes_sent",e.length);for(var n=Object(o.i)(e),r=P(n,1840),i=0;i<r.length;i++)this.scriptTagHolder.enqueueSegment(this.curSegmentNum,r.length,r[i]),this.curSegmentNum++},t.prototype.addDisconnectPingFrame=function(t,e){if(!Object(o.z)()){this.myDisconnFrame=document.createElement("iframe");var n={dframe:"t"};n.id=t,n.pw=e,this.myDisconnFrame.src=this.urlFn(n),this.myDisconnFrame.style.display="none",document.body.appendChild(this.myDisconnFrame)}},t.prototype.incrementIncomingBytes_=function(t){var e=Object(o.J)(t).length;this.bytesReceived+=e,this.stats_.incrementCounter("bytes_received",e)},t}(),fn=function(){function t(e,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,Object(o.z)())this.commandCB=e,this.onMessageCB=n;else{this.uniqueCallbackIdentifier=d(),window["pLPCommand"+this.uniqueCallbackIdentifier]=e,window["pRTLPCB"+this.uniqueCallbackIdentifier]=n,this.myIFrame=t.createI
2Frame_();var a="";if(this.myIFrame.src&&"javascript:"===this.myIFrame.src.substr(0,"javascript:".length))a='<script>document.domain="'+document.domain+'";<\/script>';var s="<html><body>"+a+"</body></html>";try{this.myIFrame.doc.open(),this.myIFrame.doc.write(s),this.myIFrame.doc.close()}catch(u){w("frame writing exception"),u.stack&&w(u.stack),w(u)}}}return t.createIFrame_=function(){var t=document.createElement("iframe");if(t.style.display="none",!document.body)throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";document.body.appendChild(t);try{t.contentWindow.document||w("No IE domain setting required")}catch(n){var e=document.domain;t.src="javascript:void((function(){document.open();document.domain='"+e+"';document.close();})())"}return t.contentDocument?t.doc=t.contentDocument:t.contentWindow?t.doc=t.contentWindow.document:t.document&&(t.doc=t.document),t},t.prototype.close=function(){var t=this;this.alive=!1,this.myIFrame&&(this.myIFrame.doc.body.innerHTML="",setTimeout((function(){null!==t.myIFrame&&(document.body.removeChild(t.myIFrame),t.myIFrame=null)}),Math.floor(0)));var e=this.onDisconnect;e&&(this.onDisconnect=null,e())},t.prototype.startLongPoll=function(t,e){for(this.myID=t,this.myPW=e,this.alive=!0;this.newRequest_(););},t.prototype.newRequest_=function(){if(this.alive&&this.sendNewPolls&&this.outstandingRequests.size<(this.pendingSegs.length>0?2:1)){this.currentSerial++;var t={};t.id=this.myID,t.pw=this.myPW,t.ser=this.currentSerial;for(var e=this.urlFn(t),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 e+=n,this.addLongPollTag_(e,this.currentSerial),!0}return!1},t.prototype.enqueueSegment=function(t,e,n){this.pendingSegs.push({seg:t,ts:e,d:n}),this.alive&&this.newRequest_()},t.prototype.addLongPollTag_=function(t,e){var n=this;this.outstandingRequests.add(e);var r=function(){n.outstandingRequests.delete(e),n.newRequest_()},i=setTimeout(r,Math.floor(25e3));this.addTag(t,(function(){clearTimeout(i),r()}))},t.prototype.addTag=function(t,e){var n=this;Object(o.z)()?this.doNodeLongPoll(t,e):setTimeout((function(){try{if(!n.sendNewPolls)return;var r=n.myIFrame.doc.createElement("script");r.type="text/javascript",r.async=!0,r.src=t,r.onload=r.onreadystatechange=function(){var t=r.readyState;t&&"loaded"!==t&&"complete"!==t||(r.onload=r.onreadystatechange=null,r.parentNode&&r.parentNode.removeChild(r),e())},r.onerror=function(){w("Long-poll script failed to load: "+t),n.sendNewPolls=!1,n.close()},n.myIFrame.doc.body.appendChild(r)}catch(i){}}),Math.floor(1))},t}(),hn="";function pn(t){hn=t}var dn=null;"undefined"!==typeof MozWebSocket?dn=MozWebSocket:"undefined"!==typeof WebSocket&&(dn=WebSocket);var vn,yn=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_=_(this.connId),this.stats_=Je.getCollection(n),this.connURL=e.connectionURL_(n,i,o),this.nodeAdmin=n.nodeAdmin}return e.connectionURL_=function(t,e,n){var r={};return r.v=z,!Object(o.z)()&&"undefined"!==typeof location&&location.hostname&&H.test(location.hostname)&&(r.r="f"),e&&(r.s=e),n&&(r.ls=n),t.connectionURL(W,r)},e.prototype.open=function(e,n){var r=this;this.onDisconnect=n,this.onMessage=e,this.log_("Websocket connecting to "+this.connURL),this.everConnected_=!1,f.set("previous_websocket_failure",!0);try{if(Object(o.z)()){var i=this.nodeAdmin?"AdminNode":"Node",a={headers:{"User-Agent":"Firebase/5/"+hn+"/"+t.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,FAST_REFRESH:!0}),u=0===this.connURL.indexOf("wss://")?s.HTTPS_PROXY||s.https_proxy:s.HTTP_PROXY||s.http_proxy;u&&(a.proxy={origin:u}),this.mySock=new dn(this.connURL,[],a)}else{a={headers:{"X-Firebase-GMPID":this.applicationId||""}};this.mySock=new dn(this.connURL,[],a)}}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(){r.log_("Websocket connected."),r.everConnected_=!0}
2,this.mySock.onclose=function(){r.log_("Websocket connection was disconnected."),r.mySock=null,r.onClosed_()},this.mySock.onmessage=function(t){r.handleIncomingFrame(t)},this.mySock.onerror=function(t){r.log_("WebSocket error. Closing connection.");var e=t.message||t.data;e&&r.log_(e),r.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!==dn&&!e.forceDisallow_},e.previouslyFailed=function(){return f.isInMemoryStorage||!0===f.get("previous_websocket_failure")},e.prototype.markConnectionHealthy=function(){f.remove("previous_websocket_failure")},e.prototype.appendFrame_=function(t){if(this.frames.push(t),this.frames.length===this.totalFrames){var e=this.frames.join("");this.frames=null;var n=Object(o.D)(e);this.onMessage(n)}},e.prototype.handleNewFrameCount_=function(t){this.totalFrames=t,this.frames=[]},e.prototype.extractFrameCount_=function(t){if(Object(o.f)(null===this.frames,"We already have a frame buffer"),t.length<=6){var e=Number(t);if(!isNaN(e))return this.handleNewFrameCount_(e),null}return this.handleNewFrameCount_(1),t},e.prototype.handleIncomingFrame=function(t){if(null!==this.mySock){var e=t.data;if(this.bytesReceived+=e.length,this.stats_.incrementCounter("bytes_received",e.length),this.resetKeepAlive(),null!==this.frames)this.appendFrame_(e);else{var n=this.extractFrameCount_(e);null!==n&&this.appendFrame_(n)}}},e.prototype.send=function(t){this.resetKeepAlive();var e=Object(o.J)(t);this.bytesSent+=e.length,this.stats_.incrementCounter("bytes_sent",e.length);var n=P(e,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 t=this;clearInterval(this.keepaliveTimer),this.keepaliveTimer=setInterval((function(){t.mySock&&t.sendString_("0"),t.resetKeepAlive()}),Math.floor(45e3))},e.prototype.sendString_=function(t){try{this.mySock.send(t)}catch(e){this.log_("Exception thrown from WebSocket.send():",e.message||e.data,"Closing connection."),setTimeout(this.onClosed_.bind(this),0)}},e.responsesRequiredToBeHealthy=2,e.healthyTimeout=3e4,e}(),gn=function(){function t(t){this.initTransports_(t)}return Object.defineProperty(t,"ALL_TRANSPORTS",{get:function(){return[ln,yn]},enumerable:!1,configurable:!0}),t.prototype.initTransports_=function(e){var n,r,o=yn&&yn.isAvailable(),a=o&&!yn.previouslyFailed();if(e.webSocketOnly&&(o||O("wss:// URL used, but browser isn't known to support websockets. Trying anyway."),a=!0),a)this.transports_=[yn];else{var s=this.transports_=[];try{for(var u=Object(i.h)(t.ALL_TRANSPORTS),c=u.next();!c.done;c=u.next()){var l=c.value;l&&l.isAvailable()&&s.push(l)}}catch(f){n={error:f}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}},t.prototype.initialTransport=function(){if(this.transports_.length>0)return this.transports_[0];throw new Error("No transports available")},t.prototype.upgradeTransport=function(){return this.transports_.length>1?this.transports_[1]:null},t}(),mn=function(){function t(t,e,n,r,i,o,a,s){this.id=t,this.repoInfo_=e,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_=_("c:"+this.id+":"),this.transportManager_=new gn(e),this.log_("Connection created"),this.start_()}return t.prototype.start_=function(){var t=this,e=this.transportManager_.initialTransport();this.conn_=new e(this.nextTransportId_(),this.repoInfo_,this.applicationId_,void 0,this.lastSessionId),this.primaryResponsesRequired_=e.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(){t.conn_&&t.conn_.open(n,r)}),Math.floor(0));var i=e.healthyTimeout||0;i>0&&(this.healthyTimeout_=V((function(){t.healthyTimeout_=null,t.isHealthy_||(t.conn_&&t.conn_.bytesReceived>
2102400?(t.log_("Connection exceeded healthy timeout but has received "+t.conn_.bytesReceived+" bytes. Marking connection healthy."),t.isHealthy_=!0,t.conn_.markConnectionHealthy()):t.conn_&&t.conn_.bytesSent>10240?t.log_("Connection exceeded healthy timeout but has sent "+t.conn_.bytesSent+" bytes. Leaving connection alive."):(t.log_("Closing unhealthy connection after timeout."),t.close()))}),Math.floor(i)))},t.prototype.nextTransportId_=function(){return"c:"+this.id+":"+this.connectionCount++},t.prototype.disconnReceiver_=function(t){var e=this;return function(n){t===e.conn_?e.onConnectionLost_(n):t===e.secondaryConn_?(e.log_("Secondary connection lost."),e.onSecondaryConnectionLost_()):e.log_("closing an old connection")}},t.prototype.connReceiver_=function(t){var e=this;return function(n){2!==e.state_&&(t===e.rx_?e.onPrimaryMessageReceived_(n):t===e.secondaryConn_?e.onSecondaryMessageReceived_(n):e.log_("message on old connection"))}},t.prototype.sendRequest=function(t){var e={t:"d",d:t};this.sendData_(e)},t.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)},t.prototype.onSecondaryControl_=function(t){if("t"in t){var e=t.t;"a"===e?this.upgradeIfSecondaryHealthy_():"r"===e?(this.log_("Got a reset on secondary, closing it"),this.secondaryConn_.close(),this.tx_!==this.secondaryConn_&&this.rx_!==this.secondaryConn_||this.close()):"o"===e&&(this.log_("got pong on secondary."),this.secondaryResponsesRequired_--,this.upgradeIfSecondaryHealthy_())}},t.prototype.onSecondaryMessageReceived_=function(t){var e=A("t",t),n=A("d",t);if("c"===e)this.onSecondaryControl_(n);else{if("d"!==e)throw new Error("Unknown protocol layer: "+e);this.pendingDataMessages.push(n)}},t.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:{}}}))},t.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()},t.prototype.onPrimaryMessageReceived_=function(t){var e=A("t",t),n=A("d",t);"c"===e?this.onControl_(n):"d"===e&&this.onDataMessage_(n)},t.prototype.onDataMessage_=function(t){this.onPrimaryResponse_(),this.onMessage_(t)},t.prototype.onPrimaryResponse_=function(){this.isHealthy_||(this.primaryResponsesRequired_--,this.primaryResponsesRequired_<=0&&(this.log_("Primary connection is healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()))},t.prototype.onControl_=function(t){var e=A("t",t);if("d"in t){var n=t.d;if("h"===e)this.onHandshake_(n);else if("n"===e){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"===e?this.onConnectionShutdown_(n):"r"===e?this.onReset_(n):"e"===e?E("Server Error: "+n):"o"===e?(this.log_("got pong on primary."),this.onPrimaryResponse_(),this.sendPingOnPrimaryIfNecessary_()):E("Unknown control packet command: "+e)}},t.prototype.onHandshake_=function(t){var e=t.ts,n=t.v,r=t.h;this.sessionId=t.s,this.repoInfo_.updateHost(r),0===this.state_&&(this.conn_.start(),this.onConnectionEstablished_(this.conn_,e),z!==n&&O("Protocol version mismatch detected"),this.tryStartUpgrade_())},t.prototype.tryStartUpgrade_=function(){var t=this.transportManager_.upgradeTransport();t&&this.startUpgrade_(t)},t.prototype.startUpgrade_=function(t){var e=this;this.secondaryConn_=new t(this.nextTransportId_(),this.repoInfo_,this.applicationId_,this.sessionId),this.secondaryResponsesRequired_=t.responsesRequiredToBeHealthy||0;var n=this.connReceiver_(this.secondaryConn_),r=this.disconnReceiver_(this.secondaryConn_);this.secondaryConn_.open(n,r),V((function(){e.secondaryConn_&&(e.log_("Timed out trying to upgrade."),e.secondaryConn_.close())}),Math.floor(6e4))},t.prototype.onReset_=function(t){this.log_("Reset packet received. New host: "+t),this.repoInfo_.updateHost(t),1===this.state_?this.close():(this.closeConnections_(),this.start_())},t.prototype.onConnectionEstablished_=function(t,e){var n=this;this.log_("Realtime connection established."),this.conn_=t,this.state_=1,this.onReady_&&(this.onReady_(e,this.sessionId),this.onReady_=null),0===this.primaryResponsesRequired_?(this.log_("Primary connection is healthy."),this.isHealthy_=!0):V((function(){n.sendPingOnPrimaryIfNecessary_()}),Math.floor(5e3))},t.prototype.sendPingOnPrimaryIfNecessary_=function(){this.isHealthy_||1!==this.state_||(this.log_("sending ping on primary."),this.sendData_({t:"c",d:{t:"p",d:{}}}))},t.prototype.onSecondaryConnectionLost_=function(){var t=this.secondaryConn_;this.secondaryConn_=null,this.tx_!==t&&this.rx_!==t||this.close()},t.prototype.onConnectionLost_=function(t){this.conn_=null,t||0!==this.state_?1===this.state_&&this.log_("Realtime connection lost."):(this.log_("Realtime connection failed."),this.repoInfo_.isCacheableHost()&&(f.remove("host:"+this.repoInfo_.host),this.repoInfo_.internalHost=this.repoInfo_.host)),this.close()},t.prototype.onConnectionShutdown_=function(t){this.log_("Connection shutdown command received. Shutting down..."),this.onKill_&&(this.onKill_(t),this.onKill_=null),this.onDisconnect_=null,this.close()},t.prototype.sendData_=function(t){if(1!==this.state_)throw"Connection is not connected";this.tx_.send(t)},t.prototype.close=function(){2!==this.state_&&(this.log_("Closing realtime connection."),this.state_=2,this.closeConnections_(),this.onDisconnect_&&(this.onDisconnect_(),this.onDisconnect_=null))},t.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)},t}(),bn=function(){function t(){}return t.prototype.put=function(t,e,n,r){},t.prototype.merge=function(t,e,n,r){},t.prototype.refreshAuthToken=function(t){},t.prototype.onDisconnectPut=function(t,e,n){},t.prototype.onDisconnectMerge=function(t,e,n){},t.prototype.onDisconnectCancel=function(t,e){},t.prototype.reportStats=function(t){},t}(),wn=1e3,_n=function(t){function e(n,r,i,a,s,u,c){var l=t.call(this)||this;if(l.repoInfo_=n,l.applicationId_=r,l.onDataUpdate_=i,l.onConnectStatus_=a,l.onServerInfoUpdate_=s,l.authTokenProvider_=u,l.authOverride_=c,l.id=e.nextPersistentConnectionId_++,l.log_=_("p:"+l.id+":"),l.interruptReasons_={},l.listens=new Map,l.outstandingPuts_=[],l.outstandingGets_=[],l.outstandingPutCount_=0,l.outstandingGetCount_=0,l.onDisconnectRequestQueue_=[],l.connected_=!1,l.reconnectDelay_=wn,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&&!Object(o.z)())throw new Error("Auth override specified in options, but not supported on non Node.js platforms");return l.scheduleConnect_(0),on.getInstance().on("visible",l.onVisible_,l),-1===n.host.indexOf("fblocal")&&an.getInstance().on("online",l.onOnline_,l),l}return Object(i.c)(e,t),e.prototype.sendRequest=function(t,e,n){var r=++this.requestNumber_,i={r:r,a:t,b:e};this.log_(Object(o.J)(i)),Object(o.f)(this.connected_,"sendRequest call when we're not connected not allowed."),this.realtime_.sendRequest(i),n&&(this.requestCBHash_[r]=n)},e.prototype.get=function(t){var e=this,n=new o.a,r={p:t.path.toString(),q:t.queryObject()},i={action:"g",request:r,onComplete:function(t){var i=t.d;"ok"===t.s?(e.onDataUpdate_(r.p,i,!1,null),n.resolve(i)):n.reject(i)}};this.outstandingGets_.push(i),this.outstandingGetCount_++;var a=this.outstandingGets_.length-1;return this.connected_||setTimeout((function(){var t=e.outstandingGets_[a];void 0!==t&&i===t&&(delete e.outstandingGets_[a],e.outstandingGetCount_--,0===e.outstandingGetCount_&&(e.outstandingGets_=[]),e.log_("get "+a+" timed out on connection"),n.reject(new Error("Client is offline.")))}),3e3),this.connected_&&this.sendGet_(a),n.promise},e.prototype.listen=function(t,e,n,r){var i=t.queryIdentifier(),a=t.path.toString();this.log_("Listen called for "+a+" "+i),this.listens.has(a)||this.listens.set(a,new Map),Object(o.f)(t.getQueryParams().isDefault()||!t.getQueryParams().loadsAllData(),"listen() called for non-default but complete query"),Object(o.f)(!this.listens.get(a).has(i),"listen() called twice for same path/queryId.");var s={onComplete:r,hashFn:e,query:t,tag:n};this.listens.get(a).set(i,s),this.connected_&&this.sendListen_(s)},e.prototype.sendGet_=function(t){var e=this,n=this.outstandingGets_[t];this.sendRequest("g",n.request,(function(r){delete e.outstandingGets_[t],e.outstandingGetCount_--,0===e.outstandingGetCount_&&(e.outstandingGets_=[]),n.onComplete&&n.onComplete(r)}))},e.prototype.sendListen_=function(t){var n=this,r=t.query,i=r.path.toString(),o=r.queryIdentifier();this.log_("Listen on "+i+" for "+o);var a={p:i};t.tag&&(a.q=r.queryObject(),a.t=t.tag),a.h=t.hashFn(),this.sendRequest("q",a,(function(a){var s=a.d,u=a.s;e.warnOnListenWarnings_(s,r),(n.listens.get(i)&&n.listens.get(i).get(o))===t&&(n.log_("listen response",a),"ok"!==u&&n.removeListen_(i,o),t.onComplete&&t.onComplete(u,s))}))},e.warnOnListenWarnings_=function(t,e){if(t&&"object"===typeof t&&Object(o.k)(t,"w")){var n=Object(o.G)(t,"w");if(Array.isArray(n)&&~n.indexOf("no_index")){var r='".indexOn": "'+e.getQueryParams().getIndex().toString()+'"',i=e.path.toString();O("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.")}}},e.prototype.refreshAuthToken=function(t){this.authToken_=t,this.log_("Auth token refreshed"),this.authToken_?this.tryAuth():this.connected_&&this.sendRequest("unauth",{},(function(){})),this.reduceReconnectDelayIfAdminCredential_(t)},e.prototype.reduceReconnectDelayIfAdminCredential_=function(t){(t&&40===t.length||Object(o.q)(t))&&(this.log_("Admin auth credential detected. Reducing max reconnect time."),this.maxReconnectDelay_=3e4)},e.prototype.tryAuth=function(){var t=this;if(this.connected_&&this.authToken_){var e=this.authToken_,n=Object(o.C)(e)?"auth":"gauth",r={cred:e};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";t.authToken_===e&&("ok"===r?t.invalidAuthTokenCount_=0:t.onAuthRevoked_(r,i))}))}},e.prototype.unlisten=function(t,e){var n=t.path.toString(),r=t.queryIdentifier();this.log_("Unlisten called for "+n+" "+r),Object(o.f)(t.getQueryParams().isDefault()||!t.getQueryParams().loadsAllData(),"unlisten() called for non-default but complete query"),this.removeListen_(n,r)&&this.connected_&&this.sendUnlisten_(n,r,t.queryObject(),e)},e.prototype.sendUnlisten_=function(t,e,n,r){this.log_("Unlisten on "+t+" for "+e);var i={p:t};r&&(i.q=n,i.t=r),this.sendRequest("n",i)},e.prototype.onDisconnectPut=function(t,e,n){this.connected_?this.sendOnDisconnect_("o",t,e,n):this.onDisconnectRequestQueue_.push({pathString:t,action:"o",data:e,onComplete:n})},e.prototype.onDisconnectMerge=function(t,e,n){this.connected_?this.sendOnDisconnect_("om",t,e,n):this.onDisconnectRequestQueue_.push({pathString:t,action:"om",data:e,onComplete:n})},e.prototype.onDisconnectCancel=function(t,e){this.connected_?this.sendOnDisconnect_("oc",t,null,e):this.onDisconnectRequestQueue_.push({pathString:t,action:"oc",data:null,onComplete:e})},e.prototype.sendOnDisconnect_=function(t,e,n,r){var i={p:e,d:n};this.log_("onDisconnect "+t,i),this.sendRequest(t,i,(function(t){r&&setTimeout((function(){r(t.s,t.d)}),Math.floor(0))}))},e.prototype.put=function(t,e,n,r){this.putInternal("p",t,e,n,r)},e.prototype.merge=function(t,e,n,r){this.putInternal("m",t,e,n,r)},e.prototype.putInternal=function(t,e,n,r,i){var o={p:e,d:n};void 0!==i&&(o.h=i),this.outstandingPuts_.push({action:t,request:o,onComplete:r}),this.outstandingPutCount_++;var a=this.outstandingPuts_.length-1;this.connected_?this.sendPut_(a):this.log_("Buffering put: "+e)},e.prototype.sendPut_=function(t){var e=this,n=this.outstandingPuts_[t].action,r=this.outstandingPuts_[t].request,i=this.outstandingPuts_[t].onComplete;this.outstandingPuts_[t].queued=this.connected_,this.sendRequest(n,r,(function(r){e.log_(n+" response",r),delete e.outstandingPuts_[t],e.outstandingPutCount_--,0===e.outstandingPutCount_&&(e.outstandingPuts_=[]),i&&i(r.s,r.d)}))},e.prototype.reportStats=function(t){var e=this;if(this.connected_){var n={c:t};this.log_("reportStats",n),this.sendRequest("s",n,(function(t){if("ok"!==t.s){var n=t.d;e.log_("reportStats","Error sending stats: "+n)}}))}},e.prototype.onDataMessage_=function(t){if("r"in t){this.log_("from server: "+Object(o.J)(t));var e=t.r,n=this.requestCBHash_[e];n&&(delete this.requestCBHash_[e],n(t.b))}else{if("error"in t)throw"A server-side error has occurred: "+t.error;"a"in t&&this.onDataPush_(t.a,t.b)}},e.prototype.onDataPush_=function(t,e){this.log_("handleServerMessage",t,e),"d"===t?this.onDataUpdate_(e.p,e.d,!1,e.t):"m"===t?this.onDataUpdate_(e.p,e.d,!0,e.t):"c"===t?this.onListenRevoked_(e.p,e.q):"ac"===t?this.onAuthRevoked_(e.s,e.d):"sd"===t?this.onSecurityDebugPacket_(e):E("Unrecognized action received from server: "+Object(o.J)(t)+"\nAre you using the latest client?")},e.prototype.onReady_=function(t,e){this.log_("connection ready"),this.connected_=!0,this.lastConnectionEstablishedTime_=(new Date).getTime(),this.handleTimestamp_(t),this.lastSessionId=e,this.firstConnection_&&this.sendConnectStats_(),this.restoreState_(),this.firstConnection_=!1,this.onConnectStatus_(!0)},e.prototype.scheduleConnect_=function(t){var e=this;Object(o.f)(!this.realtime_,"Scheduling a connect when we're already connected/ing?"),this.establishConnectionTimer_&&clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=setTimeout((function(){e.establishConnectionTimer_=null,e.establishConnection_()}),Math.floor(t))},e.prototype.onVisible_=function(t){t&&!this.visible_&&this.reconnectDelay_===this.maxReconnectDelay_&&(this.log_("Window became visible. Reducing delay."),this.reconnectDelay_=wn,this.realtime_||this.scheduleConnect_(0)),this.visible_=t},e.prototype.onOnline_=function(t){t?(this.log_("Browser went online."),this.reconnectDelay_=wn,this.realtime_||this.scheduleConnect_(0)):(this.log_("Browser went offline. Killing connection."),this.realtime_&&this.realtime_.close())},e.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_=wn),this.lastConnectionEstablishedTime_=null}}else this.log_("Window isn't visible. Delaying reconnect."),this.reconnectDelay_=this.maxReconnectDelay_,this.lastConnectionAttemptTime_=(new Date).getTime();var t=(new Date).getTime()-this.lastConnectionAttemptTime_,e=Math.max(0,this.reconnectDelay_-t);
2e=Math.random()*e,this.log_("Trying to reconnect in "+e+"ms"),this.scheduleConnect_(e),this.reconnectDelay_=Math.min(this.maxReconnectDelay_,1.3*this.reconnectDelay_)}this.onConnectStatus_(!1)},e.prototype.establishConnection_=function(){var t=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),a=this.id+":"+e.nextConnectionId_++,s=this,u=this.lastSessionId,c=!1,l=null,f=function(){l?l.close():(c=!0,i())};this.realtime_={close:f,sendRequest:function(t){Object(o.f)(l,"sendRequest call when we're not connected not allowed."),l.sendRequest(t)}};var h=this.forceTokenRefresh_;this.forceTokenRefresh_=!1,this.authTokenProvider_.getToken(h).then((function(t){c?w("getToken() completed but was canceled"):(w("getToken() completed. Creating connection."),s.authToken_=t&&t.accessToken,l=new mn(a,s.repoInfo_,s.applicationId_,n,r,i,(function(t){O(t+" ("+s.repoInfo_.toString()+")"),s.interrupt("server_kill")}),u))})).then(null,(function(e){s.log_("Failed to get token: "+e),c||(t.repoInfo_.nodeAdmin&&O(e),f())}))}},e.prototype.interrupt=function(t){w("Interrupting connection for reason: "+t),this.interruptReasons_[t]=!0,this.realtime_?this.realtime_.close():(this.establishConnectionTimer_&&(clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=null),this.connected_&&this.onRealtimeDisconnect_())},e.prototype.resume=function(t){w("Resuming connection for reason: "+t),delete this.interruptReasons_[t],Object(o.u)(this.interruptReasons_)&&(this.reconnectDelay_=wn,this.realtime_||this.scheduleConnect_(0))},e.prototype.handleTimestamp_=function(t){var e=t-(new Date).getTime();this.onServerInfoUpdate_({serverTimeOffset:e})},e.prototype.cancelSentTransactions_=function(){for(var t=0;t<this.outstandingPuts_.length;t++){var e=this.outstandingPuts_[t];e&&"h"in e.request&&e.queued&&(e.onComplete&&e.onComplete("disconnect"),delete this.outstandingPuts_[t],this.outstandingPutCount_--)}0===this.outstandingPutCount_&&(this.outstandingPuts_=[])},e.prototype.onListenRevoked_=function(t,e){var n;n=e?e.map((function(t){return x(t)})).join("$"):"default";var r=this.removeListen_(t,n);r&&r.onComplete&&r.onComplete("permission_denied")},e.prototype.removeListen_=function(t,e){var n,r=new q(t).toString();if(this.listens.has(r)){var i=this.listens.get(r);n=i.get(e),i.delete(e),0===i.size&&this.listens.delete(r)}else n=void 0;return n},e.prototype.onAuthRevoked_=function(t,e){w("Auth token revoked: "+t+"/"+e),this.authToken_=null,this.forceTokenRefresh_=!0,this.realtime_.close(),"invalid_token"!==t&&"permission_denied"!==t||(this.invalidAuthTokenCount_++,this.invalidAuthTokenCount_>=3&&(this.reconnectDelay_=3e4,this.authTokenProvider_.notifyForInvalidToken()))},e.prototype.onSecurityDebugPacket_=function(t){this.securityDebugCallback_?this.securityDebugCallback_(t):"msg"in t&&console.log("FIREBASE: "+t.msg.replace("\n","\nFIREBASE: "))},e.prototype.restoreState_=function(){var t,e,n,r;this.tryAuth();try{for(var o=Object(i.h)(this.listens.values()),a=o.next();!a.done;a=o.next()){var s=a.value;try{for(var u=(n=void 0,Object(i.h)(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){t={error:d}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}for(var f=0;f<this.outstandingPuts_.length;f++)this.outstandingPuts_[f]&&this.sendPut_(f);for(;this.onDisconnectRequestQueue_.length;){var h=this.onDisconnectRequestQueue_.shift();this.sendOnDisconnect_(h.action,h.pathString,h.data,h.onComplete)}for(f=0;f<this.outstandingGets_.length;f++)this.outstandingGets_[f]&&this.sendGet_(f)},e.prototype.sendConnectStats_=function(){var t={},e="js";Object(o.z)()&&(e=this.repoInfo_.nodeAdmin?"admin_node":"node"),t["sdk."+e+"."+hn.replace(/\./g,"-")]=1,Object(o.x)()?t["framework.cordova"]=1:Object(o.A)()&&(t["framework.reactnative"]=1),this.reportStats(t)},e.prototype.shouldReconnect_=function(){var t=an.getInstance().currentlyOnline();return Object(o.u)(this.interruptReasons_)&&t},e.nextPersistentConnectionId_=0,e.nextConnectionId_=0,e}(bn),En=function(t){function e(e,n,r){var i=t.call(this)||this;return i.repoInfo_=e,i.onDataUpdate_=n,i.authTokenProvider_=r,i.log_=_("p:rest:"),i.listens_={},i}return Object(i.c)(e,t),e.prototype.reportStats=function(t){throw new Error("Method not implemented.")},e.getListenId_=function(t,e){return void 0!==e?"tag$"+e:(Object(o.f)(t.getQueryParams().isDefault(),"should have a tag if it's not a default query."),t.path.toString())},e.prototype.listen=function(t,n,r,i){var a=this,s=t.path.toString();this.log_("Listen called for "+s+" "+t.queryIdentifier());var u=e.getListenId_(t,r),c={};this.listens_[u]=c;var l=t.getQueryParams().toRestQueryStringParameters();this.restRequest_(s+".json",l,(function(t,e){var n=e;(404===t&&(n=null,t=null),null===t&&a.onDataUpdate_(s,n,!1,r),Object(o.G)(a.listens_,u)===c)&&i(t?401===t?"permission_denied":"rest_error:"+t:"ok",null)}))},e.prototype.unlisten=function(t,n){var r=e.getListenId_(t,n);delete this.listens_[r]},e.prototype.get=function(t){var e=this,n=t.getQueryParams().toRestQueryStringParameters(),r=t.path.toString(),i=new o.a;return this.restRequest_(r+".json",n,(function(t,n){var o=n;404===t&&(o=null,t=null),null===t?(e.onDataUpdate_(r,o,!1,null),i.resolve(o)):i.reject(new Error(o))})),i.promise},e.prototype.refreshAuthToken=function(t){},e.prototype.restRequest_=function(t,e,n){var r=this;void 0===e&&(e={}),e.format="export",this.authTokenProvider_.getToken(!1).then((function(i){var a=i&&i.accessToken;a&&(e.auth=a);var s=(r.repoInfo_.secure?"https://":"http://")+r.repoInfo_.host+t+"?ns="+r.repoInfo_.namespace+Object(o.F)(e);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 t=null;if(u.status>=200&&u.status<300){try{t=Object(o.D)(u.responseText)}catch(e){O("Failed to parse JSON response for "+s+": "+u.responseText)}n(null,t)}else 401!==u.status&&404!==u.status&&O("Got unsuccessful REST response for "+s+" Status: "+u.status),n(u.status);n=null}},u.open("GET",s,!0),u.send()}))},e}(bn),Tn=function(){this.children={},this.childCount=0,this.value=null},On=function(){function t(t,e,n){void 0===t&&(t=""),void 0===e&&(e=null),void 0===n&&(n=new Tn),this.name_=t,this.parent_=e,this.node_=n}return t.prototype.subTree=function(e){for(var n=e instanceof q?e:new q(e),r=this,i=n.getFront();null!==i;
2){r=new t(i,r,Object(o.G)(r.node_.children,i)||new Tn),i=(n=n.popFront()).getFront()}return r},t.prototype.getValue=function(){return this.node_.value},t.prototype.setValue=function(t){Object(o.f)("undefined"!==typeof t,"Cannot set value to undefined"),this.node_.value=t,this.updateParents_()},t.prototype.clear=function(){this.node_.value=null,this.node_.children={},this.node_.childCount=0,this.updateParents_()},t.prototype.hasChildren=function(){return this.node_.childCount>0},t.prototype.isEmpty=function(){return null===this.getValue()&&!this.hasChildren()},t.prototype.forEachChild=function(e){var n=this;R(this.node_.children,(function(r,i){e(new t(r,n,i))}))},t.prototype.forEachDescendant=function(t,e,n){e&&!n&&t(this),this.forEachChild((function(e){e.forEachDescendant(t,!0,n)})),e&&n&&t(this)},t.prototype.forEachAncestor=function(t,e){for(var n=e?this:this.parent();null!==n;){if(t(n))return!0;n=n.parent()}return!1},t.prototype.forEachImmediateDescendantWithValue=function(t){this.forEachChild((function(e){null!==e.getValue()?t(e):e.forEachImmediateDescendantWithValue(t)}))},t.prototype.path=function(){return new q(null===this.parent_?this.name_:this.parent_.path()+"/"+this.name_)},t.prototype.name=function(){return this.name_},t.prototype.parent=function(){return this.parent_},t.prototype.updateParents_=function(){null!==this.parent_&&this.parent_.updateChild_(this.name_,this)},t.prototype.updateChild_=function(t,e){var n=e.isEmpty(),r=Object(o.k)(this.node_.children,t);n&&r?(delete this.node_.children[t],this.node_.childCount--,this.updateParents_()):n||r||(this.node_.children[t]=e.node_,this.node_.childCount++,this.updateParents_())},t}(),Sn="repo_interrupt";!function(t){t[t.RUN=0]="RUN",t[t.SENT=1]="SENT",t[t.COMPLETED=2]="COMPLETED",t[t.SENT_NEEDS_ABORT=3]="SENT_NEEDS_ABORT",t[t.NEEDS_ABORT=4]="NEEDS_ABORT"}(vn||(vn={}));var In=function(){function t(t,e,n,r){this.repoInfo_=t,this.forceRestClient_=e,this.app=n,this.authTokenProvider_=r,this.dataUpdateCount=0,this.statsListener_=null,this.eventQueue_=new en,this.nextWriteId_=1,this.interceptServerDataCallback_=null,this.onDisconnect_=new he,this.transactionQueueTree_=new On,this.persistentConnection_=null,this.key=this.repoInfo_.toURLString()}return t.prototype.start=function(){var t=this;if(this.stats_=Je.getCollection(this.repoInfo_),this.forceRestClient_||("object"===typeof window&&window.navigator&&window.navigator.userAgent||"").search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)>=0)this.server_=new En(this.repoInfo_,this.onDataUpdate_.bind(this),this.authTokenProvider_),setTimeout(this.onConnectStatus_.bind(this,!0),0);else{var e=this.app.options.databaseAuthVariableOverride;if("undefined"!==typeof e&&null!==e){if("object"!==typeof e)throw new Error("Only objects are supported for option databaseAuthVariableOverride");try{Object(o.J)(e)}catch(n){throw new Error("Invalid authOverride provided: "+n)}}this.persistentConnection_=new _n(this.repoInfo_,this.app.options.appId,this.onDataUpdate_.bind(this),this.onConnectStatus_.bind(this),this.onServerInfoUpdate_.bind(this),this.authTokenProvider_,e),this.server_=this.persistentConnection_}this.authTokenProvider_.addTokenChangeListener((function(e){t.server_.refreshAuthToken(e)})),this.statsReporter_=Je.getOrCreateReporter(this.repoInfo_,(function(){return new tn(t.stats_,t.server_)})),this.infoData_=new Xe,this.infoSyncTree_=new Ye({startListening:function(e,n,r,i){var o=[],a=t.infoData_.getNode(e.path);return a.isEmpty()||(o=t.infoSyncTree_.applyServerOverwrite(e.path,a),setTimeout((function(){i("ok")}),0)),o},stopListening:function(){}}),this.updateInfo_("connected",!1),this.serverSyncTree_=new Ye({startListening:function(e,n,r,i){return t.server_.listen(e,r,n,(function(n,r){var o=i(n,r);t.eventQueue_.raiseEventsForChangedPath(e.path,o)})),[]},stopListening:function(e,n){t.server_.unlisten(e,n)}})},t.prototype.toString=function(){return(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host},t.prototype.name=function(){return this.repoInfo_.namespace},t.prototype.serverTime=function(){var t=this.infoData_.getNode(new q(".info/serverTimeOffset")).val()||0;return(new Date).getTime()+t},t.prototype.generateServerValues=function(){return(t=(t={timestamp:this.serverTime()})||{}).timestamp=t.timestamp||(new Date).getTime(),t;var t},t.prototype.onDataUpdate_=function(t,e,n,r){this.dataUpdateCount++;var i=new q(t);e=this.interceptServerDataCallback_?this.interceptServerDataCallback_(t,e):e;var a=[];if(r)if(n){var s=Object(o.E)(e,(function(t){return Gt(t)}));a=this.serverSyncTree_.applyTaggedQueryMerge(i,s,r)}else{var u=Gt(e);a=this.serverSyncTree_.applyTaggedQueryOverwrite(i,u,r)}else if(n){var c=Object(o.E)(e,(function(t){return Gt(t)}));a=this.serverSyncTree_.applyServerMerge(i,c)}else{var l=Gt(e);a=this.serverSyncTree_.applyServerOverwrite(i,l)}var f=i;a.length>0&&(f=this.rerunTransactions_(i)),this.eventQueue_.raiseEventsForChangedPath(f,a)},t.prototype.interceptServerData_=function(t){this.interceptServerDataCallback_=t},t.prototype.onConnectStatus_=function(t){this.updateInfo_("connected",t),!1===t&&this.runOnDisconnectEvents_()},t.prototype.onServerInfoUpdate_=function(t){var e=this;R(t,(function(t,n){e.updateInfo_(t,n)}
2))},t.prototype.updateInfo_=function(t,e){var n=new q("/.info/"+t),r=Gt(e);this.infoData_.updateSnapshot(n,r);var i=this.infoSyncTree_.applyServerOverwrite(n,r);this.eventQueue_.raiseEventsForChangedPath(n,i)},t.prototype.getNextWriteId_=function(){return this.nextWriteId_++},t.prototype.getValue=function(t){var e=this,n=this.serverSyncTree_.getServerValue(t);return null!=n?Promise.resolve(new $t(n,t.getRef(),t.getQueryParams().getIndex())):this.server_.get(t).then((function(n){var r=Gt(n),i=e.serverSyncTree_.applyServerOverwrite(t.path,r);return e.eventQueue_.raiseEventsAtPath(t.path,i),Promise.resolve(new $t(r,t.getRef(),t.getQueryParams().getIndex()))}),(function(n){return e.log_("get for query "+Object(o.J)(t)+" failed: "+n),Promise.reject(new Error(n))}))},t.prototype.setWithPriority=function(t,e,n,r){var i=this;this.log_("set",{path:t.toString(),value:e,priority:n});var o=this.generateServerValues(),a=Gt(e,n),s=this.serverSyncTree_.calcCompleteEventCache(t),u=ce(a,s,o),c=this.getNextWriteId_(),l=this.serverSyncTree_.applyUserOverwrite(t,u,c,!0);this.eventQueue_.queueEvents(l),this.server_.put(t.toString(),a.val(!0),(function(e,n){var o="ok"===e;o||O("set at "+t+" failed: "+e);var a=i.serverSyncTree_.ackUserWrite(c,!o);i.eventQueue_.raiseEventsForChangedPath(t,a),i.callOnCompleteCallback(r,e,n)}));var f=this.abortTransactions_(t);this.rerunTransactions_(f),this.eventQueue_.raiseEventsForChangedPath(f,[])},t.prototype.update=function(t,e,n){var r=this;this.log_("update",{path:t.toString(),value:e});var i=!0,o=this.generateServerValues(),a={};if(R(e,(function(e,n){i=!1,a[e]=ue(t.child(e),Gt(n),r.serverSyncTree_,o)})),i)w("update() called with empty data. Don't do anything."),this.callOnCompleteCallback(n,"ok");else{var s=this.getNextWriteId_(),u=this.serverSyncTree_.applyUserMerge(t,a,s);this.eventQueue_.queueEvents(u),this.server_.merge(t.toString(),e,(function(e,i){var o="ok"===e;o||O("update at "+t+" failed: "+e);var a=r.serverSyncTree_.ackUserWrite(s,!o),u=a.length>0?r.rerunTransactions_(t):t;r.eventQueue_.raiseEventsForChangedPath(u,a),r.callOnCompleteCallback(n,e,i)})),R(e,(function(e){var n=r.abortTransactions_(t.child(e));r.rerunTransactions_(n)})),this.eventQueue_.raiseEventsForChangedPath(t,[])}},t.prototype.runOnDisconnectEvents_=function(){var t=this;this.log_("onDisconnectEvents");var e=this.generateServerValues(),n=new he;this.onDisconnect_.forEachTree(q.Empty,(function(r,i){var o=ue(r,i,t.serverSyncTree_,e);n.remember(r,o)}));var r=[];n.forEachTree(q.Empty,(function(e,n){r=r.concat(t.serverSyncTree_.applyServerOverwrite(e,n));var i=t.abortTransactions_(e);t.rerunTransactions_(i)})),this.onDisconnect_=new he,this.eventQueue_.raiseEventsForChangedPath(q.Empty,r)},t.prototype.onDisconnectCancel=function(t,e){var n=this;this.server_.onDisconnectCancel(t.toString(),(function(r,i){"ok"===r&&n.onDisconnect_.forget(t),n.callOnCompleteCallback(e,r,i)}))},t.prototype.onDisconnectSet=function(t,e,n){var r=this,i=Gt(e);this.server_.onDisconnectPut(t.toString(),i.val(!0),(function(e,o){"ok"===e&&r.onDisconnect_.remember(t,i),r.callOnCompleteCallback(n,e,o)}))},t.prototype.onDisconnectSetWithPriority=function(t,e,n,r){var i=this,o=Gt(e,n);this.server_.onDisconnectPut(t.toString(),o.val(!0),(function(e,n){"ok"===e&&i.onDisconnect_.remember(t,o),i.callOnCompleteCallback(r,e,n)}))},t.prototype.onDisconnectUpdate=function(t,e,n){var r=this;if(Object(o.u)(e))return w("onDisconnect().update() called with empty data. Don't do anything."),void this.callOnCompleteCallback(n,"ok");this.server_.onDisconnectMerge(t.toString(),e,(function(i,o){"ok"===i&&R(e,(function(e,n){var i=Gt(n);r.onDisconnect_.remember(t.child(e),i)})),r.callOnCompleteCallback(n,i,o)}))},t.prototype.addEventCallbackForQuery=function(t,e){var n;n=".info"===t.path.getFront()?this.infoSyncTree_.addEventRegistration(t,e):this.serverSyncTree_.addEventRegistration(t,e),this.eventQueue_.raiseEventsAtPath(t.path,n)},t.prototype.removeEventCallbackForQuery=function(t,e){var n;n=".info"===t.path.getFront()?this.infoSyncTree_.removeEventRegistration(t,e):this.serverSyncTree_.removeEventRegistration(t,e),this.eventQueue_.raiseEventsAtPath(t.path,n)},t.prototype.interrupt=function(){this.persistentConnection_&&this.persistentConnection_.interrupt(Sn)},t.prototype.resume=function(){this.persistentConnection_&&this.persistentConnection_.resume(Sn)},t.prototype.stats=function(t){if(void 0===t&&(t=!1),"undefined"!==typeof console){var e;t?(this.statsListener_||(this.statsListener_=new Ze(this.stats_)),e=this.statsListener_.get()):e=this.stats_.get();var n=Object.keys(e).reduce((function(t,e){return Math.max(e.length,t)}),0);R(e,(function(t,e){for(var r=t,i=t.length;i<n+2;i++)r+=" ";console.log(r+e)}))}},t.prototype.statsIncrementCounter=function(t){this.stats_.incrementCounter(t),this.statsReporter_.includeStat(t)}
2,t.prototype.log_=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="";this.persistentConnection_&&(n=this.persistentConnection_.id+":"),w.apply(void 0,Object(i.f)([n],t))},t.prototype.callOnCompleteCallback=function(t,e,n){t&&U((function(){if("ok"===e)t(null);else{var r=(e||"error").toUpperCase(),i=r;n&&(i+=": "+n);var o=new Error(i);o.code=r,t(o)}}))},Object.defineProperty(t.prototype,"database",{get:function(){return this.__database||(this.__database=new Dn(this))},enumerable:!1,configurable:!0}),t.prototype.startTransaction=function(t,e,n,r){this.log_("transaction on "+t);var i=function(){},a=new An(this,t);a.on("value",i);var s={path:t,update:e,onComplete:n,status:null,order:d(),applyLocally:r,retryCount:0,unwatcher:function(){a.off("value",i)},abortReason:null,currentWriteId:null,currentInputSnapshot:null,currentOutputSnapshotRaw:null,currentOutputSnapshotResolved:null},u=this.getLatestState_(t);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 $t(s.currentInputSnapshot,new An(this,s.path),Rt);s.onComplete(null,!1,l)}}else{ot("transaction failed: Data returned ",c,s.path),s.status=vn.RUN;var f=this.transactionQueueTree_.subTree(t),h=f.getValue()||[];h.push(s),f.setValue(h);var p=void 0;if("object"===typeof c&&null!==c&&Object(o.k)(c,".priority"))p=Object(o.G)(c,".priority"),Object(o.f)(rt(p),"Invalid priority returned by transaction. Priority must be a valid string, finite number, server value, or null.");else p=(this.serverSyncTree_.calcCompleteEventCache(t)||Wt.EMPTY_NODE).getPriority().val();var v=this.generateServerValues(),y=Gt(c,p),g=ce(y,u,v);s.currentOutputSnapshotRaw=y,s.currentOutputSnapshotResolved=g,s.currentWriteId=this.getNextWriteId_();var m=this.serverSyncTree_.applyUserOverwrite(t,g,s.currentWriteId,s.applyLocally);this.eventQueue_.raiseEventsForChangedPath(t,m),this.sendReadyTransactions_()}},t.prototype.getLatestState_=function(t,e){return this.serverSyncTree_.calcCompleteEventCache(t,e)||Wt.EMPTY_NODE},t.prototype.sendReadyTransactions_=function(t){var e=this;if(void 0===t&&(t=this.transactionQueueTree_),t||this.pruneCompletedTransactionsBelowNode_(t),null!==t.getValue()){var n=this.buildTransactionQueue_(t);Object(o.f)(n.length>0,"Sending zero length transaction queue"),n.every((function(t){return t.status===vn.RUN}))&&this.sendTransactionQueue_(t.path(),n)}else t.hasChildren()&&t.forEachChild((function(t){e.sendReadyTransactions_(t)}))},t.prototype.sendTransactionQueue_=function(t,e){for(var n=this,r=e.map((function(t){return t.currentWriteId})),i=this.getLatestState_(t,r),a=i,s=i.hash(),u=0;u<e.length;u++){var c=e[u];Object(o.f)(c.status===vn.RUN,"tryToSendTransactionQueue_: items in queue should all be run."),c.status=vn.SENT,c.retryCount++;var l=q.relativePath(t,c.path);a=a.updateChild(l,c.currentOutputSnapshotRaw)}var f=a.val(!0),h=t;this.server_.put(h.toString(),f,(function(r){n.log_("transaction put response",{path:h.toString(),status:r});var i=[];if("ok"===r){for(var o=[],a=0;a<e.length;a++){if(e[a].status=vn.COMPLETED,i=i.concat(n.serverSyncTree_.ackUserWrite(e[a].currentWriteId)),e[a].onComplete){var s=e[a].currentOutputSnapshotResolved,u=new An(n,e[a].path),c=new $t(s,u,Rt);o.push(e[a].onComplete.bind(null,null,!0,c))}e[a].unwatcher()}n.pruneCompletedTransactionsBelowNode_(n.transactionQueueTree_.subTree(t)),n.sendReadyTransactions_(),n.eventQueue_.raiseEventsForChangedPath(t,i);for(a=0;a<o.length;a++)U(o[a])}else{if("datastale"===r)for(a=0;a<e.length;a++)e[a].status===vn.SENT_NEEDS_ABORT?e[a].status=vn.NEEDS_ABORT:e[a].status=vn.RUN;else{O("transaction at "+h.toString()+" failed: "+r);for(a=0;a<e.length;a++)e[a].status=vn.NEEDS_ABORT,e[a].abortReason=r}n.rerunTransactions_(t)}}),s)},t.prototype.rerunTransactions_=function(t){var e=this.getAncestorTransactionNode_(t),n=e.path(),r=this.buildTransactionQueue_(e);return this.rerunTransactionQueue_(r,n),n},t.prototype.rerunTransactionQueue_=function(t,e){if(0!==t.length){for(var n,r=[],i=[],a=t.filter((function(t){return t.status===vn.RUN})).map((function(t){return t.currentWriteId})),s=0;s<t.length;s++){var u=t[s],c=q.relativePath(e,u.path),l=!1,f=void 0;if(Object(o.f)(null!==c,"rerunTransactionsUnderNode_: relativePath should not be null."),u.status===vn.NEEDS_ABORT)l=!0,f=u.abortReason,i=i.concat(this.serverSyncTree_.ackUserWrite(u.currentWriteId,!0));else if(u.status===vn.RUN)if(u.retryCount>=25)l=!0,f="maxretry",i=i.concat(this.serverSyncTree_.ackUserWrite(u.currentWriteId,!0));else{var h=this.getLatestState_(u.path,a);u.currentInputSnapshot=h;var p=t[s].update(h.val());if(void 0!==p){ot("transaction failed: Data returned ",p,u.path);var d=Gt(p);"object"===typeof p&&null!=p&&Object(o.k)(p,".priority")||(d=d.updatePriority(h.getPriority()));var v=u.currentWriteId,y=this.generateServerValues(),g=ce(d,h,y);u.currentOutputSnapshotRaw=d,u.currentOutputSnapshotResolved=g,u.currentWriteId=this.getNextWriteId_(),a.splice(a.indexOf(v),1),i=(i=i.concat(this.serverSyncTree_.applyUserOverwrite(u.path,g,u.currentWriteId,u.applyLocally))).concat(this.serverSyncTree_.ackUserWrite(v,!0))}else l=!0,f="nodata",i=i.concat(this.serverSyncTree_.ackUserWrite(u.currentWriteId,!0))}if(this.eventQueue_.raiseEventsForChangedPath(e,i),i=[],l&&(t[s].status=vn.COMPLETED,n=t[s].unwatcher,setTimeout(n,Math.floor(0)),t[s].onComplete))if("nodata"===f){var m=new An(this,t[s].path),b=t[s].currentInputSnapshot,w=new $t(b,m,Rt);r.push(t[s].onComplete.bind(null,null,!1,w))}else r.push(t[s].onComplete.bind(null,new Error(f),!1,null))}this.pruneCompletedTransactionsBelowNode_(this.transactionQueueTree_);for(s=0;s<r.length;s++)U(r[s]);this.sendReadyTransactions_()}},t.prototype.getAncestorTransactionNode_=function(t){var e,n=this.transactionQueueTree_;
2for(e=t.getFront();null!==e&&null===n.getValue();)n=n.subTree(e),e=(t=t.popFront()).getFront();return n},t.prototype.buildTransactionQueue_=function(t){var e=[];return this.aggregateTransactionQueuesForNode_(t,e),e.sort((function(t,e){return t.order-e.order})),e},t.prototype.aggregateTransactionQueuesForNode_=function(t,e){var n=this,r=t.getValue();if(null!==r)for(var i=0;i<r.length;i++)e.push(r[i]);t.forEachChild((function(t){n.aggregateTransactionQueuesForNode_(t,e)}))},t.prototype.pruneCompletedTransactionsBelowNode_=function(t){var e=this,n=t.getValue();if(n){for(var r=0,i=0;i<n.length;i++)n[i].status!==vn.COMPLETED&&(n[r]=n[i],r++);n.length=r,t.setValue(n.length>0?n:null)}t.forEachChild((function(t){e.pruneCompletedTransactionsBelowNode_(t)}))},t.prototype.abortTransactions_=function(t){var e=this,n=this.getAncestorTransactionNode_(t).path(),r=this.transactionQueueTree_.subTree(t);return r.forEachAncestor((function(t){e.abortTransactionsOnNode_(t)})),this.abortTransactionsOnNode_(r),r.forEachDescendant((function(t){e.abortTransactionsOnNode_(t)})),n},t.prototype.abortTransactionsOnNode_=function(t){var e=t.getValue();if(null!==e){for(var n=[],r=[],i=-1,a=0;a<e.length;a++)if(e[a].status===vn.SENT_NEEDS_ABORT);else if(e[a].status===vn.SENT)Object(o.f)(i===a-1,"All SENT items should be at beginning of queue."),i=a,e[a].status=vn.SENT_NEEDS_ABORT,e[a].abortReason="set";else if(Object(o.f)(e[a].status===vn.RUN,"Unexpected transaction status in abort"),e[a].unwatcher(),r=r.concat(this.serverSyncTree_.ackUserWrite(e[a].currentWriteId,!0)),e[a].onComplete){n.push(e[a].onComplete.bind(null,new Error("set"),!1,null))}-1===i?t.setValue(null):e.length=i+1,this.eventQueue_.raiseEventsForChangedPath(t.path(),r);for(a=0;a<n.length;a++)U(n[a])}},t}(),Cn=function(){function t(e){this.indexedFilter_=new Ce(e.getIndex()),this.index_=e.getIndex(),this.startPost_=t.getStartPost_(e),this.endPost_=t.getEndPost_(e)}return t.prototype.getStartPost=function(){return this.startPost_},t.prototype.getEndPost=function(){return this.endPost_},t.prototype.matches=function(t){return this.index_.compare(this.getStartPost(),t)<=0&&this.index_.compare(t,this.getEndPost())<=0},t.prototype.updateChild=function(t,e,n,r,i,o){return this.matches(new _t(e,n))||(n=Wt.EMPTY_NODE),this.indexedFilter_.updateChild(t,e,n,r,i,o)},t.prototype.updateFullNode=function(t,e,n){e.isLeafNode()&&(e=Wt.EMPTY_NODE);var r=e.withIndex(this.index_);r=r.updatePriority(Wt.EMPTY_NODE);var i=this;return e.forEachChild(Rt,(function(t,e){i.matches(new _t(t,e))||(r=r.updateImmediateChild(t,Wt.EMPTY_NODE))})),this.indexedFilter_.updateFullNode(t,r,n)},t.prototype.updatePriority=function(t,e){return t},t.prototype.filtersNodes=function(){return!0},t.prototype.getIndexedFilter=function(){return this.indexedFilter_},t.prototype.getIndex=function(){return this.index_},t.getStartPost_=function(t){if(t.hasStart()){var e=t.getIndexStartName();return t.getIndex().makePost(t.getIndexStartValue(),e)}return t.getIndex().minPost()},t.getEndPost_=function(t){if(t.hasEnd()){var e=t.getIndexEndName();return t.getIndex().makePost(t.getIndexEndValue(),e)}return t.getIndex().maxPost()},t}(),kn=function(){function t(t){this.rangedFilter_=new Cn(t),this.index_=t.getIndex(),this.limit_=t.getLimit(),this.reverse_=!t.isViewFromLeft()}return t.prototype.updateChild=function(t,e,n,r,i,o){return this.rangedFilter_.matches(new _t(e,n))||(n=Wt.EMPTY_NODE),t.getImmediateChild(e).equals(n)?t:t.numChildren()<this.limit_?this.rangedFilter_.getIndexedFilter().updateChild(t,e,n,r,i,o):this.fullLimitUpdateChild_(t,e,n,i,o)},t.prototype.updateFullNode=function(t,e,n){var r;if(e.isLeafNode()||e.isEmpty())r=Wt.EMPTY_NODE.withIndex(this.index_);else if(2*this.limit_<e.numChildren()&&e.isIndexed(this.index_)){r=Wt.EMPTY_NODE.withIndex(this.index_);var i=void 0;i=this.reverse_?e.getReverseIteratorFrom(this.rangedFilter_.getEndPost(),this.index_):e.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=e.withIndex(this.index_)).updatePriority(Wt.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(t,e){return l(e,t)}}else i=r.getIterator(this.index_),s=this.rangedFilter_.getStartPost(),u=this.rangedFilter_.getEndPost(),c=this.index_.getCompare();o=0;for(var f=!1;i.hasNext();){a=i.getNext();!f&&c(s,a)<=0&&(f=!0),f&&o<this.limit_&&c(a,u)<=0?o++:r=r.updateImmediateChild(a.name,Wt.EMPTY_NODE)}}return this.rangedFilter_.getIndexedFilter().updateFullNode(t,r,n)},t.prototype.updatePriority=function(t,e){return t},t.prototype.filtersNodes=function(){return!0},t.prototype.getIndexedFilter=function(){return this.rangedFilter_.getIndexedFilter()},t.prototype.getIndex=function(){return this.index_}
2,t.prototype.fullLimitUpdateChild_=function(t,e,n,r,i){var a;if(this.reverse_){var s=this.index_.getCompare();a=function(t,e){return s(e,t)}}else a=this.index_.getCompare();var u=t;Object(o.f)(u.numChildren()===this.limit_,"");var c=new _t(e,n),l=this.reverse_?u.getFirstChild(this.index_):u.getLastChild(this.index_),f=this.rangedFilter_.matches(c);if(u.hasChild(e)){for(var h=u.getImmediateChild(e),p=r.getChildAfterChild(this.index_,l,this.reverse_);null!=p&&(p.name===e||u.hasChild(p.name));)p=r.getChildAfterChild(this.index_,p,this.reverse_);var d=null==p?1:a(p,c);if(f&&!n.isEmpty()&&d>=0)return null!=i&&i.trackChildChange(Se(e,n,h)),u.updateImmediateChild(e,n);null!=i&&i.trackChildChange(Oe(e,h));var v=u.updateImmediateChild(e,Wt.EMPTY_NODE);return null!=p&&this.rangedFilter_.matches(p)?(null!=i&&i.trackChildChange(Te(p.name,p.node)),v.updateImmediateChild(p.name,p.node)):v}return n.isEmpty()?t:f&&a(l,c)>=0?(null!=i&&(i.trackChildChange(Oe(l.name,l.node)),i.trackChildChange(Te(e,n))),u.updateImmediateChild(e,n).updateImmediateChild(l.name,Wt.EMPTY_NODE)):t},t}(),Nn=function(){function t(){this.limitSet_=!1,this.startSet_=!1,this.startNameSet_=!1,this.startAfterSet_=!1,this.endSet_=!1,this.endNameSet_=!1,this.endBeforeSet_=!1,this.limit_=0,this.viewFrom_="",this.indexStartValue_=null,this.indexStartName_="",this.indexEndValue_=null,this.indexEndName_="",this.index_=Rt}return t.prototype.hasStart=function(){return this.startSet_},t.prototype.hasStartAfter=function(){return this.startAfterSet_},t.prototype.hasEndBefore=function(){return this.endBeforeSet_},t.prototype.isViewFromLeft=function(){return""===this.viewFrom_?this.startSet_:this.viewFrom_===t.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT},t.prototype.getIndexStartValue=function(){return Object(o.f)(this.startSet_,"Only valid if start has been set"),this.indexStartValue_},t.prototype.getIndexStartName=function(){return Object(o.f)(this.startSet_,"Only valid if start has been set"),this.startNameSet_?this.indexStartName_:I},t.prototype.hasEnd=function(){return this.endSet_},t.prototype.getIndexEndValue=function(){return Object(o.f)(this.endSet_,"Only valid if end has been set"),this.indexEndValue_},t.prototype.getIndexEndName=function(){return Object(o.f)(this.endSet_,"Only valid if end has been set"),this.endNameSet_?this.indexEndName_:C},t.prototype.hasLimit=function(){return this.limitSet_},t.prototype.hasAnchoredLimit=function(){return this.limitSet_&&""!==this.viewFrom_},t.prototype.getLimit=function(){return Object(o.f)(this.limitSet_,"Only valid if limit has been set"),this.limit_},t.prototype.getIndex=function(){return this.index_},t.prototype.copy_=function(){var e=new t;return e.limitSet_=this.limitSet_,e.limit_=this.limit_,e.startSet_=this.startSet_,e.indexStartValue_=this.indexStartValue_,e.startNameSet_=this.startNameSet_,e.indexStartName_=this.indexStartName_,e.endSet_=this.endSet_,e.indexEndValue_=this.indexEndValue_,e.endNameSet_=this.endNameSet_,e.indexEndName_=this.indexEndName_,e.index_=this.index_,e.viewFrom_=this.viewFrom_,e},t.prototype.limit=function(t){var e=this.copy_();return e.limitSet_=!0,e.limit_=t,e.viewFrom_="",e},t.prototype.limitToFirst=function(e){var n=this.copy_();return n.limitSet_=!0,n.limit_=e,n.viewFrom_=t.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT,n},t.prototype.limitToLast=function(e){var n=this.copy_();return n.limitSet_=!0,n.limit_=e,n.viewFrom_=t.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_RIGHT,n},t.prototype.startAt=function(t,e){var n=this.copy_();return n.startSet_=!0,void 0===t&&(t=null),n.indexStartValue_=t,null!=e?(n.startNameSet_=!0,n.indexStartName_=e):(n.startNameSet_=!1,n.indexStartName_=""),n},t.prototype.startAfter=function(t,e){var n;if(this.index_===Ot)"string"===typeof t&&(t=bt(t)),n=this.startAt(t,e);else{var r=void 0;r=null==e?C:bt(e),n=this.startAt(t,r)}return n.startAfterSet_=!0,n},t.prototype.endAt=function(t,e){var n=this.copy_();return n.endSet_=!0,void 0===t&&(t=null),n.indexEndValue_=t,void 0!==e?(n.endNameSet_=!0,n.indexEndName_=e):(n.endNameSet_=!1,n.indexEndName_=""),n},t.prototype.endBefore=function(t,e){var n,r;return this.index_===Ot?("string"===typeof t&&(t=wt(t)),r=this.endAt(t,e)):(n=null==e?I:wt(e),r=this.endAt(t,n)),r.endBeforeSet_=!0,r},t.prototype.orderBy=function(t){var e=this.copy_();return e.index_=t,e},t.prototype.getQueryObject=function(){var e=t.WIRE_PROTOCOL_CONSTANTS_,n={};
2if(this.startSet_&&(n[e.INDEX_START_VALUE]=this.indexStartValue_,this.startNameSet_&&(n[e.INDEX_START_NAME]=this.indexStartName_)),this.endSet_&&(n[e.INDEX_END_VALUE]=this.indexEndValue_,this.endNameSet_&&(n[e.INDEX_END_NAME]=this.indexEndName_)),this.limitSet_){n[e.LIMIT]=this.limit_;var r=this.viewFrom_;""===r&&(r=this.isViewFromLeft()?e.VIEW_FROM_LEFT:e.VIEW_FROM_RIGHT),n[e.VIEW_FROM]=r}return this.index_!==Rt&&(n[e.INDEX]=this.index_.toString()),n},t.prototype.loadsAllData=function(){return!(this.startSet_||this.endSet_||this.limitSet_)},t.prototype.isDefault=function(){return this.loadsAllData()&&this.index_===Rt},t.prototype.getNodeFilter=function(){return this.loadsAllData()?new Ce(this.getIndex()):this.hasLimit()?new kn(this):new Cn(this)},t.prototype.toRestQueryStringParameters=function(){var e,n=t.REST_QUERY_CONSTANTS_,r={};return this.isDefault()||(this.index_===Rt?e=n.PRIORITY_INDEX:this.index_===Yt?e=n.VALUE_INDEX:this.index_===Ot?e=n.KEY_INDEX:(Object(o.f)(this.index_ instanceof Xt,"Unrecognized index type!"),e=this.index_.toString()),r[n.ORDER_BY]=Object(o.J)(e),this.startSet_&&(r[n.START_AT]=Object(o.J)(this.indexStartValue_),this.startNameSet_&&(r[n.START_AT]+=","+Object(o.J)(this.indexStartName_))),this.endSet_&&(r[n.END_AT]=Object(o.J)(this.indexEndValue_),this.endNameSet_&&(r[n.END_AT]+=","+Object(o.J)(this.indexEndName_))),this.limitSet_&&(this.isViewFromLeft()?r[n.LIMIT_TO_FIRST]=this.limit_:r[n.LIMIT_TO_LAST]=this.limit_)),r},t.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"},t.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"},t}(),An=function(t){function e(e,n){if(!(e instanceof In))throw new Error("new Reference() no longer supported - use app.database().");return t.call(this,e,n,new Nn,!1)||this}return Object(i.c)(e,t),e.prototype.getKey=function(){return Object(o.K)("Reference.key",0,0,arguments.length),this.path.isEmpty()?null:this.path.getBack()},e.prototype.child=function(t){return Object(o.K)("Reference.child",1,1,arguments.length),"number"===typeof t?t=String(t):t instanceof q||(null===this.path.getFront()?ft("Reference.child",1,t,!1):lt("Reference.child",1,t,!1)),new e(this.repo,this.path.child(t))},e.prototype.getParent=function(){Object(o.K)("Reference.parent",0,0,arguments.length);var t=this.path.parent();return null===t?null:new e(this.repo,t)},e.prototype.getRoot=function(){Object(o.K)("Reference.root",0,0,arguments.length);for(var t=this;null!==t.getParent();)t=t.getParent();return t},e.prototype.databaseProp=function(){return this.repo.database},e.prototype.set=function(t,e){Object(o.K)("Reference.set",1,2,arguments.length),ht("Reference.set",this.path),it("Reference.set",1,t,this.path,!1),Object(o.L)("Reference.set",2,e,!0);var n=new o.a;return this.repo.setWithPriority(this.path,t,null,n.wrapCallback(e)),n.promise},e.prototype.update=function(t,e){if(Object(o.K)("Reference.update",1,2,arguments.length),ht("Reference.update",this.path),Array.isArray(t)){for(var n={},r=0;r<t.length;++r)n[""+r]=t[r];t=n,O("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.")}at("Reference.update",1,t,this.path,!1),Object(o.L)("Reference.update",2,e,!0);var i=new o.a;return this.repo.update(this.path,t,i.wrapCallback(e)),i.promise},e.prototype.setWithPriority=function(t,e,n){if(Object(o.K)("Reference.setWithPriority",2,3,arguments.length),ht("Reference.setWithPriority",this.path),it("Reference.setWithPriority",1,t,this.path,!1),st("Reference.setWithPriority",2,e,!1),Object(o.L)("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 o.a;return this.repo.setWithPriority(this.path,t,e,r.wrapCallback(n)),r.promise},e.prototype.remove=function(t){return Object(o.K)("Reference.remove",0,1,arguments.length),ht("Reference.remove",this.path),Object(o.L)("Reference.remove",1,t,!0),this.set(null,t)},e.prototype.transaction=function(t,e,n){if(Object(o.K)("Reference.transaction",1,3,arguments.length),ht("Reference.transaction",this.path),Object(o.L)("Reference.transaction",1,t,!1),Object(o.L)("Reference.transaction",2,e,!0),dt("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 o.a;"function"===typeof e&&r.promise.catch((function(){}));var i=function(t,n,i){t?r.reject(t):r.resolve(new yt(n,i)),"function"===typeof e&&e(t,n,i)};return this.repo.startTransaction(this.path,t,i,n),r.promise},e.prototype.setPriority=function(t,e){Object(o.K)("Reference.setPriority",1,2,arguments.length),ht("Reference.setPriority",this.path),st("Reference.setPriority",1,t,!1),Object(o.L)("Reference.setPriority",2,e,!0);var n=new o.a;return this.repo.setWithPriority(this.path.child(".priority"),t,null,n.wrapCallback(e)),n.promise},e.prototype.push=function(t,e){Object(o.K)("Reference.push",0,2,arguments.length),ht("Reference.push",this.path),it("Reference.push",1,t,this.path,!0),Object(o.L)("Reference.push",2,e,!0);var n,r=this.repo.serverTime(),i=mt(r),a=this.child(i),s=this.child(i);return n=null!=t?a.set(t,e).then((function(){return s})):Promise.resolve(s),a.then=n.then.bind(n),a.catch=n.then.bind(n,void 0),"function"===typeof e&&n.catch((function(){})),a},e.prototype.onDisconnect=function(){return ht("Reference.onDisconnect",this.path),new vt(this.repo,this.path)},Object.defineProperty(e.prototype,"database",{get:function(){return this.databaseProp()}
2,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"key",{get:function(){return this.getKey()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this.getParent()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"root",{get:function(){return this.getRoot()},enumerable:!1,configurable:!0}),e}(ne);ne.__referenceConstructor=An,De.__referenceConstructor=An;var xn,Pn=function(){function t(t,e){var n=this;this.app_=t,this.authProvider_=e,this.auth_=null,this.auth_=e.getImmediate({optional:!0}),this.auth_||e.get().then((function(t){return n.auth_=t}))}return t.prototype.getToken=function(t){return this.auth_?this.auth_.getToken(t).catch((function(t){return t&&"auth/token-not-initialized"===t.code?(w("Got auth/token-not-initialized error. Treating as null token."),null):Promise.reject(t)})):Promise.resolve(null)},t.prototype.addTokenChangeListener=function(t){this.auth_?this.auth_.addAuthTokenListener(t):(setTimeout((function(){return t(null)}),0),this.authProvider_.get().then((function(e){return e.addAuthTokenListener(t)})))},t.prototype.removeTokenChangeListener=function(t){this.authProvider_.get().then((function(e){return e.removeAuthTokenListener(t)}))},t.prototype.notifyForInvalidToken=function(){var t='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?t+='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?t+='Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':t+='Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.',O(t)},t}(),Rn=function(){function t(){}return t.prototype.getToken=function(e){return Promise.resolve({accessToken:t.EMULATOR_AUTH_TOKEN})},t.prototype.addTokenChangeListener=function(e){e(t.EMULATOR_AUTH_TOKEN)},t.prototype.removeTokenChangeListener=function(t){},t.prototype.notifyForInvalidToken=function(){},t.EMULATOR_AUTH_TOKEN="owner",t}(),jn=function(){function e(){this.repos_={},this.useRestClient_=!1}return e.getInstance=function(){return xn||(xn=new e),xn},e.prototype.interrupt=function(){var t,e,n,r;try{for(var o=Object(i.h)(Object.keys(this.repos_)),a=o.next();!a.done;a=o.next()){var s=a.value;try{for(var u=(n=void 0,Object(i.h)(Object.keys(this.repos_[s]))),c=u.next();!c.done;c=u.next()){var l=c.value;this.repos_[s][l].interrupt()}}catch(f){n={error:f}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}}catch(h){t={error:h}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}},e.prototype.resume=function(){var t,e,n,r;try{for(var o=Object(i.h)(Object.keys(this.repos_)),a=o.next();!a.done;a=o.next()){var s=a.value;try{for(var u=(n=void 0,Object(i.h)(Object.keys(this.repos_[s]))),c=u.next();!c.done;c=u.next()){var l=c.value;this.repos_[s][l].resume()}}catch(f){n={error:f}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}}catch(h){t={error:h}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}},e.prototype.applyEmulatorSettings=function(t,e,n){t.repoInfo_=new G(e+":"+n,!1,t.repoInfo_.namespace,t.repoInfo_.webSocketOnly,t.repoInfo_.nodeAdmin,t.repoInfo_.persistenceKey,t.repoInfo_.includeNamespaceInQueryParams),t.repoInfo_.nodeAdmin&&(t.authTokenProvider_=new Rn)},e.prototype.databaseFromApp=function(e,n,r,i){var o=r||e.options.databaseURL;void 0===o&&(e.options.projectId||T("Can't determine Firebase Database URL. Be sure to include a Project ID when calling firebase.initializeApp()."),w("Using default host for project ",e.options.projectId),o=e.options.projectId+"-default-rtdb.firebaseio.com");var a,s=X(o,i),u=s.repoInfo,c=void 0;"undefined"!==typeof t&&(c=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}).FIREBASE_DATABASE_EMULATOR_HOST),c?(a=!0,o="http://"+c+"?ns="+u.namespace,u=(s=X(o,i)).repoInfo):a=!s.repoInfo.secure;var l=i&&a?new Rn:new Pn(e,n);return pt("Invalid Firebase Database URL",1,s),s.path.isEmpty()||T("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(t){var e=Object(o.G)(this.repos_,t.app.name);e&&Object(o.G)(e,t.key)===t||T("Database "+t.app.name+"("+t.repoInfo_+") has already been deleted."),t.interrupt(),delete e[t.key]},e.prototype.createRepo=function(t,e,n){var r=Object(o.G)(this.repos_,e.name);r||(r={},this.repos_[e.name]=r);var i=Object(o.G)(r,t.toURLString());return i&&T("Database initialized multiple times. Please make sure the format of the database URL matches with each database() call."),i=new In(t,this.useRestClient_,e,n),r[t.toURLString()]=i,i},e.prototype.forceRestClient=function(t){this.useRestClient_=t},e}(),Dn=function(){function t(t){var e=this;this.repoInternal_=t,this.instanceStarted_=!1,this.INTERNAL={delete:function(){return Object(i.b)(e,void 0,void 0,(function(){return Object(i.d)(this,(function(t){return this.checkDeleted_("delete"),jn.getInstance().deleteRepo(this.repo_),this.repoInternal_=null,this.rootInternal_=null,[2]}))}
2))}},t instanceof In||T("Don't call new Database() directly - please use firebase.database().")}return Object.defineProperty(t.prototype,"repo_",{get:function(){return this.instanceStarted_||(this.repoInternal_.start(),this.instanceStarted_=!0),this.repoInternal_},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"root_",{get:function(){return this.rootInternal_||(this.rootInternal_=new An(this.repo_,q.Empty)),this.rootInternal_},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"app",{get:function(){return this.repo_.app},enumerable:!1,configurable:!0}),t.prototype.useEmulator=function(t,e){this.checkDeleted_("useEmulator"),this.instanceStarted_?T("Cannot call useEmulator() after instance has already been initialized."):jn.getInstance().applyEmulatorSettings(this.repoInternal_,t,e)},t.prototype.ref=function(t){return this.checkDeleted_("ref"),Object(o.K)("database.ref",0,1,arguments.length),t instanceof An?this.refFromURL(t.toString()):void 0!==t?this.root_.child(t):this.root_},t.prototype.refFromURL=function(t){var e="database.refFromURL";this.checkDeleted_(e),Object(o.K)(e,1,1,arguments.length);var n=X(t,this.repo_.repoInfo_.nodeAdmin);pt(e,1,n);var r=n.repoInfo;return this.repo_.repoInfo_.isCustomHost()||r.host===this.repo_.repoInfo_.host||T(e+": Host name does not match the current database: (found "+r.host+" but expected "+this.repo_.repoInfo_.host+")"),this.ref(n.path.toString())},t.prototype.checkDeleted_=function(t){null===this.repoInternal_&&T("Cannot call "+t+" on a deleted database.")},t.prototype.goOffline=function(){Object(o.K)("database.goOffline",0,0,arguments.length),this.checkDeleted_("goOffline"),this.repo_.interrupt()},t.prototype.goOnline=function(){Object(o.K)("database.goOnline",0,0,arguments.length),this.checkDeleted_("goOnline"),this.repo_.resume()},t.ServerValue={TIMESTAMP:{".sv":"timestamp"},increment:function(t){return{".sv":{increment:t}}}},t}();var Ln=Object.freeze({__proto__:null,forceLongPolling:function(){yn.forceDisallow(),ln.forceAllow()},forceWebSockets:function(){ln.forceDisallow()},isWebSocketsAvailable:function(){return yn.isAvailable()},setSecurityDebugCallback:function(t,e){t.repo.persistentConnection_.securityDebugCallback_=e},stats:function(t,e){t.repo.stats(e)},statsIncrementCounter:function(t,e){t.repo.statsIncrementCounter(e)},dataUpdateCount:function(t){return t.repo.dataUpdateCount},interceptServerData:function(t,e){return t.repo.interceptServerData_(e)},initStandalone:function(t){var e=t.app,n=t.url,r=t.version,i=t.customAuthImpl,o=t.namespace,a=t.nodeAdmin,u=void 0!==a&&a;pn(r);var c=new s.c("auth-internal",new s.b("database-standalone"));return c.setComponent(new s.a("auth-internal",(function(){return i}),"PRIVATE")),{instance:jn.getInstance().databaseFromApp(e,c,n,u),namespace:o}}}),Mn=_n;_n.prototype.simpleListen=function(t,e){this.sendRequest("q",{p:t},e)},_n.prototype.echo=function(t,e){this.sendRequest("echo",{d:t},e)};var Fn=mn,Un=G,Vn=Object.freeze({__proto__:null,DataConnection:Mn,RealTimeConnection:Fn,hijackHash:function(t){var e=_n.prototype.put;return _n.prototype.put=function(n,r,i,o){void 0!==o&&(o=t()),e.call(this,n,r,i,o)},function(){_n.prototype.put=e}},ConnectionTarget:Un,queryIdentifier:function(t){return t.queryIdentifier()},forceRestClient:function(t){jn.getInstance().forceRestClient(t)}}),qn=Dn.ServerValue;!function(t){pn(t.SDK_VERSION);var n=t.INTERNAL.registerComponent(new s.a("database",(function(t,e){var n=t.getProvider("app").getImmediate(),r=t.getProvider("auth-internal");return jn.getInstance().databaseFromApp(n,r,e)}),"PUBLIC").setServiceProps({Reference:An,Query:ne,Database:Dn,DataSnapshot:$t,enableLogging:b,INTERNAL:Ln,ServerValue:qn,TEST_ACCESS:Vn}).setMultipleInstances(!0));t.registerVersion("@firebase/database","0.9.3"),Object(o.z)()&&(e.exports=n)}(r.a)}).call(this,n(16),n(208)(t))},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e,n){"use strict";n(107)},function(t,e,n){"use strict";
2t.exports=n(211)},function(t,e,n){"use strict";(function(t){var r=n(44),i=n(3),o=n(51),a=n(72);function s(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var u=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function c(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do{0!==(1026&(e=t).flags)&&(n=e.return),t=e.return}while(t)}return 3===e.tag?n:null}function l(t){if(c(t)!==t)throw Error(s(188))}function f(t){var e=t.keyCode;return"charCode"in t?0===(t=t.charCode)&&13===e&&(t=13):t=e,10===t&&(t=13),32<=t||13===t?t:0}function h(){return!0}function p(){return!1}function d(t){function e(e,n,r,i,o){for(var a in this._reactName=e,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,t)t.hasOwnProperty(a)&&(e=t[a],this[a]=e?e(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?h:p,this.isPropagationStopped=p,this}return r(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():"unknown"!==typeof t.returnValue&&(t.returnValue=!1),this.isDefaultPrevented=h)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():"unknown"!==typeof t.cancelBubble&&(t.cancelBubble=!0),this.isPropagationStopped=h)},persist:function(){},isPersistent:h}),e}var v={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},y=d(v),g=r({},v,{view:0,detail:0});d(g);var m,b,w,_=r({},g,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:I,button:0,buttons:0,relatedTarget:function(t){return void 0===t.relatedTarget?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==w&&(w&&"mousemove"===t.type?(m=t.screenX-w.screenX,b=t.screenY-w.screenY):b=m=0,w=t),m)},movementY:function(t){return"movementY"in t?t.movementY:b}});d(_),d(r({},_,{dataTransfer:0})),d(r({},g,{relatedTarget:0})),d(r({},v,{animationName:0,elapsedTime:0,pseudoElement:0})),d(r({},v,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}})),d(r({},v,{data:0}));var E={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},T={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"},O={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function S(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):!!(t=O[t])&&!!e[t]}function I(){return S}d(r({},g,{key:function(t){if(t.key){var e=E[t.key]||t.key;if("Unidentified"!==e)return e}return"keypress"===t.type?13===(t=f(t))?"Enter":String.fromCharCode(t):"keydown"===t.type||"keyup"===t.type?T[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:I,charCode:function(t){return"keypress"===t.type?f(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?f(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}})),d(r({},_,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),d(r({},g,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:I})),d(r({},v,{propertyName:0,elapsedTime:0,pseudoElement:0})),d(r({},_,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}));var C=null;function k(e){if(null===C)try{var n=("require"+Math.random()).slice(0,7);C=(t&&t[n]).call(t,"timers").setImmediate}catch(r){C=function(t){var e=new MessageChannel;e.port1.onmessage=t,e.port2.postMessage(void 0)}}return C(e)}
2var N=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events,A=N[5],x=N[6],P=o.unstable_batchedUpdates,R=u.IsSomeRendererActing,j="function"===typeof a.unstable_flushAllWithoutAsserting,D=a.unstable_flushAllWithoutAsserting||function(){for(var t=!1;A();)t=!0;return t};function L(t){try{D(),k((function(){D()?L(t):t()}))}catch(e){t(e)}}var M=0,F=!1,U=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events[6],V=o.unstable_batchedUpdates,q=u.IsSomeRendererActing;function B(t,e){jest.runOnlyPendingTimers(),k((function(){try{a.unstable_flushAllWithoutAsserting()?B(t,e):t()}catch(n){e(n)}}))}function z(t,e,n,r,i,o,a,s,u){var c=Array.prototype.slice.call(arguments,3);try{e.apply(n,c)}catch(l){this.onError(l)}}var H=!1,W=null,K=!1,G=null,Q={onError:function(t){H=!0,W=t}};function Y(t,e,n,r,i,o,a,s,u){H=!1,W=null,z.apply(Q,arguments)}var X=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events,$=X[0],J=X[1],Z=X[2],tt=X[3],et=X[4];function nt(){}function rt(t,e){if(!t)return[];if(!(t=function(t){var e=t.alternate;if(!e){if(null===(e=c(t)))throw Error(s(188));return e!==t?null:t}for(var n=t,r=e;;){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 l(i),t;if(o===r)return l(i),e;o=o.sibling}throw Error(s(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,u=i.child;u;){if(u===n){a=!0,n=i,r=o;break}if(u===r){a=!0,r=i,n=o;break}u=u.sibling}if(!a){for(u=o.child;u;){if(u===n){a=!0,n=o,r=i;break}if(u===r){a=!0,r=o,n=i;break}u=u.sibling}if(!a)throw Error(s(189))}}if(n.alternate!==r)throw Error(s(190))}if(3!==n.tag)throw Error(s(188));return n.stateNode.current===n?t:e}(t)))return[];for(var n=t,r=[];;){if(5===n.tag||6===n.tag||1===n.tag||0===n.tag){var i=n.stateNode;e(i)&&r.push(i)}if(n.child)n.child.return=n,n=n.child;else{if(n===t)return r;for(;!n.sibling;){if(!n.return||n.return===t)return r;n=n.return}n.sibling.return=n.return,n=n.sibling}}}function it(t,e){if(t&&!t._reactInternals){var n=""+t;throw t=Array.isArray(t)?"an array":t&&1===t.nodeType&&t.tagName?"a DOM node":"[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n,Error(s(286,e,t))}}function ot(t){return!(!t||1!==t.nodeType||!t.tagName)}function at(t){return!ot(t)&&(null!=t&&"function"===typeof t.render&&"function"===typeof t.setState)}function st(t,e){return!!at(t)&&t._reactInternals.type===e}function ut(t,e){return it(t,"findAllInRenderedTree"),t?rt(t._reactInternals,e):[]}function ct(t,e){return it(t,"scryRenderedDOMComponentsWithClass"),ut(t,(function(t){if(ot(t)){var n=t.className;"string"!==typeof n&&(n=t.getAttribute("class")||"");var r=n.split(/\s+/);if(!Array.isArray(e)){if(void 0===e)throw Error(s(11));e=e.split(/\s+/)}return e.every((function(t){return-1!==r.indexOf(t)}))}return!1}))}function lt(t,e){return it(t,"scryRenderedDOMComponentsWithTag"),ut(t,(function(t){return ot(t)&&t.tagName.toUpperCase()===e.toUpperCase()}))}function ft(t,e){return it(t,"scryRenderedComponentsWithType"),ut(t,(function(t){return st(t,e)}))}function ht(t,e,n){var r=t.type||"unknown-event";t.currentTarget=J(n),function(t,e,n,r,i,o,a,u,c){if(Y.apply(this,arguments),H){if(!H)throw Error(s(198));var l=W;H=!1,W=null,K||(K=!0,G=l)}}(r,e,void 0,t),t.currentTarget=null}function pt(t,e,n){for(var r=[];t;){r.push(t);do{t=t.return}while(t&&5!==t.tag);t=t||null}for(t=r.length;0<t--;)e(r[t],"captured",n);for(t=0;t<r.length;t++)e(r[t],"bubbled",n)}function dt(t,e){var n=t.stateNode;if(!n)return null;var r=Z(n);if(!r)return null;n=r[e];t:switch(e){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"===(t=t.type)||"input"===t||"select"===t||"textarea"===t)),t=!r;break t;default:t=!1}if(t)return null;if(n&&"function"!==typeof n)throw Error(s(231,e,typeof n));return n}function vt(t,e,n){var r=n._reactName;"captured"===e&&(r+="Capture"),(e=dt(t,r))&&(null==n._dispatchListeners&&(n._dispatchListeners=[]),null==n._dispatchInstances&&(n._dispatchInstances=[]),n._dispatchListeners.push(e),n._dispatchInstances.push(t))}var yt={},gt=new Set(["mouseEnter","mouseLeave","pointerEnter","pointerLeave"]);function mt(t){return function(e,n){if(i.isValidElement(e))throw Error(s(228));if(at(e))throw Error(s(229));var a="on"+t[0].toUpperCase()+t.slice(1),u=new nt;u.target=e,u.type=t.toLowerCase();var c=$(e),l=new y(a,u.type,c,u,e);l.persist(),r(l,n),gt.has(t)?l&&l._reactName&&function(t,e,n){t&&n&&n._reactName&&(e=dt(t,n._reactName))&&(null==n._dispatchListeners&&(n._dispatchListeners=[]),null==n._dispatchInstances&&(n._dispatchInstances=[]),n._dispatchListeners.push(e),n._dispatchInstances.push(t))}(l._targetInst,null,l):l&&l._reactName&&pt(l._targetInst,vt,l),o.unstable_batchedUpdates((function(){if(tt(e),l){var t=l._dispatchListeners,n=l._dispatchInstances;if(Array.isArray(t))for(var r=0;r<t.length&&!l.isPropagationStopped();
2r++)ht(l,t[r],n[r]);else t&&ht(l,t,n);l._dispatchListeners=null,l._dispatchInstances=null,l.isPersistent()||l.constructor.release(l)}if(K)throw t=G,K=!1,G=null,t})),et()}}"blur cancel click close contextMenu copy cut auxClick doubleClick dragEnd dragStart drop focus input invalid keyDown keyPress keyUp mouseDown mouseUp paste pause play pointerCancel pointerDown pointerUp rateChange reset seeked submit touchCancel touchEnd touchStart volumeChange drag dragEnter dragExit dragLeave dragOver mouseMove mouseOut mouseOver pointerMove pointerOut pointerOver scroll toggle touchMove wheel abort animationEnd animationIteration animationStart canPlay canPlayThrough durationChange emptied encrypted ended error gotPointerCapture load loadedData loadedMetadata loadStart lostPointerCapture playing progress seeking stalled suspend timeUpdate transitionEnd waiting mouseEnter mouseLeave pointerEnter pointerLeave change select beforeInput compositionEnd compositionStart compositionUpdate".split(" ").forEach((function(t){yt[t]=mt(t)})),e.Simulate=yt,e.act=function(t){function e(){M--,R.current=n,x.current=r}!1===F&&(F=!0,console.error("act(...) is not supported in production builds of React, and might not behave as expected.")),M++;var n=R.current,r=x.current;R.current=!0,x.current=!0;try{var i=P(t)}
2catch(o){throw e(),o}if(null!==i&&"object"===typeof i&&"function"===typeof i.then)return{then:function(t,r){i.then((function(){1<M||!0===j&&!0===n?(e(),t()):L((function(n){e(),n?r(n):t()}))}),(function(t){e(),r(t)}))}};try{1!==M||!1!==j&&!1!==n||D(),e()}catch(o){throw e(),o}return{then:function(t){t()}}},e.findAllInRenderedTree=ut,e.findRenderedComponentWithType=function(t,e){if(it(t,"findRenderedComponentWithType"),1!==(t=ft(t,e)).length)throw Error("Did not find exactly one match (found: "+t.length+") for componentType:"+e);return t[0]},e.findRenderedDOMComponentWithClass=function(t,e){if(it(t,"findRenderedDOMComponentWithClass"),1!==(t=ct(t,e)).length)throw Error("Did not find exactly one match (found: "+t.length+") for class:"+e);return t[0]},e.findRenderedDOMComponentWithTag=function(t,e){if(it(t,"findRenderedDOMComponentWithTag"),1!==(t=lt(t,e)).length)throw Error("Did not find exactly one match (found: "+t.length+") for tag:"+e);return t[0]},e.isCompositeComponent=at,e.isCompositeComponentWithType=st,e.isDOMComponent=ot,e.isDOMComponentElement=function(t){return!!(t&&i.isValidElement(t)&&t.tagName)},e.isElement=function(t){return i.isValidElement(t)},e.isElementOfType=function(t,e){return i.isValidElement(t)&&t.type===e},e.mockComponent=function(t,e){return e=e||t.mockTagName||"div",t.prototype.render.mockImplementation((function(){return i.createElement(e,null,this.props.children)})),this},e.nativeTouchData=function(t,e){return{touches:[{pageX:t,pageY:e}]}},e.renderIntoDocument=function(t){var e=document.createElement("div");return o.render(t,e)},e.scryRenderedComponentsWithType=ft,e.scryRenderedDOMComponentsWithClass=ct,e.scryRenderedDOMComponentsWithTag=lt,e.traverseTwoPhase=pt,e.unstable_concurrentAct=function(t){function e(){q.current=n,U.current=r}if(void 0===a.unstable_flushAllWithoutAsserting)throw Error("This version of `act` requires a special mock build of Scheduler.");if(!0!==setTimeout._isMockFunction)throw Error("This version of `act` requires Jest's timer mocks (i.e. jest.useFakeTimers).");var n=q.current,r=U.current;q.current=!0,U.current=!0;try{var i=V(t);if("object"===typeof i&&null!==i&&"function"===typeof i.then)return{then:function(t,n){i.then((function(){B((function(){e(),t()}),(function(t){e(),n(t)}))}),(function(t){e(),n(t)}))}};try{do{var o=a.unstable_flushAllWithoutAsserting()}while(o)}finally{e()}}catch(s){throw e(),s}}}).call(this,n(98)(t))}]]); 3//# sourceMappingURL=2.868141b9.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.