PageSourceSearch

https://virtual-stand.web.app/static/js/2.92ac3610.chunk.js

js virtual-stand.web.app collected 2026-10-03 12:39:20 UTC 1,064,945 bytes, 3 lines download raw bytes

1/*! For license information please see 2.92ac3610.chunk.js.LICENSE.txt */
2(this["webpackJsonpvirtual-stand"]=this["webpackJsonpvirtual-stand"]||[]).push([[2],[function(e,t,n){e.exports=n(133)},function(e,t,n){"use strict";e.exports=n(122)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t,n,r,i,a,o){try{var u=e[a](o),s=u.value}catch(c){return void n(c)}u.done?t(s):Promise.resolve(s).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,a){var o=e.apply(t,n);function u(e){r(o,i,a,u,s,"next",e)}function s(e){r(o,i,a,u,s,"throw",e)}u(void 0)}))}}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";e.exports=n(128)},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return A})),n.d(t,"c",(function(){return C})),n.d(t,"d",(function(){return p})),n.d(t,"e",(function(){return d})),n.d(t,"f",(function(){return P})),n.d(t,"g",(function(){return y})),n.d(t,"h",(function(){return B})),n.d(t,"i",(function(){return L})),n.d(t,"j",(function(){return v})),n.d(t,"k",(function(){return V})),n.d(t,"l",(function(){return W})),n.d(t,"m",(function(){return g})),n.d(t,"n",(function(){return w})),n.d(t,"o",(function(){return O})),n.d(t,"p",(function(){return _})),n.d(t,"q",(function(){return D})),n.d(t,"r",(function(){return j})),n.d(t,"s",(function(){return T})),n.d(t,"t",(function(){return b})),n.d(t,"u",(function(){return k})),n.d(t,"v",(function(){return x})),n.d(t,"w",(function(){return S})),n.d(t,"x",(function(){return E})),n.d(t,"y",(function(){return F})),n.d(t,"z",(function(){return U})),n.d(t,"A",(function(){return I}));var r=n(9),i=n(19),a=n(47),o=n(12),u=n(13),s=n(112),c=n(2),l=n(4),f=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var i=e.charCodeAt(r);i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):55296===(64512&i)&&r+1<e.length&&56320===(64512&e.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r)),t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t},h={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"===typeof atob,encodeByteArray:function(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[],i=0;i<e.length;i+=3){var a=e[i],o=i+1<e.length,u=o?e[i+1]:0,s=i+2<e.length,c=s?e[i+2]:0,l=a>>2,f=(3&a)<<4|u>>4,h=(15&u)<<2|c>>6,d=63&c;s||(d=64,o||(h=64)),r.push(n[l],n[f],n[h],n[d])}return r.join("")},encodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(f(e),t)},decodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){for(var t=[],n=0,r=0;n<e.length;){var i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){var a=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&a)}else if(i>239&&i<365){var o=((7&i)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(o>>10)),t[r++]=String.fromCharCode(56320+(1023&o))}else{var u=e[n++],s=e[n++];
2t[r++]=String.fromCharCode((15&i)<<12|(63&u)<<6|63&s)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray:function(e,t){this.init_();for(var n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],i=0;i<e.length;){var a=n[e.charAt(i++)],o=i<e.length?n[e.charAt(i)]:0,u=++i<e.length?n[e.charAt(i)]:64,s=++i<e.length?n[e.charAt(i)]:64;if(++i,null==a||null==o||null==u||null==s)throw Error();var c=a<<2|o>>4;if(r.push(c),64!==u){var l=o<<4&240|u>>2;if(r.push(l),64!==s){var f=u<<6&192|s;r.push(f)}}}return r},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}},d=function(e){return function(e){var t=f(e);return h.encodeByteArray(t,!0)}(e).replace(/\./g,"")},p=function(e){try{return h.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};function v(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:return new Date(t.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return t}for(var n in t)t.hasOwnProperty(n)&&"__proto__"!==n&&(e[n]=v(e[n],t[n]));return e}var m=function(){function e(){var t=this;Object(c.a)(this,e),this.reject=function(){},this.resolve=function(){},this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))}return Object(l.a)(e,[{key:"wrapCallback",value:function(e){var t=this;return function(n,r){n?t.reject(n):t.resolve(r),"function"===typeof e&&(t.promise.catch((function(){})),1===e.length?e(n):e(n,r))}}}]),e}();function y(e,t){if(e.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');var n=t||"demo-project",r=e.iat||0,i=e.sub||e.user_id;if(!i)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");var a=Object.assign({iss:"https://securetoken.google.com/".concat(n),aud:n,iat:r,exp:r+3600,auth_time:r,sub:i,user_id:i,firebase:{sign_in_provider:"custom",identities:{}}},e);return[d(JSON.stringify({alg:"none",type:"JWT"})),d(JSON.stringify(a)),""].join(".")}function g(){return"undefined"!==typeof navigator&&"string"===typeof navigator.userAgent?navigator.userAgent:""}function b(){return"undefined"!==typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(g())}function k(){try{return"[object process]"===Object.prototype.toString.call(e.process)}catch(t){return!1}}function w(){return"object"===typeof self&&self.self===self}function O(){var e="object"===typeof chrome?chrome.runtime:"object"===typeof browser?browser.runtime:void 0;return"object"===typeof e&&void 0!==e.id}function x(){return"object"===typeof navigator&&"ReactNative"===navigator.product}function _(){return g().indexOf("Electron/")>=0}function j(){var e=g();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}function E(){return g().indexOf("MSAppHost/")>=0}function S(){return!k()&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function T(){return"object"===typeof indexedDB}function I(){return new Promise((function(e,t){try{var n=!0,r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=function(){i.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},i.onupgradeneeded=function(){n=!1},i.onerror=function(){var e;t((null===(e=i.error)||void 0===e?void 0:e.message)||"")}}catch(a){t(a)}}))}var C=function(e){Object(o.a)(n,e);var t=Object(u.a)(n);function n(e,r,i){var o;return Object(c.a)(this,n),(o=t.call(this,r)).code=e,o.customData=i,o.name="FirebaseError",Object.setPrototypeOf(Object(a.a)(o),n.prototype),Error.captureStackTrace&&Error.captureStackTrace(Object(a.a)(o),A.prototype.create),o}return n}(Object(s.a)(Error)),A=function(){function e(t,n,r){Object(c.a)(this,e),this.service=t,this.serviceName=n,this.errors=r}return Object(l.a)(e,[{key:"create",value:function(e){var t=(arguments.length<=1?void 0:arguments[1])||{},n="".concat(this.service,"/").concat(e),r=this.errors[e],i=r?R(r,t):"Error",a="".concat(this.serviceName,": ").concat(i," (").concat(n,")."),o=new C(n,a,t);return o}}]),e}();function R(e,t){return e.replace(N,(function(e,n){var r=t[n];return null!=r?String(r):"<".concat(n,"?>")}))}var N=/\{\$([^}]+)}/g;function P(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function D(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function L(e,t){if(e===t)return!0;for(var n=Object.keys(e),r=Object.keys(t),i=0,a=n;i<a.length;i++){var o=a[i];if(!r.includes(o))return!1;var u=e[o],s=t[o];if(M(u)&&M(s)){if(!L(u,s))return!1}else if(u!==s)return!1}for(var c=0,l=r;c<l.length;c++){var f=l[c];if(!n.includes(f))return!1}return!0}function M(e){return null!==e&&"object"===typeof e}function F(e){for(var t=[],n=function(){var e=Object(i.a)(a[r],2),n=e[0],o=e[1];Array.isArray(o)?o.forEach((function(e){t.push(encodeURIComponent(n)+"="+encodeURIComponent(e))})):t.push(encodeURIComponent(n)+"="+encodeURIComponent(o))},r=0,a=Object.entries(e);r<a.length;r++)n();return t.length?"&"+t.join("&"):""}function U(e){var t={};return e.replace(/^\?/,"").split("&").forEach((function(e){if(e){var n=e.split("="),r=Object(i.a)(n,2),a=r[0],o=r[1];
2t[decodeURIComponent(a)]=decodeURIComponent(o)}})),t}function V(e){var t=e.indexOf("?");if(!t)return"";var n=e.indexOf("#",t);return e.substring(t,n>0?n:void 0)}function B(e,t){var n=new z(e,t);return n.subscribe.bind(n)}var z=function(){function e(t,n){var r=this;Object(c.a)(this,e),this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=n,this.task.then((function(){t(r)})).catch((function(e){r.error(e)}))}return Object(l.a)(e,[{key:"next",value:function(e){this.forEachObserver((function(t){t.next(e)}))}},{key:"error",value:function(e){this.forEachObserver((function(t){t.error(e)})),this.close(e)}},{key:"complete",value:function(){this.forEachObserver((function(e){e.complete()})),this.close()}},{key:"subscribe",value:function(e,t,n){var i,a=this;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");void 0===(i=function(e,t){if("object"!==typeof e||null===e)return!1;var n,i=Object(r.a)(t);try{for(i.s();!(n=i.n()).done;){var a=n.value;if(a in e&&"function"===typeof e[a])return!0}}catch(o){i.e(o)}finally{i.f()}return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:n}).next&&(i.next=q),void 0===i.error&&(i.error=q),void 0===i.complete&&(i.complete=q);var o=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then((function(){try{a.finalError?i.error(a.finalError):i.complete()}catch(e){}})),this.observers.push(i),o}},{key:"unsubscribeOne",value:function(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}},{key:"forEachObserver",value:function(e){if(!this.finalized)for(var t=0;t<this.observers.length;t++)this.sendOne(t,e)}},{key:"sendOne",value:function(e,t){var n=this;this.task.then((function(){if(void 0!==n.observers&&void 0!==n.observers[e])try{t(n.observers[e])}catch(r){"undefined"!==typeof console&&console.error&&console.error(r)}}))}},{key:"close",value:function(e){var t=this;this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then((function(){t.observers=void 0,t.onNoObservers=void 0})))}}]),e}();function q(){}function W(e){return e&&e._delegate?e._delegate:e}}).call(this,n(74))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(51);function i(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=Object(r.a)(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var i=0,a=function(){};return{s:a,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return u=e.done,e},e:function(e){s=!0,o=e},f:function(){try{u||null==n.return||n.return()}finally{if(s)throw o}}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return T})),n.d(t,"b",(function(){return it})),n.d(t,"c",(function(){return Ut})),n.d(t,"d",(function(){return qt})),n.d(t,"e",(function(){return Ht})),n.d(t,"f",(function(){return Wt})),n.d(t,"g",(function(){return Ct})),n.d(t,"h",(function(){return zt})),n.d(t,"i",(function(){return Ei})),n.d(t,"j",(function(){return Ba})),n.d(t,"k",(function(){return S})),n.d(t,"l",(function(){return di})),n.d(t,"m",(function(){return Kt})),n.d(t,"n",(function(){return Gt})),n.d(t,"o",(function(){return $t})),n.d(t,"p",(function(){return V})),n.d(t,"q",(function(){return Ze})),n.d(t,"r",(function(){return D})),n.d(t,"s",(function(){return Cr})),n.d(t,"t",(function(){return W})),n.d(t,"u",(function(){return aa})),n.d(t,"v",(function(){return $i})),n.d(t,"w",(function(){return Le})),n.d(t,"y",(function(){return Rn})),n.d(t,"z",(function(){return jr})),n.d(t,"A",(function(){return Ua})),n.d(t,"B",(function(){return Sr})),n.d(t,"C",(function(){return Pn})),n.d(t,"D",(function(){return Cn})),n.d(t,"E",(function(){return tt})),n.d(t,"G",(function(){return Fn})),n.d(t,"H",(function(){return C})),n.d(t,"I",(function(){return $n})),n.d(t,"J",(function(){return pr})),n.d(t,"K",(function(){return yr})),n.d(t,"L",(function(){return ra})),n.d(t,"M",(function(){return De})),n.d(t,"N",(function(){return Yr})),n.d(t,"O",(function(){return qn})),n.d(t,"P",(function(){return yn})),n.d(t,"Q",(function(){return gi})),n.d(t,"R",(function(){return Ui})),n.d(t,"S",(function(){return ta})),n.d(t,"T",(function(){return wr})),n.d(t,"U",(function(){return bn}
2)),n.d(t,"V",(function(){return ki})),n.d(t,"W",(function(){return Mi})),n.d(t,"X",(function(){return Zi})),n.d(t,"Y",(function(){return Yn})),n.d(t,"Z",(function(){return Tn})),n.d(t,"ab",(function(){return Bn})),n.d(t,"bb",(function(){return Zt})),n.d(t,"cb",(function(){return vn})),n.d(t,"db",(function(){return xn})),n.d(t,"eb",(function(){return Vn})),n.d(t,"fb",(function(){return Wn})),n.d(t,"gb",(function(){return mi})),n.d(t,"hb",(function(){return Di})),n.d(t,"ib",(function(){return Xi})),n.d(t,"jb",(function(){return an})),n.d(t,"kb",(function(){return ir})),n.d(t,"lb",(function(){return ar})),n.d(t,"mb",(function(){return _i})),n.d(t,"nb",(function(){return nr})),n.d(t,"ob",(function(){return Jn})),n.d(t,"pb",(function(){return Ln})),n.d(t,"x",(function(){return yo})),n.d(t,"F",(function(){return vo}));var r=n(79),i=n(82),a=n(51),o=n(80);var u=n(0),s=n.n(u),c=n(2),l=n(4),f=n(31),h=n(23),d=n(12),p=n(13),v=n(3),m=n(47),y=n(9),g=n(19),b=n(22),k=n(6),w=n(8),O=n(18);function x(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}Object.create;Object.create;var _,j=n(33),E=n(26),S={FACEBOOK:"facebook.com",GITHUB:"github.com",GOOGLE:"google.com",PASSWORD:"password",PHONE:"phone",TWITTER:"twitter.com"},T={EMAIL_SIGNIN:"EMAIL_SIGNIN",PASSWORD_RESET:"PASSWORD_RESET",RECOVER_EMAIL:"RECOVER_EMAIL",REVERT_SECOND_FACTOR_ADDITION:"REVERT_SECOND_FACTOR_ADDITION",VERIFY_AND_CHANGE_EMAIL:"VERIFY_AND_CHANGE_EMAIL",VERIFY_EMAIL:"VERIFY_EMAIL"};function I(){return Object(k.a)({},"dependent-sdk-initialized-before-auth","Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK.")}var C=function(){var e;return e={},Object(k.a)(e,"admin-restricted-operation","This operation is restricted to administrators only."),Object(k.a)(e,"argument-error",""),Object(k.a)(e,"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."),Object(k.a)(e,"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."),Object(k.a)(e,"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."),Object(k.a)(e,"code-expired","The SMS code has expired. Please re-send the verification code to try again."),Object(k.a)(e,"cordova-not-ready","Cordova framework is not ready."),Object(k.a)(e,"cors-unsupported","This browser is not supported."),Object(k.a)(e,"credential-already-in-use","This credential is already associated with a different user account."),Object(k.a)(e,"custom-token-mismatch","The custom token corresponds to a different audience."),Object(k.a)(e,"requires-recent-login","This operation is sensitive and requires recent authentication. Log in again before retrying this request."),Object(k.a)(e,"dependent-sdk-initialized-before-auth","Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."),Object(k.a)(e,"dynamic-link-not-activated","Please activate Dynamic Links in the Firebase Console and agree to the terms and conditions."),Object(k.a)(e,"email-change-needs-verification","Multi-factor users must al
2ways have a verified email."),Object(k.a)(e,"email-already-in-use","The email address is already in use by another account."),Object(k.a)(e,"emulator-config-failed",'Auth instance has already been used to make a network call. Auth can no longer be configured to use the emulator. Try calling "connectAuthEmulator()" sooner.'),Object(k.a)(e,"expired-action-code","The action code has expired."),Object(k.a)(e,"cancelled-popup-request","This operation has been cancelled due to another conflicting popup being opened."),Object(k.a)(e,"internal-error","An internal AuthError has occurred."),Object(k.a)(e,"invalid-app-credential","The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired."),Object(k.a)(e,"invalid-app-id","The mobile app identifier is not registed for the current project."),Object(k.a)(e,"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."),Object(k.a)(e,"invalid-auth-event","An internal AuthError has occurred."),Object(k.a)(e,"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 to use the verification code provided by the user."),Object(k.a)(e,"invalid-continue-uri","The continue URL provided in the request is invalid."),Object(k.a)(e,"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."),Object(k.a)(e,"invalid-custom-token","The custom token format is incorrect. Please check the documentation."),Object(k.a)(e,"invalid-dynamic-link-domain","The provided dynamic link domain is not configured or authorized for the current project."),Object(k.a)(e,"invalid-email","The email address is badly formatted."),Object(k.a)(e,"invalid-emulator-scheme","Emulator URL must start with a valid scheme (http:// or https://)."),Object(k.a)(e,"invalid-api-key","Your API key is invalid, please check you have copied it correctly."),Object(k.a)(e,"invalid-cert-hash","The SHA-1 certificate hash provided is invalid."),Object(k.a)(e,"invalid-credential","The supplied auth credential is malformed or has expired."),Object(k.a)(e,"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."),Object(k.a)(e,"invalid-multi-factor-session","The request does not contain a valid proof of first factor successful sign-in."),Object(k.a)(e,"invalid-oauth-provider","EmailAuthProvider is not supported for this operation. This operation only supports OAuth providers."),Object(k.a)(e,"invalid-oauth-client-id","The OAuth client ID provided is either invalid or does not match the specified API key."),Object(k.a)(e,"unauthorized-domain","This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console."),Object(k.a)(e,"invalid-action-code","The action code is invalid. This can happen if the code is malformed, expired, or has already been used."),Object(k.a)(e,"wrong-password","The password is invalid or the user does not have a password."),Object(k.a)(e,"invalid-persistence-type","The specified persistence type is invalid. It can only be local, session or none."),Object(k.a)(e,"invalid-phone-number","The format of the phone number provided is incorrect. Please enter the phone number in a format that can be parsed into E.164 format. E.164 phone numbers are written in the format [+][country code][subscriber number including area code]."),Object(k.a)(e,"invalid-provider-id","The specified provider ID is invali
2d."),Object(k.a)(e,"invalid-recipient-email","The email corresponding to this action failed to send as the provided recipient email address is invalid."),Object(k.a)(e,"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."),Object(k.a)(e,"invalid-verification-id","The verification ID used to create the phone auth credential is invalid."),Object(k.a)(e,"invalid-tenant-id","The Auth instance's tenant ID is invalid."),Object(k.a)(e,"login-blocked","Login blocked by user-provided method: {$originalMessage}"),Object(k.a)(e,"missing-android-pkg-name","An Android Package Name must be provided if the Android App is required to be installed."),Object(k.a)(e,"auth-domain-config-required","Be sure to include authDomain when calling firebase.initializeApp(), by following the instructions in the Firebase console."),Object(k.a)(e,"missing-app-credential","The phone verification request is missing an application verifier assertion. A reCAPTCHA response token needs to be provided."),Object(k.a)(e,"missing-verification-code","The phone auth credential was created with an empty SMS verification code."),Object(k.a)(e,"missing-continue-uri","A continue URL must be provided in the request."),Object(k.a)(e,"missing-iframe-start","An internal AuthError has occurred."),Object(k.a)(e,"missing-ios-bundle-id","An iOS Bundle ID must be provided if an App Store ID is provided."),Object(k.a)(e,"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."),Object(k.a)(e,"missing-multi-factor-info","No second factor identifier is provided."),Object(k.a)(e,"missing-multi-factor-session","The request is missing proof of first factor successful sign-in."),Object(k.a)(e,"missing-phone-number","To send verification codes, provide a phone number for the recipient."),Object(k.a)(e,"missing-verification-id","The phone auth credential was created with an empty verification ID."),Object(k.a)(e,"app-deleted","This instance of FirebaseApp has been deleted."),Object(k.a)(e,"multi-factor-info-not-found","The user does not have a second factor matching the identifier provided."),Object(k.a)(e,"multi-factor-auth-required","Proof of ownership of a second factor is required to complete sign-in."),Object(k.a)(e,"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."),Object(k.a)(e,"network-request-failed","A network AuthError (such as timeout, interrupted connection or unreachable host) has occurred."),Object(k.a)(e,"no-auth-event","An internal AuthError has occurred."),Object(k.a)(e,"no-such-provider","User was not linked to an account with the given provider."),Object(k.a)(e,"null-user","A null user object was provided as the argument for an operation which requires a non-null user object."),Object(k.a)(e,"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."),Object(k.a)(e,"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.'),Object(k.a)(e,"popup-blocked","Unable to establish a connection with the popup. It may have been blocked by the browser."),Object(k.a)(e,"popup-closed-by-user","The popup has been closed by the user before finalizing the operation."),Object(k.a)(e,"provider-already-linked","User can only be linked to one identity for the given provider."),Object(k.a)(e,"quota-exceeded","The project's quota for this operation has been exceeded."),Object(k.a)(e,"redirect-cancelled-by-user","The redirect operation has been cancelled by the user before finalizing."),Object(k.a)(e,"redirect-operation-pending","A redirect sign-in operation is already pending."),Object(k.a)(e,"rejected-credential","The request contains malformed or mismatching credentials."),Object(k.a)(e,"second-factor-already-in-use","The second factor is already enrolled on this account."),Object(k.a)(e,"maximum-second-factor-count-exceeded","The maximum allowed number of second factors on a user has been exceeded."),Object(k.a)(e,"tenant-id-mismatch","The provided tenant ID does not match the Auth instance's tenant ID"),Object(k.a)(e,"timeout","The operation has timed out."),Object(k.a)(e,"user-token-expired","The user's credential is no longer valid. The user must sign in again."),Object(k.a)(e,"too-many-requests","We have blocked all requests from this device due to unusual activity. Try again later."),Object(k.a)(e,"unauthorized-continue-uri","The domain of the continue URL is not whitelisted.  Please whitelist the domain in the Firebase console."),Object(k.a)(e,"unsupported-first-factor","Enrolling a second factor or signing in with a multi-factor account requires sign-in with a supported first factor."),Object(k.a)(e,"unsupported-persistence-type","The current environment does not support the specified persistence type."),Object(k.a)(e,"unsupported-tenant-operation","This operation is not supported in a multi-tenant context."),Object(k.a)(e,"unverified-email","The operation requires a verified email."),Object(k.a)(e,"user-cancelled","The user did not grant your application the permissions it requested."),Object(k.a)(e,"user-not-found","There is no user record corresponding to this identifier. The user may have been deleted."),Object(k.a)(e,"user-disabled","The user account has been disabled by an administrator."),Object(k.a)(e,"user-mismatch","The supplied credentials do not correspond to the previously signed in user."),Object(k.a)(e,"user-signed-out",""),Object(k.a)(e,"weak-password","The password must be 6 characters long or more."),Object(k.a)(e,"web-storage-unsupported","This browser is not supported or 3rd party cookies and data may be disabled."),Object(k.a)(e,"already-initialized","initializeAuth() has already been called with different options. To avoid this error, call initializeAuth() with the same options as when it was originally called, or call getAuth() to return the already initialized instance."),e},A=I,R=new w.b("auth","Firebase",I()),N=new j.b("@firebase/auth");function P(e){if(N.logLevel<=j.a.ERROR){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];
2N.error.apply(N,["Auth (".concat(O.SDK_VERSION,"): ").concat(e)].concat(n))}}function D(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw U.apply(void 0,[e].concat(n))}function L(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return U.apply(void 0,[e].concat(n))}function M(e,t,n){var r=Object.assign(Object.assign({},A()),Object(k.a)({},t,n));return new w.b("auth","Firebase",r).create(t,{appName:e.name})}function F(e,t,n){if(!(t instanceof n))throw n.name!==t.constructor.name&&D(e,"argument-error"),M(e,"argument-error","Type of ".concat(t.constructor.name," does not match expected instance.")+"Did you pass a reference from a different Auth SDK?")}function U(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if("string"!==typeof e){var i,a=n[0],o=Object(b.a)(n.slice(1));return o[0]&&(o[0].appName=e.name),(i=e._errorFactory).create.apply(i,[a].concat(Object(b.a)(o)))}return R.create.apply(R,[e].concat(n))}function V(e,t){if(!e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];throw U.apply(void 0,[t].concat(r))}}function B(e){var t="INTERNAL ASSERTION FAILED: "+e;throw P(t),new Error(t)}function z(e,t){e||B(t)}var q=new Map;function W(e){z(e instanceof Function,"Expected a class definition");var t=q.get(e);return t?(z(t instanceof e,"Instance stored in cache mismatched with class"),t):(t=new e,q.set(e,t),t)}function H(){var e;return"undefined"!==typeof self&&(null===(e=self.location)||void 0===e?void 0:e.href)||""}function K(){return"http:"===G()||"https:"===G()}function G(){var e;return"undefined"!==typeof self&&(null===(e=self.location)||void 0===e?void 0:e.protocol)||null}var $=function(){function e(t,n){Object(c.a)(this,e),this.shortDelay=t,this.longDelay=n,z(n>t,"Short delay should be less than long delay!"),this.isMobile=Object(w.t)()||Object(w.v)()}return Object(l.a)(e,[{key:"get",value:function(){return"undefined"!==typeof navigator&&navigator&&"onLine"in navigator&&"boolean"===typeof navigator.onLine&&(K()||Object(w.o)()||"connection"in navigator)&&!navigator.onLine?Math.min(5e3,this.shortDelay):this.isMobile?this.longDelay:this.shortDelay}}]),e}();function Q(e,t){z(e.emulator,"Emulator should always be set here");var n=e.emulator.url;return t?"".concat(n).concat(t.startsWith("/")?t.slice(1):t):n}var Y=function(){function e(){Object(c.a)(this,e)}return Object(l.a)(e,null,[{key:"initialize",value:function(e,t,n){this.fetchImpl=e,t&&(this.headersImpl=t),n&&(this.responseImpl=n)}},{key:"fetch",value:function(){return this.fetchImpl?this.fetchImpl:"undefined"!==typeof self&&"fetch"in self?self.fetch:void B("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}},{key:"headers",value:function(){return this.headersImpl?this.headersImpl:"undefined"!==typeof self&&"Headers"in self?self.Headers:void B("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}},{key:"response",value:function(){return this.responseImpl?this.responseImpl:"undefined"!==typeof self&&"Response"in self?self.Response:void B("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}]),e}(),X=(_={},Object(k.a)(_,"CREDENTIAL_MISMATCH","custom-token-mismatch"),Object(k.a)(_,"MISSING_CUSTOM_TOKEN","internal-error"),Object(k.a)(_,"INVALID_IDENTIFIER","invalid-email"),Object(k.a)(_,"MISSING_CONTINUE_URI","internal-error"),Object(k.a)(_,"INVALID_PASSWORD","wrong-password"),Object(k.a)(_,"MISSING_PASSWORD","internal-error"),Object(k.a)(_,"EMAIL_EXISTS","email-already-in-use"),Object(k.a)(_,"PASSWORD_LOGIN_DISABLED","operation-not-allowed"),Object(k.a)(_,"INVALID_IDP_RESPONSE","invalid-credential"),Object(k.a)(_,"INVALID_PENDING_TOKEN","invalid-credential"),Object(k.a)(_,"FEDERATED_USER_ID_ALREADY_LINKED","credential-already-in-use"),Object(k.a)(_,"MISSING_REQ_TYPE","internal-error"),Object(k.a)(_,"EMAIL_NOT_FOUND","user-not-found"),Object(k.a)(_,"RESET_PASSWORD_EXCEED_LIMIT","too-many-requests"),Object(k.a)(_,"EXPIRED_OOB_CODE","expired-action-code"),Object(k.a)(_,"INVALID_OOB_CODE","invali
2d-action-code"),Object(k.a)(_,"MISSING_OOB_CODE","internal-error"),Object(k.a)(_,"CREDENTIAL_TOO_OLD_LOGIN_AGAIN","requires-recent-login"),Object(k.a)(_,"INVALID_ID_TOKEN","invalid-user-token"),Object(k.a)(_,"TOKEN_EXPIRED","user-token-expired"),Object(k.a)(_,"USER_NOT_FOUND","user-token-expired"),Object(k.a)(_,"TOO_MANY_ATTEMPTS_TRY_LATER","too-many-requests"),Object(k.a)(_,"INVALID_CODE","invalid-verification-code"),Object(k.a)(_,"INVALID_SESSION_INFO","invalid-verification-id"),Object(k.a)(_,"INVALID_TEMPORARY_PROOF","invalid-credential"),Object(k.a)(_,"MISSING_SESSION_INFO","missing-verification-id"),Object(k.a)(_,"SESSION_EXPIRED","code-expired"),Object(k.a)(_,"MISSING_ANDROID_PACKAGE_NAME","missing-android-pkg-name"),Object(k.a)(_,"UNAUTHORIZED_DOMAIN","unauthorized-continue-uri"),Object(k.a)(_,"INVALID_OAUTH_CLIENT_ID","invalid-oauth-client-id"),Object(k.a)(_,"ADMIN_ONLY_OPERATION","admin-restricted-operation"),Object(k.a)(_,"INVALID_MFA_PENDING_CREDENTIAL","invalid-multi-factor-session"),Object(k.a)(_,"MFA_ENROLLMENT_NOT_FOUND","multi-factor-info-not-found"),Object(k.a)(_,"MISSING_MFA_ENROLLMENT_ID","missing-multi-factor-info"),Object(k.a)(_,"MISSING_MFA_PENDING_CREDENTIAL","missing-multi-factor-session"),Object(k.a)(_,"SECOND_FACTOR_EXISTS","second-factor-already-in-use"),Object(k.a)(_,"SECOND_FACTOR_LIMIT_EXCEEDED","maximum-second-factor-count-exceeded"),Object(k.a)(_,"BLOCKING_FUNCTION_ERROR_RESPONSE","internal-error"),_),J=new $(3e4,6e4);function Z(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}function ee(e,t,n,r){return te.apply(this,arguments)}function te(){return te=Object(v.a)(s.a.mark((function e(t,n,r,i){var a,o=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=o.length>4&&void 0!==o[4]?o[4]:{},e.abrupt("return",ne(t,a,Object(v.a)(s.a.mark((function e(){var a,o,u,c;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a={},o={},i&&("GET"===n?o=i:a={body:JSON.stringify(i)}),u=Object(w.y)(Object.assign({key:t.config.apiKey},o)).slice(1),e.next=6,t._getAdditionalHeaders();case 6:return(c=e.sent)["Content-Type"]="application/json",t.languageCode&&(c["X-Firebase-Locale"]=t.languageCode),e.abrupt("return",Y.fetch()(oe(t,t.config.apiHost,r,u),Object.assign({method:n,headers:c,referrerPolicy:"no-referrer"},a)));case 10:case"end":return e.stop()}}),e)})))));case 2:case"end":return e.stop()}}),e)}))),te.apply(this,arguments)}function ne(e,t,n){return re.apply(this,arguments)}function re(){return(re=Object(v.a)(s.a.mark((function e(t,n,r){var i,a,o,u,c,l,f,h,d,p;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t._canInitEmulator=!1,i=Object.assign(Object.assign({},X),n),e.prev=2,a=new ue(t),e.next=6,Promise.race([r(),a.promise]);case 6:return o=e.sent,a.clearNetworkTimeout(),e.next=10,o.json();case 10:if(!("needConfirmation"in(u=e.sent))){e.next=13;break}throw se(t,"account-exists-with-different-credential",u);case 13:if(!o.ok||"errorMessage"in u){e.next=17;break}return e.abrupt("return",u);case 17:if(c=o.ok?u.errorMessage:u.error.message,l=c.split(" : "),f=Object(g.a)(l,2),h=f[0],d=f[1],"FEDERATED_USER_ID_ALREADY_LINKED"!==h){e.next=23;break}throw se(t,"credential-already-in-use",u);case 23:if("EMAIL_EXISTS"!==h){e.next=27;break}throw se(t,"email-already-in-use",u);case 27:if("USER_DISABLED"!==h){e.next=29;break}throw se(t,"user-disabled",u);case 29:if(p=i[h]||h.toLowerCase().replace(/[_\s]+/g,"-"),!d){e.next=34;break}throw M(t,p,d);case 34:D(t,p);case 35:e.next=42;break;case 37:if(e.prev=37,e.t0=e.catch(2),!(e.t0 instanceof w.c)){e.next=41;break}throw e.t0;case 41:D(t,"network-request-failed");case 42:case"end":return e.stop()}}),e,null,[[2,37]])})))).apply(this,arguments)}function ie(e,t,n,r){return ae.apply(this,arguments)}function ae(){return ae=Object(v.a)(s.a.mark((function e(t,n,r,i){var a,o,u=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=u.length>4&&void 0!==u[4]?u[4]:{},e.next=3,ee(t,n,r,i,a);case 3:return"mfaPendingCredential"in(o=e.sent)&&D(t,"multi-factor-auth-required",{_serverResponse:o}),e.abrupt("return",o);case 6:case"end":return e.stop()}}),e)}))),ae.apply(this,arguments)}function oe(e,t,n,r){var i="".concat(t).concat(n,"?").concat(r);return e.config.emulator?Q(e.config,i):"".concat(e.config.apiScheme,"://").concat(i)}var ue=function(){function e(t){var n=this;Object(c.a)(this,e),this.auth=t,this.timer=null,this.promise=new Promise((function(e,t){n.timer=setTimeout((function(){return t(L(n.auth,"network-request-failed"))}),J.get())}))}return Object(l.a)(e,[{key:"clearNetworkTimeout",value:function(){clearTimeout(this.timer)}}]),e}();
2function se(e,t,n){var r={appName:e.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);var i=L(e,t,r);return i.customData._tokenResponse=n,i}function ce(e,t){return le.apply(this,arguments)}function le(){return(le=Object(v.a)(s.a.mark((function e(t,n){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",ee(t,"POST","/v1/accounts:delete",n));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fe(e,t){return he.apply(this,arguments)}function he(){return(he=Object(v.a)(s.a.mark((function e(t,n){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",ee(t,"POST","/v1/accounts:update",n));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function de(e,t){return pe.apply(this,arguments)}function pe(){return(pe=Object(v.a)(s.a.mark((function e(t,n){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",ee(t,"POST","/v1/accounts:lookup",n));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ve(e){if(e)try{var t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(n){}}function me(){return me=Object(v.a)(s.a.mark((function e(t){var n,r,i,a,o,u,c=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=c.length>1&&void 0!==c[1]&&c[1],r=Object(w.l)(t),e.next=4,r.getIdToken(n);case 4:return i=e.sent,V((a=ge(i))&&a.exp&&a.auth_time&&a.iat,r.auth,"internal-error"),o="object"===typeof a.firebase?a.firebase:void 0,u=null===o||void 0===o?void 0:o.sign_in_provider,e.abrupt("return",{claims:a,token:i,authTime:ve(ye(a.auth_time)),issuedAtTime:ve(ye(a.iat)),expirationTime:ve(ye(a.exp)),signInProvider:u||null,signInSecondFactor:(null===o||void 0===o?void 0:o.sign_in_second_factor)||null});case 10:case"end":return e.stop()}}),e)}))),me.apply(this,arguments)}function ye(e){return 1e3*Number(e)}function ge(e){var t=e.split("."),n=Object(g.a)(t,3),r=n[0],i=n[1],a=n[2];if(void 0===r||void 0===i||void 0===a)return P("JWT malformed, contained fewer than 3 sections"),null;try{var o=Object(w.d)(i);return o?JSON.parse(o):(P("Failed to decode base64 JWT payload"),null)}catch(u){return P("Caught error parsing JWT payload as JSON",u),null}}function be(e,t){return ke.apply(this,arguments)}function ke(){return ke=Object(v.a)(s.a.mark((function e(t,n){var r=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r.length>2&&void 0!==r[2]&&r[2])){e.next=3;break}return e.abrupt("return",n);case 3:return e.prev=3,e.next=6,n;case 6:return e.abrupt("return",e.sent);case 9:if(e.prev=9,e.t0=e.catch(3),!(e.t0 instanceof w.c&&we(e.t0))){e.next=15;break}if(t.auth.currentUser!==t){e.next=15;break}return e.next=15,t.auth.signOut();case 15:throw e.t0;case 16:case"end":return e.stop()}}),e,null,[[3,9]])}))),ke.apply(this,arguments)}function we(e){var t=e.code;return t==="auth/".concat("user-disabled")||t==="auth/".concat("user-token-expired")}var Oe=function(){function e(t){Object(c.a)(this,e),this.user=t,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}return Object(l.a)(e,[{key:"_start",value:function(){this.isRunning||(this.isRunning=!0,this.schedule())}},{key:"_stop",value:function(){this.isRunning&&(this.isRunning=!1,null!==this.timerId&&clearTimeout(this.timerId))}},{key:"getInterval",value:function(e){var t;if(e){var n=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),n}this.errorBackoff=3e4;var r=(null!==(t=this.user.stsTokenManager.expirationTime)&&void 0!==t?t:0)-Date.now()-3e5;return Math.max(0,r)}},{key:"schedule",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isRunning){var n=this.getInterval(t);this.timerId=setTimeout(Object(v.a)(s.a.mark((function t(){return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.iteration();case 2:case"end":return t.stop()}}),t)}))),n)}}},{key:"iteration",value:function(){var e=Object(v.a)(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.user.getIdToken(!0);case 3:e.next=9;break;case 5:return e.prev=5,e.t0=e.catch(0),e.t0.code==="auth/".concat("network-request-failed")&&this.schedule(!0),e.abrupt("return");case 9:this.schedule();case 10:case"end":return e.stop()}}),e,this,[[0,5]])})));return function(){return e.apply(this,arguments)}}()}]),e}(),xe=function(){function e(t,n){Object(c.a)(this,e),this.createdAt=t,this.lastLoginAt=n,this._initializeTime()}return Object(l.a)(e,[{key:"_initializeTime",value:function(){this.lastSignInTime=ve(this.lastLoginAt),this.creationTime=ve(this.createdAt)}},{key:"_copy",value:function(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}},{key:"toJSON",value:function(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}]),e}();function _e(e){return je.apply(this,arguments)}function je(){return(je=Object(v.a)(s.a.mark((function e(t){var n,r,i,a,o,u,c,l,f,h,d;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.auth,e.next=3,t.getIdToken();case 3:return i=e.sent,e.next=6,be(t,de(r,{idToken:i}));case 6:V(null===(a=e.sent)||void 0===a?void 0:a.users.length,r,"internal-error"),o=a.users[0],t._notifyReloadListener(o),u=(null===(n=o.providerUserInfo)||void 0===n?void 0:n.length)?Te(o.providerUserInfo):[],c=Se(t.providerData,u),l=t.isAnonymous,f=!(t.email&&o.passwordHash)&&!(null===c||void 0===c?void 0:c.length),h=!!l&&f,d={uid:o.localId,displayName:o.displayName||null,photoURL:o.photoUrl||null,email:o.email||null,emailVerified:o.emailVerified||!1,phoneNumber:o.phoneNumber||null,tenantId:o.tenantId||null,providerData:c,metadata:new xe(o.createdAt,o.lastLoginAt),isAnonymous:h},Object.assign(t,d);case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ee(){return(Ee=Object(v.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Object(w.l)(t),e.next=3,_e(n);case 3:return e.next=5,n.auth._persistUserIfCurrent(n);case 5:n.auth._notifyListenersIfCurrent(n);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Se(e,t){var n=e.filter((function(e){return!t.some((function(t){return t.providerId===e.providerId}))}));return[].concat(Object(b.a)(n),Object(b.a)(t))}function Te(e){return e.map((function(e){var t=e.providerId,n=x(e,["providerId"]);
2return{providerId:t,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}}))}function Ie(e,t){return Ce.apply(this,arguments)}function Ce(){return(Ce=Object(v.a)(s.a.mark((function e(t,n){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ne(t,{},Object(v.a)(s.a.mark((function e(){var r,i,a,o,u,c;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(w.y)({grant_type:"refresh_token",refresh_token:n}).slice(1),i=t.config,a=i.tokenApiHost,o=i.apiKey,u=oe(t,a,"/v1/token","key=".concat(o)),e.next=5,t._getAdditionalHeaders();case 5:return(c=e.sent)["Content-Type"]="application/x-www-form-urlencoded",e.abrupt("return",Y.fetch()(u,{method:"POST",headers:c,body:r}));case 8:case"end":return e.stop()}}),e)}))));case 2:return r=e.sent,e.abrupt("return",{accessToken:r.access_token,expiresIn:r.expires_in,refreshToken:r.refresh_token});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Ae=function(){function e(){Object(c.a)(this,e),this.refreshToken=null,this.accessToken=null,this.expirationTime=null}return Object(l.a)(e,[{key:"isExpired",get:function(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}},{key:"updateFromServerResponse",value:function(e){V(e.idToken,"internal-error"),V("undefined"!==typeof e.idToken,"internal-error"),V("undefined"!==typeof e.refreshToken,"internal-error");var t="expiresIn"in e&&"undefined"!==typeof e.expiresIn?Number(e.expiresIn):function(e){var t=ge(e);return V(t,"internal-error"),V("undefined"!==typeof t.exp,"internal-error"),V("undefined"!==typeof t.iat,"internal-error"),Number(t.exp)-Number(t.iat)}(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}},{key:"getToken",value:function(){var e=Object(v.a)(s.a.mark((function e(t){var n,r=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.length>1&&void 0!==r[1]&&r[1],V(!this.accessToken||this.refreshToken,t,"user-token-expired"),n||!this.accessToken||this.isExpired){e.next=4;break}return e.abrupt("return",this.accessToken);case 4:if(!this.refreshToken){e.next=8;break}return e.next=7,this.refresh(t,this.refreshToken);case 7:return e.abrupt("return",this.accessToken);case 8:return e.abrupt("return",null);case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"clearRefreshToken",value:function(){this.refreshToken=null}},{key:"refresh",value:function(){var e=Object(v.a)(s.a.mark((function e(t,n){var r,i,a,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ie(t,n);case 2:r=e.sent,i=r.accessToken,a=r.refreshToken,o=r.expiresIn,this.updateTokensAndExpiration(i,a,Number(o));case 7:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"updateTokensAndExpiration",value:function(e,t,n){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*n}},{key:"toJSON",value:function(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}},{key:"_assign",value:function(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}},{key:"_clone",value:function(){return Object.assign(new e,this.toJSON())}},{key:"_performRefresh",value:function(){return B("not implemented")}}],[{key:"fromJSON",value:function(t,n){var r=n.refreshToken,i=n.accessToken,a=n.expirationTime,o=new e;return r&&(V("string"===typeof r,"internal-error",{appName:t}),o.refreshToken=r),i&&(V("string"===typeof i,"internal-error",{appName:t}),o.accessToken=i),a&&(V("number"===typeof a,"internal-error",{appName:t}),o.expirationTime=a),o}}]),e}();function Re(e,t){V("string"===typeof e||"undefined"===typeof e,"internal-error",{appName:t})}var Ne=function(){function e(t){Object(c.a)(this,e);var n=t.uid,r=t.auth,i=t.stsTokenManager,a=x(t,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new Oe(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=n,this.auth=r,this.stsTokenManager=i,this.accessToken=i.accessToken,this.displayName=a.displayName||null,this.email=a.email||null,this.emailVerified=a.emailVerified||!1,this.phoneNumber=a.phoneNumber||null,this.photoURL=a.photoURL||null,this.isAnonymous=a.isAnonymous||!1,this.tenantId=a.tenantId||null,this.providerData=a.providerData?Object(b.a)(a.providerData):[],this.metadata=new xe(a.createdAt||void 0,a.lastLoginAt||void 0)}return Object(l.a)(e,[{key:"getIdToken",value:function(){var e=Object(v.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,be(this,this.stsTokenManager.getToken(this.auth,t));case 2:if(V(n=e.sent,this.auth,"internal-error"),this.accessToken===n){e.next=9;break}return this.accessToken=n,e.next=8,this.auth._persistUserIfCurrent(this);case 8:this.auth._notifyListenersIfCurrent(this);case 9:return e.abrupt("return",n);case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getIdTokenResult",value:function(e){return function(e){return me.apply(this,arguments)}(this,e)}},{key:"reload",value:function(){return function(e){return Ee.apply(this,arguments)}(this)}},{key:"_assign",value:function(e){this!==e&&(V(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.ph
2otoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map((function(e){return Object.assign({},e)})),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}},{key:"_clone",value:function(t){return new e(Object.assign(Object.assign({},this),{auth:t,stsTokenManager:this.stsTokenManager._clone()}))}},{key:"_onReload",value:function(e){V(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}},{key:"_notifyReloadListener",value:function(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}},{key:"_startProactiveRefresh",value:function(){this.proactiveRefresh._start()}},{key:"_stopProactiveRefresh",value:function(){this.proactiveRefresh._stop()}},{key:"_updateTokensIfNecessary",value:function(){var e=Object(v.a)(s.a.mark((function e(t){var n,r,i=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=i.length>1&&void 0!==i[1]&&i[1],r=!1,t.idToken&&t.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(t),r=!0),!n){e.next=6;break}return e.next=6,_e(this);case 6:return e.next=8,this.auth._persistUserIfCurrent(this);case 8:r&&this.auth._notifyListenersIfCurrent(this);case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"delete",value:function(){var e=Object(v.a)(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getIdToken();case 2:return t=e.sent,e.next=5,be(this,ce(this.auth,{idToken:t}));case 5:return this.stsTokenManager.clearRefreshToken(),e.abrupt("return",this.auth.signOut());case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"toJSON",value:function(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map((function(e){return Object.assign({},e)})),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}},{key:"refreshToken",get:function(){return this.stsTokenManager.refreshToken||""}}],[{key:"_fromJSON",value:function(t,n){var r,i,a,o,u,s,c,l,f=null!==(r=n.displayName)&&void 0!==r?r:void 0,h=null!==(i=n.email)&&void 0!==i?i:void 0,d=null!==(a=n.phoneNumber)&&void 0!==a?a:void 0,p=null!==(o=n.photoURL)&&void 0!==o?o:void 0,v=null!==(u=n.tenantId)&&void 0!==u?u:void 0,m=null!==(s=n._redirectEventId)&&void 0!==s?s:void 0,y=null!==(c=n.createdAt)&&void 0!==c?c:void 0,g=null!==(l=n.lastLoginAt)&&void 0!==l?l:void 0,b=n.uid,k=n.emailVerified,w=n.isAnonymous,O=n.providerData,x=n.stsTokenManager;V(b&&x,t,"internal-error");var _=Ae.fromJSON(this.name,x);V("string"===typeof b,t,"internal-error"),Re(f,t.name),Re(h,t.name),V("boolean"===typeof k,t,"internal-error"),V("boolean"===typeof w,t,"internal-error"),Re(d,t.name),Re(p,t.name),Re(v,t.name),Re(m,t.name),Re(y,t.name),Re(g,t.name);var j=new e({uid:b,auth:t,email:h,emailVerified:k,displayName:f,isAnonymous:w,photoURL:p,phoneNumber:d,tenantId:v,stsTokenManager:_,createdAt:y,lastLoginAt:g});return O&&Array.isArray(O)&&(j.providerData=O.map((function(e){return Object.assign({},e)}))),m&&(j._redirectEventId=m),j}},{key:"_fromIdTokenResponse",value:function(){var t=Object(v.a)(s.a.mark((function t(n,r){var i,a,o,u=arguments;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=u.length>2&&void 0!==u[2]&&u[2],(a=new Ae).updateFromServerResponse(r),o=new e({uid:r.localId,auth:n,stsTokenManager:a,isAnonymous:i}),t.next=6,_e(o);case 6:return t.abrupt("return",o);case 7:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()}]),e}(),Pe=function(){function e(){Object(c.a)(this,e),this.type="NONE",this.storage={}}return Object(l.a)(e,[{key:"_isAvailable",value:function(){var e=Object(v.a)(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",!0);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"_set",value:function(){var e=Object(v.a)(s.a.mark((function e(t,n){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.storage[t]=n;case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_get",value:function(){var e=Object(v.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.storage[t],e.abrupt("return",void 0===n?null:n);case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_remove",value:function(){var e=Object(v.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:delete this.storage[t];case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_addListener",value:function(e,t){}},{key:"_removeListener",value:function(e,t){}}]),e}();Pe.type="NONE";var De=Pe;function Le(e,t,n){return"firebase".concat(":",e,":").concat(t,":").concat(n)}var Me=function(){function e(t,n,r){Object(c.a)(this,e),this.persistence=t,this.auth=n,this.userKey=r;var i=this.auth,a=i.config,o=i.name;this.fullUserKey=Le(this.userKey,a.apiKey,o),this.fullPersistenceKey=Le("persistence",a.apiKey,o),this.boundEventHandler=n._onStorageEvent.bind(n),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}return Object(l.a)(e,[{key:"setCurrentUser",value:function(e){return this.persistence._set(this.fullUserKey,e.toJSON())}},{key:"getCurrentUser",value:function(){var e=Object(v.a)(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.persistence._get(this.fullUserKey);case 2:return t=e.sent,e.abrupt("return",t?Ne._fromJSON(this.auth,t):null);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"removeCurrentUser",value:function(){return this.persistence._remove(this.fullUserKey)}},{key:"savePersistenceForRedirect",value:function(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}},{key:"setPersistence",value:function(){var e=Object(v.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.persistence!==t){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.getCurrentUser();case 4:return n=e.sent,e.next=7,this.removeCurrentUser();case 7:if(this.persistence=t,!n){e.next=10;break}return e.abrupt("return",this.setCurrentUser(n));case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"delete",value:function(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}}],[{key:"create",value:function(){var t=Object(v.a)(s.a.mark((function t(n,r){var i,a,o,u,c,l,f,h,d,p,m,g=arguments;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=g.length>2&&void 0!==g[2]?g[2]:"authUser",r.length){t.next=3;break}return t.abrupt("return",new e(W(De),n,i));case 3:return t.next=5,Promise.all(r.map(function(){var e=Object(v.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t._isAvailable();case 2:if(!e.sent){e.next=4;break}return e.abrupt("return",t);case 4:return e.abrupt("return",void 0);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 5:a=t.sent.filter((function(e){return e}
2)),o=a[0]||W(De),u=Le(i,n.config.apiKey,n.name),c=null,l=Object(y.a)(r),t.prev=10,l.s();case 12:if((f=l.n()).done){t.next=29;break}return h=f.value,t.prev=14,t.next=17,h._get(u);case 17:if(!(d=t.sent)){t.next=23;break}return p=Ne._fromJSON(n,d),h!==o&&(c=p),o=h,t.abrupt("break",29);case 23:t.next=27;break;case 25:t.prev=25,t.t0=t.catch(14);case 27:t.next=12;break;case 29:t.next=34;break;case 31:t.prev=31,t.t1=t.catch(10),l.e(t.t1);case 34:return t.prev=34,l.f(),t.finish(34);case 37:if(m=a.filter((function(e){return e._shouldAllowMigration})),o._shouldAllowMigration&&m.length){t.next=40;break}return t.abrupt("return",new e(o,n,i));case 40:if(o=m[0],!c){t.next=44;break}return t.next=44,o._set(u,c.toJSON());case 44:return t.next=46,Promise.all(r.map(function(){var e=Object(v.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t===o){e.next=8;break}return e.prev=1,e.next=4,t._remove(u);case 4:e.next=8;break;case 6:e.prev=6,e.t0=e.catch(1);case 8:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(t){return e.apply(this,arguments)}}()));case 46:return t.abrupt("return",new e(o,n,i));case 47:case"end":return t.stop()}}),t,null,[[10,31,34,37],[14,25]])})));return function(e,n){return t.apply(this,arguments)}}()}]),e}();function Fe(e){var t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(ze(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(Ue(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(We(t))return"Blackberry";if(He(t))return"Webos";if(Ve(t))return"Safari";if((t.includes("chrome/")||Be(t))&&!t.includes("edge/"))return"Chrome";if(qe(t))return"Android";var n=e.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/);return 2===(null===n||void 0===n?void 0:n.length)?n[1]:"Other"}function Ue(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object(w.m)();return/firefox\//i.test(e)}function Ve(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object(w.m)(),t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function Be(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object(w.m)();return/crios\//i.test(e)}function ze(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object(w.m)();return/iemobile/i.test(e)}function qe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object(w.m)();return/android/i.test(e)}function We(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object(w.m)();return/blackberry/i.test(e)}function He(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object(w.m)();return/webos/i.test(e)}function Ke(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object(w.m)();return/iphone|ipad|ipod/i.test(e)}function Ge(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object(w.m)();return Ke(t)&&!!(null===(e=window.navigator)||void 0===e?void 0:e.standalone)}function $e(){return Object(w.r)()&&10===document.documentMode}function Qe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object(w.m)();return Ke(e)||qe(e)||He(e)||We(e)||/windows phone/i.test(e)||ze(e)}function Ye(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];switch(e){case"Browser":t=Fe(Object(w.m)());break;case"Worker":t="".concat(Fe(Object(w.m)()),"-").concat(e);break;default:t=e}var r=n.length?n.join(","):"FirebaseCore-web";return"".concat(t,"/","JsCore","/").concat(O.SDK_VERSION,"/").concat(r)}var Xe=function(){function e(t){Object(c.a)(this,e),this.auth=t,this.queue=[]}return Object(l.a)(e,[{key:"pushCallback",value:function(e,t){var n=this,r=function(t){return new Promise((function(n,r){try{n(e(t))}catch(i){r(i)}}))};r.onAbort=t,this.queue.push(r);var i=this.queue.length-1;return function(){n.queue[i]=function(){return Promise.resolve()}}}},{key:"runMiddleware",value:function(){var e=Object(v.a)(s.a.mark((function e(t){var n,r,i,a,o,u,c;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.auth.currentUser!==t){e.next=2;break}return e.abrupt("return");case 2:n=[],e.prev=3,r=Object(y.a)(this.queue),e.prev=5,r.s();case 7:if((i=r.n()).done){e.next=14;break}return a=i.value,e.next=11,a(t);case 11:a.onAbort&&n.push(a.onAbort);case 12:e.next=7;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(5),r.e(e.t0);case 19:return e.prev=19,r.f(),e.finish(19);case 22:e.next=30;break;case 24:e.prev=24,e.t1=e.catch(3),n.reverse(),o=Object(y.a)(n);try{for(o.s();!(u=o.n()).done;){c=u.value;try{c()}catch(s){}}}catch(l){o.e(l)}finally{o.f()}throw this.auth._errorFactory.create("login-blocked",{originalMessage:e.t1.message});case 30:case"end":return e.stop()}}),e,this,[[3,24],[5,16,19,22]])})));return function(t){return e.apply(this,arguments)}}()}]),e}(),Je=function(){function e(t,n,r){Object(c.a)(this,e),this.app=t,this.heartbeatServiceProvider=n,this.config=r,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new et(this),this.idTokenSubscription=new et(this),this.beforeStateQueue=new Xe(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=R,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=t.name,this.clientVersion=r.sdkClientVersion}return Object(l.a)(e,[{key:"_initializeWithPersistence",value:function(e,t){var n=this;return t&&(this._popupRedirectResolver=W(t)),this._initializationPromise=this.queue(Object(v.a)(s.a.mark((function r(){var i,a;return s.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!n._deleted){r.next=2;break}return r.abrupt("return");case 2:return r.next=4,Me.create(n,e);case 4:if(n.persistenceManager=r.sent,!n._deleted){r.next=7;break}return r.abrupt("return");case 7:if(!(null===(i=n._popupRedirectResolver)||void 0===i?void 0:i._shouldInitProactively)){r.next=15;break}return r.prev=8,r.next=11,n._popupRedirectResolver._initialize(n);case 11:r.next=15;break;case 13:r.prev=13,r.t0=r.catch(8);case 15:return r.next=17,n.initializeCurrentUser(t);case 17:if(n.lastNotifiedUid=(null===(a=n.currentUser)||void 0===a?void 0:a.uid)||null,!n._deleted){r.next=20;break}return r.abrupt("return");case 20:n._isInitialized=!0;case 21:case"end":return r.stop()}}),r,null,[[8,13]])})))),this._initializationPromise}},{key:"_onStorageEvent",value:function(){var e=Object(v.a)(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._deleted){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.assertedPersistence.getCurrentUser();case 4:if(t=e.sent,this.currentUser||t){e.next=7;break}return e.abrupt("return");case 7:if(!this.currentUser||!t||this.currentUser.uid!==t.uid){e.next=12;break}return this._currentUser._assign(t),e.next=11,this.currentUser.getIdToken();case 11:return e.abrupt("return");case 12:return e.next=14,this._updateCurrentUser(t,!0);case 14:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"initializeCurrentUser",value:function(){var e=Object(v.a)(s.a.mark((function e(t){var n,r,i,a,o,u,c;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.assertedPersistence.getCurrentUser();case 2:if(r=e.sent,i=r,a=!1,!t||!this.config.authDomain){e.next=14;break}return e.next=8,this.getOrInitRedirectPersistenceManager();case 8:return o=null===(n=this.redirectUser)||void 0===n?void 0:n._redirectEventId,u=null===i||void 0===i?void 0:i._redirectEventId,e.next=12,this.tryRedirectSignIn(t);case 12:c=e.sent,o&&o!==u||!(null===c||void 0===c?void 0:c.user)||(i=c.user,a=!0);case 14:if(i){e.next=16;break}return e.abrupt("return",this.directlySetCurrentUser(null));
2case 16:if(i._redirectEventId){e.next=32;break}if(!a){e.next=27;break}return e.prev=18,e.next=21,this.beforeStateQueue.runMiddleware(i);case 21:e.next=27;break;case 23:e.prev=23,e.t0=e.catch(18),i=r,this._popupRedirectResolver._overrideRedirectResult(this,(function(){return Promise.reject(e.t0)}));case 27:if(!i){e.next=31;break}return e.abrupt("return",this.reloadAndSetCurrentUserOrClear(i));case 31:return e.abrupt("return",this.directlySetCurrentUser(null));case 32:return V(this._popupRedirectResolver,this,"argument-error"),e.next=35,this.getOrInitRedirectPersistenceManager();case 35:if(!this.redirectUser||this.redirectUser._redirectEventId!==i._redirectEventId){e.next=37;break}return e.abrupt("return",this.directlySetCurrentUser(i));case 37:return e.abrupt("return",this.reloadAndSetCurrentUserOrClear(i));case 38:case"end":return e.stop()}}),e,this,[[18,23]])})));return function(t){return e.apply(this,arguments)}}()},{key:"tryRedirectSignIn",value:function(){var e=Object(v.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=null,e.prev=1,e.next=4,this._popupRedirectResolver._completeRedirectFn(this,t,!0);case 4:n=e.sent,e.next=11;break;case 7:return e.prev=7,e.t0=e.catch(1),e.next=11,this._setRedirectUser(null);case 11:return e.abrupt("return",n);case 12:case"end":return e.stop()}}),e,this,[[1,7]])})));return function(t){return e.apply(this,arguments)}}()},{key:"reloadAndSetCurrentUserOrClear",value:function(){var e=Object(v.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,_e(t);case 3:e.next=9;break;case 5:if(e.prev=5,e.t0=e.catch(0),e.t0.code==="auth/".concat("network-request-failed")){e.next=9;break}return e.abrupt("return",this.directlySetCurrentUser(null));case 9:return e.abrupt("return",this.directlySetCurrentUser(t));case 10:case"end":return e.stop()}}),e,this,[[0,5]])})));return function(t){return e.apply(this,arguments)}}()},{key:"useDeviceLanguage",value:function(){this.languageCode=function(){if("undefined"===typeof navigator)return null;var e=navigator;return e.languages&&e.languages[0]||e.language||null}()}},{key:"_delete",value:function(){var e=Object(v.a)(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this._deleted=!0;case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"updateCurrentUser",value:function(){var e=Object(v.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=t?Object(w.l)(t):null)&&V(n.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),e.abrupt("return",this._updateCurrentUser(n&&n._clone(this)));case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_updateCurrentUser",value:function(){var e=Object(v.a)(s.a.mark((function e(t){var n,r=this,i=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=i.length>1&&void 0!==i[1]&&i[1],!this._deleted){e.next=3;break}return e.abrupt("return");case 3:if(t&&V(this.tenantId===t.tenantId,this,"tenant-id-mismatch"),n){e.next=7;break}return e.next=7,this.beforeStateQueue.runMiddleware(t);case 7:return e.abrupt("return",this.queue(Object(v.a)(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.directlySetCurrentUser(t);case 2:r.notifyAuthListeners();case 3:case"end":return e.stop()}}),e)})))));case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"signOut",value:function(){var e=Object(v.a)(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.beforeStateQueue.runMiddleware(null);case 2:if(!this.redirectPersistenceManager&&!this._popupRedirectResolver){e.next=5;break}return e.next=5,this._setRedirectUser(null);case 5:return e.abrupt("return",this._updateCurrentUser(null,!0));case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"setPersistence",value:function(e){var t=this;return this.queue(Object(v.a)(s.a.mark((function n(){return s.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.assertedPersistence.setPersistence(W(e));case 2:case"end":return n.stop()}}),n)}))))}},{key:"_getPersistence",value:function(){return this.assertedPersistence.persistence.type}},{key:"_updateErrorMap",value:function(e){this._errorFactory=new w.b("auth","Firebase",e())}},{key:"onAuthStateChanged",value:function(e,t,n){return this.registerStateListener(this.authStateSubscription,e,t,n)}},{key:"beforeAuthStateChanged",value:function(e,t){return this.beforeStateQueue.pushCallback(e,t)}},{key:"onIdTokenChanged",value:function(e,t,n){return this.registerStateListener(this.idTokenSubscription,e,t,n)}},{key:"toJSON",value:function(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:null===(e=this._currentUser)||void 0===e?void 0:e.toJSON()}}},{key:"_setRedirectUser",value:function(){var e=Object(v.a)(s.a.mark((function e(t,n){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getOrInitRedirectPersistenceManager(n);case 2:return r=e.sent,e.abrupt("return",null===t?r.removeCurrentUser():r.setCurrentUser(t));case 4:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getOrInitRedirectPersistenceManager",value:function(){var e=Object(v.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.redirectPersistenceManager){e.next=9;break}return V(n=t&&W(t)||this._popupRedirectResolver,this,"argument-error"),e.next=5,Me.create(this,[W(n._redirectPersistence)],"redirectUser");case 5:return this.redirectPersistenceManager=e.sent,e.next=8,this.redirectPersistenceManager.getCurrentUser();case 8:this.redirectUser=e.sent;case 9:return e.abrupt("return",this.redirectPersistenceManager);case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_redirectUserForId",value:function(){var e=Object(v.a)(s.a.mark((function e(t){var n,r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isInitialized){e.next=3;break}return e.next=3,this.queue(Object(v.a)(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))));case 3:if((null===(n=this._currentUser)||void 0===n?void 0:n._redirectEventId)!==t){e.next=5;break}return e.abrupt("return",this._currentUser);case 5:if((null===(r=this.redirectUser)||void 0===r?void 0:r._redirectEventId)!==t){e.next=7;break}return e.abrupt("return",this.redirectUser);case 7:return e.abrupt("return",null);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_persistUserIfCurrent",value:function(){var e=Object(v.a)(s.a.mark((function e(t){var n=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==this.currentUser){e.next=2;break}return e.abrupt("return",this.queue(Object(v.a)(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.directlySetCurrentUser(t));case 1:case"end":return e.stop()}}),e)})))));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_notifyListenersIfCurrent",value:function(e){e===this.currentUser&&this.notifyAuthListeners()}},{key:"_key",value:function(){return"".concat(this.config.authDomain,":").concat(this.config.apiKey,":").concat(this.name)}},{key:"_startProactiveRefresh",value:function(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}},{key:"_stopProactiveRefresh",value:function(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}},{key:"_currentUser",get:function(){return this.currentUser}},{key:"notifyAuthListeners",value:function(){var e,t;if(this._isInitialized){this.idTokenSubscription.next(this.currentUser);var n=null!==(t=null===(e=this.currentUser)||void 0===e?void 0:e.uid)&&void 0!==t?t:null;this.lastNotifiedUid!==n&&(this.lastNotifiedUid=n,this.authStateSubscription.next(this.currentUser))}}},{key:"registerStateListener",value:function(e,t,n,r){var i=this;if(this._deleted)return function(){};var a="function"===typeof t?t:t.next.bind(t),o=this._isInitialized?Promise.resolve():this._initializationPromise;return V(o,this,"internal-error"),o.then((function(){return a(i.currentUser)})),"function"===typeof t?e.addObserver(t,n,r):e.addObserver(t)}},{key:"directlySetCurrentUser",value:function(){var e=Object(v.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.currentUser&&this.currentUser!==t&&(this._currentUser._stopProactiveRefresh(),t&&this.isProactiveRefreshEnabled&&t._startProactiveRefresh()),this.currentUser=t,!t){e.next=7;break}return e.next=5,this.assertedPersistence.setCurrentUser(t);case 5:e.next=9;break;case 7:return e.next=9,this.assertedPersistence.removeCurrentUser();case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"queue",value:function(e){return this.operations=this.operations.then(e,e),this.operations}},{key:"assertedPersistence",get:function(){return V(this.persistenceManager,this,"internal-error"),this.persistenceManager}},{key:"_logFramework",value:function(e){e&&!this.frameworks.includes(e)&&(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=Ye(this.config.clientPlatform,this._getFrameworks()))}},{key:"_getFrameworks",value:function(){return this.frameworks}},{key:"_getAdditionalHeaders",value:function(){var e=Object(v.a)(s.a.mark((function e(){var t,n,r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Object(k.a)({},"X-Client-Version",this.clientVersion),this.app.options.appId&&(n["X-Firebase-gmpid"]=this.app.options.appId),e.next=4,null===(t=this.heartbeatServiceProvider.getImmediate({optional:!0}))||void 0===t?void 0:t.getHeartbeatsHeader();case 4:return(r=e.sent)&&(n["X-Firebase-Client"]=r),e.abrupt("return",n);case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}();function Ze(e){return Object(w.l)(e)}var et=function(){function e(t){var n=this;Object(c.a)(this,e),this.auth=t,this.observer=null,this.addObserver=Object(w.h)((function(e){return n.observer=e}))}return Object(l.a)(e,[{key:"next",get:function(){return V(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}]),e}();function tt(e,t,n){var r=Ze(e);V(r._canInitEmulator,r,"emulator-config-failed"),V(/^https?:\/\//.test(t),r,"invali
2d-emulator-scheme");var i=!!(null===n||void 0===n?void 0:n.disableWarnings),a=nt(t),o=function(e){var t=nt(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:"",port:null};var r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){var a=i[1];return{host:a,port:rt(r.substr(a.length+1))}}var o=r.split(":"),u=Object(g.a)(o,2);return{host:u[0],port:rt(u[1])}}(t),u=o.host,s=o.port,c=null===s?"":":".concat(s);r.config.emulator={url:"".concat(a,"//").concat(u).concat(c,"/")},r.settings.appVerificationDisabledForTesting=!0,r.emulatorConfig=Object.freeze({host:u,port:s,protocol:a.replace(":",""),options:Object.freeze({disableWarnings:i})}),i||function(){function e(){var e=document.createElement("p"),t=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",t.position="fixed",t.width="100%",t.backgroundColor="#ffffff",t.border=".1em solid #000000",t.color="#b50000",t.bottom="0px",t.left="0px",t.margin="0px",t.zIndex="10000",t.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}"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.");"undefined"!==typeof window&&"undefined"!==typeof document&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",e):e())}()}function nt(e){var t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function rt(e){if(!e)return null;var t=Number(e);return isNaN(t)?null:t}var it=function(){function e(t,n){Object(c.a)(this,e),this.providerId=t,this.signInMethod=n}return Object(l.a)(e,[{key:"toJSON",value:function(){return B("not implemented")}},{key:"_getIdTokenResponse",value:function(e){return B("not implemented")}},{key:"_linkToIdToken",value:function(e,t){return B("not implemented")}},{key:"_getReauthenticationResolver",value:function(e){return B("not implemented")}}]),e}();function at(e,t){return ot.apply(this,arguments)}function ot(){return(ot=Object(v.a)(s.a.mark((function e(t,n){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",ee(t,"POST","/v1/accounts:resetPassword",Z(t,n)));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ut(e,t){return st.apply(this,arguments)}function st(){return(st=Object(v.a)(s.a.mark((function e(t,n){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",ee(t,"POST","/v1/accounts:update",n));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ct(e,t){return lt.apply(this,arguments)}function lt(){return(lt=Object(v.a)(s.a.mark((function e(t,n){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",ee(t,"POST","/v1/accounts:update",Z(t,n)));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ft(e,t){return ht.apply(this,arguments)}function ht(){return(ht=Object(v.a)(s.a.mark((function e(t,n){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",ie(t,"POST","/v1/accounts:signInWithPassword",Z(t,n)));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function dt(e,t){return pt.apply(this,arguments)}function pt(){return(pt=Object(v.a)(s.a.mark((function e(t,n){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",ee(t,"POST","/v1/accounts:sendOobCode",Z(t,n)));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function vt(e,t){return mt.apply(this,arguments)}function mt(){return(mt=Object(v.a)(s.a.mark((function e(t,n){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",dt(t,n));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function yt(e,t){return gt.apply(this,arguments)}function gt(){return(gt=Object(v.a)(s.a.mark((function e(t,n){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",dt(t,n));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function bt(e,t){return kt.apply(this,arguments)}function kt(){return(kt=Object(v.a)(s.a.mark((function e(t,n){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",dt(t,n));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function wt(e,t){return Ot.apply(this,arguments)}function Ot(){return(Ot=Object(v.a)(s.a.mark((function e(t,n){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",dt(t,n));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function xt(e,t){return _t.apply(this,arguments)}function _t(){return(_t=Object(v.a)(s.a.mark((function e(t,n){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",ie(t,"POST","/v1/accounts:signInWithEmailLink",Z(t,n)));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function jt(e,t){return Et.apply(this,arguments)}function Et(){return(Et=Object(v.a)(s.a.mark((function e(t,n){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",ie(t,"POST","/v1/accounts:signInWithEmailLink",Z(t,n)));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var St=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);
2function n(e,r,i){var a,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return Object(c.a)(this,n),(a=t.call(this,"password",i))._email=e,a._password=r,a._tenantId=o,a}return Object(l.a)(n,[{key:"toJSON",value:function(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}},{key:"_getIdTokenResponse",value:function(){var e=Object(v.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=this.signInMethod,e.next="password"===e.t0?3:"emailLink"===e.t0?4:5;break;case 3:return e.abrupt("return",ft(t,{returnSecureToken:!0,email:this._email,password:this._password}));case 4:return e.abrupt("return",xt(t,{email:this._email,oobCode:this._password}));case 5:D(t,"internal-error");case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_linkToIdToken",value:function(){var e=Object(v.a)(s.a.mark((function e(t,n){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=this.signInMethod,e.next="password"===e.t0?3:"emailLink"===e.t0?4:5;break;case 3:return e.abrupt("return",ut(t,{idToken:n,returnSecureToken:!0,email:this._email,password:this._password}));case 4:return e.abrupt("return",jt(t,{idToken:n,email:this._email,oobCode:this._password}));case 5:D(t,"internal-error");case 6:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_getReauthenticationResolver",value:function(e){return this._getIdTokenResponse(e)}}],[{key:"_fromEmailAndPassword",value:function(e,t){return new n(e,t,"password")}},{key:"_fromEmailAndCode",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return new n(e,t,"emailLink",r)}},{key:"fromJSON",value:function(e){var t="string"===typeof e?JSON.parse(e):e;if((null===t||void 0===t?void 0:t.email)&&(null===t||void 0===t?void 0:t.password)){if("password"===t.signInMethod)return this._fromEmailAndPassword(t.email,t.password);if("emailLink"===t.signInMethod)return this._fromEmailAndCode(t.email,t.password,t.tenantId)}return null}}]),n}(it);function Tt(e,t){return It.apply(this,arguments)}function It(){return(It=Object(v.a)(s.a.mark((function e(t,n){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",ie(t,"POST","/v1/accounts:signInWithIdp",Z(t,n)));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Ct=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(){var e;return Object(c.a)(this,n),(e=t.apply(this,arguments)).pendingToken=null,e}return Object(l.a)(n,[{key:"toJSON",value:function(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,n
2once:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}},{key:"_getIdTokenResponse",value:function(e){return Tt(e,this.buildRequest())}},{key:"_linkToIdToken",value:function(e,t){var n=this.buildRequest();return n.idToken=t,Tt(e,n)}},{key:"_getReauthenticationResolver",value:function(e){var t=this.buildRequest();return t.autoCreate=!1,Tt(e,t)}},{key:"buildRequest",value:function(){var e={requestUri:"http://localhost",returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{var t={};this.idToken&&(t.id_token=this.idToken),this.accessToken&&(t.access_token=this.accessToken),this.secret&&(t.oauth_token_secret=this.secret),t.providerId=this.providerId,this.nonce&&!this.pendingToken&&(t.nonce=this.nonce),e.postBody=Object(w.y)(t)}return e}}],[{key:"_fromParams",value:function(e){var t=new n(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(t.idToken=e.idToken),e.accessToken&&(t.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(t.nonce=e.nonce),e.pendingToken&&(t.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(t.accessToken=e.oauthToken,t.secret=e.oauthTokenSecret):D("argument-error"),t}},{key:"fromJSON",value:function(e){var t="string"===typeof e?JSON.parse(e):e,r=t.providerId,i=t.signInMethod,a=x(t,["providerId","signInMethod"]);if(!r||!i)return null;var o=new n(r,i);return o.idToken=a.idToken||void 0,o.accessToken=a.accessToken||void 0,o.secret=a.secret,o.nonce=a.nonce,o.pendingToken=a.pendingToken||null,o}}]),n}(it);function At(e,t){return Rt.apply(this,arguments)}function Rt(){return(Rt=Object(v.a)(s.a.mark((function e(t,n){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",ee(t,"POST","/v1/accounts:sendVerificationCode",Z(t,n)));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Nt(){return(Nt=Object(v.a)(s.a.mark((function e(t,n){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",ie(t,"POST","/v1/accounts:signInWithPhoneNumber",Z(t,n)));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Pt(){return(Pt=Object(v.a)(s.a.mark((function e(t,n){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ie(t,"POST","/v1/accounts:signInWithPhoneNumber",Z(t,n));case 2:if(!(r=e.sent).temporaryProof){e.next=5;break}throw se(t,"account-exists-with-different-credential",r);case 5:return e.abrupt("return",r);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Dt=Object(k.a)({},"USER_NOT_FOUND","user-not-found");function Lt(){return(Lt=Object(v.a)(s.a.mark((function e(t,n){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object.assign(Object.assign({},n),{operation:"REAUTH"}),e.abrupt("return",ie(t,"POST","/v1/accounts:signInWithPhoneNumber",Z(t,r),Dt));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Mt=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e){var r;return Object(c.a)(this,n),(r=t.call(this,"phone","phone")).params=e,r}return Object(l.a)(n,[{key:"_getIdTokenResponse",value:function(e){return function(e,t){return Nt.apply(this,arguments)}(e,this._makeVerificationRequest())}},{key:"_linkToIdToken",value:function(e,t){return function(e,t){return Pt.apply(this,arguments)}(e,Object.assign({idToken:t},this._makeVerificationRequest()))}},{key:"_getReauthenticationResolver",value:function(e){return function(e,t){return Lt.apply(this,arguments)}(e,this._makeVerificationRequest())}},{key:"_makeVerificationRequest",value:function(){var e=this.params,t=e.temporaryProof,n=e.phoneNumber,r=e.verificationId,i=e.verificationCode;return t&&n?{temporaryProof:t,phoneNumber:n}:{sessionInfo:r,code:i}}},{key:"toJSON",value:function(){var e={providerId:this.providerId};return this.params.phoneNumber&&(e.phoneNumber=this.params.phoneNumber),this.params.temporaryProof&&(e.temporaryProof=this.params.temporaryProof),this.params.verificationCode&&(e.verificationCode=this.params.verificationCode),this.params.verificationId&&(e.verificationId=this.params.verificationId),e}}],[{key:"_fromVerification",value:function(e,t){return new n({verificationId:e,verificationCode:t})}}
2,{key:"_fromTokenResponse",value:function(e,t){return new n({phoneNumber:e,temporaryProof:t})}},{key:"fromJSON",value:function(e){"string"===typeof e&&(e=JSON.parse(e));var t=e,r=t.verificationId,i=t.verificationCode,a=t.phoneNumber,o=t.temporaryProof;return i||r||a||o?new n({verificationId:r,verificationCode:i,phoneNumber:a,temporaryProof:o}):null}}]),n}(it);var Ft=function(){function e(t){var n,r,i,a,o,u;Object(c.a)(this,e);var s=Object(w.z)(Object(w.k)(t)),l=null!==(n=s.apiKey)&&void 0!==n?n:null,f=null!==(r=s.oobCode)&&void 0!==r?r:null,h=function(e){switch(e){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}(null!==(i=s.mode)&&void 0!==i?i:null);V(l&&f&&h,"argument-error"),this.apiKey=l,this.operation=h,this.code=f,this.continueUrl=null!==(a=s.continueUrl)&&void 0!==a?a:null,this.languageCode=null!==(o=s.languageCode)&&void 0!==o?o:null,this.tenantId=null!==(u=s.tenantId)&&void 0!==u?u:null}return Object(l.a)(e,null,[{key:"parseLink",value:function(t){var n=function(e){var t=Object(w.z)(Object(w.k)(e)).link,n=t?Object(w.z)(Object(w.k)(t)).deep_link_id:null,r=Object(w.z)(Object(w.k)(e)).deep_link_id;return(r?Object(w.z)(Object(w.k)(r)).link:null)||r||n||t||e}(t);try{return new e(n)}catch(r){return null}}}]),e}();var Ut=function(){function e(){Object(c.a)(this,e),this.providerId=e.PROVIDER_ID}return Object(l.a)(e,null,[{key:"credential",value:function(e,t){return St._fromEmailAndPassword(e,t)}},{key:"credentialWithLink",value:function(e,t){var n=Ft.parseLink(t);return V(n,"argument-error"),St._fromEmailAndCode(e,n.code,n.tenantId)}}]),e}();Ut.PROVIDER_ID="password",Ut.EMAIL_PASSWORD_SIGN_IN_METHOD="password",Ut.EMAIL_LINK_SIGN_IN_METHOD="emailLink";var Vt=function(){function e(t){Object(c.a)(this,e),this.providerId=t,this.defaultLanguageCode=null,this.customParameters={}}return Object(l.a)(e,[{key:"setDefaultLanguage",value:function(e){this.defaultLanguageCode=e}},{key:"setCustomParameters",value:function(e){return this.customParameters=e,this}},{key:"getCustomParameters",value:function(){return this.customParameters}}]),e}(),Bt=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(){var e;return Object(c.a)(this,n),(e=t.apply(this,arguments)).scopes=[],e}return Object(l.a)(n,[{key:"addScope",value:function(e){return this.scopes.includes(e)||this.scopes.push(e),this}},{key:"getScopes",value:function(){return Object(b.a)(this.scopes)}}]),n}(Vt),zt=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(){return Object(c.a)(this,n),t.apply(this,arguments)}return Object(l.a)(n,[{key:"credential",value:function(e){return this._credential(Object.assign(Object.assign({},e),{nonce:e.rawNonce}))}},{key:"_credential",value:function(e){return V(e.idToken||e.accessToken,"argument-error"),Ct._fromParams(Object.assign(Object.assign({}
2,e),{providerId:this.providerId,signInMethod:this.providerId}))}}],[{key:"credentialFromJSON",value:function(e){var t="string"===typeof e?JSON.parse(e):e;return V("providerId"in t&&"signInMethod"in t,"argument-error"),Ct._fromParams(t)}},{key:"credentialFromResult",value:function(e){return n.oauthCredentialFromTaggedObject(e)}},{key:"credentialFromError",value:function(e){return n.oauthCredentialFromTaggedObject(e.customData||{})}},{key:"oauthCredentialFromTaggedObject",value:function(e){var t=e._tokenResponse;if(!t)return null;var r=t.oauthIdToken,i=t.oauthAccessToken,a=t.oauthTokenSecret,o=t.pendingToken,u=t.nonce,s=t.providerId;if(!i&&!a&&!r&&!o)return null;if(!s)return null;try{return new n(s)._credential({idToken:r,accessToken:i,nonce:u,pendingToken:o})}catch(c){return null}}}]),n}(Bt),qt=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(){return Object(c.a)(this,n),t.call(this,"facebook.com")}return Object(l.a)(n,null,[{key:"credential",value:function(e){return Ct._fromParams({providerId:n.PROVIDER_ID,signInMethod:n.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}},{key:"credentialFromResult",value:function(e){return n.credentialFromTaggedObject(e)}},{key:"credentialFromError",value:function(e){return n.credentialFromTaggedObject(e.customData||{})}},{key:"credentialFromTaggedObject",value:function(e){var t=e._tokenResponse;if(!t||!("oauthAccessToken"in t))return null;if(!t.oauthAccessToken)return null;try{return n.credential(t.oauthAccessToken)}catch(r){return null}}}]),n}(Bt);qt.FACEBOOK_SIGN_IN_METHOD="facebook.com",qt.PROVIDER_ID="facebook.com";var Wt=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(){var e;return Object(c.a)(this,n),(e=t.call(this,"google.com")).addScope("profile"),e}return Object(l.a)(n,null,[{key:"credential",value:function(e,t){return Ct._fromParams({providerId:n.PROVIDER_ID,signInMethod:n.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}},{key:"credentialFromResult",value:function(e){return n.credentialFromTaggedObject(e)}},{key:"credentialFromError",value:function(e){return n.credentialFromTaggedObject(e.customData||{})}},{key:"credentialFromTaggedObject",value:function(e){var t=e._tokenResponse;if(!t)return null;var r=t.oauthIdToken,i=t.oauthAccessToken;if(!r&&!i)return null;try{return n.credential(r,i)}catch(a){return null}}}]),n}(Bt);Wt.GOOGLE_SIGN_IN_METHOD="google.com",Wt.PROVIDER_ID="google.com";var Ht=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(){return Object(c.a)(this,n),t.call(this,"github.com")}return Object(l.a)(n,null,[{key:"credential",value:function(e){return Ct._fromParams({providerId:n.PROVIDER_ID,signInMethod:n.GITHUB_SIGN_IN_METHOD,accessToken:e})}},{key:"credentialFromResult",value:function(e){return n.credentialFromTaggedObject(e)}},{key:"credentialFromError",value:function(e){return n.credentialFromTaggedObject(e.customData||{})}},{key:"credentialFromTaggedObject",value:function(e){var t=e._tokenResponse;if(!t||!("oauthAccessToken"in t))return null;if(!t.oauthAccessToken)return null;try{return n.credential(t.oauthAccessToken)}catch(r){return null}}}]),n}(Bt);Ht.GITHUB_SIGN_IN_METHOD="github.com",Ht.PROVIDER_ID="github.com";var Kt=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e,r){var i;return Object(c.a)(this,n),(i=t.call(this,e,e)).pendingToken=r,i}return Object(l.a)(n,[{key:"_getIdTokenResponse",value:function(e){return Tt(e,this.buildRequest())}},{key:"_linkToIdToken",value:function(e,t){var n=this.buildRequest();return n.idToken=t,Tt(e,n)}},{key:"_getReauthenticationResolver",value:function(e){var t=this.buildRequest();return t.autoCreate=!1,Tt(e,t)}},{key:"toJSON",value:function(){return{signInMethod:this.signInMethod,providerId:this.providerId,pendingToken:this.pendingToken}}},{key:"buildRequest",value:function(){return{requestUri:"http://localhost",returnSecureToken:!0,pendingToken:this.pendingToken}}}],[{key:"fromJSON",value:function(e){var t="string"===typeof e?JSON.parse(e):e,r=t.providerId,i=t.signInMethod,a=t.pendingToken;return r&&i&&a&&r===i?new n(r,a):null}},{key:"_create",value:function(e,t){return new n(e,t)}}]),n}(it),Gt=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e){return Object(c.a)(this,n),V(e.startsWith("saml."),"argument-error"),t.call(this,e)}return Object(l.a)(n,null,[{key:"credentialFromResult",value:function(e){return n.samlCredentialFromTaggedObject(e)}},{key:"credentialFromError",value:function(e){return n.samlCredentialFromTaggedObject(e.customData||{})}},{key:"credentialFromJSON",value:function(e){var t=Kt.fromJSON(e);return V(t,"argument-error"),t}},{key:"samlCredentialFromTaggedObject",value:function(e){var t=e._tokenResponse;if(!t)return null;var n=t.pendingToken,r=t.providerId;if(!n||!r)return null;try{return Kt._create(r,n)}catch(i){return null}}}]),n}(Vt),$t=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(){return Object(c.a)(this,n),t.call(this,"twitter.com")}return Object(l.a)(n,null,[{key:"credential",value:function(e,t){return Ct._fromParams({providerId:n.PROVIDER_ID,signInMethod:n.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}},{key:"credentialFromResult",value:function(e){return n.credentialFromTaggedObject(e)}},{key:"credentialFromError",value:function(e){return n.credentialFromTaggedObject(e.customData||{})}},{key:"credentialFromTaggedObject",value:function(e){var t=e._tokenResponse;if(!t)return null;var r=t.oauthAccessToken,i=t.oauthTokenSecret;if(!r||!i)return null;try{return n.credential(r,i)}catch(a){return null}}}]),n}(Bt);function Qt(e,t){return Yt.apply(this,arguments)}function Yt(){return(Yt=Object(v.a)(s.a.mark((function e(t,n){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",ie(t,"POST","/v1/accounts:signUp",Z(t,n)));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}$t.TWITTER_SIGN_IN_METHOD="twitter.com",$t.PROVIDER_ID="twitter.com";var Xt=function(){function e(t){Object(c.a)(this,e),this.user=t.user,this.providerId=t.providerId,this._tokenResponse=t._token
2Response,this.operationType=t.operationType}return Object(l.a)(e,null,[{key:"_fromIdTokenResponse",value:function(){var t=Object(v.a)(s.a.mark((function t(n,r,i){var a,o,u,c,l=arguments;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=l.length>3&&void 0!==l[3]&&l[3],t.next=3,Ne._fromIdTokenResponse(n,i,a);case 3:return o=t.sent,u=Jt(i),c=new e({user:o,providerId:u,_tokenResponse:i,operationType:r}),t.abrupt("return",c);case 7:case"end":return t.stop()}}),t)})));return function(e,n,r){return t.apply(this,arguments)}}()},{key:"_forOperation",value:function(){var t=Object(v.a)(s.a.mark((function t(n,r,i){var a;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n._updateTokensIfNecessary(i,!0);case 2:return a=Jt(i),t.abrupt("return",new e({user:n,providerId:a,_tokenResponse:i,operationType:r}));case 4:case"end":return t.stop()}}),t)})));return function(e,n,r){return t.apply(this,arguments)}}()}]),e}();function Jt(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}function Zt(e){return en.apply(this,arguments)}function en(){return(en=Object(v.a)(s.a.mark((function e(t){var n,r,i,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Ze(t),e.next=3,r._initializationPromise;case 3:if(!(null===(n=r.currentUser)||void 0===n?void 0:n.isAnonymous)){e.next=5;break}return e.abrupt("return",new Xt({user:r.currentUser,providerId:null,operationType:"signIn"}));case 5:return e.next=7,Qt(r,{returnSecureToken:!0});case 7:return i=e.sent,e.next=10,Xt._fromIdTokenResponse(r,"signIn",i,!0);case 10:return a=e.sent,e.next=13,r._updateCurrentUser(a.user);case 13:return e.abrupt("return",a);case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var tn=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e,r,i,a){var o,u;return Object(c.a)(this,n),(o=t.call(this,r.code,r.message)).operationType=i,o.user=a,Object.setPrototypeOf(Object(m.a)(o),n.prototype),o.customData={appName:e.name,tenantId:null!==(u=e.tenantId)&&void 0!==u?u:void 0,_serverResponse:r.customData._serverResponse,operationType:i},o}return Object(l.a)(n,null,[{key:"_fromErrorAndOperation",value:function(e,t,r,i){return new n(e,t,r,i)}}]),n}(w.c);function nn(e,t,n,r){return("reauthenticate"===t?n._getReauthenticationResolver(e):n._getIdTokenResponse(e)).catch((function(n){if(n.code==="auth/".concat("multi-factor-auth-required"))throw tn._fromErrorAndOperation(e,n,t,r);throw n}))}function rn(e){return new Set(e.map((function(e){return e.providerId})).filter((function(e){return!!e})))}function an(e,t){return on.apply(this,arguments)}function on(){return(on=Object(v.a)(s.a.mark((function e(t,n){var r,i,a,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(w.l)(t),e.next=3,cn(!0,r,n);case 3:return e.t0=fe,e.t1=r.auth,e.next=7,r.getIdToken();case 7:return e.t2=e.sent,e.t3=[n],e.t4={idToken:e.t2,deleteProvider:e.t3},e.next=12,(0,e.t0)(e.t1,e.t4);case 12:return i=e.sent,a=i.providerUserInfo,o=rn(a||[]),r.providerData=r.providerData.filter((function(e){return o.has(e.providerId)})),o.has("phone")||(r.phoneNumber=null),e.next=19,r.auth._persistUserIfCurrent(r);case 19:return e.abrupt("return",r);case 20:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function un(e,t){return sn.apply(this,arguments)}function sn(){return sn=Object(v.a)(s.a.mark((function e(t,n){var r,i,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.length>2&&void 0!==a[2]&&a[2],e.t0=be,e.t1=t,e.t2=n,e.t3=t.auth,e.next=7,t.getIdToken();case 7:return e.t4=e.sent,e.t5=e.t2._linkToIdToken.call(e.t2,e.t3,e.t4),e.t6=r,e.next=12,(0,e.t0)(e.t1,e.t5,e.t6);case 12:return i=e.sent,e.abrupt("return",Xt._forOperation(t,"link",i));case 14:case"end":return e.stop()}}),e)}))),sn.apply(this,arguments)}function cn(e,t,n){return ln.apply(this,arguments)}function ln(){return(ln=Object(v.a)(s.a.mark((function e(t,n,r){var i,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_e(n);case 2:i=rn(n.providerData),a=!1===t?"provider-already-linked":"no-such-provider",V(i.has(r)===t,n.auth,a);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fn(e,t){return hn.apply(this,arguments)}function hn(){return hn=Object(v.a)(s.a.mark((function e(t,n){var r,i,a,o,u,c,l=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=l.length>2&&void 0!==l[2]&&l[2],i=t.auth,a="reauthenticate",e.prev=3,e.next=6,be(t,nn(i,a,n,t),r);case 6:return V((o=e.sent).idToken,i,"internal-error"),V(u=ge(o.idToken),i,"internal-error"),c=u.sub,V(t.uid===c,i,"user-mismatch"),e.abrupt("return",Xt._forOperation(t,a,o));case 15:throw e.prev=15,e.t0=e.catch(3),(null===e.t0||void 0===e.t0?void 0:e.t0.code)==="auth/".concat("user-not-found")&&D(i,"user-mismatch"),e.t0;case 19:case"end":return e.stop()}}),e,null,[[3,15]])}))),hn.apply(this,arguments)}function dn(e,t){return pn.apply(this,arguments)}function pn(){return pn=Object(v.a)(s.a.mark((function e(t,n){var r,i,a,o,u=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=u.length>2&&void 0!==u[2]&&u[2],i="signIn",e.next=4,nn(t,i,n);case 4:return a=e.sent,e.next=7,Xt._fromIdTokenResponse(t,i,a);case 7:if(o=e.sent,r){e.next=11;break}return e.next=11,t._updateCurrentUser(o.user);case 11:return e.abrupt("return",o);case 12:case"end":return e.stop()}}),e)}))),pn.apply(this,arguments)}function vn(e,t){return mn.apply(this,arguments)}function mn(){return(mn=Object(v.a)(s.a.mark((function e(t,n){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",dn(Ze(t),n));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function yn(e,t){return gn.apply(this,arguments)}function gn(){return(gn=Object(v.a)(s.a.mark((function e(t,n){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(w.l)(t),e.next=3,cn(!1,r,n.providerId);case 3:return e.abrupt("return",un(r,n));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function bn(e,t){return kn.apply(this,arguments)}function kn(){return(kn=Object(v.a)(s.a.mark((function e(t,n){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",fn(Object(w.l)(t),n));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function wn(e,t){return On.apply(this,arguments)}function On(){return(On=Object(v.a)(s.a.mark((function e(t,n){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",ie(t,"POST","/v1/accounts:signInWithCustomToken",Z(t,n)));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function xn(e,t){return _n.apply(this,arguments)}function _n(){return(_n=Object(v.a)(s.a.mark((function e(t,n){var r,i,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Ze(t),e.next=3,wn(r,{token:n,returnSecureToken:!0});case 3:return i=e.sent,e.next=6,Xt._fromIdTokenResponse(r,"signIn",i);case 6:return a=e.sent,e.next=9,r._updateCurrentUser(a.user);case 9:return e.abrupt("return",a);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var jn=function(){function e(t,n){Object(c.a)(this,e),this.factorId=t,this.uid=n.mfaEnrollmentId,this.enrollmentTime=new Date(n.enrolledAt).toUTCString(),this.displayName=n.displayName}return Object(l.a)(e,null,[{key:"_fromServerResponse",value:function(e,t){return"phoneInfo"in t?En._fromServerResponse(e,t):D(e,"internal-error")}}]),e}(),En=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e){var r;return Object(c.a)(this,n),(r=t.call(this,"phone",e)).phoneNumber=e.phoneInfo,r}return Object(l.a)(n,null,[{key:"_fromServerResponse",value:function(e,t){return new n(t)}}]),n}(jn);function Sn(e,t,n){var r;V((null===(r=n.url)||void 0===r?void 0:r.length)>
20,e,"invalid-continue-uri"),V("undefined"===typeof n.dynamicLinkDomain||n.dynamicLinkDomain.length>0,e,"invalid-dynamic-link-domain"),t.continueUrl=n.url,t.dynamicLinkDomain=n.dynamicLinkDomain,t.canHandleCodeInApp=n.handleCodeInApp,n.iOS&&(V(n.iOS.bundleId.length>0,e,"missing-ios-bundle-id"),t.iOSBundleId=n.iOS.bundleId),n.android&&(V(n.android.packageName.length>0,e,"missing-android-pkg-name"),t.androidInstallApp=n.android.installApp,t.androidMinimumVersionCode=n.android.minimumVersion,t.androidPackageName=n.android.packageName)}function Tn(e,t,n){return In.apply(this,arguments)}function In(){return(In=Object(v.a)(s.a.mark((function e(t,n,r){var i,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Object(w.l)(t),a={requestType:"PASSWORD_RESET",email:n},r&&Sn(i,a,r),e.next=5,yt(i,a);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Cn(e,t,n){return An.apply(this,arguments)}function An(){return(An=Object(v.a)(s.a.mark((function e(t,n,r){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,at(Object(w.l)(t),{oobCode:n,newPassword:r});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Rn(e,t){return Nn.apply(this,arguments)}function Nn(){return(Nn=Object(v.a)(s.a.mark((function e(t,n){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ct(Object(w.l)(t),{oobCode:n});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Pn(e,t){return Dn.apply(this,arguments)}function Dn(){return(Dn=Object(v.a)(s.a.mark((function e(t,n){var r,i,a,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(w.l)(t),e.next=3,at(r,{oobCode:n});case 3:i=e.sent,V(a=i.requestType,r,"internal-error"),e.t0=a,e.next="EMAIL_SIGNIN"===e.t0?9:"VERIFY_AND_CHANGE_EMAIL"===e.t0?10:"REVERT_SECOND_FACTOR_ADDITION"===e.t0?12:13;break;case 9:return e.abrupt("break",14);case 10:return V(i.newEmail,r,"internal-error"),e.abrupt("break",14);case 12:V(i.mfaInfo,r,"internal-error");case 13:V(i.email,r,"internal-error");case 14:return o=null,i.mfaInfo&&(o=jn._fromServerResponse(Ze(r),i.mfaInfo)),e.abrupt("return",{data:{email:("VERIFY_AND_CHANGE_EMAIL"===i.requestType?i.newEmail:i.email)||null,previousEmail:("VERIFY_AND_CHANGE_EMAIL"===i.requestType?i.email:i.newEmail)||null,multiFactorInfo:o},operation:a});case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ln(e,t){return Mn.apply(this,arguments)}function Mn(){return(Mn=Object(v.a)(s.a.mark((function e(t,n){var r,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pn(Object(w.l)(t),n);case 2:return r=e.sent,i=r.data,e.abrupt("return",i.email);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Fn(e,t,n){return Un.apply(this,arguments)}function Un(){return(Un=Object(v.a)(s.a.mark((function e(t,n,r){var i,a,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Ze(t),e.next=3,Qt(i,{returnSecureToken:!0,email:n,password:r});case 3:return a=e.sent,e.next=6,Xt._fromIdTokenResponse(i,"signIn",a);case 6:return o=e.sent,e.next=9,i._updateCurrentUser(o.user);case 9:return e.abrupt("return",o);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Vn(e,t,n){return vn(Object(w.l)(e),Ut.credential(t,n))}function Bn(e,t,n){return zn.apply(this,arguments)}function zn(){return(zn=Object(v.a)(s.a.mark((function e(t,n,r){var i,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Object(w.l)(t),a={requestType:"EMAIL_SIGNIN",email:n},V(r.handleCodeInApp,i,"argument-error"),r&&Sn(i,a,r),e.next=6,bt(i,a);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qn(e,t){var n=Ft.parseLink(t);return"EMAIL_SIGNIN"===(null===n||void 0===n?void 0:n.operation)}function Wn(e,t,n){return Hn.apply(this,arguments)}function Hn(){return(Hn=Object(v.a)(s.a.mark((function e(t,n,r){var i,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Object(w.l)(t),V((a=Ut.credentialWithLink(n,r||H()))._tenantId===(i.tenantId||null),i,"tenant-id-mismatch"),e.abrupt("return",vn(i,a));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Kn(e,t){return Gn.apply(this,arguments)}function Gn(){return(Gn=Object(v.a)(s.a.mark((function e(t,n){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",ee(t,"POST","/v1/accounts:createAuthUri",Z(t,n)));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function $n(e,t){return Qn.apply(this,arguments)}function Qn(){return(Qn=Object(v.a)(s.a.mark((function e(t,n){var r,i,a,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=K()?H():"http://localhost",i={identifier:n,continueUri:r},e.next=4,Kn(Object(w.l)(t),i);case 4:return a=e.sent,o=a.signinMethods,e.abrupt("return",o||[]);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Yn(e,t){return Xn.apply(this,arguments)}function Xn(){return(Xn=Object(v.a)(s.a.mark((function e(t,n){var r,i,a,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(w.l)(t),e.next=3,t.getIdToken();case 3:return i=e.sent,a={requestType:"VERIFY_EMAIL",idToken:i},n&&Sn(r.auth,a,n),e.next=8,vt(r.auth,a);case 8:if(o=e.sent,o.email===t.email){e.next=13;break}return e.next=13,t.reload();case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}
2function Jn(e,t,n){return Zn.apply(this,arguments)}function Zn(){return(Zn=Object(v.a)(s.a.mark((function e(t,n,r){var i,a,o,u;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Object(w.l)(t),e.next=3,t.getIdToken();case 3:return a=e.sent,o={requestType:"VERIFY_AND_CHANGE_EMAIL",idToken:a,newEmail:n},r&&Sn(i.auth,o,r),e.next=8,wt(i.auth,o);case 8:if(u=e.sent,u.email===t.email){e.next=13;break}return e.next=13,t.reload();case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function er(e,t){return tr.apply(this,arguments)}function tr(){return(tr=Object(v.a)(s.a.mark((function e(t,n){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",ee(t,"POST","/v1/accounts:update",n));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function nr(e,t){return rr.apply(this,arguments)}function rr(){return(rr=Object(v.a)(s.a.mark((function e(t,n){var r,i,a,o,u,c,l;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.displayName,i=n.photoURL,void 0!==r||void 0!==i){e.next=3;break}return e.abrupt("return");case 3:return a=Object(w.l)(t),e.next=6,a.getIdToken();case 6:return o=e.sent,u={idToken:o,displayName:r,photoUrl:i,returnSecureToken:!0},e.next=10,be(a,er(a.auth,u));case 10:return c=e.sent,a.displayName=c.displayName||null,a.photoURL=c.photoUrl||null,(l=a.providerData.find((function(e){return"password"===e.providerId})))&&(l.displayName=a.displayName,l.photoURL=a.photoURL),e.next=17,a._updateTokensIfNecessary(c);case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ir(e,t){return or(Object(w.l)(e),t,null)}function ar(e,t){return or(Object(w.l)(e),null,t)}function or(e,t,n){return ur.apply(this,arguments)}function ur(){return(ur=Object(v.a)(s.a.mark((function e(t,n,r){var i,a,o,u;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.auth,e.next=3,t.getIdToken();case 3:return a=e.sent,o={idToken:a,returnSecureToken:!0},n&&(o.email=n),r&&(o.password=r),e.next=9,be(t,ut(i,o));case 9:return u=e.sent,e.next=12,t._updateTokensIfNecessary(u,!0);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var sr=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object(c.a)(this,e),this.isNewUser=t,this.providerId=n,this.profile=r},cr=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e,r,i,a){var o;return Object(c.a)(this,n),(o=t.call(this,e,r,i)).username=a,o}return n}(sr),lr=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e,r){return Object(c.a)(this,n),t.call(this,e,"facebook.com",r)}return n}(sr),fr=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e,r){return Object(c.a)(this,n),t.call(this,e,"github.com",r,"string"===typeof(null===r||void 0===r?void 0:r.login)?null===r||void 0===r?void 0:r.login:null)}return n}(cr),hr=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e,r){return Object(c.a)(this,n),t.call(this,e,"google.com",r)}return n}(sr),dr=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e,r,i){return Object(c.a)(this,n),t.call(this,e,"twitter.com",r,i)}return n}(cr);function pr(e){var t=e.user,n=e._tokenResponse;return t.isAnonymous&&!n?{providerId:null,isNewUser:!1,profile:null}:function(e){var t,n;if(!e)return null;var r=e.providerId,i=e.rawUserInfo?JSON.parse(e.rawUserInfo):{},a=e.isNewUser||"identitytoolkit#SignupNewUserResponse"===e.kind;if(!r&&(null===e||void 0===e?void 0:e.idToken)){var o=null===(n=null===(t=ge(e.idToken))||void 0===t?void 0:t.firebase)||void 0===n?void 0:n.sign_in_provider;if(o)return new sr(a,"anonymous"!==o&&"custom"!==o?o:null)}if(!r)return null;switch(r){case"facebook.com":return new lr(a,i);case"github.com":return new fr(a,i);case"google.com":return new hr(a,i);case"twitter.com":return new dr(a,i,e.screenName||null);case"custom":case"anonymous":return new sr(a,null);default:return new sr(a,r,i)}}(n)}var vr=function(){function e(t,n){Object(c.a)(this,e),this.type=t,this.credential=n}return Object(l.a)(e,[{key:"toJSON",value:function(){var e="enroll"===this.type?"idToken":"pendingCredential";return{multiFactorSession:Object(k.a)({},e,this.credential)}}}],[{key:"_fromIdtoken",value:function(t){return new e("enroll",t)}},{key:"_fromMfaPendingCredential",value:function(t){return new e("signin",t)}},{key:"fromJSON",value:function(t){var n,r;if(null===t||void 0===t?void 0:t.multiFactorSession){if(null===(n=t.multiFactorSession)||void 0===n?void 0:n.pendingCredential)return e._fromMfaPendingCredential(t.multiFactorSession.pendingCredential);if(null===(r=t.multiFactorSession)||void 0===r?void 0:r.idToken)return e._fromIdtoken(t.multiFactorSession.idToken)}return null}}]),e}(),mr=function(){function e(t,n,r){Object(c.a)(this,e),this.session=t,this.hints=n,this.signInResolver=r}return Object(l.a)(e,[{key:"resolveSignIn",value:function(){var e=Object(v.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t,e.abrupt("return",this.signInResolver(n));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}],[{key:"_fromError",value:function(t,n){var r=Ze(t),i=n.customData._serverResponse,a=(i.mfaInfo||[]).map((function(e){return jn._fromServerResponse(r,e)}));V(i.mfaPendingCredential,r,"internal-error");var o=vr._fromMfaPendingCredential(i.mfaPendingCredential);return new e(o,a,function(){var e=Object(v.a)(s.a.mark((function e(t){var a,u,c;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t._process(r,o);case 2:a=e.sent,delete i.mfaInfo,delete i.mfaPendingCredential,u=Object.assign(Object.assign({},i),{idToken:a.idToken,refreshToken:a.refreshToken}),e.t0=n.operationType,e.next="signIn"===e.t0?9:"reauthenticate"===e.t0?15:17;break;case 9:return e.next=11,Xt._fromIdTokenResponse(r,n.operationType,u);case 11:return c=e.sent,e.next=14,r._updateCurrentUser(c.user);case 14:return e.abrupt("return",c);case 15:return V(n.user,r,"internal-error"),e.abrupt("return",Xt._forOperation(n.user,n.operationType,u));case 17:D(r,"internal-error");case 18:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}}]),e}();function yr(e,t){var n,r=Object(w.l)(e),i=t;return V(t.customData.operationType,r,"argument-error"),V(null===(n=i.customData._serverResponse)||void 0===n?void 0:n.mfaPendingCredential,r,"argument-error"),mr._fromError(r,i)}function gr(e,t){return ee(e,"POST","/v2/accounts/mfaEnrollment:start",Z(e,t))}var br=function(){function e(t){var n=this;Object(c.a)(this,e),this.user=t,this.enrolledFactors=[],t._onReload((function(e){e.mfaInfo&&(n.enrolledFactors=e.mfaInfo.map((function(e){return jn._fromServerResponse(t.auth,e)})))}))}return Object(l.a)(e,[{key:"getSession",value:function(){var e=Object(v.a)(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=vr,e.next=3,this.user.getIdToken();case 3:return e.t1=e.sent,e.abrupt("return",e.t0._fromIdtoken.call(e.t0,e.t1));case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"enroll",value:function(){var e=Object(v.a)(s.a.mark((function e(t,n){var r,i,a;return s.a.wrap((function(e){for(;;
2)switch(e.prev=e.next){case 0:return r=t,e.next=3,this.getSession();case 3:return i=e.sent,e.next=6,be(this.user,r._process(this.user.auth,i,n));case 6:return a=e.sent,e.next=9,this.user._updateTokensIfNecessary(a);case 9:return e.abrupt("return",this.user.reload());case 10:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"unenroll",value:function(){var e=Object(v.a)(s.a.mark((function e(t){var n,r,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="string"===typeof t?t:t.uid,e.next=3,this.user.getIdToken();case 3:return r=e.sent,e.next=6,be(this.user,ee(a=this.user.auth,"POST","/v2/accounts/mfaEnrollment:withdraw",Z(a,{idToken:r,mfaEnrollmentId:n})));case 6:return i=e.sent,this.enrolledFactors=this.enrolledFactors.filter((function(e){return e.uid!==n})),e.next=10,this.user._updateTokensIfNecessary(i);case 10:return e.prev=10,e.next=13,this.user.reload();case 13:e.next=19;break;case 15:if(e.prev=15,e.t0=e.catch(10),e.t0.code==="auth/".concat("user-token-expired")){e.next=19;break}throw e.t0;case 19:case"end":return e.stop()}var a}),e,this,[[10,15]])})));return function(t){return e.apply(this,arguments)}}()}],[{key:"_fromUser",value:function(t){return new e(t)}}]),e}(),kr=new WeakMap;function wr(e){var t=Object(w.l)(e);return kr.has(t)||kr.set(t,br._fromUser(t)),kr.get(t)}var Or="__sak",xr=function(){function e(t,n){Object(c.a)(this,e),this.storageRetriever=t,this.type=n}return Object(l.a)(e,[{key:"_isAvailable",value:function(){try{return this.storage?(this.storage.setItem(Or,"1"),this.storage.removeItem(Or),Promise.resolve(!0)):Promise.resolve(!1)}catch(e){return Promise.resolve(!1)}}},{key:"_set",value:function(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}},{key:"_get",value:function(e){var t=this.storage.getItem(e);return Promise.resolve(t?JSON.parse(t):null)}},{key:"_remove",value:function(e){return this.storage.removeItem(e),Promise.resolve()}},{key:"storage",get:function(){return this.storageRetriever()}}]),e}();var _r=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(){var e;return Object(c.a)(this,n),(e=t.call(this,(function(){return window.localStorage}),"LOCAL")).boundEventHandler=function(t,n){return e.onStorageEvent(t,n)},e.listeners={},e.localCache={},e.pollTimer=null,e.safariLocalStorageNotSynced=function(){var e=Object(w.m)();return Ve(e)||Ke(e)}()&&function(){try{return!(!window||window===window.top)}catch(e){return!1}}(),e.fallbackToPolling=Qe(),e._shouldAllowMigration=!0,e}return Object(l.a)(n,[{key:"forAllChangedKeys",value:function(e){for(var t=0,n=Object.keys(this.listeners);t<n.length;t++){var r=n[t],i=this.storage.getItem(r),a=this.localCache[r];i!==a&&e(r,a,i)}}},{key:"onStorageEvent",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e.key){var r=e.key;if(n?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){var i=this.storage.getItem(r);if(e.newValue!==i)null!==e.newValue?this.storage.setItem(r,e.newValue):this.storage.removeItem(r);else if(this.localCache[r]===e.newValue&&!n)return}var a=function(){var e=t.storage.getItem(r);(n||t.localCache[r]!==e)&&t.notifyListeners(r,e)},o=this.storage.getItem(r);$e()&&o!==e.newValue&&e.newValue!==e.oldValue?setTimeout(a,10):a()}else this.forAllChangedKeys((function(e,n,r){t.notifyListeners(e,r)}))}},{key:"notifyListeners",value:function(e,t){this.localCache[e]=t;var n=this.listeners[e];if(n)for(var r=0,i=Array.from(n);r<i.length;r++){(0,i[r])(t?JSON.parse(t):t)}}},{key:"startPolling",value:function(){var e=this;this.stopPolling(),this.pollTimer=setInterval((function(){e.forAllChangedKeys((function(t,n,r){e.onStorageEvent(new StorageEvent("storage",{key:t,oldValue:n,newValue:r}),!0)}))}),1e3)}},{key:"stopPolling",value:function(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}},{key:"attachListener",value:function(){window.addEventListener("storage",this.boundEventHandler)}},{key:"detachListener",value:function(){window.removeEventListener("storage",this.boundEventHandler)}},{key:"_addListener",value:function(e,t){0===Object.keys(this.listeners).length&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(t)}},{key:"_removeListener",value:function(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&(this.detachListener(),this.stopPolling())}},{key:"_set",value:function(){var e=Object(v.a)(s.a.mark((function e(t,r){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(f.a)(Object(h.a)(n.prototype),"_set",this).call(this,t,r);case 2:this.localCache[t]=JSON.stringify(r);case 3:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_get",value:function(){var e=Object(v.a)(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(f.a)(Object(h.a)(n.prototype),"_get",this).call(this,t);case 2:return r=e.sent,this.localCache[t]=JSON.stringify(r),e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_remove",value:function(){var e=Object(v.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(f.a)(Object(h.a)(n.prototype),"_remove",this).call(this,t);case 2:delete this.localCache[t];case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),n}(xr);_r.type="LOCAL";var jr=_r,Er=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(){return Object(c.a)(this,n),t.call(this,(function(){return window.sessionStorage}),"SESSION")}return Object(l.a)(n,[{key:"_addListener",value:function(e,t){}},{key:"_removeListener",value:function(e,t){}}]),n}(xr);Er.type="SESSION";var Sr=Er;function Tr(e){return Promise.all(e.map(function(){var e=Object(v.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t;case 3:return n=e.sent,e.abrupt("return",{fulfilled:!0,value:n});case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",{fulfilled:!1,reason:e.t0});case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}()))}var Ir=function(){function e(t){Object(c.a)(this,e),this.eventTarget=t,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}return Object(l.a)(e,[{key:"isListeningto",value:function(e){return this.eventTarget===e}},{key:"handleEvent",value:function(){var e=Object(v.a)(s.a.mark((function e(t){var n,r,i,a,o,u,c,l;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(n=t).data,i=r.eventId,a=r.eventType,o=r.data,null===(u=this.handlersMap[a])||void 0===u?void 0:u.size){e.next=5;break}return e.abrupt("return");case 5:return n.ports[0].postMessage({status:"ack",eventId:i,eventType:a}),c=Array.from(u).map(function(){var e=Object(v.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t(n.origin,o));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.next=9,Tr(c);case 9:l=e.sent,n.ports[0].postMessage({status:"done",eventId:i,eventType:a,response:l});case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_subscribe",value:function(e,t){0===Object.keys(this.handlersMap).length&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(t)}},{key:"_unsubscribe",value:function(e,t){this.handlersMap[e]&&t&&this.handlersMap[e].delete(t),t&&0!==this.handlersMap[e].size||delete this.handlersMap[e],0===Object.keys(this.handlersMap).length&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}],[{key:"_getInstance",value:function(t){var n=this.receivers.find((function(e){return e.isListeningto(t)}));if(n)return n;var r=new e(t);return this.receivers.push(r),r}}]),e}();function Cr(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n="",r=0;r<t;r++)n+=Math.floor(10*Math.random());return e+n}Ir.receivers=[];var Ar=function(){function e(t){Object(c.a)(this,e),this.target=t,this.handlers=new Set}return Object(l.a)(e,[{key:"removeMessageHandler",value:function(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}},{key:"_send",value:function(){var e=Object(v.a)(s.a.mark((function e(t,n){var r,i,a,o,u=this,c=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=c.length>2&&void 0!==c[2]?c[2]:50,i="undefined"!==typeof MessageChannel?new MessageChannel:null){e.next=4;break}throw new Error("connection_unavailable");case 4:return e.abrupt("return",new Promise((function(e,s){var c=Cr("",20);i.port1.start();var l=setTimeout((function(){s(new Error("unsupported_event"))}),r);o={messageChannel:i,onMessage:function(t){var n=t;if(n.data.eventId===c)switch(n.data.status){case"ack":clearTimeout(l),a=setTimeout((function(){s(new Error("timeout"))}),3e3);break;case"done":clearTimeout(a),e(n.data.response);break;default:clearTimeout(l),clearTimeout(a),s(new Error("invalid_response"))}}},u.handlers.add(o),i.port1.addEventListener("message",o.onMessage),u.target.postMessage({eventType:t,eventId:c,data:n},[i.port2])})).finally((function(){o&&u.removeMessageHandler(o)})));case 5:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()}]),e}();function Rr(){return window}
2function Nr(){return"undefined"!==typeof Rr().WorkerGlobalScope&&"function"===typeof Rr().importScripts}function Pr(){return Dr.apply(this,arguments)}function Dr(){return(Dr=Object(v.a)(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===navigator||void 0===navigator?void 0:navigator.serviceWorker){e.next=2;break}return e.abrupt("return",null);case 2:return e.prev=2,e.next=5,navigator.serviceWorker.ready;case 5:return t=e.sent,e.abrupt("return",t.active);case 9:return e.prev=9,e.t0=e.catch(2),e.abrupt("return",null);case 12:case"end":return e.stop()}}),e,null,[[2,9]])})))).apply(this,arguments)}function Lr(){var e;return(null===(e=null===navigator||void 0===navigator?void 0:navigator.serviceWorker)||void 0===e?void 0:e.controller)||null}var Mr="firebaseLocalStorageDb",Fr="firebaseLocalStorage",Ur="fbase_key",Vr=function(){function e(t){Object(c.a)(this,e),this.request=t}return Object(l.a)(e,[{key:"toPromise",value:function(){var e=this;return new Promise((function(t,n){e.request.addEventListener("success",(function(){t(e.request.result)})),e.request.addEventListener("error",(function(){n(e.request.error)}))}))}}]),e}();function Br(e,t){return e.transaction([Fr],t?"readwrite":"readonly").objectStore(Fr)}function zr(){var e=indexedDB.deleteDatabase(Mr);return new Vr(e).toPromise()}function qr(){var e=indexedDB.open(Mr,1);return new Promise((function(t,n){e.addEventListener("error",(function(){n(e.error)})),e.addEventListener("upgradeneeded",(function(){var t=e.result;try{t.createObjectStore(Fr,{keyPath:Ur})}catch(r){n(r)}})),e.addEventListener("success",Object(v.a)(s.a.mark((function n(){var r;return s.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if((r=e.result).objectStoreNames.contains(Fr)){n.next=12;break}return r.close(),n.next=5,zr();case 5:return n.t0=t,n.next=8,qr();case 8:n.t1=n.sent,(0,n.t0)(n.t1),n.next=13;break;case 12:t(r);case 13:case"end":return n.stop()}}),n)}))))}))}function Wr(e,t,n){return Hr.apply(this,arguments)}function Hr(){return(Hr=Object(v.a)(s.a.mark((function e(t,n,r){var i,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=Br(t,!0).put((i={},Object(k.a)(i,Ur,n),Object(k.a)(i,"value",r),i)),e.abrupt("return",new Vr(a).toPromise());case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Kr(e,t){return Gr.apply(this,arguments)}function Gr(){return(Gr=Object(v.a)(s.a.mark((function e(t,n){var r,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Br(t,!1).get(n),e.next=3,new Vr(r).toPromise();case 3:return i=e.sent,e.abrupt("return",void 0===i?null:i.value);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function $r(e,t){var n=Br(e,!0).delete(t);return new Vr(n).toPromise()}var Qr=function(){function e(){Object(c.a)(this,e),this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then((function(){}),(function(){}))}return Object(l.a)(e,[{key:"_openDb",value:function(){var e=Object(v.a)(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.db){e.next=2;break}return e.abrupt("return",this.db);case 2:return e.next=4,qr();case 4:return this.db=e.sent,e.abrupt("return",this.db);case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_withRetries",value:function(){var e=Object(v.a)(s.a.mark((function e(t){var n,r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=0;case 1:return e.prev=2,e.next=5,this._openDb();case 5:return r=e.sent,e.next=8,t(r);case 8:return e.abrupt("return",e.sent);case 11:if(e.prev=11,e.t0=e.catch(2),!(n++>3)){e.next=15;break}throw e.t0;case 15:this.db&&(this.db.close(),this.db=void 0);case 16:e.next=1;break;case 18:case"end":return e.stop()}}),e,this,[[2,11]])})));return function(t){return e.apply(this,arguments)}}()},{key:"initializeServiceWorkerMessaging",value:function(){var e=Object(v.a)(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Nr()?this.initializeReceiver():this.initializeSender());case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"initializeReceiver",value:function(){var e=Object(v.a)(s.a.mark((function e(){var t=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.receiver=Ir._getInstance(Nr()?self:null),this.receiver._subscribe("keyChanged",function(){var e=Object(v.a)(s.a.mark((function e(n,r){var i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t._poll();case 2:return i=e.sent,e.abrupt("return",{keyProcessed:i.includes(r.key)});case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()),this.receiver._subscribe("ping",function(){var e=Object(v.a)(s.a.mark((function e(t,n){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",["keyChanged"]);case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}());case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"initializeSender",value:function(){var e=Object(v.a)(s.a.mark((function e(){var t,n,r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pr();case 2:if(this.activeServiceWorker=e.sent,this.activeServiceWorker){e.next=5;break}return e.abrupt("return");case 5:return this.sender=new Ar(this.activeServiceWorker),e.next=8,this.sender._send("ping",{},800);case 8:if(r=e.sent){e.next=11;break}return e.abrupt("return");case 11:(null===(t=r[0])||void 0===t?void 0:t.fulfilled)&&(null===(n=r[0])||void 0===n?void 0:n.value.includes("keyChanged"))&&(this.serviceWorkerReceiverAvailable=!0);case 12:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"notifyServiceWorker",value:function(){var e=Object(v.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.sender&&this.activeServiceWorker&&Lr()===this.activeServiceWorker){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,this.sender._send("keyChanged",{key:t},this.serviceWorkerReceiverAvailable?800:50);case 5:e.next=9;break;case 7:e.prev=7,e.t0=e.catch(2);case 9:case"end":return e.stop()}}),e,this,[[2,7]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_isAvailable",value:function(){var e=Object(v.a)(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,indexedDB){e.next=3;break}return e.abrupt("return",!1);case 3:return e.next=5,qr();case 5:return t=e.sent,e.next=8,Wr(t,Or,"1");case 8:return e.next=10,$r(t,Or);case 10:return e.abrupt("return",!0);case 13:e.prev=13,e.t0=e.catch(0);case 15:return e.abrupt("return",!1);case 16:case"end":return e.stop()}}),e,null,[[0,13]])})));return function(){return e.apply(this,arguments)}}()},{key:"_withPendingWrite",value:function(){var e=Object(v.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.pendingWrites++,e.prev=1,e.next=4,t();case 4:return e.prev=4,this.pendingWrites--,e.finish(4);case 7:case"end":return e.stop()}}),e,this,[[1,,4,7]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_set",value:function(){var e=Object(v.a)(s.a.mark((function e(t,n){var r=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._withPendingWrite(Object(v.a)(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r._withRetries((function(e){return Wr(e,t,n)}));case 2:return r.localCache[t]=n,e.abrupt("return",r.notifyServiceWorker(t));case 4:case"end":return e.stop()}}),e)})))));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_get",value:function(){var e=Object(v.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._withRetries((function(e){return Kr(e,t)}));case 2:return n=e.sent,this.localCache[t]=n,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_remove",value:function(){var e=Object(v.a)(s.a.mark((function e(t){var n=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._withPendingWrite(Object(v.a)(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n._withRetries((function(e){return $r(e,t)}));case 2:return delete n.localCache[t],e.abrupt("return",n.notifyServiceWorker(t));case 4:case"end":return e.stop()}}),e)})))));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_poll",value:function(){var e=Object(v.a)(s.a.mark((function e(){var t,n,r,i,a,o,u,c,l,f,h;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._withRetries((function(e){var t=Br(e,!1).getAll();
2return new Vr(t).toPromise()}));case 2:if(t=e.sent){e.next=5;break}return e.abrupt("return",[]);case 5:if(0===this.pendingWrites){e.next=7;break}return e.abrupt("return",[]);case 7:n=[],r=new Set,i=Object(y.a)(t);try{for(i.s();!(a=i.n()).done;)o=a.value,u=o.fbase_key,c=o.value,r.add(u),JSON.stringify(this.localCache[u])!==JSON.stringify(c)&&(this.notifyListeners(u,c),n.push(u))}catch(s){i.e(s)}finally{i.f()}for(l=0,f=Object.keys(this.localCache);l<f.length;l++)h=f[l],this.localCache[h]&&!r.has(h)&&(this.notifyListeners(h,null),n.push(h));return e.abrupt("return",n);case 13:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"notifyListeners",value:function(e,t){this.localCache[e]=t;var n=this.listeners[e];if(n)for(var r=0,i=Array.from(n);r<i.length;r++){(0,i[r])(t)}}},{key:"startPolling",value:function(){var e=this;this.stopPolling(),this.pollTimer=setInterval(Object(v.a)(s.a.mark((function t(){return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e._poll());case 1:case"end":return t.stop()}}),t)}))),800)}},{key:"stopPolling",value:function(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}},{key:"_addListener",value:function(e,t){0===Object.keys(this.listeners).length&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}},{key:"_removeListener",value:function(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&this.stopPolling()}}]),e}();Qr.type="LOCAL";var Yr=Qr;function Xr(e,t){return ee(e,"POST","/v2/accounts/mfaSignIn:start",Z(e,t))}function Jr(e){return Zr.apply(this,arguments)}function Zr(){return(Zr=Object(v.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ee(t,"GET","/v1/recaptchaParams");case 2:if(e.t0=e.sent.recaptchaSiteKey,e.t0){e.next=5;break}e.t0="";case 5:return e.abrupt("return",e.t0);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ei(e){return new Promise((function(t,n){var r=document.createElement("script");r.setAttribute("src",e),r.onload=t,r.onerror=function(e){var t=L("internal-error");t.customData=e,n(t)},r.type="text/javascript",r.charset="UTF-8",function(){var e,t;return null!==(t=null===(e=document.getElementsByTagName("head"))||void 0===e?void 0:e[0])&&void 0!==t?t:document}().appendChild(r)}))}function ti(e){return"__".concat(e).concat(Math.floor(1e6*Math.random()))}var ni=1e12,ri=function(){function e(t){Object(c.a)(this,e),this.auth=t,this.counter=ni,this._widgets=new Map}return Object(l.a)(e,[{key:"render",value:function(e,t){var n=this.counter;return this._widgets.set(n,new ii(e,this.auth.name,t||{})),this.counter++,n}},{key:"reset",value:function(e){var t,n=e||ni;null===(t=this._widgets.get(n))||void 0===t||t.delete(),this._widgets.delete(n)}},{key:"getResponse",value:function(e){var t,n=e||ni;return(null===(t=this._widgets.get(n))||void 0===t?void 0:t.getResponse())||""}},{key:"execute",value:function(){var e=Object(v.a)(s.a.mark((function e(t){var n,r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t||ni,null===(n=this._widgets.get(r))||void 0===n||n.execute(),e.abrupt("return","");case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}(),ii=function(){function e(t,n,r){var i=this;Object(c.a)(this,e),this.params=r,this.timerId=null,this.deleted=!1,this.responseToken=null,this.clickHandler=function(){i.execute()};var a="string"===typeof t?document.getElementById(t):t;V(a,"argument-error",{appName:n}),this.container=a,this.isVisible="invisible"!==this.params.size,this.isVisible?this.execute():this.container.addEventListener("click",this.clickHandler)}return Object(l.a)(e,[{key:"getResponse",value:function(){return this.checkIfDeleted(),this.responseToken}},{key:"delete",value:function(){this.checkIfDeleted(),this.deleted=!0,this.timerId&&(clearTimeout(this.timerId),this.timerId=null),this.container.removeEventListener("click",this.clickHandler)}},{key:"execute",value:function(){var e=this;this.checkIfDeleted(),this.timerId||(this.timerId=window.setTimeout((function(){e.responseToken=function(e){for(var t=[],n="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",r=0;r<e;r++)t.push(n.charAt(Math.floor(Math.random()*n.length)));return t.join("")}(50);var t=e.params,n=t.callback,r=t["expired-callback"];if(n)try{n(e.responseToken)}catch(i){}e.timerId=window.setTimeout((function(){if(e.timerId=null,e.responseToken=null,r)try{r()}catch(i){}e.isVisible&&e.execute()}),6e4)}),500))}},{key:"checkIfDeleted",value:function(){if(this.deleted)throw new Error("reCAPTCHA mock was already deleted!")}}]),e}();var ai=ti("rcb"),oi=new $(3e4,6e4),ui="https://www.google.com/recaptcha/api.js?",si=function(){function e(){Object(c.a)(this,e),this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!Rr().grecaptcha}return Object(l.a)(e,[{key:"load",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return V(ci(n),e,"argument-error"),this.shouldResolveImmediately(n)?Promise.resolve(Rr().grecaptcha):new Promise((function(r,i){var a=Rr().setTimeout((function(){i(L(e,"network-request-failed"))}),oi.get());Rr()[ai]=function(){Rr().clearTimeout(a),delete Rr()[ai];var o=Rr().grecaptcha;if(o){var u=o.render;o.render=function(e,n){var r=u(e,n);return t.counter++,r},t.hostLanguage=n,r(o)}else i(L(e,"internal-error"))},ei("".concat(ui,"?").concat(Object(w.y)({onload:ai,render:"explicit",hl:n}
2))).catch((function(){clearTimeout(a),i(L(e,"internal-error"))}))}))}},{key:"clearedOneInstance",value:function(){this.counter--}},{key:"shouldResolveImmediately",value:function(e){return!!Rr().grecaptcha&&(e===this.hostLanguage||this.counter>0||this.librarySeparatelyLoaded)}}]),e}();function ci(e){return e.length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(e)}var li=function(){function e(){Object(c.a)(this,e)}return Object(l.a)(e,[{key:"load",value:function(){var e=Object(v.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new ri(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"clearedOneInstance",value:function(){}}]),e}(),fi="recaptcha",hi={theme:"light",type:"image"},di=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object.assign({},hi),r=arguments.length>2?arguments[2]:void 0;Object(c.a)(this,e),this.parameters=n,this.type=fi,this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=Ze(r),this.isInvisible="invisible"===this.parameters.size,V("undefined"!==typeof document,this.auth,"operation-not-supported-in-this-environment");var i="string"===typeof t?document.getElementById(t):t;V(i,this.auth,"argument-error"),this.container=i,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new li:new si,this.validateStartingState()}return Object(l.a)(e,[{key:"verify",value:function(){var e=Object(v.a)(s.a.mark((function e(){var t,n,r,i=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.assertNotDestroyed(),e.next=3,this.render();case 3:if(t=e.sent,n=this.getAssertedRecaptcha(),!(r=n.getResponse(t))){e.next=8;break}return e.abrupt("return",r);case 8:return e.abrupt("return",new Promise((function(e){i.tokenChangeListeners.add((function t(n){n&&(i.tokenChangeListeners.delete(t),e(n))})),i.isInvisible&&n.execute(t)})));case 9:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"render",value:function(){var e=this;try{this.assertNotDestroyed()}catch(t){return Promise.reject(t)}return this.renderPromise||(this.renderPromise=this.makeRenderPromise().catch((function(t){throw e.renderPromise=null,t}))),this.renderPromise}},{key:"_reset",value:function(){this.assertNotDestroyed(),null!==this.widgetId&&this.getAssertedRecaptcha().reset(this.widgetId)}},{key:"clear",value:function(){var e=this;this.assertNotDestroyed(),this.destroyed=!0,this._recaptchaLoader.clearedOneInstance(),this.isInvisible||this.container.childNodes.forEach((function(t){e.container.removeChild(t)}))}},{key:"validateStartingState",value:function(){V(!this.parameters.sitekey,this.auth,"argument-error"),V(this.isInvisible||!this.container.hasChildNodes(),this.auth,"argument-error"),V("undefined"!==typeof document,this.auth,"operation-not-supported-in-this-environment")}},{key:"makeTokenCallback",value:function(e){var t=this;return function(n){if(t.tokenChangeListeners.forEach((function(e){return e(n)})),"function"===typeof e)e(n);else if("string"===typeof e){var r=Rr()[e];"function"===typeof r&&r(n)}}}},{key:"assertNotDestroyed",value:function(){V(!this.destroyed,this.auth,"internal-error")}},{key:"makeRenderPromise",value:function(){var e=Object(v.a)(s.a.mark((function e(){var t,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.init();case 2:return this.widgetId||(t=this.container,this.isInvisible||(n=document.createElement("div"),t.appendChild(n),t=n),this.widgetId=this.getAssertedRecaptcha().render(t,this.parameters)),e.abrupt("return",this.widgetId);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"init",value:function(){var e=Object(v.a)(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return V(K()&&!Nr(),this.auth,"internal-error"),e.next=3,pi();case 3:return e.next=5,this._recaptchaLoader.load(this.auth,this.auth.languageCode||void 0);case 5:return this.recaptcha=e.sent,e.next=8,Jr(this.auth);case 8:V(t=e.sent,this.auth,"internal-error"),this.parameters.sitekey=t;
2case 11:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getAssertedRecaptcha",value:function(){return V(this.recaptcha,this.auth,"internal-error"),this.recaptcha}}]),e}();function pi(){var e=null;return new Promise((function(t){"complete"!==document.readyState?(e=function(){return t()},window.addEventListener("load",e)):t()})).catch((function(t){throw e&&window.removeEventListener("load",e),t}))}var vi=function(){function e(t,n){Object(c.a)(this,e),this.verificationId=t,this.onConfirmation=n}return Object(l.a)(e,[{key:"confirm",value:function(e){var t=Mt._fromVerification(this.verificationId,e);return this.onConfirmation(t)}}]),e}();function mi(e,t,n){return yi.apply(this,arguments)}function yi(){return(yi=Object(v.a)(s.a.mark((function e(t,n,r){var i,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Ze(t),e.next=3,Oi(i,n,Object(w.l)(r));case 3:return a=e.sent,e.abrupt("return",new vi(a,(function(e){return vn(i,e)})));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function gi(e,t,n){return bi.apply(this,arguments)}function bi(){return(bi=Object(v.a)(s.a.mark((function e(t,n,r){var i,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Object(w.l)(t),e.next=3,cn(!1,i,"ph
2one");case 3:return e.next=5,Oi(i.auth,n,Object(w.l)(r));case 5:return a=e.sent,e.abrupt("return",new vi(a,(function(e){return yn(i,e)})));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ki(e,t,n){return wi.apply(this,arguments)}function wi(){return(wi=Object(v.a)(s.a.mark((function e(t,n,r){var i,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Object(w.l)(t),e.next=3,Oi(i.auth,n,Object(w.l)(r));case 3:return a=e.sent,e.abrupt("return",new vi(a,(function(e){return bn(i,e)})));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Oi(e,t,n){return xi.apply(this,arguments)}function xi(){return(xi=Object(v.a)(s.a.mark((function e(t,n,r){var i,a,o,u,c,l,f,h,d;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.verify();case 2:if(a=e.sent,e.prev=3,V("string"===typeof a,t,"argument-error"),V(r.type===fi,t,"argument-error"),!("session"in(o="string"===typeof n?{phoneNumber:n}:n))){e.next=26;break}if(u=o.session,!("phoneNumber"in o)){e.next=17;break}return V("enroll"===u.type,t,"internal-error"),e.next=13,gr(t,{idToken:u.credential,phoneEnrollmentInfo:{phoneNumber:o.phoneNumber,recaptchaToken:a}});case 13:return c=e.sent,e.abrupt("return",c.phoneSessionInfo.sessionInfo);case 17:return V("signin"===u.type,t,"internal-error"),V(l=(null===(i=o.multiFactorHint)||void 0===i?void 0:i.uid)||o.multiFactorUid,t,"missing-multi-factor-info"),e.next=22,Xr(t,{mfaPendingCredential:u.credential,mfaEnrollmentId:l,phoneSignInInfo:{recaptchaToken:a}});case 22:return f=e.sent,e.abrupt("return",f.phoneResponseInfo.sessionInfo);case 24:e.next=31;break;case 26:return e.next=28,At(t,{phoneNumber:o.phoneNumber,recaptchaToken:a});case 28:return h=e.sent,d=h.sessionInfo,e.abrupt("return",d);case 31:return e.prev=31,r._reset(),e.finish(31);case 34:case"end":return e.stop()}}),e,null,[[3,,31,34]])})))).apply(this,arguments)}function _i(e,t){return ji.apply(this,arguments)}function ji(){return(ji=Object(v.a)(s.a.mark((function e(t,n){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,un(Object(w.l)(t),n);case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Ei=function(){function e(t){Object(c.a)(this,e),this.providerId=e.PROVIDER_ID,this.auth=Ze(t)}return Object(l.a)(e,[{key:"verifyPhoneNumber",value:function(e,t){return Oi(this.auth,e,Object(w.l)(t))}}],[{key:"credential",value:function(e,t){return Mt._fromVerification(e,t)}},{key:"credentialFromResult",value:function(t){var n=t;return e.credentialFromTaggedObject(n)}},{key:"credentialFromError",value:function(t){return e.credentialFromTaggedObject(t.customData||{})}},{key:"credentialFromTaggedObject",value:function(e){var t=e._tokenResponse;if(!t)return null;var n=t.phoneNumber,r=t.temporaryProof;return n&&r?Mt._fromTokenResponse(n,r):null}}]),e}();function Si(e,t){return t?W(t):(V(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}Ei.PROVIDER_ID="phone",Ei.PHONE_SIGN_IN_METHOD="phone";var Ti=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e){var r;return Object(c.a)(this,n),(r=t.call(this,"custom","custom")).params=e,r}return Object(l.a)(n,[{key:"_getIdTokenResponse",value:function(e){return Tt(e,this._buildIdpRequest())}},{key:"_linkToIdToken",value:function(e,t){return Tt(e,this._buildIdpRequest(t))}},{key:"_getReauthenticationResolver",value:function(e){return Tt(e,this._buildIdpRequest())}},{key:"_buildIdpRequest",value:function(e){var t={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(t.idToken=e),t}}]),n}(it);function Ii(e){return dn(e.auth,new Ti(e),e.bypassAuthState)}function Ci(e){var t=e.auth,n=e.user;return V(n,t,"internal-error"),fn(n,new Ti(e),e.bypassAuthState)}function Ai(e){return Ri.apply(this,arguments)}function Ri(){return(Ri=Object(v.a)(s.a.mark((function e(t){var n,r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.auth,V(r=t.user,n,"internal-error"),e.abrupt("return",un(r,new Ti(t),t.bypassAuthState));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Ni=function(){function e(t,n,r,i){var a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];Object(c.a)(this,e),this.auth=t,this.resolver=r,this.user=i,this.bypassAuthState=a,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(n)?n:[n]}return Object(l.a)(e,[{key:"execute",value:function(){var e=this;return new Promise(function(){var t=Object(v.a)(s.a.mark((function t(n,r){return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.pendingPromise={resolve:n,reject:r},t.prev=1,t.next=4,e.resolver._initialize(e.auth);case 4:return e.eventManager=t.sent,t.next=7,e.onExecution();case 7:e.eventManager.registerConsumer(e),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(1),e.reject(t.t0);case 13:case"end":return t.stop()}}),t,null,[[1,10]])})));return function(e,n){return t.apply(this,arguments)}}())}},{key:"onAuthEvent",value:function(){var e=Object(v.a)(s.a.mark((function e(t){var n,r,i,a,o,u,c;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.urlResponse,r=t.sessionId,i=t.postBody,a=t.tenantId,o=t.error,u=t.type,!o){e.next=4;break}return this.reject(o),e.abrupt("return");case 4:return c={auth:this.auth,requestUri:n,sessionId:r,tenantId:a||void 0,postBody:i||void 0,user:this.user,bypassAuthState:this.bypassAuthState},e.prev=5,e.t0=this,e.next=9,this.getIdpTask(u)(c);case 9:e.t1=e.sent,e.t0.resolve.call(e.t0,e.t1),e.next=16;break;case 13:e.prev=13,e.t2=e.catch(5),this.reject(e.t2);case 16:case"end":return e.stop()}}),e,this,[[5,13]])})));return function(t){return e.apply(this,arguments)}}()},{key:"onError",value:function(e){this.reject(e)}},{key:"getIdpTask",value:function(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return Ii;case"linkViaPopup":case"linkViaRedirect":return Ai;case"reauthViaPopup":case"reauthViaRedirect":return Ci;default:D(this.auth,"internal-error")}}},{key:"resolve",value:function(e){z(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}},{key:"reject",value:function(e){z(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}},{key:"unregisterAndCleanUp",value:function(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}]),e}(),Pi=new $(2e3,1e4);function Di(e,t,n){return Li.apply(this,arguments)}function Li(){return(Li=Object(v.a)(s.a.mark((function e(t,n,r){var i,a,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Ze(t),F(t,n,Vt),a=Si(i,r),o=new Bi(i,"signInViaPopup",n,a),e.abrupt("return",o.executeNotNull());case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Mi(e,t,n){return Fi.apply(this,arguments)}function Fi(){return(Fi=Object(v.a)(s.a.mark((function e(t,n,r){var i,a,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return F((i=Object(w.l)(t)).auth,n,Vt),a=Si(i.auth,r),o=new Bi(i.auth,"reauthViaPopup",n,a,i),e.abrupt("return",o.executeNotNull());case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ui(e,t,n){return Vi.apply(this,arguments)}function Vi(){return(Vi=Object(v.a)(s.a.mark((function e(t,n,r){var i,a,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return F((i=Object(w.l)(t)).auth,n,Vt),a=Si(i.auth,r),o=new Bi(i.auth,"linkViaPopup",n,a,i),e.abrupt("return",o.executeNotNull());case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Bi=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e,r,i,a,o){var u;return Object(c.a)(this,n),(u=t.call(this,e,r,a,o)).provider=i,u.authWindow=null,u.pollId=null,n.currentPopupAction&&n.currentPopupAction.cancel(),n.currentPopupAction=Object(m.a)(u),u}return Object(l.a)(n,[{key:"executeNotNull",value:function(){var e=Object(v.a)(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.execute();case 2:return V(t=e.sent,this.auth,"internal-error"),e.abrupt("return",t);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"onExecution",value:function(){var e=Object(v.a)(s.a.mark((function e(){var t,n=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return z(1===this.filter.length,"Popup operations only handle one event"),t=Cr(),e.next=4,this.resolver._openPopup(this.auth,this.provider,this.filter[0],t);case 4:this.authWindow=e.sent,this.authWindow.associatedEvent=t,this.resolver._originValidation(this.auth).catch((function(e){n.reject(e)})),this.resolver._isIframeWebStorageSupported(this.auth,(function(e){e||n.reject(L(n.auth,"web-storage-unsupported"))})),this.pollUserCancellation();case 9:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"eventId",get:function(){var e;return(null===(e=this.authWindow)||void 0===e?void 0:e.associatedEvent)||null}},{key:"cancel",value:function(){this.reject(L(this.auth,"cancelled-popup-request"))}},{key:"cleanUp",value:function(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,n.currentPopupAction=null}},{key:"pollUserCancellation",value:function(){var e=this;!function t(){var n,r;(null===(r=null===(n=e.authWindow)||void 0===n?void 0:n.window)||void 0===r?void 0:r.closed)?e.pollId=window.setTimeout((function(){e.pollId=null,e.reject(L(e.auth,"popup-closed-by-user"))}),2e3):e.pollId=window.setTimeout(t,Pi.get())}()}}]),n}(Ni);Bi.currentPopupAction=null;var zi=new Map,qi=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e,r){var i,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(c.a)(this,n),(i=t.call(this,e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],r,void 0,a)).eventId=null,i}return Object(l.a)(n,[{key:"execute",value:function(){var e=Object(v.a)(s.a.mark((function e(){var t,r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=zi.get(this.auth._key())){e.next=21;break}return e.prev=2,e.next=5,Wi(this.resolver,this.auth);case 5:if(!e.sent){e.next=12;break}return e.next=9,Object(f.a)(Object(h.a)(n.prototype),"execute",this).call(this);case 9:e.t0=e.sent,e.next=13;break;case 12:e.t0=null;case 13:r=e.t0,t=function(){return Promise.resolve(r)},e.next=20;break;case 17:e.prev=17,e.t1=e.catch(2),t=function(){return Promise.reject(e.t1)};case 20:zi.set(this.auth._key(),t);case 21:return this.bypassAuthState||zi.set(this.auth._key(),(function(){return Promise.resolve(null)})),e.abrupt("return",t());case 23:case"end":return e.stop()}}),e,this,[[2,17]])})));return function(){return e.apply(this,arguments)}}()},{key:"onAuthEvent",value:function(){var e=Object(v.a)(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("signInViaRedirect"!==t.type){e.next=4;break}return e.abrupt("return",Object(f.a)(Object(h.a)(n.prototype),"onAuthEvent",this).call(this,t));case 4:if("unknown"!==t.type){e.next=7;break}return this.resolve(null),e.abrupt("return");
2case 7:if(!t.eventId){e.next=17;break}return e.next=10,this.auth._redirectUserForId(t.eventId);case 10:if(!(r=e.sent)){e.next=16;break}return this.user=r,e.abrupt("return",Object(f.a)(Object(h.a)(n.prototype),"onAuthEvent",this).call(this,t));case 16:this.resolve(null);case 17:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"onExecution",value:function(){var e=Object(v.a)(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"cleanUp",value:function(){}}]),n}(Ni);function Wi(e,t){return Hi.apply(this,arguments)}function Hi(){return(Hi=Object(v.a)(s.a.mark((function e(t,n){var r,i,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Yi(n),i=Qi(t),e.next=4,i._isAvailable();case 4:if(e.sent){e.next=6;break}return e.abrupt("return",!1);case 6:return e.next=8,i._get(r);case 8:return e.t0=e.sent,a="true"===e.t0,e.next=12,i._remove(r);case 12:return e.abrupt("return",a);case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ki(e,t){return Gi.apply(this,arguments)}function Gi(){return(Gi=Object(v.a)(s.a.mark((function e(t,n){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Qi(t)._set(Yi(n),"true"));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function $i(e,t){zi.set(e._key(),t)}function Qi(e){return W(e._redirectPersistence)}function Yi(e){return Le("pendingRedirect",e.config.apiKey,e.name)}function Xi(e,t,n){return function(e,t,n){return Ji.apply(this,arguments)}(e,t,n)}function Ji(){return(Ji=Object(v.a)(s.a.mark((function e(t,n,r){var i,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Ze(t),F(t,n,Vt),a=Si(i,r),e.next=5,Ki(a,i);case 5:return e.abrupt("return",a._openRedirect(i,n,"signInViaRedirect"));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Zi(e,t,n){return function(e,t,n){return ea.apply(this,arguments)}(e,t,n)}function ea(){return(ea=Object(v.a)(s.a.mark((function e(t,n,r){var i,a,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return F((i=Object(w.l)(t)).auth,n,Vt),a=Si(i.auth,r),e.next=5,Ki(a,i.auth);case 5:return e.next=7,ua(i);case 7:return o=e.sent,e.abrupt("return",a._openRedirect(i.auth,n,"reauthViaRedirect",o));case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ta(e,t,n){return function(e,t,n){return na.apply(this,arguments)}(e,t,n)}function na(){return(na=Object(v.a)(s.a.mark((function e(t,n,r){var i,a,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return F((i=Object(w.l)(t)).auth,n,Vt),a=Si(i.auth,r),e.next=5,cn(!1,i,n.providerId);case 5:return e.next=7,Ki(a,i.auth);case 7:return e.next=9,ua(i);case 9:return o=e.sent,e.abrupt("return",a._openRedirect(i.auth,n,"linkViaRedirect",o));case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ra(e,t){return ia.apply(this,arguments)}function ia(){return(ia=Object(v.a)(s.a.mark((function e(t,n){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ze(t)._initializationPromise;case 2:return e.abrupt("return",aa(t,n,!1));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function aa(e,t){return oa.apply(this,arguments)}function oa(){return oa=Object(v.a)(s.a.mark((function e(t,n){var r,i,a,o,u,c=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=c.length>2&&void 0!==c[2]&&c[2],i=Ze(t),a=Si(i,n),o=new qi(i,a,r),e.next=6,o.execute();case 6:if(!(u=e.sent)||r){e.next=13;break}return delete u.user._redirectEventId,e.next=11,i._persistUserIfCurrent(u.user);case 11:return e.next=13,i._setRedirectUser(null,n);case 13:return e.abrupt("return",u);case 14:case"end":return e.stop()}}),e)}))),oa.apply(this,arguments)}function ua(e){return sa.apply(this,arguments)}function sa(){return(sa=Object(v.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Cr("".concat(t.uid,":::")),t._redirectEventId=n,e.next=4,t.auth._setRedirectUser(t);case 4:return e.next=6,t.auth._persistUserIfCurrent(t);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ca=function(){function e(t){Object(c.a)(this,e),this.auth=t,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=
2Date.now()}return Object(l.a)(e,[{key:"registerConsumer",value:function(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}},{key:"unregisterConsumer",value:function(e){this.consumers.delete(e)}},{key:"onEvent",value:function(e){var t=this;if(this.hasEventBeenHandled(e))return!1;var n=!1;return this.consumers.forEach((function(r){t.isEventForConsumer(e,r)&&(n=!0,t.sendToConsumer(e,r),t.saveEventToCache(e))})),this.hasHandledPotentialRedirect||!function(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return fa(e);default:return!1}}(e)||(this.hasHandledPotentialRedirect=!0,n||(this.queuedRedirectEvent=e,n=!0)),n}},{key:"sendToConsumer",value:function(e,t){var n;if(e.error&&!fa(e)){var r=(null===(n=e.error.code)||void 0===n?void 0:n.split("auth/")[1])||"internal-error";t.onError(L(this.auth,r))}else t.onAuthEvent(e)}},{key:"isEventForConsumer",value:function(e,t){var n=null===t.eventId||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&n}},{key:"hasEventBeenHandled",value:function(e){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(la(e))}},{key:"saveEventToCache",value:function(e){this.cachedEventUids.add(la(e)),this.lastProcessedEventTime=Date.now()}}]),e}();function la(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter((function(e){return e})).join("-")}function fa(e){var t=e.type,n=e.error;return"unknown"===t&&(null===n||void 0===n?void 0:n.code)==="auth/".concat("no-auth-event")}function ha(e){return da.apply(this,arguments)}function da(){return da=Object(v.a)(s.a.mark((function e(t){var n,r=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:{},e.abrupt("return",ee(t,"GET","/v1/projects",n));case 2:case"end":return e.stop()}}),e)}))),da.apply(this,arguments)}var pa=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,va=/^https?/;function ma(){return(ma=Object(v.a)(s.a.mark((function e(t){var n,r,i,a,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.config.emulator){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,ha(t);case 4:n=e.sent,r=n.authorizedDomains,i=Object(y.a)(r),e.prev=7,i.s();case 9:if((a=i.n()).done){e.next=20;break}if(o=a.value,e.prev=11,!ya(o)){e.next=14;break}return e.abrupt("return");case 14:e.next=18;break;case 16:e.prev=16,e.t0=e.catch(11);case 18:e.next=9;break;case 20:e.next=25;break;case 22:e.prev=22,e.t1=e.catch(7),i.e(e.t1);case 25:return e.prev=25,i.f(),e.finish(25);case 28:D(t,"unauthorized-domain");case 29:case"end":return e.stop()}}),e,null,[[7,22,25,28],[11,16]])})))).apply(this,arguments)}function ya(e){var t=H(),n=new URL(t),r=n.protocol,i=n.hostname;if(e.startsWith("chrome-extension://")){var a=new URL(e);return""===a.hostname&&""===i?"chrome-extension:"===r&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):"chrome-extension:"===r&&a.hostname===i}if(!va.test(r))return!1;if(pa.test(e))return i===e;var o=e.replace(/\./g,"\\.");return new RegExp("^(.+\\."+o+"|"+o+")$","i").test(i)}var ga=new $(3e4,6e4);function ba(){var e=Rr().___jsl;if(null===e||void 0===e?void 0:e.H)for(var t=0,n=Object.keys(e.H);t<n.length;t++){var r=n[t];if(e.H[r].r=e.H[r].r||[],e.H[r].L=e.H[r].L||[],e.H[r].r=Object(b.a)(e.H[r].L),e.CP)for(var i=0;i<e.CP.length;i++)e.CP[i]=null}}var ka=null;function wa(e){return ka=ka||function(e){return new Promise((function(t,n){var r,i,a;function o(){ba(),gapi.load("gapi.iframes",{callback:function(){t(gapi.iframes.getContext())},ontimeout:function(){ba(),n(L(e,"network-request-failed"))},timeout:ga.get()})}if(null===(i=null===(r=Rr().gapi)||void 0===r?void 0:r.iframes)||void 0===i?void 0:i.Iframe)t(gapi.iframes.getContext());else{if(!(null===(a=Rr().gapi)||void 0===a?void 0:a.load)){var u=ti("iframefcb");return Rr()[u]=function(){gapi.load?o():n(L(e,"network-request-failed"))},ei("https://apis.google.com/js/api.js?onload=".concat(u)).catch((function(e){return n(e)}))}o()}})).catch((function(e){throw ka=null,e}))}(e),ka}var Oa=new $(5e3,15e3),xa={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},_a=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function ja(e){var t=e.config;V(t.authDomain,e,"auth-domain-config-required");var n=t.emulator?Q(t,"emulator/auth/iframe"):"https://".concat(e.config.authDomain,"/").concat("__/auth/iframe"),r={apiKey:t.apiKey,appName:e.n
2ame,v:O.SDK_VERSION},i=_a.get(e.config.apiHost);i&&(r.eid=i);var a=e._getFrameworks();return a.length&&(r.fw=a.join(",")),"".concat(n,"?").concat(Object(w.y)(r).slice(1))}function Ea(e){return Sa.apply(this,arguments)}function Sa(){return Sa=Object(v.a)(s.a.mark((function e(t){var n,r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,wa(t);case 2:return n=e.sent,V(r=Rr().gapi,t,"internal-error"),e.abrupt("return",n.open({where:document.body,url:ja(t),messageHandlersFilter:r.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:xa,dontclear:!0},(function(e){return new Promise(function(){var n=Object(v.a)(s.a.mark((function n(r,i){var a,o,u;return s.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return u=function(){Rr().clearTimeout(o),r(e)},n.next=3,e.restyle({setHideOnLeave:!1});case 3:a=L(t,"network-request-failed"),o=Rr().setTimeout((function(){i(a)}),Oa.get()),e.ping(u).then(u,(function(){i(a)}));case 6:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}())})));case 6:case"end":return e.stop()}}),e)}))),Sa.apply(this,arguments)}var Ta={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},Ia="_blank",Ca="http://localhost",Aa=function(){function e(t){Object(c.a)(this,e),this.window=t,this.associatedEvent=null}return Object(l.a)(e,[{key:"close",value:function(){if(this.window)try{this.window.close()}catch(e){}}}]),e}();function Ra(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:500,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:600,a=Math.max((window.screen.availHeight-i)/2,0).toString(),o=Math.max((window.screen.availWidth-r)/2,0).toString(),u="",s=Object.assign(Object.assign({},Ta),{width:r.toString(),height:i.toString(),top:a,left:o}),c=Object(w.m)().toLowerCase();n&&(u=Be(c)?Ia:n),Ue(c)&&(t=t||Ca,s.scrollbars="yes");var l=Object.entries(s).reduce((function(e,t){var n=Object(g.a)(t,2),r=n[0],i=n[1];return"".concat(e).concat(r,"=").concat(i,",")}),"");if(Ge(c)&&"_self"!==u)return Na(t||"",u),new Aa(null);var f=window.open(t||"",u,l);V(f,e,"popup-blocked");try{f.focus()}catch(h){}return new Aa(f)}function Na(e,t){var n=document.createElement("a");n.href=e,n.target=t;var r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}var Pa="__/auth/handler",Da="emulator/auth/handler";function La(e,t,n,r,i,a){V(e.config.authDomain,e,"auth-domain-config-required"),V(e.config.apiKey,e,"invalid-api-key");var o={apiKey:e.config.apiKey,appName:e.name,authType:n,redirectUrl:r,v:O.SDK_VERSION,eventId:i};if(t instanceof Vt){t.setDefaultLanguage(e.languageCode),o.providerId=t.providerId||"",Object(w.q)(t.getCustomParameters())||(o.customParameters=JSON.stringify(t.getCustomParameters()));for(var u=0,s=Object.entries(a||{});u<s.length;u++){var c=Object(g.a)(s[u],2),l=c[0],f=c[1];o[l]=f}}if(t instanceof Bt){var h=t.getScopes().filter((function(e){return""!==e}));h.length>0&&(o.scopes=h.join(","))}e.tenantId&&(o.tid=e.tenantId);for(var d=o,p=0,v=Object.keys(d);p<v.length;p++){var m=v[p];void 0===d[m]&&delete d[m]}return"".concat(function(e){var t=e.config;if(!t.emulator)return"https://".concat(t.authDomain,"/").concat(Pa);return Q(t,Da)}(e),"?").concat(Object(w.y)(d).slice(1))}var Ma="webStorageSupport",Fa=function(){function e(){Object(c.a)(this,e),this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Sr,this._completeRedirectFn=aa,this._overrideRedirectResult=$i}return Object(l.a)(e,[{key:"_openPopup",value:function(){var e=Object(v.a)(s.a.mark((function e(t,n,r,i){var a,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return z(null===(a=this.eventManagers[t._key()])||void 0===a?void 0:a.manager,"_initialize() not called before _openPopup()"),o=La(t,n,r,H(),i),e.abrupt("return",Ra(t,o,Cr()));case 3:case"end":return e.stop()}}),e,this)})));return function(t,n,r,i){return e.apply(this,arguments)}}()},{key:"_openRedirect",value:function(){var e=Object(v.a)(s.a.mark((function e(t,n,r,i){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._originValidation(t);
2case 2:return a=La(t,n,r,H(),i),Rr().location.href=a,e.abrupt("return",new Promise((function(){})));case 4:case"end":return e.stop()}var a}),e,this)})));return function(t,n,r,i){return e.apply(this,arguments)}}()},{key:"_initialize",value:function(e){var t=this,n=e._key();if(this.eventManagers[n]){var r=this.eventManagers[n],i=r.manager,a=r.promise;return i?Promise.resolve(i):(z(a,"If manager is not set, promise should be"),a)}var o=this.initAndGetManager(e);return this.eventManagers[n]={promise:o},o.catch((function(){delete t.eventManagers[n]})),o}},{key:"initAndGetManager",value:function(){var e=Object(v.a)(s.a.mark((function e(t){var n,r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ea(t);case 2:return n=e.sent,r=new ca(t),n.register("authEvent",(function(e){return V(null===e||void 0===e?void 0:e.authEvent,t,"invalid-auth-event"),{status:r.onEvent(e.authEvent)?"ACK":"ERROR"}}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[t._key()]={manager:r},this.iframes[t._key()]=n,e.abrupt("return",r);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_isIframeWebStorageSupported",value:function(e,t){this.iframes[e._key()].send(Ma,{type:Ma},(function(n){var r,i=null===(r=null===n||void 0===n?void 0:n[0])||void 0===r?void 0:r.webStorageSupport;void 0!==i&&t(!!i),D(e,"internal-error")}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}},{key:"_originValidation",value:function(e){var t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=function(e){return ma.apply(this,arguments)}(e)),this.originValidationPromises[t]}},{key:"_shouldInitProactively",get:function(){return Qe()||Ve()||Ke()}}]),e}(),Ua=Fa,Va=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e){var r;return Object(c.a)(this,n),(r=t.call(this,"phone")).credential=e,r}return Object(l.a)(n,[{key:"_finalizeEnroll",value:function(e,t,n){return function(e,t){return ee(e,"POST","/v2/accounts/mfaEnrollment:finalize",Z(e,t))}(e,{idToken:t,displayName:n,phoneVerificationInfo:this.credential._makeVerificationRequest()})}},{key:"_finalizeSignIn",value:function(e,t){return function(e,t){return ee(e,"POST","/v2/accounts/mfaSignIn:finalize",Z(e,t))}(e,{mfaPendingCredential:t,phoneVerificationInfo:this.credential._makeVerificationRequest()})}}],[{key:"_fromCredential",value:function(e){return new n(e)}}]),n}(function(){function e(t){Object(c.a)(this,e),this.factorId=t}return Object(l.a)(e,[{key:"_process",value:function(e,t,n){switch(t.type){case"enroll":return this._finalizeEnroll(e,t.credential,n);case"signin":return this._finalizeSignIn(e,t.credential);default:return B("unexpected MultiFactorSessionType")}}}]),e}()),Ba=function(){function e(){Object(c.a)(this,e)}return Object(l.a)(e,null,[{key:"assertion",value:function(e){return Va._fromCredential(e)}}]),e}();Ba.FACTOR_ID="phone";var za,qa="@firebase/auth",Wa="0.20.2",Ha=function(){function e(t){Object(c.a)(this,e),this.auth=t,this.internalListeners=new Map}return Object(l.a)(e,[{key:"getUid",value:function(){var e;return this.assertAuthConfigured(),(null===(e=this.auth.currentUser)||void 0===e?void 0:e.uid)||null}},{key:"getToken",value:function(){var e=Object(v.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.assertAuthConfigured(),e.next=3,this.auth._initializationPromise;case 3:if(this.auth.currentUser){e.next=5;break}return e.abrupt("return",null);case 5:return e.next=7,this.auth.currentUser.getIdToken(t);case 7:return n=e.sent,e.abrupt("return",{accessToken:n});case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"addAuthTokenListener",value:function(e){if(this.assertAuthConfigured(),!this.internalListeners.has(e)){var t=this.auth.onIdTokenChanged((function(t){var n;e((null===(n=t)||void 0===n?void 0:n.stsTokenManager.accessToken)||null)}));this.internalListeners.set(e,t),this.updateProactiveRefresh()}}},{key:"removeAuthTokenListener",value:function(e){this.assertAuthConfigured();var t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}},{key:"assertAuthConfigured",value:function(){V(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}},{key:"updateProactiveRefresh",value:function(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}]),e}();function Ka(){return window}
2za="Browser",Object(O._registerComponent)(new E.a("auth",(function(e,t){var n=t.options,r=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),a=r.options,o=a.apiKey,u=a.authDomain;return function(e,t){V(o&&!o.includes(":"),"invalid-api-key",{appName:e.name}),V(!(null===u||void 0===u?void 0:u.includes(":")),"argument-error",{appName:e.name});var r={apiKey:o,authDomain:u,clientPlatform:za,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Ye(za)},i=new Je(e,t,r);return function(e,t){var n=(null===t||void 0===t?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(W);(null===t||void 0===t?void 0:t.errorMap)&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,null===t||void 0===t?void 0:t.popupRedirectResolver)}(i,n),i}(r,i)}),"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((function(e,t,n){e.getProvider("auth-internal").initialize()}))),Object(O._registerComponent)(new E.a("auth-internal",(function(e){return function(e){return new Ha(e)}(Ze(e.getProvider("auth").getImmediate()))}),"PRIVATE").setInstantiationMode("EXPLICIT")),Object(O.registerVersion)(qa,Wa,function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";default:return}}(za)),Object(O.registerVersion)(qa,Wa,"esm2017");function Ga(e,t,n){return $a.apply(this,arguments)}function $a(){return($a=Object(v.a)(s.a.mark((function e(t,n,r){var i,a,o,u,c;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=Ka(),o=a.BuildInfo,z(n.sessionId,"AuthEvent did not contain a session ID"),e.next=4,eo(n.sessionId);case 4:return u=e.sent,c={},Ke()?c.ibi=o.packageName:qe()?c.apn=o.packageName:D(t,"operation-not-supported-in-this-environment"),o.displayName&&(c.appDisplayName=o.displayName),c.sessionId=u,e.abrupt("return",La(t,r,n.type,void 0,null!==(i=n.eventId)&&void 0!==i?i:void 0,c));case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Qa(){return(Qa=Object(v.a)(s.a.mark((function e(t){var n,r,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Ka(),r=n.BuildInfo,i={},Ke()?i.iosBundleId=r.packageName:qe()?i.androidPackageName=r.packageName:D(t,"operation-not-supported-in-this-environment"),e.next=5,ha(t,i);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ya(e){var t=Ka().cordova;return new Promise((function(n){t.plugins.browsertab.isAvailable((function(r){var i=null;r?t.plugins.browsertab.openUrl(e):i=t.InAppBrowser.open(e,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object(w.m)();return/(iPad|iPhone|iPod).*OS 7_\d/i.test(e)||/(iPad|iPhone|iPod).*OS 8_\d/i.test(e)}()?"_blank":"_system","location=yes"),n(i)}))}))}function Xa(e,t,n){return Ja.apply(this,arguments)}function Ja(){return(Ja=Object(v.a)(s.a.mark((function e(t,n,r){var i,a,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Ka(),a=i.cordova,o=function(){},e.prev=2,e.next=5,new Promise((function(e,i){var u=null;function s(){var t;e();var n=null===(t=a.plugins.browsertab)||void 0===t?void 0:t.close;"function"===typeof n&&n(),"function"===typeof(null===r||void 0===r?void 0:r.close)&&r.close()}function c(){u||(u=window.setTimeout((function(){i(L(t,"redirect-cancelled-by-user"))}),2e3))}function l(){"visible"===(null===document||void 0===document?void 0:document.visibilityState)&&c()}n.addPassiveListener(s),document.addEventListener("resume",c,!1),qe()&&document.addEventListener("visibilitychange",l,!1),o=function(){n.removePassiveListener(s),document.removeEventListener("resume",c,!1),document.removeEventListener("visibilitychange",l,!1),u&&window.clearTimeout(u)}}));case 5:return e.prev=5,o(),e.finish(5);case 8:case"end":return e.stop()}}),e,null,[[2,,5,8]])})))).apply(this,arguments)}function Za(e){var t,n,r,i,a,o,u,s,c,l,f=Ka();V("function"===typeof(null===(t=null===f||void 0===f?void 0:f.universalLinks)||void 0===t?void 0:t.subscribe),e,"invalid-cordova-configuration",{missingPlugin:"cordova-universal-links-plugin-fix"}),V("undefined"!==typeof(null===(n=null===f||void 0===f?void 0:f.BuildInfo)||void 0===n?void 0:n.packageName),e,"invali
2d-cordova-configuration",{missingPlugin:"cordova-plugin-buildInfo"}),V("function"===typeof(null===(a=null===(i=null===(r=null===f||void 0===f?void 0:f.cordova)||void 0===r?void 0:r.plugins)||void 0===i?void 0:i.browsertab)||void 0===a?void 0:a.openUrl),e,"invalid-cordova-configuration",{missingPlugin:"cordova-plugin-browsertab"}),V("function"===typeof(null===(s=null===(u=null===(o=null===f||void 0===f?void 0:f.cordova)||void 0===o?void 0:o.plugins)||void 0===u?void 0:u.browsertab)||void 0===s?void 0:s.isAvailable),e,"invalid-cordova-configuration",{missingPlugin:"cordova-plugin-browsertab"}),V("function"===typeof(null===(l=null===(c=null===f||void 0===f?void 0:f.cordova)||void 0===c?void 0:c.InAppBrowser)||void 0===l?void 0:l.open),e,"invalid-cordova-configuration",{missingPlugin:"cordova-plugin-inappbrowser"})}function eo(e){return to.apply(this,arguments)}function to(){return(to=Object(v.a)(s.a.mark((function e(t){var n,r,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=no(t),e.next=3,crypto.subtle.digest("SHA-256",n);case 3:return r=e.sent,i=Array.from(new Uint8Array(r)),e.abrupt("return",i.map((function(e){return e.toString(16).padStart(2,"0")})).join(""));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function no(e){if(z(/[0-9a-zA-Z]+/.test(e),"Can only convert alpha-numeric strings"),"undefined"!==typeof TextEncoder)return(new TextEncoder).encode(e);for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n}var ro=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(){var e;return Object(c.a)(this,n),(e=t.apply(this,arguments)).passiveListeners=new Set,e.initPromise=new Promise((function(t){e.resolveInialized=t})),e}return Object(l.a)(n,[{key:"addPassiveListener",value:function(e){this.passiveListeners.add(e)}},{key:"removePassiveListener",value:function(e){this.passiveListeners.delete(e)}},{key:"resetRedirect",value:function(){this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1}},{key:"onEvent",value:function(e){return this.resolveInialized(),this.passiveListeners.forEach((function(t){return t(e)})),Object(f.a)(Object(h.a)(n.prototype),"onEvent",this).call(this,e)}},{key:"initialized",value:function(){var e=Object(v.a)(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.initPromise;case 2:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),n}(ca);function io(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{type:t,eventId:n,urlResponse:null,sessionId:co(),postBody:null,tenantId:e.tenantId,error:L(e,"no-auth-event")}}function ao(e,t){return lo()._set(fo(e),t)}function oo(e){return uo.apply(this,arguments)}function uo(){return(uo=Object(v.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lo()._get(fo(t));case 2:if(!(n=e.sent)){e.next=6;break}return e.next=6,lo()._remove(fo(t));case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function so(e,t){var n,r,i=function(e){var t=ho(e),n=t.link?decodeURIComponent(t.link):void 0,r=ho(n).link,i=t.deep_link_id?decodeURIComponent(t.deep_link_id):void 0;return ho(i).link||i||r||n||e}(t);if(i.includes("/__/auth/callback")){var a=ho(i),o=a.firebaseError?function(e){try{return JSON.parse(e)}catch(t){return null}}(decodeURIComponent(a.firebaseError)):null,u=null===(r=null===(n=null===o||void 0===o?void 0:o.code)||void 0===n?void 0:n.split("auth/"))||void 0===r?void 0:r[1],s=u?L(u):null;return s?{type:e.type,eventId:e.eventId,tenantId:e.tenantId,error:s,urlResponse:null,sessionId:null,postBody:null}:{type:e.type,eventId:e.eventId,tenantId:e.tenantId,sessionId:e.sessionId,urlResponse:i,postBody:null}}return null}function co(){for(var e=[],t="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",n=0;n<20;n++){var r=Math.floor(Math.random()*t.length);e.push(t.charAt(r))}return e.join("")}function lo(){return W(jr)}function fo(e){return Le("authEvent",e.config.apiKey,e.name)}function ho(e){if(!(null===e||void 0===e?void 0:e.includes("?")))return{};var t,n=e.split("?"),u=(t=n,Object(r.a)(t)||Object(i.a)(t)||Object(a.a)(t)||Object(o.a)()),s=(u[0],u.slice(1));return Object(w.z)(s.join("?"))}var po=function(){function e(){Object(c.a)(this,e),this._redirectPersistence=Sr,this._shouldInitProactively=!0,this.eventManagers=new Map,this.originValidationPromises={},this._completeRedirectFn=aa,this._overrideRedirectResult=$i}return Object(l.a)(e,[{key:"_initialize",value:function(){var e=Object(v.a)(s.a.mark((function e(t){var n,r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t._key(),(r=this.eventManagers.get(n))||(r=new ro(t),this.eventManagers.set(n,r),this.attachCallbackListeners(t,r)),e.abrupt("return",r);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_openPopup",value:function(e){D(e,"operation-not-supported-in-this-environment")}},{key:"_openRedirect",value:function(){var e=Object(v.a)(s.a.mark((function e(t,n,r,i){var a,o,u,c;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Za(t),e.next=3,this._initialize(t);case 3:return a=e.sent,e.next=6,a.initialized();case 6:return a.resetRedirect(),zi.clear(),e.next=10,this._originValidation(t);case 10:return o=io(t,r,i),e.next=13,ao(t,o);case 13:return e.next=15,Ga(t,o,n);case 15:return u=e.sent,e.next=18,Ya(u);case 18:return c=e.sent,e.abrupt("return",Xa(t,a,c));case 20:case"end":return e.stop()}}),e,this)})));return function(t,n,r,i){return e.apply(this,arguments)}}()},{key:"_isIframeWebStorageSupported",value:function(e,t){throw new Error("Method not implemented.")}},{key:"_originValidation",value:function(e){var t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=function(e){return Qa.apply(this,arguments)}(e)),this.originValidationPromises[t]}},{key:"attachCallbackListeners",value:function(e,t){var n=Ka(),r=n.universalLinks,i=n.handleOpenURL,a=n.BuildInfo,o=setTimeout(Object(v.a)(s.a.mark((function n(){return s.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,oo(e);case 2:t.onEvent(mo());case 3:case"end":return n.stop()}}),n)}))),500),u=function(){var n=Object(v.a)(s.a.mark((function n(r){var i,a;return s.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return clearTimeout(o),n.next=3,oo(e);case 3:i=n.sent,a=null,i&&(null===r||void 0===r?void 0:r.url)&&(a=so(i,r.url)),t.onEvent(a||mo());case 7:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}();"undefined"!==typeof r&&"function"===typeof r.subscribe&&r.subscribe(null,u);var c=i,l="".concat(a.packageName.toLowerCase(),"://");Ka().handleOpenURL=function(){var e=Object(v.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.toLowerCase().startsWith(l)&&u({url:t}),"function"===typeof c)try{c(t)}catch(n){console.error(n)}case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}}]),e}(),vo=po;function mo(){return{type:"unknown",eventId:null,sessionId:null,urlResponse:null,postBody:null,tenantId:null,error:L("no-auth-event")}}function yo(e,t){Ze(e)._logFramework(t)}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return ff})),n.d(t,"b",(function(){return al})),n.d(t,"c",(function(){return Wc})),n.d(t,"d",(function(){return Nc})),n.d(t,"e",(function(){return Fl})),n.d(t,"f",(function(){return il})),n.d(t,"g",(function(){return L})),n.d(t,"h",(function(){return ul})),n.d(t,"i",(function(){return Ul})),n.d(t,"j",(function(){return Vl})),n.d(t,"k",(function(){return J})),n.d(t,"l",(function(){return pf})),n.d(t,"m",(function(){return ge})),n.d(t,"n",(function(){return Oe})),n.d(t,"o",(function(){return oe})),n.d(t,"p",(function(){return Tc}
2)),n.d(t,"q",(function(){return N})),n.d(t,"r",(function(){return se})),n.d(t,"s",(function(){return I})),n.d(t,"t",(function(){return _c})),n.d(t,"u",(function(){return Ef})),n.d(t,"v",(function(){return Lf})),n.d(t,"w",(function(){return Df})),n.d(t,"x",(function(){return Xc})),n.d(t,"y",(function(){return Lc})),n.d(t,"z",(function(){return Mc})),n.d(t,"A",(function(){return Rc})),n.d(t,"B",(function(){return jf})),n.d(t,"C",(function(){return Nf})),n.d(t,"D",(function(){return el})),n.d(t,"E",(function(){return Fc})),n.d(t,"F",(function(){return $c})),n.d(t,"G",(function(){return Qc})),n.d(t,"H",(function(){return Zc})),n.d(t,"I",(function(){return af})),n.d(t,"J",(function(){return rf})),n.d(t,"K",(function(){return Kc})),n.d(t,"L",(function(){return If})),n.d(t,"M",(function(){return mf})),n.d(t,"N",(function(){return gf})),n.d(t,"O",(function(){return bf})),n.d(t,"P",(function(){return kf})),n.d(t,"Q",(function(){return wf})),n.d(t,"R",(function(){return Of})),n.d(t,"S",(function(){return Mf})),n.d(t,"T",(function(){return Xl})),n.d(t,"U",(function(){return Jl})),n.d(t,"V",(function(){return tl})),n.d(t,"W",(function(){return nl})),n.d(t,"X",(function(){return Sf})),n.d(t,"Y",(function(){return Tf})),n.d(t,"Z",(function(){return Ql})),n.d(t,"ab",(function(){return Hl})),n.d(t,"bb",(function(){return Vc})),n.d(t,"cb",(function(){return Uc})),n.d(t,"db",(function(){return Rf})),n.d(t,"eb",(function(){return Pf})),n.d(t,"fb",(function(){return xf})),n.d(t,"gb",(function(){return E})),n.d(t,"hb",(function(){return zl})),n.d(t,"ib",(function(){return tf})),n.d(t,"jb",(function(){return ef})),n.d(t,"kb",(function(){return _f})),n.d(t,"lb",(function(){return Jc})),n.d(t,"mb",(function(){return Gl}));var r=n(61),i=n(31),a=n(23),o=n(19),u=n(9),s=n(0),c=n.n(s),l=n(3),f=n(12),h=n(13),d=n(22),p=n(2),v=n(4),m=n(18),y=n(26),g=n(33),b=n(8),k=n(35),w="@firebase/firestore",O=function(){function e(t){Object(p.a)(this,e),this.uid=t}return Object(v.a)(e,[{key:"isAuthenticated",value:function(){return null!=this.uid}},{key:"toKey",value:function(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}},{key:"isEqual",value:function(e){return e.uid===this.uid}}]),e}();O.UNAUTHENTICATED=new O(null),O.GOOGLE_CREDENTIALS=new O("google-credentials-uid"),O.FIRST_PARTY=new O("first-party-uid"),O.MOCK_USER=new O("mock-user");var x="9.8.0",_=new g.b("@firebase/firestore");function j(){return _.logLevel}function E(e){_.setLogLevel(e)}function S(e){if(_.logLevel<=g.a.DEBUG){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n.map(C);_.debug.apply(_,["Firestore (".concat(x,"): ").concat(e)].concat(Object(d.a)(i)))}}function T(e){if(_.logLevel<=g.a.ERROR){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n.map(C);_.error.apply(_,["Firestore (".concat(x,"): ").concat(e)].concat(Object(d.a)(i)))}}function I(e){if(_.logLevel<=g.a.WARN){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n.map(C);_.warn.apply(_,["Firestore (".concat(x,"): ").concat(e)].concat(Object(d.a)(i)))}}function C(e){if("string"==typeof e)return e;try{return t=e,JSON.stringify(t)}catch(t){return e}var t}function A(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Unexpected state",t="FIRESTORE (".concat(x,") INTERNAL ASSERTION FAILED: ")+e;throw T(t),new Error(t)}function R(e,t){e||A()}function N(e,t){e||A()}function P(e,t){return e}var D={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"},L=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r){var i;return Object(p.a)(this,n),(i=t.call(this,e,r)).code=e,i.message=r,i.toString=function(){return"".concat(i.name,": [code=").concat(i.code,"]: ").concat(i.message)},i}return n}(b.c),M=function e(){var t=this;Object(p.a)(this,e),this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))},F=function e(t,n){Object(p.a)(this,e),this.user=n,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization","Bearer ".concat(t))},U=function(){function e(){Object(p.a)(this,e)}return Object(v.a)(e,[{key:"getToken",value:function(){return Promise.resolve(null)}},{key:"invalidateToken",value:function(){}},{key:"start",value:function(e,t){e.enqueueRetryable((function(){return t(O.UNAUTHENTICATED)}))}},{key:"shutdown",value:function(){}}]),e}(),V=function(){function e(t){Object(p.a)(this,e),this.token=t,this.changeListener=null}return Object(v.a)(e,[{key:"getToken",value:function(){return Promise.resolve(this.token)}},{key:"invalidateToken",value:function(){}},{key:"start",value:function(e,t){var n=this;this.changeListener=t,e.enqueueRetryable((function(){return t(n.token.user)}))}},{key:"shutdown",value:function(){this.changeListener=null}}]),e}(),B=function(){function e(t){Object(p.a)(this,e),this.t=t,this.currentUser=O.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}return Object(v.a)(e,[{key:"start",value:function(e,t){var n=this,r=this.i,i=function(e){return n.i!==r?(r=n.i,t(e)):Promise.resolve()},a=new M;this.o=function(){n.i++,n.currentUser=n.u(),a.resolve(),a=new M,e.enqueueRetryable((function(){return i(n.currentUser)}))};var o=function(){var t=a;e.enqueueRetryable(Object(l.a)(c.a.mark((function e(){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.promise;case 2:return e.next=4,i(n.currentUser);case 4:case"end":return e.stop()}}),e)}))))}
2,u=function(e){S("FirebaseAuthCredentialsProvider","Auth detected"),n.auth=e,n.auth.addAuthTokenListener(n.o),o()};this.t.onInit((function(e){return u(e)})),setTimeout((function(){if(!n.auth){var e=n.t.getImmediate({optional:!0});e?u(e):(S("FirebaseAuthCredentialsProvider","Auth not yet detected"),a.resolve(),a=new M)}}),0),o()}},{key:"getToken",value:function(){var e=this,t=this.i,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then((function(n){return e.i!==t?(S("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),e.getToken()):n?(R("string"==typeof n.accessToken),new F(n.accessToken,e.currentUser)):null})):Promise.resolve(null)}},{key:"invalidateToken",value:function(){this.forceRefresh=!0}},{key:"shutdown",value:function(){this.auth&&this.auth.removeAuthTokenListener(this.o)}},{key:"u",value:function(){var e=this.auth&&this.auth.getUid();return R(null===e||"string"==typeof e),new O(e)}}]),e}(),z=function e(t,n,r){Object(p.a)(this,e),this.type="FirstParty",this.user=O.FIRST_PARTY,this.headers=new Map,this.headers.set("X-Goog-AuthUser",n);var i=t.auth.getAuthHeaderValueForFirstParty([]);i&&this.headers.set("Authorization",i),r&&this.headers.set("X-Goog-Iam-Authorization-Token",r)},q=function(){function e(t,n,r){Object(p.a)(this,e),this.h=t,this.l=n,this.m=r}return Object(v.a)(e,[{key:"getToken",value:function(){return Promise.resolve(new z(this.h,this.l,this.m))}},{key:"start",value:function(e,t){e.enqueueRetryable((function(){return t(O.FIRST_PARTY)}))}},{key:"shutdown",value:function(){}},{key:"invalidateToken",value:function(){}}]),e}(),W=function e(t){Object(p.a)(this,e),this.value=t,this.type="AppCheck",this.headers=new Map,t&&t.length>0&&this.headers.set("x-firebase-appcheck",this.value)},H=function(){function e(t){Object(p.a)(this,e),this.g=t,this.forceRefresh=!1,this.appCheck=null,this.p=null}return Object(v.a)(e,[{key:"start",value:function(e,t){var n=this,r=function(e){null!=e.error&&S("FirebaseAppCheckTokenProvider","Error getting App Check token; using placeholder token instead. Error: ".concat(e.error.message));var r=e.token!==n.p;return n.p=e.token,S("FirebaseAppCheckTokenProvider","Received ".concat(r?"new":"existing"," token.")),r?t(e.token):Promise.resolve()};this.o=function(t){e.enqueueRetryable((function(){return r(t)}))};var i=function(e){S("FirebaseAppCheckTokenProvider","AppCheck detected"),n.appCheck=e,n.appCheck.addTokenListener(n.o)};this.g.onInit((function(e){return i(e)})),setTimeout((function(){if(!n.appCheck){var e=n.g.getImmediate({optional:!0});e?i(e):S("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}}),0)}},{key:"getToken",value:function(){var e=this,t=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(t).then((function(t){return t?(R("string"==typeof t.token),e.p=t.token,new W(t.token)):null})):Promise.resolve(null)}},{key:"invalidateToken",value:function(){this.forceRefresh=!0}},{key:"shutdown",value:function(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}}]),e}(),K=function(){function e(t,n){var r=this;Object(p.a)(this,e),this.previousValue=t,n&&(n.sequenceNumberHandler=function(e){return r.I(e)},this.T=function(e){return n.writeSequenceNumber(e)})}return Object(v.a)(e,[{key:"I",value:function(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}},{key:"next",value:function(){var e=++this.previousValue;return this.T&&this.T(e),e}}]),e}();function G(e){var t="undefined"!=typeof self&&(self.crypto||self.msCrypto),n=new Uint8Array(e);if(t&&"function"==typeof t.getRandomValues)t.getRandomValues(n);else for(var r=0;r<e;r++)n[r]=Math.floor(256*Math.random());return n}K.A=-1;var $=function(){function e(){Object(p.a)(this,e)}return Object(v.a)(e,null,[{key:"R",value:function(){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=Math.floor(256/e.length)*e.length,n="";n.length<20;
2)for(var r=G(40),i=0;i<r.length;++i)n.length<20&&r[i]<t&&(n+=e.charAt(r[i]%e.length));return n}}]),e}();function Q(e,t){return e<t?-1:e>t?1:0}function Y(e,t,n){return e.length===t.length&&e.every((function(e,r){return n(e,t[r])}))}function X(e){return e+"\0"}var J=function(){function e(t,n){if(Object(p.a)(this,e),this.seconds=t,this.nanoseconds=n,n<0)throw new L(D.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(n>=1e9)throw new L(D.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(t<-62135596800)throw new L(D.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t);if(t>=253402300800)throw new L(D.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t)}return Object(v.a)(e,[{key:"toDate",value:function(){return new Date(this.toMillis())}},{key:"toMillis",value:function(){return 1e3*this.seconds+this.nanoseconds/1e6}},{key:"_compareTo",value:function(e){return this.seconds===e.seconds?Q(this.nanoseconds,e.nanoseconds):Q(this.seconds,e.seconds)}},{key:"isEqual",value:function(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}},{key:"toString",value:function(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}},{key:"toJSON",value:function(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}},{key:"valueOf",value:function(){var e=this.seconds- -62135596800;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}],[{key:"now",value:function(){return e.fromMillis(Date.now())}},{key:"fromDate",value:function(t){return e.fromMillis(t.getTime())}},{key:"fromMillis",value:function(t){var n=Math.floor(t/1e3);return new e(n,Math.floor(1e6*(t-1e3*n)))}}]),e}(),Z=function(){function e(t){Object(p.a)(this,e),this.timestamp=t}return Object(v.a)(e,[{key:"compareTo",value:function(e){return this.timestamp._compareTo(e.timestamp)}},{key:"isEqual",value:function(e){return this.timestamp.isEqual(e.timestamp)}},{key:"toMicroseconds",value:function(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}},{key:"toString",value:function(){return"SnapshotVersion("+this.timestamp.toString()+")"}},{key:"toTimestamp",value:function(){return this.timestamp}}],[{key:"fromTimestamp",value:function(t){return new e(t)}},{key:"min",value:function(){return new e(new J(0,0))}},{key:"max",value:function(){return new e(new J(253402300799,999999999))}}]),e}();function ee(e){var t=0;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function te(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])}function ne(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}var re=function(){function e(t,n,r){Object(p.a)(this,e),void 0===n?n=0:n>t.length&&A(),void 0===r?r=t.length-n:r>t.length-n&&A(),this.segments=t,this.offset=n,this.len=r}return Object(v.a)(e,[{key:"length",get:function(){return this.len}},{key:"isEqual",value:function(t){return 0===e.comparator(this,t)}},{key:"child",value:function(t){var n=this.segments.slice(this.offset,this.limit());return t instanceof e?t.forEach((function(e){n.push(e)})):n.push(t),this.construct(n)}},{key:"limit",value:function(){return this.offset+this.length}},{key:"popFirst",value:function(e){return e=void 0===e?1:e,this.construct(this.segments,this.offset+e,this.length-e)}},{key:"popLast",value:function(){return this.construct(this.segments,this.offset,this.length-1)}},{key:"firstSegment",value:function(){return this.segments[this.offset]}},{key:"lastSegment",value:function(){return this.get(this.length-1)}},{key:"get",value:function(e){return this.segments[this.offset+e]}},{key:"isEmpty",value:function(){return 0===this.length}},{key:"isPrefixOf",value:function(e){if(e.length<this.length)return!1;for(var t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}},{key:"isImmediateParentOf",value:function(e){if(this.length+1!==e.length)return!1;for(var t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}},{key:"forEach",value:function(e){for(var t=this.offset,n=this.limit();t<n;t++)e(this.segments[t])}},{key:"toArray",value:function(){return this.segments.slice(this.offset,this.limit())}}
2],[{key:"comparator",value:function(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){var i=e.get(r),a=t.get(r);if(i<a)return-1;if(i>a)return 1}return e.length<t.length?-1:e.length>t.length?1:0}}]),e}(),ie=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(){return Object(p.a)(this,n),t.apply(this,arguments)}return Object(v.a)(n,[{key:"construct",value:function(e,t,r){return new n(e,t,r)}},{key:"canonicalString",value:function(){return this.toArray().join("/")}},{key:"toString",value:function(){return this.canonicalString()}}],[{key:"fromString",value:function(){for(var e=[],t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];for(var a=0,o=r;a<o.length;a++){var u=o[a];if(u.indexOf("//")>=0)throw new L(D.INVALID_ARGUMENT,"Invalid segment (".concat(u,"). Paths must not contain // in them."));e.push.apply(e,Object(d.a)(u.split("/").filter((function(e){return e.length>0}))))}return new n(e)}},{key:"emptyPath",value:function(){return new n([])}}]),n}(re),ae=/^[_a-zA-Z][_a-zA-Z0-9]*$/,oe=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(){return Object(p.a)(this,n),t.apply(this,arguments)}return Object(v.a)(n,[{key:"construct",value:function(e,t,r){return new n(e,t,r)}},{key:"canonicalString",value:function(){return this.toArray().map((function(e){return e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),n.isValidIdentifier(e)||(e="`"+e+"`"),e})).join(".")}},{key:"toString",value:function(){return this.canonicalString()}},{key:"isKeyField",value:function(){return 1===this.length&&"__name__"===this.get(0)}}],[{key:"isValidIdentifier",value:function(e){return ae.test(e)}},{key:"keyField",value:function(){return new n(["__name__"])}},{key:"fromServerFormat",value:function(e){for(var t=[],r="",i=0,a=function(){if(0===r.length)throw new L(D.INVALID_ARGUMENT,"Invalid field path (".concat(e,"). Paths must not be empty, begin with '.', end with '.', or contain '..'"));t.push(r),r=""},o=!1;i<e.length;){var u=e[i];if("\\"===u){if(i+1===e.length)throw new L(D.INVALID_ARGUMENT,"Path has trailing escape character: "+e);var s=e[i+1];if("\\"!==s&&"."!==s&&"`"!==s)throw new L(D.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);r+=s,i+=2}else"`"===u?(o=!o,i++):"."!==u||o?(r+=u,i++):(a(),i++)}if(a(),o)throw new L(D.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new n(t)}},{key:"emptyPath",value:function(){return new n([])}}]),n}(re),ue=function(){function e(t){Object(p.a)(this,e),this.fields=t,t.sort(oe.comparator)}return Object(v.a)(e,[{key:"covers",value:function(e){var t,n=Object(u.a)(this.fields);try{for(n.s();!(t=n.n()).done;){if(t.value.isPrefixOf(e))return!0}}catch(r){n.e(r)}finally{n.f()}return!1}},{key:"isEqual",value:function(e){return Y(this.fields,e.fields,(function(e,t){return e.isEqual(t)}))}}]),e}();function se(){return"undefined"!=typeof atob}var ce=function(e){function t(e){Object(p.a)(this,t),this.binaryString=e}return Object(v.a)(t,[{key:e,value:function(){var e=this,t=0;return{next:function(){return t<e.binaryString.length?{value:e.binaryString.charCodeAt(t++),done:!1}:{value:void 0,done:!0}}}}},{key:"toBase64",value:function(){return e=this.binaryString,btoa(e);var e}},{key:"toUint8Array",value:function(){return function(e){for(var t=new Uint8Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}(this.binaryString)}},{key:"approximateByteSize",value:function(){return 2*this.binaryString.length}},{key:"compareTo",value:function(e){return Q(this.binaryString,e.binaryString)}},{key:"isEqual",value:function(e){return this.binaryString===e.binaryString}}],[{key:"fromBase64String",value:function(e){return new t(atob(e))}},{key:"fromUint8Array",value:function(e){var n=function(e){for(var t="",n=0;n<e.length;++n)t+=String.fromCharCode(e[n]);return t}(e);return new t(n)}}]),t}(Symbol.iterator);ce.EMPTY_BYTE_STRING=new ce("");var le=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function fe(e){if(R(!!e),"string"==typeof e){var t=0,n=le.exec(e);if(R(!!n),n[1]){var r=n[1];r=(r+"000000000").substr(0,9),t=Number(r)}var i=new Date(e);return{seconds:Math.floor(i.getTime()/1e3),nanos:t}}return{seconds:he(e.seconds),nanos:he(e.nanos)}}function he(e){return"number"==typeof e?e:"string"==typeof e?Number(e):0}function de(e){return"string"==typeof e?ce.fromBase64String(e):ce.fromUint8Array(e)}function pe(e){var t,n;return"server_timestamp"===(null===(n=((null===(t=null==e?void 0:e.mapValue)||void 0===t?void 0:t.fields)||{}).__type__)||void 0===n?void 0:n.stringValue)}function ve(e){var t=e.mapValue.fields.__previous_value__;return pe(t)?ve(t):t}function me(e){var t=fe(e.mapValue.fields.__local_write_time__.timestampValue);
2return new J(t.seconds,t.nanos)}var ye=function e(t,n,r,i,a,o,u,s){Object(p.a)(this,e),this.databaseId=t,this.appId=n,this.persistenceKey=r,this.host=i,this.ssl=a,this.forceLongPolling=o,this.autoDetectLongPolling=u,this.useFetchStreams=s},ge=function(){function e(t,n){Object(p.a)(this,e),this.projectId=t,this.database=n||"(default)"}return Object(v.a)(e,[{key:"isDefaultDatabase",get:function(){return"(default)"===this.database}},{key:"isEqual",value:function(t){return t instanceof e&&t.projectId===this.projectId&&t.database===this.database}}],[{key:"empty",value:function(){return new e("","")}}]),e}();function be(e){return null==e}function ke(e){return 0===e&&1/e==-1/0}function we(e){return"number"==typeof e&&Number.isInteger(e)&&!ke(e)&&e<=Number.MAX_SAFE_INTEGER&&e>=Number.MIN_SAFE_INTEGER}var Oe=function(){function e(t){Object(p.a)(this,e),this.path=t}return Object(v.a)(e,[{key:"collectionGroup",get:function(){return this.path.popLast().lastSegment()}},{key:"hasCollectionId",value:function(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e}},{key:"getCollectionGroup",value:function(){return this.path.get(this.path.length-2)}},{key:"getCollectionPath",value:function(){return this.path.popLast()}},{key:"isEqual",value:function(e){return null!==e&&0===ie.comparator(this.path,e.path)}},{key:"toString",value:function(){return this.path.toString()}}],[{key:"fromPath",value:function(t){return new e(ie.fromString(t))}},{key:"fromName",value:function(t){return new e(ie.fromString(t).popFirst(5))}},{key:"empty",value:function(){return new e(ie.emptyPath())}},{key:"comparator",value:function(e,t){return ie.comparator(e.path,t.path)}},{key:"isDocumentKey",value:function(e){return e.length%2==0}},{key:"fromSegments",value:function(t){return new e(new ie(t.slice()))}}]),e}(),xe={mapValue:{fields:{__type__:{stringValue:"__max__"}}}},_e={nullValue:"NULL_VALUE"};function je(e){return"nullValue"in e?0:"booleanValue"in e?1:"integerValue"in e||"doubleValue"in e?2:"timestampValue"in e?3:"stringValue"in e?5:"bytesValue"in e?6:"referenceValue"in e?7:"geoPointValue"in e?8:"arrayValue"in e?9:"mapValue"in e?pe(e)?4:Ue(e)?9007199254740991:10:A()}function Ee(e,t){if(e===t)return!0;var n=je(e);if(n!==je(t))return!1;switch(n){case 0:case 9007199254740991:return!0;case 1:return e.booleanValue===t.booleanValue;case 4:return me(e).isEqual(me(t));case 3:return function(e,t){if("string"==typeof e.timestampValue&&"string"==typeof t.timestampValue&&e.timestampValue.length===t.timestampValue.length)return e.timestampValue===t.timestampValue;var n=fe(e.timestampValue),r=fe(t.timestampValue);return n.seconds===r.seconds&&n.nanos===r.nanos}(e,t);case 5:return e.stringValue===t.stringValue;case 6:return function(e,t){return de(e.bytesValue).isEqual(de(t.bytesValue))}(e,t);case 7:return e.referenceValue===t.referenceValue;case 8:return function(e,t){return he(e.geoPointValue.latitude)===he(t.geoPointValue.latitude)&&he(e.geoPointValue.longitude)===he(t.geoPointValue.longitude)}(e,t);case 2:return function(e,t){if("integerValue"in e&&"integerValue"in t)return he(e.integerValue)===he(t.integerValue);if("doubleValue"in e&&"doubleValue"in t){var n=he(e.doubleValue),r=he(t.doubleValue);return n===r?ke(n)===ke(r):isNaN(n)&&isNaN(r)}return!1}(e,t);case 9:return Y(e.arrayValue.values||[],t.arrayValue.values||[],Ee);case 10:return function(e,t){var n=e.mapValue.fields||{},r=t.mapValue.fields||{};if(ee(n)!==ee(r))return!1;for(var i in n)if(n.hasOwnProperty(i)&&(void 0===r[i]||!Ee(n[i],r[i])))return!1;return!0}(e,t);default:return A()}}function Se(e,t){return void 0!==(e.values||[]).find((function(e){return Ee(e,t)}))}function Te(e,t){if(e===t)return 0;var n=je(e),r=je(t);if(n!==r)return Q(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return Q(e.booleanValue,t.booleanValue);case 2:return function(e,t){var n=he(e.integerValue||e.doubleValue),r=he(t.integerValue||t.doubleValue);return n<r?-1:n>r?1:n===r?0:isNaN(n)?isNaN(r)?0:-1:1}(e,t);case 3:return Ie(e.timestampValue,t.timestampValue);case 4:return Ie(me(e),me(t));case 5:return Q(e.stringValue,t.stringValue);case 6:return function(e,t){var n=de(e),r=de(t);return n.compareTo(r)}(e.bytesValue,t.bytesValue);case 7:return function(e,t){for(var n=e.split("/"),r=t.split("/"),i=0;i<n.length&&i<r.length;i++){var a=Q(n[i],r[i]);if(0!==a)return a}return Q(n.length,r.length)}(e.referenceValue,t.referenceValue);case 8:return function(e,t){var n=Q(he(e.latitude),he(t.latitude));return 0!==n?n:Q(he(e.longitude),he(t.longitude))}(e.geoPointValue,t.geoPointValue);case 9:return function(e,t){for(var n=e.values||[],r=t.values||[],i=0;i<n.length&&i<r.length;++i){var a=Te(n[i],r[i]);if(a)return a}return Q(n.length,r.length)}(e.arrayValue,t.arrayValue);case 10:return function(e,t){if(e===xe.mapValue&&t===xe.mapValue)return 0;if(e===xe.mapValue)return 1;if(t===xe.mapValue)return-1;var n=e.fields||{},r=Object.keys(n),i=t.fields||{},a=Object.keys(i);r.sort(),a.sort();for(var o=0;o<r.length&&o<a.length;++o){var u=Q(r[o],a[o]);if(0!==u)return u;var s=Te(n[r[o]],i[a[o]]);if(0!==s)return s}return Q(r.length,a.length)}(e.mapValue,t.mapValue);default:throw A()}}function Ie(e,t){if("string"==typeof e&&"string"==typeof t&&e.length===t.length)return Q(e,t);var n=fe(e),r=fe(t),i=Q(n.seconds,r.seconds);return 0!==i?i:Q(n.nanos,r.nanos)}function Ce(e){return Ae(e)}function Ae(e){return"nullValue"in e?"null":"booleanValue"in e?""+e.booleanValue:"integerValue"in e?""+e.integerValue:"doubleValue"in e?""+e.doubleValue:"timestampValue"in e?function(e){var t=fe(e);return"time(".concat(t.seconds,",").concat(t.nanos,")")}(e.timestampValue):"stringValue"in e?e.stringValue:"bytesValue"in e?de(e.bytesValue).toBase64():"referenceValue"in e?(n=e.referenceValue,Oe.fromName(n).toString()):"geoPointValue"in e?"geo(".concat((t=e.geoPointValue).latitude,",").concat(t.longitude,")"):"arrayValue"in e?function(e){var t,n="[",r=!0,i=Object(u.a)(e.values||[]);try{for(i.s();!(t=i.n()).done;){var a=t.value;r?r=!1:n+=",",n+=Ae(a)}}catch(o){i.e(o)}finally{i.f()}return n+"]"}(e.arrayValue):"mapValue"in e?function(e){var t,n=Object.keys(e.fields||{}).sort(),r="{",i=!0,a=Object(u.a)(n);try{for(a.s();!(t=a.n()).done;){var o=t.value;i?i=!1:r+=",",r+="".concat(o,":").concat(Ae(e.fields[o]))}}catch(s){a.e(s)}finally{a.f()}return r+"}"}(e.mapValue):A();var t,n}function Re(e,t){return{referenceValue:"projects/".concat(e.projectId,"/databases/").concat(e.database,"/documents/").concat(t.path.canonicalString())}}function Ne(e){return!!e&&"integerValue"in e}function Pe(e){return!!e&&"arrayValue"in e}function De(e){return!!e&&"nullValue"in e}function Le(e){return!!e&&"doubleValue"in e&&isNaN(Number(e.doubleValue))}function Me(e){return!!e&&"mapValue"in e}function Fe(e){if(e.geoPointValue)return{geoPointValue:Object.assign({},e.geoPointValue)};if(e.timestampValue&&"object"==typeof e.timestampValue)return{timestampValue:Object.assign({},e.timestampValue)};if(e.mapValue){var t={mapValue:{fields:{}}};return te(e.mapValue.fields,(function(e,n){return t.mapValue.fields[e]=Fe(n)})),t}if(e.arrayValue){for(var n={arrayValue:{values:[]}},r=0;r<(e.arrayValue.values||[]).length;++r)n.arrayValue.values[r]=Fe(e.arrayValue.values[r]);return n}return Object.assign({},e)}function Ue(e){return"__max__"===(((e.mapValue||{}).fields||{}).__type__||{}).stringValue}function Ve(e){return"nullValue"in e?_e:"booleanValue"in e?{booleanValue:!1}:"integerValue"in e||"doubleValue"in e?{doubleValue:NaN}:"timestampValue"in e?{timestampValue:{seconds:Number.MIN_SAFE_INTEGER}}:"stringValue"in e?{stringValue:""}
2:"bytesValue"in e?{bytesValue:""}:"referenceValue"in e?Re(ge.empty(),Oe.empty()):"geoPointValue"in e?{geoPointValue:{latitude:-90,longitude:-180}}:"arrayValue"in e?{arrayValue:{}}:"mapValue"in e?{mapValue:{}}:A()}function Be(e){return"nullValue"in e?{booleanValue:!1}:"booleanValue"in e?{doubleValue:NaN}:"integerValue"in e||"doubleValue"in e?{timestampValue:{seconds:Number.MIN_SAFE_INTEGER}}:"timestampValue"in e?{stringValue:""}:"stringValue"in e?{bytesValue:""}:"bytesValue"in e?Re(ge.empty(),Oe.empty()):"referenceValue"in e?{geoPointValue:{latitude:-90,longitude:-180}}:"geoPointValue"in e?{arrayValue:{}}:"arrayValue"in e?{mapValue:{}}:"mapValue"in e?xe:A()}function ze(e,t){var n=Te(e.value,t.value);return 0!==n?n:e.inclusive&&!t.inclusive?-1:!e.inclusive&&t.inclusive?1:0}function qe(e,t){var n=Te(e.value,t.value);return 0!==n?n:e.inclusive&&!t.inclusive?1:!e.inclusive&&t.inclusive?-1:0}var We=function(){function e(t){Object(p.a)(this,e),this.value=t}return Object(v.a)(e,[{key:"field",value:function(e){if(e.isEmpty())return this.value;for(var t=this.value,n=0;n<e.length-1;++n)if(!Me(t=(t.mapValue.fields||{})[e.get(n)]))return null;return(t=(t.mapValue.fields||{})[e.lastSegment()])||null}},{key:"set",value:function(e,t){this.getFieldsMap(e.popLast())[e.lastSegment()]=Fe(t)}},{key:"setAll",value:function(e){var t=this,n=oe.emptyPath(),r={},i=[];e.forEach((function(e,a){if(!n.isImmediateParentOf(a)){var o=t.getFieldsMap(n);t.applyChanges(o,r,i),r={},i=[],n=a.popLast()}e?r[a.lastSegment()]=Fe(e):i.push(a.lastSegment())}));var a=this.getFieldsMap(n);this.applyChanges(a,r,i)}},{key:"delete",value:function(e){var t=this.field(e.popLast());Me(t)&&t.mapValue.fields&&delete t.mapValue.fields[e.lastSegment()]}},{key:"isEqual",value:function(e){return Ee(this.value,e.value)}},{key:"getFieldsMap",value:function(e){var t=this.value;t.mapValue.fields||(t.mapValue={fields:{}});for(var n=0;n<e.length;++n){var r=t.mapValue.fields[e.get(n)];Me(r)&&r.mapValue.fields||(r={mapValue:{fields:{}}},t.mapValue.fields[e.get(n)]=r),t=r}return t.mapValue.fields}},{key:"applyChanges",value:function(e,t,n){te(t,(function(t,n){return e[t]=n}));var r,i=Object(u.a)(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;delete e[a]}}catch(o){i.e(o)}finally{i.f()}}},{key:"clone",value:function(){return new e(Fe(this.value))}}],[{key:"empty",value:function(){return new e({mapValue:{}})}}]),e}();function He(e){var t=[];return te(e.fields,(function(e,n){var r=new oe([e]);if(Me(n)){var i=He(n.mapValue).fields;if(0===i.length)t.push(r);else{var a,o=Object(u.a)(i);try{for(o.s();!(a=o.n()).done;){var s=a.value;t.push(r.child(s))}}catch(c){o.e(c)}finally{o.f()}}}else t.push(r)})),new ue(t)}var Ke=function(){function e(t,n,r,i,a,o){Object(p.a)(this,e),this.key=t,this.documentType=n,this.version=r,this.readTime=i,this.data=a,this.documentState=o}return Object(v.a)(e,[{key:"convertToFoundDocument",value:function(e,t){return this.version=e,this.documentType=1,this.data=t,this.documentState=0,this}},{key:"convertToNoDocument",value:function(e){return this.version=e,this.documentType=2,this.data=We.empty(),this.documentState=0,this}},{key:"convertToUnknownDocument",value:function(e){return this.version=e,this.documentType=3,this.data=We.empty(),this.documentState=2,this}},{key:"setHasCommittedMutations",value:function(){return this.documentState=2,this}},{key:"setHasLocalMutations",value:function(){return this.documentState=1,this}},{key:"setReadTime",value:function(e){return this.readTime=e,this}},{key:"hasLocalMutations",get:function(){return 1===this.documentState}},{key:"hasCommittedMutations",get:function(){return 2===this.documentState}},{key:"hasPendingWrites",get:function(){return this.hasLocalMutations||this.hasCommittedMutations}},{key:"isValidDocument",value:function(){return 0!==this.documentType}},{key:"isFoundDocument",value:function(){return 1===this.documentType}},{key:"isNoDocument",value:function(){return 2===this.documentType}},{key:"isUnknownDocument",value:function(){return 3===this.documentType}},{key:"isEqual",value:function(t){return t instanceof e&&this.key.isEqual(t.key)&&this.version.isEqual(t.version)&&this.documentType===t.documentType&&this.documentState===t.documentState&&this.data.isEqual(t.data)}},{key:"mutableCopy",value:function(){return new e(this.key,this.documentType,this.version,this.readTime,this.data.clone(),this.documentState)}},{key:"toString",value:function(){return"Document(".concat(this.key,", ").concat(this.version,", ").concat(JSON.stringify(this.data.value),", {documentType: ").concat(this.documentType,"}), {documentState: ").concat(this.documentState,"})")}}],[{key:"newInvalidDocument",value:function(t){return new e(t,0,Z.min(),Z.min(),We.empty(),0)}},{key:"newFoundDocument",value:function(t,n,r){return new e(t,1,n,Z.min(),r,0)}},{key:"newNoDocument",value:function(t,n){return new e(t,2,n,Z.min(),We.empty(),0)}},{key:"newUnknownDocument",value:function(t,n){return new e(t,3,n,Z.min(),We.empty(),2)}}]),e}(),Ge=function e(t,n,r,i){Object(p.a)(this,e),this.indexId=t,this.collectionGroup=n,this.fields=r,this.indexState=i};function $e(e){return e.fields.find((function(e){return 2===e.kind}))}function Qe(e){return e.fields.filter((function(e){return 2!==e.kind}))}Ge.UNKNOWN_ID=-1;var Ye=function e(t,n){Object(p.a)(this,e),this.fieldPath=t,this.kind=n},Xe=function(){function e(t,n){Object(p.a)(this,e),this.sequenceNumber=t,this.offset=n}return Object(v.a)(e,null,[{key:"empty",value:function(){return new e(0,et.min())}}]),e}();function Je(e,t){var n=e.toTimestamp().seconds,r=e.toTimestamp().nanoseconds+1,i=Z.fromTimestamp(1e9===r?new J(n+1,0):new J(n,r));return new et(i,Oe.empty(),t)}function Ze(e){return new et(e.readTime,e.key,-1)}var et=function(){function e(t,n,r){Object(p.a)(this,e),this.readTime=t,this.documentKey=n,this.largestBatchId=r}return Object(v.a)(e,null,[{key:"min",value:function(){return new e(Z.min(),Oe.empty(),-1)}},{key:"max",value:function(){return new e(Z.max(),Oe.empty(),-1)}}]),e}();function tt(e,t){var n=e.readTime.compareTo(t.readTime);return 0!==n?n:0!==(n=Oe.comparator(e.documentKey,t.documentKey))?n:Q(e.largestBatchId,t.largestBatchId)}var nt=function(){function e(t,n){Object(p.a)(this,e),this.comparator=t,this.root=n||it.EMPTY}return Object(v.a)(e,[{key:"insert",value:function(t,n){return new e(this.comparator,this.root.insert(t,n,this.comparator).copy(null,null,it.BLACK,null,
2null))}},{key:"remove",value:function(t){return new e(this.comparator,this.root.remove(t,this.comparator).copy(null,null,it.BLACK,null,null))}},{key:"get",value:function(e){for(var t=this.root;!t.isEmpty();){var n=this.comparator(e,t.key);if(0===n)return t.value;n<0?t=t.left:n>0&&(t=t.right)}return null}},{key:"indexOf",value:function(e){for(var t=0,n=this.root;!n.isEmpty();){var r=this.comparator(e,n.key);if(0===r)return t+n.left.size;r<0?n=n.left:(t+=n.left.size+1,n=n.right)}return-1}},{key:"isEmpty",value:function(){return this.root.isEmpty()}},{key:"size",get:function(){return this.root.size}},{key:"minKey",value:function(){return this.root.minKey()}},{key:"maxKey",value:function(){return this.root.maxKey()}},{key:"inorderTraversal",value:function(e){return this.root.inorderTraversal(e)}},{key:"forEach",value:function(e){this.inorderTraversal((function(t,n){return e(t,n),!1}))}},{key:"toString",value:function(){var e=[];return this.inorderTraversal((function(t,n){return e.push("".concat(t,":").concat(n)),!1})),"{".concat(e.join(", "),"}")}},{key:"reverseTraversal",value:function(e){return this.root.reverseTraversal(e)}},{key:"getIterator",value:function(){return new rt(this.root,null,this.comparator,!1)}},{key:"getIteratorFrom",value:function(e){return new rt(this.root,e,this.comparator,!1)}},{key:"getReverseIterator",value:function(){return new rt(this.root,null,this.comparator,!0)}},{key:"getReverseIteratorFrom",value:function(e){return new rt(this.root,e,this.comparator,!0)}}]),e}(),rt=function(){function e(t,n,r,i){Object(p.a)(this,e),this.isReverse=i,this.nodeStack=[];for(var a=1;!t.isEmpty();)if(a=n?r(t.key,n):1,n&&i&&(a*=-1),a<0)t=this.isReverse?t.left:t.right;else{if(0===a){this.nodeStack.push(t);break}this.nodeStack.push(t),t=this.isReverse?t.right:t.left}}return Object(v.a)(e,[{key:"getNext",value:function(){var e=this.nodeStack.pop(),t={key:e.key,value:e.value};if(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}},{key:"hasNext",value:function(){return this.nodeStack.length>0}},{key:"peek",value:function(){if(0===this.nodeStack.length)return null;var e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}]),e}(),it=function(){function e(t,n,r,i,a){Object(p.a)(this,e),this.key=t,this.value=n,this.color=null!=r?r:e.RED,this.left=null!=i?i:e.EMPTY,this.right=null!=a?a:e.EMPTY,this.size=this.left.size+1+this.right.size}return Object(v.a)(e,[{key:"copy",value:function(t,n,r,i,a){return new e(null!=t?t:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=i?i:this.left,null!=a?a:this.right)}},{key:"isEmpty",value:function(){return!1}},{key:"inorderTraversal",value:function(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}},{key:"reverseTraversal",value:function(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}},{key:"min",value:function(){return this.left.isEmpty()?this:this.left.min()}},{key:"minKey",value:function(){return this.min().key}},{key:"maxKey",value:function(){return this.right.isEmpty()?this.key:this.right.maxKey()}},{key:"insert",value:function(e,t,n){var r=this,i=n(e,r.key);return(r=i<0?r.copy(null,null,null,r.left.insert(e,t,n),null):0===i?r.copy(null,t,null,null,null):r.copy(null,null,null,null,r.right.insert(e,t,n))).fixUp()}},{key:"removeMin",value:function(){if(this.left.isEmpty())return e.EMPTY;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()}},{key:"remove",value:function(t,n){var r,i=this;if(n(t,i.key)<0)i.left.isEmpty()||i.left.isRed()||i.left.left.isRed()||(i=i.moveRedLeft()),i=i.copy(null,null,null,i.left.remove(t,n),null);else{if(i.left.isRed()&&(i=i.rotateRight()),i.right.isEmpty()||i.right.isRed()||i.right.left.isRed()||(i=i.moveRedRight()),0===n(t,i.key)){if(i.right.isEmpty())return e.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.removeMin())}i=i.copy(null,null,null,null,i.right.remove(t,n))}return i.fixUp()}},{key:"isRed",value:function(){return this.color}},{key:"fixUp",value:function(){var e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e}},{key:"moveRedLeft",value:function(){var e=this.colorFlip();return e.right.left.isRed()&&(e=(e=(e=e.copy(null,null,null,null,e.right.rotateRight())).rotateLeft()).colorFlip()),e}},{key:"moveRedRight",value:function(){var e=this.colorFlip();return e.left.left.isRed()&&(e=(e=e.rotateRight()).colorFlip()),e}},{key:"rotateLeft",value:function(){var t=this.copy(null,null,e.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)}},{key:"rotateRight",value:function(){var t=this.copy(null,null,e.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)}},{key:"colorFlip",value:function(){var e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)}},{key:"checkMaxDepth",value:function(){var e=this.check();return Math.pow(2,e)<=this.size+1}},{key:"check",value:function(){if(this.isRed()&&this.left.isRed())throw A();if(this.right.isRed())throw A();var e=this.left.check();if(e!==this.right.check())throw A();return e+(this.isRed()?0:1)}}]),e}();
2it.EMPTY=null,it.RED=!0,it.BLACK=!1,it.EMPTY=new(function(){function e(){Object(p.a)(this,e),this.size=0}return Object(v.a)(e,[{key:"key",get:function(){throw A()}},{key:"value",get:function(){throw A()}},{key:"color",get:function(){throw A()}},{key:"left",get:function(){throw A()}},{key:"right",get:function(){throw A()}},{key:"copy",value:function(e,t,n,r,i){return this}},{key:"insert",value:function(e,t,n){return new it(e,t)}},{key:"remove",value:function(e,t){return this}},{key:"isEmpty",value:function(){return!0}},{key:"inorderTraversal",value:function(e){return!1}},{key:"reverseTraversal",value:function(e){return!1}},{key:"minKey",value:function(){return null}},{key:"maxKey",value:function(){return null}},{key:"isRed",value:function(){return!1}},{key:"checkMaxDepth",value:function(){return!0}},{key:"check",value:function(){return 0}}]),e}());var at=function(){function e(t){Object(p.a)(this,e),this.comparator=t,this.data=new nt(this.comparator)}return Object(v.a)(e,[{key:"has",value:function(e){return null!==this.data.get(e)}},{key:"first",value:function(){return this.data.minKey()}},{key:"last",value:function(){return this.data.maxKey()}},{key:"size",get:function(){return this.data.size}},{key:"indexOf",value:function(e){return this.data.indexOf(e)}},{key:"forEach",value:function(e){this.data.inorderTraversal((function(t,n){return e(t),!1}))}},{key:"forEachInRange",value:function(e,t){for(var n=this.data.getIteratorFrom(e[0]);n.hasNext();){var r=n.getNext();if(this.comparator(r.key,e[1])>=0)return;t(r.key)}}},{key:"forEachWhile",value:function(e,t){var n;for(n=void 0!==t?this.data.getIteratorFrom(t):this.data.getIterator();n.hasNext();)if(!e(n.getNext().key))return}},{key:"firstAfterOrEqual",value:function(e){var t=this.data.getIteratorFrom(e);return t.hasNext()?t.getNext().key:null}},{key:"getIterator",value:function(){return new ot(this.data.getIterator())}},{key:"getIteratorFrom",value:function(e){return new ot(this.data.getIteratorFrom(e))}},{key:"add",value:function(e){return this.copy(this.data.remove(e).insert(e,!0))}},{key:"delete",value:function(e){return this.has(e)?this.copy(this.data.remove(e)):this}},{key:"isEmpty",value:function(){return this.data.isEmpty()}},{key:"unionWith",value:function(e){var t=this;return t.size<e.size&&(t=e,e=this),e.forEach((function(e){t=t.add(e)})),t}},{key:"isEqual",value:function(t){if(!(t instanceof e))return!1;if(this.size!==t.size)return!1;for(var n=this.data.getIterator(),r=t.data.getIterator();n.hasNext();){var i=n.getNext().key,a=r.getNext().key;if(0!==this.comparator(i,a))return!1}return!0}},{key:"toArray",value:function(){var e=[];return this.forEach((function(t){e.push(t)})),e}},{key:"toString",value:function(){var e=[];return this.forEach((function(t){return e.push(t)})),"SortedSet("+e.toString()+")"}},{key:"copy",value:function(t){var n=new e(this.comparator);return n.data=t,n}}]),e}(),ot=function(){function e(t){Object(p.a)(this,e),this.iter=t}return Object(v.a)(e,[{key:"getNext",value:function(){return this.iter.getNext().key}},{key:"hasNext",value:function(){return this.iter.hasNext()}}]),e}();function ut(e){return e.hasNext()?e.getNext():void 0}var st=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;Object(p.a)(this,e),this.path=t,this.collectionGroup=n,this.orderBy=r,this.filters=i,this.limit=a,this.startAt=o,this.endAt=u,this.P=null};function ct(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;return new st(e,t,n,r,i,a,o)}function lt(e){var t=P(e);
2if(null===t.P){var n=t.path.canonicalString();null!==t.collectionGroup&&(n+="|cg:"+t.collectionGroup),n+="|f:",n+=t.filters.map((function(e){return(t=e).field.canonicalString()+t.op.toString()+Ce(t.value);var t})).join(","),n+="|ob:",n+=t.orderBy.map((function(e){return function(e){return e.field.canonicalString()+e.dir}(e)})).join(","),be(t.limit)||(n+="|l:",n+=t.limit),t.startAt&&(n+="|lb:",n+=t.startAt.inclusive?"b:":"a:",n+=t.startAt.position.map((function(e){return Ce(e)})).join(",")),t.endAt&&(n+="|ub:",n+=t.endAt.inclusive?"a:":"b:",n+=t.endAt.position.map((function(e){return Ce(e)})).join(",")),t.P=n}return t.P}function ft(e,t){if(e.limit!==t.limit)return!1;if(e.orderBy.length!==t.orderBy.length)return!1;for(var n=0;n<e.orderBy.length;n++)if(!St(e.orderBy[n],t.orderBy[n]))return!1;if(e.filters.length!==t.filters.length)return!1;for(var r=0;r<e.filters.length;r++)if(i=e.filters[r],a=t.filters[r],i.op!==a.op||!i.field.isEqual(a.field)||!Ee(i.value,a.value))return!1;var i,a;return e.collectionGroup===t.collectionGroup&&!!e.path.isEqual(t.path)&&!!It(e.startAt,t.startAt)&&It(e.endAt,t.endAt)}function ht(e){return Oe.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}function dt(e,t){return e.filters.filter((function(e){return e instanceof mt&&e.field.isEqual(t)}))}function pt(e,t,n){var r,i=_e,a=!0,o=Object(u.a)(dt(e,t));try{for(o.s();!(r=o.n()).done;){var s=r.value,c=_e,l=!0;switch(s.op){case"<":case"<=":c=Ve(s.value);break;case"==":case"in":case">=":c=s.value;break;case">":c=s.value,l=!1;break;case"!=":case"not-in":c=_e}ze({value:i,inclusive:a},{value:c,inclusive:l})<0&&(i=c,a=l)}}catch(d){o.e(d)}finally{o.f()}if(null!==n)for(var f=0;f<e.orderBy.length;++f)if(e.orderBy[f].field.isEqual(t)){var h=n.position[f];ze({value:i,inclusive:a},{value:h,inclusive:n.inclusive})<0&&(i=h,a=n.inclusive);break}return{value:i,inclusive:a}}function vt(e,t,n){var r,i=xe,a=!0,o=Object(u.a)(dt(e,t));try{for(o.s();!(r=o.n()).done;){var s=r.value,c=xe,l=!0;switch(s.op){case">=":case">":c=Be(s.value),l=!1;break;case"==":case"in":case"<=":c=s.value;break;case"<":c=s.value,l=!1;break;case"!=":case"not-in":c=xe}qe({value:i,inclusive:a},{value:c,inclusive:l})>0&&(i=c,a=l)}}catch(d){o.e(d)}finally{o.f()}if(null!==n)for(var f=0;f<e.orderBy.length;++f)if(e.orderBy[f].field.isEqual(t)){var h=n.position[f];qe({value:i,inclusive:a},{value:h,inclusive:n.inclusive})>0&&(i=h,a=n.inclusive);break}return{value:i,inclusive:a}}var mt=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r,i){var a;return Object(p.a)(this,n),(a=t.call(this)).field=e,a.op=r,a.value=i,a}return Object(v.a)(n,[{key:"matches",value:function(e){var t=e.data.field(this.field);return"!="===this.op?null!==t&&this.v(Te(t,this.value)):null!==t&&je(this.value)===je(t)&&this.v(Te(t,this.value))}},{key:"v",value:function(e){switch(this.op){case"<":return e<0;case"<=":return e<=0;case"==":return 0===e;case"!=":return 0!==e;case">":return e>0;case">=":return e>=0;default:return A()}}},{key:"S",value:function(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}}],[{key:"create",value:function(e,t,r){return e.isKeyField()?"in"===t||"not-in"===t?this.V(e,t,r):new yt(e,t,r):"array-contains"===t?new wt(e,r):"in"===t?new Ot(e,r):"not-in"===t?new xt(e,r):"array-contains-any"===t?new _t(e,r):new n(e,t,r)}},{key:"V",value:function(e,t,n){return"in"===t?new gt(e,n):new bt(e,n)}}]),n}(function(){return function e(){Object(p.a)(this,e)}}()),yt=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r,i){var a;return Object(p.a)(this,n),(a=t.call(this,e,r,i)).key=Oe.fromName(i.referenceValue),a}return Object(v.a)(n,[{key:"matches",value:function(e){var t=Oe.comparator(e.key,this.key);return this.v(t)}}]),n}(mt),gt=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r){var i;return Object(p.a)(this,n),(i=t.call(this,e,"in",r)).keys=kt("in",r),i}return Object(v.a)(n,[{key:"matches",value:function(e){return this.keys.some((function(t){return t.isEqual(e.key)}))}}]),n}(mt),bt=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r){var i;return Object(p.a)(this,n),(i=t.call(this,e,"not-in",r)).keys=kt("not-in",r),i}return Object(v.a)(n,[{key:"matches",value:function(e){return!this.keys.some((function(t){return t.isEqual(e.key)}))}}]),n}(mt);function kt(e,t){var n;return((null===(n=t.arrayValue)||void 0===n?void 0:n.values)||[]).map((function(e){return Oe.fromName(e.referenceValue)}))}var wt=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r){return Object(p.a)(this,n),t.call(this,e,"array-contains",r)}return Object(v.a)(n,[{key:"matches",value:function(e){var t=e.data.field(this.field);return Pe(t)&&Se(t.arrayValue,this.value)}}]),n}(mt),Ot=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r){return Object(p.a)(this,n),t.call(this,e,"in",r)}return Object(v.a)(n,[{key:"matches",value:function(e){var t=e.data.field(this.field);return null!==t&&Se(this.value.arrayValue,t)}}]),n}(mt),xt=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r){return Object(p.a)(this,n),t.call(this,e,"not-in",r)}return Object(v.a)(n,[{key:"matches",value:function(e){if(Se(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;var t=e.data.field(this.field);return null!==t&&!Se(this.value.arrayValue,t)}}]),n}(mt),_t=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r){return Object(p.a)(this,n),t.call(this,e,"array-contains-any",r)}return Object(v.a)(n,[{key:"matches",value:function(e){var t=this,n=e.data.field(this.field);return!(!Pe(n)||!n.arrayValue.values)&&n.arrayValue.values.some((function(e){return Se(t.value.arrayValue,e)}))}}]),n}(mt),jt=function e(t,n){Object(p.a)(this,e),this.position=t,this.inclusive=n},Et=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc";Object(p.a)(this,e),this.field=t,this.dir=n};function St(e,t){return e.dir===t.dir&&e.field.isEqual(t.field)}function Tt(e,t,n){for(var r=0,i=0;i<e.position.length;i++){var a=t[i],o=e.position[i];if(r=a.field.isKeyField()?Oe.comparator(Oe.fromName(o.referenceValue),n.key):Te(o,n.data.field(a.field)),"desc"===a.dir&&(r*=-1),0!==r)break}return r}function It(e,t){if(null===e)return null===t;if(null===t)return!1;if(e.inclusive!==t.inclusive||e.position.length!==t.position.length)return!1;for(var n=0;n<e.position.length;n++)if(!Ee(e.position[n],t.position[n]))return!1;return!0}var Ct=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"F",u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null;Object(p.a)(this,e),this.path=t,this.collectionGroup=n,this.explicitOrderBy=r,this.filters=i,this.limit=a,this.limitType=o,this.startAt=u,this.endAt=s,this.D=null,this.C=null,this.startAt,this.endAt};function At(e,t,n,r,i,a,o,u){return new Ct(e,t,n,r,i,a,o,u)}function Rt(e){return new Ct(e)}function Nt(e){return e.explicitOrderBy.length>0?e.explicitOrderBy[0].field:null}function Pt(e){var t,n=Object(u.a)(e.filters);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r.S())return r.field}}catch(i){n.e(i)}finally{n.f()}return null}function Dt(e){return null!==e.collectionGroup}function Lt(e){var t=P(e);
2if(null===t.D){t.D=[];var n=Pt(t),r=Nt(t);if(null!==n&&null===r)n.isKeyField()||t.D.push(new Et(n)),t.D.push(new Et(oe.keyField(),"asc"));else{var i,a=!1,o=Object(u.a)(t.explicitOrderBy);try{for(o.s();!(i=o.n()).done;){var s=i.value;t.D.push(s),s.field.isKeyField()&&(a=!0)}}catch(l){o.e(l)}finally{o.f()}if(!a){var c=t.explicitOrderBy.length>0?t.explicitOrderBy[t.explicitOrderBy.length-1].dir:"asc";t.D.push(new Et(oe.keyField(),c))}}}return t.D}function Mt(e){var t=P(e);if(!t.C)if("F"===t.limitType)t.C=ct(t.path,t.collectionGroup,Lt(t),t.filters,t.limit,t.startAt,t.endAt);else{var n,r=[],i=Object(u.a)(Lt(t));try{for(i.s();!(n=i.n()).done;){var a=n.value,o="desc"===a.dir?"asc":"desc";r.push(new Et(a.field,o))}}catch(l){i.e(l)}finally{i.f()}var s=t.endAt?new jt(t.endAt.position,t.endAt.inclusive):null,c=t.startAt?new jt(t.startAt.position,t.startAt.inclusive):null;t.C=ct(t.path,t.collectionGroup,r,t.filters,t.limit,s,c)}return t.C}function Ft(e,t,n){return new Ct(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),t,n,e.startAt,e.endAt)}function Ut(e,t){return ft(Mt(e),Mt(t))&&e.limitType===t.limitType}function Vt(e){return"".concat(lt(Mt(e)),"|lt:").concat(e.limitType)}function Bt(e){return"Query(target=".concat(function(e){var t=e.path.canonicalString();return null!==e.collectionGroup&&(t+=" collectionGroup="+e.collectionGroup),e.filters.length>0&&(t+=", filters: [".concat(e.filters.map((function(e){return"".concat((t=e).field.canonicalString()," ").concat(t.op," ").concat(Ce(t.value));var t})).join(", "),"]")),be(e.limit)||(t+=", limit: "+e.limit),e.orderBy.length>0&&(t+=", orderBy: [".concat(e.orderBy.map((function(e){return function(e){return"".concat(e.field.canonicalString()," (").concat(e.dir,")")}(e)})).join(", "),"]")),e.startAt&&(t+=", startAt: ",t+=e.startAt.inclusive?"b:":"a:",t+=e.startAt.position.map((function(e){return Ce(e)})).join(",")),e.endAt&&(t+=", endAt: ",t+=e.endAt.inclusive?"a:":"b:",t+=e.endAt.position.map((function(e){return Ce(e)})).join(",")),"Target(".concat(t,")")}(Mt(e)),"; limitType=").concat(e.limitType,")")}function zt(e,t){return t.isFoundDocument()&&function(e,t){var n=t.key.path;return null!==e.collectionGroup?t.key.hasCollectionId(e.collectionGroup)&&e.path.isPrefixOf(n):Oe.isDocumentKey(e.path)?e.path.isEqual(n):e.path.isImmediateParentOf(n)}(e,t)&&function(e,t){var n,r=Object(u.a)(e.explicitOrderBy);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(!i.field.isKeyField()&&null===t.data.field(i.field))return!1}}catch(a){r.e(a)}finally{r.f()}return!0}(e,t)&&function(e,t){var n,r=Object(u.a)(e.filters);try{for(r.s();!(n=r.n()).done;){if(!n.value.matches(t))return!1}}catch(i){r.e(i)}finally{r.f()}return!0}(e,t)&&function(e,t){return!(e.startAt&&!function(e,t,n){var r=Tt(e,t,n);return e.inclusive?r<=0:r<0}(e.startAt,Lt(e),t))&&!(e.endAt&&!function(e,t,n){var r=Tt(e,t,n);return e.inclusive?r>=0:r>0}(e.endAt,Lt(e),t))}(e,t)}function qt(e){return e.collectionGroup||(e.path.length%2==1?e.path.lastSegment():e.path.get(e.path.length-2))}function Wt(e){return function(t,n){var r,i=!1,a=Object(u.a)(Lt(e));try{for(a.s();!(r=a.n()).done;){var o=r.value,s=Ht(o,t,n);if(0!==s)return s;i=i||o.field.isKeyField()}}catch(c){a.e(c)}finally{a.f()}return 0}}function Ht(e,t,n){var r=e.field.isKeyField()?Oe.comparator(t.key,n.key):function(e,t,n){var r=t.data.field(e),i=n.data.field(e);return null!==r&&null!==i?Te(r,i):A()}(e.field,t,n);switch(e.dir){case"asc":return r;case"desc":return-1*r;default:return A()}}function Kt(e,t){if(e.N){if(isNaN(t))return{doubleValue:"NaN"};if(t===1/0)return{doubleValue:"Infinity"};if(t===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:ke(t)?"-0":t}}function Gt(e){return{integerValue:""+e}}function $t(e,t){return we(t)?Gt(t):Kt(e,t)}var Qt=function e(){Object(p.a)(this,e),this._=void 0};function Yt(e,t,n){return e instanceof Zt?function(e,t){var n={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:e.seconds,nanos:e.nanoseconds}}}};return t&&(n.fields.__previous_value__=t),{mapValue:n}}(n,t):e instanceof en?tn(e,t):e instanceof nn?rn(e,t):function(e,t){var n=Jt(e,t),r=on(n)+on(e.k);return Ne(n)&&Ne(e.k)?Gt(r):Kt(e.M,r)}(e,t)}function Xt(e,t,n){return e instanceof en?tn(e,t):e instanceof nn?rn(e,t):n}function Jt(e,t){return e instanceof an?Ne(n=t)||function(e){return!!e&&"doubleValue"in e}(n)?t:{integerValue:0}:null;var n}var Zt=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(){return Object(p.a)(this,n),t.apply(this,arguments)}return n}(Qt),en=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e){var r;return Object(p.a)(this,n),(r=t.call(this)).elements=e,r}return n}(Qt);function tn(e,t){var n,r=un(t),i=Object(u.a)(e.elements);try{var a=function(){var e=n.value;r.some((function(t){return Ee(t,e)}))||r.push(e)};for(i.s();!(n=i.n()).done;)a()}catch(o){i.e(o)}finally{i.f()}return{arrayValue:{values:r}}}var nn=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e){var r;return Object(p.a)(this,n),(r=t.call(this)).elements=e,r}return n}(Qt);function rn(e,t){var n,r=un(t),i=Object(u.a)(e.elements);try{var a=function(){var e=n.value;r=r.filter((function(t){return!Ee(t,e)}))};for(i.s();!(n=i.n()).done;)a()}catch(o){i.e(o)}finally{i.f()}return{arrayValue:{values:r}}}var an=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r){var i;return Object(p.a)(this,n),(i=t.call(this)).M=e,i.k=r,i}return n}(Qt);function on(e){return he(e.integerValue||e.doubleValue)}function un(e){return Pe(e)&&e.arrayValue.values?e.arrayValue.values.slice():[]}var sn=function e(t,n){Object(p.a)(this,e),this.field=t,this.transform=n};var cn=function e(t,n){Object(p.a)(this,e),this.version=t,this.transformResults=n},ln=function(){function e(t,n){Object(p.a)(this,e),this.updateTime=t,this.exists=n}return Object(v.a)(e,[{key:"isNone",get:function(){return void 0===this.updateTime&&void 0===this.exists}},{key:"isEqual",value:function(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}}],[{key:"none",value:function(){return new e}},{key:"exists",value:function(t){return new e(void 0,t)}},{key:"updateTime",value:function(t){return new e(t)}}]),e}();function fn(e,t){return void 0!==e.updateTime?t.isFoundDocument()&&t.version.isEqual(e.updateTime):void 0===e.exists||e.exists===t.isFoundDocument()}var hn=function e(){Object(p.a)(this,e)};function dn(e,t,n){e instanceof gn?function(e,t,n){var r=e.value.clone(),i=wn(e.fieldTransforms,t,n.transformResults);r.setAll(i),t.convertToFoundDocument(n.version,r).setHasCommittedMutations()}
2(e,t,n):e instanceof bn?function(e,t,n){if(fn(e.precondition,t)){var r=wn(e.fieldTransforms,t,n.transformResults),i=t.data;i.setAll(kn(e)),i.setAll(r),t.convertToFoundDocument(n.version,i).setHasCommittedMutations()}else t.convertToUnknownDocument(n.version)}(e,t,n):function(e,t,n){t.convertToNoDocument(n.version).setHasCommittedMutations()}(0,t,n)}function pn(e,t,n){e instanceof gn?function(e,t,n){if(fn(e.precondition,t)){var r=e.value.clone(),i=On(e.fieldTransforms,n,t);r.setAll(i),t.convertToFoundDocument(yn(t),r).setHasLocalMutations()}}(e,t,n):e instanceof bn?function(e,t,n){if(fn(e.precondition,t)){var r=On(e.fieldTransforms,n,t),i=t.data;i.setAll(kn(e)),i.setAll(r),t.convertToFoundDocument(yn(t),i).setHasLocalMutations()}}(e,t,n):function(e,t){fn(e.precondition,t)&&t.convertToNoDocument(Z.min())}(e,t)}function vn(e,t){var n,r=null,i=Object(u.a)(e.fieldTransforms);try{for(i.s();!(n=i.n()).done;){var a=n.value,o=t.data.field(a.field),s=Jt(a.transform,o||null);null!=s&&(null==r&&(r=We.empty()),r.set(a.field,s))}}catch(c){i.e(c)}finally{i.f()}return r||null}function mn(e,t){return e.type===t.type&&!!e.key.isEqual(t.key)&&!!e.precondition.isEqual(t.precondition)&&!!function(e,t){return void 0===e&&void 0===t||!(!e||!t)&&Y(e,t,(function(e,t){return function(e,t){return e.field.isEqual(t.field)&&function(e,t){return e instanceof en&&t instanceof en||e instanceof nn&&t instanceof nn?Y(e.elements,t.elements,Ee):e instanceof an&&t instanceof an?Ee(e.k,t.k):e instanceof Zt&&t instanceof Zt}(e.transform,t.transform)}(e,t)}))}(e.fieldTransforms,t.fieldTransforms)&&(0===e.type?e.value.isEqual(t.value):1!==e.type||e.data.isEqual(t.data)&&e.fieldMask.isEqual(t.fieldMask))}function yn(e){return e.isFoundDocument()?e.version:Z.min()}var gn=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r,i){var a,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return Object(p.a)(this,n),(a=t.call(this)).key=e,a.value=r,a.prec
2ondition=i,a.fieldTransforms=o,a.type=0,a}return n}(hn),bn=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r,i,a){var o,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];return Object(p.a)(this,n),(o=t.call(this)).key=e,o.data=r,o.fieldMask=i,o.precondition=a,o.fieldTransforms=u,o.type=1,o}return n}(hn);function kn(e){var t=new Map;return e.fieldMask.fields.forEach((function(n){if(!n.isEmpty()){var r=e.data.field(n);t.set(n,r)}})),t}function wn(e,t,n){var r=new Map;R(e.length===n.length);for(var i=0;i<n.length;i++){var a=e[i],o=a.transform,u=t.data.field(a.field);r.set(a.field,Xt(o,u,n[i]))}return r}function On(e,t,n){var r,i=new Map,a=Object(u.a)(e);try{for(a.s();!(r=a.n()).done;){var o=r.value,s=o.transform,c=n.data.field(o.field);i.set(o.field,Yt(s,c,t))}}catch(l){a.e(l)}finally{a.f()}return i}var xn,_n,jn=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r){var i;return Object(p.a)(this,n),(i=t.call(this)).key=e,i.precondition=r,i.type=2,i.fieldTransforms=[],i}return n}(hn),En=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r){var i;return Object(p.a)(this,n),(i=t.call(this)).key=e,i.precondition=r,i.type=3,i.fieldTransforms=[],i}return n}(hn),Sn=function e(t){Object(p.a)(this,e),this.count=t};function Tn(e){switch(e){default:return A();case D.CANCELLED:case D.UNKNOWN:case D.DEADLINE_EXCEEDED:case D.RESOURCE_EXHAUSTED:case D.INTERNAL:case D.UNAVAILABLE:case D.UNAUTHENTICATED:return!1;case D.INVALID_ARGUMENT:case D.NOT_FOUND:case D.ALREADY_EXISTS:case D.PERMISSION_DENIED:case D.FAILED_PRECONDITION:case D.ABORTED:case D.OUT_OF_RANGE:case D.UNIMPLEMENTED:case D.DATA_LOSS:return!0}}function In(e){if(void 0===e)return T("GRPC error has no .code"),D.UNKNOWN;switch(e){case xn.OK:return D.OK;case xn.CANCELLED:return D.CANCELLED;case xn.UNKNOWN:return D.UNKNOWN;case xn.DEADLINE_EXCEEDED:return D.DEADLINE_EXCEEDED;case xn.RESOURCE_EXHAUSTED:return D.RESOURCE_EXHAUSTED;case xn.INTERNAL:return D.INTERNAL;case xn.UNAVAILABLE:return D.UNAVAILABLE;case xn.UNAUTHENTICATED:return D.UNAUTHENTICATED;case xn.INVALID_ARGUMENT:return D.INVALID_ARGUMENT;case xn.NOT_FOUND:return D.NOT_FOUND;case xn.ALREADY_EXISTS:return D.ALREADY_EXISTS;case xn.PERMISSION_DENIED:return D.PERMISSION_DENIED;case xn.FAILED_PRECONDITION:return D.FAILED_PRECONDITION;case xn.ABORTED:return D.ABORTED;case xn.OUT_OF_RANGE:return D.OUT_OF_RANGE;case xn.UNIMPLEMENTED:return D.UNIMPLEMENTED;case xn.DATA_LOSS:return D.DATA_LOSS;default:return A()}}(_n=xn||(xn={}))[_n.OK=0]="OK",_n[_n.CANCELLED=1]="CANCELLED",_n[_n.UNKNOWN=2]="UNKNOWN",_n[_n.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",_n[_n.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",_n[_n.NOT_FOUND=5]="NOT_FOUND",_n[_n.ALREADY_EXISTS=6]="ALREADY_EXISTS",_n[_n.PERMISSION_DENIED=7]="PERMISSION_DENIED",_n[_n.UNAUTHENTICATED=16]="UNAUTHENTICATED",_n[_n.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",_n[_n.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",_n[_n.ABORTED=10]="ABORTED",_n[_n.OUT_OF_RANGE=11]="OUT_OF_RANGE",_n[_n.UNIMPLEMENTED=12]="UNIMPLEMENTED",_n[_n.INTERNAL=13]="INTERNAL",_n[_n.UNAVAILABLE=14]="UNAVAILABLE",_n[_n.DATA_LOSS=15]="DATA_LOSS";var Cn=function(){function e(t,n){Object(p.a)(this,e),this.mapKeyFn=t,this.equalsFn=n,this.inner={},this.innerSize=0}return Object(v.a)(e,[{key:"get",value:function(e){var t=this.mapKeyFn(e),n=this.inner[t];if(void 0!==n){var r,i=Object(u.a)(n);try{for(i.s();!(r=i.n()).done;){var a=Object(o.a)(r.value,2),s=a[0],c=a[1];if(this.equalsFn(s,e))return c}}catch(l){i.e(l)}finally{i.f()}}}},{key:"has",value:function(e){return void 0!==this.get(e)}},{key:"set",value:function(e,t){var n=this.mapKeyFn(e),r=this.inner[n];if(void 0===r)return this.inner[n]=[[e,t]],void this.innerSize++;for(var i=0;i<r.length;i++)if(this.equalsFn(r[i][0],e))return void(r[i]=[e,t]);r.push([e,t]),this.innerSize++}},{key:"delete",value:function(e){var t=this.mapKeyFn(e),n=this.inner[t];if(void 0===n)return!1;for(var r=0;r<n.length;r++)if(this.equalsFn(n[r][0],e))return 1===n.length?delete this.inner[t]:n.splice(r,1),this.innerSize--,!0;return!1}},{key:"forEach",value:function(e){te(this.inner,(function(t,n){var r,i=Object(u.a)(n);try{for(i.s();!(r=i.n()).done;){var a=Object(o.a)(r.value,2),s=a[0],c=a[1];e(s,c)}}catch(l){i.e(l)}finally{i.f()}}))}},{key:"isEmpty",value:function(){return ne(this.inner)}},{key:"size",value:function(){return this.innerSize}}]),e}(),An=new nt(Oe.comparator);function Rn(){return An}var Nn=new nt(Oe.comparator);function Pn(){for(var e=Nn,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var i=0,a=n;i<a.length;i++){var o=a[i];e=e.insert(o.key,o)}return e}function Dn(){return new Cn((function(e){return e.toString()}),(function(e,t){return e.isEqual(t)}))}var Ln=new nt(Oe.comparator),Mn=new at(Oe.comparator);function Fn(){for(var e=Mn,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var i=0,a=n;i<a.length;i++){var o=a[i];e=e.add(o)}return e}var Un=new at(Q);function Vn(){return Un}var Bn=function(){function e(t,n,r,i,a){Object(p.a)(this,e),this.snapshotVersion=t,this.targetChanges=n,this.targetMismatches=r,this.documentUpdates=i,this.resolvedLimboDocuments=a}return Object(v.a)(e,null,[{key:"createSynthesizedRemoteEventForCurrentChange",value:function(t,n){var r=new Map;return r.set(t,zn.createSynthesizedTargetChangeForCurrentChange(t,n)),new e(Z.min(),r,Vn(),Rn(),Fn())}}]),e}(),zn=function(){function e(t,n,r,i,a){Object(p.a)(this,e),this.resumeToken=t,this.current=n,this.addedDocuments=r,this.modifiedDocuments=i,this.removedDocuments=a}return Object(v.a)(e,null,[{key:"createSynthesizedTargetChangeForCurrentChange",value:function(t,n){return new e(ce.EMPTY_BYTE_STRING,n,Fn(),Fn(),Fn())}}]),e}(),qn=function e(t,n,r,i){Object(p.a)(this,e),this.O=t,this.removedTargetIds=n,this.key=r,this.F=i},Wn=function e(t,n){Object(p.a)(this,e),this.targetId=t,this.$=n},Hn=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ce.EMPTY_BYTE_STRING,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;Object(p.a)(this,e),this.state=t,this.targetIds=n,this.resumeToken=r,this.cause=i},Kn=function(){function e(){Object(p.a)(this,e),this.B=0,this.L=Qn(),this.U=ce.EMPTY_BYTE_STRING,this.q=!1,this.K=!0}return Object(v.a)(e,[{key:"current",get:function(){return this.q}},{key:"resumeToken",get:function(){return this.U}},{key:"G",get:function(){return 0!==this.B}},{key:"j",get:function(){return this.K}},{key:"W",value:function(e){e.approximateByteSize()>0&&(this.K=!0,this.U=e)}},{key:"H",value:function(){var e=Fn(),t=Fn(),n=Fn();
2return this.L.forEach((function(r,i){switch(i){case 0:e=e.add(r);break;case 2:t=t.add(r);break;case 1:n=n.add(r);break;default:A()}})),new zn(this.U,this.q,e,t,n)}},{key:"J",value:function(){this.K=!1,this.L=Qn()}},{key:"Y",value:function(e,t){this.K=!0,this.L=this.L.insert(e,t)}},{key:"X",value:function(e){this.K=!0,this.L=this.L.remove(e)}},{key:"Z",value:function(){this.B+=1}},{key:"tt",value:function(){this.B-=1}},{key:"et",value:function(){this.K=!0,this.q=!0}}]),e}(),Gn=function(){function e(t){Object(p.a)(this,e),this.nt=t,this.st=new Map,this.it=Rn(),this.rt=$n(),this.ot=new at(Q)}return Object(v.a)(e,[{key:"ut",value:function(e){var t,n=Object(u.a)(e.O);try{for(n.s();!(t=n.n()).done;){var r=t.value;e.F&&e.F.isFoundDocument()?this.at(r,e.F):this.ct(r,e.key,e.F)}}catch(s){n.e(s)}finally{n.f()}var i,a=Object(u.a)(e.removedTargetIds);try{for(a.s();!(i=a.n()).done;){var o=i.value;this.ct(o,e.key,e.F)}}catch(s){a.e(s)}finally{a.f()}}},{key:"ht",value:function(e){var t=this;this.forEachTarget(e,(function(n){var r=t.lt(n);switch(e.state){case 0:t.ft(n)&&r.W(e.resumeToken);break;case 1:r.tt(),r.G||r.J(),r.W(e.resumeToken);break;case 2:r.tt(),r.G||t.removeTarget(n);break;case 3:t.ft(n)&&(r.et(),r.W(e.resumeToken));break;case 4:t.ft(n)&&(t.dt(n),r.W(e.resumeToken));break;default:A()}}))}},{key:"forEachTarget",value:function(e,t){var n=this;e.targetIds.length>0?e.targetIds.forEach(t):this.st.forEach((function(e,r){n.ft(r)&&t(r)}))}},{key:"_t",value:function(e){var t=e.targetId,n=e.$.count,r=this.wt(t);if(r){var i=r.target;if(ht(i))if(0===n){var a=new Oe(i.path);this.ct(t,a,Ke.newNoDocument(a,Z.min()))}else R(1===n);else this.gt(t)!==n&&(this.dt(t),this.ot=this.ot.add(t))}}},{key:"yt",value:function(e){var t=this,n=new Map;this.st.forEach((function(r,i){var a=t.wt(i);if(a){if(r.current&&ht(a.target)){var o=new Oe(a.target.path);null!==t.it.get(o)||t.It(i,o)||t.ct(i,o,Ke.newNoDocument(o,e))}r.j&&(n.set(i,r.H()),r.J())}}));var r=Fn();this.rt.forEach((function(e,n){var i=!0;n.forEachWhile((function(e){var n=t.wt(e);return!n||2===n.purpose||(i=!1,!1)})),i&&(r=r.add(e))})),this.it.forEach((function(t,n){return n.setReadTime(e)}));var i=new Bn(e,n,this.ot,this.it,r);return this.it=Rn(),this.rt=$n(),this.ot=new at(Q),i}},{key:"at",value:function(e,t){if(this.ft(e)){var n=this.It(e,t.key)?2:0;this.lt(e).Y(t.key,n),this.it=this.it.insert(t.key,t),this.rt=this.rt.insert(t.key,this.Tt(t.key).add(e))}}},{key:"ct",value:function(e,t,n){if(this.ft(e)){var r=this.lt(e);this.It(e,t)?r.Y(t,1):r.X(t),this.rt=this.rt.insert(t,this.Tt(t).delete(e)),n&&(this.it=this.it.insert(t,n))}}},{key:"removeTarget",value:function(e){this.st.delete(e)}},{key:"gt",value:function(e){var t=this.lt(e).H();return this.nt.getRemoteKeysForTarget(e).size+t.addedDocuments.size-t.removedDocuments.size}},{key:"Z",value:function(e){this.lt(e).Z()}},{key:"lt",value:function(e){var t=this.st.get(e);return t||(t=new Kn,this.st.set(e,t)),t}},{key:"Tt",value:function(e){var t=this.rt.get(e);return t||(t=new at(Q),this.rt=this.rt.insert(e,t)),t}},{key:"ft",value:function(e){var t=null!==this.wt(e);return t||S("WatchChangeAggregator","Detected inactive target",e),t}},{key:"wt",value:function(e){var t=this.st.get(e);return t&&t.G?null:this.nt.Et(e)}},{key:"dt",value:function(e){var t=this;this.st.set(e,new Kn),this.nt.getRemoteKeysForTarget(e).forEach((function(n){t.ct(e,n,null)}))}},{key:"It",value:function(e,t){return this.nt.getRemoteKeysForTarget(e).has(t)}}]),e}();function $n(){return new nt(Oe.comparator)}function Qn(){return new nt(Oe.comparator)}var Yn={asc:"ASCENDING",desc:"DESCENDING"},Xn={"<":"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"},Jn=function e(t,n){Object(p.a)(this,e),this.databaseId=t,this.N=n};function Zn(e,t){return e.N?"".concat(new Date(1e3*t.seconds).toISOString().replace(/\.\d*/,"").replace("Z",""),".").concat(("000000000"+t.nanoseconds).slice(-9),"Z"):{seconds:""+t.seconds,nanos:t.nanoseconds}}function er(e,t){return e.N?t.toBase64():t.toUint8Array()}function tr(e,t){return Zn(e,t.toTimestamp())}function nr(e){return R(!!e),Z.fromTimestamp(function(e){var t=fe(e);
2return new J(t.seconds,t.nanos)}(e))}function rr(e,t){return function(e){return new ie(["projects",e.projectId,"databases",e.database])}(e).child("documents").child(t).canonicalString()}function ir(e){var t=ie.fromString(e);return R(Sr(t)),t}function ar(e,t){return rr(e.databaseId,t.path)}function or(e,t){var n=ir(t);if(n.get(1)!==e.databaseId.projectId)throw new L(D.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+e.databaseId.projectId);if(n.get(3)!==e.databaseId.database)throw new L(D.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+e.databaseId.database);return new Oe(lr(n))}function ur(e,t){return rr(e.databaseId,t)}function sr(e){var t=ir(e);return 4===t.length?ie.emptyPath():lr(t)}function cr(e){return new ie(["projects",e.databaseId.projectId,"databases",e.databaseId.database]).canonicalString()}function lr(e){return R(e.length>4&&"documents"===e.get(4)),e.popFirst(5)}function fr(e,t,n){return{name:ar(e,t),fields:n.value.mapValue.fields}}function hr(e,t,n){var r=or(e,t.name),i=nr(t.updateTime),a=new We({mapValue:{fields:t.fields}}),o=Ke.newFoundDocument(r,i,a);return n&&o.setHasCommittedMutations(),n?o.setHasCommittedMutations():o}function dr(e,t){return"found"in t?function(e,t){R(!!t.found),t.found.name,t.found.updateTime;var n=or(e,t.found.name),r=nr(t.found.updateTime),i=new We({mapValue:{fields:t.found.fields}});return Ke.newFoundDocument(n,r,i)}(e,t):"missing"in t?function(e,t){R(!!t.missing),R(!!t.readTime);var n=or(e,t.missing),r=nr(t.readTime);return Ke.newNoDocument(n,r)}(e,t):A()}function pr(e,t){var n;if(t instanceof gn)n={update:fr(e,t.key,t.value)};else if(t instanceof jn)n={delete:ar(e,t.key)};else if(t instanceof bn)n={update:fr(e,t.key,t.data),updateMask:Er(t.fieldMask)};else{if(!(t instanceof En))return A();n={verify:ar(e,t.key)}}return t.fieldTransforms.length>0&&(n.updateTransforms=t.fieldTransforms.map((function(e){return function(e,t){var n=t.transform;if(n instanceof Zt)return{fieldPath:t.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(n instanceof en)return{fieldPath:t.field.canonicalString(),appendMissingElements:{values:n.elements}};if(n instanceof nn)return{fieldPath:t.field.canonicalString(),removeAllFromArray:{values:n.elements}};if(n instanceof an)return{fieldPath:t.field.canonicalString(),increment:n.k};throw A()}(0,e)}))),t.precondition.isNone||(n.currentDocument=function(e,t){return void 0!==t.updateTime?{updateTime:tr(e,t.updateTime)}:void 0!==t.exists?{exists:t.exists}:A()}(e,t.precondition)),n}function vr(e,t){var n=t.currentDocument?function(e){return void 0!==e.updateTime?ln.updateTime(nr(e.updateTime)):void 0!==e.exists?ln.exists(e.exists):ln.none()}(t.currentDocument):ln.none(),r=t.updateTransforms?t.updateTransforms.map((function(t){return function(e,t){var n=null;if("setToServerValue"in t)R("REQUEST_TIME"===t.setToServerValue),n=new Zt;else if("appendMissingElements"in t){var r=t.appendMissingElements.values||[];n=new en(r)}else if("removeAllFromArray"in t){var i=t.removeAllFromArray.values||[];n=new nn(i)}else"increment"in t?n=new an(e,t.increment):A();var a=oe.fromServerFormat(t.fieldPath);return new sn(a,n)}(e,t)})):[];if(t.update){t.update.name;var i=or(e,t.update.name),a=new We({mapValue:{fields:t.update.fields}});if(t.updateMask){var o=function(e){var t=e.fieldPaths||[];return new ue(t.map((function(e){return oe.fromServerFormat(e)})))}(t.updateMask);return new bn(i,a,o,n,r)}return new gn(i,a,n,r)}if(t.delete){var u=or(e,t.delete);return new jn(u,n)}if(t.verify){var s=or(e,t.verify);return new En(s,n)}return A()}function mr(e,t){return{documents:[ur(e,t.path)]}}function yr(e,t){var n={structuredQuery:{}},r=t.path;null!==t.collectionGroup?(n.parent=ur(e,r),n.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(n.parent=ur(e,r.popLast()),n.structuredQuery.from=[{collectionId:r.lastSegment()}]);var i=function(e){if(0!==e.length){var t=e.map((function(e){return function(e){if("=="===e.op){if(Le(e.value))return{unaryFilter:{field:Or(e.field),op:"IS_NAN"}};if(De(e.value))return{unaryFilter:{field:Or(e.field),op:"IS_NULL"}}}else if("!="===e.op){if(Le(e.value))return{unaryFilter:{field:Or(e.field),op:"IS_NOT_NA
2N"}};if(De(e.value))return{unaryFilter:{field:Or(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:Or(e.field),op:wr(e.op),value:e.value}}}(e)}));return 1===t.length?t[0]:{compositeFilter:{op:"AND",filters:t}}}}(t.filters);i&&(n.structuredQuery.where=i);var a=function(e){if(0!==e.length)return e.map((function(e){return function(e){return{field:Or(e.field),direction:kr(e.dir)}}(e)}))}(t.orderBy);a&&(n.structuredQuery.orderBy=a);var o,u=function(e,t){return e.N||be(t)?t:{value:t}}(e,t.limit);return null!==u&&(n.structuredQuery.limit=u),t.startAt&&(n.structuredQuery.startAt={before:(o=t.startAt).inclusive,values:o.position}),t.endAt&&(n.structuredQuery.endAt=function(e){return{before:!e.inclusive,values:e.position}}(t.endAt)),n}function gr(e){var t=sr(e.parent),n=e.structuredQuery,r=n.from?n.from.length:0,i=null;if(r>0){R(1===r);var a=n.from[0];a.allDescendants?i=a.collectionId:t=t.child(a.collectionId)}var o=[];n.where&&(o=br(n.where));var u=[];n.orderBy&&(u=n.orderBy.map((function(e){return function(e){return new Et(xr(e.field),function(e){switch(e){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(e.direction))}(e)})));var s=null;n.limit&&(s=function(e){var t;return be(t="object"==typeof e?e.value:e)?null:t}(n.limit));var c=null;n.startAt&&(c=function(e){var t=!!e.before,n=e.values||[];return new jt(n,t)}(n.startAt));var l=null;return n.endAt&&(l=function(e){var t=!e.before,n=e.values||[];return new jt(n,t)}(n.endAt)),At(t,i,u,o,s,"F",c,l)}function br(e){return e?void 0!==e.unaryFilter?[jr(e)]:void 0!==e.fieldFilter?[_r(e)]:void 0!==e.compositeFilter?e.compositeFilter.filters.map((function(e){return br(e)})).reduce((function(e,t){return e.concat(t)})):A():[]}function kr(e){return Yn[e]}function wr(e){return Xn[e]}function Or(e){return{fieldPath:e.canonicalString()}}function xr(e){return oe.fromServerFormat(e.fieldPath)}function _r(e){return mt.create(xr(e.fieldFilter.field),function(e){switch(e){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";default:return A()}}(e.fieldFilter.op),e.fieldFilter.value)}function jr(e){switch(e.unaryFilter.op){case"IS_NAN":var t=xr(e.unaryFilter.field);return mt.create(t,"==",{doubleValue:NaN});case"IS_NULL":var n=xr(e.unaryFilter.field);return mt.create(n,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":var r=xr(e.unaryFilter.field);return mt.create(r,"!=",{doubleValue:NaN});case"IS_NOT_NULL":var i=xr(e.unaryFilter.field);return mt.create(i,"!=",{nullValue:"NULL_VALUE"});default:return A()}}function Er(e){var t=[];return e.fields.forEach((function(e){return t.push(e.canonicalString())})),{fieldPaths:t}}function Sr(e){return e.length>=4&&"projects"===e.get(0)&&"databases"===e.get(2)}function Tr(e){for(var t="",n=0;n<e.length;n++)t.length>0&&(t=Cr(t)),t=Ir(e.get(n),t);return Cr(t)}function Ir(e,t){for(var n=t,r=e.length,i=0;i<r;i++){var a=e.charAt(i);switch(a){case"\0":n+="\x01\x10";break;case"\x01":n+="\x01\x11";break;default:n+=a}}return n}function Cr(e){return e+"\x01\x01"}function Ar(e){var t=e.length;if(R(t>=2),2===t)return R("\x01"===e.charAt(0)&&"\x01"===e.charAt(1)),ie.emptyPath();for(var n=t-2,r=[],i="",a=0;a<t;){var o=e.indexOf("\x01",a);switch((o<0||o>n)&&A(),e.charAt(o+1)){case"\x01":var u=e.substring(a,o),s=void 0;0===i.length?s=u:(s=i+=u,i=""),r.push(s);break;case"\x10":i+=e.substring(a,o),i+="\0";break;case"\x11":i+=e.substring(a,o+1);break;default:A()}a=o+2}return new ie(r)}var Rr=["userId","batchId"];function Nr(e,t){return[e,Tr(t)]}function Pr(e,t,n){return[e,Tr(t),n]}var Dr={},Lr=["prefixPath","collectionGroup","readTime","documentId"],Mr=["prefixPath","collectionGroup","documentId"],Fr=["collectionGroup","readTime","prefixPath","documentId"],Ur=["canonicalId","targetId"],Vr=["targetId","path"],Br=["path","targetId"],zr=["collectionId","parent"],qr=["indexId","uid"],Wr=["uid","sequenceNumber"],Hr=["indexId","uid","arrayValue","directionalValue","orderedDocumentKey","documentKey"],Kr=["indexId","uid","orderedDocumentKey"],Gr=["userId","collectionPath","documentId"],$r=["userId","collectionPath","largestBatchId"],Qr=["userId","collectionGroup","largestBatchId"],Yr=["mutation
2Queues","mutations","documentMutations","remoteDocuments","targets","owner","targetGlobal","targetDocuments"].concat(["clientMetadata"]).concat(["remoteDocumentGlobal"]).concat(["collectionParents"]).concat(["bundles","namedQueries"]),Xr=[].concat(Object(d.a)(Yr),["documentOverlays"]),Jr=["mutationQueues","mutations","documentMutations","remoteDocumentsV14","targets","owner","targetGlobal","targetDocuments","clientMetadata","remoteDocumentGlobal","collectionParents","bundles","namedQueries","documentOverlays"],Zr=[].concat(Jr,["indexConfiguration","indexState","indexEntries"]),ei="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.",ti=function(){function e(){Object(p.a)(this,e),this.onCommittedListeners=[]}return Object(v.a)(e,[{key:"addOnCommittedListener",value:function(e){this.onCommittedListeners.push(e)}},{key:"raiseOnCommittedEvent",value:function(){this.onCommittedListeners.forEach((function(e){return e()}))}}]),e}(),ni=function(){function e(t){var n=this;Object(p.a)(this,e),this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,t((function(e){n.isDone=!0,n.result=e,n.nextCallback&&n.nextCallback(e)}),(function(e){n.isDone=!0,n.error=e,n.catchCallback&&n.catchCallback(e)}))}return Object(v.a)(e,[{key:"catch",value:function(e){return this.next(void 0,e)}},{key:"next",value:function(t,n){var r=this;return this.callbackAttached&&A(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(t,this.result):new e((function(e,i){r.nextCallback=function(n){r.wrapSuccess(t,n).next(e,i)},r.catchCallback=function(t){r.wrapFailure(n,t).next(e,i)}}))}},{key:"toPromise",value:function(){var e=this;return new Promise((function(t,n){e.next(t,n)}))}},{key:"wrapUserFunction",value:function(t){try{var n=t();return n instanceof e?n:e.resolve(n)}catch(t){return e.reject(t)}}},{key:"wrapSuccess",value:function(t,n){return t?this.wrapUserFunction((function(){return t(n)})):e.resolve(n)}},{key:"wrapFailure",value:function(t,n){return t?this.wrapUserFunction((function(){return t(n)})):e.reject(n)}}],[{key:"resolve",value:function(t){return new e((function(e,n){e(t)}))}}
2,{key:"reject",value:function(t){return new e((function(e,n){n(t)}))}},{key:"waitFor",value:function(t){return new e((function(e,n){var r=0,i=0,a=!1;t.forEach((function(t){++r,t.next((function(){++i,a&&i===r&&e()}),(function(e){return n(e)}))})),a=!0,i===r&&e()}))}},{key:"or",value:function(t){var n,r=e.resolve(!1),i=Object(u.a)(t);try{var a=function(){var t=n.value;r=r.next((function(n){return n?e.resolve(n):t()}))};for(i.s();!(n=i.n()).done;)a()}catch(o){i.e(o)}finally{i.f()}return r}},{key:"forEach",value:function(e,t){var n=this,r=[];return e.forEach((function(e,i){r.push(t.call(n,e,i))})),this.waitFor(r)}}]),e}(),ri=function(){function e(t,n){var r=this;Object(p.a)(this,e),this.action=t,this.transaction=n,this.aborted=!1,this.At=new M,this.transaction.oncomplete=function(){r.At.resolve()},this.transaction.onabort=function(){n.error?r.At.reject(new oi(t,n.error)):r.At.resolve()},this.transaction.onerror=function(e){var n=fi(e.target.error);r.At.reject(new oi(t,n))}}return Object(v.a)(e,[{key:"Rt",get:function(){return this.At.promise}},{key:"abort",value:function(e){e&&this.At.reject(e),this.aborted||(S("SimpleDb","Aborting transaction:",e?e.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())}},{key:"bt",value:function(){var e=this.transaction;this.aborted||"function"!=typeof e.commit||e.commit()}},{key:"store",value:function(e){var t=this.transaction.objectStore(e);return new si(t)}}],[{key:"open",value:function(t,n,r,i){try{return new e(n,t.transaction(i,r))}catch(t){throw new oi(n,t)}}}]),e}(),ii=function(){function t(e,n,r){Object(p.a)(this,t),this.name=e,this.version=n,this.Pt=r,12.2===t.Vt(Object(b.m)())&&T("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 Object(v.a)(t,[{key:"Nt",value:function(){var e=Object(l.a)(c.a.mark((function e(t){var n=this;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=this.db,e.t0){e.next=6;break}return S("SimpleDb","Opening database:",this.name),e.next=5,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 oi(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 L(D.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.")):"InvalidStateError"===n.name?r(new L(D.FAILED_PRECONDITION,"Unable to open an IndexedDB connection. This could be due to running in a private browsing session on a browser whose private browsing sessions do not support IndexedDB: "+n)):r(new oi(t,n))},i.onupgradeneeded=function(e){S("SimpleDb",'Database "'+n.name+'" requires upgrade from version:',e.oldVersion);var t=e.target.result;n.Pt.kt(t,i.transaction,e.oldVersion,n.version).next((function(){S("SimpleDb","Database upgrade to version "+n.version+" complete")}))}}));case 5:this.db=e.sent;case 6:return this.Mt&&(this.db.onversionchange=function(e){return n.Mt(e)}),e.abrupt("return",this.db);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"Ot",value:function(e){this.Mt=e,this.db&&(this.db.onversionchange=function(t){return e(t)})}},{key:"runTransaction",value:function(){var e=Object(l.a)(c.a.mark((function e(t,n,r,i){var a,o,u,s,l=this;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a="readonly"===n,o=0;case 2:return++o,e.prev=3,e.delegateYield(c.a.mark((function e(){var n,o;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.Nt(t);case 2:return l.db=e.sent,n=ri.open(l.db,t,a?"readonly":"readwrite",r),o=i(n).next((function(e){return n.bt(),e})).catch((function(e){return n.abort(e),ni.reject(e)}
2)).toPromise(),o.catch((function(){})),e.next=7,n.Rt;case 7:return e.t0=o,e.abrupt("return",{v:e.t0});case 9:case"end":return e.stop()}}),e)}))(),"t0",5);case 5:if("object"!==typeof(u=e.t0)){e.next=8;break}return e.abrupt("return",u.v);case 8:e.next=15;break;case 10:if(e.prev=10,e.t1=e.catch(3),s="FirebaseError"!==e.t1.name&&o<3,S("SimpleDb","Transaction failed with error:",e.t1.message,"Retrying:",s),this.close(),s){e.next=15;break}return e.abrupt("return",Promise.reject(e.t1));case 15:e.next=2;break;case 17:case"end":return e.stop()}}),e,this,[[3,10]])})));return function(t,n,r,i){return e.apply(this,arguments)}}()},{key:"close",value:function(){this.db&&this.db.close(),this.db=void 0}}],[{key:"delete",value:function(e){return S("SimpleDb","Removing database:",e),ci(window.indexedDB.deleteDatabase(e)).toPromise()}},{key:"vt",value:function(){if(!Object(b.s)())return!1;if(t.St())return!0;var e=Object(b.m)(),n=t.Vt(e),r=0<n&&n<10,i=t.Dt(e),a=0<i&&i<4.5;return!(e.indexOf("MSIE ")>0||e.indexOf("Trident/")>0||e.indexOf("Edge/")>0||r||a)}},{key:"St",value:function(){var t;return"undefined"!=typeof e&&"YES"===(null===(t=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}))||void 0===t?void 0:t.Ct)}},{key:"xt",value:function(e,t){return e.store(t)}},{key:"Vt",value:function(e){var t=e.match(/i(?:phone|pad|pod) os ([\d_]+)/i),n=t?t[1].split("_").slice(0,2).join("."):"-1";return Number(n)}},{key:"Dt",value:function(e){var t=e.match(/Android ([\d.]+)/i),n=t?t[1].split(".").slice(0,2).join("."):"-1";return Number(n)}}]),t}(),ai=function(){function e(t){Object(p.a)(this,e),this.Ft=t,this.$t=!1,this.Bt=null}return Object(v.a)(e,[{key:"isDone",get:function(){return this.$t}},{key:"Lt",get:function(){return this.Bt}},{key:"cursor",set:function(e){this.Ft=e}},{key:"done",value:function(){this.$t=!0}},{key:"Ut",value:function(e){this.Bt=e}},{key:"delete",value:function(){return ci(this.Ft.delete())}}]),e}(),oi=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r){var i;return Object(p.a)(this,n),(i=t.call(this,D.UNAVAILABLE,"IndexedDB transaction '".concat(e,"' failed: ").concat(r))).name="IndexedDbTransactionError",i}return n}(L);function ui(e){return"IndexedDbTransactionError"===e.name}var si=function(){function e(t){Object(p.a)(this,e),this.store=t}return Object(v.a)(e,[{key:"put",value:function(e,t){var n;return void 0!==t?(S("SimpleDb","PUT",this.store.name,e,t),n=this.store.put(t,e)):(S("SimpleDb","PUT",this.store.name,"<auto-key>",e),n=this.store.put(e)),ci(n)}},{key:"add",value:function(e){return S("SimpleDb","ADD",this.store.name,e,e),ci(this.store.add(e))}},{key:"get",value:function(e){var t=this;return ci(this.store.get(e)).next((function(n){return void 0===n&&(n=null),S("SimpleDb","GET",t.store.name,e,n),n}))}},{key:"delete",value:function(e){return S("SimpleDb","DELETE",this.store.name,e),ci(this.store.delete(e))}},{key:"count",value:function(){return S("SimpleDb","COUNT",this.store.name),ci(this.store.count())}},{key:"qt",value:function(e,t){var n=this.options(e,t);if(n.index||"function"!=typeof this.store.getAll){var r=this.cursor(n),i=[];return this.Kt(r,(function(e,t){i.push(t)})).next((function(){return i}))}var a=this.store.getAll(n.range);return new ni((function(e,t){a.onerror=function(e){t(e.target.error)},a.onsuccess=function(t){e(t.target.result)}}))}},{key:"Gt",value:function(e,t){var n=this.store.getAll(e,null===t?void 0:t);return new ni((function(e,t){n.onerror=function(e){t(e.target.error)},n.onsuccess=function(t){e(t.target.result)}}))}},{key:"Qt",value:function(e,t){S("SimpleDb","DELETE ALL",this.store.name);var n=this.options(e,t);n.jt=!1;var r=this.cursor(n);return this.Kt(r,(function(e,t,n){return n.delete()}))}},{key:"Wt",value:function(e,t){var n;t?n=e:(n={},t=e);var r=this.cursor(n);return this.Kt(r,t)}},{key:"zt",value:function(e){var t=this.cursor({});return new ni((function(n,r){t.onerror=function(e){var t=fi(e.target.error);r(t)},t.onsuccess=function(t){var r=t.target.result;r?e(r.primaryKey,r.value).next((function(e){e?r.continue():n()})):n()}}))}},{key:"Kt",value:function(e,t){var n=[];return new ni((function(r,i){e.onerror=function(e){i(e.target.error)},e.onsuccess=function(e){var i=e.target.result;if(i){var a=new ai(i),o=t(i.primaryKey,i.value,a);if(o instanceof ni){var u=o.catch((function(e){return a.done(),ni.reject(e)}));n.push(u)}a.isDone?r():null===a.Lt?i.continue():i.continue(a.Lt)}else r()}})).next((function(){return ni.waitFor(n)}))}},{key:"options",value:function(e,t){var n;return void 0!==e&&("string"==typeof e?n=e:t=e),{index:n,range:t}}},{key:"cursor",value:function(e){var t="next";if(e.reverse&&(t="prev"),e.index){var n=this.store.index(e.index);return e.jt?n.openKeyCursor(e.range,t):n.openCursor(e.range,t)}return this.store.openCursor(e.range,t)}}]),e}();function ci(e){return new ni((function(t,n){e.onsuccess=function(e){var n=e.target.result;t(n)},e.onerror=function(e){var t=fi(e.target.error);n(t)}}))}var li=!1;function fi(e){var t=ii.Vt(Object(b.m)());if(t>=12.2&&t<13){var n="An internal error was encountered in the Indexed Database server";if(e.message.indexOf(n)>=0){var r=new L("internal","IOS_INDEXEDDB_BUG1: IndexedDb has thrown '".concat(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 li||(li=!0,setTimeout((function(){throw r}),0)),r}}return e}var hi=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r){var i;return Object(p.a)(this,n),(i=t.call(this)).Ht=e,i.currentSequenceNumber=r,i}return n}(ti);function di(e,t){var n=P(e);return ii.xt(n.Ht,t)}var pi=function(){function e(t,n,r,i){Object(p.a)(this,e),this.batchId=t,this.localWriteTime=n,this.baseMutations=r,this.mutations=i}return Object(v.a)(e,[{key:"applyToRemoteDocument",value:function(e,t){for(var n=t.mutationResults,r=0;r<this.mutations.length;r++){var i=this.mutations[r];i.key.isEqual(e.key)&&dn(i,e,n[r])}}},{key:"applyToLocalView",value:function(e){var t,n=Object(u.a)(this.baseMutations);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.key.isEqual(e.key)&&pn(r,e,this.localWriteTime)}}catch(s){n.e(s)}finally{n.f()}var i,a=Object(u.a)(this.mutations);try{for(a.s();!(i=a.n()).done;){var o=i.value;o.key.isEqual(e.key)&&pn(o,e,this.localWriteTime)}}catch(s){a.e(s)}finally{a.f()}}},{key:"applyToLocalDocumentSet",value:function(e){var t=this;this.mutations.forEach((function(n){var r=e.get(n.key),i=r;
2t.applyToLocalView(i),r.isValidDocument()||i.convertToNoDocument(Z.min())}))}},{key:"keys",value:function(){return this.mutations.reduce((function(e,t){return e.add(t.key)}),Fn())}},{key:"isEqual",value:function(e){return this.batchId===e.batchId&&Y(this.mutations,e.mutations,(function(e,t){return mn(e,t)}))&&Y(this.baseMutations,e.baseMutations,(function(e,t){return mn(e,t)}))}}]),e}(),vi=function(){function e(t,n,r,i){Object(p.a)(this,e),this.batch=t,this.commitVersion=n,this.mutationResults=r,this.docVersions=i}return Object(v.a)(e,null,[{key:"from",value:function(t,n,r){R(t.mutations.length===r.length);for(var i=Ln,a=t.mutations,o=0;o<a.length;o++)i=i.insert(a[o].key,r[o].version);return new e(t,n,r,i)}}]),e}(),mi=function(){function e(t,n){Object(p.a)(this,e),this.largestBatchId=t,this.mutation=n}return Object(v.a)(e,[{key:"getKey",value:function(){return this.mutation.key}},{key:"isEqual",value:function(e){return null!==e&&this.mutation===e.mutation}},{key:"toString",value:function(){return"Overlay{\n      largestBatchId: ".concat(this.largestBatchId,",\n      mutation: ").concat(this.mutation.toString(),"\n    }")}}]),e}(),yi=function(){function e(t,n,r,i){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Z.min(),o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Z.min(),u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:ce.EMPTY_BYTE_STRING;Object(p.a)(this,e),this.target=t,this.targetId=n,this.purpose=r,this.sequenceNumber=i,this.snapshotVersion=a,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=u}return Object(v.a)(e,[{key:"withSequenceNumber",value:function(t){return new e(this.target,this.targetId,this.purpose,t,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken)}},{key:"withResumeToken",value:function(t,n){return new e(this.target,this.targetId,this.purpose,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,t)}},{key:"withLastLimboFreeSnapshotVersion",value:function(t){return new e(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,t,this.resumeToken)}}]),e}(),gi=function e(t){Object(p.a)(this,e),this.Jt=t};function bi(e,t){var n=t.key,r={prefixPath:n.getCollectionPath().popLast().toArray(),collectionGroup:n.collectionGroup,documentId:n.path.lastSegment(),readTime:ki(t.readTime),hasCommittedMutations:t.hasCommittedMutations};if(t.isFoundDocument())r.document=function(e,t){return{name:ar(e,t.key),fields:t.data.value.mapValue.fields,updateTime:Zn(e,t.version.toTimestamp())}}(e.Jt,t);else if(t.isNoDocument())r.noDocument={path:n.path.toArray(),readTime:wi(t.version)};else{if(!t.isUnknownDocument())return A();r.unknownDocument={path:n.path.toArray(),version:wi(t.version)}}return r}function ki(e){var t=e.toTimestamp();return[t.seconds,t.nanoseconds]}function wi(e){var t=e.toTimestamp();return{seconds:t.seconds,nanoseconds:t.nanoseconds}}function Oi(e){var t=new J(e.seconds,e.nanoseconds);return Z.fromTimestamp(t)}function xi(e,t){for(var n=(t.baseMutations||[]).map((function(t){return vr(e.Jt,t)})),r=0;r<t.mutations.length-1;++r){var i=t.mutations[r];if(r+1<t.mutations.length&&void 0!==t.mutations[r+1].transform){var a=t.mutations[r+1];i.updateTransforms=a.transform.fieldTransforms,t.mutations.splice(r+1,1),++r}}var o=t.mutations.map((function(t){return vr(e.Jt,t)})),u=J.fromMillis(t.localWriteTimeMs);return new pi(t.batchId,u,n,o)}function _i(e){var t,n,r=Oi(e.readTime),i=void 0!==e.lastLimboFreeSnapshotVersion?Oi(e.lastLimboFreeSnapshotVersion):Z.min();return void 0!==e.query.documents?(R(1===(n=e.query).documents.length),t=Mt(Rt(sr(n.documents[0])))):t=function(e){return Mt(gr(e))}(e.query),new yi(t,e.targetId,0,e.lastListenSequenceNumber,r,i,ce.fromBase64String(e.resumeToken))}function ji(e,t){var n,r=wi(t.snapshotVersion),i=wi(t.lastLimboFreeSnapshotVersion);n=ht(t.target)?mr(e.Jt,t.target):yr(e.Jt,t.target);var a=t.resumeToken.toBase64();return{targetId:t.targetId,canonicalId:lt(t.target),readTime:r,resumeToken:a,lastListenSequenceNumber:t.sequenceNumber,lastLimboFreeSnapshotVersion:i,query:n}}function Ei(e){var t=gr({parent:e.parent,structuredQuery:e.structuredQuery});return"LAST"===e.limitType?Ft(t,t.limit,"L"):t}function Si(e,t){return new mi(t.largestBatchId,vr(e.Jt,t.overlayMutation))}function Ti(e,t){var n=t.path.lastSegment();return[e,Tr(t.path.popLast()),n]}var Ii=function(){function e(){Object(p.a)(this,e)}return Object(v.a)(e,[{key:"getBundleMetadata",value:function(e,t){return Ci(e).get(t).next((function(e){if(e)return{id:(t=e).bundleId,createTime:Oi(t.createTime),version:t.version};var t}))}},{key:"saveBundleMetadata",value:function(e,t){return Ci(e).put({bundleId:(n=t).id,createTime:wi(nr(n.createTime)),version:n.version});var n}}
2,{key:"getNamedQuery",value:function(e,t){return Ai(e).get(t).next((function(e){if(e)return{name:(t=e).name,query:Ei(t.bundledQuery),readTime:Oi(t.readTime)};var t}))}},{key:"saveNamedQuery",value:function(e,t){return Ai(e).put(function(e){return{name:e.name,readTime:wi(nr(e.readTime)),bundledQuery:e.bundledQuery}}(t))}}]),e}();function Ci(e){return di(e,"bundles")}function Ai(e){return di(e,"namedQueries")}var Ri=function(){function e(t,n){Object(p.a)(this,e),this.M=t,this.userId=n}return Object(v.a)(e,[{key:"getOverlay",value:function(e,t){var n=this;return Ni(e).get(Ti(this.userId,t)).next((function(e){return e?Si(n.M,e):null}))}},{key:"saveOverlays",value:function(e,t,n){var r=this,i=[];return n.forEach((function(n,a){var o=new mi(t,a);i.push(r.Xt(e,o))})),ni.waitFor(i)}},{key:"removeOverlaysForBatchId",value:function(e,t,n){var r=this,i=new Set;t.forEach((function(e){return i.add(Tr(e.getCollectionPath()))}));var a=[];return i.forEach((function(t){var i=IDBKeyRange.bound([r.userId,t,n],[r.userId,t,n+1],!1,!0);a.push(Ni(e).Qt("collectionPathOverlayIndex",i))})),ni.waitFor(a)}},{key:"getOverlaysForCollection",value:function(e,t,n){var r=this,i=Dn(),a=Tr(t),o=IDBKeyRange.bound([this.userId,a,n],[this.userId,a,Number.POSITIVE_INFINITY],!0);return Ni(e).qt("collectionPathOverlayIndex",o).next((function(e){var t,n=Object(u.a)(e);try{for(n.s();!(t=n.n()).done;){var a=t.value,o=Si(r.M,a);i.set(o.getKey(),o)}}catch(s){n.e(s)}finally{n.f()}return i}))}},{key:"getOverlaysForCollectionGroup",value:function(e,t,n,r){var i,a=this,o=Dn(),u=IDBKeyRange.bound([this.userId,t,n],[this.userId,t,Number.POSITIVE_INFINITY],!0);return Ni(e).Wt({index:"collectionGroupOverlayIndex",range:u},(function(e,t,n){var u=Si(a.M,t);o.size()<r||u.largestBatchId===i?(o.set(u.getKey(),u),i=u.largestBatchId):n.done()})).next((function(){return o}))}},{key:"Xt",value:function(e,t){return Ni(e).put(function(e,t,n){var r=Ti(t,n.mutation.key),i=Object(o.a)(r,3);i[0];return{userId:t,collectionPath:i[1],documentId:i[2],collectionGroup:n.mutation.key.getCollectionGroup(),largestBatchId:n.largestBatchId,overlayMutation:pr(e.Jt,n.mutation)}}(this.M,this.userId,t))}}],[{key:"Yt",value:function(t,n){return new e(t,n.uid||"")}}]),e}();function Ni(e){return di(e,"documentOverlays")}var Pi=function(){function e(){Object(p.a)(this,e)}return Object(v.a)(e,[{key:"Zt",value:function(e,t){this.te(e,t),t.ee()}},{key:"te",value:function(e,t){if("nullValue"in e)this.ne(t,5);else if("booleanValue"in e)this.ne(t,10),t.se(e.booleanValue?1:0);else if("integerValue"in e)this.ne(t,15),t.se(he(e.integerValue));else if("doubleValue"in e){var n=he(e.doubleValue);isNaN(n)?this.ne(t,13):(this.ne(t,15),ke(n)?t.se(0):t.se(n))}else if("timestampValue"in e){var r=e.timestampValue;this.ne(t,20),"string"==typeof r?t.ie(r):(t.ie("".concat(r.seconds||"")),t.se(r.nanos||0))}else if("stringValue"in e)this.re(e.stringValue,t),this.oe(t);else if("bytesValue"in e)this.ne(t,30),t.ue(de(e.bytesValue)),this.oe(t);else if("referenceValue"in e)this.ae(e.referenceValue,t);else if("geoPointValue"in e){var i=e.geoPointValue;this.ne(t,45),t.se(i.latitude||0),t.se(i.longitude||0)}else"mapValue"in e?Ue(e)?this.ne(t,Number.MAX_SAFE_INTEGER):(this.ce(e.mapValue,t),this.oe(t)):"arrayValue"in e?(this.he(e.arrayValue,t),this.oe(t)):A()}},{key:"re",value:function(e,t){this.ne(t,25),this.le(e,t)}},{key:"le",value:function(e,t){t.ie(e)}},{key:"ce",value:function(e,t){var n=e.fields||{};this.ne(t,55);for(var r=0,i=Object.keys(n);r<i.length;r++){var a=i[r];this.re(a,t),this.te(n[a],t)}}},{key:"he",value:function(e,t){var n=e.values||[];this.ne(t,50);var r,i=Object(u.a)(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;this.te(a,t)}}catch(o){i.e(o)}finally{i.f()}}},{key:"ae",value:function(e,t){var n=this;this.ne(t,37),Oe.fromName(e).path.forEach((function(e){n.ne(t,60),n.le(e,t)}))}},{key:"ne",value:function(e,t){e.se(t)}},{key:"oe",value:function(e){e.se(2)}}]),e}();function Di(e){if(0===e)return 8;var t=0;return e>>4==0&&(t+=4,e<<=4),e>>6==0&&(t+=2,e<<=2),e>>7==0&&(t+=1),t}function Li(e){var t=64-function(e){for(var t=0,n=0;n<8;++n){var r=Di(255&e[n]);if(t+=r,8!==r)break}return t}(e);return Math.ceil(t/8)}Pi.fe=new Pi;var Mi=function(){function e(){Object(p.a)(this,e),this.buffer=new Uint8Array(1024),this.position=0}return Object(v.a)(e,[{key:"de",value:function(e){for(var t=e[Symbol.iterator](),n=t.next();!n.done;)this._e(n.value),n=t.next();this.we()}},{key:"me",value:function(e){for(var t=e[Symbol.iterator](),n=t.next();!n.done;)this.ge(n.value),n=t.next();this.ye()}},{key:"pe",value:function(e){var t,n=Object(u.a)(e);try{for(n.s();!(t=n.n()).done;){var r=t.value,i=r.charCodeAt(0);if(i<128)this._e(i);else if(i<2048)this._e(960|i>>>6),this._e(128|63&i);else if(r<"\ud800"||"\udbff"<r)this._e(480|i>>>12),this._e(128|63&i>>>6),this._e(128|63&i);else{var a=r.codePointAt(0);this._e(240|a>>>18),this._e(128|63&a>>>12),this._e(128|63&a>>>6),this._e(128|63&a)}}}catch(o){n.e(o)}finally{n.f()}this.we()}},{key:"Ie",value:function(e){var t,n=Object(u.a)(e);try{for(n.s();!(t=n.n()).done;){var r=t.value,i=r.charCodeAt(0);if(i<128)this.ge(i);else if(i<2048)this.ge(960|i>>>6),this.ge(128|63&i);else if(r<"\ud800"||"\udbff"<r)this.ge(480|i>>>12),this.ge(128|63&i>>>6),this.ge(128|63&i);else{var a=r.codePointAt(0);this.ge(240|a>>>18),this.ge(128|63&a>>>12),this.ge(128|63&a>>>6),this.ge(128|63&a)}}}catch(o){n.e(o)}finally{n.f()}this.ye()}},{key:"Te",value:function(e){var t=this.Ee(e),n=Li(t);this.Ae(1+n),this.buffer[this.position++]=255&n;for(var r=t.length-n;r<t.length;++r)this.buffer[this.position++]=255&t[r]}},{key:"Re",value:function(e){var t=this.Ee(e),n=Li(t);this.Ae(1+n),this.buffer[this.position++]=~(255&n);for(var r=t.length-n;r<t.length;++r)this.buffer[this.position++]=~(255&t[r])}},{key:"be",value:function(){this.Pe(255),this.Pe(255)}},{key:"Ve",value:function(){this.ve(255),this.ve(255)}},{key:"reset",value:function(){this.position=0}},{key:"seed",value:function(e){this.Ae(e.length),this.buffer.set(e,this.position),this.position+=e.length}},{key:"Se",value:function(){return this.buffer.slice(0,this.position)}},{key:"Ee",value:function(e){var t=function(e){var t=new DataView(new ArrayBuffer(8));return t.setFloat64(0,e,!1),new Uint8Array(t.buffer)}(e),n=0!=(128&t[0]);t[0]^=n?255:128;for(var r=1;r<t.length;++r)t[r]^=n?255:0;return t}},{key:"_e",value:function(e){var t=255&e;0===t?(this.Pe(0),this.Pe(255)):255===t?(this.Pe(255),this.Pe(0)):this.Pe(t)}},{key:"ge",value:function(e){var t=255&e;0===t?(this.ve(0),this.ve(255)):255===t?(this.ve(255),this.ve(0)):this.ve(e)}},{key:"we",value:function(){this.Pe(0),this.Pe(1)}},{key:"ye",value:function(){this.ve(0),this.ve(1)}},{key:"Pe",value:function(e){this.Ae(1),this.buffer[this.position++]=e}},{key:"ve",value:function(e){this.Ae(1),this.buffer[this.position++]=~e}},{key:"Ae",value:function(e){var t=e+this.position;if(!(t<=this.buffer.length)){var n=2*this.buffer.length;n<t&&(n=t);
2var r=new Uint8Array(n);r.set(this.buffer),this.buffer=r}}}]),e}(),Fi=function(){function e(t){Object(p.a)(this,e),this.De=t}return Object(v.a)(e,[{key:"ue",value:function(e){this.De.de(e)}},{key:"ie",value:function(e){this.De.pe(e)}},{key:"se",value:function(e){this.De.Te(e)}},{key:"ee",value:function(){this.De.be()}}]),e}(),Ui=function(){function e(t){Object(p.a)(this,e),this.De=t}return Object(v.a)(e,[{key:"ue",value:function(e){this.De.me(e)}},{key:"ie",value:function(e){this.De.Ie(e)}},{key:"se",value:function(e){this.De.Re(e)}},{key:"ee",value:function(){this.De.Ve()}}]),e}(),Vi=function(){function e(){Object(p.a)(this,e),this.De=new Mi,this.Ce=new Fi(this.De),this.xe=new Ui(this.De)}return Object(v.a)(e,[{key:"seed",value:function(e){this.De.seed(e)}},{key:"Ne",value:function(e){return 0===e?this.Ce:this.xe}},{key:"Se",value:function(){return this.De.Se()}},{key:"reset",value:function(){this.De.reset()}}]),e}(),Bi=function(){function e(t,n,r,i){Object(p.a)(this,e),this.indexId=t,this.documentKey=n,this.arrayValue=r,this.directionalValue=i}return Object(v.a)(e,[{key:"ke",value:function(){var t=this.directionalValue.length,n=0===t||255===this.directionalValue[t-1]?t+1:t,r=new Uint8Array(n);return r.set(this.directionalValue,0),n!==t?r.set([0],this.directionalValue.length):++r[r.length-1],new e(this.indexId,this.documentKey,this.arrayValue,r)}}]),e}();function zi(e,t){var n=e.indexId-t.indexId;return 0!==n?n:0!==(n=qi(e.arrayValue,t.arrayValue))?n:0!==(n=qi(e.directionalValue,t.directionalValue))?n:Oe.comparator(e.documentKey,t.documentKey)}function qi(e,t){for(var n=0;n<e.length&&n<t.length;++n){var r=e[n]-t[n];if(0!==r)return r}return e.length-t.length}var Wi=function(){function e(t){Object(p.a)(this,e),this.collectionId=null!=t.collectionGroup?t.collectionGroup:t.path.lastSegment(),this.Me=t.orderBy,this.Oe=[];var n,r=Object(u.a)(t.filters);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.S()?this.Fe=i:this.Oe.push(i)}}catch(a){r.e(a)}finally{r.f()}}return Object(v.a)(e,[{key:"$e",value:function(e){var t=$e(e);if(void 0!==t&&!this.Be(t))return!1;for(var n=Qe(e),r=0,i=0;r<n.length&&this.Be(n[r]);++r);if(r===n.length)return!0;if(void 0!==this.Fe){var a=n[r];if(!this.Le(this.Fe,a)||!this.Ue(this.Me[i++],a))return!1;++r}for(;r<n.length;++r){var o=n[r];if(i>=this.Me.length||!this.Ue(this.Me[i++],o))return!1}return!0}},{key:"Be",value:function(e){var t,n=Object(u.a)(this.Oe);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(this.Le(r,e))return!0}}catch(i){n.e(i)}finally{n.f()}return!1}},{key:"Le",value:function(e,t){if(void 0===e||!e.field.isEqual(t.fieldPath))return!1;var n="array-contains"===e.op||"array-contains-any"===e.op;return 2===t.kind===n}},{key:"Ue",value:function(e,t){return!!e.field.isEqual(t.fieldPath)&&(0===t.kind&&"asc"===e.dir||1===t.kind&&"desc"===e.dir)}}]),e}(),Hi=function(){function e(){Object(p.a)(this,e),this.qe=new Ki}return Object(v.a)(e,[{key:"addToCollectionParentIndex",value:function(e,t){return this.qe.add(t),ni.resolve()}},{key:"getCollectionParents",value:function(e,t){return ni.resolve(this.qe.getEntries(t))}},{key:"addFieldIndex",value:function(e,t){return ni.resolve()}},{key:"deleteFieldIndex",value:function(e,t){return ni.resolve()}},{key:"getDocumentsMatchingTarget",value:function(e,t){return ni.resolve(null)}},{key:"getIndexType",value:function(e,t){return ni.resolve(0)}},{key:"getFieldIndexes",value:function(e,t){return ni.resolve([])}},{key:"getNextCollectionGroupToUpdate",value:function(e){return ni.resolve(null)}},{key:"getMinOffset",value:function(e,t){return ni.resolve(et.min())}},{key:"updateCollectionGroup",value:function(e,t,n){return ni.resolve()}},{key:"updateIndexEntries",value:function(e,t){return ni.resolve()}}]),e}(),Ki=function(){function e(){Object(p.a)(this,e),this.index={}}return Object(v.a)(e,[{key:"add",value:function(e){var t=e.lastSegment(),n=e.popLast(),r=this.index[t]||new at(ie.comparator),i=!r.has(n);return this.index[t]=r.add(n),i}},{key:"has",value:function(e){var t=e.lastSegment(),n=e.popLast(),r=this.index[t];return r&&r.has(n)}},{key:"getEntries",value:function(e){return(this.index[e]||new at(ie.comparator)).toArray()}}]),e}(),Gi=new Uint8Array(0),$i=function(){function e(t,n){Object(p.a)(this,e),this.user=t,this.databaseId=n,this.Ke=new Ki,this.Ge=new Cn((function(e){return lt(e)}),(function(e,t){return ft(e,t)})),this.uid=t.uid||""}return Object(v.a)(e,[{key:"addToCollectionParentIndex",value:function(e,t){var n=this;if(!this.Ke.has(t)){var r=t.lastSegment(),i=t.popLast();e.addOnCommittedListener((function(){n.Ke.add(t)}));var a={collectionId:r,parent:Tr(i)};return Qi(e).put(a)}return ni.resolve()}},{key:"getCollectionParents",value:function(e,t){var n=[],r=IDBKeyRange.bound([t,""],[X(t),""],!1,!0);return Qi(e).qt(r).next((function(e){var r,i=Object(u.a)(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;if(a.collectionId!==t)break;n.push(Ar(a.parent))}}catch(o){i.e(o)}finally{i.f()}return n}))}},{key:"addFieldIndex",value:function(e,t){var n=Xi(e),r=function(e){return{indexId:e.indexId,collectionGroup:e.collectionGroup,fields:e.fields.map((function(e){return[e.fieldPath.canonicalString(),e.kind]}))}}(t);return delete r.indexId,n.add(r).next()}},{key:"deleteFieldIndex",value:function(e,t){var n=Xi(e),r=Ji(e),i=Yi(e);return n.delete(t.indexId).next((function(){return r.delete(IDBKeyRange.bound([t.indexId],[t.indexId+1],!1,!0))})).next((function(){return i.delete(IDBKeyRange.bound([t.indexId],[t.indexId+1],!1,!0))}))}},{key:"getDocumentsMatchingTarget",value:function(e,t){var n=this,r=Yi(e),i=!0,a=new Map;return ni.forEach(this.Qe(t),(function(t){return n.je(e,t).next((function(e){i&&(i=!!e),a.set(t,e)}))}
2)).next((function(){if(i){var e=Fn(),o=[];return ni.forEach(a,(function(i,a){var s;S("IndexedDbIndexManager","Using index ".concat((s=i,"id=".concat(s.indexId,"|cg=").concat(s.collectionGroup,"|f=").concat(s.fields.map((function(e){return"".concat(e.fieldPath,":").concat(e.kind)})).join(",")))," to execute ").concat(lt(t)));var c=function(e,t){var n=$e(t);if(void 0===n)return null;var r,i=Object(u.a)(dt(e,n.fieldPath));try{for(i.s();!(r=i.n()).done;){var a=r.value;switch(a.op){case"array-contains-any":return a.value.arrayValue.values||[];case"array-contains":return[a.value]}}}catch(o){i.e(o)}finally{i.f()}return null}(a,i),l=function(e,t){var n,r=new Map,i=Object(u.a)(Qe(t));try{for(i.s();!(n=i.n()).done;){var a,o=n.value,s=Object(u.a)(dt(e,o.fieldPath));try{for(s.s();!(a=s.n()).done;){var c=a.value;switch(c.op){case"==":case"in":r.set(o.fieldPath.canonicalString(),c.value);break;case"not-in":case"!=":return r.set(o.fieldPath.canonicalString(),c.value),Array.from(r.values())}}}catch(l){s.e(l)}finally{s.f()}}}catch(l){i.e(l)}finally{i.f()}return null}(a,i),f=function(e,t){var n,r=[],i=!0,a=Object(u.a)(Qe(t));try{for(a.s();!(n=a.n()).done;){var o=n.value,s=0===o.kind?pt(e,o.fieldPath,e.startAt):vt(e,o.fieldPath,e.startAt);r.push(s.value),i&&(i=s.inclusive)}}catch(c){a.e(c)}finally{a.f()}return new jt(r,i)}(a,i),h=function(e,t){var n,r=[],i=!0,a=Object(u.a)(Qe(t));try{for(a.s();!(n=a.n()).done;){var o=n.value,s=0===o.kind?vt(e,o.fieldPath,e.endAt):pt(e,o.fieldPath,e.endAt);r.push(s.value),i&&(i=s.inclusive)}}catch(c){a.e(c)}finally{a.f()}return new jt(r,i)}(a,i),d=n.We(i,a,f),p=n.We(i,a,h),v=n.ze(i,a,l),m=n.He(i.indexId,c,d,f.inclusive,p,h.inclusive,v);return ni.forEach(m,(function(n){return r.Gt(n,t.limit).next((function(t){t.forEach((function(t){var n=Oe.fromSegments(t.documentKey);e.has(n)||(e=e.add(n),o.push(n))}))}))}))})).next((function(){return o}))}return ni.resolve(null)}))}},{key:"Qe",value:function(e){var t=this.Ge.get(e);return t||(t=[e],this.Ge.set(e,t),t)}},{key:"He",value:function(e,t,n,r,i,a,o){for(var u=this,s=(null!=t?t.length:1)*Math.max(n.length,i.length),c=s/(null!=t?t.length:1),l=[],f=function(s){var f=t?u.Je(t[s/c]):Gi,h=u.Ye(e,f,n[s%c],r),p=u.Xe(e,f,i[s%c],a),v=o.map((function(t){return u.Ye(e,f,t,!0)}));l.push.apply(l,Object(d.a)(u.createRange(h,p,v)))},h=0;h<s;++h)f(h);return l}},{key:"Ye",value:function(e,t,n,r){var i=new Bi(e,Oe.empty(),t,n);return r?i:i.ke()}},{key:"Xe",value:function(e,t,n,r){var i=new Bi(e,Oe.empty(),t,n);return r?i.ke():i}},{key:"je",value:function(e,t){var n=new Wi(t),r=null!=t.collectionGroup?t.collectionGroup:t.path.lastSegment();return this.getFieldIndexes(e,r).next((function(e){var t,r=null,i=Object(u.a)(e);try{for(i.s();!(t=i.n()).done;){var a=t.value;n.$e(a)&&(!r||a.fields.length>r.fields.length)&&(r=a)}}catch(o){i.e(o)}finally{i.f()}return r}))}},{key:"getIndexType",value:function(e,t){var n=this,r=2;return ni.forEach(this.Qe(t),(function(t){return n.je(e,t).next((function(e){e?0!==r&&e.fields.length<function(e){var t,n=new at(oe.comparator),r=!1,i=Object(u.a)(e.filters);try{for(i.s();!(t=i.n()).done;){var a=t.value;a.field.isKeyField()||("array-contains"===a.op||"array-contains-any"===a.op?r=!0:n=n.add(a.field))}}catch(l){i.e(l)}finally{i.f()}var o,s=Object(u.a)(e.orderBy);try{for(s.s();!(o=s.n()).done;){var c=o.value;c.field.isKeyField()||(n=n.add(c.field))}}catch(l){s.e(l)}finally{s.f()}return n.size+(r?1:0)}(t)&&(r=1):r=0}))})).next((function(){return r}))}},{key:"Ze",value:function(e,t){var n,r=new Vi,i=Object(u.a)(Qe(e));try{for(i.s();!(n=i.n()).done;){var a=n.value,o=t.data.field(a.fieldPath);if(null==o)return null;var s=r.Ne(a.kind);Pi.fe.Zt(o,s)}}catch(c){i.e(c)}finally{i.f()}return r.Se()}},{key:"Je",value:function(e){var t=new Vi;return Pi.fe.Zt(e,t.Ne(0)),t.Se()}},{key:"tn",value:function(e,t){var n=new Vi;return Pi.fe.Zt(Re(this.databaseId,t),n.Ne(function(e){var t=Qe(e);return 0===t.length?0:t[t.length-1].kind}(e))),n.Se()}},{key:"ze",value:function(e,t,n){if(null===n)return[];var r=[];r.push(new Vi);var i,a=0,o=Object(u.a)(Qe(e));try{for(o.s();!(i=o.n()).done;){var s,c=i.value,l=n[a++],f=Object(u.a)(r);try{for(f.s();!(s=f.n()).done;){var h=s.value;if(this.en(t,c.fieldPath)&&Pe(l))r=this.nn(r,c,l);else{var d=h.Ne(c.kind);Pi.fe.Zt(l,d)}}}catch(p){f.e(p)}finally{f.f()}}}catch(p){o.e(p)}finally{o.f()}return this.sn(r)}},{key:"We",value:function(e,t,n){return this.ze(e,t,n.position)}},{key:"sn",value:function(e){for(var t=[],n=0;n<e.length;++n)t[n]=e[n].Se();return t}},{key:"nn",value:function(e,t,n){var r,i=Object(d.a)(e),a=[],o=Object(u.a)(n.arrayValue.values||[]);try{for(o.s();!(r=o.n()).done;){var s,c=r.value,l=Object(u.a)(i);try{for(l.s();!(s=l.n()).done;){var f=s.value,h=new Vi;h.seed(f.Se()),Pi.fe.Zt(c,h.Ne(t.kind)),a.push(h)}}catch(p){l.e(p)}finally{l.f()}}}catch(p){o.e(p)}finally{o.f()}return a}},{key:"en",value:function(e,t){return!!e.filters.find((function(e){return e instanceof mt&&e.field.isEqual(t)&&("in"===e.op||"not-in"===e.op)}))}},{key:"getFieldIndexes",value:function(e,t){var n=this,r=Xi(e),i=Ji(e);return(t?r.qt("collectionGroupIndex",IDBKeyRange.bound(t,t)):r.qt()).next((function(e){var t=[];return ni.forEach(e,(function(e){return i.get([e.indexId,n.uid]).next((function(n){t.push(function(e,t){var n=t?new Xe(t.
2sequenceNumber,new et(Oi(t.readTime),new Oe(Ar(t.documentKey)),t.largestBatchId)):Xe.empty(),r=e.fields.map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return new Ye(oe.fromServerFormat(n),r)}));return new Ge(e.indexId,e.collectionGroup,r,n)}(e,n))}))})).next((function(){return t}))}))}},{key:"getNextCollectionGroupToUpdate",value:function(e){return this.getFieldIndexes(e).next((function(e){return 0===e.length?null:(e.sort((function(e,t){var n=e.indexState.sequenceNumber-t.indexState.sequenceNumber;return 0!==n?n:Q(e.collectionGroup,t.collectionGroup)})),e[0].collectionGroup)}))}},{key:"updateCollectionGroup",value:function(e,t,n){var r=this,i=Xi(e),a=Ji(e);return this.rn(e).next((function(e){return i.qt("collectionGroupIndex",IDBKeyRange.bound(t,t)).next((function(t){return ni.forEach(t,(function(t){return a.put(function(e,t,n,r){return{indexId:e,uid:t.uid||"",sequenceNumber:n,readTime:wi(r.readTime),documentKey:Tr(r.documentKey.path),largestBatchId:r.largestBatchId}}(t.indexId,r.user,e,n))}))}))}))}},{key:"updateIndexEntries",value:function(e,t){var n=this,r=new Map;return ni.forEach(t,(function(t,i){var a=r.get(t.collectionGroup);return(a?ni.resolve(a):n.getFieldIndexes(e,t.collectionGroup)).next((function(a){return r.set(t.collectionGroup,a),ni.forEach(a,(function(r){return n.on(e,t,r).next((function(t){var a=n.un(i,r);return t.isEqual(a)?ni.resolve():n.an(e,i,r,t,a)}))}))}))}))}},{key:"cn",value:function(e,t,n,r){return Yi(e).put({indexId:r.indexId,uid:this.uid,arrayValue:r.arrayValue,directionalValue:r.directionalValue,orderedDocumentKey:this.tn(n,t.key),documentKey:t.key.path.toArray()})}},{key:"hn",value:function(e,t,n,r){return Yi(e).delete([r.indexId,this.uid,r.arrayValue,r.directionalValue,this.tn(n,t.key),t.key.path.toArray()])}},{key:"on",value:function(e,t,n){var r=Yi(e),i=new at(zi);return r.Wt({index:"documentKeyIndex",range:IDBKeyRange.only([n.indexId,this.uid,this.tn(n,t)])},(function(e,r){i=i.add(new Bi(n.indexId,t,r.arrayValue,r.directionalValue))})).next((function(){return i}))}},{key:"un",value:function(e,t){var n=new at(zi),r=this.Ze(t,e);if(null==r)return n;var i=$e(t);if(null!=i){var a=e.data.field(i.fieldPath);if(Pe(a)){var o,s=Object(u.a)(a.arrayValue.values||[]);try{for(s.s();!(o=s.n()).done;){var c=o.value;n=n.add(new Bi(t.indexId,e.key,this.Je(c),r))}}catch(l){s.e(l)}finally{s.f()}}}else n=n.add(new Bi(t.indexId,e.key,Gi,r));return n}},{key:"an",value:function(e,t,n,r,i){var a=this;S("IndexedDbIndexManager","Updating index entries for document '%s'",t.key);var o=[];return function(e,t,n,r,i){for(var a=e.getIterator(),o=t.getIterator(),u=ut(a),s=ut(o);u||s;){var c=!1,l=!1;if(u&&s){var f=n(u,s);f<0?l=!0:f>0&&(c=!0)}else null!=u?l=!0:c=!0;c?(r(s),s=ut(o)):l?(i(u),u=ut(a)):(u=ut(a),s=ut(o))}}(r,i,zi,(function(r){o.push(a.cn(e,t,n,r))}),(function(r){o.push(a.hn(e,t,n,r))})),ni.waitFor(o)}},{key:"rn",value:function(e){var t=1;return Ji(e).Wt({index:"sequenceNumberIndex",reverse:!0,range:IDBKeyRange.upperBound([this.uid,Number.MAX_SAFE_INTEGER])},(function(e,n,r){r.done(),t=n.sequenceNumber+1})).next((function(){return t}))}},{key:"createRange",value:function(e,t,n){n=n.sort((function(e,t){return zi(e,t)})).filter((function(e,t,n){return!t||0!==zi(e,n[t-1])}));var r=[];r.push(e);var i,a=Object(u.a)(n);try{for(a.s();!(i=a.n()).done;){var o=i.value,s=zi(o,e),c=zi(o,t);if(0===s)r[0]=e.ke();else if(s>0&&c<0)r.push(o),r.push(o.ke());else if(c>0)break}}catch(h){a.e(h)}finally{a.f()}r.push(t);for(var l=[],f=0;f<r.length;f+=2)l.push(IDBKeyRange.bound([r[f].indexId,this.uid,r[f].arrayValue,r[f].directionalValue,Gi,[]],[r[f+1].indexId,this.uid,r[f+1].arrayValue,r[f+1].directionalValue,Gi,[]]));return l}},{key:"getMinOffset",value:function(e,t){var n,r=this;return ni.forEach(this.Qe(t),(function(t){return r.je(e,t).next((function(e){e?(!n||tt(e.indexState.offset,n)<0)&&(n=e.indexState.offset):n=et.min()}))})).next((function(){return n}))}}]),e}();function Qi(e){return di(e,"collectionParents")}function Yi(e){return di(e,"indexEntries")}function Xi(e){return di(e,"indexConfiguration")}function Ji(e){return di(e,"indexState")}var Zi={didRun:!1,sequenceNumbersCollected:0,targetsRemoved:0,documentsRemoved:0},ea=function(){function e(t,n,r){Object(p.a)(this,e),this.cacheSizeCollectionThreshold=t,this.percentileToCollect=n,this.maximumSequenceNumbersToCollect=r}return Object(v.a)(e,null,[{key:"withCacheSize",value:function(t){return new e(t,e.DEFAULT_COLLECTION_PE
2RCENTILE,e.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}}]),e}();function ta(e,t,n){var r=e.store("mutations"),i=e.store("documentMutations"),a=[],o=IDBKeyRange.only(n.batchId),s=0,c=r.Wt({range:o},(function(e,t,n){return s++,n.delete()}));a.push(c.next((function(){R(1===s)})));var l,f=[],h=Object(u.a)(n.mutations);try{for(h.s();!(l=h.n()).done;){var d=l.value,p=Pr(t,d.key.path,n.batchId);a.push(i.delete(p)),f.push(d.key)}}catch(v){h.e(v)}finally{h.f()}return ni.waitFor(a).next((function(){return f}))}function na(e){if(!e)return 0;var t;if(e.document)t=e.document;else if(e.unknownDocument)t=e.unknownDocument;else{if(!e.noDocument)throw A();t=e.noDocument}return JSON.stringify(t).length}ea.DEFAULT_COLLECTION_PERCENTILE=10,ea.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,ea.DEFAULT=new ea(41943040,ea.DEFAULT_COLLECTION_PERCENTILE,ea.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),ea.DISABLED=new ea(-1,0,0);var ra=function(){function e(t,n,r,i){Object(p.a)(this,e),this.userId=t,this.M=n,this.indexManager=r,this.referenceDelegate=i,this.ln={}}return Object(v.a)(e,[{key:"checkEmpty",value:function(e){var t=!0,n=IDBKeyRange.bound([this.userId,Number.NEGATIVE_INFINITY],[this.userId,Number.POSITIVE_INFINITY]);return aa(e).Wt({index:"userMutationsIndex",range:n},(function(e,n,r){t=!1,r.done()})).next((function(){return t}))}},{key:"addMutationBatch",value:function(e,t,n,r){var i=this,a=oa(e),o=aa(e);return o.add({}).next((function(s){R("number"==typeof s);var c,l=new pi(s,t,n,r),f=function(e,t,n){var r=n.baseMutations.map((function(t){return pr(e.Jt,t)})),i=n.mutations.map((function(t){return pr(e.Jt,t)}));return{userId:t,batchId:n.batchId,localWriteTimeMs:n.localWriteTime.toMillis(),baseMutations:r,mutations:i}}(i.M,i.userId,l),h=[],d=new at((function(e,t){return Q(e.canonicalString(),t.canonicalString())})),p=Object(u.a)(r);try{for(p.s();!(c=p.n()).done;){var v=c.value,m=Pr(i.userId,v.key.path,s);d=d.add(v.key.path.popLast()),h.push(o.put(f)),h.push(a.put(m,Dr))}}catch(y){p.e(y)}finally{p.f()}return d.forEach((function(t){h.push(i.indexManager.addToCollectionParentIndex(e,t))})),e.addOnCommittedListener((function(){i.ln[s]=l.keys()})),ni.waitFor(h).next((function(){return l}))}))}},{key:"lookupMutationBatch",value:function(e,t){var n=this;return aa(e).get(t).next((function(e){return e?(R(e.userId===n.userId),xi(n.M,e)):null}))}},{key:"fn",value:function(e,t){var n=this;return this.ln[t]?ni.resolve(this.ln[t]):this.lookupMutationBatch(e,t).next((function(e){if(e){var r=e.keys();return n.ln[t]=r,r}return null}))}},{key:"getNextMutationBatchAfterBatchId",value:function(e,t){var n=this,r=t+1,i=IDBKeyRange.lowerBound([this.userId,r]),a=null;return aa(e).Wt({index:"userMutationsIndex",range:i},(function(e,t,i){t.userId===n.userId&&(R(t.batchId>=r),a=xi(n.M,t)),i.done()})).next((function(){return a}))}},{key:"getHighestUnacknowledgedBatchId",value:function(e){var t=IDBKeyRange.upperBound([this.userId,Number.POSITIVE_INFINITY]),n=-1;return aa(e).Wt({index:"userMutationsIndex",range:t,reverse:!0},(function(e,t,r){n=t.batchId,r.done()})).next((function(){return n}))}},{key:"getAllMutationBatches",value:function(e){var t=this,n=IDBKeyRange.bound([this.userId,-1],[this.userId,Number.POSITIVE_INFINITY]);return aa(e).qt("userMutationsIndex",n).next((function(e){return e.map((function(e){return xi(t.M,e)}))}))}},{key:"getAllMutationBatchesAffectingDocumentKey",value:function(e,t){var n=this,r=Nr(this.userId,t.path),i=IDBKeyRange.lowerBound(r),a=[];return oa(e).Wt({range:i},(function(r,i,u){var s=Object(o.a)(r,3),c=s[0],l=s[1],f=s[2],h=Ar(l);if(c===n.userId&&t.path.isEqual(h))return aa(e).get(f).next((function(e){if(!e)throw A();R(e.userId===n.userId),a.push(xi(n.M,e))}));u.done()})).next((function(){return a}))}},{key:"getAllMutationBatchesAffectingDocumentKeys",value:function(e,t){var n=this,r=new at(Q),i=[];return t.forEach((function(t){var a=Nr(n.userId,t.path),u=IDBKeyRange.lowerBound(a),s=oa(e).Wt({range:u},(function(e,i,a){var u=Object(o.a)(e,3),s=u[0],c=u[1],l=u[2],f=Ar(c);s===n.userId&&t.path.isEqual(f)?r=r.add(l):a.done()}));i.push(s)})),ni.waitFor(i).next((function(){return n.dn(e,r)}))}},{key:"getAllMutationBatchesAffectingQuery",value:function(e,t){var n=this,r=t.path,i=r.length+1,a=Nr(this.userId,r),u=IDBKeyRange.lowerBound(a),s=new at(Q);return oa(e).Wt({range:u},(function(e,t,a){var u=Object(o.a)(e,3),c=u[0],l=u[1],f=u[2],h=Ar(l);c===n.userId&&r.isPrefixOf(h)?h.length===i&&(s=s.add(f)):a.done()})).next((function(){return n.dn(e,s)}))}},{key:"dn",value:function(e,t){var n=this,r=[],i=[];return t.forEach((function(t){i.push(aa(e).get(t).next((function(e){if(null===e)throw A();R(e.userId===n.userId),r.push(xi(n.M,e))})))})),ni.waitFor(i).next((function(){return r}))}},{key:"removeMutationBatch",value:function(e,t){var n=this;return ta(e.Ht,this.userId,t).next((function(r){return e.addOnCommittedListener((function(){n._n(t.batchId)})),ni.forEach(r,(function(t){return n.referenceDelegate.markPotentiallyOrphaned(e,t)}))}))}},{key:"_n",value:function(e){delete this.ln[e]}},{key:"performConsistencyCheck",value:function(e){var t=this;return this.checkEmpty(e).next((function(n){if(!n)return ni.resolve();var r=IDBKeyRange.lowerBound([t.userId]),i=[];return oa(e).Wt({range:r},(function(e,n,r){if(e[0]===t.userId){var a=Ar(e[1]);i.push(a)}else r.done()})).next((function(){R(0===i.length)}))}))}},{key:"containsKey",value:function(e,t){return ia(e,this.userId,t)}},{key:"wn",value:function(e){var t=this;return ua(e).get(this.userId).next((function(e){return e||{userId:t.userId,lastAcknowledgedBatchId:-1,lastStreamToken:""}}))}}],[{key:"Yt",value:function(t,n,r,i){return R(""!==t.uid),new e(t.isAuthenticated()?t.uid:"",n,r,i)}}]),e}();function ia(e,t,n){var r=Nr(t,n.path),i=r[1],a=IDBKeyRange.lowerBound(r),u=!1;return oa(e).Wt({range:a,jt:!0},(function(e,n,r){var a=Object(o.a)(e,3),s=a[0],c=a[1];a[2];s===t&&c===i&&(u=!0),r.done()})).next((function(){return u}))}function aa(e){return di(e,"mutations")}function oa(e){return di(e,"documentMutations")}
2function ua(e){return di(e,"mutationQueues")}var sa=function(){function e(t){Object(p.a)(this,e),this.mn=t}return Object(v.a)(e,[{key:"next",value:function(){return this.mn+=2,this.mn}}],[{key:"gn",value:function(){return new e(0)}},{key:"yn",value:function(){return new e(-1)}}]),e}(),ca=function(){function e(t,n){Object(p.a)(this,e),this.referenceDelegate=t,this.M=n}return Object(v.a)(e,[{key:"allocateTargetId",value:function(e){var t=this;return this.pn(e).next((function(n){var r=new sa(n.highestTargetId);return n.highestTargetId=r.next(),t.In(e,n).next((function(){return n.highestTargetId}))}))}},{key:"getLastRemoteSnapshotVersion",value:function(e){return this.pn(e).next((function(e){return Z.fromTimestamp(new J(e.lastRemoteSnapshotVersion.seconds,e.lastRemoteSnapshotVersion.nanoseconds))}))}},{key:"getHighestSequenceNumber",value:function(e){return this.pn(e).next((function(e){return e.highestListenSequenceNumber}))}},{key:"setTargetsMetadata",value:function(e,t,n){var r=this;return this.pn(e).next((function(i){return i.highestListenSequenceNumber=t,n&&(i.lastRemoteSnapshotVersion=n.toTimestamp()),t>i.highestListenSequenceNumber&&(i.highestListenSequenceNumber=t),r.In(e,i)}))}},{key:"addTargetData",value:function(e,t){var n=this;return this.Tn(e,t).next((function(){return n.pn(e).next((function(r){return r.targetCount+=1,n.En(t,r),n.In(e,r)}))}))}},{key:"updateTargetData",value:function(e,t){return this.Tn(e,t)}},{key:"removeTargetData",value:function(e,t){var n=this;return this.removeMatchingKeysForTargetId(e,t.targetId).next((function(){return la(e).delete(t.targetId)})).next((function(){return n.pn(e)})).next((function(t){return R(t.targetCount>0),t.targetCount-=1,n.In(e,t)}))}},{key:"removeTargets",value:function(e,t,n){var r=this,i=0,a=[];return la(e).Wt((function(o,u){var s=_i(u);s.sequenceNumber<=t&&null===n.get(s.targetId)&&(i++,a.push(r.removeTargetData(e,s)))})).next((function(){return ni.waitFor(a)})).next((function(){return i}))}},{key:"forEachTarget",value:function(e,t){return la(e).Wt((function(e,n){var r=_i(n);t(r)}))}},{key:"pn",value:function(e){return fa(e).get("targetGlobalKey").next((function(e){return R(null!==e),e}))}},{key:"In",value:function(e,t){return fa(e).put("targetGlobalKey",t)}},{key:"Tn",value:function(e,t){return la(e).put(ji(this.M,t))}},{key:"En",value:function(e,t){var n=!1;return e.targetId>t.highestTargetId&&(t.highestTargetId=e.targetId,n=!0),e.sequenceNumber>t.highestListenSequenceNumber&&(t.highestListenSequenceNumber=e.sequenceNumber,n=!0),n}},{key:"getTargetCount",value:function(e){return this.pn(e).next((function(e){return e.targetCount}))}},{key:"getTargetData",value:function(e,t){var n=lt(t),r=IDBKeyRange.bound([n,Number.NEGATIVE_INFINITY],[n,Number.POSITIVE_INFINITY]),i=null;return la(e).Wt({range:r,index:"queryTargetsIndex"},(function(e,n,r){var a=_i(n);ft(t,a.target)&&(i=a,r.done())})).next((function(){return i}))}},{key:"addMatchingKeys",value:function(e,t,n){var r=this,i=[],a=ha(e);return t.forEach((function(t){var o=Tr(t.path);i.push(a.put({targetId:n,path:o})),i.push(r.referenceDelegate.addReference(e,n,t))})),ni.waitFor(i)}},{key:"removeMatchingKeys",value:function(e,t,n){var r=this,i=ha(e);return ni.forEach(t,(function(t){var a=Tr(t.path);return ni.waitFor([i.delete([n,a]),r.referenceDelegate.removeReference(e,n,t)])}))}},{key:"removeMatchingKeysForTargetId",value:function(e,t){var n=ha(e),r=IDBKeyRange.bound([t],[t+1],!1,!0);return n.delete(r)}},{key:"getMatchingKeysForTargetId",value:function(e,t){var n=IDBKeyRange.bound([t],[t+1],!1,!0),r=ha(e),i=Fn();return r.Wt({range:n,jt:!0},(function(e,t,n){var r=Ar(e[1]),a=new Oe(r);i=i.add(a)})).next((function(){return i}))}},{key:"containsKey",value:function(e,t){var n=Tr(t.path),r=IDBKeyRange.bound([n],[X(n)],!1,!0),i=0;return ha(e).Wt({index:"documentTargetsIndex",jt:!0,range:r},(function(e,t,n){var r=Object(o.a)(e,2),a=r[0];r[1];0!==a&&(i++,n.done())})).next((function(){return i>0}))}},{key:"Et",value:function(e,t){return la(e).get(t).next((function(e){return e?_i(e):null}))}}]),e}();function la(e){return di(e,"targets")}function fa(e){return di(e,"targetGlobal")}function ha(e){return di(e,"targetDocuments")}function da(e){return pa.apply(this,arguments)}function pa(){return(pa=Object(l.a)(c.a.mark((function e(t){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.code===D.FAILED_PRECONDITION&&t.message===ei){e.next=2;break}throw t;case 2:S("LocalStore","Unexpectedly lost primary lease");case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function va(e,t){var n=Object(o.a)(e,2),r=n[0],i=n[1],a=Object(o.a)(t,2),u=a[0],s=a[1],c=Q(r,u);return 0===c?Q(i,s):c}var ma=function(){function e(t){Object(p.a)(this,e),this.An=t,this.buffer=new at(va),this.Rn=0}return Object(v.a)(e,[{key:"bn",value:function(){return++this.Rn}},{key:"Pn",value:function(e){var t=[e,this.bn()];if(this.buffer.size<this.An)this.buffer=this.buffer.add(t);else{var n=this.buffer.last();va(t,n)<0&&(this.buffer=this.buffer.delete(n).add(t))}}},{key:"maxValue",get:function(){return this.buffer.last()[0]}}]),e}(),ya=function(){function e(t,n){Object(p.a)(this,e),this.garbageCollector=t,this.asyncQueue=n,this.Vn=!1,this.vn=null}return Object(v.a)(e,[{key:"start",value:function(e){-1!==this.garbageCollector.params.cacheSizeCollectionThreshold&&this.Sn(e)}},{key:"stop",value:function(){this.vn&&(this.vn.cancel(),this.vn=null)}},{key:"started",get:function(){return null!==this.vn}},{key:"Sn",value:function(e){var t=this,n=this.Vn?3e5:6e4;S("LruGarbageCollector","Garbage collection scheduled in ".concat(n,"ms")),this.vn=this.asyncQueue.enqueueAfterDelay("lru_garbage_collection",n,Object(l.a)(c.a.mark((function n(){return c.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.vn=null,t.Vn=!0,n.prev=1,n.next=4,e.collectGarbage(t.garbageCollector);case 4:n.next=14;break;case 6:if(n.prev=6,n.t0=n.catch(1),!ui(n.t0)){n.next=12;break}S("LruGarbageCollector","Ignoring IndexedDB error during garbage collection: ",n.t0),n.next=14;break;case 12:return n.next=14,da(n.t0);case 14:return n.next=16,t.Sn(e);case 16:case"end":return n.stop()}}),n,null,[[1,6]])}))))}}]),e}(),ga=function(){function e(t,n){Object(p.a)(this,e),this.Dn=t,this.params=n}return Object(v.a)(e,[{key:"calculateTargetCount",value:function(e,t){return this.Dn.Cn(e).next((function(e){return Math.floor(t/100*e)}))}},{key:"nthSequenceNumber",value:function(e,t){var n=this;if(0===t)return ni.resolve(K.A);var r=new ma(t);return this.Dn.forEachTarget(e,(function(e){return r.Pn(e.sequenceNumber)})).next((function(){return n.Dn.xn(e,(function(e){return r.Pn(e)}))})).next((function(){return r.maxValue}))}},{key:"removeTargets",value:function(e,t,n){return this.Dn.removeTargets(e,t,n)}},{key:"removeOrphanedDocuments",value:function(e,t){return this.Dn.removeOrphanedDocuments(e,t)}},{key:"collect",value:function(e,t){var n=this;return-1===this.params.cacheSizeCollectionThreshold?(S("LruGarbageCollector","Garbage collection skipped; disabled"),ni.resolve(Zi)):this.getCacheSize(e).next((function(r){return r<n.params.cacheSizeCollectionThreshold?(S("LruGarbageCollector","Garbage collection skipped; Cache size ".concat(r," is lower than threshold ").concat(n.params.cacheSizeCollectionThreshold)),Zi):n.Nn(e,t)}))}},{key:"getCacheSize",value:function(e){return this.Dn.getCacheSize(e)}},{key:"Nn",value:function(e,t){var n,r,i,a,o,u,s,c=this,l=Date.now();return this.calculateTargetCount(e,this.params.percentileToCollect).next((function(t){return t>c.params.maximumSequenceNumbersToCollect?(S("LruGarbageCollector","Capping sequence numbers to collect down to the maximum of ".concat(c.params.maximumSequenceNumbersToCollect," from ").concat(t)),r=c.params.maximumSequenceNumbersToCollect):r=t,a=Date.now(),c.nthSequenceNumber(e,r)})).next((function(r){return n=r,o=Date.now(),c.removeTargets(e,n,t)})).next((function(t){return i=t,u=Date.now(),c.removeOrphanedDocuments(e,n)})).next((function(e){return s=Date.now(),j()<=g.a.DEBUG&&S("LruGarbageCollector","LRU Garbage Collection\n\tCounted targets in ".concat(a-l,"ms\n\tDetermined least recently used ").concat(r," in ")+(o-a)+"ms\n"+"\tRemoved ".concat(i," targets in ")+(u-
2o)+"ms\n"+"\tRemoved ".concat(e," documents in ")+(s-u)+"ms\n"+"Total Duration: ".concat(s-l,"ms")),ni.resolve({didRun:!0,sequenceNumbersCollected:r,targetsRemoved:i,documentsRemoved:e})}))}}]),e}(),ba=function(){function e(t,n){Object(p.a)(this,e),this.db=t,this.garbageCollector=function(e,t){return new ga(e,t)}(this,n)}return Object(v.a)(e,[{key:"Cn",value:function(e){var t=this.kn(e);return this.db.getTargetCache().getTargetCount(e).next((function(e){return t.next((function(t){return e+t}))}))}},{key:"kn",value:function(e){var t=0;return this.xn(e,(function(e){t++})).next((function(){return t}))}},{key:"forEachTarget",value:function(e,t){return this.db.getTargetCache().forEachTarget(e,t)}},{key:"xn",value:function(e,t){return this.Mn(e,(function(e,n){return t(n)}))}},{key:"addReference",value:function(e,t,n){return ka(e,n)}},{key:"removeReference",value:function(e,t,n){return ka(e,n)}},{key:"removeTargets",value:function(e,t,n){return this.db.getTargetCache().removeTargets(e,t,n)}},{key:"markPotentiallyOrphaned",value:function(e,t){return ka(e,t)}},{key:"On",value:function(e,t){return function(e,t){var n=!1;return ua(e).zt((function(r){return ia(e,r,t).next((function(e){return e&&(n=!0),ni.resolve(!e)}))})).next((function(){return n}))}(e,t)}},{key:"removeOrphanedDocuments",value:function(e,t){var n=this,r=this.db.getRemoteDocumentCache().newChangeBuffer(),i=[],a=0;return this.Mn(e,(function(o,u){if(u<=t){var s=n.On(e,o).next((function(t){if(!t)return a++,r.getEntry(e,o).next((function(){return r.removeEntry(o,Z.min()),ha(e).delete([0,Tr(o.path)])}))}));i.push(s)}})).next((function(){return ni.waitFor(i)})).next((function(){return r.apply(e)})).next((function(){return a}))}},{key:"removeTarget",value:function(e,t){var n=t.withSequenceNumber(e.currentSequenceNumber);return this.db.getTargetCache().updateTargetData(e,n)}},{key:"updateLimboDocument",value:function(e,t){return ka(e,t)}},{key:"Mn",value:function(e,t){var n,r=ha(e),i=K.A;return r.Wt({index:"documentTargetsIndex"},(function(e,r){var a=Object(o.a)(e,2),u=a[0],s=(a[1],r.path),c=r.sequenceNumber;0===u?(i!==K.A&&t(new Oe(Ar(n)),i),i=c,n=s):i=K.A})).next((function(){i!==K.A&&t(new Oe(Ar(n)),i)}))}},{key:"getCacheSize",value:function(e){return this.db.getRemoteDocumentCache().getSize(e)}}]),e}();function ka(e,t){return ha(e).put(function(e,t){return{targetId:0,path:Tr(e.path),sequenceNumber:t}}(t,e.currentSequenceNumber))}var wa=function(){function e(){Object(p.a)(this,e),this.changes=new Cn((function(e){return e.toString()}),(function(e,t){return e.isEqual(t)})),this.changesApplied=!1}return Object(v.a)(e,[{key:"addEntry",value:function(e){this.assertNotApplied(),this.changes.set(e.key,e)}},{key:"removeEntry",value:function(e,t){this.assertNotApplied(),this.changes.set(e,Ke.newInvalidDocument(e).setReadTime(t))}},{key:"getEntry",value:function(e,t){this.assertNotApplied();var n=this.changes.get(t);return void 0!==n?ni.resolve(n):this.getFromCache(e,t)}},{key:"getEntries",value:function(e,t){return this.getAllFromCache(e,t)}},{key:"apply",value:function(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}},{key:"assertNotApplied",value:function(){}}]),e}(),Oa=function(){function e(t){Object(p.a)(this,e),this.M=t}return Object(v.a)(e,[{key:"setIndexManager",value:function(e){this.indexManager=e}},{key:"addEntry",value:function(e,t,n){return ja(e).put(n)}},{key:"removeEntry",value:function(e,t,n){return ja(e).delete(function(e,t){var n=e.path.toArray();return[n.slice(0,n.length-2),n[n.length-2],ki(t),n[n.length-1]]}(t,n))}},{key:"updateMetadata",value:function(e,t){var n=this;return this.getMetadata(e).next((function(r){return r.byteSize+=t,n.Fn(e,r)}))}},{key:"getEntry",value:function(e,t){var n=this,r=Ke.newInvalidDocument(t);return ja(e).Wt({index:"documentKeyIndex",range:IDBKeyRange.only(Ea(t))},(function(e,i){r=n.$n(t,i)})).next((function(){return r}))}},{key:"Bn",value:function(e,t){var n=this,r={size:0,document:Ke.newInvalidDocument(t)};return ja(e).Wt({index:"documentKeyIndex",range:IDBKeyRange.only(Ea(t))},(function(e,i){r={document:n.$n(t,i),size:na(i)}})).next((function(){return r}))}},{key:"getEntries",value:function(e,t){var n=this,r=Rn();return this.Ln(e,t,(function(e,t){var i=n.$n(e,t);r=r.insert(e,i)})).next((function(){return r}))}},{key:"Un",value:function(e,t){var n=this,r=Rn(),i=new nt(Oe.comparator);return this.Ln(e,t,(function(e,t){var a=n.$n(e,t);r=r.insert(e,a),i=i.insert(e,na(t))})).next((function(){return{documents:r,qn:i}}))}},{key:"Ln",value:function(e,t,n){if(t.isEmpty())return ni.resolve();var r=new at(Ta);t.forEach((function(e){return r=r.add(e)}));var i=IDBKeyRange.bound(Ea(r.first()),Ea(r.last())),a=r.getIterator(),o=a.getNext();return ja(e).Wt({index:"documentKeyIndex",range:i},(function(e,t,r){for(var i=Oe.fromSegments([].concat(Object(d.a)(t.prefixPath),[t.collectionGroup,t.documentId]));o&&Ta(o,i)<0;)n(o,null),o=a.getNext();o&&o.isEqual(i)&&(n(o,t),o=a.hasNext()?a.getNext():null),o?r.Ut(Ea(o)
2):r.done()})).next((function(){for(;o;)n(o,null),o=a.hasNext()?a.getNext():null}))}},{key:"getAllFromCollection",value:function(e,t,n){var r=this,i=[t.popLast().toArray(),t.lastSegment(),ki(n.readTime),n.documentKey.path.isEmpty()?"":n.documentKey.path.lastSegment()],a=[t.popLast().toArray(),t.lastSegment(),[Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],""];return ja(e).qt(IDBKeyRange.bound(i,a,!0)).next((function(e){var t,n=Rn(),i=Object(u.a)(e);try{for(i.s();!(t=i.n()).done;){var a=t.value,o=r.$n(Oe.fromSegments(a.prefixPath.concat(a.collectionGroup,a.documentId)),a);n=n.insert(o.key,o)}}catch(s){i.e(s)}finally{i.f()}return n}))}},{key:"getAllFromCollectionGroup",value:function(e,t,n,r){var i=this,a=Rn(),o=Sa(t,n),u=Sa(t,et.max());return ja(e).Wt({index:"collectionGroupIndex",range:IDBKeyRange.bound(o,u,!0)},(function(e,t,n){var o=i.$n(Oe.fromSegments(t.prefixPath.concat(t.collectionGroup,t.documentId)),t);(a=a.insert(o.key,o)).size===r&&n.done()})).next((function(){return a}))}},{key:"newChangeBuffer",value:function(e){return new xa(this,!!e&&e.trackRemovals)}},{key:"getSize",value:function(e){return this.getMetadata(e).next((function(e){return e.byteSize}))}},{key:"getMetadata",value:function(e){return _a(e).get("remoteDocumentGlobalKey").next((function(e){return R(!!e),e}))}},{key:"Fn",value:function(e,t){return _a(e).put("remoteDocumentGlobalKey",t)}},{key:"$n",value:function(e,t){if(t){var n=function(e,t){var n;if(t.document)n=hr(e.Jt,t.document,!!t.hasCommittedMutations);else if(t.noDocument){var r=Oe.fromSegments(t.noDocument.path),i=Oi(t.noDocument.readTime);n=Ke.newNoDocument(r,i),t.hasCommittedMutations&&n.setHasCommittedMutations()}else{if(!t.unknownDocument)return A();var a=Oe.fromSegments(t.unknownDocument.path),o=Oi(t.unknownDocument.version);n=Ke.newUnknownDocument(a,o)}return t.readTime&&n.setReadTime(function(e){var t=new J(e[0],e[1]);return Z.fromTimestamp(t)}(t.readTime)),n}(this.M,t);if(!n.isNoDocument()||!n.version.isEqual(Z.min()))return n}return Ke.newInvalidDocument(e)}}]),e}(),xa=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r){var i;return Object(p.a)(this,n),(i=t.call(this)).Kn=e,i.trackRemovals=r,i.Gn=new Cn((function(e){return e.toString()}),(function(e,t){return e.isEqual(t)})),i}return Object(v.a)(n,[{key:"applyChanges",value:function(e){var t=this,n=[],r=0,i=new at((function(e,t){return Q(e.canonicalString(),t.canonicalString())}));
2return this.changes.forEach((function(a,o){var u=t.Gn.get(a);if(n.push(t.Kn.removeEntry(e,a,u.readTime)),o.isValidDocument()){var s=bi(t.Kn.M,o);i=i.add(a.path.popLast());var c=na(s);r+=c-u.size,n.push(t.Kn.addEntry(e,a,s))}else if(r-=u.size,t.trackRemovals){var l=bi(t.Kn.M,o.convertToNoDocument(Z.min()));n.push(t.Kn.addEntry(e,a,l))}})),i.forEach((function(r){n.push(t.Kn.indexManager.addToCollectionParentIndex(e,r))})),n.push(this.Kn.updateMetadata(e,r)),ni.waitFor(n)}},{key:"getFromCache",value:function(e,t){var n=this;return this.Kn.Bn(e,t).next((function(e){return n.Gn.set(t,{size:e.size,readTime:e.document.readTime}),e.document}))}},{key:"getAllFromCache",value:function(e,t){var n=this;return this.Kn.Un(e,t).next((function(e){var t=e.documents;return e.qn.forEach((function(e,r){n.Gn.set(e,{size:r,readTime:t.get(e).readTime})})),t}))}}]),n}(wa);function _a(e){return di(e,"remoteDocumentGlobal")}function ja(e){return di(e,"remoteDocumentsV14")}function Ea(e){var t=e.path.toArray();return[t.slice(0,t.length-2),t[t.length-2],t[t.length-1]]}function Sa(e,t){var n=t.documentKey.path.toArray();return[e,ki(t.readTime),n.slice(0,n.length-2),n.length>0?n[n.length-1]:""]}function Ta(e,t){for(var n=e.path.toArray(),r=t.path.toArray(),i=0,a=0;a<n.length-2&&a<r.length-2;++a)if(i=Q(n[a],r[a]))return i;return(i=Q(n.length,r.length))||((i=Q(n[n.length-2],r[r.length-2]))||Q(n[n.length-1],r[r.length-1]))}var Ia=function(){function e(t){Object(p.a)(this,e),this.M=t}return Object(v.a)(e,[{key:"kt",value:function(e,t,n,r){var i=this,a=new ri("createOrUpgrade",t);n<1&&r>=1&&(function(e){e.createObjectStore("owner")}(e),function(e){e.createObjectStore("mutationQueues",{keyPath:"userId"}),e.createObjectStore("mutations",{keyPath:"batchId",autoIncrement:!0}).createIndex("userMutationsIndex",Rr,{unique:!0}),e.createObjectStore("documentMutations")}(e),Ca(e),function(e){e.createObjectStore("remoteDocuments")}(e));var o=ni.resolve();return n<3&&r>=3&&(0!==n&&(function(e){e.deleteObjectStore("targetDocuments"),e.deleteObjectStore("targets"),e.deleteObjectStore("targetGlobal")}(e),Ca(e)),o=o.next((function(){return function(e){var t=e.store("targetGlobal"),n={highestTargetId:0,highestListenSequenceNumber:0,lastRemoteSnapshotVersion:Z.min().toTimestamp(),targetCount:0};return t.put("targetGlobalKey",n)}(a)}))),n<4&&r>=4&&(0!==n&&(o=o.next((function(){return function(e,t){return t.store("mutations").qt().next((function(n){e.deleteObjectStore("mutations"),e.createObjectStore("mutations",{keyPath:"batchId",autoIncrement:!0}).createIndex("userMutationsIndex",Rr,{unique:!0});var r=t.store("mutations"),i=n.map((function(e){return r.put(e)}));return ni.waitFor(i)}))}(e,a)}))),o=o.next((function(){!function(e){e.createObjectStore("clientMetadata",{keyPath:"clientId"})}(e)}))),n<5&&r>=5&&(o=o.next((function(){return i.Qn(a)}))),n<6&&r>=6&&(o=o.next((function(){return function(e){e.createObjectStore("remoteDocumentGlobal")}(e),i.jn(a)}))),n<7&&r>=7&&(o=o.next((function(){return i.Wn(a)}))),n<8&&r>=8&&(o=o.next((function(){return i.zn(e,a)}))),n<9&&r>=9&&(o=o.next((function(){!function(e){e.objectStoreNames.contains("remoteDocumentChanges")&&e.deleteObjectStore("remoteDocumentChanges")}(e)}))),n<10&&r>=10&&(o=o.next((function(){return i.Hn(a)}))),n<11&&r>=11&&(o=o.next((function(){!function(e){e.createObjectStore("bundles",{keyPath:"bundleId"})}(e),function(e){e.createObjectStore("namedQueries",{keyPath:"name"})}(e)}))),n<12&&r>=12&&(o=o.next((function(){!function(e){var t=e.createObjectStore("documentOverlays",{keyPath:Gr});t.createIndex("collectionPathOverlayIndex",$r,{unique:!1}),t.createIndex("collectionGroupOverlayIndex",Qr,{unique:!1})}(e)}))),n<13&&r>=13&&(o=o.next((function(){return function(e){var t=e.createObjectStore("remoteDocumentsV14",{keyPath:Lr});t.createIndex("documentKeyIndex",Mr),t.createIndex("collectionGroupIndex",Fr)}(e)})).next((function(){return i.Jn(e,a)})).next((function(){return e.deleteObjectStore("remoteDocuments")}))),n<14&&r>=14&&(o=o.next((function(){!function(e){e.createObjectStore("indexConfiguration",{keyPath:"indexId",autoIncrement:!0}).createIndex("collectionGroupIndex","collectionGroup",{unique:!1}),e.createObjectStore("indexState",{keyPath:qr}).createIndex("sequenceNumberIndex",Wr,{unique:!1}),e.createObjectStore("indexEntries",{keyPath:Hr}).createIndex("documentKeyIndex",Kr,{unique:!1})}(e)}))),o}},{key:"jn",value:function(e){var t=0;return e.store("remoteDocuments").Wt((function(e,n){t+=na(n)})).next((function(){var n={byteSize:t};return e.store("remoteDocumentGlobal").put("remoteDocumentGlobalKey",n)}
2))}},{key:"Qn",value:function(e){var t=this,n=e.store("mutationQueues"),r=e.store("mutations");return n.qt().next((function(n){return ni.forEach(n,(function(n){var i=IDBKeyRange.bound([n.userId,-1],[n.userId,n.lastAcknowledgedBatchId]);return r.qt("userMutationsIndex",i).next((function(r){return ni.forEach(r,(function(r){R(r.userId===n.userId);var i=xi(t.M,r);return ta(e,n.userId,i).next((function(){}))}))}))}))}))}},{key:"Wn",value:function(e){var t=e.store("targetDocuments"),n=e.store("remoteDocuments");return e.store("targetGlobal").get("targetGlobalKey").next((function(e){var r=[];return n.Wt((function(n,i){var a=new ie(n),o=function(e){return[0,Tr(e)]}(a);r.push(t.get(o).next((function(n){return n?ni.resolve():function(n){return t.put({targetId:0,path:Tr(n),sequenceNumber:e.highestListenSequenceNumber})}(a)})))})).next((function(){return ni.waitFor(r)}))}))}},{key:"zn",value:function(e,t){e.createObjectStore("collectionParents",{keyPath:zr});var n=t.store("collectionParents"),r=new Ki,i=function(e){if(r.add(e)){var t=e.lastSegment(),i=e.popLast();return n.put({collectionId:t,parent:Tr(i)})}};return t.store("remoteDocuments").Wt({jt:!0},(function(e,t){var n=new ie(e);return i(n.popLast())})).next((function(){return t.store("documentMutations").Wt({jt:!0},(function(e,t){var n=Object(o.a)(e,3),r=(n[0],n[1]),a=(n[2],Ar(r));return i(a.popLast())}))}))}},{key:"Hn",value:function(e){var t=this,n=e.store("targets");return n.Wt((function(e,r){var i=_i(r),a=ji(t.M,i);return n.put(a)}))}},{key:"Jn",value:function(e,t){var n=t.store("remoteDocuments"),r=[];return n.Wt((function(e,n){var i,a=t.store("remoteDocumentsV14"),o=(i=n,i.document?new Oe(ie.fromString(i.document.name).popFirst(5)):i.noDocument?Oe.fromSegments(i.noDocument.path):i.unknownDocument?Oe.fromSegments(i.unknownDocument.path):A()).path.toArray(),u={prefixPath:o.slice(0,o.length-2),collectionGroup:o[o.length-2],documentId:o[o.length-1],readTime:n.readTime||[0,0],unknownDocument:n.unknownDocument,noDocument:n.noDocument,document:n.document,hasCommittedMutations:!!n.hasCommittedMutations};r.push(a.put(u))})).next((function(){return ni.waitFor(r)}))}}]),e}();function Ca(e){e.createObjectStore("targetDocuments",{keyPath:Vr}).createIndex("documentTargetsIndex",Br,{unique:!0}),e.createObjectStore("targets",{keyPath:"targetId"}).createIndex("queryTargetsIndex",Ur,{unique:!0}),e.createObjectStore("targetGlobal")}var Aa="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.",Ra=function(){function e(t,n,r,i,a,o,u,s,c,l){var f=arguments.length>10&&void 0!==arguments[10]?arguments[10]:13;if(Object(p.a)(this,e),this.allowTabSynchronization=t,this.persistenceKey=n,this.clientId=r,this.Yn=a,this.window=o,this.document=u,this.Xn=c,this.Zn=l,this.ts=f,this.es=null,this.ns=!1,this.isPrimary=!1,this.networkEnabled=!0,this.ss=null,this.inForeground=!1,this.rs=null,this.os=null,this.us=Number.NEGATIVE_INFINITY,this.cs=function(e){return Promise.resolve()},!e.vt())throw new L(D.UNIMPLEMENTED,"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");this.referenceDelegate=new ba(this,i),this.hs=n+"main",this.M=new gi(s),this.ls=new ii(this.hs,this.ts,new Ia(this.M)),this.fs=new ca(this.referenceDelegate,this.M),this.ds=function(e){return new Oa(e)}(this.M),this._s=new Ii,this.window&&this.window.localStorage?this.ws=this.window.localStorage:(this.ws=null,!1===l&&T("IndexedDbPersistence","LocalStorage is unavailable. As a result, persistence may not work reliably. In particular enablePersistence() could fail immediately after refreshing the page."))}return Object(v.a)(e,[{key:"start",value:function(){var e=this;return this.gs().then((function(){if(!e.isPrimary&&!e.allowTabSynchronization)throw new L(D.FAILED_PRECONDITION,Aa);return e.ys(),e.ps(),e.Is(),e.runTransaction("getHighestListenSequenceNumber","readonly",(function(t){return e.fs.getHighestSequenceNumber(t)}))}
2)).then((function(t){e.es=new K(t,e.Xn)})).then((function(){e.ns=!0})).catch((function(t){return e.ls&&e.ls.close(),Promise.reject(t)}))}},{key:"Ts",value:function(e){var t=this;return this.cs=function(){var n=Object(l.a)(c.a.mark((function n(r){return c.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!t.started){n.next=2;break}return n.abrupt("return",e(r));case 2:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),e(this.isPrimary)}},{key:"setDatabaseDeletedListener",value:function(e){this.ls.Ot(function(){var t=Object(l.a)(c.a.mark((function t(n){return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.t0=null===n.newVersion,!t.t0){t.next=4;break}return t.next=4,e();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}},{key:"setNetworkEnabled",value:function(e){var t=this;this.networkEnabled!==e&&(this.networkEnabled=e,this.Yn.enqueueAndForget(Object(l.a)(c.a.mark((function e(){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=t.started,!e.t0){e.next=4;break}return e.next=4,t.gs();case 4:case"end":return e.stop()}}),e)})))))}},{key:"gs",value:function(){var e=this;return this.runTransaction("updateClientMetadataAndTryBecomePrimary","readwrite",(function(t){return Pa(t).put({clientId:e.clientId,updateTimeMs:Date.now(),networkEnabled:e.networkEnabled,inForeground:e.inForeground}).next((function(){if(e.isPrimary)return e.Es(t).next((function(t){t||(e.isPrimary=!1,e.Yn.enqueueRetryable((function(){return e.cs(!1)})))}))})).next((function(){return e.As(t)})).next((function(n){return e.isPrimary&&!n?e.Rs(t).next((function(){return!1})):!!n&&e.bs(t).next((function(){return!0}))}))})).catch((function(t){if(ui(t))return S("IndexedDbPersistence","Failed to extend owner lease: ",t),e.isPrimary;if(!e.allowTabSynchronization)throw t;return S("IndexedDbPersistence","Releasing owner lease after error during lease refresh",t),!1})).then((function(t){e.isPrimary!==t&&e.Yn.enqueueRetryable((function(){return e.cs(t)})),e.isPrimary=t}))}},{key:"Es",value:function(e){var t=this;return Na(e).get("owner").next((function(e){return ni.resolve(t.Ps(e))}))}},{key:"Vs",value:function(e){return Pa(e).delete(this.clientId)}},{key:"vs",value:function(){var e=Object(l.a)(c.a.mark((function e(){var t,n,r,i,a=this;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isPrimary||this.Ss(this.us,18e5)){e.next=6;break}return this.us=Date.now(),e.next=4,this.runTransaction("maybeGarbageCollectMultiClientState","readwrite-primary",(function(e){var t=di(e,"clientMetadata");return t.qt().next((function(e){var n=a.Ds(e,18e5),r=e.filter((function(e){return-1===n.indexOf(e)}));return ni.forEach(r,(function(e){return t.delete(e.clientId)})).next((function(){return r}))}))})).catch((function(){return[]}));case 4:if(t=e.sent,this.ws){n=Object(u.a)(t);try{for(n.s();!(r=n.n()).done;)i=r.value,this.ws.removeItem(this.Cs(i.clientId))}catch(o){n.e(o)}finally{n.f()}}case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"Is",value:function(){var e=this;this.os=this.Yn.enqueueAfterDelay("client_metadata_refresh",4e3,(function(){return e.gs().then((function(){return e.vs()})).then((function(){return e.Is()}))}))}},{key:"Ps",value:function(e){return!!e&&e.ownerId===this.clientId}},{key:"As",value:function(e){var t=this;return this.Zn?ni.resolve(!0):Na(e).get("owner").next((function(n){if(null!==n&&t.Ss(n.leaseTimestampMs,5e3)&&!t.xs(n.ownerId)){if(t.Ps(n)&&t.networkEnabled)return!0;if(!t.Ps(n)){if(!n.allowTabSynchronization)throw new L(D.FAILED_PRECONDITION,Aa);return!1}}return!(!t.networkEnabled||!t.inForeground)||Pa(e).qt().next((function(e){return void 0===t.Ds(e,5e3).find((function(e){if(t.clientId!==e.clientId){var n=!t.networkEnabled&&e.networkEnabled,r=!t.inForeground&&e.inForeground,i=t.networkEnabled===e.networkEnabled;if(n||r&&i)return!0}return!1}))}))})).next((function(e){return t.isPrimary!==e&&S("IndexedDbPersistence","Client ".concat(e?"is":"is not"," eligible for a primary lease.")),e}))}},{key:"shutdown",value:function(){var e=Object(l.a)(c.a.mark((function e(){var t=this;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.ns=!1,this.Ns(),this.os&&(this.os.cancel(),this.os=null),this.ks(),this.Ms(),e.next=7,this.ls.runTransaction("shutdown","readwrite",["owner","clientMetadata"],(function(e){var n=new hi(e,K.A);return t.Rs(n).next((function(){return t.Vs(n)}))}));case 7:this.ls.close(),this.Os();case 9:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"Ds",value:function(e,t){var n=this;return e.filter((function(e){return n.Ss(e.updateTimeMs,t)&&!n.xs(e.clientId)}))}},{key:"Fs",value:function(){var e=this;return this.runTransaction("getActiveClients","readonly",(function(t){return Pa(t).qt().next((function(t){return e.Ds(t,18e5).map((function(e){return e.clientId}))}))}))}},{key:"started",get:function(){return this.ns}},{key:"getMutationQueue",value:function(e,t){return ra.Yt(e,this.M,t,this.referenceDelegate)}},{key:"getTargetCache",value:function(){return this.fs}},{key:"getRemoteDocumentCache",value:function(){return this.ds}},{key:"getIndexManager",value:function(e){return new $i(e,this.M.Jt.databaseId)}},{key:"getDocumentOverlayCache",value:function(e){return Ri.Yt(this.M,e)}},{key:"getBundleCache",value:function(){return this._s}},{key:"runTransaction",value:function(e,t,n){var r=this;S("IndexedDbPersistence","Starting transaction:",e);var i,a,o="readonly"===t?"readonly":"readwrite",u=14===(i=this.ts)?Zr:13===i?Jr:12===i?Xr:11===i?Yr:void A();return this.ls.runTransaction(e,o,u,(function(i){return a=new hi(i,r.es?r.es.next():K.A),"readwrite-primary"===t?r.Es(a).next((function(e){return!!e||r.As(a)})).next((function(t){if(!t)throw T("Failed to obtain primary lease for action '".concat(e,"'.")),r.isPrimary=!1,r.Yn.enqueueRetryable((function(){return r.cs(!1)})),new L(D.FAILED_PRECONDITION,ei);return n(a)})).next((function(e){return r.bs(a).next((function(){return e}))})):r.$s(a).next((function(){return n(a)}))})).then((function(e){return a.raiseOnCommittedEvent(),e}))}},{key:"$s",value:function(e){var t=this;return Na(e).get("owner").next((function(e){if(null!==e&&t.Ss(e.leaseTimestampMs,5e3)&&!t.xs(e.ownerId)&&!t.Ps(e)&&!(t.Zn||t.allowTabSynchronization&&e.allowTabSynchronization))throw new L(D.FAILED_PRECONDITION,Aa)}))}},{key:"bs",value:function(e){var t={ownerId:this.clientId,allowTabSynchronization:this.allowTabSynchronization,leaseTimestampMs:Date.now()};return Na(e).put("owner",t)}},{key:"Rs",value:function(e){var t=this,n=Na(e);return n.get("owner").next((function(e){return t.Ps(e)?(S("IndexedDbPersistence","Releasing primary lease."),n.delete("owner")):ni.resolve()}))}},{key:"Ss",value:function(e,t){var n=Date.now();return!(e<n-t)&&(!(e>n)||(T("Detected an update time that is in the future: ".concat(e," > ").concat(n)),!1))}},{key:"ys",value:function(){var e=this;null!==this.document&&"function"==typeof this.document.addEventListener&&(this.rs=function(){e.Yn.enqueueAndForget((function(){return e.inForeground="visible"===e.document.visibilityState,e.gs()}))},this.document.addEventListener("visibilitychange",this.rs),this.inForeground="visible"===this.document.visibilityState)}},{key:"ks",value:function(){this.rs&&(this.document.removeEventListener("visibilitychange",this.rs),this.rs=null)}},{key:"ps",value:function(){var e,t=this;"function"==typeof(null===(e=this.window)||void 0===e?void 0:e.addEventListener)&&(this.ss=function(){t.Ns(),Object(b.w)()&&navigator.appVersion.match(/Version\/1[45]/)&&t.Yn.enterRestrictedMode(!0),t.Yn.enqueueAndForget((function(){return t.shutdown()}))},this.window.addEventListener("pagehide",this.ss))}},{key:"Ms",value:function(){this.ss&&(this.window.removeEventListener("pagehide",this.ss),this.ss=null)}},{key:"xs",value:function(e){var t;try{var n=null!==(null===(t=this.ws)||void 0===t?void 0:t.getItem(this.Cs(e)));return S("IndexedDbPersistence","Client '".concat(e,"' ").concat(n?"is":"is not"," zombied in LocalStorage")),n}catch(e){return T("IndexedDbPersistence","Failed to get zombied client id.",e),!1}}},{key:"Ns",value:function(){if(this.ws)try{this.ws.setItem(this.Cs(this.clientId),String(Date.now()))}catch(e){T("Failed to set zombie client id.",e)}}},{key:"Os",value:function(){if(this.ws)try{this.ws.removeItem(this.Cs(this.clientId))}catch(e){}}},{key:"Cs",value:function(e){return"firestore_zombie_".concat(this.persistenceKey,"_").concat(e)}}],[{key:"vt",value:function(){return ii.vt()}}]),e}();function Na(e){return di(e,"owner")}function Pa(e){return di(e,"clientMetadata")}function Da(e,t){var n=e.projectId;return e.isDefaultDatabase||(n+="."+e.database),"firestore/"+t+"/"+n+"/"}var La=function(){function e(t,n,r){Object(p.a)(this,e),this.ds=t,this.Bs=n,this.indexManager=r}return Object(v.a)(e,[{key:"Ls",value:function(e,t){var n=this;return this.Bs.getAllMutationBatchesAffectingDocumentKey(e,t).next((function(r){return n.Us(e,t,r)}))}},{key:"Us",value:function(e,t,n){return this.ds.getEntry(e,t).next((function(e){var t,r=Object(u.a)(n);try{for(r.s();!(t=r.n()).done;
2){t.value.applyToLocalView(e)}}catch(i){r.e(i)}finally{r.f()}return e}))}},{key:"qs",value:function(e,t){e.forEach((function(e,n){var r,i=Object(u.a)(t);try{for(i.s();!(r=i.n()).done;){r.value.applyToLocalView(n)}}catch(a){i.e(a)}finally{i.f()}}))}},{key:"Ks",value:function(e,t){var n=this;return this.ds.getEntries(e,t).next((function(t){return n.Gs(e,t).next((function(){return t}))}))}},{key:"Gs",value:function(e,t){var n=this;return this.Bs.getAllMutationBatchesAffectingDocumentKeys(e,t).next((function(e){return n.qs(t,e)}))}},{key:"Qs",value:function(e,t,n){return function(e){return Oe.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}(t)?this.js(e,t.path):Dt(t)?this.Ws(e,t,n):this.zs(e,t,n)}},{key:"js",value:function(e,t){return this.Ls(e,new Oe(t)).next((function(e){var t=Pn();return e.isFoundDocument()&&(t=t.insert(e.key,e)),t}))}},{key:"Ws",value:function(e,t,n){var r=this,i=t.collectionGroup,a=Pn();return this.indexManager.getCollectionParents(e,i).next((function(o){return ni.forEach(o,(function(o){var u=function(e,t){return new Ct(t,null,e.explicitOrderBy.slice(),e.filters.slice(),e.limit,e.limitType,e.startAt,e.endAt)}(t,o.child(i));return r.zs(e,u,n).next((function(e){e.forEach((function(e,t){a=a.insert(e,t)}))}))})).next((function(){return a}))}))}},{key:"zs",value:function(e,t,n){var r,i=this;return this.ds.getAllFromCollection(e,t.path,n).next((function(n){return r=n,i.Bs.getAllMutationBatchesAffectingQuery(e,t)})).next((function(e){var t,n=Object(u.a)(e);try{for(n.s();!(t=n.n()).done;){var i,a=t.value,o=Object(u.a)(a.mutations);try{for(o.s();!(i=o.n()).done;){var s=i.value,c=s.key,l=r.get(c);null==l&&(l=Ke.newInvalidDocument(c),r=r.insert(c,l)),pn(s,l,a.localWriteTime),l.isFoundDocument()||(r=r.remove(c))}}catch(f){o.e(f)}finally{o.f()}}}catch(f){n.e(f)}finally{n.f()}})).next((function(){return r.forEach((function(e,n){zt(t,n)||(r=r.remove(e))})),r}))}}]),e}(),Ma=function(){function e(t,n,r,i){Object(p.a)(this,e),this.targetId=t,this.fromCache=n,this.Hs=r,this.Js=i}return Object(v.a)(e,null,[{key:"Ys",value:function(t,n){var r,i=Fn(),a=Fn(),o=Object(u.a)(n.docChanges);try{for(o.s();!(r=o.n()).done;){var s=r.value;switch(s.type){case 0:i=i.add(s.doc.key);break;case 1:a=a.add(s.doc.key)}}}catch(c){o.e(c)}finally{o.f()}return new e(t,n.fromCache,i,a)}}]),e}(),Fa=function(){function e(){Object(p.a)(this,e),this.Xs=!1}return Object(v.a)(e,[{key:"initialize",value:function(e,t){this.Zs=e,this.indexManager=t,this.Xs=!0}},{key:"Qs",value:function(e,t,n,r){var i=this;return this.ti(e,t).next((function(a){return a||i.ei(e,t,r,n)})).next((function(n){return n||i.ni(e,t)}))}},{key:"ti",value:function(e,t){return ni.resolve(null)}},{key:"ei",value:function(e,t,n,r){var i=this;return function(e){return 0===e.filters.length&&null===e.limit&&null==e.startAt&&null==e.endAt&&(0===e.explicitOrderBy.length||1===e.explicitOrderBy.length&&e.explicitOrderBy[0].field.isKeyField())}(t)||r.isEqual(Z.min())?this.ni(e,t):this.Zs.Ks(e,n).next((function(a){var o=i.si(t,a);return i.ii(t,o,n,r)?i.ni(e,t):(j()<=g.a.DEBUG&&S("QueryEngine","Re-using previous result from %s to execute query: %s",r.toString(),Bt(t)),i.ri(e,o,t,Je(r,-1)))}))}},{key:"si",value:function(e,t){var n=new at(Wt(e));return t.forEach((function(t,r){zt(e,r)&&(n=n.add(r))})),n}},{key:"ii",value:function(e,t,n,r){if(null===e.limit)return!1;if(n.size!==t.size)return!0;var i="F"===e.limitType?t.last():t.first();return!!i&&(i.hasPendingWrites||i.version.compareTo(r)>0)}},{key:"ni",value:function(e,t){return j()<=g.a.DEBUG&&S("QueryEngine","Using full collection scan to execute query:",Bt(t)),this.Zs.Qs(e,t,et.min())}},{key:"ri",value:function(e,t,n,r){return this.Zs.Qs(e,n,r).next((function(e){return t.forEach((function(t){e=e.insert(t.key,t)})),e}))}}]),e}(),Ua=function(){function e(t,n,r,i){Object(p.a)(this,e),this.persistence=t,this.oi=n,this.M=i,this.ui=new nt(Q),this.ai=new Cn((function(e){return lt(e)}),ft),this.ci=new Map,this.hi=t.getRemoteDocumentCache(),this.fs=t.getTargetCache(),this._s=t.getBundleCache(),this.li(r)}return Object(v.a)(e,[{key:"li",value:function(e){this.indexManager=this.persistence.getIndexManager(e),this.Bs=this.persistence.getMutationQueue(e,this.indexManager),this.fi=new La(this.hi,this.Bs,this.indexManager),this.hi.setIndexManager(this.indexManager),this.oi.initialize(this.fi,this.indexManager)}},{key:"collectGarbage",value:function(e){var t=this;return this.persistence.runTransaction("Collect garbage","readwrite-primary",(function(n){return e.collect(n,t.ui)}))}}]),e}();function Va(e,t,n,r){return new Ua(e,t,n,r)}function Ba(e,t){return za.apply(this,arguments)}function za(){return(za=Object(l.a)(c.a.mark((function e(t,n){var r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=P(t),e.next=3,r.persistence.runTransaction("Handle user change","readonly",(function(e){var t;return r.Bs.getAllMutationBatches(e).next((function(i){return t=i,r.li(n),r.Bs.getAllMutationBatches(e)})).next((function(n){var i,a=[],o=[],s=Fn(),c=Object(u.a)(t);try{for(c.s();!(i=c.n()).done;){var l=i.value;a.push(l.batchId);var f,h=Object(u.a)(l.mutations);try{for(h.s();!(f=h.n()).done;){var d=f.value;s=s.add(d.key)}}catch(k){h.e(k)}finally{h.f()}}}catch(k){c.e(k)}finally{c.f()}var p,v=Object(u.a)(n);try{for(v.s();!(p=v.n()).done;){var m=p.value;o.push(m.batchId);var y,g=Object(u.a)(m.mutations);try{for(g.s();!(y=g.n()).done;){var b=y.value;s=s.add(b.key)}}catch(k){g.e(k)}finally{g.f()}}}catch(k){v.e(k)}finally{v.f()}return r.fi.Ks(e,s).next((function(e){return{di:e,removedBatchIds:a,addedBatchIds:o}}))}))}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qa(e,t){var n=P(e);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",(function(e){var r=t.batch.keys(),i=n.hi.newChangeBuffer({trackRemovals:!0});return function(e,t,n,r){var i=n.batch,a=i.keys(),o=ni.resolve();return a.forEach((function(e){o=o.next((function(){return r.getEntry(t,e)})).next((function(t){var a=n.docVersions.get(e);R(null!==a),t.version.compareTo(a)<0&&(i.applyToRemoteDocument(t,n),t.isValidDocument()&&
2(t.setReadTime(n.commitVersion),r.addEntry(t)))}))})),o.next((function(){return e.Bs.removeMutationBatch(t,i)}))}(n,e,t,i).next((function(){return i.apply(e)})).next((function(){return n.Bs.performConsistencyCheck(e)})).next((function(){return n.fi.Ks(e,r)}))}))}function Wa(e){var t=P(e);return t.persistence.runTransaction("Get last remote snapshot version","readonly",(function(e){return t.fs.getLastRemoteSnapshotVersion(e)}))}function Ha(e,t){var n=P(e),r=t.snapshotVersion,i=n.ui;return n.persistence.runTransaction("Apply remote event","readwrite-primary",(function(e){var a=n.hi.newChangeBuffer({trackRemovals:!0});i=n.ui;var o=[];t.targetChanges.forEach((function(a,u){var s=i.get(u);if(s){o.push(n.fs.removeMatchingKeys(e,a.removedDocuments,u).next((function(){return n.fs.addMatchingKeys(e,a.addedDocuments,u)})));var c=s.withSequenceNumber(e.currentSequenceNumber);t.targetMismatches.has(u)?c=c.withResumeToken(ce.EMPTY_BYTE_STRING,Z.min()).withLastLimboFreeSnapshotVersion(Z.min()):a.resumeToken.approximateByteSize()>0&&(c=c.withResumeToken(a.resumeToken,r)),i=i.insert(u,c),function(e,t,n){return 0===e.resumeToken.approximateByteSize()||(t.snapshotVersion.toMicroseconds()-e.snapshotVersion.toMicroseconds()>=3e8||n.addedDocuments.size+n.modifiedDocuments.size+n.removedDocuments.size>0)}(s,c,a)&&o.push(n.fs.updateTargetData(e,c))}}));var u=Rn();if(t.documentUpdates.forEach((function(r){t.resolvedLimboDocuments.has(r)&&o.push(n.persistence.referenceDelegate.updateLimboDocument(e,r))})),o.push(Ka(e,a,t.documentUpdates).next((function(e){u=e}))),!r.isEqual(Z.min())){var s=n.fs.getLastRemoteSnapshotVersion(e).next((function(t){return n.fs.setTargetsMetadata(e,e.currentSequenceNumber,r)}));o.push(s)}return ni.waitFor(o).next((function(){return a.apply(e)})).next((function(){return n.fi.Gs(e,u)})).next((function(){return u}))})).then((function(e){return n.ui=i,e}))}function Ka(e,t,n){var r=Fn();return n.forEach((function(e){return r=r.add(e)})),t.getEntries(e,r).next((function(e){var r=Rn();return n.forEach((function(n,i){var a=e.get(n);i.isNoDocument()&&i.version.isEqual(Z.min())?(t.removeEntry(n,i.readTime),r=r.insert(n,i)):!a.isValidDocument()||i.version.compareTo(a.version)>0||0===i.version.compareTo(a.version)&&a.hasPendingWrites?(t.addEntry(i),r=r.insert(n,i)):S("LocalStore","Ignoring outdated watch update for ",n,". Current version:",a.version," Watch version:",i.version)})),r}))}function Ga(e,t){var n=P(e);return n.persistence.runTransaction("Get next mutation batch","readonly",(function(e){return void 0===t&&(t=-1),n.Bs.getNextMutationBatchAfterBatchId(e,t)}))}function $a(e,t){var n=P(e);return n.persistence.runTransaction("Allocate target","readwrite",(function(e){var r;return n.fs.getTargetData(e,t).next((function(i){return i?(r=i,ni.resolve(r)):n.fs.allocateTargetId(e).next((function(i){return r=new yi(t,i,0,e.currentSequenceNumber),n.fs.addTargetData(e,r).next((function(){return r}))}))}))})).then((function(e){var r=n.ui.get(e.targetId);return(null===r||e.snapshotVersion.compareTo(r.snapshotVersion)>0)&&(n.ui=n.ui.insert(e.targetId,e),n.ai.set(t,e.targetId)),e}))}function Qa(e,t,n){return Ya.apply(this,arguments)}function Ya(){return(Ya=Object(l.a)(c.a.mark((function e(t,n,r){var i,a,o;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=P(t),a=i.ui.get(n),o=r?"readwrite":"readwrite-primary",e.prev=1,e.t0=r,e.t0){e.next=6;break}return e.next=6,i.persistence.runTransaction("Release target",o,(function(e){return i.persistence.referenceDelegate.removeTarget(e,a)}));case 6:e.next=13;break;case 8:if(e.prev=8,e.t1=e.catch(1),ui(e.t1)){e.next=12;break}throw e.t1;case 12:S("LocalStore","Failed to update sequence numbers for target ".concat(n,": ").concat(e.t1));case 13:i.ui=i.ui.remove(n),i.ai.delete(a.target);case 14:case"end":return e.stop()}}),e,null,[[1,8]])})))).apply(this,arguments)}function Xa(e,t,n){var r=P(e),i=Z.min(),a=Fn();return r.persistence.runTransaction("Execute query","readonly",(function(e){return function(e,t,n){var r=P(e),i=r.ai.get(n);return void 0!==i?ni.resolve(r.ui.get(i)):r.fs.getTargetData(t,n)}(r,e,Mt(t)).next((function(t){if(t)return i=t.lastLimboFreeSnapshotVersion,r.fs.getMatchingKeysForTargetId(e,t.targetId).next((function(e){a=e}))})).next((function(){return r.oi.Qs(e,t,n?i:Z.min(),n?a:Fn())})).next((function(e){return eo(r,qt(t),e),{documents:e,_i:a}}))}))}function Ja(e,t){var n=P(e),r=P(n.fs),i=n.ui.get(t);return i?Promise.resolve(i.target):n.persistence.runTransaction("Get target data","readonly",(function(e){return r.Et(e,t).next((function(e){return e?e.target:null}))}))}function Za(e,t){var n=P(e),r=n.ci.get(t)||Z.min();return n.persistence.runTransaction("Get new document changes","readonly",(function(e){return n.hi.getAllFromCollectionGroup(e,t,Je(r,-1),Number.MAX_SAFE_INTEGER)})).then((function(e){return eo(n,t,e),e}))}function eo(e,t,n){var r=Z.min();
2n.forEach((function(e,t){t.readTime.compareTo(r)>0&&(r=t.readTime)})),e.ci.set(t,r)}function to(e,t,n,r){return no.apply(this,arguments)}function no(){return(no=Object(l.a)(c.a.mark((function e(t,n,r,i){var a,o,s,l,f,h,d,p,v,m;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=P(t),o=Fn(),s=Rn(),l=Object(u.a)(r);try{for(l.s();!(f=l.n()).done;)h=f.value,d=n.wi(h.metadata.name),h.document&&(o=o.add(d)),(p=n.mi(h)).setReadTime(n.gi(h.metadata.readTime)),s=s.insert(d,p)}catch(c){l.e(c)}finally{l.f()}return v=a.hi.newChangeBuffer({trackRemovals:!0}),e.next=7,$a(a,function(e){return Mt(Rt(ie.fromString("__bundle__/docs/".concat(e))))}(i));case 7:return m=e.sent,e.abrupt("return",a.persistence.runTransaction("Apply bundle documents","readwrite",(function(e){return Ka(e,v,s).next((function(t){return v.apply(e),t})).next((function(t){return a.fs.removeMatchingKeysForTargetId(e,m.targetId).next((function(){return a.fs.addMatchingKeys(e,o,m.targetId)})).next((function(){return a.fi.Gs(e,t)})).next((function(){return t}))}))})));case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ro(e,t){return io.apply(this,arguments)}function io(){return io=Object(l.a)(c.a.mark((function e(t,n){var r,i,a,o=arguments;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>2&&void 0!==o[2]?o[2]:Fn(),e.next=3,$a(t,Mt(Ei(n.bundledQuery)));case 3:return i=e.sent,a=P(t),e.abrupt("return",a.persistence.runTransaction("Save named query","readwrite",(function(e){var t=nr(n.readTime);if(i.snapshotVersion.compareTo(t)>=0)return a._s.saveNamedQuery(e,n);var o=i.withResumeToken(ce.EMPTY_BYTE_STRING,t);return a.ui=a.ui.insert(o.targetId,o),a.fs.updateTargetData(e,o).next((function(){return a.fs.removeMatchingKeysForTargetId(e,i.targetId)})).next((function(){return a.fs.addMatchingKeys(e,r,i.targetId)})).next((function(){return a._s.saveNamedQuery(e,n)}))})));case 6:case"end":return e.stop()}}),e)}))),io.apply(this,arguments)}var ao=function(){function e(t){Object(p.a)(this,e),this.M=t,this.yi=new Map,this.pi=new Map}return Object(v.a)(e,[{key:"getBundleMetadata",value:function(e,t){return ni.resolve(this.yi.get(t))}},{key:"saveBundleMetadata",value:function(e,t){var n;return this.yi.set(t.id,{id:(n=t).id,version:n.version,createTime:nr(n.createTime)}),ni.resolve()}},{key:"getNamedQuery",value:function(e,t){return ni.resolve(this.pi.get(t))}},{key:"saveNamedQuery",value:function(e,t){return this.pi.set(t.name,function(e){return{name:e.name,query:Ei(e.bundledQuery),readTime:nr(e.readTime)}}(t)),ni.resolve()}}]),e}(),oo=function(){function e(){Object(p.a)(this,e),this.overlays=new nt(Oe.comparator),this.Ii=new Map}return Object(v.a)(e,[{key:"getOverlay",value:function(e,t){return ni.resolve(this.overlays.get(t))}},{key:"saveOverlays",value:function(e,t,n){var r=this;return n.forEach((function(n,i){r.Xt(e,t,i)})),ni.resolve()}},{key:"removeOverlaysForBatchId",value:function(e,t,n){var r=this,i=this.Ii.get(n);return void 0!==i&&(i.forEach((function(e){return r.overlays=r.overlays.remove(e)})),this.Ii.delete(n)),ni.resolve()}},{key:"getOverlaysForCollection",value:function(e,t,n){for(var r=Dn(),i=t.length+1,a=new Oe(t.child("")),o=this.overlays.getIteratorFrom(a);o.hasNext();){var u=o.getNext().value,s=u.getKey();if(!t.isPrefixOf(s.path))break;s.path.length===i&&u.largestBatchId>n&&r.set(u.getKey(),u)}return ni.resolve(r)}},{key:"getOverlaysForCollectionGroup",value:function(e,t,n,r){for(var i=new nt((function(e,t){return e-t})),a=this.overlays.getIterator();a.hasNext();){var o=a.getNext().value;if(o.getKey().getCollectionGroup()===t&&o.largestBatchId>n){var u=i.get(o.largestBatchId);null===u&&(u=Dn(),i=i.insert(o.largestBatchId,u)),u.set(o.getKey(),o)}}for(var s=Dn(),c=i.getIterator();c.hasNext()&&(c.getNext().value.forEach((function(e,t){return s.set(e,t)})),!(s.size()>=r)););return ni.resolve(s)}},{key:"Xt",value:function(e,t,n){if(null!==n){var r=this.overlays.get(n.key);if(null!==r){var i=this.Ii.get(r.largestBatchId).delete(n.key);this.Ii.set(r.largestBatchId,i)}this.overlays=this.overlays.insert(n.key,new mi(t,n));var a=this.Ii.get(t);void 0===a&&(a=Fn(),this.Ii.set(t,a)),this.Ii.set(t,a.add(n.key))}}}]),e}(),uo=function(){function e(){Object(p.a)(this,e),this.Ti=new at(so.Ei),this.Ai=new at(so.Ri)}return Object(v.a)(e,[{key:"isEmpty",value:function(){return this.Ti.isEmpty()}},{key:"addReference",value:function(e,t){var n=new so(e,t);this.Ti=this.Ti.add(n),this.Ai=this.Ai.add(n)}},{key:"bi",value:function(e,t){var n=this;e.forEach((function(e){return n.addReference(e,t)}))}},{key:"removeReference",value:function(e,t){this.Pi(new so(e,t))}},{key:"Vi",value:function(e,t){var n=this;e.forEach((function(e){return n.removeReference(e,t)}))}},{key:"vi",value:function(e){var t=this,n=new Oe(new ie([])),r=new so(n,e),i=new so(n,e+1),a=[];
2return this.Ai.forEachInRange([r,i],(function(e){t.Pi(e),a.push(e.key)})),a}},{key:"Si",value:function(){var e=this;this.Ti.forEach((function(t){return e.Pi(t)}))}},{key:"Pi",value:function(e){this.Ti=this.Ti.delete(e),this.Ai=this.Ai.delete(e)}},{key:"Di",value:function(e){var t=new Oe(new ie([])),n=new so(t,e),r=new so(t,e+1),i=Fn();return this.Ai.forEachInRange([n,r],(function(e){i=i.add(e.key)})),i}},{key:"containsKey",value:function(e){var t=new so(e,0),n=this.Ti.firstAfterOrEqual(t);return null!==n&&e.isEqual(n.key)}}]),e}(),so=function(){function e(t,n){Object(p.a)(this,e),this.key=t,this.Ci=n}return Object(v.a)(e,null,[{key:"Ei",value:function(e,t){return Oe.comparator(e.key,t.key)||Q(e.Ci,t.Ci)}},{key:"Ri",value:function(e,t){return Q(e.Ci,t.Ci)||Oe.comparator(e.key,t.key)}}]),e}(),co=function(){function e(t,n){Object(p.a)(this,e),this.indexManager=t,this.referenceDelegate=n,this.Bs=[],this.xi=1,this.Ni=new at(so.Ei)}return Object(v.a)(e,[{key:"checkEmpty",value:function(e){return ni.resolve(0===this.Bs.length)}},{key:"addMutationBatch",value:function(e,t,n,r){var i=this.xi;this.xi++,this.Bs.length>0&&this.Bs[this.Bs.length-1];var a=new pi(i,t,n,r);this.Bs.push(a);var o,s=Object(u.a)(r);try{for(s.s();!(o=s.n()).done;){var c=o.value;this.Ni=this.Ni.add(new so(c.key,i)),this.indexManager.addToCollectionParentIndex(e,c.key.path.popLast())}}catch(l){s.e(l)}finally{s.f()}return ni.resolve(a)}},{key:"lookupMutationBatch",value:function(e,t){return ni.resolve(this.ki(t))}},{key:"getNextMutationBatchAfterBatchId",value:function(e,t){var n=t+1,r=this.Mi(n),i=r<0?0:r;return ni.resolve(this.Bs.length>i?this.Bs[i]:null)}},{key:"getHighestUnacknowledgedBatchId",value:function(){return ni.resolve(0===this.Bs.length?-1:this.xi-1)}},{key:"getAllMutationBatches",value:function(e){return ni.resolve(this.Bs.slice())}},{key:"getAllMutationBatchesAffectingDocumentKey",value:function(e,t){var n=this,r=new so(t,0),i=new so(t,Number.POSITIVE_INFINITY),a=[];return this.Ni.forEachInRange([r,i],(function(e){var t=n.ki(e.Ci);a.push(t)})),ni.resolve(a)}},{key:"getAllMutationBatchesAffectingDocumentKeys",value:function(e,t){var n=this,r=new at(Q);return t.forEach((function(e){var t=new so(e,0),i=new so(e,Number.POSITIVE_INFINITY);n.Ni.forEachInRange([t,i],(function(e){r=r.add(e.Ci)}))})),ni.resolve(this.Oi(r))}},{key:"getAllMutationBatchesAffectingQuery",value:function(e,t){var n=t.path,r=n.length+1,i=n;Oe.isDocumentKey(i)||(i=i.child(""));var a=new so(new Oe(i),0),o=new at(Q);return this.Ni.forEachWhile((function(e){var t=e.key.path;return!!n.isPrefixOf(t)&&(t.length===r&&(o=o.add(e.Ci)),!0)}),a),ni.resolve(this.Oi(o))}},{key:"Oi",value:function(e){var t=this,n=[];return e.forEach((function(e){var r=t.ki(e);null!==r&&n.push(r)})),n}},{key:"removeMutationBatch",value:function(e,t){var n=this;R(0===this.Fi(t.batchId,"removed")),this.Bs.shift();var r=this.Ni;return ni.forEach(t.mutations,(function(i){var a=new so(i.key,t.batchId);return r=r.delete(a),n.referenceDelegate.markPotentiallyOrphaned(e,i.key)})).next((function(){n.Ni=r}))}},{key:"_n",value:function(e){}},{key:"containsKey",value:function(e,t){var n=new so(t,0),r=this.Ni.firstAfterOrEqual(n);return ni.resolve(t.isEqual(r&&r.key))}},{key:"performConsistencyCheck",value:function(e){return this.Bs.length,ni.resolve()}},{key:"Fi",value:function(e,t){return this.Mi(e)}},{key:"Mi",value:function(e){return 0===this.Bs.length?0:e-this.Bs[0].batchId}},{key:"ki",value:function(e){var t=this.Mi(e);return t<0||t>=this.Bs.length?null:this.Bs[t]}}]),e}(),lo=function(){function e(t){Object(p.a)(this,e),this.$i=t,this.docs=new nt(Oe.comparator),this.size=0}return Object(v.a)(e,[{key:"setIndexManager",value:function(e){this.indexManager=e}},{key:"addEntry",value:function(e,t){var n=t.key,r=this.docs.get(n),i=r?r.size:0,a=this.$i(t);return this.docs=this.docs.insert(n,{document:t.mutableCopy(),size:a}),this.size+=a-i,this.indexManager.addToCollectionParentIndex(e,n.path.popLast())}},{key:"removeEntry",value:function(e){var t=this.docs.get(e);t&&(this.docs=this.docs.remove(e),this.size-=t.size)}},{key:"getEntry",value:function(e,t){var n=this.docs.get(t);return ni.resolve(n?n.document.mutableCopy():Ke.newInvalidDocument(t))}},{key:"getEntries",value:function(e,t){var n=this,r=Rn();return t.forEach((function(e){var t=n.docs.get(e);r=r.insert(e,t?t.document.mutableCopy():Ke.newInvalidDocument(e))})),ni.resolve(r)}},{key:"getAllFromCollection",value:function(e,t,n){for(var r=Rn(),i=new Oe(t.child("")),a=this.docs.getIteratorFrom(i);a.hasNext();){var o=a.getNext(),u=o.key,s=o.value.document;if(!t.isPrefixOf(u.path))break;u.path.length>t.length+1||tt(Ze(s),n)<=0||(r=r.insert(s.key,s.mutableCopy()))}return ni.resolve(r)}},{key:"getAllFromCollectionGroup",value:function(e,t,n,r){A()}},{key:"Bi",value:function(e,t){return ni.forEach(this.docs,(function(e){return t(e)}))}},{key:"newChangeBuffer",value:function(e){return new fo(this)}},{key:"getSize",value:function(e){return ni.resolve(this.size)}}]),e}(),fo=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e){var r;return Object(p.a)(this,n),(r=t.call(this)).Kn=e,r}return Object(v.a)(n,[{key:"applyChanges",value:function(e){var t=this,n=[];
2return this.changes.forEach((function(r,i){i.isValidDocument()?n.push(t.Kn.addEntry(e,i)):t.Kn.removeEntry(r)})),ni.waitFor(n)}},{key:"getFromCache",value:function(e,t){return this.Kn.getEntry(e,t)}},{key:"getAllFromCache",value:function(e,t){return this.Kn.getEntries(e,t)}}]),n}(wa),ho=function(){function e(t){Object(p.a)(this,e),this.persistence=t,this.Li=new Cn((function(e){return lt(e)}),ft),this.lastRemoteSnapshotVersion=Z.min(),this.highestTargetId=0,this.Ui=0,this.qi=new uo,this.targetCount=0,this.Ki=sa.gn()}return Object(v.a)(e,[{key:"forEachTarget",value:function(e,t){return this.Li.forEach((function(e,n){return t(n)})),ni.resolve()}},{key:"getLastRemoteSnapshotVersion",value:function(e){return ni.resolve(this.lastRemoteSnapshotVersion)}},{key:"getHighestSequenceNumber",value:function(e){return ni.resolve(this.Ui)}},{key:"allocateTargetId",value:function(e){return this.highestTargetId=this.Ki.next(),ni.resolve(this.highestTargetId)}},{key:"setTargetsMetadata",value:function(e,t,n){return n&&(this.lastRemoteSnapshotVersion=n),t>this.Ui&&(this.Ui=t),ni.resolve()}},{key:"Tn",value:function(e){this.Li.set(e.target,e);var t=e.targetId;t>this.highestTargetId&&(this.Ki=new sa(t),this.highestTargetId=t),e.sequenceNumber>this.Ui&&(this.Ui=e.sequenceNumber)}},{key:"addTargetData",value:function(e,t){return this.Tn(t),this.targetCount+=1,ni.resolve()}},{key:"updateTargetData",value:function(e,t){return this.Tn(t),ni.resolve()}},{key:"removeTargetData",value:function(e,t){return this.Li.delete(t.target),this.qi.vi(t.targetId),this.targetCount-=1,ni.resolve()}},{key:"removeTargets",value:function(e,t,n){var r=this,i=0,a=[];return this.Li.forEach((function(o,u){u.sequenceNumber<=t&&null===n.get(u.targetId)&&(r.Li.delete(o),a.push(r.removeMatchingKeysForTargetId(e,u.targetId)),i++)})),ni.waitFor(a).next((function(){return i}))}},{key:"getTargetCount",value:function(e){return ni.resolve(this.targetCount)}},{key:"getTargetData",value:function(e,t){var n=this.Li.get(t)||null;return ni.resolve(n)}},{key:"addMatchingKeys",value:function(e,t,n){return this.qi.bi(t,n),ni.resolve()}},{key:"removeMatchingKeys",value:function(e,t,n){this.qi.Vi(t,n);var r=this.persistence.referenceDelegate,i=[];return r&&t.forEach((function(t){i.push(r.markPotentiallyOrphaned(e,t))})),ni.waitFor(i)}},{key:"removeMatchingKeysForTargetId",value:function(e,t){return this.qi.vi(t),ni.resolve()}},{key:"getMatchingKeysForTargetId",value:function(e,t){var n=this.qi.Di(t);return ni.resolve(n)}},{key:"containsKey",value:function(e,t){return ni.resolve(this.qi.containsKey(t))}}]),e}(),po=function(){function e(t,n){var r=this;Object(p.a)(this,e),this.Gi={},this.overlays={},this.es=new K(0),this.ns=!1,this.ns=!0,this.referenceDelegate=t(this),this.fs=new ho(this),this.indexManager=new Hi,this.ds=new lo((function(e){return r.referenceDelegate.Qi(e)})),this.M=new gi(n),this._s=new ao(this.M)}return Object(v.a)(e,[{key:"start",value:function(){return Promise.resolve()}},{key:"shutdown",value:function(){return this.ns=!1,Promise.resolve()}},{key:"started",get:function(){return this.ns}},{key:"setDatabaseDeletedListener",value:function(){}},{key:"setNetworkEnabled",value:function(){}},{key:"getIndexManager",value:function(e){return this.indexManager}},{key:"getDocumentOverlayCache",value:function(e){var t=this.overlays[e.toKey()];return t||(t=new oo,this.overlays[e.toKey()]=t),t}},{key:"getMutationQueue",value:function(e,t){var n=this.Gi[e.toKey()];return n||(n=new co(t,this.referenceDelegate),this.Gi[e.toKey()]=n),n}},{key:"getTargetCache",value:function(){return this.fs}},{key:"getRemoteDocumentCache",value:function(){return this.ds}},{key:"getBundleCache",value:function(){return this._s}},{key:"runTransaction",value:function(e,t,n){var r=this;S("MemoryPersistence","Starting transaction:",e);var i=new vo(this.es.next());return this.referenceDelegate.ji(),n(i).next((function(e){return r.referenceDelegate.Wi(i).next((function(){return e}))})).toPromise().then((function(e){return i.raiseOnCommittedEvent(),e}))}},{key:"zi",value:function(e,t){return ni.or(Object.values(this.Gi).map((function(n){return function(){return n.containsKey(e,t)}})))}}]),e}(),vo=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e){var r;return Object(p.a)(this,n),(r=t.call(this)).currentSequenceNumber=e,r}return n}(ti),mo=function(){function e(t){Object(p.a)(this,e),this.persistence=t,this.Hi=new uo,this.Ji=null}return Object(v.a)(e,[{key:"Xi",get:function(){if(this.Ji)return this.Ji;throw A()}},{key:"addReference",value:function(e,t,n){return this.Hi.addReference(n,t),this.Xi.delete(n.toString()),ni.resolve()}},{key:"removeReference",value:function(e,t,n){return this.Hi.removeReference(n,t),this.Xi.add(n.toString()),ni.resolve()}},{key:"markPotentiallyOrphaned",value:function(e,t){return this.Xi.add(t.toString()),ni.resolve()}},{key:"removeTarget",value:function(e,t){var n=this;
2this.Hi.vi(t.targetId).forEach((function(e){return n.Xi.add(e.toString())}));var r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(e,t.targetId).next((function(e){e.forEach((function(e){return n.Xi.add(e.toString())}))})).next((function(){return r.removeTargetData(e,t)}))}},{key:"ji",value:function(){this.Ji=new Set}},{key:"Wi",value:function(e){var t=this,n=this.persistence.getRemoteDocumentCache().newChangeBuffer();return ni.forEach(this.Xi,(function(r){var i=Oe.fromPath(r);return t.Zi(e,i).next((function(e){e||n.removeEntry(i,Z.min())}))})).next((function(){return t.Ji=null,n.apply(e)}))}},{key:"updateLimboDocument",value:function(e,t){var n=this;return this.Zi(e,t).next((function(e){e?n.Xi.delete(t.toString()):n.Xi.add(t.toString())}))}},{key:"Qi",value:function(e){return 0}},{key:"Zi",value:function(e,t){var n=this;return ni.or([function(){return ni.resolve(n.Hi.containsKey(t))},function(){return n.persistence.getTargetCache().containsKey(e,t)},function(){return n.persistence.zi(e,t)}])}}],[{key:"Yi",value:function(t){return new e(t)}}]),e}();function yo(e,t){return"firestore_clients_".concat(e,"_").concat(t)}function go(e,t,n){var r="firestore_mutations_".concat(e,"_").concat(n);return t.isAuthenticated()&&(r+="_".concat(t.uid)),r}function bo(e,t){return"firestore_targets_".concat(e,"_").concat(t)}var ko=function(){function e(t,n,r,i){Object(p.a)(this,e),this.user=t,this.batchId=n,this.state=r,this.error=i}return Object(v.a)(e,[{key:"er",value:function(){var e={state:this.state,updateTimeMs:Date.now()};return this.error&&(e.error={code:this.error.code,message:this.error.message}),JSON.stringify(e)}}],[{key:"tr",value:function(t,n,r){var i,a=JSON.parse(r),o="object"==typeof a&&-1!==["pending","acknowledged","rejected"].indexOf(a.state)&&(void 0===a.error||"object"==typeof a.error);return o&&a.error&&((o="string"==typeof a.error.message&&"string"==typeof a.error.code)&&(i=new L(a.error.code,a.error.message))),o?new e(t,n,a.state,i):(T("SharedClientState","Failed to parse mutation state for ID '".concat(n,"': ").concat(r)),null)}}]),e}(),wo=function(){function e(t,n,r){Object(p.a)(this,e),this.targetId=t,this.state=n,this.error=r}return Object(v.a)(e,[{key:"er",value:function(){var e={state:this.state,updateTimeMs:Date.now()};return this.error&&(e.error={code:this.error.code,message:this.error.message}),JSON.stringify(e)}}],[{key:"tr",value:function(t,n){var r,i=JSON.parse(n),a="object"==typeof i&&-1!==["not-current","current","rejected"].indexOf(i.state)&&(void 0===i.error||"object"==typeof i.error);return a&&i.error&&((a="string"==typeof i.error.message&&"string"==typeof i.error.code)&&(r=new L(i.error.code,i.error.message))),a?new e(t,i.state,r):(T("SharedClientState","Failed to parse target state for ID '".concat(t,"': ").concat(n)),null)}}]),e}(),Oo=function(){function e(t,n){Object(p.a)(this,e),this.clientId=t,this.activeTargetIds=n}return Object(v.a)(e,null,[{key:"tr",value:function(t,n){for(var r=JSON.parse(n),i="object"==typeof r&&r.activeTargetIds instanceof Array,a=Vn(),o=0;i&&o<r.activeTargetIds.length;++o)i=we(r.activeTargetIds[o]),a=a.add(r.activeTargetIds[o]);return i?new e(t,a):(T("SharedClientState","Failed to parse client data for instance '".concat(t,"': ").concat(n)),null)}}]),e}(),xo=function(){function e(t,n){Object(p.a)(this,e),this.clientId=t,this.onlineState=n}return Object(v.a)(e,null,[{key:"tr",value:function(t){var n=JSON.parse(t);return"object"==typeof n&&-1!==["Unknown","Online","Offline"].indexOf(n.onlineState)&&"string"==typeof n.clientId?new e(n.clientId,n.onlineState):(T("SharedClientState","Failed to parse online state: ".concat(t)),null)}}]),e}(),_o=function(){function e(){Object(p.a)(this,e),this.activeTargetIds=Vn()}return Object(v.a)(e,[{key:"nr",value:function(e){this.activeTargetIds=this.activeTargetIds.add(e)}},{key:"sr",value:function(e){this.activeTargetIds=this.activeTargetIds.delete(e)}},{key:"er",value:function(){var e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}]),e}(),jo=function(){function e(t,n,r,i,a){Object(p.a)(this,e),this.window=t,this.Yn=n,this.persistenceKey=r,this.ir=i,this.syncEngine=null,this.onlineStateHandler=null,this.sequenceNumberHandler=null,this.rr=this.ur.bind(this),this.ar=new nt(Q),this.started=!1,this.cr=[];var o=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");this.storage=this.window.localStorage,this.currentUser=a,this.hr=yo(this.persistenceKey,this.ir),this.lr=function(e){return"firestore_sequence_number_".concat(e)}(this.persistenceKey),this.ar=this.ar.insert(this.ir,new _o),this.dr=new RegExp("^firestore_clients_".concat(o,"_([^_]*)$")),this._r=new RegExp("^firestore_mutations_".concat(o,"_(\\d+)(?:_(.*))?$")),this.wr=new RegExp("^firestore_targets_".concat(o,"_(\\d+)$")),this.mr=function(e){return"firestore_online_state_".concat(e)}(this.persistenceKey),this.gr=function(e){return"firestore_bundle_loaded_v2_".concat(e)}(this.persistenceKey),this.window.addEventListener("storage",this.rr)}return Object(v.a)(e,[{key:"start",value:function(){var e=Object(l.a)(c.a.mark((function e(){var t,n,r,i,a,o,s,l,f,h,d,p=this;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.syncEngine.Fs();case 2:t=e.sent,n=Object(u.a)(t),e.prev=4,n.s();case 6:if((r=n.n()).done){e.next=14;break}if((i=r.value)!==this.ir){e.next=10;break}return e.abrupt("continue",12);
2case 10:(a=this.getItem(yo(this.persistenceKey,i)))&&(o=Oo.tr(i,a))&&(this.ar=this.ar.insert(o.clientId,o));case 12:e.next=6;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(4),n.e(e.t0);case 19:return e.prev=19,n.f(),e.finish(19);case 22:this.yr(),(s=this.storage.getItem(this.mr))&&(l=this.pr(s))&&this.Ir(l),f=Object(u.a)(this.cr);try{for(f.s();!(h=f.n()).done;)d=h.value,this.ur(d)}catch(c){f.e(c)}finally{f.f()}this.cr=[],this.window.addEventListener("pagehide",(function(){return p.shutdown()})),this.started=!0;case 28:case"end":return e.stop()}}),e,this,[[4,16,19,22]])})));return function(){return e.apply(this,arguments)}}()},{key:"writeSequenceNumber",value:function(e){this.setItem(this.lr,JSON.stringify(e))}},{key:"getAllActiveQueryTargets",value:function(){return this.Tr(this.ar)}},{key:"isActiveQueryTarget",value:function(e){var t=!1;return this.ar.forEach((function(n,r){r.activeTargetIds.has(e)&&(t=!0)})),t}},{key:"addPendingMutation",value:function(e){this.Er(e,"pending")}},{key:"updateMutationState",value:function(e,t,n){this.Er(e,t,n),this.Ar(e)}},{key:"addLocalQueryTarget",value:function(e){var t="not-current";if(this.isActiveQueryTarget(e)){var n=this.storage.getItem(bo(this.persistenceKey,e));if(n){var r=wo.tr(e,n);r&&(t=r.state)}}return this.Rr.nr(e),this.yr(),t}},{key:"removeLocalQueryTarget",value:function(e){this.Rr.sr(e),this.yr()}},{key:"isLocalQueryTarget",value:function(e){return this.Rr.activeTargetIds.has(e)}},{key:"clearQueryState",value:function(e){this.removeItem(bo(this.persistenceKey,e))}},{key:"updateQueryState",value:function(e,t,n){this.br(e,t,n)}},{key:"handleUserChange",value:function(e,t,n){var r=this;t.forEach((function(e){r.Ar(e)})),this.currentUser=e,n.forEach((function(e){r.addPendingMutation(e)}))}},{key:"setOnlineState",value:function(e){this.Pr(e)}},{key:"notifyBundleLoaded",value:function(e){this.Vr(e)}},{key:"shutdown",value:function(){this.started&&(this.window.removeEventListener("storage",this.rr),this.removeItem(this.hr),this.started=!1)}},{key:"getItem",value:function(e){var t=this.storage.getItem(e);return S("SharedClientState","READ",e,t),t}},{key:"setItem",value:function(e,t){S("SharedClientState","SET",e,t),this.storage.setItem(e,t)}},{key:"removeItem",value:function(e){S("SharedClientState","REMOVE",e),this.storage.removeItem(e)}},{key:"ur",value:function(e){var t=this,n=e;if(n.storageArea===this.storage){if(S("SharedClientState","EVENT",n.key,n.newValue),n.key===this.hr)return void T("Received WebStorage notification for local change. Another client might have garbage-collected our state");this.Yn.enqueueRetryable(Object(l.a)(c.a.mark((function e(){var r,i,a,o,u,s,l;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.started){e.next=43;break}if(null===n.key){e.next=41;break}if(!t.dr.test(n.key)){e.next=11;break}if(null!=n.newValue){e.next=6;break}return r=t.vr(n.key),e.abrupt("return",t.Sr(r,null));case 6:if(!(i=t.Dr(n.key,n.newValue))){e.next=9;break}return e.abrupt("return",t.Sr(i.clientId,i));case 9:e.next=41;break;case 11:if(!t._r.test(n.key)){e.next=18;break}if(null===n.newValue){e.next=16;break}if(!(a=t.Cr(n.key,n.newValue))){e.next=16;break}return e.abrupt("return",t.Nr(a));case 16:e.next=41;break;case 18:if(!t.wr.test(n.key)){e.next=25;break}if(null===n.newValue){e.next=23;break}if(!(o=t.kr(n.key,n.newValue))){e.next=23;break}return e.abrupt("return",t.Mr(o));case 23:e.next=41;break;case 25:if(n.key!==t.mr){e.next=32;break}if(null===n.newValue){e.next=30;break}if(!(u=t.pr(n.newValue))){e.next=30;break}return e.abrupt("return",t.Ir(u));case 30:e.next=41;break;case 32:if(n.key!==t.lr){e.next=37;break}s=function(e){var t=K.A;if(null!=e)try{var n=JSON.parse(e);R("number"==typeof n),t=n}catch(e){T("SharedClientState","Failed to read sequence number from WebStorage",e)}return t}(n.newValue),s!==K.A&&t.sequenceNumberHandler(s),e.next=41;break;case 37:if(n.key!==t.gr){e.next=41;break}return l=t.Or(n.newValue),e.next=41,Promise.all(l.map((function(e){return t.syncEngine.Fr(e)})));case 41:e.next=44;break;case 43:t.cr.push(n);case 44:case"end":return e.stop()}}),e)}))))}}},{key:"Rr",get:function(){return this.ar.get(this.ir)}},{key:"yr",value:function(){this.setItem(this.hr,this.Rr.er())}},{key:"Er",value:function(e,t,n){var r=new ko(this.currentUser,e,t,n),i=go(this.persistenceKey,this.currentUser,e);this.setItem(i,r.er())}},{key:"Ar",value:function(e){var t=go(this.persistenceKey,this.currentUser,e);this.removeItem(t)}},{key:"Pr",value:function(e){var t={clientId:this.ir,onlineState:e};this.storage.setItem(this.mr,JSON.stringify(t))}},{key:"br",value:function(e,t,n){var r=bo(this.persistenceKey,e),i=new wo(e,t,n);
2this.setItem(r,i.er())}},{key:"Vr",value:function(e){var t=JSON.stringify(Array.from(e));this.setItem(this.gr,t)}},{key:"vr",value:function(e){var t=this.dr.exec(e);return t?t[1]:null}},{key:"Dr",value:function(e,t){var n=this.vr(e);return Oo.tr(n,t)}},{key:"Cr",value:function(e,t){var n=this._r.exec(e),r=Number(n[1]),i=void 0!==n[2]?n[2]:null;return ko.tr(new O(i),r,t)}},{key:"kr",value:function(e,t){var n=this.wr.exec(e),r=Number(n[1]);return wo.tr(r,t)}},{key:"pr",value:function(e){return xo.tr(e)}},{key:"Or",value:function(e){return JSON.parse(e)}},{key:"Nr",value:function(){var e=Object(l.a)(c.a.mark((function e(t){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.user.uid!==this.currentUser.uid){e.next=2;break}return e.abrupt("return",this.syncEngine.$r(t.batchId,t.state,t.error));case 2:S("SharedClientState","Ignoring mutation for non-active user ".concat(t.user.uid));case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"Mr",value:function(e){return this.syncEngine.Br(e.targetId,e.state,e.error)}},{key:"Sr",value:function(e,t){var n=this,r=t?this.ar.insert(e,t):this.ar.remove(e),i=this.Tr(this.ar),a=this.Tr(r),o=[],u=[];return a.forEach((function(e){i.has(e)||o.push(e)})),i.forEach((function(e){a.has(e)||u.push(e)})),this.syncEngine.Lr(o,u).then((function(){n.ar=r}))}},{key:"Ir",value:function(e){this.ar.get(e.clientId)&&this.onlineStateHandler(e.onlineState)}},{key:"Tr",value:function(e){var t=Vn();return e.forEach((function(e,n){t=t.unionWith(n.activeTargetIds)})),t}}],[{key:"vt",value:function(e){return!(!e||!e.localStorage)}}]),e}(),Eo=function(){function e(){Object(p.a)(this,e),this.Ur=new _o,this.qr={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}return Object(v.a)(e,[{key:"addPendingMutation",value:function(e){}},{key:"updateMutationState",value:function(e,t,n){}},{key:"addLocalQueryTarget",value:function(e){return this.Ur.nr(e),this.qr[e]||"not-current"}},{key:"updateQueryState",value:function(e,t,n){this.qr[e]=t}},{key:"removeLocalQueryTarget",value:function(e){this.Ur.sr(e)}},{key:"isLocalQueryTarget",value:function(e){return this.Ur.activeTargetIds.has(e)}},{key:"clearQueryState",value:function(e){delete this.qr[e]}},{key:"getAllActiveQueryTargets",value:function(){return this.Ur.activeTargetIds}},{key:"isActiveQueryTarget",value:function(e){return this.Ur.activeTargetIds.has(e)}},{key:"start",value:function(){return this.Ur=new _o,Promise.resolve()}},{key:"handleUserChange",value:function(e,t,n){}},{key:"setOnlineState",value:function(e){}},{key:"shutdown",value:function(){}},{key:"writeSequenceNumber",value:function(e){}},{key:"notifyBundleLoaded",value:function(e){}}]),e}(),So=function(){function e(){Object(p.a)(this,e)}return Object(v.a)(e,[{key:"Kr",value:function(e){}},{key:"shutdown",value:function(){}}]),e}(),To=function(){function e(){var t=this;Object(p.a)(this,e),this.Gr=function(){return t.Qr()},this.jr=function(){return t.Wr()},this.zr=[],this.Hr()}return Object(v.a)(e,[{key:"Kr",value:function(e){this.zr.push(e)}},{key:"shutdown",value:function(){window.removeEventListener("online",this.Gr),window.removeEventListener("offline",this.jr)}},{key:"Hr",value:function(){window.addEventListener("online",this.Gr),window.addEventListener("offline",this.jr)}},{key:"Qr",value:function(){S("ConnectivityMonitor","Network connectivity changed: AVAILABLE");var e,t=Object(u.a)(this.zr);try{for(t.s();!(e=t.n()).done;){(0,e.value)(0)}}catch(n){t.e(n)}finally{t.f()}}},{key:"Wr",value:function(){S("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");var e,t=Object(u.a)(this.zr);try{for(t.s();!(e=t.n()).done;){(0,e.value)(1)}}catch(n){t.e(n)}finally{t.f()}}}],[{key:"vt",value:function(){return"undefined"!=typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener}}]),e}(),Io={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery"},Co=function(){function e(t){Object(p.a)(this,e),this.Jr=t.Jr,this.Yr=t.Yr}return Object(v.a)(e,[{key:"Xr",value:function(e){this.Zr=e}},{key:"eo",value:function(e){this.no=e}},{key:"onMessage",value:function(e){this.so=e}},{key:"close",value:function(){this.Yr()}},{key:"send",value:function(e){this.Jr(e)}},{key:"io",value:function(){this.Zr()}},{key:"ro",value:function(e){this.no(e)}},{key:"oo",value:function(e){this.so(e)}}]),e}(),Ao=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e){var r;return Object(p.a)(this,n),(r=t.call(this,e)).forceLongPolling=e.forceLongPolling,r.autoDetectLongPolling=e.autoDetectLongPolling,r.useFetchStreams=e.useFetchStreams,r}return Object(v.a)(n,[{key:"fo",value:function(e,t,n,r){return new Promise((function(i,a){var o=new k.g;
2o.listenOnce(k.c.COMPLETE,(function(){try{switch(o.getLastErrorCode()){case k.a.NO_ERROR:var t=o.getResponseJson();S("Connection","XHR received:",JSON.stringify(t)),i(t);break;case k.a.TIMEOUT:S("Connection",'RPC "'+e+'" timed out'),a(new L(D.DEADLINE_EXCEEDED,"Request time out"));break;case k.a.HTTP_ERROR:var n=o.getStatus();if(S("Connection",'RPC "'+e+'" failed with status:',n,"response text:",o.getResponseText()),n>0){var r=o.getResponseJson().error;if(r&&r.status&&r.message){var u=function(e){var t=e.toLowerCase().replace(/_/g,"-");return Object.values(D).indexOf(t)>=0?t:D.UNKNOWN}(r.status);a(new L(u,r.message))}else a(new L(D.UNKNOWN,"Server responded with status "+o.getStatus()))}else a(new L(D.UNAVAILABLE,"Connection failed."));break;default:A()}}finally{S("Connection",'RPC "'+e+'" completed.')}}));var u=JSON.stringify(r);o.send(t,"POST",u,n,15)}))}},{key:"wo",value:function(e,t,n){var r=[this.uo,"/","google.firestore.v1.Firestore","/",e,"/channel"],i=Object(k.h)(),a=Object(k.i)(),o={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:"projects/".concat(this.databaseId.projectId,"/databases/").concat(this.databaseId.database)},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling};this.useFetchStreams&&(o.xmlHttpFactory=new k.d({})),this.lo(o.initMessageHeaders,t,n),Object(b.t)()||Object(b.v)()||Object(b.p)()||Object(b.r)()||Object(b.x)()||Object(b.o)()||(o.httpHeadersOverwriteParam="$httpHeaders");var u=r.join("");S("Connection","Creating WebChannel: "+u,o);var s=i.createWebChannel(u,o),c=!1,l=!1,f=new Co({Jr:function(e){l?S("Connection","Not sending because WebChannel is closed:",e):(c||(S("Connection","Opening WebChannel transport."),s.open(),c=!0),S("Connection","WebChannel sending:",e),s.send(e))},Yr:function(){return s.close()}}),h=function(e,t,n){e.listen(t,(function(e){try{n(e)}catch(e){setTimeout((function(){throw e}),0)}}))};return h(s,k.f.EventType.OPEN,(function(){l||S("Connection","WebChannel transport opened.")})),h(s,k.f.EventType.CLOSE,(function(){l||(l=!0,S("Connection","WebChannel transport closed"),f.ro())})),h(s,k.f.EventType.ERROR,(function(e){l||(l=!0,I("Connection","WebChannel transport errored:",e),f.ro(new L(D.UNAVAILABLE,"The operation could not be completed")))})),h(s,k.f.EventType.MESSAGE,(function(e){var t;if(!l){var n=e.data[0];R(!!n);var r=n,i=r.error||(null===(t=r[0])||void 0===t?void 0:t.error);if(i){S("Connection","WebChannel received error:",i);var a=i.status,o=function(e){var t=xn[e];if(void 0!==t)return In(t)}(a),u=i.message;void 0===o&&(o=D.INTERNAL,u="Unknown error status: "+a+" with message "+i.message),l=!0,f.ro(new L(o,u)),s.close()}else S("Connection","WebChannel received:",n),f.oo(n)}})),h(a,k.b.STAT_EVENT,(function(e){e.stat===k.e.PROXY?S("Connection","Detected buffering proxy"):e.stat===k.e.NOPROXY&&S("Connection","Detected no buffering proxy")})),setTimeout((function(){f.io()}),0),f}}]),n}(function(){function e(t){Object(p.a)(this,e),this.databaseInfo=t,this.databaseId=t.databaseId;var n=t.ssl?"https":"http";this.uo=n+"://"+t.host,this.ao="projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database+"/documents"}return Object(v.a)(e,[{key:"co",value:function(e,t,n,r,i){var a=this.ho(e,t);S("RestConnection","Sending: ",a,n);var o={};return this.lo(o,r,i),this.fo(e,a,o,n).then((function(e){return S("RestConnection","Received: ",e),e}),(function(t){throw I("RestConnection","".concat(e," failed with error: "),t,"url: ",a,"request:",n),t}))}},{key:"_o",value:function(e,t,n,r,i){return this.co(e,t,n,r,i)}},{key:"lo",value:function(e,t,n){e["X-Goog-Api-Client"]="gl-js/ fire/"+x,e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),t&&t.headers.forEach((function(t,n){return e[n]=t})),n&&n.headers.forEach((function(t,n){return e[n]=t}))}},{key:"ho",value:function(e,t){var n=Io[e];return"".concat(this.uo,"/v1/").concat(t,":").concat(n)}}]),e}());function Ro(){return"undefined"!=typeof window?window:null}function No(){return"undefined"!=typeof document?document:null}function Po(e){return new Jn(e,!0)}var Do=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1.5,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:6e4;Object(p.a)(this,e),this.Yn=t,this.timerId=n,this.mo=r,this.yo=i,this.po=a,this.Io=0,this.To=null,this.Eo=Date.now(),this.reset()}return Object(v.a)(e,[{key:"reset",value:function(){this.Io=0}},{key:"Ao",value:function(){this.Io=this.po}},{key:"Ro",value:function(e){var t=this;this.cancel();var n=Math.floor(this.Io+this.bo()),r=Math.max(0,Date.now()-this.Eo),i=Math.max(0,n-r);i>0&&S("ExponentialBackoff","Backing off for ".concat(i," ms (base delay: ").concat(this.Io," ms, delay with 
2jitter: ").concat(n," ms, last attempt: ").concat(r," ms ago)")),this.To=this.Yn.enqueueAfterDelay(this.timerId,i,(function(){return t.Eo=Date.now(),e()})),this.Io*=this.yo,this.Io<this.mo&&(this.Io=this.mo),this.Io>this.po&&(this.Io=this.po)}},{key:"Po",value:function(){null!==this.To&&(this.To.skipDelay(),this.To=null)}},{key:"cancel",value:function(){null!==this.To&&(this.To.cancel(),this.To=null)}},{key:"bo",value:function(){return(Math.random()-.5)*this.Io}}]),e}(),Lo=function(){function e(t,n,r,i,a,o,u,s){Object(p.a)(this,e),this.Yn=t,this.Vo=r,this.vo=i,this.So=a,this.authCredentialsProvider=o,this.appCheckCredentialsProvider=u,this.listener=s,this.state=0,this.Do=0,this.Co=null,this.xo=null,this.stream=null,this.No=new Do(t,n)}return Object(v.a)(e,[{key:"ko",value:function(){return 1===this.state||5===this.state||this.Mo()}},{key:"Mo",value:function(){return 2===this.state||3===this.state}},{key:"start",value:function(){4!==this.state?this.auth():this.Oo()}},{key:"stop",value:function(){var e=Object(l.a)(c.a.mark((function e(){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=this.ko(),!e.t0){e.next=4;break}return e.next=4,this.close(0);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"Fo",value:function(){this.state=0,this.No.reset()}},{key:"$o",value:function(){var e=this;this.Mo()&&null===this.Co&&(this.Co=this.Yn.enqueueAfterDelay(this.Vo,6e4,(function(){return e.Bo()})))}},{key:"Lo",value:function(e){this.Uo(),this.stream.send(e)}},{key:"Bo",value:function(){var e=Object(l.a)(c.a.mark((function e(){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.Mo()){e.next=2;break}return e.abrupt("return",this.close(0));case 2:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"Uo",value:function(){this.Co&&(this.Co.cancel(),this.Co=null)}},{key:"qo",value:function(){this.xo&&(this.xo.cancel(),this.xo=null)}},{key:"close",value:function(){var e=Object(l.a)(c.a.mark((function e(t,n){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.Uo(),this.qo(),this.No.cancel(),this.Do++,4!==t?this.No.reset():n&&n.code===D.RESOURCE_EXHAUSTED?(T(n.toString()),T("Using maximum backoff delay to prevent overloading the backend."),this.No.Ao()):n&&n.code===D.UNAUTHENTICATED&&3!==this.state&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),null!==this.stream&&(this.Ko(),this.stream.close(),this.stream=null),this.state=t,e.next=9,this.listener.eo(n);case 9:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"Ko",value:function(){}},{key:"auth",value:function(){var e=this;this.state=1;var t=this.Go(this.Do),n=this.Do;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then((function(t){var r=Object(o.a)(t,2),i=r[0],a=r[1];e.Do===n&&e.Qo(i,a)}),(function(n){t((function(){var t=new L(D.UNKNOWN,"Fetching auth token failed: "+n.message);return e.jo(t)}))}))}},{key:"Qo",value:function(e,t){var n=this,r=this.Go(this.Do);this.stream=this.Wo(e,t),this.stream.Xr((function(){r((function(){return n.state=2,n.xo=n.Yn.enqueueAfterDelay(n.vo,1e4,(function(){return n.Mo()&&(n.state=3),Promise.resolve()})),n.listener.Xr()}))})),this.stream.eo((function(e){r((function(){return n.jo(e)}))})),this.stream.onMessage((function(e){r((function(){return n.onMessage(e)}))}))}},{key:"Oo",value:function(){var e=this;this.state=5,this.No.Ro(Object(l.a)(c.a.mark((function t(){return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.state=0,e.start();case 1:case"end":return t.stop()}}),t)}))))}},{key:"jo",value:function(e){return S("PersistentStream","close with error: ".concat(e)),this.stream=null,this.close(4,e)}},{key:"Go",value:function(e){var t=this;return function(n){t.Yn.enqueueAndForget((function(){return t.Do===e?n():(S("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())}))}}}]),e}(),Mo=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r,i,a,o,u){var s;return Object(p.a)(this,n),(s=t.call(this,e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",r,i,a,u)).M=o,s}return Object(v.a)(n,[{key:"Wo",value:function(e,t){return this.So.wo("Listen",e,t)}},{key:"onMessage",value:function(e){this.No.reset();var t=function(e,t){var n;if("targetChange"in t){t.targetChange;var r=function(e){return"NO_CHANGE"===e?0:"ADD"===e?1:"REMOVE"===e?2:"CURRENT"===e?3:"RESET"===e?4:A()}(t.targetChange.targetChangeType||"NO_CHANGE"),i=t.targetChange.targetIds||[],a=function(e,t){return e.N?(R(void 0===t||"string"==typeof t),ce.fromBase64String(t||"")):(R(void 0===t||t instanceof Uint8Array),ce.fromUint8Array(t||new Uint8Array))}(e,t.targetChange.resumeToken),o=t.targetChange.cause,u=o&&function(e){var t=void 0===e.code?D.UNKNOWN:In(e.code);return new L(t,e.message||"")}(o);n=new Hn(r,i,a,u||null)}else if("documentChange"in t){t.documentChange;var s=t.documentChange;s.document,s.document.name,s.document.updateTime;var c=or(e,s.document.name),l=nr(s.document.updateTime),f=new We({mapValue:{fields:s.document.fields}}),h=Ke.newFoundDocument(c,l,f),d=s.targetIds||[],p=s.removedTargetIds||[];n=new qn(d,p,h.key,h)}else if("documentDelete"in t){t.documentDelete;var v=t.documentDelete;v.document;var m=or(e,v.document),y=v.readTime?nr(v.readTime):Z.min(),g=Ke.newNoDocument(m,y),b=v.removedTargetIds||[];n=new qn([],b,g.key,g)}else if("documentRemove"in t){t.documentRemove;var k=t.documentRemove;k.document;var w=or(e,k.document),O=k.removedTargetIds||[];n=new qn([],O,w,null)}else{if(!("filter"in t))return A();t.filter;var x=t.filter;x.targetId;var _=x.count||0,j=new Sn(_),E=x.targetId;n=new Wn(E,j)}return n}(this.M,e),n=function(e){if(!("targetChange"in e))return Z.min();var t=e.targetChange;return t.targetIds&&t.targetIds.length?Z.min():t.readTime?nr(t.readTime):Z.min()}(e);return this.listener.zo(t,n)}},{key:"Ho",value:function(e){var t={};t.database=cr(this.M),t.addTarget=function(e,t){var n,r=t.target;return(n=ht(r)?{documents:mr(e,r)}:{query:yr(e,r)}).targetId=t.targetId,t.resumeToken.approximateByteSize()>0?n.resumeToken=er(e,t.resumeToken):t.snapshotVersion.compareTo(Z.min())>0&&(n.readTime=Zn(e,t.snapshotVersion.toTimestamp())),n}(this.M,e);var n=function(e,t){var n=function(e,t){switch(t){case 0:return null;case 1:return"existence-filter-mismatch";case 2:return"limbo-document";default:return A()}}(0,t.purpose);return null==n?null:{"goog-listen-tags":n}}(this.M,e);n&&(t.labels=n),this.Lo(t)}},{key:"Jo",value:function(e){var t={};t.database=cr(this.M),t.removeTarget=e,this.Lo(t)}}]),n}(Lo),Fo=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r,i,a,o,u){var s;return Object(p.a)(this,n),(s=t.call(this,e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",r,i,a,u)).M=o,s.Yo=!1,s}return Object(v.a)(n,[{key:"Xo",get:function(){return this.Yo}},{key:"start",value:function(){this.Yo=!1,this.lastStreamToken=void 0,Object(i.a)(Object(a.a)(n.prototype),"start",this).call(this)}},{key:"Ko",value:function(){this.Yo&&this.Zo([])}},{key:"Wo",value:function(e,t){return this.So.wo("Write",e,t)}},{key:"onMessage",value:function(e){if(R(!!e.streamToken),this.lastStreamToken=e.streamToken,this.Yo){this.No.reset();var t=function(e,t){return e&&e.length>0?(R(void 0!==t),e.map((function(e){return function(e,t){var n=e.updateTime?nr(e.updateTime):nr(t);return n.isEqual(Z.min())&&(n=nr(t)),new cn(n,e.transformResults||[])}(e,t)}))):[]}(e.writeResults,e.commitTime),n=nr(e.commitTime);return this.listener.tu(n,t)}return R(!e.writeResults||0===e.writeResults.length),this.Yo=!0,this.listener.eu()}},{key:"nu",value:function(){var e={};e.database=cr(this.M),this.Lo(e)}},{key:"Zo",value:function(e){var t=this,n={streamToken:this.lastStreamToken,writes:e.map((function(e){return pr(t.M,e)}))};this.Lo(n)}}]),n}(Lo),Uo=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r,i,a){var o;return Object(p.a)(this,n),(o=t.call(this)).authCredentials=e,o.appCheckCredentials=r,o.So=i,o.M=a,o.su=!1,o}return Object(v.a)(n,[{key:"iu",value:function(){if(this.su)throw new L(D.FAILED_PRECONDITION,"The client has already been terminated.")}},{key:"co",value:function(e,t,n){var r=this;return this.iu(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((function(i){var a=Object(o.a)(i,2),u=a[0],s=a[1];return r.So.co(e,t,n,u,s)})).catch((function(e){throw"FirebaseError"===e.name?(e.code===D.UNAUTHENTICATED&&(r.authCredentials.invalidateToken(),r.appCheckCredentials.invalidateToken()),e):new L(D.UNKNOWN,e.toString())}))}},{key:"_o",value:function(e,t,n){var r=this;return this.iu(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((function(i){var a=Object(o.a)(i,2),u=a[0],s=a[1];return r.So._o(e,t,n,u,s)})).catch((function(e){throw"FirebaseError"===e.name?(e.code===D.UNAUTHENTICATED&&(r.authCredentials.invalidateToken(),r.appCheckCredentials.invalidateToken()),e):new L(D.UNKNOWN,e.toString())}))}},{key:"terminate",value:function(){this.su=!0}}]),n}(function(){return function e(){Object(p.a)(this,e)}}()),Vo=function(){function e(t,n){Object(p.a)(this,e),this.asyncQueue=t,this.onlineStateHandler=n,this.state="Unknown",this.ru=0,this.ou=null,this.uu=!0}return Object(v.a)(e,[{key:"au",value:function(){var e=this;0===this.ru&&(this.cu("Unknown"),this.ou=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,(function(){return e.ou=null,e.hu("Backend didn't respond within 10 seconds."),e.cu("Offline"),Promise.resolve()})))}},{key:"lu",value:function(e){"Online"===this.state?this.cu("Unknown"):(this.ru++,this.ru>=1&&(this.fu(),this.hu("Connection failed 1 times. Most recent error: ".concat(e.toString())),this.cu("Offline")))}},{key:"set",value:function(e){this.fu(),this.ru=0,"Online"===e&&(this.uu=!1),this.cu(e)}},{key:"cu",value:function(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}},{key:"hu",value:function(e){var t="Could not reach Cloud Firestore backend. ".concat(e,"\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.");this.uu?(T(t),this.uu=!1):S("OnlineStateTracker",t)}},{key:"fu",value:function(){null!==this.ou&&(this.ou.cancel(),this.ou=null)}}]),e}(),Bo=function e(t,n,r,i,a){var o=this;Object(p.a)(this,e),this.localStore=t,this.datastore=n,this.asyncQueue=r,this.remoteSyncer={},this.du=[],this._u=new Map,this.wu=new Set,this.mu=[],this.gu=a,this.gu.Kr((function(e){r.enqueueAndForget(Object(l.a)(c.a.mark((function e(){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=Jo(o),!e.t0){e.next=5;break}
2return S("RemoteStore","Restarting streams for network reachability change."),e.next=5,function(){var e=Object(l.a)(c.a.mark((function e(t){var n;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=P(t)).wu.add(4),e.next=4,Wo(n);case 4:return n.yu.set("Unknown"),n.wu.delete(4),e.next=8,zo(n);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()(o);case 5:case"end":return e.stop()}}),e)}))))})),this.yu=new Vo(r,i)};function zo(e){return qo.apply(this,arguments)}function qo(){return(qo=Object(l.a)(c.a.mark((function e(t){var n,r,i;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Jo(t)){e.next=18;break}n=Object(u.a)(t.mu),e.prev=2,n.s();case 4:if((r=n.n()).done){e.next=10;break}return i=r.value,e.next=8,i(!0);case 8:e.next=4;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(2),n.e(e.t0);case 15:return e.prev=15,n.f(),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[2,12,15,18]])})))).apply(this,arguments)}function Wo(e){return Ho.apply(this,arguments)}function Ho(){return(Ho=Object(l.a)(c.a.mark((function e(t){var n,r,i;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Object(u.a)(t.mu),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=9;break}return i=r.value,e.next=7,i(!1);case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),n.e(e.t0);case 14:return e.prev=14,n.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[1,11,14,17]])})))).apply(this,arguments)}function Ko(e,t){var n=P(e);n._u.has(t.targetId)||(n._u.set(t.targetId,t),Xo(n)?Yo(n):Su(n).Mo()&&$o(n,t))}function Go(e,t){var n=P(e),r=Su(n);n._u.delete(t),r.Mo()&&Qo(n,t),0===n._u.size&&(r.Mo()?r.$o():Jo(n)&&n.yu.set("Unknown"))}function $o(e,t){e.pu.Z(t.targetId),Su(e).Ho(t)}function Qo(e,t){e.pu.Z(t),Su(e).Jo(t)}function Yo(e){e.pu=new Gn({getRemoteKeysForTarget:function(t){return e.remoteSyncer.getRemoteKeysForTarget(t)},Et:function(t){return e._u.get(t)||null}}),Su(e).start(),e.yu.au()}function Xo(e){return Jo(e)&&!Su(e).ko()&&e._u.size>0}function Jo(e){return 0===P(e).wu.size}function Zo(e){e.pu=void 0}function eu(e){return tu.apply(this,arguments)}function tu(){return(tu=Object(l.a)(c.a.mark((function e(t){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t._u.forEach((function(e,n){$o(t,e)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function nu(e,t){return ru.apply(this,arguments)}function ru(){return(ru=Object(l.a)(c.a.mark((function e(t,n){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Zo(t),Xo(t)?(t.yu.lu(n),Yo(t)):t.yu.set("Unknown");case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function iu(e,t,n){return au.apply(this,arguments)}function au(){return au=Object(l.a)(c.a.mark((function e(t,n,r){var i;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.yu.set("Online"),!(n instanceof Hn&&2===n.state&&n.cause)){e.next=13;break}return e.prev=1,e.next=4,function(){var e=Object(l.a)(c.a.mark((function e(t,n){var r,i,a,o;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=n.cause,i=Object(u.a)(n.targetIds),e.prev=2,i.s();case 4:if((a=i.n()).done){e.next=14;break}if(o=a.value,e.t0=t._u.has(o),!e.t0){e.next=12;break}return e.next=10,t.remoteSyncer.rejectListen(o,r);case 10:t._u.delete(o),t.pu.removeTarget(o);case 12:e.next=4;break;case 14:e.next=19;break;case 16:e.prev=16,e.t1=e.catch(2),i.e(e.t1);case 19:return e.prev=19,i.f(),e.finish(19);case 22:case"end":return e.stop()}}),e,null,[[2,16,19,22]])})));return function(t,n){return e.apply(this,arguments)}}()(t,n);case 4:e.next=11;break;case 6:return e.prev=6,e.t0=e.catch(1),S("RemoteStore","Failed to remove targets %s: %s ",n.targetIds.join(","),e.t0),e.next=11,ou(t,e.t0);case 11:case 22:e.next=29;break;case 13:if(n instanceof qn?t.pu.ut(n):n instanceof Wn?t.pu._t(n):t.pu.ht(n),r.isEqual(Z.min())){e.next=29;break}return e.prev=14,e.next=17,Wa(t.localStore);case 17:if(i=e.sent,e.t1=r.compareTo(i)>=0,!e.t1){e.next=22;break}return e.next=22,function(e,t){var n=e.pu.yt(t);
2return n.targetChanges.forEach((function(n,r){if(n.resumeToken.approximateByteSize()>0){var i=e._u.get(r);i&&e._u.set(r,i.withResumeToken(n.resumeToken,t))}})),n.targetMismatches.forEach((function(t){var n=e._u.get(t);if(n){e._u.set(t,n.withResumeToken(ce.EMPTY_BYTE_STRING,n.snapshotVersion)),Qo(e,t);var r=new yi(n.target,t,1,n.sequenceNumber);$o(e,r)}})),e.remoteSyncer.applyRemoteEvent(n)}(t,r);case 24:return e.prev=24,e.t2=e.catch(14),S("RemoteStore","Failed to raise snapshot:",e.t2),e.next=29,ou(t,e.t2);case 29:case"end":return e.stop()}}),e,null,[[1,6],[14,24]])}))),au.apply(this,arguments)}function ou(e,t,n){return uu.apply(this,arguments)}function uu(){return(uu=Object(l.a)(c.a.mark((function e(t,n,r){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ui(n)){e.next=2;break}throw n;case 2:return t.wu.add(1),e.next=5,Wo(t);case 5:t.yu.set("Offline"),r||(r=function(){return Wa(t.localStore)}),t.asyncQueue.enqueueRetryable(Object(l.a)(c.a.mark((function e(){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return S("RemoteStore","Retrying IndexedDB access"),e.next=3,r();case 3:return t.wu.delete(1),e.next=6,zo(t);case 6:case"end":return e.stop()}}),e)}))));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function su(e,t){return t().catch((function(n){return ou(e,n,t)}))}function cu(e){return lu.apply(this,arguments)}function lu(){return(lu=Object(l.a)(c.a.mark((function e(t){var n,r,i,a;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=P(t),r=Tu(n),i=n.du.length>0?n.du[n.du.length-1].batchId:-1;case 2:if(!fu(n)){e.next=19;break}return e.prev=3,e.next=6,Ga(n.localStore,i);case 6:if(null!==(a=e.sent)){e.next=10;break}return 0===n.du.length&&r.$o(),e.abrupt("break",19);case 10:i=a.batchId,hu(n,a),e.next=17;break;case 13:return e.prev=13,e.t0=e.catch(3),e.next=17,ou(n,e.t0);case 17:e.next=2;break;case 19:du(n)&&pu(n);case 20:case"end":return e.stop()}}),e,null,[[3,13]])})))).apply(this,arguments)}function fu(e){return Jo(e)&&e.du.length<10}function hu(e,t){e.du.push(t);var n=Tu(e);n.Mo()&&n.Xo&&n.Zo(t.mutations)}function du(e){return Jo(e)&&!Tu(e).ko()&&e.du.length>0}function pu(e){Tu(e).start()}function vu(e){return mu.apply(this,arguments)}function mu(){return(mu=Object(l.a)(c.a.mark((function e(t){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Tu(t).nu();case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function yu(e){return gu.apply(this,arguments)}function gu(){return(gu=Object(l.a)(c.a.mark((function e(t){var n,r,i,a;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Tu(t),r=Object(u.a)(t.du);try{for(r.s();!(i=r.n()).done;)a=i.value,n.Zo(a.mutations)}catch(o){r.e(o)}finally{r.f()}case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function bu(e,t,n){return ku.apply(this,arguments)}function ku(){return(ku=Object(l.a)(c.a.mark((function e(t,n,r){var i,a;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.du.shift(),a=vi.from(i,n,r),e.next=3,su(t,(function(){return t.remoteSyncer.applySuccessfulWrite(a)}));case 3:return e.next=5,cu(t);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function wu(e,t){return Ou.apply(this,arguments)}function Ou(){return Ou=Object(l.a)(c.a.mark((function e(t,n){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=n&&Tu(t).Xo,!e.t0){e.next=4;break}return e.next=4,function(){var e=Object(l.a)(c.a.mark((function e(t,n){var r,i;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Tn(i=n.code)||i===D.ABORTED){e.next=7;break}return r=t.du.shift(),Tu(t).Fo(),e.next=5,su(t,(function(){return t.remoteSyncer.rejectFailedWrite(r.batchId,n)}));case 5:return e.next=7,cu(t);case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()(t,n);case 4:du(t)&&pu(t);case 5:case"end":return e.stop()}}),e)}))),Ou.apply(this,arguments)}function xu(e,t){return _u.apply(this,arguments)}function _u(){return(_u=Object(l.a)(c.a.mark((function e(t,n){var r,i;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=P(t)).asyncQueue.verifyOperationInProgress(),S("RemoteStore","RemoteStore received new credentials"),i=Jo(r),r.wu.add(3),e.next=6,Wo(r);case 6:return i&&r.yu.set("Unknown"),e.next=9,r.remoteSyncer.handleCredentialChange(n);case 9:return r.wu.delete(3),e.next=12,zo(r);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ju(e,t){return Eu.apply(this,arguments)}function Eu(){return(Eu=Object(l.a)(c.a.mark((function e(t,n){var r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=P(t),!n){e.next=7;break}return r.wu.delete(2),e.next=5,zo(r);case 5:e.next=13;break;case 7:if(e.t0=n,e.t0){e.next=13;break}return r.wu.add(2),e.next=12,Wo(r);case 12:r.yu.set("Unknown");case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Su(e){return e.Iu||(e.Iu=function(e,t,n){var r=P(e);return r.iu(),new Mo(t,r.So,r.authCredentials,r.appCheckCredentials,r.M,n)}(e.datastore,e.asyncQueue,{Xr:eu.bind(null,e),eo:nu.bind(null,e),zo:iu.bind(null,e)}),e.mu.push(function(){var t=Object(l.a)(c.a.mark((function t(n){return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n){t.next=4;break}e.Iu.Fo(),Xo(e)?Yo(e):e.yu.set("Unknown"),t.next=7;break;case 4:return t.next=6,e.Iu.stop();case 6:Zo(e);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())),e.Iu}function Tu(e){return e.Tu||(e.Tu=function(e,t,n){var r=P(e);return r.iu(),new Fo(t,r.So,r.authCredentials,r.appCheckCredentials,r.M,n)}(e.datastore,e.asyncQueue,{Xr:vu.bind(null,e),eo:wu.bind(null,e),eu:yu.bind(null,e),tu:bu.bind(null,e)}),e.mu.push(function(){var t=Object(l.a)(c.a.mark((function t(n){return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n){t.next=6;break}return e.Tu.Fo(),t.next=4,cu(e);case 4:t.next=9;break;case 6:return t.next=8,e.Tu.stop();case 8:e.du.length>0&&(S("RemoteStore","Stopping write stream with ".concat(e.du.length," pending writes")),e.du=[]);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())),e.Tu}var Iu=function(){function e(t,n,r,i,a){Object(p.a)(this,e),this.asyncQueue=t,this.timerId=n,this.targetTimeMs=r,this.op=i,this.removalCallback=a,this.deferred=new M,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch((function(e){}))}return Object(v.a)(e,[{key:"start",value:function(e){var t=this;this.timerHandle=setTimeout((function(){return t.handleDelayElapsed()}),e)}},{key:"skipDelay",value:function(){return this.handleDelayElapsed()}},{key:"cancel",value:function(e){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new L(D.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}},{key:"handleDelayElapsed",value:function(){var e=this;this.asyncQueue.enqueueAndForget((function(){return null!==e.timerHandle?(e.clearTimeout(),e.op().then((function(t){return e.deferred.resolve(t)}))):Promise.resolve()}))}},{key:"clearTimeout",value:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}))}],[{key:"createAndSchedule",value:function(t,n,r,i,a){var o=new e(t,n,Date.now()+r,i,a);return o.start(r),o}}]),e}();function Cu(e,t){if(T("AsyncQueue","".concat(t,": ").concat(e)),ui(e))return new L(D.UNAVAILABLE,"".concat(t,": ").concat(e));throw e}var Au=function(){function e(t){Object(p.a)(this,e),this.comparator=t?function(e,n){return t(e,n)||Oe.comparator(e.key,n.key)}:function(e,t){return Oe.comparator(e.key,t.key)},this.keyedMap=Pn(),this.sortedSet=new nt(this.comparator)}return Object(v.a)(e,[{key:"has",value:function(e){return null!=this.keyedMap.get(e)}},{key:"get",value:function(e){return this.keyedMap.get(e)}},{key:"first",value:function(){return this.sortedSet.minKey()}},{key:"last",value:function(){return this.sortedSet.maxKey()}},{key:"isEmpty",value:function(){return this.sortedSet.isEmpty()}},{key:"indexOf",value:function(e){var t=this.keyedMap.get(e);return t?this.sortedSet.indexOf(t):-1}},{key:"size",get:function(){return this.sortedSet.size}}
2,{key:"forEach",value:function(e){this.sortedSet.inorderTraversal((function(t,n){return e(t),!1}))}},{key:"add",value:function(e){var t=this.delete(e.key);return t.copy(t.keyedMap.insert(e.key,e),t.sortedSet.insert(e,null))}},{key:"delete",value:function(e){var t=this.get(e);return t?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(t)):this}},{key:"isEqual",value:function(t){if(!(t instanceof e))return!1;if(this.size!==t.size)return!1;for(var n=this.sortedSet.getIterator(),r=t.sortedSet.getIterator();n.hasNext();){var i=n.getNext().key,a=r.getNext().key;if(!i.isEqual(a))return!1}return!0}},{key:"toString",value:function(){var e=[];return this.forEach((function(t){e.push(t.toString())})),0===e.length?"DocumentSet ()":"DocumentSet (\n  "+e.join("  \n")+"\n)"}},{key:"copy",value:function(t,n){var r=new e;return r.comparator=this.comparator,r.keyedMap=t,r.sortedSet=n,r}}],[{key:"emptySet",value:function(t){return new e(t.comparator)}}]),e}(),Ru=function(){function e(){Object(p.a)(this,e),this.Eu=new nt(Oe.comparator)}return Object(v.a)(e,[{key:"track",value:function(e){var t=e.doc.key,n=this.Eu.get(t);n?0!==e.type&&3===n.type?this.Eu=this.Eu.insert(t,e):3===e.type&&1!==n.type?this.Eu=this.Eu.insert(t,{type:n.type,doc:e.doc}):2===e.type&&2===n.type?this.Eu=this.Eu.insert(t,{type:2,doc:e.doc}):2===e.type&&0===n.type?this.Eu=this.Eu.insert(t,{type:0,doc:e.doc}):1===e.type&&0===n.type?this.Eu=this.Eu.remove(t):1===e.type&&2===n.type?this.Eu=this.Eu.insert(t,{type:1,doc:n.doc}):0===e.type&&1===n.type?this.Eu=this.Eu.insert(t,{type:2,doc:e.doc}):A():this.Eu=this.Eu.insert(t,e)}},{key:"Au",value:function(){var e=[];return this.Eu.inorderTraversal((function(t,n){e.push(n)})),e}}]),e}(),Nu=function(){function e(t,n,r,i,a,o,u,s){Object(p.a)(this,e),this.query=t,this.docs=n,this.oldDocs=r,this.docChanges=i,this.mutatedKeys=a,this.fromCache=o,this.syncStateChanged=u,this.excludesMetadataChanges=s}return Object(v.a)(e,[{key:"hasPendingWrites",get:function(){return!this.mutatedKeys.isEmpty()}},{key:"isEqual",value:function(e){if(!(this.fromCache===e.fromCache&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&Ut(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;var t=this.docChanges,n=e.docChanges;if(t.length!==n.length)return!1;for(var r=0;r<t.length;r++)if(t[r].type!==n[r].type||!t[r].doc.isEqual(n[r].doc))return!1;return!0}}],[{key:"fromInitialDocuments",value:function(t,n,r,i){var a=[];return n.forEach((function(e){a.push({type:0,doc:e})})),new e(t,n,Au.emptySet(n),a,r,i,!0,!1)}}]),e}(),Pu=function e(){Object(p.a)(this,e),this.Ru=void 0,this.listeners=[]},Du=function e(){Object(p.a)(this,e),this.queries=new Cn((function(e){return Vt(e)}),Ut),this.onlineState="Unknown",this.bu=new Set};function Lu(e,t){return Mu.apply(this,arguments)}function Mu(){return(Mu=Object(l.a)(c.a.mark((function e(t,n){var r,i,a,o,u;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=P(t),i=n.query,a=!1,(o=r.queries.get(i))||(a=!0,o=new Pu),!a){e.next=13;break}return e.prev=3,e.next=6,r.onListen(i);case 6:o.Ru=e.sent,e.next=13;break;case 9:return e.prev=9,e.t0=e.catch(3),u=Cu(e.t0,"Initialization of query '".concat(Bt(n.query),"' failed")),e.abrupt("return",void n.onError(u));case 13:r.queries.set(i,o),o.listeners.push(n),n.Pu(r.onlineState),o.Ru&&n.Vu(o.Ru)&&zu(r);case 14:case"end":return e.stop()}}),e,null,[[3,9]])})))).apply(this,arguments)}function Fu(e,t){return Uu.apply(this,arguments)}function Uu(){return(Uu=Object(l.a)(c.a.mark((function e(t,n){var r,i,a,o,u;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=P(t),i=n.query,a=!1,(o=r.queries.get(i))&&(u=o.listeners.indexOf(n))>=0&&(o.listeners.splice(u,1),a=0===o.listeners.length),!a){e.next=6;break}return e.abrupt("return",(r.queries.delete(i),r.onUnlisten(i)));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Vu(e,t){var n,r=P(e),i=!1,a=Object(u.a)(t);try{for(a.s();!(n=a.n()).done;){var o=n.value,s=o.query,c=r.queries.get(s);if(c){var l,f=Object(u.a)(c.listeners);try{for(f.s();!(l=f.n()).done;){l.value.Vu(o)&&(i=!0)}}catch(h){f.e(h)}finally{f.f()}c.Ru=o}}}catch(h){a.e(h)}finally{a.f()}i&&zu(r)}function Bu(e,t,n){var r=P(e),i=r.queries.get(t);if(i){var a,o=Object(u.a)(i.listeners);try{for(o.s();!(a=o.n()).done;){a.value.onError(n)}}catch(s){o.e(s)}finally{o.f()}}r.queries.delete(t)}function zu(e){e.bu.forEach((function(e){e.next()}))}var qu=function(){function e(t,n,r){Object(p.a)(this,e),this.query=t,this.vu=n,this.Su=!1,this.Du=null,this.onlineState="Unknown",this.options=r||{}}return Object(v.a)(e,[{key:"Vu",value:function(e){if(!this.options.includeMetadataChanges){var t,n=[],r=Object(u.a)(e.docChanges);try{for(r.s();!(t=r.n()).done;){var i=t.value;3!==i.type&&n.push(i)}}catch(o){r.e(o)}finally{r.f()}e=new Nu(e.query,e.docs,e.oldDocs,n,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0)}var a=!1;return this.Su?this.Cu(e)&&(this.vu.next(e),a=!0):this.xu(e,this.onlineState)&&(this.Nu(e),a=!0),this.Du=e,a}},{key:"onError",value:function(e){this.vu.error(e)}},{key:"Pu",value:function(e){this.onlineState=e;var t=!1;return this.Du&&!this.Su&&this.xu(this.Du,e)&&(this.Nu(this.Du),t=!0),t}},{key:"xu",value:function(e,t){if(!e.fromCache)return!0;var n="Offline"!==t;return(!this.options.ku||!n)&&(!e.docs.isEmpty()||"Offline"===t)}},{key:"Cu",value:function(e){if(e.docChanges.length>0)return!0;var t=this.Du&&this.Du.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!t)&&!0===this.options.includeMetadataChanges}},{key:"Nu",value:function(e){e=Nu.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache),this.Su=!0,this.vu.next(e)}}]),e}(),Wu=function(){function e(t,n){Object(p.a)(this,e),this.payload=t,this.byteLength=n}return Object(v.a)(e,[{key:"Mu",value:function(){return"metadata"in this.payload}}]),e}(),Hu=function(){function e(t){Object(p.a)(this,e),this.M=t}return Object(v.a)(e,[{key:"wi",value:function(e){return or(this.M,e)}},{key:"mi",value:function(e){return e.metadata.exists?hr(this.M,e.document,!1):Ke.newNoDocument(this.wi(e.metadata.name),this.gi(e.metadata.readTime))}},{key:"gi",value:function(e){return nr(e)}}]),e}(),Ku=function(){function e(t,n,r){Object(p.a)(this,e),this.Ou=t,this.localStore=n,this.M=r,this.queries=[],this.documents=[],this.collectionGroups=new Set,this.progress=Gu(t)}return Object(v.a)(e,[{key:"Fu",value:function(e){this.progress.bytesLoaded+=e.byteLength;var t=this.progress.documentsLoaded;if(e.payload.namedQuery)this.queries.push(e.payload.namedQuery);else if(e.payload.documentMetadata){this.documents.push({metadata:e.payload.documentMetadata}),e.payload.documentMetadata.exists||++t;var n=ie.fromString(e.payload.documentMetadata.name);this.collectionGroups.add(n.get(n.length-2))}else e.payload.document&&(this.documents[this.documents.length-1].document=e.payload.document,++t);return t!==this.progress.documentsLoaded?(this.progress.documentsLoaded=t,Object.assign({},this.progress)):null}},{key:"$u",value:function(e){var t,n=new Map,r=new Hu(this.M),i=Object(u.a)(e);try{for(i.s();!(t=i.n()).done;){var a=t.value;if(a.metadata.queries){var o,s=r.wi(a.metadata.name),c=Object(u.a)(a.metadata.queries);try{for(c.s();!(o=c.n()).done;){var l=o.value,f=(n.get(l)||Fn()).add(s);n.set(l,f)}}catch(h){c.e(h)}finally{c.f()}}}}catch(h){i.e(h)}finally{i.f()}return n}},{key:"complete",value:function(){var e=Object(l.a)(c.a.mark((function e(){var t,n,r,i,a;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,to(this.localStore,new Hu(this.M),this.documents,this.Ou.id);case 2:t=e.sent,n=this.$u(this.documents),r=Object(u.a)(this.queries),e.prev=5,r.s();case 7:if((i=r.n()).done){e.next=13;break}return a=i.value,e.next=11,ro(this.localStore,a,n.get(a.name));case 11:e.next=7;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(5),r.e(e.t0);case 18:return e.prev=18,r.f(),e.finish(18);case 21:return e.abrupt("return",(this.progress.taskState="Success",{progress:this.progress,Bu:this.collectionGroups,Lu:t}));case 22:case"end":return e.stop()}}),e,this,[[5,15,18,21]])})));return function(){return e.apply(this,arguments)}}()}]),e}();function Gu(e){return{taskState:"Running",documentsLoaded:0,bytesLoaded:0,totalDocuments:e.totalDocuments,totalBytes:e.totalBytes}}var $u=function e(t){Object(p.a)(this,e),this.key=t},Qu=function e(t){Object(p.a)(this,e),this.key=t},Yu=function(){function e(t,n){Object(p.a)(this,e),this.query=t,this.Uu=n,this.qu=null,this.current=!1,this.Ku=Fn(),this.mutatedKeys=Fn(),this.Gu=Wt(t),this.Qu=new Au(this.Gu)}return Object(v.a)(e,[{key:"ju",get:function(){return this.Uu}},{key:"Wu",value:function(e,t){var n=this,r=t?t.zu:new Ru,i=t?t.Qu:this.Qu,a=t?t.mutatedKeys:this.mutatedKeys,o=i,u=!1,s="F"===this.query.limitType&&i.size===this.query.limit?i.last(
2):null,c="L"===this.query.limitType&&i.size===this.query.limit?i.first():null;if(e.inorderTraversal((function(e,t){var l=i.get(e),f=zt(n.query,t)?t:null,h=!!l&&n.mutatedKeys.has(l.key),d=!!f&&(f.hasLocalMutations||n.mutatedKeys.has(f.key)&&f.hasCommittedMutations),p=!1;l&&f?l.data.isEqual(f.data)?h!==d&&(r.track({type:3,doc:f}),p=!0):n.Hu(l,f)||(r.track({type:2,doc:f}),p=!0,(s&&n.Gu(f,s)>0||c&&n.Gu(f,c)<0)&&(u=!0)):!l&&f?(r.track({type:0,doc:f}),p=!0):l&&!f&&(r.track({type:1,doc:l}),p=!0,(s||c)&&(u=!0)),p&&(f?(o=o.add(f),a=d?a.add(e):a.delete(e)):(o=o.delete(e),a=a.delete(e)))})),null!==this.query.limit)for(;o.size>this.query.limit;){var l="F"===this.query.limitType?o.last():o.first();o=o.delete(l.key),a=a.delete(l.key),r.track({type:1,doc:l})}return{Qu:o,zu:r,ii:u,mutatedKeys:a}}},{key:"Hu",value:function(e,t){return e.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations}},{key:"applyChanges",value:function(e,t,n){var r=this,i=this.Qu;this.Qu=e.Qu,this.mutatedKeys=e.mutatedKeys;var a=e.zu.Au();a.sort((function(e,t){return function(e,t){var n=function(e){switch(e){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return A()}};return n(e)-n(t)}(e.type,t.type)||r.Gu(e.doc,t.doc)})),this.Ju(n);var o=t?this.Yu():[],u=0===this.Ku.size&&this.current?1:0,s=u!==this.qu;return this.qu=u,0!==a.length||s?{snapshot:new Nu(this.query,e.Qu,i,a,e.mutatedKeys,0===u,s,!1),Xu:o}:{Xu:o}}},{key:"Pu",value:function(e){return this.current&&"Offline"===e?(this.current=!1,this.applyChanges({Qu:this.Qu,zu:new Ru,mutatedKeys:this.mutatedKeys,ii:!1},!1)):{Xu:[]}}},{key:"Zu",value:function(e){return!this.Uu.has(e)&&!!this.Qu.has(e)&&!this.Qu.get(e).hasLocalMutations}},{key:"Ju",value:function(e){var t=this;e&&(e.addedDocuments.forEach((function(e){return t.Uu=t.Uu.add(e)})),e.modifiedDocuments.forEach((function(e){})),e.removedDocuments.forEach((function(e){return t.Uu=t.Uu.delete(e)})),this.current=e.current)}},{key:"Yu",value:function(){var e=this;if(!this.current)return[];var t=this.Ku;this.Ku=Fn(),this.Qu.forEach((function(t){e.Zu(t.key)&&(e.Ku=e.Ku.add(t.key))}));var n=[];return t.forEach((function(t){e.Ku.has(t)||n.push(new Qu(t))})),this.Ku.forEach((function(e){t.has(e)||n.push(new $u(e))})),n}},{key:"ta",value:function(e){this.Uu=e._i,this.Ku=Fn();var t=this.Wu(e.documents);return this.applyChanges(t,!0)}},{key:"ea",value:function(){return Nu.fromInitialDocuments(this.query,this.Qu,this.mutatedKeys,0===this.qu)}}]),e}(),Xu=function e(t,n,r){Object(p.a)(this,e),this.query=t,this.targetId=n,this.view=r},Ju=function e(t){Object(p.a)(this,e),this.key=t,this.na=!1},Zu=function(){function e(t,n,r,i,a,o){Object(p.a)(this,e),this.localStore=t,this.remoteStore=n,this.eventManager=r,this.sharedClientState=i,this.currentUser=a,this.maxConcurrentLimboResolutions=o,this.sa={},this.ia=new Cn((function(e){return Vt(e)}),Ut),this.ra=new Map,this.oa=new Set,this.ua=new nt(Oe.comparator),this.aa=new Map,this.ca=new uo,this.ha={},this.la=new Map,this.fa=sa.yn(),this.onlineState="Unknown",this.da=void 0}return Object(v.a)(e,[{key:"isPrimaryClient",get:function(){return!0===this.da}}]),e}();function es(e,t){return ts.apply(this,arguments)}function ts(){return(ts=Object(l.a)(c.a.mark((function e(t,n){var r,i,a,o,u,s;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=Gs(t),!(o=r.ia.get(n))){e.next=6;break}
2i=o.targetId,r.sharedClientState.addLocalQueryTarget(i),a=o.view.ea(),e.next=15;break;case 6:return e.next=8,$a(r.localStore,Mt(n));case 8:return u=e.sent,r.isPrimaryClient&&Ko(r.remoteStore,u),s=r.sharedClientState.addLocalQueryTarget(u.targetId),i=u.targetId,e.next=14,ns(r,n,i,"current"===s);case 14:a=e.sent;case 15:return e.abrupt("return",a);case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ns(e,t,n,r){return rs.apply(this,arguments)}function rs(){return rs=Object(l.a)(c.a.mark((function e(t,n,r,i){var a,o,u,s,f,h;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t._a=function(e,n,r){return function(){var e=Object(l.a)(c.a.mark((function e(t,n,r,i){var a,o,u;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=n.view.Wu(r),e.t0=a.ii,!e.t0){e.next=6;break}return e.next=5,Xa(t.localStore,n.query,!1).then((function(e){var t=e.documents;return n.view.Wu(t,a)}));case 5:a=e.sent;case 6:return o=i&&i.targetChanges.get(n.targetId),u=n.view.applyChanges(a,t.isPrimaryClient,o),e.abrupt("return",(xs(t,n.targetId,u.Xu),u.snapshot));case 8:case"end":return e.stop()}}),e)})));return function(t,n,r,i){return e.apply(this,arguments)}}()(t,e,n,r)},e.next=3,Xa(t.localStore,n,!0);case 3:return a=e.sent,o=new Yu(n,a._i),u=o.Wu(a.documents),s=zn.createSynthesizedTargetChangeForCurrentChange(r,i&&"Offline"!==t.onlineState),f=o.applyChanges(u,t.isPrimaryClient,s),xs(t,r,f.Xu),h=new Xu(n,r,o),e.abrupt("return",(t.ia.set(n,h),t.ra.has(r)?t.ra.get(r).push(n):t.ra.set(r,[n]),f.snapshot));case 11:case"end":return e.stop()}}),e)}))),rs.apply(this,arguments)}function is(e,t){return as.apply(this,arguments)}function as(){return(as=Object(l.a)(c.a.mark((function e(t,n){var r,i,a;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=P(t),i=r.ia.get(n),!((a=r.ra.get(i.targetId)).length>1)){e.next=3;break}return e.abrupt("return",(r.ra.set(i.targetId,a.filter((function(e){return!Ut(e,n)}))),void r.ia.delete(n)));case 3:if(!r.isPrimaryClient){e.next=11;break}if(r.sharedClientState.removeLocalQueryTarget(i.targetId),e.t0=r.sharedClientState.isActiveQueryTarget(i.targetId),e.t0){e.next=9;break}return e.next=9,Qa(r.localStore,i.targetId,!1).then((function(){r.sharedClientState.clearQueryState(i.targetId),Go(r.remoteStore,i.targetId),ws(r,i.targetId)})).catch(da);case 9:e.next=14;break;case 11:return ws(r,i.targetId),e.next=14,Qa(r.localStore,i.targetId,!0);case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function os(e,t,n){return us.apply(this,arguments)}function us(){return(us=Object(l.a)(c.a.mark((function e(t,n,r){var i,a,o;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=$s(t),e.prev=1,e.next=4,function(e,t){var n,r=P(e),i=J.now(),a=t.reduce((function(e,t){return e.add(t.key)}),Fn());return r.persistence.runTransaction("Locally write mutations","readwrite",(function(e){return r.fi.Ks(e,a).next((function(a){n=a;var o,s=[],c=Object(u.a)(t);try{for(c.s();!(o=c.n()).done;){var l=o.value,f=vn(l,n.get(l.key));null!=f&&s.push(new bn(l.key,f,He(f.value.mapValue),ln.exists(!0)))}}catch(h){c.e(h)}finally{c.f()}return r.Bs.addMutationBatch(e,i,s,t)}))})).then((function(e){return e.applyToLocalDocumentSet(n),{batchId:e.batchId,changes:n}}))}(i.localStore,n);case 4:return a=e.sent,i.sharedClientState.addPendingMutation(a.batchId),function(e,t,n){var r=e.ha[e.currentUser.toKey()];r||(r=new nt(Q)),r=r.insert(t,n),e.ha[e.currentUser.toKey()]=r}(i,a.batchId,r),e.next=9,Es(i,a.changes);case 9:return e.next=11,cu(i.remoteStore);case 11:e.next=17;break;case 13:e.prev=13,e.t0=e.catch(1),o=Cu(e.t0,"Failed to persist write"),r.reject(o);case 17:case"end":return e.stop()}}),e,null,[[1,13]])})))).apply(this,arguments)}function ss(e,t){return cs.apply(this,arguments)}function cs(){return(cs=Object(l.a)(c.a.mark((function e(t,n){var r,i;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=P(t),e.prev=1,e.next=4,Ha(r.localStore,n);
2case 4:return i=e.sent,n.targetChanges.forEach((function(e,t){var n=r.aa.get(t);n&&(R(e.addedDocuments.size+e.modifiedDocuments.size+e.removedDocuments.size<=1),e.addedDocuments.size>0?n.na=!0:e.modifiedDocuments.size>0?R(n.na):e.removedDocuments.size>0&&(R(n.na),n.na=!1))})),e.next=8,Es(r,i,n);case 8:e.next=14;break;case 10:return e.prev=10,e.t0=e.catch(1),e.next=14,da(e.t0);case 14:case"end":return e.stop()}}),e,null,[[1,10]])})))).apply(this,arguments)}function ls(e,t,n){var r=P(e);if(r.isPrimaryClient&&0===n||!r.isPrimaryClient&&1===n){var i=[];r.ia.forEach((function(e,n){var r=n.view.Pu(t);r.snapshot&&i.push(r.snapshot)})),function(e,t){var n=P(e);n.onlineState=t;var r=!1;n.queries.forEach((function(e,n){var i,a=Object(u.a)(n.listeners);try{for(a.s();!(i=a.n()).done;){i.value.Pu(t)&&(r=!0)}}catch(o){a.e(o)}finally{a.f()}})),r&&zu(n)}(r.eventManager,t),i.length&&r.sa.zo(i),r.onlineState=t,r.isPrimaryClient&&r.sharedClientState.setOnlineState(t)}}function fs(e,t,n){return hs.apply(this,arguments)}function hs(){return(hs=Object(l.a)(c.a.mark((function e(t,n,r){var i,a,o,u,s,l;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((i=P(t)).sharedClientState.updateQueryState(n,"rejected",r),a=i.aa.get(n),!(o=a&&a.key)){e.next=14;break}return u=(u=new nt(Oe.comparator)).insert(o,Ke.newNoDocument(o,Z.min())),s=Fn().add(o),l=new Bn(Z.min(),new Map,new at(Q),u,s),e.next=9,ss(i,l);case 9:i.ua=i.ua.remove(o),i.aa.delete(n),js(i),e.next=16;break;case 14:return e.next=16,Qa(i.localStore,n,!1).then((function(){return ws(i,n,r)})).catch(da);case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ds(e,t){return ps.apply(this,arguments)}function ps(){return(ps=Object(l.a)(c.a.mark((function e(t,n){var r,i,a;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=P(t),i=n.batch.batchId,e.prev=1,e.next=4,qa(r.localStore,n);
2case 4:return a=e.sent,ks(r,i,null),bs(r,i),r.sharedClientState.updateMutationState(i,"acknowledged"),e.next=10,Es(r,a);case 10:e.next=16;break;case 12:return e.prev=12,e.t0=e.catch(1),e.next=16,da(e.t0);case 16:case"end":return e.stop()}}),e,null,[[1,12]])})))).apply(this,arguments)}function vs(e,t,n){return ms.apply(this,arguments)}function ms(){return(ms=Object(l.a)(c.a.mark((function e(t,n,r){var i,a;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=P(t),e.prev=1,e.next=4,function(e,t){var n=P(e);return n.persistence.runTransaction("Reject batch","readwrite-primary",(function(e){var r;return n.Bs.lookupMutationBatch(e,t).next((function(t){return R(null!==t),r=t.keys(),n.Bs.removeMutationBatch(e,t)})).next((function(){return n.Bs.performConsistencyCheck(e)})).next((function(){return n.fi.Ks(e,r)}))}))}(i.localStore,n);case 4:return a=e.sent,ks(i,n,r),bs(i,n),i.sharedClientState.updateMutationState(n,"rejected",r),e.next=10,Es(i,a);case 10:e.next=16;break;case 12:return e.prev=12,e.t0=e.catch(1),e.next=16,da(e.t0);case 16:case"end":return e.stop()}}),e,null,[[1,12]])})))).apply(this,arguments)}function ys(e,t){return gs.apply(this,arguments)}function gs(){return(gs=Object(l.a)(c.a.mark((function e(t,n){var r,i,a,o;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Jo((r=P(t)).remoteStore)||S("SyncEngine","The network is disabled. The task returned by 'awaitPendingWrites()' will not complete until the network is enabled."),e.prev=2,e.next=5,function(e){var t=P(e);return t.persistence.runTransaction("Get highest unacknowledged batch id","readonly",(function(e){return t.Bs.getHighestUnacknowledgedBatchId(e)}))}(r.localStore);case 5:if(-1!==(i=e.sent)){e.next=8;break}return e.abrupt("return",void n.resolve());case 8:(a=r.la.get(i)||[]).push(n),r.la.set(i,a),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(2),o=Cu(e.t0,"Initialization of waitForPendingWrites() operation failed"),n.reject(o);case 16:case"end":return e.stop()}}),e,null,[[2,12]])})))).apply(this,arguments)}function bs(e,t){(e.la.get(t)||[]).forEach((function(e){e.resolve()})),e.la.delete(t)}function ks(e,t,n){var r=P(e),i=r.ha[r.currentUser.toKey()];if(i){var a=i.get(t);a&&(n?a.reject(n):a.resolve(),i=i.remove(t)),r.ha[r.currentUser.toKey()]=i}}function ws(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;e.sharedClientState.removeLocalQueryTarget(t);var r,i=Object(u.a)(e.ra.get(t));try{for(i.s();!(r=i.n()).done;){var a=r.value;e.ia.delete(a),n&&e.sa.wa(a,n)}}catch(o){i.e(o)}finally{i.f()}e.ra.delete(t),e.isPrimaryClient&&e.ca.vi(t).forEach((function(t){e.ca.containsKey(t)||Os(e,t)}))}function Os(e,t){e.oa.delete(t.path.canonicalString());var n=e.ua.get(t);null!==n&&(Go(e.remoteStore,n),e.ua=e.ua.remove(t),e.aa.delete(n),js(e))}function xs(e,t,n){var r,i=Object(u.a)(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;a instanceof $u?(e.ca.addReference(a.key,t),_s(e,a)):a instanceof Qu?(S("SyncEngine","Document no longer in limbo: "+a.key),e.ca.removeReference(a.key,t),e.ca.containsKey(a.key)||Os(e,a.key)):A()}}catch(o){i.e(o)}finally{i.f()}}function _s(e,t){var n=t.key,r=n.path.canonicalString();e.ua.get(n)||e.oa.has(r)||(S("SyncEngine","New document in limbo: "+n),e.oa.add(r),js(e))}function js(e){for(;e.oa.size>0&&e.ua.size<e.maxConcurrentLimboResolutions;){var t=e.oa.values().next().value;e.oa.delete(t);var n=new Oe(ie.fromString(t)),r=e.fa.next();e.aa.set(r,new Ju(n)),e.ua=e.ua.insert(n,r),Ko(e.remoteStore,new yi(Mt(Rt(n.path)),r,2,K.A))}}function Es(e,t,n){return Ss.apply(this,arguments)}function Ss(){return Ss=Object(l.a)(c.a.mark((function e(t,n,r){var i,a,o,s;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=P(t),a=[],o=[],s=[],e.t0=i.ia.isEmpty(),e.t0){e.next=9;break}return i.ia.forEach((function(e,t){s.push(i._a(t,n,r).then((function(e){if(e){i.isPrimaryClient&&i.sharedClientState.updateQueryState(t.targetId,e.fromCache?"not-current":"current"),a.push(e);var n=Ma.Ys(t.targetId,e);o.push(n)}})))})),e.next=6,Promise.all(s);case 6:return i.sa.zo(a),e.next=9,function(){var e=Object(l.a)(c.a.mark((function e(t,n){var r,i,a,o,s,l,f,h;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=P(t),e.prev=1,e.next=4,r.persistence.runTransaction("notifyLocalViewChanges","readwrite",(function(e){return ni.forEach(n,(function(t){return ni.forEach(t.Hs,(function(n){return r.persistence.referenceDelegate.addReference(e,t.targetId,n)})).next((function(){return ni.forEach(t.Js,(function(n){return r.persistence.referenceDelegate.removeReference(e,t.targetId,n)}))}))}))}));case 4:e.next=11;break;case 6:if(e.prev=6,e.t0=e.catch(1),ui(e.t0)){e.next=10;break}throw e.t0;case 10:S("LocalStore","Failed to update sequence numbers: "+e.t0);case 11:i=Object(u.a)(n);try{for(i.s();!(a=i.n()).done;)o=a.value,s=o.targetId,o.fromCache||(l=r.ui.get(s),f=l.snapshotVersion,h=l.withLastLimboFreeSnapshotVersion(f),r.ui=r.ui.insert(s,h))}catch(c){i.e(c)}finally{i.f()}case 13:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(t,n){return e.apply(this,arguments)}}()(i.localStore,o);case 9:case"end":return e.stop()}}),e)}))),Ss.apply(this,arguments)}function Ts(e,t){return Is.apply(this,arguments)}function Is(){return(Is=Object(l.a)(c.a.mark((function e(t,n){var r,i;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((r=P(t)).currentUser.isEqual(n)){e.next=11;break}
2return S("SyncEngine","User change. New user:",n.toKey()),e.next=5,Ba(r.localStore,n);case 5:return i=e.sent,r.currentUser=n,function(e,t){e.la.forEach((function(e){e.forEach((function(e){e.reject(new L(D.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))}))})),e.la.clear()}(r),r.sharedClientState.handleUserChange(n,i.removedBatchIds,i.addedBatchIds),e.next=11,Es(r,i.di);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Cs(e,t){var n=P(e),r=n.aa.get(t);if(r&&r.na)return Fn().add(r.key);var i=Fn(),a=n.ra.get(t);if(!a)return i;var o,s=Object(u.a)(a);try{for(s.s();!(o=s.n()).done;){var c=o.value,l=n.ia.get(c);i=i.unionWith(l.view.ju)}}catch(f){s.e(f)}finally{s.f()}return i}function As(e,t){return Rs.apply(this,arguments)}function Rs(){return(Rs=Object(l.a)(c.a.mark((function e(t,n){var r,i,a;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=P(t),e.next=3,Xa(r.localStore,n.query,!0);case 3:return i=e.sent,a=n.view.ta(i),e.abrupt("return",(r.isPrimaryClient&&xs(r,n.targetId,a.Xu),a));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ns(e,t){return Ps.apply(this,arguments)}function Ps(){return(Ps=Object(l.a)(c.a.mark((function e(t,n){var r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=P(t),e.abrupt("return",Za(r.localStore,n).then((function(e){return Es(r,e)})));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ds(e,t,n,r){return Ls.apply(this,arguments)}function Ls(){return(Ls=Object(l.a)(c.a.mark((function e(t,n,r,i){var a,o;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=P(t),e.next=3,function(e,t){var n=P(e),r=P(n.Bs);return n.persistence.runTransaction("Lookup mutation documents","readonly",(function(e){return r.fn(e,t).next((function(t){return t?n.fi.Ks(e,t):ni.resolve(null)}))}))}(a.localStore,n);case 3:if(null===(o=e.sent)){e.next=15;break}if("pending"!==r){e.next=10;break}return e.next=8,cu(a.remoteStore);case 8:e.next=11;break;case 10:"acknowledged"===r||"rejected"===r?(ks(a,n,i||null),bs(a,n),function(e,t){P(P(e).Bs)._n(t)}(a.localStore,n)):A();case 11:return e.next=13,Es(a,o);case 13:e.next=16;break;case 15:S("SyncEngine","Cannot apply mutation batch with id: "+n);case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ms(e,t){return Fs.apply(this,arguments)}function Fs(){return(Fs=Object(l.a)(c.a.mark((function e(t,n){var r,i,a,o,s,l,f,h;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Gs(r=P(t)),$s(r),!0!==n||!0===r.da){e.next=13;break}return i=r.sharedClientState.getAllActiveQueryTargets(),e.next=5,Us(r,i.toArray());case 5:return a=e.sent,r.da=!0,e.next=9,ju(r.remoteStore,!0);case 9:o=Object(u.a)(a);try{for(o.s();!(s=o.n()).done;)l=s.value,Ko(r.remoteStore,l)}catch(c){o.e(c)}finally{o.f()}e.next=25;break;case 13:if(!1!==n||!1===r.da){e.next=25;break}return f=[],h=Promise.resolve(),r.ra.forEach((function(e,t){r.sharedClientState.isLocalQueryTarget(t)?f.push(t):h=h.then((function(){return ws(r,t),Qa(r.localStore,t,!0)})),Go(r.remoteStore,t)})),e.next=19,h;case 19:return e.next=21,Us(r,f);case 21:return function(e){var t=P(e);t.aa.forEach((function(e,n){Go(t.remoteStore,n)})),t.ca.Si(),t.aa=new Map,t.ua=new nt(Oe.comparator)}(r),r.da=!1,e.next=25,ju(r.remoteStore,!1);case 25:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Us(e,t,n){return Vs.apply(this,arguments)}function Vs(){return(Vs=Object(l.a)(c.a.mark((function e(t,n,r){var i,a,o,s,l,f,h,d,p,v,m,y,g,b;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=P(t),a=[],o=[],s=Object(u.a)(n),e.prev=2,s.s();case 4:if((l=s.n()).done){e.next=45;break}if(f=l.value,h=void 0,!(d=i.ra.get(f))||0===d.length){e.next=34;break}return e.next=11,$a(i.localStore,Mt(d[0]));case 11:h=e.sent,p=Object(u.a)(d),e.prev=13,p.s();
2case 15:if((v=p.n()).done){e.next=24;break}return m=v.value,y=i.ia.get(m),e.next=20,As(i,y);case 20:(g=e.sent).snapshot&&o.push(g.snapshot);case 22:e.next=15;break;case 24:e.next=29;break;case 26:e.prev=26,e.t0=e.catch(13),p.e(e.t0);case 29:return e.prev=29,p.f(),e.finish(29);case 32:e.next=42;break;case 34:return e.next=36,Ja(i.localStore,f);case 36:return b=e.sent,e.next=39,$a(i.localStore,b);case 39:return h=e.sent,e.next=42,ns(i,Bs(b),f,!1);case 42:a.push(h);case 43:e.next=4;break;case 45:e.next=50;break;case 47:e.prev=47,e.t1=e.catch(2),s.e(e.t1);case 50:return e.prev=50,s.f(),e.finish(50);case 53:return e.abrupt("return",(i.sa.zo(o),a));case 54:case"end":return e.stop()}}),e,null,[[2,47,50,53],[13,26,29,32]])})))).apply(this,arguments)}function Bs(e){return At(e.path,e.collectionGroup,e.orderBy,e.filters,e.limit,"F",e.startAt,e.endAt)}function zs(e){var t=P(e);return P(P(t.localStore).persistence).Fs()}function qs(e,t,n,r){return Ws.apply(this,arguments)}function Ws(){return(Ws=Object(l.a)(c.a.mark((function e(t,n,r,i){var a,o,u,s;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(a=P(t)).da){e.next=3;break}return e.abrupt("return",void S("SyncEngine","Ignoring unexpected query state notification."));case 3:if(!((o=a.ra.get(n))&&o.length>0)){e.next=20;break}e.t0=r,e.next="current"===e.t0||"not-current"===e.t0?8:"rejected"===e.t0?15:19;break;case 8:return e.next=10,Za(a.localStore,qt(o[0]));case 10:return u=e.sent,s=Bn.createSynthesizedRemoteEventForCurrentChange(n,"current"===r),e.next=14,Es(a,u,s);case 14:return e.abrupt("break",20);case 15:return e.next=17,Qa(a.localStore,n,!0);case 17:return ws(a,n,i),e.abrupt("break",20);case 19:A();case 20:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Hs(e,t,n){return Ks.apply(this,arguments)}function Ks(){return(Ks=Object(l.a)(c.a.mark((function e(t,n,r){var i,a,o,s,l,f,h,d,p;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(i=Gs(t)).da){e.next=45;break}a=Object(u.a)(n),e.prev=3,a.s();case 5:if((o=a.n()).done){e.next=21;break}if(s=o.value,!i.ra.has(s)){e.next=10;break}return S("SyncEngine","Adding an already active target "+s),e.abrupt("continue",19);case 10:return e.next=12,Ja(i.localStore,s);case 12:return l=e.sent,e.next=15,$a(i.localStore,l);case 15:return f=e.sent,e.next=18,ns(i,Bs(l),f.targetId,!1);case 18:Ko(i.remoteStore,f);case 19:e.next=5;break;case 21:e.next=26;break;case 23:e.prev=23,e.t0=e.catch(3),a.e(e.t0);case 26:return e.prev=26,a.f(),e.finish(26);case 29:h=Object(u.a)(r),e.prev=30,p=c.a.mark((function e(){var t;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=d.value,e.t0=i.ra.has(t),!e.t0){e.next=5;break}return e.next=5,Qa(i.localStore,t,!1).then((function(){Go(i.remoteStore,t),ws(i,t)})).catch(da);case 5:case"end":return e.stop()}}),e)})),h.s();case 33:if((d=h.n()).done){e.next=37;break}return e.delegateYield(p(),"t1",35);case 35:e.next=33;break;case 37:e.next=42;break;case 39:e.prev=39,e.t2=e.catch(30),h.e(e.t2);case 42:return e.prev=42,h.f(),e.finish(42);case 45:case"end":return e.stop()}}),e,null,[[3,23,26,29],[30,39,42,45]])})))).apply(this,arguments)}function Gs(e){var t=P(e);return t.remoteStore.remoteSyncer.applyRemoteEvent=ss.bind(null,t),t.remoteStore.remoteSyncer.getRemoteKeysForTarget=Cs.bind(null,t),t.remoteStore.remoteSyncer.rejectListen=fs.bind(null,t),t.sa.zo=Vu.bind(null,t.eventManager),t.sa.wa=Bu.bind(null,t.eventManager),t}function $s(e){var t=P(e);return t.remoteStore.remoteSyncer.applySuccessfulWrite=ds.bind(null,t),t.remoteStore.remoteSyncer.rejectFailedWrite=vs.bind(null,t),t}function Qs(e,t,n){var r=P(e);(function(){var e=Object(l.a)(c.a.mark((function e(t,n,r){var i,a,o,u,s;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.getMetadata();case 3:return i=e.sent,e.next=6,function(e,t){var n=P(e),r=nr(t.createTime);return n.persistence.runTransaction("hasNewerBundle","readonly",(function(e){return n._s.getBundleMetadata(e,t.id)})).then((function(e){return!!e&&e.createTime.compareTo(r)>=0}))}(t.localStore,i);case 6:if(!e.sent){e.next=11;break}return e.next=9,n.close();case 9:return r._completeWith(function(e){return{taskState:"Success",documentsLoaded:e.totalDocuments,bytesLoaded:e.totalBytes,totalDocuments:e.totalDocuments,totalBytes:e.totalBytes}}(i)),e.abrupt("return",Promise.resolve(new Set));case 11:return r._updateProgress(Gu(i)),a=new Ku(i,t.localStore,n.M),e.next=15,n.ma();case 15:o=e.sent;case 16:if(!o){e.next=26;break}return e.next=19,a.Fu(o);case 19:return(u=e.sent)&&r._updateProgress(u),e.next=23,n.ma();case 23:o=e.sent;case 24:e.next=16;break;case 26:return e.next=28,a.complete();case 28:return s=e.sent,e.next=31,Es(t,s.Lu,void 0);case 31:return e.next=33,function(e,t){var n=P(e);return n.persistence.runTransaction("Save bundle","readwrite",(function(e){return n._s.saveBundleMetadata(e,t)}))}(t.localStore,i);case 33:return r._completeWith(s.progress),e.abrupt("return",Promise.resolve(s.Bu));case 37:return e.prev=37,e.t0=e.catch(0),e.abrupt("return",(I("SyncEngine","Loading bundle failed with ".concat(e.t0)),r._failWith(e.t0),Promise.resolve(new Set)));case 40:case"end":return e.stop()}}),e,null,[[0,37]])})));return function(t,n,r){return e.apply(this,arguments)}}
2)()(r,t,n).then((function(e){r.sharedClientState.notifyBundleLoaded(e)}))}var Ys=function(){function e(){Object(p.a)(this,e),this.synchronizeTabs=!1}return Object(v.a)(e,[{key:"initialize",value:function(){var e=Object(l.a)(c.a.mark((function e(t){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.M=Po(t.databaseInfo.databaseId),this.sharedClientState=this.ga(t),this.persistence=this.ya(t),e.next=5,this.persistence.start();case 5:this.gcScheduler=this.pa(t),this.localStore=this.Ia(t);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"pa",value:function(e){return null}},{key:"Ia",value:function(e){return Va(this.persistence,new Fa,e.initialUser,this.M)}},{key:"ya",value:function(e){return new po(mo.Yi,this.M)}},{key:"ga",value:function(e){return new Eo}},{key:"terminate",value:function(){var e=Object(l.a)(c.a.mark((function e(){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.gcScheduler&&this.gcScheduler.stop(),e.next=3,this.sharedClientState.shutdown();case 3:return e.next=5,this.persistence.shutdown();case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}(),Xs=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r,i){var a;return Object(p.a)(this,n),(a=t.call(this)).Ta=e,a.cacheSizeBytes=r,a.forceOwnership=i,a.synchronizeTabs=!1,a}return Object(v.a)(n,[{key:"initialize",value:function(){var e=Object(l.a)(c.a.mark((function e(t){var r=this;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(i.a)(Object(a.a)(n.prototype),"initialize",this).call(this,t);case 2:return e.next=4,this.Ta.initialize(this,t);case 4:return e.next=6,$s(this.Ta.syncEngine);case 6:return e.next=8,cu(this.Ta.remoteStore);case 8:return e.next=10,this.persistence.Ts((function(){return r.gcScheduler&&!r.gcScheduler.started&&r.gcScheduler.start(r.localStore),Promise.resolve()}));case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"Ia",value:function(e){return Va(this.persistence,new Fa,e.initialUser,this.M)}},{key:"pa",value:function(e){var t=this.persistence.referenceDelegate.garbageCollector;return new ya(t,e.asyncQueue)}},{key:"ya",value:function(e){var t=Da(e.databaseInfo.databaseId,e.databaseInfo.persistenceKey),n=void 0!==this.cacheSizeBytes?ea.withCacheSize(this.cacheSizeBytes):ea.DEFAULT;return new Ra(this.synchronizeTabs,t,e.clientId,n,e.asyncQueue,Ro(),No(),this.M,this.sharedClientState,!!this.forceOwnership)}},{key:"ga",value:function(e){return new Eo}}]),n}(Ys),Js=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r){var i;return Object(p.a)(this,n),(i=t.call(this,e,r,!1)).Ta=e,i.cacheSizeBytes=r,i.synchronizeTabs=!0,i}return Object(v.a)(n,[{key:"initialize",value:function(){var e=Object(l.a)(c.a.mark((function e(t){var r,o=this;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(i.a)(Object(a.a)(n.prototype),"initialize",this).call(this,t);case 2:if(r=this.Ta.syncEngine,e.t0=this.sharedClientState instanceof jo,!e.t0){e.next=8;break}return this.sharedClientState.syncEngine={$r:Ds.bind(null,r),Br:qs.bind(null,r),Lr:Hs.bind(null,r),Fs:zs.bind(null,r),Fr:Ns.bind(null,r)},e.next=8,this.sharedClientState.start();case 8:return e.next=10,this.persistence.Ts(function(){var e=Object(l.a)(c.a.mark((function e(t){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ms(o.Ta.syncEngine,t);case 2:o.gcScheduler&&(t&&!o.gcScheduler.started?o.gcScheduler.start(o.localStore):t||o.gcScheduler.stop());case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"ga",value:function(e){var t=Ro();if(!jo.vt(t))throw new L(D.UNIMPLEMENTED,"IndexedDB persistence is only available on platforms that support LocalStorage.");var n=Da(e.databaseInfo.databaseId,e.databaseInfo.persistenceKey);return new jo(t,e.asyncQueue,n,e.clientId,e.initialUser)}}]),n}(Xs),Zs=function(){function e(){Object(p.a)(this,e)}return Object(v.a)(e,[{key:"initialize",value:function(){var e=Object(l.a)(c.a.mark((function e(t,n){var r=this;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=this.localStore,e.t0){e.next=12;break}
2return this.localStore=t.localStore,this.sharedClientState=t.sharedClientState,this.datastore=this.createDatastore(n),this.remoteStore=this.createRemoteStore(n),this.eventManager=this.createEventManager(n),this.syncEngine=this.createSyncEngine(n,!t.synchronizeTabs),this.sharedClientState.onlineStateHandler=function(e){return ls(r.syncEngine,e,1)},this.remoteStore.remoteSyncer.handleCredentialChange=Ts.bind(null,this.syncEngine),e.next=12,ju(this.remoteStore,this.syncEngine.isPrimaryClient);case 12:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"createEventManager",value:function(e){return new Du}},{key:"createDatastore",value:function(e){var t,n=Po(e.databaseInfo.databaseId),r=(t=e.databaseInfo,new Ao(t));return function(e,t,n,r){return new Uo(e,t,n,r)}(e.authCredentials,e.appCheckCredentials,r,n)}},{key:"createRemoteStore",value:function(e){var t,n,r,i,a,o=this;return t=this.localStore,n=this.datastore,r=e.asyncQueue,i=function(e){return ls(o.syncEngine,e,0)},a=To.vt()?new To:new So,new Bo(t,n,r,i,a)}},{key:"createSyncEngine",value:function(e,t){return function(e,t,n,r,i,a,o){var u=new Zu(e,t,n,r,i,a);return o&&(u.da=!0),u}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,t)}},{key:"terminate",value:function(){return function(){var e=Object(l.a)(c.a.mark((function e(t){var n;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=P(t),S("RemoteStore","RemoteStore shutting down."),n.wu.add(5),e.next=5,Wo(n);case 5:n.gu.shutdown(),n.yu.set("Unknown");case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()(this.remoteStore)}}]),e}();function ec(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10240,n=0;return{read:function(){return Object(l.a)(c.a.mark((function r(){var i;return c.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!(n<e.byteLength)){r.next=3;break}return i={value:e.slice(n,n+t),done:!1},r.abrupt("return",(n+=t,i));case 3:return r.abrupt("return",{done:!0});case 4:case"end":return r.stop()}}),r)})))()},cancel:function(){return Object(l.a)(c.a.mark((function e(){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))()},releaseLock:function(){},closed:Promise.reject("unimplemented")}}var tc=function(){function e(t){Object(p.a)(this,e),this.observer=t,this.muted=!1}return Object(v.a)(e,[{key:"next",value:function(e){this.observer.next&&this.Ea(this.observer.next,e)}},{key:"error",value:function(e){this.observer.error?this.Ea(this.observer.error,e):console.error("Uncaught Error in snapshot listener:",e)}},{key:"Aa",value:function(){this.muted=!0}},{key:"Ea",value:function(e,t){var n=this;this.muted||setTimeout((function(){n.muted||e(t)}),0)}}]),e}(),nc=function(){function e(t,n){var r=this;Object(p.a)(this,e),this.Ra=t,this.M=n,this.metadata=new M,this.buffer=new Uint8Array,this.ba=new TextDecoder("utf-8"),this.Pa().then((function(e){e&&e.Mu()?r.metadata.resolve(e.payload.metadata):r.metadata.reject(new Error("The first element of the bundle is not a metadata, it is\n             ".concat(JSON.stringify(null==e?void 0:e.payload))))}),(function(e){return r.metadata.reject(e)}))}return Object(v.a)(e,[{key:"close",value:function(){return this.Ra.cancel()}},{key:"getMetadata",value:function(){var e=Object(l.a)(c.a.mark((function e(){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.metadata.promise);case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"ma",value:function(){var e=Object(l.a)(c.a.mark((function e(){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getMetadata();case 2:return e.abrupt("return",this.Pa());case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"Pa",value:function(){var e=Object(l.a)(c.a.mark((function e(){var t,n,r,i;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.Va();case 2:if(null!==(t=e.sent)){e.next=5;break}return e.abrupt("return",null);case 5:return n=this.ba.decode(t),r=Number(n),isNaN(r)&&this.va("length string (".concat(n,") is not val
2id number")),e.next=9,this.Sa(r);case 9:return i=e.sent,e.abrupt("return",new Wu(JSON.parse(i),t.length+r));case 11:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"Da",value:function(){return this.buffer.findIndex((function(e){return e==="{".charCodeAt(0)}))}},{key:"Va",value:function(){var e=Object(l.a)(c.a.mark((function e(){var t,n;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this.Da()<0)){e.next=7;break}return e.next=3,this.Ca();case 3:if(!e.sent){e.next=5;break}return e.abrupt("break",7);case 5:e.next=0;break;case 7:if(0!==this.buffer.length){e.next=9;break}return e.abrupt("return",null);case 9:return(t=this.Da())<0&&this.va("Reached the end of bundle when a length string is expected."),n=this.buffer.slice(0,t),e.abrupt("return",(this.buffer=this.buffer.slice(t),n));case 13:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"Sa",value:function(){var e=Object(l.a)(c.a.mark((function e(t){var n;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this.buffer.length<t)){e.next=8;break}return e.next=3,this.Ca();case 3:if(e.t0=e.sent,!e.t0){e.next=6;break}this.va("Reached the end of bundle when more is expected.");case 6:e.next=0;break;case 8:return n=this.ba.decode(this.buffer.slice(0,t)),e.abrupt("return",(this.buffer=this.buffer.slice(t),n));case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"va",value:function(e){throw this.Ra.cancel(),new Error("Invalid bundle format: ".concat(e))}},{key:"Ca",value:function(){var e=Object(l.a)(c.a.mark((function e(){var t,n;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.Ra.read();case 2:return(t=e.sent).done||((n=new Uint8Array(this.buffer.length+t.value.length)).set(this.buffer),n.set(t.value,this.buffer.length),this.buffer=n),e.abrupt("return",t.done);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}(),rc=function(){function e(t){Object(p.a)(this,e),this.datastore=t,this.readVersions=new Map,this.mutations=[],this.committed=!1,this.lastWriteError=null,this.writtenDocs=new Set}return Object(v.a)(e,[{key:"lookup",value:function(){var e=Object(l.a)(c.a.mark((function e(t){var n,r=this;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.ensureCommitNotCalled(),!(this.mutations.length>0)){e.next=2;break}throw new L(D.INVALID_ARGUMENT,"Firestore transactions require all reads to be executed before all writes.");case 2:return e.next=4,function(){var e=Object(l.a)(c.a.mark((function e(t,n){var r,i,a,o,u,s;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=P(t),i=cr(r.M)+"/documents",a={documents:n.map((function(e){return ar(r.M,e)}))},e.next=5,r._o("BatchGetDocuments",i,a);case 5:return o=e.sent,u=new Map,o.forEach((function(e){var t=dr(r.M,e);u.set(t.key.toString(),t)})),s=[],e.abrupt("return",(n.forEach((function(e){var t=u.get(e.toString());R(!!t),s.push(t)})),s));case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()(this.datastore,t);case 4:return n=e.sent,e.abrupt("return",(n.forEach((function(e){return r.recordVersion(e)})),n));case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"set",value:function(e,t){this.write(t.toMutation(e,this.precondition(e))),this.writtenDocs.add(e.toString())}},{key:"update",value:function(e,t){try{this.write(t.toMutation(e,this.preconditionForUpdate(e)))}catch(e){this.lastWriteError=e}this.writtenDocs.add(e.toString())}},{key:"delete",value:function(e){this.write(new jn(e,this.precondition(e))),this.writtenDocs.add(e.toString())}},{key:"commit",value:function(){var e=Object(l.a)(c.a.mark((function e(){var t,n=this;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.ensureCommitNotCalled(),!this.lastWriteError){e.next=2;break}throw this.lastWriteError;case 2:return t=this.readVersions,this.mutations.forEach((function(e){t.delete(e.key.toString())})),t.forEach((function(e,t){var r=Oe.fromPath(t);n.mutations.push(new En(r,n.precondition(r)))})),e.next=7,function(){var e=Object(l.a)(c.a.mark((function e(t,n){var r,i,a;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=P(t),i=cr(r.M)+"/documents",a={writes:n.map((function(e){return pr(r.M,e)}))},e.next=3,r.co("Commit",i,a);case 3:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()(this.datastore,this.mutations);case 7:this.committed=!0;case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"recordVersion",value:function(e){var t;if(e.isFoundDocument())t=e.version;else{if(!e.isNoDocument())throw A();t=Z.min()}var n=this.readVersions.get(e.key.toString());if(n){if(!t.isEqual(n))throw new L(D.ABORTED,"Document version changed between two reads.")}else this.readVersions.set(e.key.toString(),t)}},{key:"precondition",value:function(e){var t=this.readVersions.get(e.toString());return!this.writtenDocs.has(e.toString())&&t?ln.updateTime(t):ln.none()}},{key:"preconditionForUpdate",value:function(e){var t=this.readVersions.get(e.toString());if(!this.writtenDocs.has(e.toString())&&t){if(t.isEqual(Z.min()))throw new L(D.INVALID_ARGUMENT,"Can't update a document that doesn't exist.");return ln.updateTime(t)}return ln.exists(!0)}},{key:"write",value:function(e){this.ensureCommitNotCalled(),this.mutations.push(e)}},{key:"ensureCommitNotCalled",value:function(){}}]),e}(),ic=function(){function e(t,n,r,i,a){Object(p.a)(this,e),this.asyncQueue=t,this.datastore=n,this.options=r,this.updateFunction=i,this.deferred=a,this.xa=r.maxAttempts,this.No=new Do(this.asyncQueue,"transaction_retry")}return Object(v.a)(e,[{key:"run",value:function(){this.xa-=1,this.Na()}},{key:"Na",value:function(){var e=this;this.No.Ro(Object(l.a)(c.a.mark((function t(){var n,r;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=new rc(e.datastore),(r=e.ka(n))&&r.then((function(t){e.asyncQueue.enqueueAndForget((function(){return n.commit().then((function(){e.deferred.resolve(t)}
2)).catch((function(t){e.Ma(t)}))}))})).catch((function(t){e.Ma(t)}));case 2:case"end":return t.stop()}}),t)}))))}},{key:"ka",value:function(e){try{var t=this.updateFunction(e);return!be(t)&&t.catch&&t.then?t:(this.deferred.reject(Error("Transaction callback must return a Promise")),null)}catch(e){return this.deferred.reject(e),null}}},{key:"Ma",value:function(e){var t=this;this.xa>0&&this.Oa(e)?(this.xa-=1,this.asyncQueue.enqueueAndForget((function(){return t.Na(),Promise.resolve()}))):this.deferred.reject(e)}},{key:"Oa",value:function(e){if("FirebaseError"===e.name){var t=e.code;return"aborted"===t||"failed-precondition"===t||!Tn(t)}return!1}}]),e}(),ac=function(){function e(t,n,r,i){var a=this;Object(p.a)(this,e),this.authCredentials=t,this.appCheckCredentials=n,this.asyncQueue=r,this.databaseInfo=i,this.user=O.UNAUTHENTICATED,this.clientId=$.R(),this.authCredentialListener=function(){return Promise.resolve()},this.appCheckCredentialListener=function(){return Promise.resolve()},this.authCredentials.start(r,function(){var e=Object(l.a)(c.a.mark((function e(t){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return S("FirestoreClient","Received user=",t.uid),e.next=3,a.authCredentialListener(t);case 3:a.user=t;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),this.appCheckCredentials.start(r,(function(e){return S("FirestoreClient","Received new app check token=",e),a.appCheckCredentialListener(e,a.user)}))}return Object(v.a)(e,[{key:"getConfiguration",value:function(){var e=Object(l.a)(c.a.mark((function e(){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100});case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"setCredentialChangeListener",value:function(e){this.authCredentialListener=e}},{key:"setAppCheckTokenChangeListener",value:function(e){this.appCheckCredentialListener=e}},{key:"verifyNotTerminated",value:function(){if(this.asyncQueue.isShuttingDown)throw new L(D.FAILED_PRECONDITION,"The client has already been terminated.")}},{key:"terminate",value:function(){var e=this;this.asyncQueue.enterRestrictedMode();var t=new M;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(Object(l.a)(c.a.mark((function n(){var r;return c.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(n.prev=0,n.t0=e.onlineComponents,!n.t0){n.next=5;break}return n.next=5,e.onlineComponents.terminate();case 5:if(n.t1=e.offlineComponents,!n.t1){n.next=9;break}return n.next=9,e.offlineComponents.terminate();case 9:e.authCredentials.shutdown(),e.appCheckCredentials.shutdown(),t.resolve(),n.next=18;break;case 14:n.prev=14,n.t2=n.catch(0),r=Cu(n.t2,"Failed to shutdown persistence"),t.reject(r);case 18:case"end":return n.stop()}}),n,null,[[0,14]])})))),t.promise}}]),e}();function oc(e,t){return uc.apply(this,arguments)}function uc(){return uc=Object(l.a)(c.a.mark((function e(t,n){var r,i;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.asyncQueue.verifyOperationInProgress(),S("FirestoreClient","Initializing OfflineComponentProvider"),e.next=3,t.getConfiguration();case 3:return r=e.sent,e.next=6,n.initialize(r);case 6:i=r.initialUser,t.setCredentialChangeListener(function(){var e=Object(l.a)(c.a.mark((function e(t){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=i.isEqual(t),e.t0){e.next=5;break}return e.next=4,Ba(n.localStore,t);case 4:i=t;case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),n.persistence.setDatabaseDeletedListener((function(){return t.terminate()})),t.offlineComponents=n;case 8:case"end":return e.stop()}}),e)}))),uc.apply(this,arguments)}function sc(e,t){return cc.apply(this,arguments)}function cc(){return(cc=Object(l.a)(c.a.mark((function e(t,n){var r,i;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.asyncQueue.verifyOperationInProgress(),e.next=3,lc(t);case 3:return r=e.sent,S("FirestoreClient","Initializing OnlineComponentProvider"),e.next=7,t.getConfiguration();case 7:return i=e.sent,e.next=10,n.initialize(r,i);case 10:t.setCredentialChangeListener((function(e){return xu(n.remoteStore,e)})),t.setAppCheckTokenChangeListener((function(e,t){return xu(n.remoteStore,t)})),t.onlineComponents=n;case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function lc(e){return fc.apply(this,arguments)}function fc(){return(fc=Object(l.a)(c.a.mark((function e(t){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=t.offlineComponents,e.t0){e.next=5;break}return S("FirestoreClient","Using default OfflineComponentProvider"),e.next=5,oc(t,new Ys);case 5:return e.abrupt("return",t.offlineComponents);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function hc(e){return dc.apply(this,arguments)}function dc(){return(dc=Object(l.a)(c.a.mark((function e(t){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=t.onlineComponents,e.t0){e.next=5;break}return S("FirestoreClient","Using default OnlineComponentProvider"),e.next=5,sc(t,new Zs);case 5:return e.abrupt("return",t.onlineComponents);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function pc(e){return lc(e).then((function(e){return e.persistence}))}function vc(e){return lc(e).then((function(e){return e.localStore}))}function mc(e){return hc(e).then((function(e){return e.remoteStore}))}function yc(e){return hc(e).then((function(e){return e.syncEngine}))}function gc(e){return bc.apply(this,arguments)}function bc(){return(bc=Object(l.a)(c.a.mark((function e(t){var n,r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,hc(t);case 2:return n=e.sent,r=n.eventManager,e.abrupt("return",(r.onListen=es.bind(null,n.syncEngine),r.onUnlisten=is.bind(null,n.syncEngine),r));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function kc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=new M;return e.asyncQueue.enqueueAndForget(Object(l.a)(c.a.mark((function i(){return c.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.t0=function(e,t,n,r,i){var a=new tc({next:function(a){t.enqueueAndForget((function(){return Fu(e,o)}));var u=a.docs.has(n);!u&&a.fromCache?i.reject(new L(D.UNAVAILABLE,"Failed to get document because the client is offline.")):u&&a.fromCache&&r&&"server"===r.source?i.reject(new L(D.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(a)},error:function(e){return i.reject(e)}}),o=new qu(Rt(n.path),a,{includeMetadataChanges:!0,ku:!0});return Lu(e,o)},i.next=3,gc(e);case 3:return i.t1=i.sent,i.t2=e.asyncQueue,i.t3=t,i.t4=n,i.t5=r,i.abrupt("return",(0,i.t0)(i.t1,i.t2,i.t3,i.t4,i.t5));case 9:case"end":return i.stop()}}),i)})))),r.promise}function wc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=new M;return e.asyncQueue.enqueueAndForget(Object(l.a)(c.a.mark((function i(){return c.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.t0=function(e,t,n,r,i){var a=new tc({next:function(n){t.enqueueAndForget((function(){return Fu(e,o)})),n.fromCache&&"server"===r.source?i.reject(new L(D.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):i.resolve(n)},error:function(e){return i.reject(e)}}),o=new qu(n,a,{includeMetadataChanges:!0,ku:!0});return Lu(e,o)},i.next=3,gc(e);case 3:return i.t1=i.sent,i.t2=e.asyncQueue,i.t3=t,i.t4=n,i.t5=r,i.abrupt("return",(0,i.t0)(i.t1,i.t2,i.t3,i.t4,i.t5));case 9:case"end":return i.stop()}}),i)})))),r.promise}var Oc=new Map;function xc(e,t,n){if(!n)throw new L(D.INVALID_ARGUMENT,"Function ".concat(e,"() cannot be called with an empty ").concat(t,"."))}function _c(e,t,n,r){if(!0===t&&!0===r)throw new L(D.INVALID_ARGUMENT,"".concat(e," and ").concat(n," cannot be used together."))}function jc(e){if(!Oe.isDocumentKey(e))throw new L(D.INVALID_ARGUMENT,"Invalid document reference. Document references must have an even number of segments, but ".concat(e," has ").concat(e.length,"."))}function Ec(e){if(Oe.isDocumentKey(e))throw new L(D.INVALID_ARGUMENT,"Invalid collection reference. Collection references must have an odd number of segments, but ".concat(e," has ").concat(e.length,"."))}function Sc(e){if(void 0===e)return"undefined";if(null===e)return"null";if("string"==typeof e)return e.length>20&&(e="".concat(e.substring(0,20),"...")),JSON.stringify(e);if("number"==typeof e||"boolean"==typeof e)return""+e;if("object"==typeof e){if(e instanceof Array)return"an array";var t=function(e){return e.constructor?e.constructor.name:null}(e);return t?"a custom ".concat(t," object"):"an object"}return"function"==typeof e?"a function":A()}function Tc(e,t){if("_delegate"in e&&(e=e._delegate),!(e instanceof t)){if(t.name===e.constructor.name)throw new L(D.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");var n=Sc(e);throw new L(D.INVALID_ARGUMENT,"Expected type '".concat(t.name,"', but it was: ").concat(n))}return e}function Ic(e,t){if(t<=0)throw new L(D.INVALID_ARGUMENT,"Function ".concat(e,"() requires a positive number, but it was: ").concat(t,"."))}var Cc=function(){function e(t){var n;if(Object(p.a)(this,e),void 0===t.host){if(void 0!==t.ssl)throw new L(D.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===(n=t.ssl)||void 0===n||n;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 L(D.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=t.cacheSizeBytes}this.experimentalForceLongPolling=!!t.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!!t.experimentalAutoDetectLongPolling,this.useFetchStreams=!!t.useFetchStreams,_c("experimentalForceLongPolling",t.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",t.experimentalAutoDetectLongPolling)}return Object(v.a)(e,[{key:"isEqual",value:function(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}]),e}(),Ac=function(){function e(t,n,r){Object(p.a)(this,e),this._authCredentials=n,this._appCheckCredentials=r,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new Cc({}),this._settingsFrozen=!1,t instanceof ge?this._databaseId=t:(this._app=t,this._databaseId=function(e){if(!Object.prototype.hasOwnProperty.apply(e.options,["projectId"]))throw new L(D.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new ge(e.options.projectId)}(t))}return Object(v.a)(e,[{key:"app",get:function(){if(!this._app)throw new L(D.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}},{key:"_initialized",get:function(){return this._settingsFrozen}},{key:"_terminated",get:function(){return void 0!==this._terminateTask}},{key:"_setSettings",value:function(e){if(this._settingsFrozen)throw new L(D.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._settings=new Cc(e),void 0!==e.credentials&&(this._authCredentials=function(e){if(!e)return new U;switch(e.type){case"gapi":var t=e.client;return R(!("object"!=typeof t||null===t||!t.auth||!t.auth.getAuthHeaderValueForFirstParty)),new q(t,e.sessionIndex||"0",e.iamToken||null);case"provider":return e.client;default:throw new L(D.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invali
2d credential type")}}(e.credentials))}},{key:"_getSettings",value:function(){return this._settings}},{key:"_freezeSettings",value:function(){return this._settingsFrozen=!0,this._settings}},{key:"_delete",value:function(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}},{key:"toJSON",value:function(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}},{key:"_terminate",value:function(){return function(e){var t=Oc.get(e);t&&(S("ComponentProvider","Removing Datastore"),Oc.delete(e),t.terminate())}(this),Promise.resolve()}}]),e}();function Rc(e,t,n){var r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=(e=Tc(e,Ac))._getSettings();if("firestore.googleapis.com"!==a.host&&a.host!==t&&I("Host has been set in both settings() and useEmulator(), emulator host will be used"),e._setSettings(Object.assign(Object.assign({},a),{host:"".concat(t,":").concat(n),ssl:!1})),i.mockUserToken){var o,u;if("string"==typeof i.mockUserToken)o=i.mockUserToken,u=O.MOCK_USER;else{o=Object(b.g)(i.mockUserToken,null===(r=e._app)||void 0===r?void 0:r.options.projectId);var s=i.mockUserToken.sub||i.mockUserToken.user_id;if(!s)throw new L(D.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");u=new O(s)}e._authCredentials=new V(new F(o,u))}}var Nc=function(){function e(t,n,r){Object(p.a)(this,e),this.converter=n,this._key=r,this.type="document",this.firestore=t}return Object(v.a)(e,[{key:"_path",get:function(){return this._key.path}},{key:"id",get:function(){return this._key.path.lastSegment()}},{key:"path",get:function(){return this._key.path.canonicalString()}},{key:"parent",get:function(){return new Dc(this.firestore,this.converter,this._key.path.popLast())}},{key:"withConverter",value:function(t){return new e(this.firestore,t,this._key)}}]),e}(),Pc=function(){function e(t,n,r){Object(p.a)(this,e),this.converter=n,this._query=r,this.type="query",this.firestore=t}return Object(v.a)(e,[{key:"withConverter",value:function(t){return new e(this.firestore,t,this._query)}}]),e}(),Dc=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r,i){var a;return Object(p.a)(this,n),(a=t.call(this,e,r,Rt(i)))._path=i,a.type="collection",a}return Object(v.a)(n,[{key:"id",get:function(){return this._query.path.lastSegment()}},{key:"path",get:function(){return this._query.path.canonicalString()}},{key:"parent",get:function(){var e=this._path.popLast();return e.isEmpty()?null:new Nc(this.firestore,null,new Oe(e))}},{key:"withConverter",value:function(e){return new n(this.firestore,e,this._path)}}]),n}(Pc);function Lc(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(e=Object(b.l)(e),xc("collection","path",t),e instanceof Ac){var a=ie.fromString.apply(ie,[t].concat(r));return Ec(a),new Dc(e,null,a)}if(!(e instanceof Nc||e instanceof Dc))throw new L(D.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");var o=e._path.child(ie.fromString.apply(ie,[t].concat(r)));return Ec(o),new Dc(e.firestore,null,o)}function Mc(e,t){if(e=Tc(e,Ac),xc("collectionGroup","collection id",t),t.indexOf("/")>=0)throw new L(D.INVALID_ARGUMENT,"Invalid collection ID '".concat(t,"' passed to function collectionGroup(). Collection IDs must not contain '/'."));return new Pc(e,null,function(e){return new Ct(ie.emptyPath(),e)}(t))}function Fc(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(e=Object(b.l)(e),1===arguments.length&&(t=$.R()),xc("doc","path",t),e instanceof Ac){var a=ie.fromString.apply(ie,[t].concat(r));return jc(a),new Nc(e,null,new Oe(a))}if(!(e instanceof Nc||e instanceof Dc))throw new L(D.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");var o=e._path.child(ie.fromString.apply(ie,[t].concat(r)));return jc(o),new Nc(e.firestore,e instanceof Dc?e.converter:null,new Oe(o))}function Uc(e,t){return e=Object(b.l)(e),t=Object(b.l)(t),(e instanceof Nc||e instanceof Dc)&&(t instanceof Nc||t instanceof Dc)&&e.firestore===t.firestore&&e.path===t.path&&e.converter===t.converter}function Vc(e,t){return e=Object(b.l)(e),t=Object(b.l)(t),e instanceof Pc&&t instanceof Pc&&e.firestore===t.firestore&&Ut(e._query,t._query)&&e.converter===t.converter}var Bc=function(){function e(){var t=this;Object(p.a)(this,e),this.Fa=Promise.resolve(),this.$a=[],this.Ba=!1,this.La=[],this.Ua=null,this.qa=!1,this.Ka=!1,this.Ga=[],this.No=new Do(this,"async_queue_retry"),this.Qa=function(){var e=No();e&&S("AsyncQueue","Visibility state changed to "+e.visibilityState),t.No.Po()};var n=No();n&&"function"==typeof n.addEventListener&&n.addEventListener("visibilitychange",this.Qa)}return Object(v.a)(e,[{key:"isShuttingDown",get:function(){return this.Ba}},{key:"enqueueAndForget",value:function(e){this.enqueue(e)}},{key:"enqueueAndForgetEvenWhileRestricted",value:function(e){this.ja(),this.Wa(e)}},{key:"enterRestrictedMode",value:function(e){if(!this.Ba){this.Ba=!0,this.Ka=e||!1;var t=No();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this.Qa)}}},{key:"enqueue",value:function(e){var t=this;if(this.ja(),this.Ba)return new Promise((function(){}));var n=new M;return this.Wa((function(){return t.Ba&&t.Ka?Promise.resolve():(e().then(n.resolve,n.reject),n.promise)})).then((function(){return n.promise}))}},{key:"enqueueRetryable",value:function(e){var t=this;this.enqueueAndForget((function(){return t.$a.push(e),t.za()}))}},{key:"za",value:function(){var e=Object(l.a)(c.a.mark((function e(){var t=this;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0===this.$a.length){e.next=14;break}return e.prev=1,e.next=4,this.$a[0]();case 4:this.$a.shift(),this.No.reset(),e.next=13;break;case 8:if(e.prev=8,e.t0=e.catch(1),ui(e.t0)){e.next=12;break}throw e.t0;case 12:S("AsyncQueue","Operation failed with retryable error: "+e.t0);case 13:this.$a.length>0&&this.No.Ro((function(){return t.za()}));case 14:case"end":return e.stop()}}),e,this,[[1,8]])})));return function(){return e.apply(this,arguments)}}()},{key:"Wa",value:function(e){var t=this,n=this.Fa.then((function(){return t.qa=!0,e().catch((function(e){t.Ua=e,t.qa=!1;var n=function(e){var t=e.message||"";return e.stack&&(t=e.stack.includes(e.message)?e.stack:e.message+"\n"+e.stack),t}(e);throw T("INTERNAL UNHANDLED ERROR: ",n),e})).then((function(e){return t.qa=!1,e}))}));return this.Fa=n,n}},{key:"enqueueAfterDelay",value:function(e,t,n){var r=this;this.ja(),this.Ga.indexOf(e)>-1&&(t=0);var i=Iu.createAndSchedule(this,e,t,n,(function(e){return r.Ha(e)}));return this.La.push(i),i}},{key:"ja",value:function(){this.Ua&&A()}},{key:"verifyOperationInProgress",value:function(){}},{key:"Ja",value:function(){var e=Object(l.a)(c.a.mark((function e(){var t;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.Fa,e.next=3,t;case 3:if(t!==this.Fa){e.next=0;break}case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"Ya",value:function(e){var t,n=Object(u.a)(this.La);try{for(n.s();!(t=n.n()).done;){if(t.value.timerId===e)return!0}}catch(r){n.e(r)}finally{n.f()}return!1}},{key:"Xa",value:function(e){var t=this;return this.Ja().then((function(){t.La.sort((function(e,t){return e.targetTimeMs-t.targetTimeMs}));var n,r=Object(u.a)(t.La);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.skipDelay(),"all"!==e&&i.timerId===e)break}}catch(a){r.e(a)}finally{r.f()}return t.Ja()}))}},{key:"Za",value:function(e){this.Ga.push(e)}},{key:"Ha",value:function(e){var t=this.La.indexOf(e);this.La.splice(t,1)}}]),e}();function zc(e){return function(e,t){if("object"!=typeof e||null===e)return!1;var n,r=e,i=Object(u.a)(["next","error","complete"]);try{for(i.s();!(n=i.n()).done;){var a=n.value;if(a in r&&"function"==typeof r[a])return!0}}catch(o){i.e(o)}finally{i.f()}return!1}(e)}var qc=function(){function e(){Object(p.a)(this,e),this._progressObserver={},this._taskCompletionResolver=new M,this._lastProgress={taskState:"Running",totalBytes:0,totalDocuments:0,bytesLoaded:0,documentsLoaded:0}}return Object(v.a)(e,[{key:"onProgress",value:function(e,t,n){this._progressObserver={next:e,error:t,complete:n}}},{key:"catch",value:function(e){return this._taskCompletionResolver.promise.catch(e)}},{key:"then",value:function(e,t){return this._taskCompletionResolver.promise.then(e,t)}},{key:"_completeWith",value:function(e){this._updateProgress(e),this._progressObserver.complete&&this._progressObserver.complete(),this._taskCompletionResolver.resolve(e)}},{key:"_failWith",value:function(e){this._lastProgress.taskState="Error",this._progressObserver.next&&this._progressObserver.next(this._lastProgress),this._progressObserver.error&&this._progressObserver.error(e),this._taskCompletionResolver.reject(e)}},{key:"_updateProgress",value:function(e){this._lastProgress=e,this._progressObserver.next&&this._progressObserver.next(e)}}]),e}(),Wc=-1,Hc=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);
2function n(e,r,i){var a;return Object(p.a)(this,n),(a=t.call(this,e,r,i)).type="firestore",a._queue=new Bc,a._persistenceKey="name"in e?e.name:"[DEFAULT]",a}return Object(v.a)(n,[{key:"_terminate",value:function(){return this._firestoreClient||Gc(this),this._firestoreClient.terminate()}}]),n}(Ac);function Kc(e){return e._firestoreClient||Gc(e),e._firestoreClient.verifyNotTerminated(),e._firestoreClient}function Gc(e){var t,n=e._freezeSettings(),r=function(e,t,n,r){return new ye(e,t,n,r.host,r.ssl,r.experimentalForceLongPolling,r.experimentalAutoDetectLongPolling,r.useFetchStreams)}(e._databaseId,(null===(t=e._app)||void 0===t?void 0:t.options.appId)||"",e._persistenceKey,n);e._firestoreClient=new ac(e._authCredentials,e._appCheckCredentials,e._queue,r)}function $c(e,t){rl(e=Tc(e,Hc));var n=Kc(e),r=e._freezeSettings(),i=new Zs;return Yc(n,i,new Xs(i,r.cacheSizeBytes,null==t?void 0:t.forceOwnership))}function Qc(e){rl(e=Tc(e,Hc));var t=Kc(e),n=e._freezeSettings(),r=new Zs;return Yc(t,r,new Js(r,n.cacheSizeBytes))}function Yc(e,t,n){var r=new M;return e.asyncQueue.enqueue(Object(l.a)(c.a.mark((function i(){return c.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.prev=0,i.next=3,oc(e,n);case 3:return i.next=5,sc(e,t);case 5:r.resolve(),i.next=13;break;case 8:if(i.prev=8,i.t0=i.catch(0),function(e){return"FirebaseError"===e.name?e.code===D.FAILED_PRECONDITION||e.code===D.UNIMPLEMENTED:!("undefined"!=typeof DOMException&&e instanceof DOMException)||(22===e.code||20===e.code||11===e.code)}(i.t0)){i.next=12;break}throw i.t0;case 12:console.warn("Error enabling offline persistence. Falling back to persistence disabled: "+i.t0),r.reject(i.t0);case 13:case"end":return i.stop()}}),i,null,[[0,8]])})))).then((function(){return r.promise}))}function Xc(e){if(e._initialized&&!e._terminated)throw new L(D.FAILED_PRECONDITION,"Persistence can only be cleared before a Firestore instance is initialized or after it is terminated.");var t=new M;return e._queue.enqueueAndForgetEvenWhileRestricted(Object(l.a)(c.a.mark((function n(){return c.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,function(){var e=Object(l.a)(c.a.mark((function e(t){var n;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ii.vt()){e.next=2;break}return e.abrupt("return",Promise.resolve());case 2:return n=t+"main",e.next=5,ii.delete(n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()(Da(e._databaseId,e._persistenceKey));case 3:t.resolve(),n.next=9;break;case 6:n.prev=6,n.t0=n.catch(0),t.reject(n.t0);case 9:case"end":return n.stop()}}),n,null,[[0,6]])})))),t.promise}function Jc(e){return function(e){var t=new M;return e.asyncQueue.enqueueAndForget(Object(l.a)(c.a.mark((function n(){return c.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.t0=ys,n.next=3,yc(e);case 3:return n.t1=n.sent,n.t2=t,n.abrupt("return",(0,n.t0)(n.t1,n.t2));case 6:case"end":return n.stop()}}),n)})))),t.promise}(Kc(e=Tc(e,Hc)))}function Zc(e){return function(e){return e.asyncQueue.enqueue(Object(l.a)(c.a.mark((function t(){var n,r;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,pc(e);case 2:return n=t.sent,t.next=5,mc(e);case 5:return r=t.sent,t.abrupt("return",(n.setNetworkEnabled(!0),function(e){var t=P(e);return t.wu.delete(0),zo(t)}(r)));case 7:case"end":return t.stop()}}),t)}))))}(Kc(e=Tc(e,Hc)))}function el(e){return function(e){return e.asyncQueue.enqueue(Object(l.a)(c.a.mark((function t(){var n,r;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,pc(e);case 2:return n=t.sent,t.next=5,mc(e);case 5:return r=t.sent,t.abrupt("return",(n.setNetworkEnabled(!1),function(){var e=Object(l.a)(c.a.mark((function e(t){var n;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=P(t)).wu.add(0),e.next=4,Wo(n);case 4:n.yu.set("Offline");case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()(r)));case 7:case"end":return t.stop()}}),t)}))))}(Kc(e=Tc(e,Hc)))}function tl(e,t){var n=Kc(e=Tc(e,Hc)),r=new qc;return function(e,t,n,r){var i=function(e,t){return function(e,t){return new nc(e,t)}(function(e,t){if(e instanceof Uint8Array)return ec(e,t);if(e instanceof ArrayBuffer)return ec(new Uint8Array(e),t);if(e instanceof ReadableStream)return e.getReader();throw new Error("Source of `toByteStreamReader` has to be a ArrayBuffer or ReadableStream")}
2("string"==typeof e?(new TextEncoder).encode(e):e),t)}(n,Po(t));e.asyncQueue.enqueueAndForget(Object(l.a)(c.a.mark((function t(){return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=Qs,t.next=3,yc(e);case 3:t.t1=t.sent,t.t2=i,t.t3=r,(0,t.t0)(t.t1,t.t2,t.t3);case 7:case"end":return t.stop()}}),t)}))))}(n,e._databaseId,t,r),r}function nl(e,t){return function(e,t){return e.asyncQueue.enqueue(Object(l.a)(c.a.mark((function n(){return c.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.t0=function(e,t){var n=P(e);return n.persistence.runTransaction("Get named query","readonly",(function(e){return n._s.getNamedQuery(e,t)}))},n.next=3,vc(e);case 3:return n.t1=n.sent,n.t2=t,n.abrupt("return",(0,n.t0)(n.t1,n.t2));case 6:case"end":return n.stop()}}),n)}))))}(Kc(e=Tc(e,Hc)),t).then((function(t){return t?new Pc(e,null,t.query):null}))}function rl(e){if(e._initialized||e._terminated)throw new L(D.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 il=function(){function e(){Object(p.a)(this,e);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var i=0;i<n.length;++i)if(0===n[i].length)throw new L(D.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new oe(n)}return Object(v.a)(e,[{key:"isEqual",value:function(e){return this._internalPath.isEqual(e._internalPath)}}]),e}();var al=function(){function e(t){Object(p.a)(this,e),this._byteString=t}return Object(v.a)(e,[{key:"toBase64",value:function(){return this._byteString.toBase64()}},{key:"toUint8Array",value:function(){return this._byteString.toUint8Array()}},{key:"toString",value:function(){return"Bytes(base64: "+this.toBase64()+")"}},{key:"isEqual",value:function(e){return this._byteString.isEqual(e._byteString)}}],[{key:"fromBase64String",value:function(t){try{return new e(ce.fromBase64String(t))}catch(t){throw new L(D.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+t)}}},{key:"fromUint8Array",value:function(t){return new e(ce.fromUint8Array(t))}}]),e}(),ol=function e(t){Object(p.a)(this,e),this._methodName=t},ul=function(){function e(t,n){if(Object(p.a)(this,e),!isFinite(t)||t<-90||t>90)throw new L(D.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+t);if(!isFinite(n)||n<-180||n>180)throw new L(D.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+n);this._lat=t,this._long=n}return Object(v.a)(e,[{key:"latitude",get:function(){return this._lat}},{key:"longitude",get:function(){return this._long}},{key:"isEqual",value:function(e){return this._lat===e._lat&&this._long===e._long}},{key:"toJSON",value:function(){return{latitude:this._lat,longitude:this._long}}},{key:"_compareTo",value:function(e){return Q(this._lat,e._lat)||Q(this._long,e._long)}}]),e}(),sl=/^__.*__$/,cl=function(){function e(t,n,r){Object(p.a)(this,e),this.data=t,this.fieldMask=n,this.fieldTransforms=r}return Object(v.a)(e,[{key:"toMutation",value:function(e,t){return null!==this.fieldMask?new bn(e,this.data,this.fieldMask,t,this.fieldTransforms):new gn(e,this.data,t,this.fieldTransforms)}}]),e}(),ll=function(){function e(t,n,r){Object(p.a)(this,e),this.data=t,this.fieldMask=n,this.fieldTransforms=r}return Object(v.a)(e,[{key:"toMutation",value:function(e,t){return new bn(e,this.data,this.fieldMask,t,this.fieldTransforms)}}]),e}();function fl(e){switch(e){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw A()}}var hl=function(){function e(t,n,r,i,a,o){Object(p.a)(this,e),this.settings=t,this.databaseId=n,this.M=r,this.ignoreUndefinedProperties=i,void 0===a&&this.tc(),this.fieldTransforms=a||[],this.fieldMask=o||[]}return Object(v.a)(e,[{key:"path",get:function(){return this.settings.path}},{key:"ec",get:function(){return this.settings.ec}},{key:"nc",value:function(t){return new e(Object.assign(Object.assign({},this.settings),t),this.databaseId,this.M,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}},{key:"sc",value:function(e){var t,n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.nc({path:n,ic:!1});return r.rc(e),r}},{key:"oc",value:function(e){var t,n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.nc({path:n,ic:!1});return r.tc(),r}},{key:"uc",value:function(e){return this.nc({path:void 0,ic:!0})}},{key:"ac",value:function(e){return Rl(e,this.settings.methodName,this.settings.cc||!1,this.path,this.settings.hc)}},{key:"contains",value:function(e){return void 0!==this.fieldMask.find((function(t){return e.isPrefixOf(t)}))||void 0!==this.fieldTransforms.find((function(t){return e.isPrefixOf(t.field)}))}},{key:"tc",value:function(){if(this.path)for(var e=0;e<this.path.length;e++)this.rc(this.path.get(e))}},{key:"rc",value:function(e){if(0===e.length)throw this.ac("Document fields must not be empty");if(fl(this.ec)&&sl.test(e))throw this.ac('Document fields cannot begin and end with "__"')}}]),e}(),dl=function(){function e(t,n,r){Object(p.a)(this,e),this.databaseId=t,this.ignoreUndefinedProperties=n,this.M=r||Po(t)}return Object(v.a)(e,[{key:"lc",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return new hl({ec:e,methodName:t,hc:n,path:oe.emptyPath(),ic:!1,cc:r},this.databaseId,this.M,this.ignoreUndefinedProperties)}}]),e}();function pl(e){var t=e._freezeSettings(),n=Po(e._databaseId);return new dl(e._databaseId,!!t.ignoreUndefinedProperties,n)}function vl(e,t,n,r,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},o=e.lc(a.merge||a.mergeFields?2:0,t,n,i);Tl("Data must be an object, but it was:",o,r);var s,c,l=El(r,o);if(a.merge)s=new ue(o.fieldMask),c=o.fieldTransforms;else if(a.mergeFields){var f,h=[],d=Object(u.a)(a.mergeFields);try{for(d.s();!(f=d.n()).done;){var p=f.value,v=Il(t,p,n);if(!o.contains(v))throw new L(D.INVALID_ARGUMENT,"Field '".concat(v,"' is specified in your field mask but missing from your input data."));Nl(h,v)||h.push(v)}}catch(m){d.e(m)}finally{d.f()}s=new ue(h),c=o.fieldTransforms.filter((function(e){return s.covers(e.field)}))}else s=null,c=o.fieldTransforms;return new cl(new We(l),s,c)}var ml=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(){return Object(p.a)(this,n),t.apply(this,arguments)}return Object(v.a)(n,[{key:"_toFieldTransform",value:function(e){if(2!==e.ec)throw 1===e.ec?e.ac("".concat(this._methodName,"() can only appear at the top level of your update data")):e.ac("".concat(this._methodName,"() cannot be used with set() unless you pass {merge:true}"));return e.fieldMask.push(e.path),null}},{key:"isEqual",value:function(e){return e instanceof n}}]),n}(ol);function yl(e,t,n){return new hl({ec:3,hc:t.settings.hc,methodName:e._methodName,ic:n},t.databaseId,t.M,t.ignoreUndefinedProperties)}var gl=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(){return Object(p.a)(this,n),t.apply(this,arguments)}return Object(v.a)(n,[{key:"_toFieldTransform",value:function(e){return new sn(e.path,new Zt)}},{key:"isEqual",value:function(e){return e instanceof n}}]),n}(ol),bl=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r){var i;return Object(p.a)(this,n),(i=t.call(this,e)).fc=r,i}return Object(v.a)(n,[{key:"_toFieldTransform",value:function(e){var t=yl(this,e,!0),n=this.fc.map((function(e){return jl(e,t)})),r=new en(n);return new sn(e.path,r)}},{key:"isEqual",value:function(e){return this===e}}]),n}(ol),kl=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r){var i;return Object(p.a)(this,n),(i=t.call(this,e)).fc=r,i}return Object(v.a)(n,[{key:"_toFieldTransform",value:function(e){var t=yl(this,e,!0),n=this.fc.map((function(e){return jl(e,t)})),r=new nn(n);return new sn(e.path,r)}},{key:"isEqual",value:function(e){return this===e}}]),n}(ol),wl=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r){var i;return Object(p.a)(this,n),(i=t.call(this,e)).dc=r,i}return Object(v.a)(n,[{key:"_toFieldTransform",value:function(e){var t=new an(e.M,$t(e.M,this.dc));return new sn(e.path,t)}},{key:"isEqual",value:function(e){return this===e}}]),n}(ol);function Ol(e,t,n,r){var i=e.lc(1,t,n);Tl("Data must be an object, but it was:",i,r);var a=[],o=We.empty();te(r,(function(e,r){var u=Al(t,e,n);r=Object(b.l)(r);var s=i.oc(u);if(r instanceof ml)a.push(u);else{var c=jl(r,s);null!=c&&(a.push(u),o.set(u,c))}}));var u=new ue(a);return new ll(o,u,i.fieldTransforms)}function xl(e,t,n,r,i,a){var o=e.lc(1,t,n),u=[Il(t,r,n)],s=[i];if(a.length%2!=0)throw new L(D.INVALID_ARGUMENT,"Function ".concat(t,"() needs to be called with an even number of arguments that alternate between field names and values."));for(var c=0;c<a.length;c+=2)u.push(Il(t,a[c])),s.push(a[c+1]);for(var l=[],f=We.empty(),h=u.length-1;h>=0;--h)if(!Nl(l,u[h])){var d=u[h],p=s[h];p=Object(b.l)(p);var v=o.oc(d);if(p instanceof ml)l.push(d);else{var m=jl(p,v);null!=m&&(l.push(d),f.set(d,m))}}var y=new ue(l);return new ll(f,y,o.fieldTransforms)}function _l(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return jl(n,e.lc(r?4:3,t))}function jl(e,t){if(Sl(e=Object(b.l)(e)))return Tl("Unsupported field value:",t,e),El(e,t);if(e instanceof ol)return function(e,t){if(!fl(t.ec))throw t.ac("".concat(e._methodName,"() can only be used with update(
2) and set()"));if(!t.path)throw t.ac("".concat(e._methodName,"() is not currently supported inside arrays"));var n=e._toFieldTransform(t);n&&t.fieldTransforms.push(n)}(e,t),null;if(void 0===e&&t.ignoreUndefinedProperties)return null;if(t.path&&t.fieldMask.push(t.path),e instanceof Array){if(t.settings.ic&&4!==t.ec)throw t.ac("Nested arrays are not supported");return function(e,t){var n,r=[],i=0,a=Object(u.a)(e);try{for(a.s();!(n=a.n()).done;){var o=jl(n.value,t.uc(i));null==o&&(o={nullValue:"NULL_VALUE"}),r.push(o),i++}}catch(s){a.e(s)}finally{a.f()}return{arrayValue:{values:r}}}(e,t)}return function(e,t){if(null===(e=Object(b.l)(e)))return{nullValue:"NULL_VALUE"};if("number"==typeof e)return $t(t.M,e);if("boolean"==typeof e)return{booleanValue:e};if("string"==typeof e)return{stringValue:e};if(e instanceof Date){var n=J.fromDate(e);return{timestampValue:Zn(t.M,n)}}if(e instanceof J){var r=new J(e.seconds,1e3*Math.floor(e.nanoseconds/1e3));return{timestampValue:Zn(t.M,r)}}if(e instanceof ul)return{geoPointValue:{latitude:e.latitude,longitude:e.longitude}};if(e instanceof al)return{bytesValue:er(t.M,e._byteString)};if(e instanceof Nc){var i=t.databaseId,a=e.firestore._databaseId;if(!a.isEqual(i))throw t.ac("Document reference is for database ".concat(a.projectId,"/").concat(a.database," but should be for database ").concat(i.projectId,"/").concat(i.database));return{referenceValue:rr(e.firestore._databaseId||t.databaseId,e._key.path)}}throw t.ac("Unsupported field value: ".concat(Sc(e)))}(e,t)}function El(e,t){var n={};return ne(e)?t.path&&t.path.length>0&&t.fieldMask.push(t.path):te(e,(function(e,r){var i=jl(r,t.sc(e));null!=i&&(n[e]=i)})),{mapValue:{fields:n}}}function Sl(e){return!("object"!=typeof e||null===e||e instanceof Array||e instanceof Date||e instanceof J||e instanceof ul||e instanceof al||e instanceof Nc||e instanceof ol)}function Tl(e,t,n){if(!Sl(n)||!function(e){return"object"==typeof e&&null!==e&&(Object.getPrototypeOf(e)===Object.prototype||null===Object.getPrototypeOf(e))}(n)){var r=Sc(n);throw"an object"===r?t.ac(e+" a custom object"):t.ac(e+" "+r)}}function Il(e,t,n){if((t=Object(b.l)(t))instanceof il)return t._internalPath;if("string"==typeof t)return Al(e,t);throw Rl("Field path arguments must be of type string or ",e,!1,void 0,n)}var Cl=new RegExp("[~\\*/\\[\\]]");function Al(e,t,n){if(t.search(Cl)>=0)throw Rl("Invalid field path (".concat(t,"). Paths must not contain '~', '*', '/', '[', or ']'"),e,!1,void 0,n);try{return Object(r.a)(il,Object(d.a)(t.split(".")))._internalPath}catch(i){throw Rl("Invalid field path (".concat(t,"). Paths must not be empty, begin with '.', end with '.', or contain '..'"),e,!1,void 0,n)}}function Rl(e,t,n,r,i){var a=r&&!r.isEmpty(),o=void 0!==i,u="Function ".concat(t,"() called with invalid data");n&&(u+=" (via `toFirestore()`)"),u+=". ";var s="";return(a||o)&&(s+=" (found",a&&(s+=" in field ".concat(r)),o&&(s+=" in document ".concat(i)),s+=")"),new L(D.INVALID_ARGUMENT,u+e+s)}function Nl(e,t){return e.some((function(e){return e.isEqual(t)}))}var Pl=function(){function e(t,n,r,i,a){Object(p.a)(this,e),this._firestore=t,this._userDataWriter=n,this._key=r,this._document=i,this._converter=a}return Object(v.a)(e,[{key:"id",get:function(){return this._key.path.lastSegment()}},{key:"ref",get:function(){return new Nc(this._firestore,this._converter,this._key)}},{key:"exists",value:function(){return null!==this._document}},{key:"data",value:function(){if(this._document){if(this._converter){var e=new Dl(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}},{key:"get",value:function(e){if(this._document){var t=this._document.data.field(Ll("DocumentSnapshot.get",e));if(null!==t)return this._userDataWriter.convertValue(t)}}}]),e}(),Dl=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(){return Object(p.a)(this,n),t.apply(this,arguments)}return Object(v.a)(n,[{key:"data",value:function(){return Object(i.a)(Object(a.a)(n.prototype),"data",this).call(this)}}]),n}(Pl);function Ll(e,t){return"string"==typeof t?Al(e,t):t instanceof il?t._internalPath:t._delegate._internalPath}var Ml=function(){function e(t,n){Object(p.a)(this,e),this.hasPendingWrites=t,this.fromCache=n}return Object(v.a)(e,[{key:"isEqual",value:function(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}]),e}(),Fl=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r,i,a,o,u){var s;return Object(p.a)(this,n),(s=t.call(this,e,r,i,a,u))._firestore=e,s._firestoreImpl=e,s.metadata=o,s}return Object(v.a)(n,[{key:"exists",value:function(){return Object(i.a)(Object(a.a)(n.prototype),"exists",this).call(this)}},{key:"data",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._document){if(this._converter){var t=new Ul(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(t,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._document){var n=this._document.data.field(Ll("DocumentSnapshot.get",e));if(null!==n)return this._userDataWriter.convertValue(n,t.serverTimestamps)}}}]),n}(Pl),Ul=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(){return Object(p.a)(this,n),t.apply(this,arguments)}return Object(v.a)(n,[{key:"data",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(i.a)(Object(a.a)(n.prototype),"data",this).call(this,e)}}]),n}
2(Fl),Vl=function(){function e(t,n,r,i){Object(p.a)(this,e),this._firestore=t,this._userDataWriter=n,this._snapshot=i,this.metadata=new Ml(i.hasPendingWrites,i.fromCache),this.query=r}return Object(v.a)(e,[{key:"docs",get:function(){var e=[];return this.forEach((function(t){return e.push(t)})),e}},{key:"size",get:function(){return this._snapshot.docs.size}},{key:"empty",get:function(){return 0===this.size}},{key:"forEach",value:function(e,t){var n=this;this._snapshot.docs.forEach((function(r){e.call(t,new Ul(n._firestore,n._userDataWriter,r.key,r,new Ml(n._snapshot.mutatedKeys.has(r.key),n._snapshot.fromCache),n.query.converter))}))}},{key:"docChanges",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=!!e.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new L(D.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===t||(this._cachedChanges=function(e,t){if(e._snapshot.oldDocs.isEmpty()){var n=0;return e._snapshot.docChanges.map((function(t){return{type:"added",doc:new Ul(e._firestore,e._userDataWriter,t.doc.key,t.doc,new Ml(e._snapshot.mutatedKeys.has(t.doc.key),e._snapshot.fromCache),e.query.converter),oldIndex:-1,newIndex:n++}}))}var r=e._snapshot.oldDocs;return e._snapshot.docChanges.filter((function(e){return t||3!==e.type})).map((function(t){var n=new Ul(e._firestore,e._userDataWriter,t.doc.key,t.doc,new Ml(e._snapshot.mutatedKeys.has(t.doc.key),e._snapshot.fromCache),e.query.converter),i=-1,a=-1;return 0!==t.type&&(i=r.indexOf(t.doc.key),r=r.delete(t.doc.key)),1!==t.type&&(a=(r=r.add(t.doc)).indexOf(t.doc.key)),{type:Bl(t.type),doc:n,oldIndex:i,newIndex:a}}))}(this,t),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges}}]),e}();function Bl(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return A()}}function zl(e,t){return e instanceof Fl&&t instanceof Fl?e._firestore===t._firestore&&e._key.isEqual(t._key)&&(null===e._document?null===t._document:e._document.isEqual(t._document))&&e._converter===t._converter:e instanceof Vl&&t instanceof Vl&&e._firestore===t._firestore&&Vc(e.query,t.query)&&e.metadata.isEqual(t.metadata)&&e._snapshot.isEqual(t._snapshot)}function ql(e){if("L"===e.limitType&&0===e.explicitOrderBy.length)throw new L(D.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}var Wl=function e(){Object(p.a)(this,e)};function Hl(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=0,a=n;i<a.length;i++){var o=a[i];e=o._apply(e)}return e}var Kl=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r,i){var a;return Object(p.a)(this,n),(a=t.call(this))._c=e,a.wc=r,a.mc=i,a.type="where",a}return Object(v.a)(n,[{key:"_apply",value:function(e){var t=pl(e.firestore),n=function(e,t,n,r,i,a,o){var s;if(i.isKeyField()){if("array-contains"===a||"array-contains-any"===a)throw new L(D.INVALID_ARGUMENT,"Invalid Query. You can't perform '".concat(a,"' queries on documentId()."));if("in"===a||"not-in"===a){sf(o,a);var c,l=[],f=Object(u.a)(o);try{for(f.s();!(c=f.n()).done;){var h=c.value;l.push(uf(r,e,h))}}catch(p){f.e(p)}finally{f.f()}s={arrayValue:{values:l}}}else s=uf(r,e,o)}else"in"!==a&&"not-in"!==a&&"array-contains-any"!==a||sf(o,a),s=_l(n,"where",o,"in"===a||"not-in"===a);var d=mt.create(i,a,s);return function(e,t){if(t.S()){var n=Pt(e);if(null!==n&&!n.isEqual(t.field))throw new L(D.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 '".concat(n.toString(),"' and '").concat(t.field.toString(),"'"));var r=Nt(e);null!==r&&cf(e,t.field,r)}var i=function(e,t){var n,r=Object(u.a)(e.filters);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(t.indexOf(i.op)>=0)return i.op}}catch(p){r.e(p)}finally{r.f()}return null}(e,function(e){switch(e){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[]}}(t.op));if(null!==i)throw i===t.op?new L(D.INVALID_ARGUMENT,"Invalid query. You cannot use more than one '".concat(t.op.toString(),"' filter.")):new L(D.INVALID_ARGUMENT,"Invalid query. You cannot use '".concat(t.op.toString(),"' filters with '").concat(i.toString(),"' filters."))}(e,d),d}(e._query,0,t,e.firestore._databaseId,this._c,this.wc,this.mc);return new Pc(e.firestore,e.converter,function(e,t){var n=e.filters.concat([t]);return new Ct(e.path,e.collectionGroup,e.explicitOrderBy.slice(),n,e.limit,e.limitType,e.startAt,e.endAt)}(e._query,n))}}]),n}(Wl);function Gl(e,t,n){var r=t,i=Ll("where",e);return new Kl(i,r,n)}var $l=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r){var i;return Object(p.a)(this,n),(i=t.call(this))._c=e,i.gc=r,i.type="orderBy",i}return Object(v.a)(n,[{key:"_apply",value:function(e){var t=function(e,t,n){if(null!==e.startAt)throw new L(D.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(null!==e.endAt)throw new L(D.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");var r=new Et(t,n);return function(e,t){if(null===Nt(e)){var n=Pt(e);null!==n&&cf(e,n,t.field)}}(e,r),r}(e._query,this._c,this.gc);return new Pc(e.firestore,e.converter,function(e,t){var n=e.explicitOrderBy.concat([t]);return new Ct(e.path,e.collectionGroup,n,e.filters.slice(),e.limit,e.limitType,e.startAt,e.endAt)}(e._query,t))}}]),n}(Wl);function Ql(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc",n=t,r=Ll("orderBy",e);return new $l(r,n)}var Yl=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r,i){var a;return Object(p.a)(this,n),(a=t.call(this)).type=e,a.yc=r,a.Ic=i,a}return Object(v.a)(n,[{key:"_apply",value:function(e){return new Pc(e.firestore,e.converter,Ft(e._query,this.yc,this.Ic))}}]),n}(Wl);function Xl(e){return Ic("limit",e),new Yl("limit",e,"F")}function Jl(e){return Ic("limitToLast",e),new Yl("limitToLast",e,"L")}var Zl=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r,i){var a;return Object(p.a)(this,n),(a=t.call(this)).type=e,a.Tc=r,a.Ec=i,a}return Object(v.a)(n,[{key:"_apply",value:function(e){var t=of(e,this.type,this.Tc,this.Ec);return new Pc(e.firestore,e.converter,function(e,t){return new Ct(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),e.limit,e.limitType,t,e.endAt)}(e._query,t))}}]),n}(Wl);function ef(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Zl("startAt",t,!0)}function tf(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Zl("startAfter",t,!1)}var nf=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r,i){var a;return Object(p.a)(this,n),(a=t.call(this)).type=e,a.Tc=r,a.Ec=i,a}return Object(v.a)(n,[{key:"_apply",value:function(e){var t=of(e,this.type,this.Tc,this.Ec);return new Pc(e.firestore,e.converter,function(e,t){return new Ct(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),e.limit,e.limitType,e.startAt,t)}(e._query,t))}}]),n}(Wl);function rf(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new nf("endBefore",t,!1)}function af(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new nf("endAt",t,!0)}function of(e,t,n,r){if(n[0]=Object(b.l)(n[0]),n[0]instanceof Pl)return function(e,t,n,r,i){if(!r)throw new L(D.NOT_FOUND,"Can't use a DocumentSnapshot that doesn't exist for ".concat(n,"()."));var a,o=[],s=Object(u.a)(Lt(e));try{for(s.s();!(a=s.n()).done;){var c=a.value;if(c.field.isKeyField())o.push(Re(t,r.key));else{var l=r.data.field(c.field);if(pe(l))throw new L(D.INVALID_ARGUMENT,'Invalid query. You are trying to start or end a query using a document for which the field "'+c.field+'" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');if(null===l){var f=c.field.canonicalString();throw new L(D.INVALID_ARGUMENT,"Invalid query. You are trying to start or end a query using a document for which the field '".concat(f,"' (used as the orderBy) does not exist."))}o.push(l)}}}catch(h){s.e(h)}finally{s.f()}return new jt(o,i)}(e._query,e.firestore._databaseId,t,n[0]._document,r);var i=pl(e.firestore);return function(e,t,n,r,i,a){var o=e.explicitOrderBy;if(i.length>o.length)throw new L(D.INVALID_ARGUMENT,"Too many arguments provided to ".concat(r,"(). The number of arguments must be less than or equal to the number of orderBy() clauses"));for(var u=[],s=0;s<i.length;s++){var c=i[s];
2if(o[s].field.isKeyField()){if("string"!=typeof c)throw new L(D.INVALID_ARGUMENT,"Invalid query. Expected a string for document ID in ".concat(r,"(), but got a ").concat(typeof c));if(!Dt(e)&&-1!==c.indexOf("/"))throw new L(D.INVALID_ARGUMENT,"Invalid query. When querying a collection and ordering by documentId(), the value passed to ".concat(r,"() must be a plain document ID, but '").concat(c,"' contains a slash."));var l=e.path.child(ie.fromString(c));if(!Oe.isDocumentKey(l))throw new L(D.INVALID_ARGUMENT,"Invalid query. When querying a collection group and ordering by documentId(), the value passed to ".concat(r,"() must result in a valid document path, but '").concat(l,"' is not because it contains an odd number of segments."));var f=new Oe(l);u.push(Re(t,f))}else{var h=_l(n,r,c);u.push(h)}}return new jt(u,a)}(e._query,e.firestore._databaseId,i,t,n,r)}function uf(e,t,n){if("string"==typeof(n=Object(b.l)(n))){if(""===n)throw new L(D.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!Dt(t)&&-1!==n.indexOf("/"))throw new L(D.INVALID_ARGUMENT,"Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '".concat(n,"' contains a '/' character."));var r=t.path.child(ie.fromString(n));if(!Oe.isDocumentKey(r))throw new L(D.INVALID_ARGUMENT,"Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '".concat(r,"' is not because it has an odd number of segments (").concat(r.length,")."));return Re(e,new Oe(r))}if(n instanceof Nc)return Re(e,n._key);throw new L(D.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ".concat(Sc(n),"."))}function sf(e,t){if(!Array.isArray(e)||0===e.length)throw new L(D.INVALID_ARGUMENT,"Invalid Query. A non-empty array is required for '".concat(t.toString(),"' filters."));if(e.length>10)throw new L(D.INVALID_ARGUMENT,"Invalid Query. '".concat(t.toString(),"' filters support a maximum of 10 elements in the value array."))}function cf(e,t,n){if(!n.isEqual(t))throw new L(D.INVALID_ARGUMENT,"Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '".concat(t.toString(),"' and so you must also use '").concat(t.toString(),"' as your first argument to orderBy(), but your first orderBy() is on field '").concat(n.toString(),"' instead."))}var lf={maxAttempts:5},ff=function(){function e(){Object(p.a)(this,e)}return Object(v.a)(e,[{key:"convertValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none";switch(je(e)){case 0:return null;case 1:return e.booleanValue;case 2:return he(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,t);case 5:return e.stringValue;case 6:return this.convertBytes(de(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,t);case 10:return this.convertObject(e.mapValue,t);default:throw A()}}},{key:"convertObject",value:function(e,t){var n=this,r={};return te(e.fields,(function(e,i){r[e]=n.convertValue(i,t)})),r}},{key:"convertGeoPoint",value:function(e){return new ul(he(e.latitude),he(e.longitude))}},{key:"convertArray",value:function(e,t){var n=this;return(e.values||[]).map((function(e){return n.convertValue(e,t)}))}},{key:"convertServerTimestamp",value:function(e,t){switch(t){case"previous":var n=ve(e);return null==n?null:this.convertValue(n,t);case"estimate":return this.convertTimestamp(me(e));default:return null}}},{key:"convertTimestamp",value:function(e){var t=fe(e);return new J(t.seconds,t.nanos)}},{key:"convertDocumentKey",value:function(e,t){var n=ie.fromString(e);R(Sr(n));var r=new ge(n.get(1),n.get(3)),i=new Oe(n.popFirst(5));return r.isEqual(t)||T("Document ".concat(i," contains a document reference within a different database (").concat(r.projectId,"/").concat(r.database,") which is not supported. It will be treated as a reference in the current database (").concat(t.projectId,"/").concat(t.database,") instead.")),i}}]),e}();function hf(e,t,n){return e?n&&(n.merge||n.mergeFields)?e.toFirestore(t,n):e.toFirestore(t):t}var df=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e){var r;return Object(p.a)(this,n),(r=t.call(this)).firestore=e,r}
2return Object(v.a)(n,[{key:"convertBytes",value:function(e){return new al(e)}},{key:"convertReference",value:function(e){var t=this.convertDocumentKey(e,this.firestore._databaseId);return new Nc(this.firestore,null,t)}}]),n}(ff),pf=function(){function e(t,n){Object(p.a)(this,e),this._firestore=t,this._commitHandler=n,this._mutations=[],this._committed=!1,this._dataReader=pl(t)}return Object(v.a)(e,[{key:"set",value:function(e,t,n){this._verifyNotCommitted();var r=vf(e,this._firestore),i=hf(r.converter,t,n),a=vl(this._dataReader,"WriteBatch.set",r._key,i,null!==r.converter,n);return this._mutations.push(a.toMutation(r._key,ln.none())),this}},{key:"update",value:function(e,t,n){this._verifyNotCommitted();for(var r,i=vf(e,this._firestore),a=arguments.length,o=new Array(a>3?a-3:0),u=3;u<a;u++)o[u-3]=arguments[u];return r="string"==typeof(t=Object(b.l)(t))||t instanceof il?xl(this._dataReader,"WriteBatch.update",i._key,t,n,o):Ol(this._dataReader,"WriteBatch.update",i._key,t),this._mutations.push(r.toMutation(i._key,ln.exists(!0))),this}},{key:"delete",value:function(e){this._verifyNotCommitted();var t=vf(e,this._firestore);return this._mutations=this._mutations.concat(new jn(t._key,ln.none())),this}},{key:"commit",value:function(){return this._verifyNotCommitted(),this._committed=!0,this._mutations.length>0?this._commitHandler(this._mutations):Promise.resolve()}},{key:"_verifyNotCommitted",value:function(){if(this._committed)throw new L(D.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")}}]),e}();function vf(e,t){if((e=Object(b.l)(e)).firestore!==t)throw new L(D.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return e}function mf(e){e=Tc(e,Nc);var t=Tc(e.firestore,Hc);return kc(Kc(t),e._key).then((function(n){return Cf(t,e,n)}))}var yf=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e){var r;return Object(p.a)(this,n),(r=t.call(this)).firestore=e,r}return Object(v.a)(n,[{key:"convertBytes",value:function(e){return new al(e)}},{key:"convertReference",value:function(e){var t=this.convertDocumentKey(e,this.firestore._databaseId);return new Nc(this.firestore,null,t)}}]),n}(ff);function gf(e){e=Tc(e,Nc);var t=Tc(e.firestore,Hc),n=Kc(t),r=new yf(t);return function(e,t){var n=new M;return e.asyncQueue.enqueueAndForget(Object(l.a)(c.a.mark((function r(){return c.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=function(){var e=Object(l.a)(c.a.mark((function e(t,n,r){var i,a;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,function(e,t){var n=P(e);return n.persistence.runTransaction("read document","readonly",(function(e){return n.fi.Ls(e,t)}))}(t,n);case 3:(i=e.sent).isFoundDocument()?r.resolve(i):i.isNoDocument()?r.resolve(null):r.reject(new L(D.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.)")),e.next=11;break;case 7:e.prev=7,e.t0=e.catch(0),a=Cu(e.t0,"Failed to get document '".concat(n," from cache")),r.reject(a);case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,n,r){return e.apply(this,arguments)}}(),r.next=3,vc(e);case 3:return r.t1=r.sent,r.t2=t,r.t3=n,r.abrupt("return",(0,r.t0)(r.t1,r.t2,r.t3));case 7:case"end":return r.stop()}}),r)})))),n.promise}(n,e._key).then((function(n){return new Fl(t,r,e._key,n,new Ml(null!==n&&n.hasLocalMutations,!0),e.converter)}))}function bf(e){e=Tc(e,Nc);var t=Tc(e.firestore,Hc);return kc(Kc(t),e._key,{source:"server"}).then((function(n){return Cf(t,e,n)}))}function kf(e){e=Tc(e,Pc);var t=Tc(e.firestore,Hc),n=Kc(t),r=new yf(t);return ql(e._query),wc(n,e._query).then((function(n){return new Vl(t,r,e,n)}))}function wf(e){e=Tc(e,Pc);var t=Tc(e.firestore,Hc),n=Kc(t),r=new yf(t);return function(e,t){var n=new M;return e.asyncQueue.enqueueAndForget(Object(l.a)(c.a.mark((function r(){return c.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=function(){var e=Object(l.a)(c.a.mark((function e(t,n,r){var i,a,o,u,s;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Xa(t,n,!0);case 3:i=e.sent,a=new Yu(n,i._i),o=a.Wu(i.documents),u=a.applyChanges(o,!1),r.resolve(u.snapshot),e.next=14;break;case 10:e.prev=10,e.t0=e.catch(0),s=Cu(e.t0,"Failed to execute query '".concat(n," against cache")),r.reject(s);case 14:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t,n,r){return e.apply(this,arguments)}}(),r.next=3,vc(e);case 3:return r.t1=r.sent,r.t2=t,r.t3=n,r.abrupt("return",(0,r.t0)(r.t1,r.t2,r.t3));case 7:case"end":return r.stop()}}),r)})))),n.promise}(n,e._query).then((function(n){return new Vl(t,r,e,n)}))}function Of(e){e=Tc(e,Pc);var t=Tc(e.firestore,Hc),n=Kc(t),r=new yf(t);return wc(n,e._query,{source:"server"}).then((function(n){return new Vl(t,r,e,n)}))}
2function xf(e,t,n){e=Tc(e,Nc);var r=Tc(e.firestore,Hc),i=hf(e.converter,t,n);return If(r,[vl(pl(r),"setDoc",e._key,i,null!==e.converter,n).toMutation(e._key,ln.none())])}function _f(e,t,n){e=Tc(e,Nc);for(var r=Tc(e.firestore,Hc),i=pl(r),a=arguments.length,o=new Array(a>3?a-3:0),u=3;u<a;u++)o[u-3]=arguments[u];return If(r,[("string"==typeof(t=Object(b.l)(t))||t instanceof il?xl(i,"updateDoc",e._key,t,n,o):Ol(i,"updateDoc",e._key,t)).toMutation(e._key,ln.exists(!0))])}function jf(e){return If(Tc(e.firestore,Hc),[new jn(e._key,ln.none())])}function Ef(e,t){var n=Tc(e.firestore,Hc),r=Fc(e),i=hf(e.converter,t);return If(n,[vl(pl(e.firestore),"addDoc",r._key,i,null!==e.converter,{}).toMutation(r._key,ln.exists(!1))]).then((function(){return r}))}function Sf(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i,a,o;e=Object(b.l)(e);var u={includeMetadataChanges:!1},s=0;"object"!=typeof n[s]||zc(n[s])||(u=n[s],s++);var f,h,d,p={includeMetadataChanges:u.includeMetadataChanges};if(zc(n[s])){var v=n[s];n[s]=null===(i=v.next)||void 0===i?void 0:i.bind(v),n[s+1]=null===(a=v.error)||void 0===a?void 0:a.bind(v),n[s+2]=null===(o=v.complete)||void 0===o?void 0:o.bind(v)}if(e instanceof Nc)h=Tc(e.firestore,Hc),d=Rt(e._key.path),f={next:function(t){n[s]&&n[s](Cf(h,e,t))},error:n[s+1],complete:n[s+2]};else{var m=Tc(e,Pc);h=Tc(m.firestore,Hc),d=m._query;var y=new yf(h);f={next:function(e){n[s]&&n[s](new Vl(h,y,m,e))},error:n[s+1],complete:n[s+2]},ql(e._query)}return function(e,t,n,r){var i=new tc(r),a=new qu(t,i,n);return e.asyncQueue.enqueueAndForget(Object(l.a)(c.a.mark((function t(){return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=Lu,t.next=3,gc(e);case 3:return t.t1=t.sent,t.t2=a,t.abrupt("return",(0,t.t0)(t.t1,t.t2));case 6:case"end":return t.stop()}}),t)})))),function(){i.Aa(),e.asyncQueue.enqueueAndForget(Object(l.a)(c.a.mark((function t(){return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=Fu,t.next=3,gc(e);case 3:return t.t1=t.sent,t.t2=a,t.abrupt("return",(0,t.t0)(t.t1,t.t2));case 6:case"end":return t.stop()}}),t)}))))}}(Kc(h),d,p,f)}function Tf(e,t){return function(e,t){var n=new tc(t);return e.asyncQueue.enqueueAndForget(Object(l.a)(c.a.mark((function t(){return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=function(e,t){P(e).bu.add(t),t.next()},t.next=3,gc(e);case 3:return t.t1=t.sent,t.t2=n,t.abrupt("return",(0,t.t0)(t.t1,t.t2));case 6:case"end":return t.stop()}}),t)})))),function(){n.Aa(),e.asyncQueue.enqueueAndForget(Object(l.a)(c.a.mark((function t(){return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=function(e,t){P(e).bu.delete(t)},t.next=3,gc(e);case 3:return t.t1=t.sent,t.t2=n,t.abrupt("return",(0,t.t0)(t.t1,t.t2));case 6:case"end":return t.stop()}}),t)}))))}}(Kc(e=Tc(e,Hc)),zc(t)?t:{next:t})}function If(e,t){return function(e,t){var n=new M;return e.asyncQueue.enqueueAndForget(Object(l.a)(c.a.mark((function r(){return c.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=os,r.next=3,yc(e);case 3:return r.t1=r.sent,r.t2=t,r.t3=n,r.abrupt("return",(0,r.t0)(r.t1,r.t2,r.t3));case 7:case"end":return r.stop()}}),r)})))),n.promise}(Kc(e),t)}function Cf(e,t,n){var r=n.docs.get(t._key),i=new yf(e);return new Fl(e,i,t._key,r,new Ml(n.hasPendingWrites,n.fromCache),t.converter)}var Af=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r){var i;return Object(p.a)(this,n),(i=t.call(this,e,r))._firestore=e,i}return Object(v.a)(n,[{key:"get",value:function(e){var t=this,r=vf(e,this._firestore),o=new yf(this._firestore);return Object(i.a)(Object(a.a)(n.prototype),"get",this).call(this,e).then((function(e){return new Fl(t._firestore,o,r._key,e._document,new Ml(!1,!1),r.converter)}))}}]),n}(function(){function e(t,n){Object(p.a)(this,e),this._firestore=t,this._transaction=n,this._dataReader=pl(t)}return Object(v.a)(e,[{key:"get",value:function(e){var t=this,n=vf(e,this._firestore),r=new df(this._firestore);return this._transaction.lookup([n._key]).then((function(e){if(!e||1!==e.length)return A();var i=e[0];if(i.isFoundDocument())return new Pl(t._firestore,r,i.key,i,n.converter);if(i.isNoDocument())return new Pl(t._firestore,r,n._key,null,n.converter);throw A()}))}},{key:"set",value:function(e,t,n){var r=vf(e,this._firestore),i=hf(r.converter,t,n),a=vl(this._dataReader,"Transaction.set",r._key,i,null!==r.converter,n);return this._transaction.set(r._key,a),this}},{key:"update",value:function(e,t,n){for(var r,i=vf(e,this._firestore),a=arguments.length,o=new Array(a>3?a-3:0),u=3;u<a;u++)o[u-3]=arguments[u];return r="string"==typeof(t=Object(b.l)(t))||t instanceof il?xl(this._dataReader,"Transaction.update",i._key,t,n,o):Ol(this._dataReader,"Transaction.update",i._key,t),this._transaction.update(i._key,r),this}},{key:"delete",value:function(e){var t=vf(e,this._firestore);return this._transaction.delete(t._key),this}}]),e}());function Rf(e,t,n){e=Tc(e,Hc);var r=Object.assign(Object.assign({},lf),n);return function(e){if(e.maxAttempts<1)throw new L(D.INVALID_ARGUMENT,"Max attempts must be at least 1")}(r),function(e,t,n){var r=new M;return e.asyncQueue.enqueueAndForget(Object(l.a)(c.a.mark((function i(){var a;return c.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,function(e){return hc(e).then((function(e){return e.datastore}))}(e);case 2:a=i.sent,new ic(e.asyncQueue,a,n,t,r).run();case 4:case"end":return i.stop()}}),i)})))),r.promise}(Kc(e),(function(n){return t(new Af(e,n))}),r)}function Nf(){return new ml("deleteField")}function Pf(){return new gl("serverTimestamp")}function Df(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new bl("arrayUnion",t)}function Lf(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new kl("arrayRemove",t)}function Mf(e){return new wl("increment",e)}!function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];!function(e){x=e}(m.SDK_VERSION),Object(m._registerComponent)(new y.a("firestore",(function(e,n){var r=n.options,i=e.getProvider("app").getImmediate(),a=new Hc(i,new B(e.getProvider("auth-internal")),new H(e.getProvider("app-check-internal")));return r=Object.assign({useFetchStreams:t},r),a._setSettings(r),a}),"PUBLIC")),Object(m.registerVersion)(w,"3.4.9",e),Object(m.registerVersion)(w,"3.4.9","esm2017")}()}).call(this,n(134))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(60);function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}
2),t&&Object(r.a)(e,t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(23),i=n(81);function a(e){return a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}var o=n(47);function u(e,t){return!t||"object"!==a(t)&&"function"!==typeof t?Object(o.a)(e):t}function s(e){var t=Object(i.a)();return function(){var n,i=Object(r.a)(e);if(t){var a=Object(r.a)(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return u(this,n)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(36);function i(e,t){if(null==e)return{};var n,i,a=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){"use strict";function r(e){var t,n,i="";if("string"===typeof e||"number"===typeof e)i+=e;else if("object"===typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=r(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}t.a=function(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=r(e))&&(i&&(i+=" "),i+=t);return i}},function(e,t,n){e.exports=n(143)()},function(e,t,n){"use strict";var r=n(7),i=n(14),a=n(1),o=n.n(a),u=(n(89),n(59)),s=n.n(u),c=n(168),l=n(201),f=n(114),h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var a=t.defaultTheme,u=t.withTheme,h=void 0!==u&&u,d=t.name,p=Object(i.a)(t,["defaultTheme","withTheme","name"]);var v=d,m=Object(c.a)(e,Object(r.a)({defaultTheme:a,Component:n,name:d||n.displayName,classNamePrefix:v},p)),y=o.a.forwardRef((function(e,t){e.classes;var u,s=e.innerRef,c=Object(i.a)(e,["classes","innerRef"]),p=m(Object(r.a)({},n.defaultProps,e)),v=c;return("string"===typeof d||h)&&(u=Object(f.a)()||a,d&&(v=Object(l.a)({theme:u,name:d,props:c})),h&&!v.theme&&(v.theme=u)),o.a.createElement(n,Object(r.a)({ref:s||t,classes:p},v))}));return s()(y,n),y}},d=n(62);t.a=function(e,t){return h(e,Object(r.a)({defaultTheme:d.a},t))}},function(e,t,n){"use strict";n.r(t),n.d(t,"FirebaseError",(function(){return v.c})),n.d(t,"SDK_VERSION",(function(){return Y})),n.d(t,"_DEFAULT_ENTRY_NAME",(function(){return M})),n.d(t,"_addComponent",(function(){return B})),n.d(t,"_addOrOverwriteComponent",(function(){return z})),n.d(t,"_apps",(function(){return U})),n.d(t,"_clearComponents",(function(){return K})),n.d(t,"_components",(function(){return V})),n.d(t,"_getProvider",(function(){return W})),n.d(t,"_registerComponent",(function(){return q})),n.d(t,"_removeServiceInstance",(function(){return H})),n.d(t,"deleteApp",(function(){return ee})),n.d(t,"getApp",(function(){return J})),n.d(t,"getApps",(function(){return Z})),n.d(t,"initializeApp",(function(){return X})),n.d(t,"onLog",(function(){return re})),n.d(t,"registerVersion",(function(){return ne})),n.d(t,"setLogLevel",(function(){return ie}));var r,i,a=n(22),o=n(0),u=n.n(o),s=n(3),c=n(9),l=n(6),f=n(2),h=n(4),d=n(26),p=n(33),v=n(8),m=n(34);var y=new WeakMap,g=new WeakMap,b=new WeakMap,k=new WeakMap,w=new WeakMap;var O={get:function(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return g.get(e);if("objectStoreNames"===t)return e.objectStoreNames||b.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return j(e[t])},set:function(e,t,n){return e[t]=n,!0},has:function(e,t){return e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e}};function x(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(i||(i=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(E(this),n),j(y.get(this))}:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];
2return j(e.apply(E(this),n))}:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var a=e.call.apply(e,[E(this),t].concat(r));return b.set(a,t.sort?t.sort():[t]),j(a)}}function _(e){return"function"===typeof e?x(e):(e instanceof IDBTransaction&&function(e){if(!g.has(e)){var t=new Promise((function(t,n){var r=function(){e.removeEventListener("complete",i),e.removeEventListener("error",a),e.removeEventListener("abort",a)},i=function(){t(),r()},a=function(){n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",i),e.addEventListener("error",a),e.addEventListener("abort",a)}));g.set(e,t)}}(e),t=e,(r||(r=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some((function(e){return t instanceof e}))?new Proxy(e,O):e);var t}function j(e){if(e instanceof IDBRequest)return function(e){var t=new Promise((function(t,n){var r=function(){e.removeEventListener("success",i),e.removeEventListener("error",a)},i=function(){t(j(e.result)),r()},a=function(){n(e.error),r()};e.addEventListener("success",i),e.addEventListener("error",a)}));return t.then((function(t){t instanceof IDBCursor&&y.set(t,e)})).catch((function(){})),w.set(t,e),t}(e);if(k.has(e))return k.get(e);var t=_(e);return t!==e&&(k.set(e,t),w.set(t,e)),t}var E=function(e){return w.get(e)};var S,T,I=["get","getKey","getAll","getAllKeys","count"],C=["put","add","delete","clear"],A=new Map;function R(e,t){if(e instanceof IDBDatabase&&!(t in e)&&"string"===typeof t){if(A.get(t))return A.get(t);var n=t.replace(/FromIndex$/,""),r=t!==n,i=C.includes(n);if(n in(r?IDBIndex:IDBObjectStore).prototype&&(i||I.includes(n))){var a=function(){var e=Object(s.a)(u.a.mark((function e(t){var a,o,s,c,l,f,h=arguments;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(o=this.transaction(t,i?"readwrite":"readonly"),s=o.store,c=h.length,l=new Array(c>1?c-1:0),f=1;f<c;f++)l[f-1]=h[f];return r&&(s=s.index(l.shift())),e.next=6,Promise.all([(a=s)[n].apply(a,l),i&&o.done]);case 6:return e.abrupt("return",e.sent[0]);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}();return A.set(t,a),a}}}O=function(e){return Object(m.a)(Object(m.a)({},e),{},{get:function(t,n,r){return R(t,n)||e.get(t,n,r)},has:function(t,n){return!!R(t,n)||e.has(t,n)}})}(O);var N=function(){function e(t){Object(f.a)(this,e),this.container=t}return Object(h.a)(e,[{key:"getPlatformInfoString",value:function(){return this.container.getProviders().map((function(e){if(function(e){var t=e.getComponent();return"VERSION"===(null===t||void 0===t?void 0:t.type)}(e)){var t=e.getImmediate();return"".concat(t.library,"/").concat(t.version)}return null})).filter((function(e){return e})).join(" ")}}]),e}();var P="@firebase/app",D="0.7.25",L=new p.b("@firebase/app"),M="[DEFAULT]",F=(S={},Object(l.a)(S,P,"fire-core"),Object(l.a)(S,"@firebase/app-compat","fire-core-compat"),Object(l.a)(S,"@firebase/analytics","fire-analytics"),Object(l.a)(S,"@firebase/analytics-compat","fire-analytics-compat"),Object(l.a)(S,"@firebase/app-check","fire-app-check"),Object(l.a)(S,"@firebase/app-check-compat","fire-app-check-compat"),Object(l.a)(S,"@firebase/auth","fire-auth"),Object(l.a)(S,"@firebase/auth-compat","fire-auth-compat"),Object(l.a)(S,"@firebase/database","fire-rtdb"),Object(l.a)(S,"@firebase/database-compat","fire-rtdb-compat"),Object(l.a)(S,"@firebase/functions","fire-fn"),Object(l.a)(S,"@firebase/functions-compat","fire-fn-compat"),Object(l.a)(S,"@firebase/installations","fire-iid"),Object(l.a)(S,"@firebase/installations-compat","fire-iid-compat"),Object(l.a)(S,"@firebase/messaging","fire-fcm"),Object(l.a)(S,"@firebase/messaging-compat","fire-fcm-compat"),Object(l.a)(S,"@firebase/performance","fire-perf"),Object(l.a)(S,"@firebase/performance-compat","fire-perf-compat"),Object(l.a)(S,"@firebase/remote-config","fire-rc"),Object(l.a)(S,"@firebase/remote-config-compat","fire-rc-compat"),Object(l.a)(S,"@firebase/storage","fire-gcs"),Object(l.a)(S,"@firebase/storage-compat","fire-gcs-compat"),Object(l.a)(S,"@firebase/firestore","fire-fst"),Object(l.a)(S,"@firebase/firestore-compat","fire-fst-compat"),Object(l.a)(S,"fire-js","fire-js"),Object(l.a)(S,"firebase","fire-js-all"),S),U=new Map,V=new Map;function B(e,t){try{e.container.addComponent(t)}catch(n){L.debug("Component ".concat(t.name," failed to register with FirebaseApp ").concat(e.name),n)}}function z(e,t){e.container.addOrOverwriteComponent(t)}function q(e){var t=e.name;if(V.has(t))return L.debug("There were multiple attempts to register component ".concat(t,".")),!1;V.set(t,e);var n,r=Object(c.a)(U.values());try{for(r.s();!(n=r.n()).done;){B(n.value,e)}}catch(i){r.e(i)}finally{r.f()}return!0}function W(e,t){var n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}function H(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:M;W(e,t).clearInstance(n)}function K(){V.clear()}var G=(T={},Object(l.a)(T,"no-app","No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()"),Object(l.a)(T,"bad-app-name","Illegal App name: '{$appName}"),Object(l.a)(T,"duplicate-app","Firebase App named '{$appName}' already exists with different options or config"),Object(l.a)(T,"app-deleted","Firebase App named '{$appName}
2' already deleted"),Object(l.a)(T,"invalid-app-argument","firebase.{$appName}() takes either no argument or a Firebase App instance."),Object(l.a)(T,"invalid-log-argument","First argument to `onLog` must be null or a function."),Object(l.a)(T,"storage-open","Error thrown when opening storage. Original error: {$originalErrorMessage}."),Object(l.a)(T,"storage-get","Error thrown when reading from storage. Original error: {$originalErrorMessage}."),Object(l.a)(T,"storage-set","Error thrown when writing to storage. Original error: {$originalErrorMessage}."),Object(l.a)(T,"storage-delete","Error thrown when deleting from storage. Original error: {$originalErrorMessage}."),T),$=new v.b("app","Firebase",G),Q=function(){function e(t,n,r){var i=this;Object(f.a)(this,e),this._isDeleted=!1,this._options=Object.assign({},t),this._config=Object.assign({},n),this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new d.a("app",(function(){return i}),"PUBLIC"))}return Object(h.a)(e,[{key:"automaticDataCollectionEnabled",get:function(){return this.checkDestroyed(),this._automaticDataCollectionEnabled},set:function(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}},{key:"name",get:function(){return this.checkDestroyed(),this._name}},{key:"options",get:function(){return this.checkDestroyed(),this._options}},{key:"config",get:function(){return this.checkDestroyed(),this._config}},{key:"container",get:function(){return this._container}},{key:"isDeleted",get:function(){return this._isDeleted},set:function(e){this._isDeleted=e}},{key:"checkDestroyed",value:function(){if(this.isDeleted)throw $.create("app-deleted",{appName:this._name})}}]),e}(),Y="9.8.2";function X(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!==typeof t){var n=t;t={name:n}}var r=Object.assign({name:M,automaticDataCollectionEnabled:!1},t),i=r.name;if("string"!==typeof i||!i)throw $.create("bad-app-name",{appName:String(i)});var a=U.get(i);if(a){if(Object(v.i)(e,a.options)&&Object(v.i)(r,a.config))return a;throw $.create("duplicate-app",{appName:i})}var o,u=new d.b(i),s=Object(c.a)(V.values());try{for(s.s();!(o=s.n()).done;){var l=o.value;u.addComponent(l)}}catch(h){s.e(h)}finally{s.f()}var f=new Q(e,r,u);return U.set(i,f),f}function J(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:M,t=U.get(e);if(!t)throw $.create("no-app",{appName:e});return t}function Z(){return Array.from(U.values())}function ee(e){return te.apply(this,arguments)}function te(){return(te=Object(s.a)(u.a.mark((function e(t){var n;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.name,!U.has(n)){e.next=6;break}return U.delete(n),e.next=5,Promise.all(t.container.getProviders().map((function(e){return e.delete()})));case 5:t.isDeleted=!0;case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ne(e,t,n){var r,i=null!==(r=F[e])&&void 0!==r?r:e;n&&(i+="-".concat(n));var a=i.match(/\s|\//),o=t.match(/\s|\//);if(a||o){var u=['Unable to register library "'.concat(i,'" with version "').concat(t,'":')];return a&&u.push('library name "'.concat(i,'" contains illegal characters (whitespace or "/")')),a&&o&&u.push("and"),o&&u.push('version name "'.concat(t,'" contains illegal characters (whitespace or "/")')),void L.warn(u.join(" "))}q(new d.a("".concat(i,"-version"),(function(){return{library:i,version:t}}),"VERSION"))}function re(e,t){if(null!==e&&"function"!==typeof e)throw $.create("invalid-log-argument");Object(p.d)(e,t)}function ie(e){Object(p.c)(e)}var ae="firebase-heartbeat-store",oe=null;function ue(){return oe||(oe=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.blocked,i=n.upgrade,a=n.blocking,o=n.terminated,u=indexedDB.open(e,t),s=j(u);return i&&u.addEventListener("upgradeneeded",(function(e){i(j(u.result),e.oldVersion,e.newVersion,j(u.transaction))})),r&&u.addEventListener("blocked",(function(){return r()})),s.then((function(e){o&&e.addEventListener("close",(function(){return o()})),a&&e.addEventListener("versionchange",(function(){return a()}))})).catch((function(){})),s}("firebase-heartbeat-database",1,{upgrade:function(e,t){if(0===t)e.createObjectStore(ae)}}).catch((function(e){throw $.create("storage-open",{originalErrorMessage:e.message})}))),oe}function se(e){return ce.apply(this,arguments)}function ce(){return(ce=Object(s.a)(u.a.mark((function e(t){var n;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,ue();case 3:return n=e.sent,e.abrupt("return",n.transaction(ae).objectStore(ae).get(he(t)));case 7:throw e.prev=7,e.t0=e.catch(0),$.create("storage-get",{originalErrorMessage:e.t0.message});case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))).apply(this,arguments)}function le(e,t){return fe.apply(this,arguments)}function fe(){return(fe=Object(s.a)(u.a.mark((function e(t,n){var r,i,a;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,ue();case 3:return r=e.sent,i=r.transaction(ae,"readwrite"),a=i.objectStore(ae),e.next=8,a.put(n,he(t));case 8:return e.abrupt("return",i.done);case 11:throw e.prev=11,e.t0=e.catch(0),$.create("storage-set",{originalErrorMessage:e.t0.message});case 14:case"end":return e.stop()}}),e,null,[[0,11]])})))).apply(this,arguments)}function he(e){return"".concat(e.name,"!").concat(e.options.appId)}var de=function(){function e(t){var n=this;Object(f.a)(this,e),this.container=t,this._heartbeatsCache=null;var r=this.container.getProvider("app").getImmediate();this._storage=new ye(r),this._heartbeatsCachePromise=this._storage.read().then((function(e){return n._heartbeatsCache=e,e}))}return Object(h.a)(e,[{key:"triggerHeartbeat",value:function(){var e=Object(s.a)(u.a.mark((function e(){var t,n,r;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.container.getProvider("platform-logger").getImmediate(),n=t.getPlatformInfoString(),r=pe(),null!==this._heartbeatsCache){e.next=7;break}return e.next=6,this._heartbeatsCachePromise;case 6:this._heartbeatsCache=e.sent;case 7:if(this._heartbeatsCache.lastSentHeartbeatDate!==r&&!this._heartbeatsCache.heartbeats.some((function(e){return e.date===r}))){e.next=11;break}return e.abrupt("return");case 11:this._heartbeatsCache.heartbeats.push({date:r,agent:n});case 12:return this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter((function(e){var t=new Date(e.date).valueOf();return Date.now()-t<=2592e6})),e.abrupt("return",this._storage.overwrite(this._heartbeatsCache));case 14:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getHeartbeatsHeader",value:function(){var e=Object(s.a)(u.a.mark((function e(){var t,n,r,i,a;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==this._heartbeatsCache){e.next=3;break}return e.next=3,this._heartbeatsCachePromise;case 3:if(null!==this._heartbeatsCache&&0!==this._heartbeatsCache.heartbeats.length){e.next=5;break}return e.abrupt("return","");case 5:if(t=pe(),n=ve(this._heartbeatsCache.heartbeats),r=n.heartbeatsToSend,i=n.unsentEntries,a=Object(v.e)(JSON.stringify({version:2,heartbeats:r})),this._heartbeatsCache.lastSentHeartbeatDate=t,!(i.length>0)){e.next=15;break}return this._heartbeatsCache.heartbeats=i,e.next=13,this._storage.overwrite(this._heartbeatsCache);case 13:e.next=17;break;case 15:this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache);case 17:return e.abrupt("return",a);case 18:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}();function pe(){return(new Date).toISOString().substring(0,10)}function ve(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1024,r=[],i=e.slice(),a=Object(c.a)(e);try{var o=function(){var e=t.value,a=r.find((function(t){return t.agent===e.agent}));if(a){if(a.dates.push(e.date),ge(r)>n)return a.dates.pop(),"break"}else if(r.push({agent:e.agent,dates:[e.date]}),ge(r)>n)return r.pop(),"break";i=i.slice(1)};for(a.s();!(t=a.n()).done;){var u=o();if("break"===u)break}}catch(s){a.e(s)}finally{a.f()}return{heartbeatsToSend:r,unsentEntries:i}}var me,ye=function(){function e(t){Object(f.a)(this,e),this.app=t,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}return Object(h.a)(e,[{key:"runIndexedDBEnvironmentCheck",value:function(){var e=Object(s.a)(u.a.mark((function e(){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Object(v.s)()){e.next=4;break}return e.abrupt("return",!1);case 4:return e.abrupt("return",Object(v.A)().then((function(){return!0})).catch((function(){return!1})));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"read",value:function(){var e=Object(s.a)(u.a.mark((function e(){var t;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._canUseIndexedDBPromise;case 2:if(e.sent){e.next=7;break}return e.abrupt("return",{heartbeats:[]});case 7:return e.next=9,se(this.app);case 9:return t=e.sent,e.abrupt("return",t||{heartbeats:[]});case 11:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}
2,{key:"overwrite",value:function(){var e=Object(s.a)(u.a.mark((function e(t){var n,r;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._canUseIndexedDBPromise;case 2:if(e.sent){e.next=7;break}return e.abrupt("return");case 7:return e.next=9,this.read();case 9:return r=e.sent,e.abrupt("return",le(this.app,{lastSentHeartbeatDate:null!==(n=t.lastSentHeartbeatDate)&&void 0!==n?n:r.lastSentHeartbeatDate,heartbeats:t.heartbeats}));case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"add",value:function(){var e=Object(s.a)(u.a.mark((function e(t){var n,r;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._canUseIndexedDBPromise;case 2:if(e.sent){e.next=7;break}return e.abrupt("return");case 7:return e.next=9,this.read();case 9:return r=e.sent,e.abrupt("return",le(this.app,{lastSentHeartbeatDate:null!==(n=t.lastSentHeartbeatDate)&&void 0!==n?n:r.lastSentHeartbeatDate,heartbeats:[].concat(Object(a.a)(r.heartbeats),Object(a.a)(t.heartbeats))}));case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}();function ge(e){return Object(v.e)(JSON.stringify({version:2,heartbeats:e})).length}me="",q(new d.a("platform-logger",(function(e){return new N(e)}),"PRIVATE")),q(new d.a("heartbeat",(function(e){return new de(e)}),"PRIVATE")),ne(P,D,me),ne(P,D,"esm2017"),ne("fire-js","")},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(79);var i=n(51),a=n(80);function o(e,t){return Object(r.a)(e)||function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,a=void 0;try{for(var o,u=e[Symbol.iterator]();!(r=(o=u.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(s){i=!0,a=s}finally{try{r||null==u.return||u.return()}finally{if(i)throw a}}return n}}(e,t)||Object(i.a)(e,t)||Object(a.a)()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(113);function i(e){if("string"!==typeof e)throw new Error(Object(r.a)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(69);var i=n(82),a=n(51);function o(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(i.a)(e)||Object(a.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(1),i=n(46);function a(e,t){return r.useMemo((function(){return null==e&&null==t?null:function(n){Object(i.a)(e,n),Object(i.a)(t,n)}}),[e,t])}},function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(123)},function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return v}));var r=n(0),i=n.n(r),a=n(22),o=n(3),u=n(19),s=n(9),c=n(2),l=n(4),f=n(8),h=function(){function e(t,n,r){Object(c.a)(this,e),this.name=t,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}return Object(l.a)(e,[{key:"setInstantiationMode",value:function(e){return this.instantiationMode=e,this}},{key:"setMultipleInstances",value:function(e){return this.multipleInstances=e,this}},{key:"setServiceProps",value:function(e){return this.serviceProps=e,this}},{key:"setInstanceCreatedCallback",value:function(e){return this.onInstanceCreated=e,this}}]),e}(),d="[DEFAULT]",p=function(){function e(t,n){Object(c.a)(this,e),this.name=t,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}return Object(l.a)(e,[{key:"get",value:function(e){var t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){var n=new f.a;if(this.instancesDeferred.set(t,n),this.isInitialized(t)||this.shouldAutoInitialize())try{var r=this.getOrInitializeService({instanceIdentifier:t});r&&n.resolve(r)}catch(i){}}return this.instancesDeferred.get(t).promise}},{key:"getImmediate",value:function(e){var t,n=this.normalizeInstanceIdentifier(null===e||void 0===e?void 0:e.identifier),r=null!==(t=null===e||void 0===e?void 0:e.optional)&&void 0!==t&&t;if(!this.isInitialized(n)&&!this.shouldAutoInitialize()){if(r)return null;throw Error("Service ".concat(this.name," is not available"))}try{return this.getOrInitializeService({instanceIdentifier:n})}catch(i){if(r)return null;throw i}}},{key:"getComponent",value:function(){return this.component}},{key:"setComponent",value:function(e){if(e.name!==this.name)throw Error("Mismatching Component ".concat(e.name," for Provider ").concat(this.name,"."));if(this.component)throw Error("Component for ".concat(this.name," has already been provided"));if(this.component=e,this.shouldAutoInitialize()){if(function(e){return"EAGER"===e.instantiationMode}(e))try{this.getOrInitializeService({instanceIdentifier:d})}catch(l){}var t,n=Object(s.a)(this.instancesDeferred.entries());try{for(n.s();!(t=n.n()).done;){var r=Object(u.a)(t.value,2),i=r[0],a=r[1],o=this.normalizeInstanceIdentifier(i);try{var c=this.getOrInitializeService({instanceIdentifier:o});a.resolve(c)}catch(l){}}}catch(f){n.e(f)}finally{n.f()}}}},{key:"clearInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d;this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}},{key:"delete",value:function(){var e=Object(o.a)(i.a.mark((function e(){var t;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Array.from(this.instances.values()),e.next=3,Promise.all([].
2concat(Object(a.a)(t.filter((function(e){return"INTERNAL"in e})).map((function(e){return e.INTERNAL.delete()}))),Object(a.a)(t.filter((function(e){return"_delete"in e})).map((function(e){return e._delete()})))));case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"isComponentSet",value:function(){return null!=this.component}},{key:"isInitialized",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d;return this.instances.has(e)}},{key:"getOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d;return this.instancesOptions.get(e)||{}}},{key:"initialize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.options,n=void 0===t?{}:t,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error("".concat(this.name,"(").concat(r,") has already been initialized"));if(!this.isComponentSet())throw Error("Component ".concat(this.name," has not been registered yet"));var i,a=this.getOrInitializeService({instanceIdentifier:r,options:n}),o=Object(s.a)(this.instancesDeferred.entries());try{for(o.s();!(i=o.n()).done;){var c=Object(u.a)(i.value,2),l=c[0],f=c[1],h=this.normalizeInstanceIdentifier(l);r===h&&f.resolve(a)}}catch(d){o.e(d)}finally{o.f()}return a}},{key:"onInit",value:function(e,t){var n,r=this.normalizeInstanceIdentifier(t),i=null!==(n=this.onInitCallbacks.get(r))&&void 0!==n?n:new Set;i.add(e),this.onInitCallbacks.set(r,i);var a=this.instances.get(r);return a&&e(a,r),function(){i.delete(e)}}},{key:"invokeOnInitCallbacks",value:function(e,t){var n=this.onInitCallbacks.get(t);if(n){var r,i=Object(s.a)(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;try{a(e,t)}catch(o){}}}catch(u){i.e(u)}finally{i.f()}}}},{key:"getOrInitializeService",value:function(e){var t,n=e.instanceIdentifier,r=e.options,i=void 0===r?{}:r,a=this.instances.get(n);if(!a&&this.component&&(a=this.component.instanceFactory(this.container,{instanceIdentifier:(t=n,t===d?void 0:t),options:i}),this.instances.set(n,a),this.instancesOptions.set(n,i),this.invokeOnInitCallbacks(a,n),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,n,a)}catch(o){}return a||null}},{key:"normalizeInstanceIdentifier",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d;return this.component?this.component.multipleInstances?e:d:e}},{key:"shouldAutoInitialize",value:function(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}]),e}();var v=function(){function e(t){Object(c.a)(this,e),this.name=t,this.providers=new Map}return Object(l.a)(e,[{key:"addComponent",value:function(e){var t=this.getProvider(e.name);if(t.isComponentSet())throw new Error("Component ".concat(e.name," has already been registered with ").concat(this.name));t.setComponent(e)}},{key:"addOrOverwriteComponent",value:function(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}},{key:"getProvider",value:function(e){if(this.providers.has(e))return this.providers.get(e);var t=new p(e,this);return this.providers.set(e,t),t}},{key:"getProviders",value:function(){return Array.from(this.providers.values())}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return k})),n.d(t,"b",(function(){return m})),n.d(t,"c",(function(){return E})),n.d(t,"d",(function(){return v})),n.d(t,"e",(function(){return b})),n.d(t,"f",(function(){return T})),n.d(t,"g",(function(){return I})),n.d(t,"h",(function(){return C}));var r=n(28),i=n(1),a=n.n(i),o=(n(78),n(38)),u=n(106),s=n(40),c=n(7),l=n(95),f=n.n(l),h=(n(100),n(36)),d=(n(59),function(e){var t=Object(u.a)();return t.displayName=e,t}),p=d("Router-History"),v=d("Router"),m=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._pendingLocation=e}))),n}Object(r.a)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){var e=this;this._isMounted=!0,this.unlisten&&this.unlisten(),this.props.staticContext||(this.unlisten=this.props.history.listen((function(t){e._isMounted&&e.setState({location:t})}
2))),this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},n.render=function(){return a.a.createElement(v.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},a.a.createElement(p.Provider,{children:this.props.children||null,value:this.props.history}))},t}(a.a.Component);a.a.Component;a.a.Component;var y={},g=0;function b(e,t){void 0===t&&(t={}),("string"===typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,i=n.exact,a=void 0!==i&&i,o=n.strict,u=void 0!==o&&o,s=n.sensitive,c=void 0!==s&&s;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=y[n]||(y[n]={});if(r[e])return r[e];var i=[],a={regexp:f()(e,i,t),keys:i};return g<1e4&&(r[e]=a,g++),a}(n,{end:a,strict:u,sensitive:c}),i=r.regexp,o=r.keys,s=i.exec(e);if(!s)return null;var l=s[0],h=s.slice(1),d=e===l;return a&&!d?null:{path:n,url:"/"===n&&""===l?"/":l,isExact:d,params:o.reduce((function(e,t,n){return e[t.name]=h[n],e}),{})}}),null)}var k=function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.render=function(){var e=this;return a.a.createElement(v.Consumer,null,(function(t){t||Object(s.a)(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?b(n.pathname,e.props):t.match,i=Object(c.a)({},t,{location:n,match:r}),o=e.props,u=o.children,l=o.component,f=o.render;return Array.isArray(u)&&function(e){return 0===a.a.Children.count(e)}(u)&&(u=null),a.a.createElement(v.Provider,{value:i},i.match?u?"function"===typeof u?u(i):u:l?a.a.createElement(l,i):f?f(i):null:"function"===typeof u?u(i):null)}))},t}(a.a.Component);function w(e){return"/"===e.charAt(0)?e:"/"+e}function O(e,t){if(!e)return t;var n=w(e);return 0!==t.pathname.indexOf(n)?t:Object(c.a)({},t,{pathname:t.pathname.substr(n.length)})}function x(e){return"string"===typeof e?e:Object(o.e)(e)}function _(e){return function(){Object(s.a)(!1)}}function j(){}a.a.Component;var E=function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.render=function(){var e=this;return a.a.createElement(v.Consumer,null,(function(t){t||Object(s.a)(!1);var n,r,i=e.props.location||t.location;return a.a.Children.forEach(e.props.children,(function(e){if(null==r&&a.a.isValidElement(e)){n=e;var o=e.props.path||e.props.from;r=o?b(i.pathname,Object(c.a)({},e.props,{path:o})):t.match}})),r?a.a.cloneElement(n,{location:i,computedMatch:r}):null}))},t}(a.a.Component);var S=a.a.useContext;function T(){return S(p)}function I(){return S(v).location}function C(){var e=S(v).match;return e?e.params:{}}},function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,t)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return y}));var r=n(27),i=n(28),a=n(1),o=n.n(a),u=n(38),s=(n(148),n(7)),c=n(36),l=n(40),f=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).history=Object(u.a)(t.props),t}return Object(i.a)(t,e),t.prototype.render=function(){return o.a.createElement(r.b,{history:this.history,children:this.props.children})},t}(o.a.Component);o.a.Component;var h=function(e,t){return"function"===typeof e?e(t):e},d=function(e,t){return"string"===typeof e?Object(u.c)(e,null,null,t):e},p=function(e){return e},v=o.a.forwardRef;"undefined"===typeof v&&(v=p);var m=v((function(e,t){var n=e.innerRef,r=e.navigate,i=e.onClick,a=Object(c.a)(e,["innerRef","navigate","onClick"]),u=a.target,l=Object(s.a)({},a,{onClick:function(e){try{i&&i(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||u&&"_self"!==u||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return l.ref=p!==v&&t||n,o.a.createElement("a",l)}));var y=v((function(e,t){var n=e.component,i=void 0===n?m:n,a=e.replace,f=e.to,y=e.innerRef,g=Object(c.a)(e,["component","replace","to","innerRef"]);return o.a.createElement(r.d.Consumer,null,(function(e){e||Object(l.a)(!1);var n=e.history,r=d(h(f,e.location),e.location),c=r?n.createHref(r):"",m=Object(s.a)({},g,{href:c,navigate:function(){var t=h(f,e.location),r=Object(u.e)(e.location)===Object(u.e)(d(t));(a||r?n.replace:n.push)(t)}});return p!==v?m.ref=t||y:m.innerRef=y,o.a.createElement(i,m)}))})),g=function(e){return e},b=o.a.forwardRef;"undefined"===typeof b&&(b=g);b((function(e,t){var n=e["aria-current"],i=void 0===n?"page":n,a=e.activeClassName,u=void 0===a?"active":a,f=e.activeStyle,p=e.className,v=e.exact,m=e.isActive,k=e.location,w=e.sensitive,O=e.strict,x=e.style,_=e.to,j=e.innerRef,E=Object(c.a)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return o.a.createElement(r.d.Consumer,null,(function(e){e||Object(l.a)(!1);var n=k||e.location,a=d(h(_,n),n),c=a.pathname,S=c&&c.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),T=S?Object(r.e)(n.pathname,{path:S,exact:v,sensitive:w,strict:O}):null,I=!!(m?m(T,n):T),C="function"===typeof p?p(I):p,A="function"===typeof x?x(I):x;I&&(C=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return e})).join(" ")}(C,u),A=Object(s.a)({},A,f));var R=Object(s.a)({"aria-current":I&&i||null,className:C,style:A,to:a},E);return g!==b?R.ref=t||j:R.innerRef=j,o.a.createElement(y,R)}))}))},function(e,t,n){"use strict";n.d(t,"c",(function(){return u})),n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return l})),n.d(t,"d",(function(){return f}));var r=n(113);function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function a(e){if(e.type)return e;if("#"===e.charAt(0))return a(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(Object(r.a)(3,e));var i=e.substring(t+1,e.length-1).split(",");return{type:n,values:i=i.map((function(e){return parseFloat(e)}))}}function o(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function u(e,t){var n=s(e),r=s(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function s(e){var t="hsl"===(e=a(e)).type?a(function(e){var t=(e=a(e)).values,n=t[0],r=t[1]/100,i=t[2]/100,u=r*Math.min(i,1-i),s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-u*Math.max(Math.min(t-3,9-t,1),-1)},c="rgb",l=[Math.round(255*s(0)),Math.round(255*s(8)),Math.round(255*s(4))];return"hsla"===e.type&&(c+="a",l.push(t[3])),o({type:c,values:l})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}
2)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function c(e,t){return e=a(e),t=i(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,o(e)}function l(e,t){if(e=a(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return o(e)}function f(e,t){if(e=a(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return o(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(23);function i(e,t,n){return i="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Object(r.a)(e)););return e}(e,t);if(i){var a=Object.getOwnPropertyDescriptor(i,t);return a.get?a.get.call(n):a.value}},i(e,t,n||e)}},function(e,t,n){"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return v})),n.d(t,"d",(function(){return m}));var r,i,a=n(9),o=n(2),u=n(4),s=n(6),c=[];!function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(i||(i={}));var l={debug:i.DEBUG,verbose:i.VERBOSE,info:i.INFO,warn:i.WARN,error:i.ERROR,silent:i.SILENT},f=i.INFO,h=(r={},Object(s.a)(r,i.DEBUG,"log"),Object(s.a)(r,i.VERBOSE,"log"),Object(s.a)(r,i.INFO,"info"),Object(s.a)(r,i.WARN,"warn"),Object(s.a)(r,i.ERROR,"error"),r),d=function(e,t){if(!(t<e.logLevel)){var n=(new Date).toISOString(),r=h[t];if(!r)throw new Error("Attempted to log a message with an invalid logType (value: ".concat(t,")"));for(var i,a=arguments.length,o=new Array(a>2?a-2:0),u=2;u<a;u++)o[u-2]=arguments[u];(i=console)[r].apply(i,["[".concat(n,"]  ").concat(e.name,":")].concat(o))}},p=function(){function e(t){Object(o.a)(this,e),this.name=t,this._logLevel=f,this._logHandler=d,this._userLogHandler=null,c.push(this)}return Object(u.a)(e,[{key:"logLevel",get:function(){return this._logLevel},set:function(e){if(!(e in i))throw new TypeError('Invalid value "'.concat(e,'" assigned to `logLevel`'));this._logLevel=e}},{key:"setLogLevel",value:function(e){this._logLevel="string"===typeof e?l[e]:e}},{key:"logHandler",get:function(){return this._logHandler},set:function(e){if("function"!==typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}},{key:"userLogHandler",get:function(){return this._userLogHandler},set:function(e){this._userLogHandler=e}},{key:"debug",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,[this,i.DEBUG].concat(t)),this._logHandler.apply(this,[this,i.DEBUG].concat(t))}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,[this,i.VERBOSE].concat(t)),this._logHandler.apply(this,[this,i.VERBOSE].concat(t))}},{key:"info",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,[this,i.INFO].concat(t)),this._logHandler.apply(this,[this,i.INFO].concat(t))}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,[this,i.WARN].concat(t)),this._logHandler.apply(this,[this,i.WARN].concat(t))}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,[this,i.ERROR].concat(t)),this._logHandler.apply(this,[this,i.ERROR].concat(t))}}]),e}();function v(e){c.forEach((function(t){t.setLogLevel(e)}))}function m(e,t){var n,r=Object(a.a)(c);try{var o=function(){var r=n.value,a=null;t&&t.level&&(a=l[t.level]),r.userLogHandler=null===e?null:function(t,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),u=2;u<r;u++)o[u-2]=arguments[u];var s=o.map((function(e){if(null==e)return null;if("string"===typeof e)return e;if("number"===typeof e||"boolean"===typeof e)return e.toString();if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch(t){return null}})).filter((function(e){return e})).join(" ");n>=(null!==a&&void 0!==a?a:t.logLevel)&&e({level:i[n].toLowerCase(),message:s,args:o,type:t.name})}};for(r.s();!(n=r.n()).done;)o()}catch(u){r.e(u)}finally{r.f()}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
2t%2?i(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return yr})),n.d(t,"b",(function(){return br})),n.d(t,"c",(function(){return gr})),n.d(t,"d",(function(){return wr})),n.d(t,"e",(function(){return kr})),n.d(t,"f",(function(){return Or})),n.d(t,"g",(function(){return xr})),n.d(t,"h",(function(){return vr})),n.d(t,"i",(function(){return mr}));var r,i=n(9),a=n(31),o=n(23),u=n(12),s=n(13),c=n(2),l=n(4),f="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{},h={},d=d||{},p=f||self;function v(){}function m(e){var t=typeof e;return"array"==(t="object"!=t?t:e?Array.isArray(e)?"array":t:"null")||"object"==t&&"number"==typeof e.length}function y(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}var g="closure_uid_"+(1e9*Math.random()>>>0),b=0;function k(e,t,n){return e.call.apply(e.bind,arguments)}function w(e,t,n){if(!e)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function O(e,t,n){return(O=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?k:w).apply(null,arguments)}function x(e,t){var n=Array.prototype.slice.call(arguments,1);return function(){var t=n.slice();return t.push.apply(t,arguments),e.apply(this,t)}}function _(e,t){function n(){}n.prototype=t.prototype,e.Z=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.Vb=function(e,n,r){for(var i=Array(arguments.length-2),a=2;a<arguments.length;a++)i[a-2]=arguments[a];return t.prototype[n].apply(e,i)}}function j(){this.s=this.s,this.o=this.o}var E={};j.prototype.s=!1,j.prototype.na=function(){if(!this.s&&(this.s=!0,this.M(),0)){var e=function(e){return Object.prototype.hasOwnProperty.call(e,g)&&e[g]||(e[g]=++b)}(this);delete E[e]}},j.prototype.M=function(){if(this.o)for(;this.o.length;)this.o.shift()()};var S=Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t,void 0)}:function(e,t){if("string"===typeof e)return"string"!==typeof t||1!=t.length?-1:e.indexOf(t,0);for(var n=0;n<e.length;n++)if(n in e&&e[n]===t)return n;return-1},T=Array.prototype.forEach?function(e,t,n){Array.prototype.forEach.call(e,t,n)}:function(e,t,n){for(var r=e.length,i="string"===typeof e?e.split(""):e,a=0;a<r;a++)a in i&&t.call(n,i[a],a,e)};function I(e){return Array.prototype.concat.apply([],arguments)}function C(e){var t=e.length;if(0<t){for(var n=Array(t),r=0;r<t;r++)n[r]=e[r];return n}return[]}function A(e){return/^[\s\xa0]*$/.test(e)}var R,N=String.prototype.trim?function(e){return e.trim()}:function(e){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(e)[1]};function P(e,t){return-1!=e.indexOf(t)}function D(e,t){return e<t?-1:e>t?1:0}e:{var L=p.navigator;if(L){var M=L.userAgent;if(M){R=M;break e}}R=""}function F(e,t,n){for(var r in e)t.call(n,e[r],r,e)}function U(e){var t={};for(var n in e)t[n]=e[n];return t}var V="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function B(e,t){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i])e[n]=r[n];for(var a=0;a<V.length;a++)n=V[a],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}function z(e){return z[" "](e),e}z[" "]=v;var q,W=P(R,"Opera"),H=P(R,"Trident")||P(R,"MSIE"),K=P(R,"Edge"),G=K||H,$=P(R,"Gecko")&&!(P(R.toLowerCase(),"webkit")&&!P(R,"Edge"))&&!(P(R,"Trident")||P(R,"MSIE"))&&!P(R,"Edge"),Q=P(R.toLowerCase(),"webkit")&&!P(R,"Edge");function Y(){var e=p.document;return e?e.documentMode:void 0}e:{var X="",J=function(){var e=R;return $?/rv:([^\);]+)(\)|;)/.exec(e):K?/Edge\/([\d\.]+)/.exec(e):H?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e):Q?/WebKit\/(\S+)/.exec(e):W?/(?:Version)[ \/]?(\S+)/.exec(e):void 0}();if(J&&(X=J?J[1]:""),H){var Z=Y();if(null!=Z&&Z>parseFloat(X)){q=String(Z);break e}}q=X}var ee,te={};function ne(){return function(e){var t=te;return Object.prototype.hasOwnProperty.call(t,9)?t[9]:t[9]=e(9)}((function(){for(var e=0,t=N(String(q)).split("."),n=N("9").split("."),r=Math.max(t.length,n.length),i=0;0==e&&i<r;i++){var a=t[i]||"",o=n[i]||"";do{if(a=/(\d*)(\D*)(.*)/.exec(a)||["","","",""],o=/(\d*)(\D*)(.*)/.exec(o)||["","","",""],0==a[0].length&&0==o[0].length)break;e=D(0==a[1].length?0:parseInt(a[1],10),0==o[1].length?0:parseInt(o[1],10))||D(0==a[2].length,0==o[2].length)||D(a[2],o[2]),a=a[3],o=o[3]}while(0==e)}return 0<=e}))}if(p.document&&H){var re=Y();ee=re||(parseInt(q,10)||void 0)}else ee=void 0;var ie=ee,ae=function(){if(!p.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{p.addEventListener("test",v,t),p.removeEventListener("test",v,t)}catch(n){}return e}();function oe(e,t){this.type=e,this.g=this.target=t,this.defaultPrevented=!1}function ue(e,t){if(oe.call(this,e?e.type:""),this.relatedTarget=this.g=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.state=null,this.pointerId=0,this.pointerType="",this.i=null,e){var n=this.type=e.type,r=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:null;if(this.target=e.target||e.srcElement,this.g=t,t=e.relatedTarget){if($){e:{try{z(t.nodeName);var i=!0;break e}catch(a){}i=!1}i||(t=null)}}
vendor: 28,539 bytes, line 2
2else"mouseover"==n?t=e.fromElement:"mouseout"==n&&(t=e.toElement);this.relatedTarget=t,r?(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=void 0!==e.clientX?e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0),this.button=e.button,this.key=e.key||"",this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.pointerId=e.pointerId||0,this.pointerType="string"===typeof e.pointerType?e.pointerType:se[e.pointerType]||"",this.state=e.state,this.i=e,e.defaultPrevented&&ue.Z.h.call(this)}}oe.prototype.h=function(){this.defaultPrevented=!0},_(ue,oe);var se={2:"touch",3:"pen",4:"mouse"};ue.prototype.h=function(){ue.Z.h.call(this);var e=this.i;e.preventDefault?e.preventDefault():e.returnValue=!1};var ce="closure_listenable_"+(1e6*Math.random()|0),le=0;function fe(e,t,n,r,i){this.listener=e,this.proxy=null,this.src=t,this.type=n,this.capture=!!r,this.ia=i,this.key=++le,this.ca=this.fa=!1}function he(e){e.ca=!0,e.listener=null,e.proxy=null,e.src=null,e.ia=null}function de(e){this.src=e,this.g={},this.h=0}function pe(e,t){var n=t.type;if(n in e.g){var r,i=e.g[n],a=S(i,t);(r=0<=a)&&Array.prototype.splice.call(i,a,1),r&&(he(t),0==e.g[n].length&&(delete e.g[n],e.h--))}}function ve(e,t,n,r){for(var i=0;i<e.length;++i){var a=e[i];if(!a.ca&&a.listener==t&&a.capture==!!n&&a.ia==r)return i}return-1}de.prototype.add=function(e,t,n,r,i){var a=e.toString();(e=this.g[a])||(e=this.g[a]=[],this.h++);var o=ve(e,t,r,i);return-1<o?(t=e[o],n||(t.fa=!1)):((t=new fe(t,this.src,a,!!r,i)).fa=n,e.push(t)),t};var me="closure_lm_"+(1e6*Math.random()|0),ye={};function ge(e,t,n,r,i){if(r&&r.once)return ke(e,t,n,r,i);if(Array.isArray(t)){for(var a=0;a<t.length;a++)ge(e,t[a],n,r,i);return null}return n=Se(n),e&&e[ce]?e.N(t,n,y(r)?!!r.capture:!!r,i):be(e,t,n,!1,r,i)}function be(e,t,n,r,i,a){if(!t)throw Error("Invalid event type");var o=y(i)?!!i.capture:!!i,u=je(e);if(u||(e[me]=u=new de(e)),(n=u.add(t,n,r,o,a)).proxy)return n;if(r=function(){function e(n){return t.call(e.src,e.listener,n)}var t=_e;return e}(),n.proxy=r,r.src=e,r.listener=n,e.addEventListener)ae||(i=o),void 0===i&&(i=!1),e.addEventListener(t.toString(),r,i);else if(e.attachEvent)e.attachEvent(xe(t.toString()),r);else{if(!e.addListener||!e.removeListener)throw Error("addEventListener and attachEvent are unavailable.");e.addListener(r)}return n}function ke(e,t,n,r,i){if(Array.isArray(t)){for(var a=0;a<t.length;a++)ke(e,t[a],n,r,i);return null}return n=Se(n),e&&e[ce]?e.O(t,n,y(r)?!!r.capture:!!r,i):be(e,t,n,!0,r,i)}function we(e,t,n,r,i){if(Array.isArray(t))for(var a=0;a<t.length;a++)we(e,t[a],n,r,i);else r=y(r)?!!r.capture:!!r,n=Se(n),e&&e[ce]?(e=e.i,(t=String(t).toString())in e.g&&(-1<(n=ve(a=e.g[t],n,r,i))&&(he(a[n]),Array.prototype.splice.call(a,n,1),0==a.length&&(delete e.g[t],e.h--)))):e&&(e=je(e))&&(t=e.g[t.toString()],e=-1,t&&(e=ve(t,n,r,i)),(n=-1<e?t[e]:null)&&Oe(n))}function Oe(e){if("number"!==typeof e&&e&&!e.ca){var t=e.src;if(t&&t[ce])pe(t.i,e);else{var n=e.type,r=e.proxy;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent?t.detachEvent(xe(n),r):t.addListener&&t.removeListener&&t.removeListener(r),(n=je(t))?(pe(n,e),0==n.h&&(n.src=null,t[me]=null)):he(e)}}}function xe(e){return e in ye?ye[e]:ye[e]="on"+e}function _e(e,t){if(e.ca)e=!0;else{t=new ue(t,this);var n=e.listener,r=e.ia||e.src;e.fa&&Oe(e),e=n.call(r,t)}return e}function je(e){return(e=e[me])instanceof de?e:null}var Ee="__closure_events_fn_"+(1e9*Math.random()>>>0);function Se(e){return"function"===typeof e?e:(e[Ee]||(e[Ee]=function(t){return e.handleEvent(t)}),e[Ee])}function Te(){j.call(this),this.i=new de(this),this.P=this,this.I=null}function Ie(e,t){var n,r=e.I;if(r)for(n=[];r;r=r.I)n.push(r);if(e=e.P,r=t.type||t,"string"===typeof t)t=new oe(t,e);else if(t instanceof oe)t.target=t.target||e;else{var i=t;B(t=new oe(r,e),i)}if(i=!0,n)for(var a=n.length-1;0<=a;a--){var o=t.g=n[a];i=Ce(o,r,!0,t)&&i}if(i=Ce(o=t.g=e,r,!0,t)&&i,i=Ce(o,r,!1,t)&&i,n)for(a=0;a<n.length;a++)i=Ce(o=t.g=n[a],r,!1,t)&&i}function Ce(e,t,n,r){if(!(t=e.i.g[String(t)]))return!0;t=t.concat();for(var i=!0,a=0;a<t.length;++a){var o=t[a];if(o&&!o.ca&&o.capture==n){var u=o.listener,s=o.ia||o.src;o.fa&&pe(e.i,o),i=!1!==u.call(s,r)&&i}}return i&&!r.defaultPrevented}_(Te,j),Te.prototype[ce]=!0,Te.prototype.removeEventListener=function(e,t,n,r){we(this,e,t,n,r)},Te.prototype.M=function(){if(Te.Z.M.call(this),this.i){var e,t=this.i;for(e in t.g){for(var n=t.g[e],r=0;r<n.length;r++)he(n[r]);delete t.g[e],t.h--}}this.I=null},Te.prototype.N=function(e,t,n,r){return this.i.add(String(e),t,!1,n,r)},Te.prototype.O=function(e,t,n,r){return this.i.add(String(e),t,!0,n,r)};var Ae=p.JSON.stringify;function Re(){var e=Ve,t=null;return e.g&&(t=e.g,e.g=e.g.next,e.g||(e.h=null),t.next=null),t}var Ne,Pe=function(){function e(){Object(c.a)(this,e),this.h=this.g=null}return Object(l.a)(e,[{key:"add",value:function(e,t){var n=De.get();n.set(e,t),this.h?this.h.next=n:this.g=n,this.h=n}}]),e}(),De=new(function(){function e(t,n){Object(c.a)(this,e),this.i=t,this.j=n,this.h=0,this.g=null}return Object(l.a)(e,[{key:"get",value:function(){var e;return 0<this.h?(this.h--,e=this.g,this.g=e.next,e.next=null):e=this.i(),e}}]),e}())((function(){return new Le}),(function(e){return e.reset()})),Le=function(){function e(){Object(c.a)(this,e),this.next=this.g=this.h=null}return Object(l.a)(e,[{key:"set",value:function(e,t){this.h=e,this.g=t,this.next=null}},{key:"reset",value:function(){this.next=this.g=this.h=null}}]),e}();function Me(e){p.setTimeout((function(){throw e}),0)}function Fe(e,t){Ne||function(){var e=p.Promise.resolve(void 0);Ne=function(){e.then(Be)}}(),Ue||(Ne(),Ue=!0),Ve.add(e,t)}var Ue=!1,Ve=new Pe;function Be(){for(var e;e=Re();){try{e.h.call(e.g)}catch(n){Me(n)}var t=De;t.j(e),100>t.h&&(t.h++,e.next=t.g,t.g=e)}Ue=!1}function ze(e,t){Te.call(this),this.h=e||1,this.g=t||p,this.j=O(this.kb,this),this.l=Date.now()}function qe(e){e.da=!1,e.S&&(e.g.clearTimeout(e.S),e.S=null)}function We(e,t,n){if("function"===typeof e)n&&(e=O(e,n));else{if(!e||"function"!=typeof e.handleEvent)throw Error("Invalid listener argument");e=O(e.handleEvent,e)}return 2147483647<Number(t)?-1:p.setTimeout(e,t||0)}function He(e){e.g=We((function(){e.g=null,e.i&&(e.i=!1,He(e))}),e.j);var t=e.h;e.h=null,e.m.apply(null,t)}_(ze,Te),(r=ze.prototype).da=!1,r.S=null,r.kb=function(){if(this.da){var e=Date.now()-this.l;0<e&&e<.8*this.h?this.S=this.g.setTimeout(this.j,this.h-e):(this.S&&(this.g.clearTimeout(this.S),this.S=null),Ie(this,"tick"),this.da&&(qe(this),this.start()))}},r.start=function(){this.da=!0,this.S||(this.S=this.g.setTimeout(this.j,this.h),this.l=Date.now())},r.M=function(){ze.Z.M.call(this),qe(this),delete this.g};var Ke=function(e){Object(u.a)(n,e);var t=Object(s.a)(n);function n(e,r){var i;return Object(c.a)(this,n),(i=t.call(this)).m=e,i.j=r,i.h=null,i.i=!1,i.g=null,i}return Object(l.a)(n,[{key:"l",value:function(e){this.h=arguments,this.g?this.i=!0:He(this)}},{key:"M",value:function(){Object(a.a)(Object(o.a)(n.prototype),"M",this).call(this),this.g&&(p.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}]),n}(j);function Ge(e){j.call(this),this.h=e,this.g={}}_(Ge,j);var $e=[];function Qe(e,t,n,r){Array.isArray(n)||(n&&($e[0]=n.toString()),n=$e);for(var i=0;i<n.length;i++){var a=ge(t,n[i],r||e.handleEvent,!1,e.h||e);if(!a)break;e.g[a.key]=a}}function Ye(e){F(e.g,(function(e,t){this.g.hasOwnProperty(t)&&Oe(e)}),e),e.g={}}function Xe(){this.g=!0}function Je(e,t,n,r){e.info((function(){return"XMLHTTP TEXT ("+t+"): "+function(e,t){if(!e.g)return t;if(!t)return null;try{var n=JSON.parse(t);if(n)for(e=0;e<n.length;e++)if(Array.isArray(n[e])){var r=n[e];if(!(2>r.length)){var i=r[1];if(Array.isArray(i)&&!(1>i.length)){var a=i[0];if("noop"!=a&&"stop"!=a&&"close"!=a)for(var o=1;o<i.length;o++)i[o]=""}}}return Ae(n)}catch(u){return t}}(e,n)+(r?" "+r:"")}))}Ge.prototype.M=function(){Ge.Z.M.call(this),Ye(this)},Ge.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},Xe.prototype.Aa=function(){this.g=!1},Xe.prototype.info=function(){};var Ze={},et=null;function tt(){return et=et||new Te}function nt(e){oe.call(this,Ze.Ma,e)}function rt(e){var t=tt();Ie(t,new nt(t,e))}function it(e,t){oe.call(this,Ze.STAT_EVENT,e),this.stat=t}function at(e){var t=tt();Ie(t,new it(t,e))}function ot(e,t){oe.call(this,Ze.Na,e),this.size=t}function ut(e,t){if("function"!==typeof e)throw Error("Fn must not be null and must be a function");return p.setTimeout((function(){e()}),t)}Ze.Ma="serverreachability",_(nt,oe),Ze.STAT_EVENT="statevent",_(it,oe),Ze.Na="timingevent",_(ot,oe);var st={NO_ERROR:0,lb:1,yb:2,xb:3,sb:4,wb:5,zb:6,Ja:7,TIMEOUT:8,Cb:9},ct={qb:"complete",Mb:"success",Ka:"error",Ja:"abort",Eb:"ready",Fb:"readystatechange",TIMEOUT:"timeout",Ab:"incrementaldata",Db:"progress",tb:"downloadprogress",Ub:"uploadprogress"};function lt(){}function ft(e){return e.h||(e.h=e.i())}function ht(){}lt.prototype.h=null;var dt,pt={OPEN:"a",pb:"b",Ka:"c",Bb:"d"};function vt(){oe.call(this,"d")}function mt(){oe.call(this,"c")}function yt(){}function gt(e,t,n,r){this.l=e,this.j=t,this.m=n,this.X=r||1,this.V=new Ge(this),this.P=kt,e=G?125:void 0,this.W=new ze(e),this.H=null,this.i=!1,this.s=this.A=this.v=this.K=this.F=this.Y=this.B=null,this.D=[],this.g=null,this.C=0,this.o=this.u=null,this.N=-1,this.I=!1,this.O=0,this.L=null,this.aa=this.J=this.$=this.U=!1,this.h=new bt}function bt(){this.i=null,this.g="",this.h=!1}_(vt,oe),_(mt,oe),_(yt,lt),yt.prototype.g=function(){return new XMLHttpRequest},yt.prototype.i=function(){return{}},dt=new yt;var kt=45e3,wt={},Ot={};function xt(e,t,n){e.K=1,e.v=Kt(Vt(t)),e.s=n,e.U=!0,_t(e,null)}function _t(e,t){e.F=Date.now(),Tt(e),e.A=Vt(e.v);var n=e.A,r=e.X;Array.isArray(r)||(r=[String(r)]),on(n.h,"t",r),e.C=0,n=e.l.H,e.h=new bt,e.g=sr(e.l,n?t:null,!e.s),0<e.O&&(e.L=new Ke(O(e.Ia,e,e.g),e.O)),Qe(e.V,e.g,"readystatechange",e.gb),t=e.H?U(e.H):{},e.s?(e.u||(e.u="POST"),t["Content-Type"]="application/x-www-form-urlencoded",e.g.ea(e.A,e.u,e.s,t)):(e.u="GET",e.g.ea(e.A,e.u,null,t)),rt(1),function(e,t,n,r,i,a){e.info((function(){if(e.g)if(a)for(var o="",u=a.split("&"),s=0;s<u.length;s++){var c=u[s].split("=");if(1<c.length){var l=c[0];c=c[1];var f=l.split("_");o=2<=f.length&&"type"==f[1]?o+(l+"=")+c+"&":o+(l+"=redacted&")}}else o=null;else o=a;return"XMLHTTP REQ ("+r+") [attempt "+i+"]: "+t+"\n"+n+"\n"+o}))}(e.j,e.u,e.A,e.m,e.X,e.s)}function jt(e){return!!e.g&&("GET"==e.u&&2!=e.K&&e.l.Ba)}function Et(e,t,n){for(var r,i=!0;!e.I&&e.C<n.length;){if((r=St(e,n))==Ot){4==t&&(e.o=4,at(14),i=!1),Je(e.j,e.m,null,"[Incomplete Response]");break}if(r==wt){e.o=4,at(15),Je(e.j,e.m,n,"[Invalid Chunk]"),i=!1;break}Je(e.j,e.m,r,null),Nt(e,r)}jt(e)&&r!=Ot&&r!=wt&&(e.h.g="",e.C=0),4!=t||0!=n.length||e.h.h||(e.o=1,at(16),i=!1),e.i=e.i&&i,i?0<n.length&&!e.aa&&(e.aa=!0,(t=e.l).g==e&&t.$&&!t.L&&(t.h.info("Great, no buffering proxy detected. Bytes received: "+n.length),er(t),t.L=!0,at(11))):(Je(e.j,e.m,n,"[Invalid Chunked Response]"),Rt(e),At(e))}function St(e,t){var n=e.C,r=t.indexOf("\n",n);return-1==r?Ot:(n=Number(t.substring(n,r)),isNaN(n)?wt:(r+=1)+n>t.length?Ot:(t=t.substr(r,n),e.C=r+n,t))}function Tt(e){e.Y=Date.now()+e.P,It(e,e.P)}function It(e,t){if(null!=e.B)throw Error("WatchDog timer not null");e.B=ut(O(e.eb,e),t)}function Ct(e){e.B&&(p.clearTimeout(e.B),e.B=null)}function At(e){0==e.l.G||e.I||rr(e.l,e)}function Rt(e){Ct(e);var t=e.L;t&&"function"==typeof t.na&&t.na(),e.L=null,qe(e.W),Ye(e.V),e.g&&(t=e.g,e.g=null,t.abort(),t.na())}function Nt(e,t){try{var n=e.l;if(0!=n.G&&(n.g==e||pn(n.i,e)))if(n.I=e.N,!e.J&&pn(n.i,e)&&3==n.G){try{var r=n.Ca.g.parse(t)}catch(a){r=null}if(Array.isArray(r)&&3==r.length){var i=r;if(0==i[0]){e:if(!n.u){if(n.g){if(!(n.g.F+3e3<e.F))break e;nr(n),Hn(n)}Zn(n),at(18)}}else n.ta=i[1],0<n.ta-n.U&&37500>i[2]&&n.N&&0==n.A&&!n.v&&(n.v=ut(O(n.ab,n),6e3));if(1>=dn(n.i)&&n.ka){try{n.ka()}catch(a){}n.ka=void 0}}else ar(n,11)}else if((e.J||n.g==e)&&nr(n),!A(t))for(i=n.Ca.g.parse(t),t=0;t<i.length;t++){var a=i[t];if(n.U=a[0],a=a[1],2==n.G)if("c"==a[0]){n.J=a[1],n.la=a[2];var o=a[3];null!=o&&(n.ma=o,n.h.info("VER="+n.ma));var u=a[4];null!=u&&(n.za=u,n.h.info("SVER="+n.za));var s=a[5];null!=s&&"number"===typeof s&&0<s&&(r=1.5*s,n.K=r,n.h.info("backChannelRequestTimeoutMs_="+r)),r=n;var c=e.g;if(c){var l=c.g?c.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(l){var f=r.i;!f.g&&(P(l,"spdy")||P(l,"quic")||P(l,"h2"))&&(f.j=f.l,f.g=new Set,f.h&&(vn(f,f.h),f.h=null))}if(r.D){var h=c.g?c.g.getResponseHeader("X-HTTP-Session-Id"):null;h&&(r.sa=h,Ht(r.F,r.D,h))}}n.G=3,n.j&&n.j.xa(),n.$&&(n.O=Date.now()-e.F,n.h.info("Handshake RTT: "+n.O+"ms"));var d=e;if((r=n).oa=ur(r,r.H?r.la:null,r.W),d.J){mn(r.i,d);var p=d,v=r.K;v&&p.setTimeout(v),p.B&&(Ct(p),Tt(p)),r.g=d}else Jn(r);0<n.l.length&&$n(n)}else"stop"!=a[0]&&"close"!=a[0]||ar(n,7);else 3==n.G&&("stop"==a[0]||"close"==a[0]?"stop"==a[0]?ar(n,7):Wn(n):"noop"!=a[0]&&n.j&&n.j.wa(a),n.A=0)}rt(4)}catch(a){}}function Pt(e,t){if(e.forEach&&"function"==typeof e.forEach)e.forEach(t,void 0);else if(m(e)||"string"===typeof e)T(e,t,void 0);else{if(e.T&&"function"==typeof e.T)var n=e.T();else if(e.R&&"function"==typeof e.R)n=void 0;else if(m(e)||"string"===typeof e){n=[];for(var r=e.length,i=0;i<r;i++)n.push(i)}else for(i in n=[],r=0,e)n[r++]=i;r=function(e){if(e.R&&"function"==typeof e.R)return e.R();if("string"===typeof e)return e.split("");if(m(e)){for(var t=[],n=e.length,r=0;r<n;r++)t.push(e[r]);return t}for(r in t=[],n=0,e)t[n++]=e[r];return t}(e),i=r.length;for(var a=0;a<i;a++)t.call(void 0,r[a],n&&n[a],e)}}function Dt(e,t){this.h={},this.g=[],this.i=0;var n=arguments.length;if(1<n){if(n%2)throw Error("Uneven number of arguments");for(var r=0;r<n;r+=2)this.set(arguments[r],arguments[r+1])}else if(e)if(e instanceof Dt)for(n=e.T(),r=0;r<n.length;r++)this.set(n[r],e.get(n[r]));else for(r in e)this.set(r,e[r])}function Lt(e){if(e.i!=e.g.length){for(var t=0,n=0;t<e.g.length;){var r=e.g[t];Mt(e.h,r)&&(e.g[n++]=r),t++}e.g.length=n}if(e.i!=e.g.length){var i={};for(n=t=0;t<e.g.length;)Mt(i,r=e.g[t])||(e.g[n++]=r,i[r]=1),t++;e.g.length=n}}function Mt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}(r=gt.prototype).setTimeout=function(e){this.P=e},r.gb=function(e){e=e.target;var t=this.L;t&&3==Un(e)?t.l():this.Ia(e)},r.Ia=function(e){try{if(e==this.g)e:{var t=Un(this.g),n=this.g.Da(),r=this.g.ba();if(!(3>t)&&(3!=t||G||this.g&&(this.h.h||this.g.ga()||Vn(this.g)))){this.I||4!=t||7==n||rt(8==n||0>=r?3:2),Ct(this);var i=this.g.ba();this.N=i;t:if(jt(this)){var a=Vn(this.g);e="";var o=a.length,u=4==Un(this.g);if(!this.h.i){if("undefined"===typeof TextDecoder){Rt(this),At(this);var s="";break t}this.h.i=new p.TextDecoder}for(n=0;n<o;n++)this.h.h=!0,e+=this.h.i.decode(a[n],{stream:u&&n==o-1});a.splice(0,o),this.h.g+=e,this.C=0,s=this.h.g}else s=this.g.ga();if(this.i=200==i,function(e,t,n,r,i,a,o){e.info((function(){return"XMLHTTP RESP ("+r+") [ attempt "+i+"]: "+t+"\n"+n+"\n"+a+" "+o}))}(this.j,this.u,this.A,this.m,this.X,t,i),this.i){if(this.$&&!this.J){t:{if(this.g){var c,l=this.g;if((c=l.g?l.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!A(c)){var f=c;break t}}f=null}if(!(i=f)){this.i=!1,this.o=3,at(12),Rt(this),At(this);break e}Je(this.j,this.m,i,"Initial handshake response via X-HTTP-Initial-Response"),this.J=!0,Nt(this,i)}this.U?(Et(this,t,s),G&&this.i&&3==t&&(Qe(this.V,this.W,"tick",this.fb),this.W.start())):(Je(this.j,this.m,s,null),Nt(this,s)),4==t&&Rt(this),this.i&&!this.I&&(4==t?rr(this.l,this):(this.i=!1,Tt(this)))}else 400==i&&0<s.indexOf("Unknown SID")?(this.o=3,at(12)):(this.o=0,at(13)),Rt(this),At(this)}}}catch(t){}},r.fb=function(){if(this.g){var e=Un(this.g),t=this.g.ga();this.C<t.length&&(Ct(this),Et(this,e,t),this.i&&4!=e&&Tt(this))}},r.cancel=function(){this.I=!0,Rt(this)},r.eb=function(){this.B=null;var e=Date.now();0<=e-this.Y?(function(e,t){e.info((function(){return"TIMEOUT: "+t}))}(this.j,this.A),2!=this.K&&(rt(3),at(17)),Rt(this),this.o=2,At(this)):It(this,this.Y-e)},(r=Dt.prototype).R=function(){Lt(this);for(var e=[],t=0;t<this.g.length;t++)e.push(this.h[this.g[t]]);return e},r.T=function(){return Lt(this),this.g.concat()},r.get=function(e,t){return Mt(this.h,e)?this.h[e]:t},r.set=function(e,t){Mt(this.h,e)||(this.i++,this.g.push(e)),this.h[e]=t},r.forEach=function(e,t){for(var n=this.T(),r=0;r<n.length;r++){var i=n[r],a=this.get(i);e.call(t,a,i,this)}};var Ft=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function Ut(e,t){if(this.i=this.s=this.j="",this.m=null,this.o=this.l="",this.g=!1,e instanceof Ut){this.g=void 0!==t?t:e.g,Bt(this,e.j),this.s=e.s,zt(this,e.i),qt(this,e.m),this.l=e.l,t=e.h;var n=new tn;n.i=t.i,t.g&&(n.g=new Dt(t.g),n.h=t.h),Wt(this,n),this.o=e.o}else e&&(n=String(e).match(Ft))?(this.g=!!t,Bt(this,n[1]||"",!0),this.s=Gt(n[2]||""),zt(this,n[3]||"",!0),qt(this,n[4]),this.l=Gt(n[5]||"",!0),Wt(this,n[6]||"",!0),this.o=Gt(n[7]||"")):(this.g=!!t,this.h=new tn(null,this.g))}function Vt(e){return new Ut(e)}function Bt(e,t,n){e.j=n?Gt(t,!0):t,e.j&&(e.j=e.j.replace(/:$/,""))}function zt(e,t,n){e.i=n?Gt(t,!0):t}function qt(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.m=t}else e.m=null}function Wt(e,t,n){t instanceof tn?(e.h=t,function(e,t){t&&!e.j&&(nn(e),e.i=null,e.g.forEach((function(e,t){var n=t.toLowerCase();t!=n&&(rn(this,t),on(this,n,e))}),e)),e.j=t}(e.h,e.g)):(n||(t=$t(t,Zt)),e.h=new tn(t,e.g))}function Ht(e,t,n){e.h.set(t,n)}function Kt(e){return Ht(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),e}function Gt(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function $t(e,t,n){return"string"===typeof e?(e=encodeURI(e).replace(t,Qt),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function Qt(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}Ut.prototype.toString=function(){var e=[],t=this.j;t&&e.push($t(t,Yt,!0),":");var n=this.i;return(n||"file"==t)&&(e.push("//"),(t=this.s)&&e.push($t(t,Yt,!0),"@"),e.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.m)&&e.push(":",String(n))),(n=this.l)&&(this.i&&"/"!=n.charAt(0)&&e.push("/"),e.push($t(n,"/"==n.charAt(0)?Jt:Xt,!0))),(n=this.h.toString())&&e.push("?",n),(n=this.o)&&e.push("#",$t(n,en)),e.join("")};var Yt=/[#\/\?@]/g,Xt=/[#\?:]/g,Jt=/[#\?]/g,Zt=/[#\?@]/g,en=/#/g;function tn(e,t){this.h=this.g=null,this.i=e||null,this.j=!!t}function nn(e){e.g||(e.g=new Dt,e.h=0,e.i&&function(e,t){if(e){e=e.split("&");for(var n=0;n<e.length;n++){var r=e[n].indexOf("="),i=null;if(0<=r){var a=e[n].substring(0,r);i=e[n].substring(r+1)}else a=e[n];t(a,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(e.i,(function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)})))}function rn(e,t){nn(e),t=un(e,t),Mt(e.g.h,t)&&(e.i=null,e.h-=e.g.get(t).length,Mt((e=e.g).h,t)&&(delete e.h[t],e.i--,e.g.length>2*e.i&&Lt(e)))}function an(e,t){return nn(e),t=un(e,t),Mt(e.g.h,t)}function on(e,t,n){rn(e,t),0<n.length&&(e.i=null,e.g.set(un(e,t),C(n)),e.h+=n.length)}function un(e,t){return t=String(t),e.j&&(t=t.toLowerCase()),t}(r=tn.prototype).add=function(e,t){nn(this),this.i=null,e=un(this,e);var n=this.g.get(e);return n||this.g.set(e,n=[]),n.push(t),this.h+=1,this},r.forEach=function(e,t){nn(this),this.g.forEach((function(n,r){T(n,(function(n){e.call(t,n,r,this)}),this)}),this)},r.T=function(){nn(this);for(var e=this.g.R(),t=this.g.T(),n=[],r=0;r<t.length;r++)for(var i=e[r],a=0;a<i.length;a++)n.push(t[r]);return n},r.R=function(e){nn(this);var t=[];if("string"===typeof e)an(this,e)&&(t=I(t,this.g.get(un(this,e))));else{e=this.g.R();for(var n=0;n<e.length;n++)t=I(t,e[n])}return t},r.set=function(e,t){return nn(this),this.i=null,an(this,e=un(this,e))&&(this.h-=this.g.get(e).length),this.g.set(e,[t]),this.h+=1,this},r.get=function(e,t){return e&&0<(e=this.R(e)).length?String(e[0]):t},r.toString=function(){if(this.i)return this.i;if(!this.g)return"";for(var e=[],t=this.g.T(),n=0;n<t.length;n++){var r=t[n],i=encodeURIComponent(String(r));r=this.R(r);for(var a=0;a<r.length;a++){var o=i;""!==r[a]&&(o+="="+encodeURIComponent(String(r[a]))),e.push(o)}}return this.i=e.join("&")};var sn=function e(t,n){Object(c.a)(this,e),this.h=t,this.g=n};function cn(e){this.l=e||fn,p.PerformanceNavigationTiming?e=0<(e=p.performance.getEntriesByType("navigation")).length&&("hq"==e[0].nextHopProtocol||"h2"==e[0].nextHopProtocol):e=!!(p.g&&p.g.Ea&&p.g.Ea()&&p.g.Ea().Zb),this.j=e?this.l:1,this.g=null,1<this.j&&(this.g=new Set),this.h=null,this.i=[]}var ln,fn=10;function hn(e){return!!e.h||!!e.g&&e.g.size>=e.j}function dn(e){return e.h?1:e.g?e.g.size:0}function pn(e,t){return e.h?e.h==t:!!e.g&&e.g.has(t)}function vn(e,t){e.g?e.g.add(t):e.h=t}function mn(e,t){e.h&&e.h==t?e.h=null:e.g&&e.g.has(t)&&e.g.delete(t)}function yn(e){if(null!=e.h)return e.i.concat(e.h.D);if(null!=e.g&&0!==e.g.size){var t,n=e.i,r=Object(i.a)(e.g.values());try{for(r.s();!(t=r.n()).done;){var a=t.value;n=n.concat(a.D)}}catch(o){r.e(o)}finally{r.f()}return n}return C(e.i)}function gn(){}function bn(){this.g=new gn}function kn(e,t,n){var r=n||"";try{Pt(e,(function(e,n){var i=e;y(e)&&(i=Ae(e)),t.push(r+n+"="+encodeURIComponent(i))}))}catch(i){throw t.push(r+"type="+encodeURIComponent("_badmap")),i}}function wn(e,t,n,r,i){try{t.onload=null,t.onerror=null,t.onabort=null,t.ontimeout=null,i(r)}catch(a){}}function On(e){this.l=e.$b||null,this.j=e.ib||!1}function xn(e,t){Te.call(this),this.D=e,this.u=t,this.m=void 0,this.readyState=_n,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.v=new Headers,this.h=null,this.C="GET",this.B="",this.g=!1,this.A=this.j=this.l=null}cn.prototype.cancel=function(){if(this.i=yn(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){var e,t=Object(i.a)(this.g.values());try{for(t.s();!(e=t.n()).done;){e.value.cancel()}}catch(n){t.e(n)}finally{t.f()}this.g.clear()}},gn.prototype.stringify=function(e){return p.JSON.stringify(e,void 0)},gn.prototype.parse=function(e){return p.JSON.parse(e,void 0)},_(On,lt),On.prototype.g=function(){return new xn(this.l,this.j)},On.prototype.i=(ln={},function(){return ln}),_(xn,Te);var _n=0;function jn(e){e.j.read().then(e.Sa.bind(e)).catch(e.ha.bind(e))}function En(e){e.readyState=4,e.l=null,e.j=null,e.A=null,Sn(e)}function Sn(e){e.onreadystatechange&&e.onreadystatechange.call(e)}(r=xn.prototype).open=function(e,t){if(this.readyState!=_n)throw this.abort(),Error("Error reopening a connection");this.C=e,this.B=t,this.readyState=1,Sn(this)},r.send=function(e){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.g=!0;var t={headers:this.v,method:this.C,credentials:this.m,cache:void 0};e&&(t.body=e),(this.D||p).fetch(new Request(this.B,t)).then(this.Va.bind(this),this.ha.bind(this))},r.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted."),1<=this.readyState&&this.g&&4!=this.readyState&&(this.g=!1,En(this)),this.readyState=_n},r.Va=function(e){if(this.g&&(this.l=e,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=e.headers,this.readyState=2,Sn(this)),this.g&&(this.readyState=3,Sn(this),this.g)))if("arraybuffer"===this.responseType)e.arrayBuffer().then(this.Ta.bind(this),this.ha.bind(this));else if("undefined"!==typeof p.ReadableStream&&"body"in e){if(this.j=e.body.getReader(),this.u){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.A=new TextDecoder;jn(this)}else e.text().then(this.Ua.bind(this),this.ha.bind(this))},r.Sa=function(e){if(this.g){if(this.u&&e.value)this.response.push(e.value);else if(!this.u){var t=e.value?e.value:new Uint8Array(0);(t=this.A.decode(t,{stream:!e.done}))&&(this.response=this.responseText+=t)}e.done?En(this):Sn(this),3==this.readyState&&jn(this)}},r.Ua=function(e){this.g&&(this.response=this.responseText=e,En(this))},r.Ta=function(e){this.g&&(this.response=e,En(this))},r.ha=function(){this.g&&En(this)},r.setRequestHeader=function(e,t){this.v.append(e,t)},r.getResponseHeader=function(e){return this.h&&this.h.get(e.toLowerCase())||""},r.getAllResponseHeaders=function(){if(!this.h)return"";for(var e=[],t=this.h.entries(),n=t.next();!n.done;)n=n.value,e.push(n[0]+": "+n[1]),n=t.next();return e.join("\r\n")},Object.defineProperty(xn.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(e){this.m=e?"include":"same-origin"}});var Tn=p.JSON.parse;function In(e){Te.call(this),this.headers=new Dt,this.u=e||null,this.h=!1,this.C=this.g=null,this.H="",this.m=0,this.j="",this.l=this.F=this.v=this.D=!1,this.B=0,this.A=null,this.J=Cn,this.K=this.L=!1}_(In,Te);var Cn="",An=/^https?$/i,Rn=["POST","PUT"];function Nn(e){return"content-type"==e.toLowerCase()}function Pn(e,t){e.h=!1,e.g&&(e.l=!0,e.g.abort(),e.l=!1),e.j=t,e.m=5,Dn(e),Mn(e)}function Dn(e){e.D||(e.D=!0,Ie(e,"complete"),Ie(e,"error"))}function Ln(e){if(e.h&&"undefined"!=typeof d&&(!e.C[1]||4!=Un(e)||2!=e.ba()))if(e.v&&4==Un(e))We(e.Fa,0,e);else if(Ie(e,"readystatechange"),4==Un(e)){e.h=!1;try{var t,n=e.ba();e:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r=!0;break e;default:r=!1}if(!(t=r)){var i;if(i=0===n){var a=String(e.H).match(Ft)[1]||null;if(!a&&p.self&&p.self.location){var o=p.self.location.protocol;a=o.substr(0,o.length-1)}i=!An.test(a?a.toLowerCase():"")}t=i}if(t)Ie(e,"complete"),Ie(e,"success");else{e.m=6;try{var u=2<Un(e)?e.g.statusText:""}catch(s){u=""}e.j=u+" ["+e.ba()+"]",Dn(e)}}finally{Mn(e)}}}function Mn(e,t){if(e.g){Fn(e);var n=e.g,r=e.C[0]?v:null;e.g=null,e.C=null,t||Ie(e,"ready");try{n.onreadystatechange=r}catch(i){}}}function Fn(e){e.g&&e.K&&(e.g.ontimeout=null),e.A&&(p.clearTimeout(e.A),e.A=null)}function Un(e){return e.g?e.g.readyState:0}function Vn(e){try{if(!e.g)return null;if("response"in e.g)return e.g.response;switch(e.J){case Cn:case"text":return e.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in e.g)return e.g.mozResponseArrayBuffer}return null}catch(t){return null}}function Bn(e,t,n){e:{for(r in n){var r=!1;break e}r=!0}r||(n=function(e){var t="";return F(e,(function(e,n){t+=n,t+=":",t+=e,t+="\r\n"})),t}(n),"string"===typeof e?null!=n&&encodeURIComponent(String(n)):Ht(e,t,n))}function zn(e,t,n){return n&&n.internalChannelParams&&n.internalChannelParams[e]||t}function qn(e){this.za=0,this.l=[],this.h=new Xe,this.la=this.oa=this.F=this.W=this.g=this.sa=this.D=this.aa=this.o=this.P=this.s=null,this.Za=this.V=0,this.Xa=zn("failFast",!1,e),this.N=this.v=this.u=this.m=this.j=null,this.X=!0,this.I=this.ta=this.U=-1,this.Y=this.A=this.C=0,this.Pa=zn("baseRetryDelayMs",5e3,e),this.$a=zn("retryDelaySeedMs",1e4,e),this.Ya=zn("forwardChannelMaxRetries",2,e),this.ra=zn("forwardChannelRequestTimeoutMs",2e4,e),this.qa=e&&e.xmlHttpFactory||void 0,this.Ba=e&&e.Yb||!1,this.K=void 0,this.H=e&&e.supportsCrossDomainXhr||!1,this.J="",this.i=new cn(e&&e.concurrentRequestLimit),this.Ca=new bn,this.ja=e&&e.fastHandshake||!1,this.Ra=e&&e.Wb||!1,e&&e.Aa&&this.h.Aa(),e&&e.forceLongPolling&&(this.X=!1),this.$=!this.ja&&this.X&&e&&e.detectBufferingProxy||!1,this.ka=void 0,this.O=0,this.L=!1,this.B=null,this.Wa=!e||!1!==e.Xb}function Wn(e){if(Kn(e),3==e.G){var t=e.V++,n=Vt(e.F);Ht(n,"SID",e.J),Ht(n,"RID",t),Ht(n,"TYPE","terminate"),Yn(e,n),(t=new gt(e,e.h,t,void 0)).K=2,t.v=Kt(Vt(n)),n=!1,p.navigator&&p.navigator.sendBeacon&&(n=p.navigator.sendBeacon(t.v.toString(),"")),!n&&p.Image&&((new Image).src=t.v,n=!0),n||(t.g=sr(t.l,null),t.g.ea(t.v)),t.F=Date.now(),Tt(t)}or(e)}function Hn(e){e.g&&(er(e),e.g.cancel(),e.g=null)}function Kn(e){Hn(e),e.u&&(p.clearTimeout(e.u),e.u=null),nr(e),e.i.cancel(),e.m&&("number"===typeof e.m&&p.clearTimeout(e.m),e.m=null)}function Gn(e,t){e.l.push(new sn(e.Za++,t)),3==e.G&&$n(e)}function $n(e){hn(e.i)||e.m||(e.m=!0,Fe(e.Ha,e),e.C=0)}function Qn(e,t){var n;n=t?t.m:e.V++;var r=Vt(e.F);Ht(r,"SID",e.J),Ht(r,"RID",n),Ht(r,"AID",e.U),Yn(e,r),e.o&&e.s&&Bn(r,e.o,e.s),n=new gt(e,e.h,n,e.C+1),null===e.o&&(n.H=e.s),t&&(e.l=t.D.concat(e.l)),t=Xn(e,n,1e3),n.setTimeout(
2Math.round(.5*e.ra)+Math.round(.5*e.ra*Math.random())),vn(e.i,n),xt(n,r,t)}function Yn(e,t){e.j&&Pt({},(function(e,n){Ht(t,n,e)}))}function Xn(e,t,n){n=Math.min(e.l.length,n);var r=e.j?O(e.j.Oa,e.j,e):null;e:for(var i=e.l,a=-1;;){var o=["count="+n];-1==a?0<n?(a=i[0].h,o.push("ofs="+a)):a=0:o.push("ofs="+a);for(var u=!0,s=0;s<n;s++){var c=i[s].h,l=i[s].g;if(0>(c-=a))a=Math.max(0,i[s].h-100),u=!1;else try{kn(l,o,"req"+c+"_")}catch(f){r&&r(l)}}if(u){r=o.join("&");break e}}return e=e.l.splice(0,n),t.D=e,r}function Jn(e){e.g||e.u||(e.Y=1,Fe(e.Ga,e),e.A=0)}function Zn(e){return!(e.g||e.u||3<=e.A)&&(e.Y++,e.u=ut(O(e.Ga,e),ir(e,e.A)),e.A++,!0)}function er(e){null!=e.B&&(p.clearTimeout(e.B),e.B=null)}function tr(e){e.g=new gt(e,e.h,"rpc",e.Y),null===e.o&&(e.g.H=e.s),e.g.O=0;var t=Vt(e.oa);Ht(t,"RID","rpc"),Ht(t,"SID",e.J),Ht(t,"CI",e.N?"0":"1"),Ht(t,"AID",e.U),Yn(e,t),Ht(t,"TYPE","xmlhttp"),e.o&&e.s&&Bn(t,e.o,e.s),e.K&&e.g.setTimeout(e.K);var n=e.g;e=e.la,n.K=1,n.v=Kt(Vt(t)),n.s=null,n.U=!0,_t(n,e)}function nr(e){null!=e.v&&(p.clearTimeout(e.v),e.v=null)}function rr(e,t){var n=null;if(e.g==t){nr(e),er(e),e.g=null;var r=2}else{if(!pn(e.i,t))return;n=t.D,mn(e.i,t),r=1}if(e.I=t.N,0!=e.G)if(t.i)if(1==r){n=t.s?t.s.length:0,t=Date.now()-t.F;var i=e.C;Ie(r=tt(),new ot(r,n,t,i)),$n(e)}else Jn(e);else if(3==(i=t.o)||0==i&&0<e.I||!(1==r&&function(e,t){return!(dn(e.i)>=e.i.j-(e.m?1:0))&&(e.m?(e.l=t.D.concat(e.l),!0):!(1==e.G||2==e.G||e.C>=(e.Xa?0:e.Ya))&&(e.m=ut(O(e.Ha,e,t),ir(e,e.C)),e.C++,!0))}(e,t)||2==r&&Zn(e)))switch(n&&0<n.length&&(t=e.i,t.i=t.i.concat(n)),i){case 1:ar(e,5);break;case 4:ar(e,10);break;case 3:ar(e,6);break;default:ar(e,2)}}function ir(e,t){var n=e.Pa+Math.floor(Math.random()*e.$a);return e.j||(n*=2),n*t}function ar(e,t){if(e.h.info("Error code "+t),2==t){var n=null;e.j&&(n=null);var r=O(e.jb,e);n||(n=new Ut("//www.google.com/images/cleardot.gif"),p.location&&"http"==p.location.protocol||Bt(n,"https"),Kt(n)),function(e,t){var n=new Xe;if(p.Image){var r=new Image;r.onload=x(wn,n,r,"TestLoadImage: loaded",!0,t),r.onerror=x(wn,n,r,"TestLoadImage: error",!1,t),r.onabort=x(wn,n,r,"TestLoadImage: abort",!1,t),r.ontimeout=x(wn,n,r,"TestLoadImage: timeout",!1,t),p.setTimeout((function(){r.ontimeout&&r.ontimeout()}),1e4),r.src=e}else t(!1)}(n.toString(),r)}else at(2);e.G=0,e.j&&e.j.va(t),or(e),Kn(e)}function or(e){e.G=0,e.I=-1,e.j&&(0==yn(e.i).length&&0==e.l.length||(e.i.i.length=0,C(e.l),e.l.length=0),e.j.ua())}function ur(e,t,n){var r=function(e){return e instanceof Ut?Vt(e):new Ut(e,void 0)}(n);if(""!=r.i)t&&zt(r,t+"."+r.i),qt(r,r.m);else{var i=p.location;r=function(e,t,n,r){var i=new Ut(null,void 0);return e&&Bt(i,e),t&&zt(i,t),n&&qt(i,n),r&&(i.l=r),i}(i.protocol,t?t+"."+i.hostname:i.hostname,+i.port,n)}return e.aa&&F(e.aa,(function(e,t){Ht(r,t,e)})),t=e.D,n=e.sa,t&&n&&Ht(r,t,n),Ht(r,"VER",e.ma),Yn(e,r),r}function sr(e,t,n){if(t&&!e.H)throw Error("Can't create secondary domain capable XhrIo object.");return(t=n&&e.Ba&&!e.qa?new In(new On({ib:!0})):new In(e.qa)).L=e.H,t}function cr(){}function lr(){if(H&&!(10<=Number(ie)))throw Error("Environmental error: no available transport.")}function fr(e,t){Te.call(this),this.g=new qn(t),this.l=e,this.h=t&&t.messageUrlParams||null,e=t&&t.messageHeaders||null,t&&t.clientProtocolHeaderRequired&&(e?e["X-Client-Protocol"]="webchannel":e={"X-Client-Protocol":"webchannel"}),this.g.s=e,e=t&&t.initMessageHeaders||null,t&&t.messageContentType&&(e?e["X-WebChannel-Content-Type"]=t.messageContentType:e={"X-WebChannel-Content-Type":t.messageContentType}),t&&t.ya&&(e?e["X-WebChannel-Client-Profile"]=t.ya:e={"X-WebChannel-Client-Profile":t.ya}),this.g.P=e,(e=t&&t.httpHeadersOverwriteParam)&&!A(e)&&(this.g.o=e),this.A=t&&t.supportsCrossDomainXhr||!1,this.v=t&&t.sendRawJson||!1,(t=t&&t.httpSessionIdParam)&&!A(t)&&(this.g.D=t,null!==(e=this.h)&&t in e&&(t in(e=this.h)&&delete e[t])),this.j=new pr(this)}function hr(e){vt.call(this);var t=e.__sm__;if(t){e:{for(var n in t){e=n;break e}e=void 0}(this.i=e)&&(e=this.i,t=null!==t&&e in t?t[e]:void 0),this.data=t}else this.data=e}function dr(){mt.call(this),this.status=1}function pr(e){this.g=e}(r=In.prototype).ea=function(e,t,n,r){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.H+"; newUri="+e);t=t?t.toUpperCase():"GET",this.H=e,this.j="",this.m=0,this.D=!1,this.h=!0,this.g=this.u?this.u.g():dt.g(),this.C=this.u?ft(this.u):ft(dt),this.g.onreadystatechange=O(this.Fa,this);try{this.F=!0,this.g.open(t,String(e),!0),this.F=!1}catch(a){return void Pn(this,a)}e=n||"";var i=new Dt(this.headers);r&&Pt(r,(function(e,t){i.set(t,e)})),r=function(e){e:{for(var t=Nn,n=e.length,r="string"===typeof e?e.split(""):e,i=0;i<n;i++)if(i in r&&t.call(void 0,r[i],i,e)){t=i;break e}t=-1}return 0>t?null:"string"===typeof e?e.charAt(t):e[t]}(i.T()),n=p.FormData&&e instanceof p.FormData,!(0<=S(Rn,t))||r||n||i.set("Content-Type","application/x-www-form-urlencoded;
2charset=utf-8"),i.forEach((function(e,t){this.g.setRequestHeader(t,e)}),this),this.J&&(this.g.responseType=this.J),"withCredentials"in this.g&&this.g.withCredentials!==this.L&&(this.g.withCredentials=this.L);try{Fn(this),0<this.B&&((this.K=function(e){return H&&ne()&&"number"===typeof e.timeout&&void 0!==e.ontimeout}(this.g))?(this.g.timeout=this.B,this.g.ontimeout=O(this.pa,this)):this.A=We(this.pa,this.B,this)),this.v=!0,this.g.send(e),this.v=!1}catch(a){Pn(this,a)}},r.pa=function(){"undefined"!=typeof d&&this.g&&(this.j="Timed out after "+this.B+"ms, aborting",this.m=8,Ie(this,"timeout"),this.abort(8))},r.abort=function(e){this.g&&this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1,this.m=e||7,Ie(this,"complete"),Ie(this,"abort"),Mn(this))},r.M=function(){this.g&&(this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1),Mn(this,!0)),In.Z.M.call(this)},r.Fa=function(){this.s||(this.F||this.v||this.l?Ln(this):this.cb())},r.cb=function(){Ln(this)},r.ba=function(){try{return 2<Un(this)?this.g.status:-1}catch(ln){return-1}},r.ga=function(){try{return this.g?this.g.responseText:""}catch(ln){return""}},r.Qa=function(e){if(this.g){var t=this.g.responseText;return e&&0==t.indexOf(e)&&(t=t.substring(e.length)),Tn(t)}},r.Da=function(){return this.m},r.La=function(){return"string"===typeof this.j?this.j:String(this.j)},(r=qn.prototype).ma=8,r.G=1,r.hb=function(e){try{this.h.info("Origin Trials invoked: "+e)}catch(t){}},r.Ha=function(e){if(this.m)if(this.m=null,1==this.G){if(!e){this.V=Math.floor(1e5*Math.random()),e=this.V++;var t=new gt(this,this.h,e,void 0),n=this.s;if(this.P&&(n?B(n=U(n),this.P):n=this.P),null===this.o&&(t.H=n),this.ja)e:{for(var r=0,i=0;i<this.l.length;i++){var a=this.l[i];if(void 0===(a="__data__"in a.g&&"string"===typeof(a=a.g.__data__)?a.length:void 0))break;if(4096<(r+=a)){r=i;break e}if(4096===r||i===this.l.length-1){r=i+1;break e}}r=1e3}else r=1e3;r=Xn(this,t,r),Ht(i=Vt(this.F),"RID",e),Ht(i,"CVER",22),this.D&&Ht(i,"X-HTTP-Session-Id",this.D),Yn(this,i),this.o&&n&&Bn(i,this.o,n),vn(this.i,t),this.Ra&&Ht(i,"TYPE","init"),this.ja?(Ht(i,"$req",r),Ht(i,"SID","null"),t.$=!0,xt(t,i,null)):xt(t,i,r),this.G=2}}else 3==this.G&&(e?Qn(this,e):0==this.l.length||hn(this.i)||Qn(this))},r.Ga=function(){if(this.u=null,tr(this),this.$&&!(this.L||null==this.g||0>=this.O)){var e=2*this.O;this.h.info("BP detection timer enabled: "+e),this.B=ut(O(this.bb,this),e)}},r.bb=function(){this.B&&(this.B=null,this.h.info("BP detection timeout reached."),this.h.info("Buffering proxy detected and switch to long-polling!"),this.N=!1,this.L=!0,at(10),Hn(this),tr(this))},r.ab=function(){null!=this.v&&(this.v=null,Hn(this),Zn(this),at(19))},r.jb=function(e){e?(this.h.info("Successfully pinged google.com"),at(2)):(this.h.info("Failed to ping google.com"),at(1))},(r=cr.prototype).xa=function(){}
2,r.wa=function(){},r.va=function(){},r.ua=function(){},r.Oa=function(){},lr.prototype.g=function(e,t){return new fr(e,t)},_(fr,Te),fr.prototype.m=function(){this.g.j=this.j,this.A&&(this.g.H=!0);var e=this.g,t=this.l,n=this.h||void 0;e.Wa&&(e.h.info("Origin Trials enabled."),Fe(O(e.hb,e,t))),at(0),e.W=t,e.aa=n||{},e.N=e.X,e.F=ur(e,null,e.W),$n(e)},fr.prototype.close=function(){Wn(this.g)},fr.prototype.u=function(e){if("string"===typeof e){var t={};t.__data__=e,Gn(this.g,t)}else this.v?((t={}).__data__=Ae(e),Gn(this.g,t)):Gn(this.g,e)},fr.prototype.M=function(){this.g.j=null,delete this.j,Wn(this.g),delete this.g,fr.Z.M.call(this)},_(hr,vt),_(dr,mt),_(pr,cr),pr.prototype.xa=function(){Ie(this.g,"a")},pr.prototype.wa=function(e){Ie(this.g,new hr(e))},pr.prototype.va=function(e){Ie(this.g,new dr(e))},pr.prototype.ua=function(){Ie(this.g,"b")},lr.prototype.createWebChannel=lr.prototype.g,fr.prototype.send=fr.prototype.u,fr.prototype.open=fr.prototype.m,fr.prototype.close=fr.prototype.close,st.NO_ERROR=0,st.TIMEOUT=8,st.HTTP_ERROR=6,ct.COMPLETE="complete",ht.EventType=pt,pt.OPEN="a",pt.CLOSE="b",pt.ERROR="c",pt.MESSAGE="d",Te.prototype.listen=Te.prototype.N,In.prototype.listenOnce=In.prototype.O,In.prototype.getLastError=In.prototype.La,In.prototype.getLastErrorCode=In.prototype.Da,In.prototype.getStatus=In.prototype.ba,In.prototype.getResponseJson=In.prototype.Qa,In.prototype.getResponseText=In.prototype.ga,In.prototype.send=In.prototype.ea;var vr=h.createWebChannelTransport=function(){return new lr},mr=h.getStatEventTarget=function(){return tt()},yr=h.ErrorCode=st,gr=h.EventType=ct,br=h.Event=Ze,kr=h.Stat={rb:0,ub:1,vb:2,Ob:3,Tb:4,Qb:5,Rb:6,Pb:7,Nb:8,Sb:9,PROXY:10,NOPROXY:11,Lb:12,Hb:13,Ib:14,Gb:15,Jb:16,Kb:17,nb:18,mb:19,ob:20},wr=h.FetchXmlHttpFactory=On,Or=h.WebChannel=ht,xr=h.XhrIo=In}).call(this,n(74))},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(114),i=(n(1),n(62));function a(){return Object(r.a)()||i.a}},function(e,t,n){"use strict";n.d(t,"a",(function(){return x})),n.d(t,"b",(function(){return I})),n.d(t,"d",(function(){return A})),n.d(t,"c",(function(){return v})),n.d(t,"f",(function(){return m})),n.d(t,"e",(function(){return p}));var r=n(7);function i(e){return"/"===e.charAt(0)}function a(e,t){for(var n=t,r=n+1,i=e.length;r<i;n+=1,r+=1)e[n]=e[r];e.pop()}var o=function(e,t){void 0===t&&(t="");var n,r=e&&e.split("/")||[],o=t&&t.split("/")||[],u=e&&i(e),s=t&&i(t),c=u||s;if(e&&i(e)?o=r:r.length&&(o.pop(),o=o.concat(r)),!o.length)return"/";if(o.length){var l=o[o.length-1];n="."===l||".."===l||""===l}else n=!1;for(var f=0,h=o.length;h>=0;h--){var d=o[h];"."===d?a(o,h):".."===d?(a(o,h),f++):f&&(a(o,h),f--)}if(!c)for(;f--;f)o.unshift("..");!c||""===o[0]||o[0]&&i(o[0])||o.unshift("");var p=o.join("/");return n&&"/"!==p.substr(-1)&&(p+="/"),p};function u(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var s=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"===typeof t||"object"===typeof n){var r=u(t),i=u(n);return r!==t||i!==n?e(r,i):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},c=n(40);function l(e){return"/"===e.charAt(0)?e:"/"+e}function f(e){return"/"===e.charAt(0)?e.substr(1):e}function h(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function p(e){var t=e.pathname,n=e.search,r=e.hash,i=t||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}function v(e,t,n,i){var a;"string"===typeof e?(a=function(e){var t=e||"/",n="",r="",i=t.indexOf("#");-1!==i&&(r=t.substr(i),t=t.substr(0,i));var a=t.indexOf("?");return-1!==a&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),a.state=t):(void 0===(a=Object(r.a)({},e)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==t&&void 0===a.state&&(a.state=t));try{a.pathname=decodeURI(a.pathname)}catch(u){throw u instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invali
2d percent-encoding.'):u}return n&&(a.key=n),i?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=o(a.pathname,i.pathname)):a.pathname=i.pathname:a.pathname||(a.pathname="/"),a}function m(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&s(e.state,t.state)}function y(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,i){if(null!=e){var a="function"===typeof e?e(t,n):e;"string"===typeof a?"function"===typeof r?r(a,i):i(!0):i(!1!==a)}else i(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}}var g=!("undefined"===typeof window||!window.document||!window.document.createElement);function b(e,t){t(window.confirm(e))}var k="popstate",w="hashchange";function O(){try{return window.history.state||{}}catch(e){return{}}}function x(e){void 0===e&&(e={}),g||Object(c.a)(!1);var t=window.history,n=function(){var e=window.navigator.userAgent;return(-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history}(),i=!(-1===window.navigator.userAgent.indexOf("Trident")),a=e,o=a.forceRefresh,u=void 0!==o&&o,s=a.getUserConfirmation,f=void 0===s?b:s,m=a.keyLength,x=void 0===m?6:m,_=e.basename?d(l(e.basename)):"";function j(e){var t=e||{},n=t.key,r=t.state,i=window.location,a=i.pathname+i.search+i.hash;return _&&(a=h(a,_)),v(a,r,n)}function E(){return Math.random().toString(36).substr(2,x)}var S=y();function T(e){Object(r.a)(V,e),V.length=t.length,S.notifyListeners(V.location,V.action)}function I(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||R(j(e.state))}function C(){R(j(O()))}var A=!1;function R(e){if(A)A=!1,T();else{S.confirmTransitionTo(e,"POP",f,(function(t){t?T({action:"POP",location:e}):function(e){var t=V.location,n=P.indexOf(t.key);-1===n&&(n=0);var r=P.indexOf(e.key);-1===r&&(r=0);var i=n-r;i&&(A=!0,L(i))}(e)}))}}var N=j(O()),P=[N.key];function D(e){return _+p(e)}function L(e){t.go(e)}var M=0;function F(e){1===(M+=e)&&1===e?(window.addEventListener(k,I),i&&window.addEventListener(w,C)):0===M&&(window.removeEventListener(k,I),i&&window.removeEventListener(w,C))}var U=!1;var V={length:t.length,action:"POP",location:N,createHref:D,push:function(e,r){var i="PUSH",a=v(e,r,E(),V.location);S.confirmTransitionTo(a,i,f,(function(e){if(e){var r=D(a),o=a.key,s=a.state;if(n)if(t.pushState({key:o,state:s},null,r),u)window.location.href=r;else{var c=P.indexOf(V.location.key),l=P.slice(0,c+1);l.push(a.key),P=l,T({action:i,location:a})}else window.location.href=r}}))},replace:function(e,r){var i="REPLACE",a=v(e,r,E(),V.location);S.confirmTransitionTo(a,i,f,(function(e){if(e){var r=D(a),o=a.key,s=a.state;if(n)if(t.replaceState({key:o,state:s},null,r),u)window.location.replace(r);else{var c=P.indexOf(V.location.key);-1!==c&&(P[c]=a.key),T({action:i,location:a})}else window.location.replace(r)}}))},go:L,goBack:function(){L(-1)},goForward:function(){L(1)},block:function(e){void 0===e&&(e=!1);var t=S.setPrompt(e);return U||(F(1),U=!0),function(){return U&&(U=!1,F(-1)),t()}},listen:function(e){var t=S.appendListener(e);return F(1),function(){F(-1),t()}}};return V}var _="hashchange",j={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+f(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:f,decodePath:l},slash:{encodePath:l,decodePath:l}};function E(e){var t=e.indexOf("#");return-1===t?e:e.slice(0,t)}function S(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}function T(e){window.location.replace(E(window.location.href)+"#"+e)}function I(e){void 0===e&&(e={}),g||Object(c.a)(!1);var t=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),e),i=n.getUserConfirmation,a=void 0===i?b:i,o=n.hashType,u=void 0===o?"slash":o,s=e.basename?d(l(e.basename)):"",f=j[u],m=f.encodePath,k=f.decodePath;function w(){var e=k(S());return s&&(e=h(e,s)),v(e)}var O=y();function x(e){Object(r.a)(V,e),V.length=t.length,O.notifyListeners(V.location,V.action)}var I=!1,C=null;function A(){var e,t,n=S(),r=m(n);if(n!==r)T(r);else{var i=w(),o=V.location;if(!I&&(t=i,(e=o).pathname===t.pathname&&e.search===t.search&&e.hash===t.hash))return;
2if(C===p(i))return;C=null,function(e){if(I)I=!1,x();else{var t="POP";O.confirmTransitionTo(e,t,a,(function(n){n?x({action:t,location:e}):function(e){var t=V.location,n=D.lastIndexOf(p(t));-1===n&&(n=0);var r=D.lastIndexOf(p(e));-1===r&&(r=0);var i=n-r;i&&(I=!0,L(i))}(e)}))}}(i)}}var R=S(),N=m(R);R!==N&&T(N);var P=w(),D=[p(P)];function L(e){t.go(e)}var M=0;function F(e){1===(M+=e)&&1===e?window.addEventListener(_,A):0===M&&window.removeEventListener(_,A)}var U=!1;var V={length:t.length,action:"POP",location:P,createHref:function(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&(n=E(window.location.href)),n+"#"+m(s+p(e))},push:function(e,t){var n="PUSH",r=v(e,void 0,void 0,V.location);O.confirmTransitionTo(r,n,a,(function(e){if(e){var t=p(r),i=m(s+t);if(S()!==i){C=t,function(e){window.location.hash=e}(i);var a=D.lastIndexOf(p(V.location)),o=D.slice(0,a+1);o.push(t),D=o,x({action:n,location:r})}else x()}}))},replace:function(e,t){var n="REPLACE",r=v(e,void 0,void 0,V.location);O.confirmTransitionTo(r,n,a,(function(e){if(e){var t=p(r),i=m(s+t);S()!==i&&(C=t,T(i));var a=D.indexOf(p(V.location));-1!==a&&(D[a]=t),x({action:n,location:r})}}))},go:L,goBack:function(){L(-1)},goForward:function(){L(1)},block:function(e){void 0===e&&(e=!1);var t=O.setPrompt(e);return U||(F(1),U=!0),function(){return U&&(U=!1,F(-1)),t()}},listen:function(e){var t=O.appendListener(e);return F(1),function(){F(-1),t()}}};return V}function C(e,t,n){return Math.min(Math.max(e,t),n)}function A(e){void 0===e&&(e={});var t=e,n=t.getUserConfirmation,i=t.initialEntries,a=void 0===i?["/"]:i,o=t.initialIndex,u=void 0===o?0:o,s=t.keyLength,c=void 0===s?6:s,l=y();function f(e){Object(r.a)(k,e),k.length=k.entries.length,l.notifyListeners(k.location,k.action)}function h(){return Math.random().toString(36).substr(2,c)}var d=C(u,0,a.length-1),m=a.map((function(e){return v(e,void 0,"string"===typeof e?h():e.key||h())})),g=p;function b(e){var t=C(k.index+e,0,k.entries.length-1),r=k.entries[t];l.confirmTransitionTo(r,"POP",n,(function(e){e?f({action:"POP",location:r,index:t}):f()}))}var k={length:m.length,action:"POP",location:m[d],index:d,entries:m,createHref:g,push:function(e,t){var r="PUSH",i=v(e,t,h(),k.location);l.confirmTransitionTo(i,r,n,(function(e){if(e){var t=k.index+1,n=k.entries.slice(0);n.length>t?n.splice(t,n.length-t,i):n.push(i),f({action:r,location:i,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",i=v(e,t,h(),k.location);l.confirmTransitionTo(i,r,n,(function(e){e&&(k.entries[k.index]=i,f({action:r,location:i}))}))},go:b,goBack:function(){b(-1)},goForward:function(){b(1)},canGo:function(e){var t=k.index+e;return t>=0&&t<k.entries.length},block:function(e){return void 0===e&&(e=!1),l.setPrompt(e)},listen:function(e){return l.appendListener(e)}};return k}},,function(e,t,n){"use strict";var r="Invariant failed";t.a=function(e,t){if(!e)throw new Error(r)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r,i=n(6),a=n(2),o=n(4),u=n(8),s=n(26),c=n(18),l=n(33),f=function(){function e(t,n){var r=this;Object(a.a)(this,e),this._delegate=t,this.firebase=n,Object(c._addComponent)(t,new s.a("app-compat",(function(){return r}),"PUBLIC")),this.container=t.container}return Object(o.a)(e,[{key:"automaticDataCollectionEnabled",get:function(){return this._delegate.automaticDataCollectionEnabled},set:function(e){this._delegate.automaticDataCollectionEnabled=e}},{key:"name",get:function(){return this._delegate.name}},{key:"options",get:function(){return this._delegate.options}},{key:"delete",value:function(){var e=this;return new Promise((function(t){e._delegate.checkDestroyed(),t()})).then((function(){return e.firebase.INTERNAL.removeApp(e.name),Object(c.deleteApp)(e._delegate)}))}},{key:"_getService",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c._DEFAULT_ENTRY_NAME;this._delegate.checkDestroyed();var r=this._delegate.container.getProvider(e);return r.isInitialized()||"EXPLICIT"!==(null===(t=r.getComponent())||void 0===t?void 0:t.instantiationMode)||r.initialize(),r.getImmediate({identifier:n})}},{key:"_removeServiceInstance",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c._DEFAULT_ENTRY_NAME;
2this._delegate.container.getProvider(e).clearInstance(t)}},{key:"_addComponent",value:function(e){Object(c._addComponent)(this._delegate,e)}},{key:"_addOrOverwriteComponent",value:function(e){Object(c._addOrOverwriteComponent)(this._delegate,e)}},{key:"toJSON",value:function(){return{name:this.name,automaticDataCollectionEnabled:this.automaticDataCollectionEnabled,options:this.options}}}]),e}(),h=(r={},Object(i.a)(r,"no-app","No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()"),Object(i.a)(r,"invalid-app-argument","firebase.{$appName}() takes either no argument or a Firebase App instance."),r),d=new u.b("app-compat","Firebase",h);var p=function e(){var t=function(e){var t={},n={__esModule:!0,initializeApp:function(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=c.initializeApp(r,i);if(Object(u.f)(t,a.name))return t[a.name];var o=new e(a,n);return t[a.name]=o,o},app:r,registerVersion:c.registerVersion,setLogLevel:c.setLogLevel,onLog:c.onLog,apps:null,SDK_VERSION:c.SDK_VERSION,INTERNAL:{registerComponent:function(t){var i=t.name,a=i.replace("-compat","");if(c._registerComponent(t)&&"PUBLIC"===t.type){var o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r();if("function"!==typeof e[a])throw d.create("invalid-app-argument",{appName:i});return e[a]()};void 0!==t.serviceProps&&Object(u.j)(o,t.serviceProps),n[a]=o,e.prototype[a]=function(){for(var e=this._getService.bind(this,i),n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return e.apply(this,t.multipleInstances?r:[])}}return"PUBLIC"===t.type?n[a]:null},removeApp:function(e){delete t[e]},useAsService:function(e,t){return"serverAuth"===t?null:t},modularAPIs:c}};function r(e){if(e=e||c._DEFAULT_ENTRY_NAME,!Object(u.f)(t,e))throw d.create("no-app",{appName:e});return t[e]}return n.default=n,Object.defineProperty(n,"apps",{get:function(){return Object.keys(t).map((function(e){return t[e]}))}}),r.App=e,n}(f);return t.INTERNAL=Object.assign(Object.assign({},t.INTERNAL),{createFirebaseNamespace:e,extendNamespace:function(e){Object(u.j)(t,e)},createSubscribe:u.h,ErrorFactory:u.b,deepExtend:u.j}),t}(),v=new l.b("@firebase/app-compat");if(Object(u.n)()&&void 0!==self.firebase){v.warn("\n    Warning: Firebase is already defined in the global scope. Please make sure\n    Firebase library is only loaded once.\n  ");var m=self.firebase.SDK_VERSION;m&&m.indexOf("LITE")>=0&&v.warn("\n    Warning: You are trying to load Firebase while using Firebase Performance standalone script.\n    You should load Firebase Performance with this instance of Firebase to avoid loading duplicate code.\n    ")}var y,g=p;Object(c.registerVersion)("@firebase/app-compat","0.1.26",y)},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(1),i="undefined"!==typeof window?r.useLayoutEffect:r.useEffect;function a(e){var t=r.useRef(e);return i((function(){t.current=e})),r.useCallback((function(){return t.current.apply(void 0,arguments)}),[])}},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){e.exports=n(126)()},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return o}));var r=n(7),i=n(14),a=["xs","sm","md","lg","xl"];function o(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,o=e.unit,u=void 0===o?"px":o,s=e.step,c=void 0===s?5:s,l=Object(i.a)(e,["values","unit","step"]);function f(e){var t="number"===typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(u,")")}function h(e,t){var r=a.indexOf(t);return r===a.length-1?f(e):"@media (min-width:".concat("number"===typeof n[e]?n[e]:e).concat(u,") and ")+"(max-width:".concat((-1!==r&&"number"===typeof n[a[r+1]]?n[a[r+1]]:t)-c/100).concat(u,")")}return Object(r.a)({keys:a,values:n,up:f,down:function(e){var t=a.indexOf(e)+1,r=n[a[t]];return t===a.length?f("xs"):"@media (max-width:".concat(("number"===typeof r&&t>0?r:e)-c/100).concat(u,")")},between:h,only:function(e){return h(e,e)},width:function(e){return n[e]}},l)}},function(e,t,n){"use strict";function r(e,t){"function"===typeof e?e(t):e&&(e.current=t)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)){if(r.length){var o=i.apply(null,r);o&&e.push(o)}}else if("object"===a)if(r.toString===Object.prototype.toString)for(var u in r)n.call(r,u)&&r[u]&&e.push(u);else e.push(r.toString())}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(r=function(){return i}
2.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";function r(e,t){return function(){return null}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";t.a=function(e,t){}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(69);function i(e,t){if(e){if("string"===typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(70);var i=n(83);function a(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Object(i.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},,function(e,t,n){"use strict";function r(e){return r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){return null==t?e:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r),t.apply(this,r)}}),(function(){}))}n.d(t,"a",(function(){return r}))},,function(e,t,n){"use strict";function r(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var o=this,u=function(){e.apply(o,i)};clearTimeout(t),t=setTimeout(u,n)}return r.clear=function(){clearTimeout(t)},r}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(32);function i(e){return Object(r.a)(e).defaultView||window}},function(e,t,n){"use strict";var r=n(100),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},u={};function s(e){return r.isMemo(e)?o:u[e.$$typeof]||i}u[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},u[r.Memo]=o;var c=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(p){var i=d(n);i&&i!==p&&e(t,i,r)}var o=l(n);f&&(o=o.concat(f(n)));for(var u=s(t),v=s(n),m=0;m<o.length;++m){var y=o[m];if(!a[y]&&(!r||!r[y])&&(!v||!v[y])&&(!u||!u[y])){var g=h(n,y);try{c(t,y,g)}catch(b){}}}}return t}},function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(60),i=n(81);function a(e,t,n){return a=Object(i.a)()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);var a=new(Function.bind.apply(e,i));return n&&Object(r.a)(a,n.prototype),a},a.apply(null,arguments)}},function(e,t,n){"use strict";var r=n(111),i=Object(r.a)();t.a=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1);function i(e,t){return r.isValidElement(e)&&-1!==t.indexOf(e.type.muiName)}},function(e,t,n){"use strict";var r=n(68);r.domToReact,r.htmlToDOM,r.attributesToProps,r.Element;t.a=r},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(83);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,u=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(s){u=!0,i=s}finally{try{o||null==n.return||n.return()}finally{if(u)throw i}}return a}}(e,t)||Object(r.a)(e,t)||function(){throw new TypeError("Invalid attempt to de
2structure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";var r=n(1),i=n.n(r);t.a=i.a.createContext(null)},function(e,t,n){var r=n(152),i=n(102),a=n(159);a="function"===typeof a.default?a.default:a;var o={lowerCaseAttributeNames:!1};function u(e,t){if("string"!==typeof e)throw new TypeError("First argument must be a string");return""===e?[]:r(a(e,(t=t||{}).htmlparser2||o),t)}u.domToReact=r,u.htmlToDOM=a,u.attributesToProps=i,u.Element=n(163).Element,e.exports=u,e.exports.default=u},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r={};n.r(r),n.d(r,"addTrackers",(function(){return G})),n.d(r,"initialize",(function(){return $})),n.d(r,"ga",(function(){return Q})),n.d(r,"set",(function(){return Y})),n.d(r,"send",(function(){return X})),n.d(r,"pageview",(function(){return J})),n.d(r,"modalview",(function(){return Z})),n.d(r,"timing",(function(){return ee})),n.d(r,"event",(function(){return te})),n.d(r,"exception",(function(){return ne})),n.d(r,"plugin",(function(){return re})),n.d(r,"outboundLink",(function(){return ie})),n.d(r,"testModeAPI",(function(){return ae})),n.d(r,"default",(function(){return oe}));var i=n(1),a=n.n(i),o=n(44),u=n.n(o);function s(e){console.warn("[react-ga]",e)}function c(e){return c="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function h(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t){return v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},v(e,t)}function m(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b(e);if(t){var i=b(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return y(this,n)}}function y(e,t){return!t||"object"!==c(t)&&"function"!==typeof t?g(e):t}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}
2function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var w="_blank",O=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(o,e);var t,n,r,i=m(o);function o(){var e;d(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return k(g(e=i.call.apply(i,[this].concat(n))),"handleClick",(function(t){var n=e.props,r=n.target,i=n.eventLabel,a=n.to,u=n.onClick,s=n.trackerNames,c={label:i},l=r!==w,f=!(t.ctrlKey||t.shiftKey||t.metaKey||1===t.button);l&&f?(t.preventDefault(),o.trackLink(c,(function(){window.location.href=a}),s)):o.trackLink(c,(function(){}),s),u&&u(t)})),e}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.to,n=e.target,r=f(f({},h(e,["to","target"])),{},{target:n,href:t,onClick:this.handleClick});return n===w&&(r.rel="".concat(r.rel?r.rel:""," noopener noreferrer").trim()),delete r.eventLabel,delete r.trackerNames,a.a.createElement("a",r)}}])&&p(t.prototype,n),r&&p(t,r),o}(i.Component);k(O,"trackLink",(function(){s("ga tracking not enabled")})),O.propTypes={eventLabel:u.a.string.isRequired,target:u.a.string,to:u.a.string,onClick:u.a.func,trackerNames:u.a.arrayOf(u.a.string)},O.defaultProps={target:null,to:null,onClick:null,trackerNames:null};function x(e){return"string"===typeof(t=e)&&-1!==t.indexOf("@")?(s("This arg looks like an email address, redacting."),"REDACTED (Potential Email Address)"):e;var t}function _(e){return e&&e.toString().replace(/^\s+|\s+$/g,"")}var j=/^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|vs?\.?|via)$/i;function E(e){return _(e).replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g,(function(e,t,n){return t>0&&t+e.length!==n.length&&e.search(j)>-1&&":"!==n.charAt(t-2)&&("-"!==n.charAt(t+e.length)||"-"===n.charAt(t-1))&&n.charAt(t-1).search(/[^\s-]/)<0?e.toLowerCase():e.substr(1).search(/[A-Z]|\../)>-1?e:e.charAt(0).toUpperCase()+e.substr(1)}))}var S=!1;function T(e){console.info("[react-ga]",e)}var I=[],C={calls:I,ga:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];I.push([].concat(t))},resetCalls:function(){I.length=0}};function A(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P(e){return P="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P(e)}function D(e){return function(e){if(Array.isArray(e))return L(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return L(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return L(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var M="undefined"===typeof window||"undefined"===typeof document,F=!1,U=!0,V=!1,B=!0,z=!0,q=function(){var e;return V?C.ga.apply(C,arguments):!M&&(window.ga?(e=window).ga.apply(e,arguments):s("ReactGA.initialize must be called first or GoogleAnalytics should be loaded manually"))};function W(e){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=e||"";return(arguments.length>1?arguments[1]:void 0)&&(n=E(e)),t&&(n=x(n)),n}(e,U,z)}function H(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n[0];"string"===typeof i?(!B&&Array.isArray(e)||q.apply(void 0,n),Array.isArray(e)&&e.forEach((function(e){q.apply(void 0,D(["".concat(e,".").concat(i)].concat(n.slice(1))))}))):s("ga command must be a string")}function K(e,t){e?t&&(t.debug&&!0===t.debug&&(F=!0),!1===t.titleCase&&(U=!1),!1===t.redactEmail&&(z=!1),t.useExistingGa)||(t&&t.gaOptions?q("create",e,t.gaOptions):q("create",e,"auto")):s("gaTrackingID is required in initialize()")}function G(e,t){return Array.isArray(e)?e.forEach((function(e){"object"===P(e)?K(e.trackingId,e):s("All configs must be an object")})):K(e,t),!0}function $(e,t){if(t&&!0===t.testMode)V=!0;else{if(M)return;t&&!0===t.standardImplementation||function(e){if(!S){S=!0;var t="https://www.google-analytics.com/analytics.js";e&&e.gaAddress?t=e.gaAddress:e&&e.debug&&(t="https://www.google-analytics.com/analytics_debug.js");var n,r,i,a,o,u,s,c=e&&e.onerror;n=window,r=document,i="script",a=t,o="ga",n.GoogleAnalyticsObject=o,n.ga=n.ga||function(){(n.ga.q=n.ga.q||[]).push(arguments)},n.ga.l=1*new Date,u=r.createElement(i),s=r.getElementsByTagName(i)[0],u.async=1,u.src=a,u.onerror=c,s.parentNode.insertBefore(u,s)}}(t)}B=!t||"boolean"!==typeof t.alwaysSendToDefaultTracker||t.alwaysSendToDefaultTracker,G(e,t)}function Q(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length>0&&(q.apply(void 0,t),F&&(T("called ga('arguments');"),T("with arguments: ".concat(JSON.stringify(t))))),window.ga}function Y(e,t){e?"object"===P(e)?(0===Object.keys(e).length&&s("empty `fieldsObject` given to .set()"),H(t,"set",e),F&&(T("called ga('set', fieldsObject);"),T("with fieldsObject: ".concat(JSON.stringify(e))))):s("Expected `fieldsObject` arg to be an Object"):s("`fieldsObject` is required in .set()")}function X(e,t){H(t,"send",e),F&&(T("called ga('send', fieldObject);"),T("with fieldObject: ".concat(JSON.stringify(e))),T("with trackers: ".concat(JSON.stringify(t))))}function J(e,t,n){if(e){var r=_(e);if(""!==r){var i={};if(n&&(i.title=n),H(t,"send",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
2t%2?R(Object(n),!0).forEach((function(t){N(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({hitType:"pageview",page:r},i)),F){T("called ga('send', 'pageview', path);");var a="";n&&(a=" and title: ".concat(n)),T("with path: ".concat(r).concat(a))}}else s("path cannot be an empty string in .pageview()")}else s("path is required in .pageview()")}function Z(e,t){if(e){var n,r="/"===(n=_(e)).substring(0,1)?n.substring(1):n;if(""!==r){var i="/modal/".concat(r);H(t,"send","pageview",i),F&&(T("called ga('send', 'pageview', path);"),T("with path: ".concat(i)))}else s("modalName cannot be an empty string or a single / in .modalview()")}else s("modalName is required in .modalview(modalName)")}function ee(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.category,n=e.variable,r=e.value,i=e.label,a=arguments.length>1?arguments[1]:void 0;if(t&&n&&"number"===typeof r){var o={hitType:"timing",timingCategory:W(t),timingVar:W(n),timingValue:r};i&&(o.timingLabel=W(i)),X(o,a)}else s("args.category, args.variable AND args.value are required in timing() AND args.value has to be a number")}function te(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.category,n=e.action,r=e.label,i=e.value,a=e.nonInteraction,o=e.transport,u=A(e,["category","action","label","value","nonInteraction","transport"]),c=arguments.length>1?arguments[1]:void 0;if(t&&n){var l={hitType:"event",eventCategory:W(t),eventAction:W(n)};r&&(l.eventLabel=W(r)),"undefined"!==typeof i&&("number"!==typeof i?s("Expected `args.value` arg to be a Number."):l.eventValue=i),"undefined"!==typeof a&&("boolean"!==typeof a?s("`args.nonInteraction` must be a boolean."):l.nonInteraction=a),"undefined"!==typeof o&&("string"!==typeof o?s("`args.transport` must be a string."):(-1===["beacon","xhr","image"].indexOf(o)&&s("`args.transport` must be either one of these values: `beacon`, `xhr` or `image`"),l.transport=o)),Object.keys(u).filter((function(e){return"dimension"===e.substr(0,"dimension".length)})).forEach((function(e){l[e]=u[e]})),Object.keys(u).filter((function(e){return"metric"===e.substr(0,"metric".length)})).forEach((function(e){l[e]=u[e]})),X(l,c)}else s("args.category AND args.action are required in event()")}function ne(e,t){var n=e.description,r=e.fatal,i={hitType:"exception"};n&&(i.exDescription=W(n)),"undefined"!==typeof r&&("boolean"!==typeof r?s("`args.fatal` must be a boolean."):i.exFatal=r),X(i,t)}var re={require:function(e,t,n){if(e){var r=_(e);if(""!==r){var i=n?"".concat(n,".require"):"require";if(t){if("object"!==P(t))return void s("Expected `options` arg to be an Object");0===Object.keys(t).length&&s("Empty `options` given to .require()"),Q(i,r,t),F&&T("called ga('require', '".concat(r,"', ").concat(JSON.stringify(t)))}else Q(i,r),F&&T("called ga('require', '".concat(r,"');"))}else s("`name` cannot be an empty string in .require()")}else s("`name` is required in .require()")},execute:function(e,t){for(var n,r,i=arguments.length,a=new Array(i>2?i-2:0),o=2;o<i;o++)a[o-2]=arguments[o];if(1===a.length?n=a[0]:(r=a[0],n=a[1]),"string"!==typeof e)s("Expected `pluginName` arg to be a String.");else if("string"!==typeof t)s("Expected `action` arg to be a String.");else{var u="".concat(e,":").concat(t);n=n||null,r&&n?(Q(u,r,n),F&&(T("called ga('".concat(u,"');")),T('actionType: "'.concat(r,'" with payload: ').concat(JSON.stringify(n))))):n?(Q(u,n),F&&(T("called ga('".concat(u,"');")),T("with payload: ".concat(JSON.stringify(n))))):(Q(u),F&&T("called ga('".concat(u,"');")))}}};function ie(e,t,n){if("function"===typeof t)if(e&&e.label){var r={hitType:"event",eventCategory:"Outbound",eventAction:"Click",eventLabel:W(e.label)},i=!1,a=setTimeout((function(){i=!0,t()}),250);r.hitCallback=function(){clearTimeout(a),i||t()},X(r,n)}else s("args.label is required in outboundLink()");else s("hitCallback function is required")}var ae=C,oe={initialize:$,ga:Q,set:Y,send:X,pageview:J,modalview:Z,timing:ee,event:te,exception:ne,plugin:re,outboundLink:ie,testModeAPI:C};function ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
2t%2?ue(Object(n),!0).forEach((function(t){ce(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ue(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}O.origTrackLink=O.trackLink,O.trackLink=ie;var le=O;t.a=se(se({},r),{},{OutboundLink:le})},,function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(1),i=n(25),a=!0,o=!1,u=null,s={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function c(e){e.metaKey||e.altKey||e.ctrlKey||(a=!0)}function l(){a=!1}function f(){"hidden"===this.visibilityState&&o&&(a=!0)}function h(e){var t=e.target;try{return t.matches(":focus-visible")}catch(n){}return a||function(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!s[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function d(){o=!0,window.clearTimeout(u),u=window.setTimeout((function(){o=!1}),100)}function p(){return{isFocusVisible:h,onBlurVisible:d,ref:r.useCallback((function(e){var t,n=i.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",c,!0),t.addEventListener("mousedown",l,!0),t.addEventListener("pointerdown",l,!0),t.addEventListener("touchstart",l,!0),t.addEventListener("visibilitychange",f,!0))}),[])}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1);function i(e){var t=e.controlled,n=e.default,i=(e.name,e.state,r.useRef(void 0!==t).current),a=r.useState(n),o=a[0],u=a[1];return[i?t:o,r.useCallback((function(e){i||u(e)}
2),[])]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(7),i=n(1),a=n.n(i),o=n(14),u=(n(16),n(15)),s=n(17),c=n(20),l=i.forwardRef((function(e,t){var n=e.children,a=e.classes,s=e.className,l=e.color,f=void 0===l?"inherit":l,h=e.component,d=void 0===h?"svg":h,p=e.fontSize,v=void 0===p?"medium":p,m=e.htmlColor,y=e.titleAccess,g=e.viewBox,b=void 0===g?"0 0 24 24":g,k=Object(o.a)(e,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return i.createElement(d,Object(r.a)({className:Object(u.a)(a.root,s,"inherit"!==f&&a["color".concat(Object(c.a)(f))],"default"!==v&&"medium"!==v&&a["fontSize".concat(Object(c.a)(v))]),focusable:"false",viewBox:b,color:m,"aria-hidden":!y||void 0,role:y?"img":void 0,ref:t},k),n,y?i.createElement("title",null,y):null)}));l.muiName="SvgIcon";var f=Object(s.a)((function(e){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:e.typography.pxToRem(24),transition:e.transitions.create("fill",{duration:e.transitions.duration.shorter})},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(35)}}}),{name:"MuiSvgIcon"})(l);function h(e,t){var n=function(t,n){return a.a.createElement(f,Object(r.a)({ref:n},t),e)};return n.muiName=f.muiName,a.a.memo(a.a.forwardRef(n))}},function(e,t,n){e.exports=n(129)()},function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(70);function i(e,t){if(e){if("string"===typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";t.a={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500}},function(e,t,n){"use strict";var r=n(1),i=n.n(r).a.createContext(null);t.a=i},function(e,t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for;t.a=r?Symbol.for("mui.nested"):"__THEME_NESTED__"},function(e,t,n){"use strict";var r=n(41);n.d(t,"a",(function(){return r.a}));r.a.registerVersion("firebase","9.8.2","app-compat")},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function o(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}
2()?Object.assign:function(e,t){for(var n,u,s=o(e),c=1;c<arguments.length;c++){for(var l in n=Object(arguments[c]))i.call(n,l)&&(s[l]=n[l]);if(r){u=r(n);for(var f=0;f<u.length;f++)a.call(n,u[f])&&(s[u[f]]=n[u[f]])}}return s}},function(e,t,n){e.exports=n(141)()},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(147).default;function i(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}e.exports=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var a={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var s=o?Object.getOwnPropertyDescriptor(e,u):null;s&&(s.get||s.set)?Object.defineProperty(a,u,s):a[u]=e[u]}return a.default=e,n&&n.set(e,a),a},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r.createSvgIcon}});var r=n(165)},function(e,t,n){"use strict";e.exports=n(151)},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(r=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===r.Tag||e.type===r.Script||e.type===r.Style},t.Root=r.Root,t.Text=r.Text,t.Directive=r.Directive,t.Comment=r.Comment,t.Script=r.Script,t.Style=r.Style,t.Tag=r.Tag,t.CDATA=r.CDATA,t.Doctype=r.Doctype},function(e,t,n){var r=n(131);e.exports=d,e.exports.parse=a,e.exports.compile=function(e,t){return u(a(e,t),t)},e.exports.tokensToFunction=u,e.exports.tokensToRegExp=h;var i=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function a(e,t){for(var n,r=[],a=0,o=0,u="",l=t&&t.delimiter||"/";null!=(n=i.exec(e));){var f=n[0],h=n[1],d=n.index;if(u+=e.slice(o,d),o=d+f.length,h)u+=h[1];else{var p=e[o],v=n[2],m=n[3],y=n[4],g=n[5],b=n[6],k=n[7];u&&(r.push(u),u="");var w=null!=v&&null!=p&&p!==v,O="+"===b||"*"===b,x="?"===b||"*"===b,_=n[2]||l,j=y||g;r.push({name:m||a++,prefix:v||"",delimiter:_,optional:x,repeat:O,partial:w,asterisk:!!k,pattern:j?c(j):k?".*":"[^"+s(_)+"]+?"})}}return o<e.length&&(u+=e.substr(o)),u&&r.push(u),r}function o(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function u(e,t){for(var n=new Array(e.length),i=0;i<e.length;i++)"object"===typeof e[i]&&(n[i]=new RegExp("^(?:"+e[i].pattern+")$",f(t)));return function(t,i){for(var a="",u=t||{},s=(i||{}).pretty?o:encodeURIComponent,c=0;c<e.length;c++){var l=e[c];if("string"!==typeof l){var f,h=u[l.name];if(null==h){if(l.optional){l.partial&&(a+=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 d=0;d<h.length;d++){if(f=s(h[d]),!n[c].test(f))throw new TypeError('Expected all "'+l.name+'" to match "'+l.pattern+'", but received `'+JSON.stringify(f)+"`");a+=(0===d?l.prefix:l.delimiter)+f}}else{if(f=l.asterisk?encodeURI(h).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):s(h),!n[c].test(f))throw new TypeError('Expected "'+l.name+'" to match "'+l.pattern+'", but received "'+f+'"');a+=l.prefix+f}}else a+=l}return a}}function s(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function c(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function l(e,t){return e.keys=t,e}function f(e){return e&&e.sensitive?"":"i"}function h(e,t,n){r(t)||(n=t||n,t=[]);for(var i=(n=n||{}).strict,a=!1!==n.end,o="",u=0;u<e.length;u++){var c=e[u];if("string"===typeof c)o+=s(c);else{var h=s(c.prefix),d="(?:"+c.pattern+")";t.push(c),c.repeat&&(d+="(?:"+h+d+")*"),o+=d=c.optional?c.partial?h+"("+d+")?":"(?:"+h+"("+d+"))?":h+"("+d+")"}}var p=s(n.delimiter||"/"),v=o.slice(-p.length)===p;
2return i||(o=(v?o.slice(0,-p.length):o)+"(?:"+p+"(?=$))?"),o+=a?"$":i&&v?"":"(?="+p+"|$)",l(new RegExp("^"+o,f(n)),t)}function d(e,t,n){return r(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return l(e,t)}(e,t):r(e)?function(e,t,n){for(var r=[],i=0;i<e.length;i++)r.push(d(e[i],t,n).source);return l(new RegExp("(?:"+r.join("|")+")",f(n)),t)}(e,t,n):function(e,t,n){return h(a(e,n),t,n)}(e,t,n)}},,,,,function(e,t,n){"use strict";e.exports=n(132)},function(e,t,n){e.exports=n(145)()},function(e,t,n){var r=n(153),i=n(103);function a(e){return r.possibleStandardNames[e]}e.exports=function(e){var t,n,o,u,s,c={},l=(e=e||{}).type&&{reset:!0,submit:!0}[e.type];for(t in e)if(o=e[t],r.isCustomAttribute(t))c[t]=o;else if(u=a(n=t.toLowerCase()))switch(s=r.getPropertyInfo(u),"checked"!==u&&"value"!==u||l||(u=a("default"+n)),c[u]=o,s&&s.type){case r.BOOLEAN:c[u]=!0;break;case r.OVERLOADED_BOOLEAN:""===o&&(c[u]=!0)}else i.PRESERVE_CUSTOM_ATTRIBUTES&&(c[t]=o);return i.setStyleProp(e.style,c),c}},function(e,t,n){var r=n(1),i=n(155).default;var a={reactCompat:!0};var o=r.version.split(".")[0]>=16,u=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);e.exports={PRESERVE_CUSTOM_ATTRIBUTES:o,invertObject:function(e,t){if(!e||"object"!==typeof e)throw new TypeError("First argument must be an object");var n,r,i="function"===typeof t,a={},o={};for(n in e)r=e[n],i&&(a=t(n,r))&&2===a.length?o[a[0]]=a[1]:"string"===typeof r&&(o[r]=n);return o},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},setStyleProp:function(e,t){if(null!==e&&void 0!==e)try{t.style=i(e,a)}catch(n){t.style={}}},canTextBeChildOfNode:function(e){return!u.has(e.name)},elementsWithNoTextChildren:u}},function(e,t,n){for(var r,i=n(161),a=n(162),o=i.CASE_SENSITIVE_TAG_NAMES,u=a.Comment,s=a.Element,c=a.ProcessingInstruction,l=a.Text,f={},h=0,d=o.length;h<d;h++)r=o[h],f[r.toLowerCase()]=r;function p(e){for(var t,n={},r=0,i=e.length;r<i;r++)n[(t=e[r]).name]=t.value;return n}function v(e){var t=function(e){return f[e]}(e=e.toLowerCase());return t||e}e.exports={formatAttributes:p,formatDOM:function e(t,n,r){n=n||null;for(var i=[],a=0,o=t.length;a<o;a++){var f,h=t[a];switch(h.nodeType){case 1:(f=new s(v(h.nodeName),p(h.attributes))).children=e(h.childNodes,f);break;case 3:f=new l(h.nodeValue);break;case 8:f=new u(h.nodeValue);break;default:continue}var d=i[a-1]||null;d&&(d.next=f),f.parent=n,f.prev=d,f.next=null,i.push(f)}return r&&((f=new c(r.substring(0,r.indexOf(" ")).toLowerCase(),r)).next=i[0]||null,f.parent=n,i.unshift(f),i[1]&&(i[1].prev=i[0])),i},isIE:function(){return/(MSIE |Trident\/|Edge\/)/.test(navigator.userAgent)}}},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var a=n(94),o=new Map([[a.ElementType.Tag,1],[a.ElementType.Script,1],[a.ElementType.Style,1],[a.ElementType.Directive,1],[a.ElementType.Text,3],[a.ElementType.CDATA,4],[a.ElementType.Comment,8],[a.ElementType.Root,9]]),u=function(){function e(e){this.type=e,this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"nodeType",{get:function(){var e;return null!==(e=o.get(this.type))&&void 0!==e?e:1}
2,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),w(this,e)},e}();t.Node=u;var s=function(e){function t(t,n){var r=e.call(this,t)||this;return r.data=n,r}return r(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(u);t.DataNode=s;var c=function(e){function t(t){return e.call(this,a.ElementType.Text,t)||this}return r(t,e),t}(s);t.Text=c;var l=function(e){function t(t){return e.call(this,a.ElementType.Comment,t)||this}return r(t,e),t}(s);t.Comment=l;var f=function(e){function t(t,n){var r=e.call(this,a.ElementType.Directive,n)||this;return r.name=t,r}return r(t,e),t}(s);t.ProcessingInstruction=f;var h=function(e){function t(t,n){var r=e.call(this,t)||this;return r.children=n,r}return r(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(u);t.NodeWithChildren=h;var d=function(e){function t(t){return e.call(this,a.ElementType.Root,t)||this}return r(t,e),t}(h);t.Document=d;var p=function(e){function t(t,n,r,i){void 0===r&&(r=[]),void 0===i&&(i="script"===t?a.ElementType.Script:"style"===t?a.ElementType.Style:a.ElementType.Tag);var o=e.call(this,i,r)||this;return o.name=t,o.attribs=n,o}return r(t,e),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(h);function v(e){return(0,a.isTag)(e)}function m(e){return e.type===a.ElementType.CDATA}function y(e){return e.type===a.ElementType.Text}function g(e){return e.type===a.ElementType.Comment}function b(e){return e.type===a.ElementType.Directive}function k(e){return e.type===a.ElementType.Root}function w(e,t){var n;if(void 0===t&&(t=!1),y(e))n=new c(e.data);else if(g(e))n=new l(e.data);else if(v(e)){var r=t?O(e.children):[],o=new p(e.name,i({},e.attribs),r);r.forEach((function(e){return e.parent=o})),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=o}else if(m(e)){r=t?O(e.children):[];var u=new h(a.ElementType.CDATA,r);r.forEach((function(e){return e.parent=u})),n=u}else if(k(e)){r=t?O(e.children):[];var s=new d(r);r.forEach((function(e){return e.parent=s})),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),n=s}else{if(!b(e))throw new Error("Not implemented yet: ".concat(e.type));var w=new f(e.name,e.data);null!=e["x-name"]&&(w["x-name"]=e["x-name"],w["x-publicId"]=e["x-publicId"],w["x-systemId"]=e["x-systemId"]),n=w}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function O(e){for(var t=e.map((function(e){return w(e,!0)})),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}t.Element=p,t.isTag=v,t.isCDATA=m,t.isText=y,t.isComment=g,t.isDirective=b,t.isDocument=k,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=w},function(e,t,n){"use strict";(function(e){var r=n(1),i=n.n(r),a=n(28),o=n(78),u=n.n(o),s=1073741823,c="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e?e:{};function l(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,r){e=n,t.forEach((function(t){return t(e,r)}))}}}var f=i.a.createContext||function(e,t){var n,i,o="__create-react-context-"+function(){var e="__global_unique_id__";return c[e]=(c[e]||0)+1}()+"__",f=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).emitter=l(t.props.value),t}Object(a.a)(n,e);var r=n.prototype;return r.getChildContext=function(){var e;return(e={})[o]=this.emitter,e},r.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,i=e.value;((a=r)===(o=i)?0!==a||1/a===1/o:a!==a&&o!==o)?n=0:(n="function"===typeof t?t(r,i):s,0!==(n|=0)&&this.emitter.set(e.value,n))}var a,o},r.render=function(){return this.props.children},n}(r.Component);f.childContextTypes=((n={})[o]=u.a.object.isRequired,n);var h=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).state={value:e.getValue()},e.onUpdate=function(t,n){0!==((0|e.observedBits)&n)&&e.setState({value:e.getValue()})},e}Object(a.a)(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=void 0===t||null===t?s:t},r.componentDidMount=function(){this.context[o]&&this.context[o].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=void 0===e||null===e?s:e},r.componentWillUnmount=function(){this.context[o]&&this.context[o].off(this.onUpdate)},r.getValue=function(){return this.context[o]?this.context[o].get():e},r.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(r.Component);return h.contextTypes=((i={})[o]=u.a.object,i),{Provider:f,Consumer:h}};t.a=f}).call(this,n(74))},function(e,t,n){"use strict";var r=n(90),i=n(91);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(1)),o=(0,r(n(92)).default)(a.createElement("path",{d:"M15.88 9.29L12 13.17 8.12 9.29a.9959.9959 0 00-1.41 0c-.39.39-.39 1.02 0 1.41l4.59 4.59c.39.39 1.02.39 1.41 0l4.59-4.59c.39-.39.39-1.02 0-1.41-.39-.38-1.03-.39-1.42 0z"}),"ExpandMoreRounded");t.default=o},function(e,t,n){"use strict";var r=n(90),i=n(91);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(1)),o=(0,r(n(92)).default)(a.createElement("path",{d:"M4 18h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zm0-5h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zM3 7c0 .55.45 1 1 1h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1z"}),"MenuRounded");t.default=o},function(e,t,n){var r=n(160),i=n(104).formatDOM,a=/<(![a-zA-Z\s]+)>/;e.exports=function(e){if("string"!==typeof e)throw new TypeError("First argument must be a string");if(""===e)return[];var t,n=e.match(a);return n&&n[1]&&(t=n[1]),i(r(e),null,t)}},function(e,t,n){"use strict";var r=n(90),i=n(91);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(1)),o=(0,r(n(92)).default)(a.createElement("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9zm7.5-5l-1-1h-5l-1 1H5v2h14V4h-3.5z"}),"DeleteOutlineOutlined");t.default=o},function(e,t,n){"use strict";var r=n(43),i=n(14),a=n(197),o=n(45),u=n(7);function s(e,t,n){var i;return Object(u.a)({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:","\n      paddingLeft: theme.spacing(2),\n      paddingRight: theme.spacing(2),\n      [theme.breakpoints.up('sm')]: {\n        paddingLeft: theme.spacing(3),\n        paddingRight: theme.spacing(3),\n      },\n      "].join("\n")),Object(u.a)({paddingLeft:t(2),paddingRight:t(2)},n,Object(r.a)({},e.up("sm"),Object(u.a)({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(i={minHeight:56},Object(r.a)(i,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Object(r.a)(i,e.up("sm"),{minHeight:64}),i)},n)}var c=n(113),l={black:"#000",white:"#fff"},f={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},h={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},d={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},p={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},v={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},m={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},y={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},g=n(30),b={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:l.white,default:f[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},k={text:{primary:l.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:f[800],default:"#303030"},action:{active:l.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackgroun
2d:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function w(e,t,n,r){var i=r.light||r,a=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=Object(g.d)(e.main,i):"dark"===t&&(e.dark=Object(g.b)(e.main,a)))}function O(e){var t=e.primary,n=void 0===t?{light:h[300],main:h[500],dark:h[700]}:t,r=e.secondary,o=void 0===r?{light:d.A200,main:d.A400,dark:d.A700}:r,s=e.error,O=void 0===s?{light:p[300],main:p[500],dark:p[700]}:s,x=e.warning,_=void 0===x?{light:v[300],main:v[500],dark:v[700]}:x,j=e.info,E=void 0===j?{light:m[300],main:m[500],dark:m[700]}:j,S=e.success,T=void 0===S?{light:y[300],main:y[500],dark:y[700]}:S,I=e.type,C=void 0===I?"light":I,A=e.contrastThreshold,R=void 0===A?3:A,N=e.tonalOffset,P=void 0===N?.2:N,D=Object(i.a)(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function L(e){return Object(g.c)(e,k.text.primary)>=R?k.text.primary:b.text.primary}var M=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=Object(u.a)({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error(Object(c.a)(4,t));if("string"!==typeof e.main)throw new Error(Object(c.a)(5,JSON.stringify(e.main)));return w(e,"light",n,P),w(e,"dark",r,P),e.contrastText||(e.contrastText=L(e.main)),e},F={dark:k,light:b};return Object(a.a)(Object(u.a)({common:l,type:C,primary:M(n),secondary:M(o,"A400","A200","A700"),error:M(O),warning:M(_),info:M(E),success:M(T),grey:f,contrastThreshold:R,getContrastText:L,augmentColor:M,tonalOffset:P},F[C]),D)}function x(e){return Math.round(1e5*e)/1e5}function _(e){return x(e)}var j={textTransform:"uppercase"},E='"Roboto", "Helvetica", "Arial", sans-serif';function S(e,t){var n="function"===typeof t?t(e):t,r=n.fontFamily,o=void 0===r?E:r,s=n.fontSize,c=void 0===s?14:s,l=n.fontWeightLight,f=void 0===l?300:l,h=n.fontWeightRegular,d=void 0===h?400:h,p=n.fontWeightMedium,v=void 0===p?500:p,m=n.fontWeightBold,y=void 0===m?700:m,g=n.htmlFontSize,b=void 0===g?16:g,k=n.allVariants,w=n.pxToRem,O=Object(i.a)(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);var S=c/14,T=w||function(e){return"".concat(e/b*S,"rem")},I=function(e,t,n,r,i){return Object(u.a)({fontFamily:o,fontWeight:e,fontSize:T(t),lineHeight:n},o===E?{letterSpacing:"".concat(x(r/t),"em")}:{},i,k)},C={h1:I(f,96,1.167,-1.5),h2:I(f,60,1.2,-.5),h3:I(d,48,1.167,0),h4:I(d,34,1.235,.25),h5:I(d,24,1.334,0),h6:I(v,20,1.6,.15),subtitle1:I(d,16,1.75,.15),subtitle2:I(v,14,1.57,.1),body1:I(d,16,1.5,.15),body2:I(d,14,1.43,.15),button:I(v,14,1.75,.4,j),caption:I(d,12,1.66,.4),overline:I(d,12,2.66,1,j)};return Object(a.a)(Object(u.a)({htmlFontSize:b,pxToRem:T,round:_,fontFamily:o,fontSize:c,fontWeightLight:f,fontWeightRegular:d,fontWeightMedium:v,fontWeightBold:y},C),O,{clone:!1})}function T(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var I=["none",T(0,2,1,-1,0,1,1,0,0,1,3,0),T(0,3,1,-2,0,2,2,0,0,1,5,0),T(0,3,3,-2,0,3,4,0,0,1,8,0),T(0,2,4,-1,0,4,5,0,0,1,10,0),T(0,3,5,-1,0,5,8,0,0,1,14,0),T(0,3,5,-1,0,6,10,0,0,1,18,0),T(0,4,5,-2,0,7,10,1,0,2,16,1),T(0,5,5,-3,0,8,10,1,0,3,14,2),T(0,5,6,-3,0,9,12,1,0,3,16,2),T(0,6,6,-3,0,10,14,1,0,4,18,3),T(0,6,7,-4,0,11,15,1,0,4,20,3),T(0,7,8,-4,0,12,17,2,0,5,22,4),T(0,7,8,-4,0,13,19,2,0,5,24,4),T(0,7,9,-4,0,14,21,2,0,5,26,4),T(0,8,9,-5,0,15,22,2,0,6,28,5),T(0,8,10,-5,0,16,24,2,0,6,30,5),T(0,8,11,-5,0,17,26,2,0,6,32,5),T(0,9,11,-5,0,18,28,2,0,7,34,6),T(0,9,12,-6,0,19,29,2,0,7,36,6
2),T(0,10,13,-6,0,20,31,3,0,8,38,7),T(0,10,13,-6,0,21,33,3,0,8,40,7),T(0,10,14,-6,0,22,35,3,0,8,42,7),T(0,11,14,-7,0,23,36,3,0,9,44,8),T(0,11,15,-7,0,24,38,3,0,9,46,8)],C={borderRadius:4},A=n(65),R=(n(52),n(54));n(137);var N=function(e,t){return t?Object(a.a)(e,t,{clone:!1}):e},P={xs:0,sm:600,md:960,lg:1280,xl:1920},D={keys:["xs","sm","md","lg","xl"],up:function(e){return"@media (min-width:".concat(P[e],"px)")}};var L={m:"margin",p:"padding"},M={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},F={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},U=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){if(e.length>2){if(!F[e])return[e];e=F[e]}var t=e.split(""),n=Object(A.a)(t,2),r=n[0],i=n[1],a=L[r],o=M[i]||"";return Array.isArray(o)?o.map((function(e){return a+e})):[a+o]})),V=["m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY"];function B(e){var t=e.spacing||8;return"number"===typeof t?function(e){return t*e}:Array.isArray(t)?function(e){return t[e]}:"function"===typeof t?t:function(){}}function z(e,t){return function(n){return e.reduce((function(e,r){return e[r]=function(e,t){if("string"===typeof t||null==t)return t;var n=e(Math.abs(t));return t>=0?n:"number"===typeof n?-n:"-".concat(n)}(t,n),e}),{})}}function q(e){var t=B(e.theme);return Object.keys(e).map((function(n){if(-1===V.indexOf(n))return null;var r=z(U(n),t),i=e[n];return function(e,t,n){if(Array.isArray(t)){var r=e.theme.breakpoints||D;return t.reduce((function(e,i,a){return e[r.up(r.keys[a])]=n(t[a]),e}),{})}if("object"===Object(R.a)(t)){var i=e.theme.breakpoints||D;return Object.keys(t).reduce((function(e,r){return e[i.up(r)]=n(t[r]),e}),{})}return n(t)}(e,i,r)})).reduce(N,{})}q.propTypes={},q.filterProps=V;function W(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=B({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return 0===n.length?t(1):1===n.length?t(n[0]):n.map((function(e){if("string"===typeof e)return e;var n=t(e);return"number"===typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return e}}),n.mui=!0,n}var H={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},K={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function G(e){return"".concat(Math.round(e),"ms")}var $={easing:H,duration:K,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,r=void 0===n?K.standard:n,a=t.easing,o=void 0===a?H.easeInOut:a,u=t.delay,s=void 0===u?0:u;Object(i.a)(t,["duration","easing","delay"]);return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"===typeof r?r:G(r)," ").concat(o," ").concat("string"===typeof s?s:G(s))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}},Q=n(84);function Y(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,u=void 0===r?{}:r,c=e.palette,l=void 0===c?{}:c,f=e.spacing,h=e.typography,d=void 0===h?{}:h,p=Object(i.a)(e,["breakpoints","mixins","palette","spacing","typography"]),v=O(l),m=Object(o.a)(n),y=W(f),g=Object(a.a)({breakpoints:m,direction:"ltr",mixins:s(m,y,u),overrides:{},palette:v,props:{},shadows:I,typography:S(v,d),spacing:y,shape:C,transitions:$,zIndex:Q.a},p),b=arguments.length,k=new Array(b>1?b-1:0),w=1;w<b;w++)k[w-1]=arguments[w];return g=k.reduce((function(e,t){return Object(a.a)(e,t)}),g)}t.a=Y},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(23),i=n(60);var a=n(61);function o(e){var t="function"===typeof Map?new Map:void 0;return o=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,o)}function o(){return Object(a.a)(e,arguments,Object(r.a)(this).constructor)}return o.prototype=Object.create(e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),Object(i.a)(o,e)},o(e)}},function(e,t,n){"use strict";function r(e){for(var t="https://mui.com/production-error/?code="+e,n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified Material-UI error #"+e+"; visit "+t+" for the full message."}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}
2));var r=n(1),i=n.n(r),a=n(85);function o(){return i.a.useContext(a.a)}},function(e,t,n){"use strict";var r=n(7),i=n(14),a=n(1),o=n.n(a),u=(n(16),n(25)),s=n(15),c=n(24),l=n(42),f=n(17),h=n(75),d=n(52),p=n(36),v=n(71),m=n(28),y=(n(101),n(67));function g(e,t){var n=Object.create(null);return e&&a.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&Object(a.isValidElement)(e)?t(e):e}(e)})),n}function b(e,t,n){return null!=n[t]?n[t]:e.props[t]}function k(e,t,n){var r=g(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),a=[];for(var o in e)o in t?a.length&&(i[o]=a,a=[]):a.push(o);var u={};for(var s in t){if(i[s])for(r=0;r<i[s].length;r++){var c=i[s][r];u[i[s][r]]=n(c)}u[s]=n(s)}for(r=0;r<a.length;r++)u[a[r]]=n(a[r]);return u}(t,r);return Object.keys(i).forEach((function(o){var u=i[o];if(Object(a.isValidElement)(u)){var s=o in t,c=o in r,l=t[o],f=Object(a.isValidElement)(l)&&!l.props.in;!c||s&&!f?c||!s||f?c&&s&&Object(a.isValidElement)(l)&&(i[o]=Object(a.cloneElement)(u,{onExited:n.bind(null,u),in:l.props.in,exit:b(u,"exit",e),enter:b(u,"enter",e)})):i[o]=Object(a.cloneElement)(u,{in:!1}):i[o]=Object(a.cloneElement)(u,{onExited:n.bind(null,u),in:!0,exit:b(u,"exit",e),enter:b(u,"enter",e)})}})),i}var w=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},O=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(Object(v.a)(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}Object(m.a)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,i=t.children,o=t.handleExited;
2return{children:t.firstRender?(n=e,r=o,g(n.children,(function(e){return Object(a.cloneElement)(e,{onExited:r.bind(null,e),in:!0,appear:b(e,"appear",n),enter:b(e,"enter",n),exit:b(e,"exit",n)})}))):k(e,i,o),firstRender:!1}},n.handleExited=function(e,t){var n=g(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=Object(r.a)({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=Object(p.a)(e,["component","childFactory"]),i=this.state.contextValue,a=w(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?o.a.createElement(y.a.Provider,{value:i},a):o.a.createElement(y.a.Provider,{value:i},o.a.createElement(t,r,a))},t}(o.a.Component);O.propTypes={},O.defaultProps={component:"div",childFactory:function(e){return e}};var x=O,_="undefined"===typeof window?a.useEffect:a.useLayoutEffect;var j=function(e){var t=e.classes,n=e.pulsate,r=void 0!==n&&n,i=e.rippleX,o=e.rippleY,u=e.rippleSize,c=e.in,f=e.onExited,h=void 0===f?function(){}:f,d=e.timeout,p=a.useState(!1),v=p[0],m=p[1],y=Object(s.a)(t.ripple,t.rippleVisible,r&&t.ripplePulsate),g={width:u,height:u,top:-u/2+o,left:-u/2+i},b=Object(s.a)(t.child,v&&t.childLeaving,r&&t.childPulsate),k=Object(l.a)(h);return _((function(){if(!c){m(!0);var e=setTimeout(k,d);return function(){clearTimeout(e)}}}),[k,c,d]),a.createElement("span",{className:y,style:g},a.createElement("span",{className:b}))},E=a.forwardRef((function(e,t){var n=e.center,o=void 0!==n&&n,u=e.classes,c=e.className,l=Object(i.a)(e,["center","classes","className"]),f=a.useState([]),h=f[0],p=f[1],v=a.useRef(0),m=a.useRef(null);a.useEffect((function(){m.current&&(m.current(),m.current=null)}),[h]);var y=a.useRef(!1),g=a.useRef(null),b=a.useRef(null),k=a.useRef(null);a.useEffect((function(){return function(){clearTimeout(g.current)}}),[]);var w=a.useCallback((function(e){var t=e.pulsate,n=e.rippleX,r=e.rippleY,i=e.rippleSize,o=e.cb;p((function(e){return[].concat(Object(d.a)(e),[a.createElement(j,{key:v.current,classes:u,timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i})])})),v.current+=1,m.current=o}),[u]),O=a.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t.pulsate,i=void 0!==r&&r,a=t.center,u=void 0===a?o||t.pulsate:a,s=t.fakeElement,c=void 0!==s&&s;if("mousedown"===e.type&&y.current)y.current=!1;else{"touchstart"===e.type&&(y.current=!0);var l,f,h,d=c?null:k.current,p=d?d.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(u||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)l=Math.round(p.width/2),f=Math.round(p.height/2);else{var v=e.touches?e.touches[0]:e,m=v.clientX,O=v.clientY;l=Math.round(m-p.left),f=Math.round(O-p.top)}if(u)(h=Math.sqrt((2*Math.pow(p.width,2)+Math.pow(p.height,2))/3))%2===0&&(h+=1);else{var x=2*Math.max(Math.abs((d?d.clientWidth:0)-l),l)+2,_=2*Math.max(Math.abs((d?d.clientHeight:0)-f),f)+2;h=Math.sqrt(Math.pow(x,2)+Math.pow(_,2))}e.touches?null===b.current&&(b.current=function(){w({pulsate:i,rippleX:l,rippleY:f,rippleSize:h,cb:n})},g.current=setTimeout((function(){b.current&&(b.current(),b.current=null)}),80)):w({pulsate:i,rippleX:l,rippleY:f,rippleSize:h,cb:n})}}),[o,w]),_=a.useCallback((function(){O({},{pulsate:!0})}),[O]),E=a.useCallback((function(e,t){if(clearTimeout(g.current),"touchend"===e.type&&b.current)return e.persist(),b.current(),b.current=null,void(g.current=setTimeout((function(){E(e,t)})));b.current=null,p((function(e){return e.length>0?e.slice(1):e})),m.current=t}),[]);return a.useImperativeHandle(t,(function(){return{pulsate:_,start:O,stop:E}}),[_,O,E]),a.createElement("span",Object(r.a)({className:Object(s.a)(u.root,c),ref:k},l),a.createElement(x,{component:null,exit:!0},h))})),S=Object(f.a)((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500m
2s ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(a.memo(E)),T=a.forwardRef((function(e,t){var n=e.action,o=e.buttonRef,f=e.centerRipple,d=void 0!==f&&f,p=e.children,v=e.classes,m=e.className,y=e.component,g=void 0===y?"button":y,b=e.disabled,k=void 0!==b&&b,w=e.disableRipple,O=void 0!==w&&w,x=e.disableTouchRipple,_=void 0!==x&&x,j=e.focusRipple,E=void 0!==j&&j,T=e.focusVisibleClassName,I=e.onBlur,C=e.onClick,A=e.onFocus,R=e.onFocusVisible,N=e.onKeyDown,P=e.onKeyUp,D=e.onMouseDown,L=e.onMouseLeave,M=e.onMouseUp,F=e.onTouchEnd,U=e.onTouchMove,V=e.onTouchStart,B=e.onDragLeave,z=e.tabIndex,q=void 0===z?0:z,W=e.TouchRippleProps,H=e.type,K=void 0===H?"button":H,G=Object(i.a)(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),$=a.useRef(null);var Q=a.useRef(null),Y=a.useState(!1),X=Y[0],J=Y[1];k&&X&&J(!1);var Z=Object(h.a)(),ee=Z.isFocusVisible,te=Z.onBlurVisible,ne=Z.ref;function re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_;return Object(l.a)((function(r){return t&&t(r),!n&&Q.current&&Q.current[e](r),!0}))}a.useImperativeHandle(n,(function(){return{focusVisible:function(){J(!0),$.current.focus()}}}),[]),a.useEffect((function(){X&&E&&!O&&Q.current.pulsate()}),[O,E,X]);var ie=re("start",D),ae=re("stop",B),oe=re("stop",M),ue=re("stop",(function(e){X&&e.preventDefault(),L&&L(e)})),se=re("start",V),ce=re("stop",F),le=re("stop",U),fe=re("stop",(function(e){X&&(te(e),J(!1)),I&&I(e)}),!1),he=Object(l.a)((function(e){$.current||($.current=e.currentTarget),ee(e)&&(J(!0),R&&R(e)),A&&A(e)})),de=function(){var e=u.findDOMNode($.current);return g&&"button"!==g&&!("A"===e.tagName&&e.href)},pe=a.useRef(!1),ve=Object(l.a)((function(e){E&&!pe.current&&X&&Q.current&&" "===e.key&&(pe.current=!0,e.persist(),Q.current.stop(e,(function(){Q.current.start(e)}))),e.target===e.currentTarget&&de()&&" "===e.key&&e.preventDefault(),N&&N(e),e.target===e.currentTarget&&de()&&"Enter"===e.key&&!k&&(e.preventDefault(),C&&C(e))})),me=Object(l.a)((function(e){E&&" "===e.key&&Q.current&&X&&!e.defaultPrevented&&(pe.current=!1,e.persist(),Q.current.stop(e,(function(){Q.current.pulsate(e)}))),P&&P(e),C&&e.target===e.currentTarget&&de()&&" "===e.key&&!e.defaultPrevented&&C(e)})),ye=g;"button"===ye&&G.href&&(ye="a");var ge={};"button"===ye?(ge.type=K,ge.disabled=k):("a"===ye&&G.href||(ge.role="button"),ge["aria-disabled"]=k);var be=Object(c.a)(o,t),ke=Object(c.a)(ne,$),we=Object(c.a)(be,ke),Oe=a.useState(!1),xe=Oe[0],_e=Oe[1];a.useEffect((function(){_e(!0)}),[]);var je=xe&&!O&&!k;return a.createElement(ye,Object(r.a)({className:Object(s.a)(v.root,m,X&&[v.focusVisible,T],k&&v.disabled),onBlur:fe,onClick:C,onFocus:he,onKeyDown:ve,onKeyUp:me,onMouseDown:ie,onMouseLeave:ue,onMouseUp:oe,onDragLeave:ae,onTouchEnd:ce,onTouchMove:le,onTouchStart:se,ref:we,tabIndex:k?-1:q},ge,G),p,je?a.createElement(S,Object(r.a)({ref:Q,center:d},W)):null)}));t.a=Object(f.a)({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(T)},,,,,,,function(e,t,n){"use strict";var r=n(88),i=60103,a=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var o=60109,u=60110,s=60112;t.Suspense=60113;var c=60115,l=60116;if("function"===typeof Symbol&&Symbol.for){var f=Symbol.for;i=f("react.element"),a=f("react.portal"),t.Fragment=f("react.fragment"),t.StrictMode=f("react.strict_mode"),t.Profiler=f("react.profiler"),o=f("react.provider"),u=f("react.context"),s=f("react.forward_ref"),t.Suspense=f("react.suspense"),c=f("react.memo"),l=f("react.lazy")}var h="function"===typeof Symbol&&Symbol.iterator;function d(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v={};function m(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||p}function y(){}function g(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||p}m.prototype.isReactComponent={},m.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(d(85));this.updater.enqueueSetState(this,e,t,"setState")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=m.prototype;var b=g.prototype=new y;b.constructor=g,r(b,m.prototype),b.isPureReactComponent=!0;var k={current:null},w=Object.prototype.hasOwnProperty,O={key:!0,ref:!0,__self:!0,__source:!0};function x(e,t,n){var r,a={},o=null,u=null;if(null!=t)for(r in void 0!==t.ref&&(u=t.ref),void 0!==t.key&&(o=""+t.key),t)w.call(t,r)&&!O.hasOwnProperty(r)&&(a[r]=t[r]);var s=arguments.length-2;if(1===s)a.children=n;else if(1<s){for(var c=Array(s),l=0;l<s;l++)c[l]=arguments[l+2];a.children=c}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===a[r]&&(a[r]=s[r]);return{$$typeof:i,type:e,key:o,ref:u,props:a,_owner:k.current}}function _(e){return"object"===typeof e&&null!==e&&e.$$typeof===i}var j=/\/+/g;function E(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function S(e,t,n,r,o){var u=typeof e;"undefined"!==u&&"boolean"!==u||(e=null);var s=!1;if(null===e)s=!0;else switch(u){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case i:case a:s=!0}}if(s)return o=o(s=e),e=""===r?"."+E(s,0):r,Array.isArray(o)?(n="",null!=e&&(n=e.replace(j,"$&/")+"/"),S(o,t,n,"",(function(e){return e}))):null!=o&&(_(o)&&(o=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(j,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=""===r?".":r+":",Array.isArray(e))for(var c=0;c<e.length;c++){var l=r+E(u=e[c],c);s+=S(u,t,n,l,o)}else if(l=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=h&&e[h]||e["@@iterator"])?e:null}(e),"function"===typeof l)for(e=l.call(e),c=0;!(u=e.next()).done;)s+=S(u=u.value,t,n,l=r+E(u,c++),o);else if("object"===u)throw t=""+e,Error(d(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function T(e,t,n){if(null==e)return e;var r=[],i=0;return S(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function I(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var C={current:null};function A(){var e=C.current;if(null===e)throw Error(d(321));return e}var R={ReactCurrentDispatcher:C,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:k,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:T,forEach:function(e,t,n){T(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return T(e,(function(){t++})),t},toArray:function(e){return T(e,(function(e){return e}))||[]},only:function(e){if(!_(e))throw Error(d(143));return e}}
vendor: 10,515 bytes, line 2
2,t.Component=m,t.PureComponent=g,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=R,t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error(d(267,e));var a=r({},e.props),o=e.key,u=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(u=t.ref,s=k.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in t)w.call(t,l)&&!O.hasOwnProperty(l)&&(a[l]=void 0===t[l]&&void 0!==c?c[l]:t[l])}var l=arguments.length-2;if(1===l)a.children=n;else if(1<l){c=Array(l);for(var f=0;f<l;f++)c[f]=arguments[f+2];a.children=c}return{$$typeof:i,type:e.type,key:o,ref:u,props:a,_owner:s}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:u,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:o,_context:e},e.Consumer=e},t.createElement=x,t.createFactory=function(e){var t=x.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:s,render:e}},t.isValidElement=_,t.lazy=function(e){return{$$typeof:l,_payload:{_status:-1,_result:e},_init:I}},t.memo=function(e,t){return{$$typeof:c,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return A().useCallback(e,t)},t.useContext=function(e,t){return A().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return A().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return A().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return A().useLayoutEffect(e,t)},t.useMemo=function(e,t){return A().useMemo(e,t)},t.useReducer=function(e,t,n){return A().useReducer(e,t,n)},t.useRef=function(e){return A().useRef(e)},t.useState=function(e){return A().useState(e)},t.version="17.0.2"},function(e,t,n){"use strict";var r=n(1),i=n(88),a=n(124);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(o(227));var u=new Set,s={};function c(e,t){l(e,t),l(e+"Capture",t)}function l(e,t){for(s[e]=t,e=0;e<t.length;e++)u.add(t[e])}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]*$/,d=Object.prototype.hasOwnProperty,p={},v={};function m(e,t,n,r,i,a,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var y={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){y[e]=new m(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];y[t]=new m(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){y[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){y[e]=new m(e,2,!1,e,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(e){y[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){y[e]=new m(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){y[e]=new m(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){y[e]=new m(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){y[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)}));var g=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}function k(e,t,n,r){var i=y.hasOwnProperty(t)?y[t]:null;(null!==i?0===i.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!d.call(v,e)||!d.call(p,e)&&(h.test(e)?v[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(g,b);y[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(g,b);y[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(g,b);y[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){y[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),y.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){y[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,O=60103,x=60106,_=60107,j=60108,E=60114,S=60109,T=60110,I=60112,C=60113,A=60120,R=60115,N=60116,P=60121,D=60128,L=60129,M=60130,F=60131;if("function"===typeof Symbol&&Symbol.for){var U=Symbol.for;O=U("react.element"),x=U("react.portal"),_=U("react.fragment"),j=U("react.strict_mode"),E=U("react.profiler"),S=U("react.provider"),T=U("react.context"),I=U("react.forward_ref"),C=U("react.suspense"),A=U("react.suspense_list"),R=U("react.memo"),N=U("react.lazy"),P=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,B="function"===typeof Symbol&&Symbol.iterator;function z(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=B&&e[B]||e["@@iterator"])?e:null}function q(e){if(void 0===V)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);V=t&&t[1]||""}return"\n"+V+e}var W=!1;function H(e,t){if(!e||W)return"";W=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(s){var r=s}Reflect.construct(e,[],t)}else{try{t.call()}catch(s){r=s}e.call(t.prototype)}else{try{throw Error()}catch(s){r=s}e()}}catch(s){if(s&&r&&"string"===typeof s.stack){for(var i=s.stack.split("\n"),a=r.stack.split("\n"),o=i.length-1,u=a.length-1;1<=o&&0<=u&&i[o]!==a[u];)u--;for(;1<=o&&0<=u;o--,u--)if(i[o]!==a[u]){if(1!==o||1!==u)do{if(o--,0>--u||i[o]!==a[u])return"\n"+i[o].replace(" at new "," at ")}while(1<=o&&0<=u);break}}}finally{W=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?q(e):""}function K(e){switch(e.tag){case 5:return q(e.type);case 16:return q("Lazy");case 13:return q("Suspense");case 19:return q("SuspenseList");case 0:case 2:case 15:return e=H(e.type,!1);case 11:return e=H(e.type.render,!1);case 22:return e=H(e.type._render,!1);case 1:return e=H(e.type,!0);default:return""}}function G(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case _:return"Fragment";case x:return"Portal";case E:return"Profiler";case j:return"StrictMode";case C:return"Suspense";case A:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case T:return(e.displayName||"Context")+".Consumer";case S:return(e._context.displayName||"Context")+".Provider";case I:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case R:return G(e.type);case P:return G(e._render);case N:t=e._payload,e=e._init;try{return G(e(t))}catch(n){}}return null}function $(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Q(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Y(e){e._valueTracker||(e._valueTracker=function(e){var t=Q(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)}
vendor: 6,140 bytes, line 2
2,set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function X(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Q(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function J(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Z(e,t){var n=t.checked;return i({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=$(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&k(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=$(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ie(e,t.type,n):t.hasOwnProperty("defaultValue")&&ie(e,t.type,$(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ie(e,t,n){"number"===t&&J(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function ae(e,t){return e=i({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function oe(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+$(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function ue(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(o(91));return i({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function se(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(o(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(o(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:$(n)}}function ce(e,t){var n=$(t.value),r=$(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function le(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var fe="http://www.w3.org/1999/xhtml",he="http://www.w3.org/2000/svg";function de(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function pe(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?de(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ve,me,ye=(me=function(e,t){if(e.namespaceURI!==he||"innerHTML"in e)e.innerHTML=t;else{for((ve=ve||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ve.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return me(e,t)}))}:me);function ge(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var be={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},ke=["Webkit","ms","Moz","O"];function we(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||be.hasOwnProperty(e)&&be[e]?(""+t).trim():t+"px"}function Oe(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=we(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(be).forEach((function(e){ke.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),be[t]=be[e]}))}));var xe=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 _e(e,t){if(t){if(xe[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(o(62))}}function je(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Ee(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.n
vendor: 3,897 bytes, line 2
2odeType?e.parentNode:e}var Se=null,Te=null,Ie=null;function Ce(e){if(e=ri(e)){if("function"!==typeof Se)throw Error(o(280));var t=e.stateNode;t&&(t=ai(t),Se(e.stateNode,e.type,t))}}function Ae(e){Te?Ie?Ie.push(e):Ie=[e]:Te=e}function Re(){if(Te){var e=Te,t=Ie;if(Ie=Te=null,Ce(e),t)for(e=0;e<t.length;e++)Ce(t[e])}}function Ne(e,t){return e(t)}function Pe(e,t,n,r,i){return e(t,n,r,i)}function De(){}var Le=Ne,Me=!1,Fe=!1;function Ue(){null===Te&&null===Ie||(De(),Re())}function Ve(e,t){var n=e.stateNode;if(null===n)return null;var r=ai(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(o(231,t,typeof n));return n}var Be=!1;if(f)try{var ze={};Object.defineProperty(ze,"passive",{get:function(){Be=!0}}),window.addEventListener("test",ze,ze),window.removeEventListener("test",ze,ze)}catch(me){Be=!1}function qe(e,t,n,r,i,a,o,u,s){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(l){this.onError(l)}}var We=!1,He=null,Ke=!1,Ge=null,$e={onError:function(e){We=!0,He=e}};function Qe(e,t,n,r,i,a,o,u,s){We=!1,He=null,qe.apply($e,arguments)}function Ye(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Xe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Je(e){if(Ye(e)!==e)throw Error(o(188))}function Ze(e){if(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ye(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(r=i.return)){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return Je(i),e;if(a===r)return Je(i),t;a=a.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=a;else{for(var u=!1,s=i.child;s;){if(s===n){u=!0,n=i,r=a;break}if(s===r){u=!0,r=i,n=a;break}s=s.sibling}if(!u){for(s=a.child;s;){if(s===n){u=!0,n=a,r=i;break}if(s===r){u=!0,r=a,n=i;break}s=s.sibling}if(!u)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}(e),!e)return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function et(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var tt,nt,rt,it,at=!1,ot=[],ut=null,st=null,ct=null,lt=new Map,ft=new Map,ht=[],dt="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 pt(e,t,n,r,i){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:i,targetContainers:[r]}}function vt(e,t){switch(e){case"focusin":case"focusout":ut=null;break;case"dragenter":case"dragleave":st=null;break;case"mouseover":case"mouseout":ct=null;break;case"pointerover":case"pointerout":lt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ft.delete(t.pointerId)}}function mt(e,t,n,r,i,a){return null===e||e.nativeEvent!==a?(e=pt(t,n,r,i,a),null!==t&&(null!==(t=ri(t))&&nt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function yt(e){var t=ni(e.target);if(null!==t){var n=Ye(t);
vendor: 2,306 bytes, line 2
2if(null!==n)if(13===(t=n.tag)){if(null!==(t=Xe(n)))return e.blockedOn=t,void it(e.lanePriority,(function(){a.unstable_runWithPriority(e.priority,(function(){rt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function gt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=ri(n))&&nt(t),e.blockedOn=n,!1;t.shift()}return!0}function bt(e,t,n){gt(e)&&n.delete(t)}function kt(){for(at=!1;0<ot.length;){var e=ot[0];if(null!==e.blockedOn){null!==(e=ri(e.blockedOn))&&tt(e);break}for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&&ot.shift()}null!==ut&&gt(ut)&&(ut=null),null!==st&&gt(st)&&(st=null),null!==ct&&gt(ct)&&(ct=null),lt.forEach(bt),ft.forEach(bt)}function wt(e,t){e.blockedOn===t&&(e.blockedOn=null,at||(at=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,kt)))}function Ot(e){function t(t){return wt(t,e)}if(0<ot.length){wt(ot[0],e);for(var n=1;n<ot.length;n++){var r=ot[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==ut&&wt(ut,e),null!==st&&wt(st,e),null!==ct&&wt(ct,e),lt.forEach(t),ft.forEach(t),n=0;n<ht.length;n++)(r=ht[n]).blockedOn===e&&(r.blockedOn=null);for(;0<ht.length&&null===(n=ht[0]).blockedOn;)yt(n),null===n.blockedOn&&ht.shift()}function xt(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var _t={animationend:xt("Animation","AnimationEnd"),animationiteration:xt("Animation","AnimationIteration"),animationstart:xt("Animation","AnimationStart"),transitionend:xt("Transition","TransitionEnd")},jt={},Et={};function St(e){if(jt[e])return jt[e];if(!_t[e])return e;var t,n=_t[e];for(t in n)if(n.hasOwnProperty(t)&&t in Et)return jt[e]=n[t];return e}f&&(Et=document.createElement("div").style,"AnimationEvent"in window||(delete _t.animationend.animation,delete _t.animationiteration.animation,delete _t.animationstart.animation),"TransitionEvent"in window||delete _t.transitionend.transition);var Tt=St("animationend"),It=St("animationiteration"),Ct=St("animationstart"),At=St("transitionend"),Rt=new Map,Nt=ne
vendor: 5,119 bytes, line 2
2w Map,Pt=["abort","abort",Tt,"animationEnd",It,"animationIteration",Ct,"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",At,"transitionEnd","waiting","waiting"];function Dt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],i=e[n+1];i="on"+(i[0].toUpperCase()+i.slice(1)),Nt.set(r,t),Rt.set(r,i),c(i,[r])}}(0,a.unstable_now)();var Lt=8;function Mt(e){if(0!==(1&e))return Lt=15,1;if(0!==(2&e))return Lt=14,2;if(0!==(4&e))return Lt=13,4;var t=24&e;return 0!==t?(Lt=12,t):0!==(32&e)?(Lt=11,32):0!==(t=192&e)?(Lt=10,t):0!==(256&e)?(Lt=9,256):0!==(t=3584&e)?(Lt=8,t):0!==(4096&e)?(Lt=7,4096):0!==(t=4186112&e)?(Lt=6,t):0!==(t=62914560&e)?(Lt=5,t):67108864&e?(Lt=4,67108864):0!==(134217728&e)?(Lt=3,134217728):0!==(t=805306368&e)?(Lt=2,t):0!==(1073741824&e)?(Lt=1,1073741824):(Lt=8,e)}function Ft(e,t){var n=e.pendingLanes;if(0===n)return Lt=0;var r=0,i=0,a=e.expiredLanes,o=e.suspendedLanes,u=e.pingedLanes;if(0!==a)r=a,i=Lt=15;else if(0!==(a=134217727&n)){var s=a&~o;0!==s?(r=Mt(s),i=Lt):0!==(u&=a)&&(r=Mt(u),i=Lt)}else 0!==(a=n&~o)?(r=Mt(a),i=Lt):0!==u&&(r=Mt(u),i=Lt);if(0===r)return 0;if(r=n&((0>(r=31-Wt(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0===(t&o)){if(Mt(t),i<=Lt)return t;Lt=i}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-Wt(t)),r|=e[n],t&=~i;return r}function Ut(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Vt(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=Bt(24&~t))?Vt(10,t):e;case 10:return 0===(e=Bt(192&~t))?Vt(8,t):e;case 8:return 0===(e=Bt(3584&~t))&&(0===(e=Bt(4186112&~t))&&(e=512)),e;case 2:return 0===(t=Bt(805306368&~t))&&(t=268435456),t}throw Error(o(358,e))}function Bt(e){return e&-e}function zt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function qt(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Wt(t)]=n}var Wt=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Ht(e)/Kt|0)|0},Ht=Math.log,Kt=Math.LN2;var Gt=a.unstable_UserBlockingPriority,$t=a.unstable_runWithPriority,Qt=!0;function Yt(e,t,n,r){Me||De();var i=Jt,a=Me;Me=!0;try{Pe(i,e,t,n,r)}finally{(Me=a)||Ue()}}function Xt(e,t,n,r){$t(Gt,Jt.bind(null,e,t,n,r))}function Jt(e,t,n,r){var i;if(Qt)if((i=0===(4&t))&&0<ot.length&&-1<dt.indexOf(e))e=pt(null,e,t,n,r),ot.push(e);else{var a=Zt(e,t,n,r);if(null===a)i&&vt(e,r);else{if(i){if(-1<dt.indexOf(e))return e=pt(a,e,t,n,r),void ot.push(e);if(function(e,t,n,r,i){switch(t){case"focusin":return ut=mt(ut,e,t,n,r,i),!0;case"dragenter":return st=mt(st,e,t,n,r,i),!0;case"mouseover":return ct=mt(ct,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return lt.set(a,mt(lt.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,ft.set(a,mt(ft.get(a)||null,e,t,n,r,i)),!0}return!1}(a,e,t,n,r))return;vt(e,r)}Dr(e,t,r,null,n)}}}function Zt(e,t,n,r){var i=Ee(r);if(null!==(i=ni(i))){var a=Ye(i);if(null===a)i=null;else{var o=a.tag;if(13===o){if(null!==(i=Xe(a)))return i;i=null}else if(3===o){if(a.stateNode.hydrate)return 3===a.tag?a.stateNode.containerInfo:null;i=null}else a!==i&&(i=null)}}return Dr(e,t,r,i,n),null}var en=null,tn=null,nn=null;function rn(){if(nn)return nn;var e,t,n=tn,r=n.length,i="value"in en?en.value:en.textContent,a=i.length;for(e=0;e<r&&n[e]===i[e];e++);var o=r-e;for(t=1;t<=o&&n[r-t]===i[a-t];t++);return nn=i.slice(e,1<t?1-t:void 0)}function an(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function on(){return!0}function un(){return!1}function sn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?on:un,this.isPropagationStopped=un,this}return i(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=on)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=on)},persist:function(){},isPersistent:on}),t}var cn,ln,fn,hn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dn=sn(hn),pn=i({},hn,{view:0,detail:0}),vn=sn(pn),mn=i({},pn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.from
vendor: 9,308 bytes, line 2
2Element===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==fn&&(fn&&"mousemove"===e.type?(cn=e.screenX-fn.screenX,ln=e.screenY-fn.screenY):ln=cn=0,fn=e),cn)},movementY:function(e){return"movementY"in e?e.movementY:ln}}),yn=sn(mn),gn=sn(i({},mn,{dataTransfer:0})),bn=sn(i({},pn,{relatedTarget:0})),kn=sn(i({},hn,{animationName:0,elapsedTime:0,pseudoElement:0})),wn=i({},hn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),On=sn(wn),xn=sn(i({},hn,{data:0})),_n={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},jn={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"},En={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=En[e])&&!!t[e]}function Tn(){return Sn}var In=i({},pn,{key:function(e){if(e.key){var t=_n[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=an(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?jn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tn,charCode:function(e){return"keypress"===e.type?an(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?an(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Cn=sn(In),An=sn(i({},mn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Rn=sn(i({},pn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tn})),Nn=sn(i({},hn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Pn=i({},mn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Dn=sn(Pn),Ln=[9,13,27,32],Mn=f&&"CompositionEvent"in window,Fn=null;f&&"documentMode"in document&&(Fn=document.documentMode);var Un=f&&"TextEvent"in window&&!Fn,Vn=f&&(!Mn||Fn&&8<Fn&&11>=Fn),Bn=String.fromCharCode(32),zn=!1;function qn(e,t){switch(e){case"keyup":return-1!==Ln.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Wn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Hn=!1;var Kn={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 Gn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Kn[e.type]:"textarea"===t}function $n(e,t,n,r){Ae(r),0<(t=Mr(t,"onChange")).length&&(n=new dn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Qn=null,Yn=null;function Xn(e){Ir(e,0)}function Jn(e){if(X(ii(e)))return e}function Zn(e,t){if("change"===e)return t}var er=!1;if(f){var tr;if(f){var nr="oninput"in document;if(!nr){var rr=document.createElement("div");rr.setAttribute("oninput","return;"),nr="function"===typeof rr.oninput}tr=nr}else tr=!1;er=tr&&(!document.documentMode||9<document.documentMode)}function ir(){Qn&&(Qn.detachEvent("onpropertychange",ar),Yn=Qn=null)}function ar(e){if("value"===e.propertyName&&Jn(Yn)){var t=[];if($n(t,Yn,e,Ee(e)),e=Xn,Me)e(t);else{Me=!0;try{Ne(e,t)}finally{Me=!1,Ue()}}}}function or(e,t,n){"focusin"===e?(ir(),Yn=n,(Qn=t).attachEvent("onpropertychange",ar)):"focusout"===e&&ir()}function ur(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Jn(Yn)}function sr(e,t){if("click"===e)return Jn(t)}function cr(e,t){if("input"===e||"change"===e)return Jn(t)}var lr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},fr=Object.prototype.hasOwnProperty;function hr(e,t){if(lr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!fr.call(t,n[r])||!lr(e[n[r]],t[n[r]]))return!1;return!0}function dr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pr(e,t){var n,r=dr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=dr(r)}}function vr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?vr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function mr(){for(var e=window,t=J();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=J((e=t.contentWindow).document)}return t}function yr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var gr=f&&"documentMode"in document&&11>=document.documentMode,br=null,kr=null,wr=null,Or=!1;function xr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;Or||null==br||br!==J(r)||("selectionStart"in(r=br)&&yr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},wr&&hr(wr,r)||(wr=r,0<(r=Mr(kr,"onSelect")).length&&(t=new dn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=br)))}Dt("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),Dt("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),Dt(Pt,2);for(var _r="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),jr=0;jr<_r.length;jr++)Nt.set(_r[jr],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 Er="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Sr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Er));function Tr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,a,u,s,c){if(Qe.apply(this,arguments),We){if(!We)throw Error(o(198));var l=He;We=!1,He=null,Ke||(Ke=!0,Ge=l)}}(r,t,void 0,e),e.currentTarget=null}function Ir(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var u=r[o],s=u.instance,c=u.currentTarget;if(u=u.listener,s!==a&&i.isPropagationStopped())break e;Tr(i,u,c),a=s}else for(o=0;o<r.length;o++){if(s=(u=r[o]).instance,c=u.currentTarget,u=u.listener,s!==a&&i.isPropagationStopped())break e;Tr(i,u,c),a=s}}}if(Ke)throw e=Ge,Ke=!1,Ge=null,e}function Cr(e,t){var n=oi(t),r=e+"__bubble";n.has(r)||(Pr(t,e,2,!1),n.add(r))}var Ar="_reactListening"+Math.random().toString(36).slice(2);function Rr(e){e[Ar]||(e[Ar]=!0,u.forEach((function(t){Sr.has(t)||Nr(t,!1,e,null),Nr(t,!0,e,null)})))}function Nr(e,t,n,r){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,a=n;if("selectionchange"===e&&9!==n.nodeType&&(a=n.ownerDocument),null!==r&&!t&&Sr.has(e)){
vendor: 4,213 bytes, line 2
2if("scroll"!==e)return;i|=2,a=r}var o=oi(a),u=e+"__"+(t?"capture":"bubble");o.has(u)||(t&&(i|=4),Pr(a,e,i,t),o.add(u))}function Pr(e,t,n,r){var i=Nt.get(t);switch(void 0===i?2:i){case 0:i=Yt;break;case 1:i=Xt;break;default:i=Jt}n=i.bind(null,t,n,e),i=void 0,!Be||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Dr(e,t,n,r,i){var a=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var o=r.tag;if(3===o||4===o){var u=r.stateNode.containerInfo;if(u===i||8===u.nodeType&&u.parentNode===i)break;if(4===o)for(o=r.return;null!==o;){var s=o.tag;if((3===s||4===s)&&((s=o.stateNode.containerInfo)===i||8===s.nodeType&&s.parentNode===i))return;o=o.return}for(;null!==u;){if(null===(o=ni(u)))return;if(5===(s=o.tag)||6===s){r=a=o;continue e}u=u.parentNode}}r=r.return}!function(e,t,n){if(Fe)return e(t,n);Fe=!0;try{Le(e,t,n)}finally{Fe=!1,Ue()}}((function(){var r=a,i=Ee(n),o=[];e:{var u=Rt.get(e);if(void 0!==u){var s=dn,c=e;switch(e){case"keypress":if(0===an(n))break e;case"keydown":case"keyup":s=Cn;break;case"focusin":c="focus",s=bn;break;case"focusout":c="blur",s=bn;break;case"beforeblur":case"afterblur":s=bn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":s=yn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":s=gn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":s=Rn;break;case Tt:case It:case Ct:s=kn;break;case At:s=Nn;break;case"scroll":s=vn;break;case"wheel":s=Dn;break;case"copy":case"cut":case"paste":s=On;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":s=An}var l=0!==(4&t),f=!l&&"scroll"===e,h=l?null!==u?u+"Capture":null:u;l=[];for(var d,p=r;null!==p;){var v=(d=p).stateNode;if(5===d.tag&&null!==v&&(d=v,null!==h&&(null!=(v=Ve(p,h))&&l.push(Lr(p,v,d)))),f)break;p=p.return}0<l.length&&(u=new s(u,c,null,n,i),o.push({event:u,listeners:l}))}}if(0===(7&t)){if(s="mouseout"===e||"pointerout"===e,(!(u="mouseover"===e||"pointerover"===e)||0!==(16&t)||!(c=n.relatedTarget||n.fromElement)||!ni(c)&&!c[ei])&&(s||u)&&(u=i.window===i?i:(u=i.ownerDocument)?u.defaultView||u.parentWindow:window,s?(s=r,null!==(c=(c=n.relatedTarget||n.toElement)?ni(c):null)&&(c!==(f=Ye(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(s=null,c=r),s!==c)){if(l=yn,v="onMouseLeave",h="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(l=An,v="onPointerLeave",h="onPointerEnter",p="pointer"),f=null==s?u:ii(s),d=null==c?u:ii(c),(u=new l(v,p+"leave",s,n,i)).target=f,u.relatedTarget=d,v=null,ni(i)===r&&((l=new l(h,p+"enter",c,n,i)).target=d,l.relatedTarget=f,v=l),f=v,s&&c)e:{for(h=c,p=0,d=l=s;d;d=Fr(d))p++;for(d=0,v=h;v;v=Fr(v))d++;for(;0<p-d;)l=Fr(l),p--;for(;0<d-p;)h=Fr(h),d--;for(;p--;){if(l===h||null!==h&&l===h.alternate)break e;l=Fr(l),h=Fr(h)}l=null}else l=null;null!==s&&Ur(o,u,s,l,!1),null!==c&&null!==f&&Ur(o,f,c,l,!0)}if("select"===(s=(u=r?ii(r):window).nodeName&&u.nodeName.toLowerCase())||"input"===s&&"file"===u.type)var m=Zn;else if(Gn(u))if(er)m=cr;else{m=ur;var y=or}else(s=u.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===u.type||"radio"===u.type)&&(m=sr);switch(m&&(m=m(e,r))?$n(o,m,n,i):(y&&y(e,u,r),"focusout"===e&&(y=u._wrapperState)&&y.controlled&&"number"===u.type&&ie(u,"number",u.value)),y=r?ii(r):window,e){case"focusin":(Gn(y)||"true"===y.contentEditable)&&(br=y,kr=r,wr=null);break;case"focusout":wr=kr=br=null;break;case"mousedown":Or=!0;break;case"contextmenu":case"mouseup":case"dragend":Or=!1,xr(o,n,i);break;case"selectionchange":if(gr)break;case"keydown":case"keyup":xr(o,n,i)}var g;if(Mn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Hn?qn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");
vendor: 5,203 bytes, line 2
2b&&(Vn&&"ko"!==n.locale&&(Hn||"onCompositionStart"!==b?"onCompositionEnd"===b&&Hn&&(g=rn()):(tn="value"in(en=i)?en.value:en.textContent,Hn=!0)),0<(y=Mr(r,b)).length&&(b=new xn(b,e,null,n,i),o.push({event:b,listeners:y}),g?b.data=g:null!==(g=Wn(n))&&(b.data=g))),(g=Un?function(e,t){switch(e){case"compositionend":return Wn(t);case"keypress":return 32!==t.which?null:(zn=!0,Bn);case"textInput":return(e=t.data)===Bn&&zn?null:e;default:return null}}(e,n):function(e,t){if(Hn)return"compositionend"===e||!Mn&&qn(e,t)?(e=rn(),nn=tn=en=null,Hn=!1,e):null;switch(e){default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Vn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Mr(r,"onBeforeInput")).length&&(i=new xn("onBeforeInput","beforeinput",null,n,i),o.push({event:i,listeners:r}),i.data=g))}Ir(o,t)}))}function Lr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Mr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,a=i.stateNode;5===i.tag&&null!==a&&(i=a,null!=(a=Ve(e,n))&&r.unshift(Lr(e,a,i)),null!=(a=Ve(e,t))&&r.push(Lr(e,a,i))),e=e.return}return r}function Fr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Ur(e,t,n,r,i){for(var a=t._reactName,o=[];null!==n&&n!==r;){var u=n,s=u.alternate,c=u.stateNode;if(null!==s&&s===r)break;5===u.tag&&null!==c&&(u=c,i?null!=(s=Ve(n,a))&&o.unshift(Lr(n,s,u)):i||null!=(s=Ve(n,a))&&o.push(Lr(n,s,u))),n=n.return}0!==o.length&&e.push({event:t,listeners:o})}function Vr(){}var Br=null,zr=null;function qr(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Wr(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Hr="function"===typeof setTimeout?setTimeout:void 0,Kr="function"===typeof clearTimeout?clearTimeout:void 0;function Gr(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function $r(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Qr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Yr=0;var Xr=Math.random().toString(36).slice(2),Jr="__reactFiber$"+Xr,Zr="__reactProps$"+Xr,ei="__reactContainer$"+Xr,ti="__reactEvents$"+Xr;function ni(e){var t=e[Jr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ei]||n[Jr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Qr(e);null!==e;){if(n=e[Jr])return n;e=Qr(e)}return t}n=(e=n).parentNode}return null}function ri(e){return!(e=e[Jr]||e[ei])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ii(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(o(33))}function ai(e){return e[Zr]||null}function oi(e){var t=e[ti];return void 0===t&&(t=e[ti]=new Set),t}var ui=[],si=-1;function ci(e){return{current:e}}function li(e){0>si||(e.current=ui[si],ui[si]=null,si--)}function fi(e,t){si++,ui[si]=e.current,e.current=t}var hi={},di=ci(hi),pi=ci(!1),vi=hi;function mi(e,t){var n=e.type.contextTypes;if(!n)return hi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,a={};for(i in n)a[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function yi(e){return null!==(e=e.childContextTypes)&&void 0!==e}function gi(){li(pi),li(di)}function bi(e,t,n){if(di.current!==hi)throw Error(o(168));fi(di,t),fi(pi,n)}function ki(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var a in r=r.getChildContext())if(!(a in e))throw Error(o(108,G(t)||"Unknown",a));return i({},n,r)}function wi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||hi,vi=di.current,fi(di,e),fi(pi,pi.current),!0}function Oi(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=ki(e,t,vi),r.__reactInternalMemoizedMergedChildContext=e,li(pi),li(di),fi(di,e)):li(pi),fi(pi,n)}var xi=null,_i=null,ji=a.unstable_runWithPriority,Ei=a.unstable_scheduleCallback,Si=a.unstable_cancelCallback,Ti=a.unstable_shouldYield,Ii=a.unstable_requestPaint,Ci=a.unstable_now,Ai=a.unstable_getCurrentPriorityLevel,Ri=a.unstable_ImmediatePriority,Ni=a.unstable_UserBlockingPriority,Pi=a.unstable_NormalPriority,Di=a.unstable_LowPriority,Li=a.unstable_IdlePriority,Mi={},Fi=void 0!==Ii?Ii:function(){},Ui=null,Vi=null,Bi=!1,zi=Ci(),qi=1e4>zi?Ci:function(){return Ci()-zi};function Wi(){switch(Ai()){case Ri:return 99;case Ni:return 98;case Pi:return 97;case Di:return 96;case Li:return 95;default:throw Error(o(332))}}function Hi(e){switch(e){case 99:return Ri;case 98:return Ni;case 97:return Pi;case 96:return Di;case 95:return Li;default:throw Error(o(332))}}function Ki(e,t){return e=Hi(e),ji(e,t)}function Gi(e,t,n){return e=Hi(e),Ei(e,t,n)}
vendor: 4,165 bytes, line 2
2function $i(){if(null!==Vi){var e=Vi;Vi=null,Si(e)}Qi()}function Qi(){if(!Bi&&null!==Ui){Bi=!0;var e=0;try{var t=Ui;Ki(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Ui=null}catch(n){throw null!==Ui&&(Ui=Ui.slice(e+1)),Ei(Ri,$i),n}finally{Bi=!1}}}var Yi=w.ReactCurrentBatchConfig;function Xi(e,t){if(e&&e.defaultProps){for(var n in t=i({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Ji=ci(null),Zi=null,ea=null,ta=null;function na(){ta=ea=Zi=null}function ra(e){var t=Ji.current;li(Ji),e.type._context._currentValue=t}function ia(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function aa(e,t){Zi=e,ta=ea=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(Mo=!0),e.firstContext=null)}function oa(e,t){if(ta!==e&&!1!==t&&0!==t)if("number"===typeof t&&1073741823!==t||(ta=e,t=1073741823),t={context:e,observedBits:t,next:null},null===ea){if(null===Zi)throw Error(o(308));ea=t,Zi.dependencies={lanes:0,firstContext:t,responders:null}}else ea=ea.next=t;return e._currentValue}var ua=!1;function sa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function ca(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function la(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function fa(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function ha(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?i=a=o:a=a.next=o,n=n.next}while(null!==n);null===a?i=a=t:a=a.next=t}else i=a=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function da(e,t,n,r){var a=e.updateQueue;ua=!1;var o=a.firstBaseUpdate,u=a.lastBaseUpdate,s=a.shared.pending;if(null!==s){a.shared.pending=null;var c=s,l=c.next;c.next=null,null===u?o=l:u.next=l,u=c;var f=e.alternate;if(null!==f){var h=(f=f.updateQueue).lastBaseUpdate;h!==u&&(null===h?f.firstBaseUpdate=l:h.next=l,f.lastBaseUpdate=c)}}if(null!==o){for(h=a.baseState,u=0,f=l=c=null;;){s=o.lane;var d=o.eventTime;if((r&s)===s){null!==f&&(f=f.next={eventTime:d,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var p=e,v=o;switch(s=t,d=n,v.tag){case 1:if("function"===typeof(p=v.payload)){h=p.call(d,h,s);break e}h=p;break e;case 3:p.flags=-4097&p.flags|64;case 0:if(null===(s="function"===typeof(p=v.payload)?p.call(d,h,s):p)||void 0===s)break e;h=i({},h,s);break e;case 2:ua=!0}}null!==o.callback&&(e.flags|=32,null===(s=a.effects)?a.effects=[o]:s.push(o))}else d={eventTime:d,lane:s,tag:o.tag,payload:o.payload,callback:o.callback,next:null},null===f?(l=f=d,c=h):f=f.next=d,u|=s;if(null===(o=o.next)){if(null===(s=a.shared.pending))break;o=s.next,s.next=null,a.lastBaseUpdate=s,a.shared.pending=null}}null===f&&(c=h),a.baseState=c,a.firstBaseUpdate=l,a.lastBaseUpdate=f,Bu|=u,e.lanes=u,e.memoizedState=h}}function pa(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!==typeof i)throw Error(o(191,i));i.call(r)}}}var va=(new r.Component).refs;function ma(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:i({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var ya={isMounted:function(e){return!!(e=e._reactInternals)&&Ye(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=hs(),i=ds(e),a=la(r,i);a.payload=t,void 0!==n&&null!==n&&(a.callback=n),fa(e,a),ps(e,i,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=hs(),i=ds(e),a=la(r,i);
2a.tag=1,a.payload=t,void 0!==n&&null!==n&&(a.callback=n),fa(e,a),ps(e,i,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=hs(),r=ds(e),i=la(n,r);i.tag=2,void 0!==t&&null!==t&&(i.callback=t),fa(e,i),ps(e,r,n)}};function ga(e,t,n,r,i,a,o){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,o):!t.prototype||!t.prototype.isPureReactComponent||(!hr(n,r)||!hr(i,a))}function ba(e,t,n){var r=!1,i=hi,a=t.contextType;return"object"===typeof a&&null!==a?a=oa(a):(i=yi(t)?vi:di.current,a=(r=null!==(r=t.contextTypes)&&void 0!==r)?mi(e,i):hi),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=ya,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function ka(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ya.enqueueReplaceState(t,t.state,null)}function wa(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=va,sa(e);var a=t.contextType;"object"===typeof a&&null!==a?i.context=oa(a):(a=yi(t)?vi:di.current,i.context=mi(e,a)),da(e,n,i,r),i.state=e.memoizedState,"function"===typeof(a=t.getDerivedStateFromProps)&&(ma(e,t,a,n),i.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(t=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&ya.enqueueReplaceState(i,i.state,null),da(e,n,i,r),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.flags|=4)}var Oa=Array.isArray;function xa(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(o(309));var r=n.stateNode}if(!r)throw Error(o(147,e));var i=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===i?t.ref:(t=function(e){var t=r.refs;t===va&&(t=r.refs={}),null===e?delete t[i]:t[i]=e},t._stringRef=i,t)}if("string"!==typeof e)throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function _a(e,t){if("textarea"!==e.type)throw Error(o(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function ja(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Ks(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function u(t){return e&&null===t.alternate&&(t.flags=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=Ys(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){return null!==t&&t.elementType===n.type?((r=i(t,n.props)).ref=xa(e,t,n),r.return=e,r):((r=Gs(n.type,n.key,n.props,null,e.mode,r)).ref=xa(e,t,n),r.return=e,r)}function l(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Xs(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function f(e,t,n,r,a){return null===t||7!==t.tag?((t=$s(n,e.mode,r,a)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n){if("string"===typeof t||"number"===typeof t)return(t=Ys(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case O:return(n=Gs(t.type,t.key,t.props,null,e.mode,n)).ref=xa(e,null,t),n.return=e,n;case x:return(t=Xs(t,e.mode,n)).return=e,t}if(Oa(t)||z(t))return(t=$s(t,e.mode,n,null)).return=e,t;_a(e,t)}return null}function d(e,t,n,r){var i=null!==t?t.key:null;if("string"===typeof n||"number"===typeof n)return null!==i?null:s(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case O:return n.key===i?n.type===_?f(e,t,n.props.children,r,i):c(e,t,n,r):null;case x:return n.key===i?l(e,t,n,r):null}if(Oa(n)||z(n))return null!==i?null:f(e,t,n,r,null);_a(e,n)}return null}function p(e,t,n,r,i){if("string"===typeof r||"number"===typeof r)return s(t,e=e.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case O:return e=e.get(null===r.key?n:r.key)||null,r.type===_?f(t,e,r.props.children,i,r.key):c(t,e,r,i);case x:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(Oa(r)||z(r))return f(t,e=e.get(n)||null,r,i,null);_a(t,r)}return null}function v(i,o,u,s){for(var c=null,l=null,f=o,v=o=0,m=null;null!==f&&v<u.length;v++){f.index>
vendor: 4,654 bytes, line 2
2v?(m=f,f=null):m=f.sibling;var y=d(i,f,u[v],s);if(null===y){null===f&&(f=m);break}e&&f&&null===y.alternate&&t(i,f),o=a(y,o,v),null===l?c=y:l.sibling=y,l=y,f=m}if(v===u.length)return n(i,f),c;if(null===f){for(;v<u.length;v++)null!==(f=h(i,u[v],s))&&(o=a(f,o,v),null===l?c=f:l.sibling=f,l=f);return c}for(f=r(i,f);v<u.length;v++)null!==(m=p(f,i,v,u[v],s))&&(e&&null!==m.alternate&&f.delete(null===m.key?v:m.key),o=a(m,o,v),null===l?c=m:l.sibling=m,l=m);return e&&f.forEach((function(e){return t(i,e)})),c}function m(i,u,s,c){var l=z(s);if("function"!==typeof l)throw Error(o(150));if(null==(s=l.call(s)))throw Error(o(151));for(var f=l=null,v=u,m=u=0,y=null,g=s.next();null!==v&&!g.done;m++,g=s.next()){v.index>m?(y=v,v=null):y=v.sibling;var b=d(i,v,g.value,c);if(null===b){null===v&&(v=y);break}e&&v&&null===b.alternate&&t(i,v),u=a(b,u,m),null===f?l=b:f.sibling=b,f=b,v=y}if(g.done)return n(i,v),l;if(null===v){for(;!g.done;m++,g=s.next())null!==(g=h(i,g.value,c))&&(u=a(g,u,m),null===f?l=g:f.sibling=g,f=g);return l}for(v=r(i,v);!g.done;m++,g=s.next())null!==(g=p(v,i,m,g.value,c))&&(e&&null!==g.alternate&&v.delete(null===g.key?m:g.key),u=a(g,u,m),null===f?l=g:f.sibling=g,f=g);return e&&v.forEach((function(e){return t(i,e)})),l}return function(e,r,a,s){var c="object"===typeof a&&null!==a&&a.type===_&&null===a.key;c&&(a=a.props.children);var l="object"===typeof a&&null!==a;if(l)switch(a.$$typeof){case O:e:{for(l=a.key,c=r;null!==c;){if(c.key===l){if(7===c.tag){if(a.type===_){n(e,c.sibling),(r=i(c,a.props.children)).return=e,e=r;break e}}else if(c.elementType===a.type){n(e,c.sibling),(r=i(c,a.props)).ref=xa(e,c,a),r.return=e,e=r;break e}n(e,c);break}t(e,c),c=c.sibling}a.type===_?((r=$s(a.props.children,e.mode,s,a.key)).return=e,e=r):((s=Gs(a.type,a.key,a.props,null,e.mode,s)).ref=xa(e,r,a),s.return=e,e=s)}return u(e);case x:e:{for(c=a.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),(r=i(r,a.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Xs(a,e.mode,s)).return=e,e=r}return u(e)}if("string"===typeof a||"number"===typeof a)return a=""+a,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,a)).return=e,e=r):(n(e,r),(r=Ys(a,e.mode,s)).return=e,e=r),u(e);if(Oa(a))return v(e,r,a,s);if(z(a))return m(e,r,a,s);if(l&&_a(e,a),"undefined"===typeof a&&!c)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(o(152,G(e.type)||"Component"))}return n(e,r)}}var Ea=ja(!0),Sa=ja(!1),Ta={},Ia=ci(Ta),Ca=ci(Ta),Aa=ci(Ta);function Ra(e){if(e===Ta)throw Error(o(174));return e}function Na(e,t){switch(fi(Aa,t),fi(Ca,e),fi(Ia,Ta),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:pe(null,"");break;default:t=pe(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}li(Ia),fi(Ia,t)}function Pa(){li(Ia),li(Ca),li(Aa)}function Da(e){Ra(Aa.current);var t=Ra(Ia.current),n=pe(t,e.type);t!==n&&(fi(Ca,e),fi(Ia,n))}function La(e){Ca.current===e&&(li(Ia),li(Ca))}var Ma=ci(0);function Fa(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ua=null,Va=null,Ba=!1;function za(e,t){var n=Ws(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function qa(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function Wa(e){if(Ba){var t=Va;if(t){var n=t;if(!qa(e,t)){if(!(t=$r(n.nextSibling))||!qa(e,t))return e.flags=-1025&e.flags|2,Ba=!1,void(Ua=e);za(Ua,n)}Ua=e,Va=$r(t.firstChild)}else e.flags=-1025&e.flags|2,Ba=!1,Ua=e}}function Ha(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Ua=e}function Ka(e){if(e!==Ua)return!1;if(!Ba)return Ha(e),Ba=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Wr(t,e.memoizedProps))for(t=Va;t;)za(e,t),t=$r(t.nextSibling);if(Ha(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Va=$r(e.nextSibling);break e}t--}
vendor: 9,460 bytes, line 2
2else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Va=null}}else Va=Ua?$r(e.stateNode.nextSibling):null;return!0}function Ga(){Va=Ua=null,Ba=!1}var $a=[];function Qa(){for(var e=0;e<$a.length;e++)$a[e]._workInProgressVersionPrimary=null;$a.length=0}var Ya=w.ReactCurrentDispatcher,Xa=w.ReactCurrentBatchConfig,Ja=0,Za=null,eo=null,to=null,no=!1,ro=!1;function io(){throw Error(o(321))}function ao(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!lr(e[n],t[n]))return!1;return!0}function oo(e,t,n,r,i,a){if(Ja=a,Za=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ya.current=null===e||null===e.memoizedState?No:Po,e=n(r,i),ro){a=0;do{if(ro=!1,!(25>a))throw Error(o(301));a+=1,to=eo=null,t.updateQueue=null,Ya.current=Do,e=n(r,i)}while(ro)}if(Ya.current=Ro,t=null!==eo&&null!==eo.next,Ja=0,to=eo=Za=null,no=!1,t)throw Error(o(300));return e}function uo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===to?Za.memoizedState=to=e:to=to.next=e,to}function so(){if(null===eo){var e=Za.alternate;e=null!==e?e.memoizedState:null}else e=eo.next;var t=null===to?Za.memoizedState:to.next;if(null!==t)to=t,eo=e;else{if(null===e)throw Error(o(310));e={memoizedState:(eo=e).memoizedState,baseState:eo.baseState,baseQueue:eo.baseQueue,queue:eo.queue,next:null},null===to?Za.memoizedState=to=e:to=to.next=e}return to}function co(e,t){return"function"===typeof t?t(e):t}function lo(e){var t=so(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=eo,i=r.baseQueue,a=n.pending;if(null!==a){if(null!==i){var u=i.next;i.next=a.next,a.next=u}r.baseQueue=i=a,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var s=u=a=null,c=i;do{var l=c.lane;if((Ja&l)===l)null!==s&&(s=s.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),r=c.eagerReducer===e?c.eagerState:e(r,c.action);else{var f={lane:l,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===s?(u=s=f,a=r):s=s.next=f,Za.lanes|=l,Bu|=l}c=c.next}while(null!==c&&c!==i);null===s?a=r:s.next=u,lr(r,t.memoizedState)||(Mo=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=s,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function fo(e){var t=so(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(null!==i){n.pending=null;var u=i=i.next;do{a=e(a,u.action),u=u.next}while(u!==i);lr(a,t.memoizedState)||(Mo=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function ho(e,t,n){var r=t._getVersion;r=r(t._source);var i=t._workInProgressVersionPrimary;if(null!==i?e=i===r:(e=e.mutableReadLanes,(e=(Ja&e)===e)&&(t._workInProgressVersionPrimary=r,$a.push(t))),e)return n(t._source);throw $a.push(t),Error(o(350))}function po(e,t,n,r){var i=Nu;if(null===i)throw Error(o(349));var a=t._getVersion,u=a(t._source),s=Ya.current,c=s.useState((function(){return ho(i,t,n)})),l=c[1],f=c[0];c=to;var h=e.memoizedState,d=h.refs,p=d.getSnapshot,v=h.source;h=h.subscribe;var m=Za;return e.memoizedState={refs:d,source:t,subscribe:r},s.useEffect((function(){d.getSnapshot=n,d.setSnapshot=l;var e=a(t._source);if(!lr(u,e)){e=n(t._source),lr(f,e)||(l(e),e=ds(m),i.mutableReadLanes|=e&i.pendingLanes),e=i.mutableReadLanes,i.entangledLanes|=e;for(var r=i.entanglements,o=e;0<o;){var s=31-Wt(o),c=1<<s;r[s]|=e,o&=~c}}}),[n,t,r]),s.useEffect((function(){return r(t._source,(function(){var e=d.getSnapshot,n=d.setSnapshot;try{n(e(t._source));var r=ds(m);i.mutableReadLanes|=r&i.pendingLanes}catch(a){n((function(){throw a}))}}))}),[t,r]),lr(p,n)&&lr(v,t)&&lr(h,r)||((e={pending:null,dispatch:null,lastRenderedReducer:co,lastRenderedState:f}).dispatch=l=Ao.bind(null,Za,e),c.queue=e,c.baseQueue=null,f=ho(i,t,n),c.memoizedState=c.baseState=f),f}function vo(e,t,n){return po(so(),e,t,n)}function mo(e){var t=uo();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:co,lastRenderedState:e}).dispatch=Ao.bind(null,Za,e),[t.memoizedState,e]}function yo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Za.updateQueue)?(t={lastEffect:null},Za.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function go(e){return e={current:e},uo().memoizedState=e}function bo(){return so().memoizedState}function ko(e,t,n,r){var i=uo();Za.flags|=e,i.memoizedState=yo(1|t,n,void 0,void 0===r?null:r)}function wo(e,t,n,r){var i=so();r=void 0===r?null:r;var a=void 0;if(null!==eo){var o=eo.memoizedState;if(a=o.destroy,null!==r&&ao(r,o.deps))return void yo(t,n,a,r)}Za.flags|=e,i.memoizedState=yo(1|t,n,a,r)}function Oo(e,t){return ko(516,4,e,t)}function xo(e,t){return wo(516,4,e,t)}function _o(e,t){return wo(4,2,e,t)}function jo(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Eo(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,wo(4,2,jo.bind(null,t,e),n)}function So(){}function To(e,t){var n=so();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ao(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Io(e,t){var n=so();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ao(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Co(e,t){var n=Wi();Ki(98>n?98:n,(function(){e(!0)})),Ki(97<n?97:n,(function(){var n=Xa.transition;Xa.transition=1;try{e(!1),t()}finally{Xa.transition=n}}))}function Ao(e,t,n){var r=hs(),i=ds(e),a={lane:i,action:n,eagerReducer:null,eagerState:null,next:null},o=t.pending;if(null===o?a.next=a:(a.next=o.next,o.next=a),t.pending=a,o=e.alternate,e===Za||null!==o&&o===Za)ro=no=!0;else{if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var u=t.lastRenderedState,s=o(u,n);if(a.eagerReducer=o,a.eagerState=s,lr(s,u))return}catch(c){}ps(e,i,r)}}var Ro={readContext:oa,useCallback:io,useContext:io,useEffect:io,useImperativeHandle:io,useLayoutEffect:io,useMemo:io,useReducer:io,useRef:io,useState:io,useDebugValue:io,useDeferredValue:io,useTransition:io,useMutableSource:io,useOpaqueIdentifier:io,unstable_isNewReconciler:!1},No={readContext:oa,useCallback:function(e,t){return uo().memoizedState=[e,void 0===t?null:t],e},useContext:oa,useEffect:Oo,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,ko(4,2,jo.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ko(4,2,e,t)},useMemo:function(e,t){var n=uo();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=uo();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Ao.bind(null,Za,e),[r.memoizedState,e]},useRef:go,useState:mo,useDebugValue:So,useDeferredValue:function(e){var t=mo(e),n=t[0],r=t[1];return Oo((function(){var t=Xa.transition;Xa.transition=1;try{r(e)}finally{Xa.transition=t}}),[e]),n},useTransition:function(){var e=mo(!1),t=e[0];return go(e=Co.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=uo();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},po(r,e,t,n)},useOpaqueIdentifier:function(){if(Ba){var e=!1,t=function(e){return{$$typeof:D,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+(Yr++).toString(36))),Error(o(355))})),n=mo(t)[1];return 0===(2&Za.mode)&&(Za.flags|=516,yo(5,(function(){n("r:"+(Yr++).toString(36))}),void 0,null)),t}return mo(t="r:"+(Yr++).toString(36)),t},unstable_isNewReconciler:!1},Po={readContext:oa,useCallback:To,useContext:oa,useEffect:xo,useImperativeHandle:Eo,useLayoutEffect:_o,useMemo:Io,useReducer:lo,useRef:bo,useState:function(){return lo(co)},useDebugValue:So,useDeferredValue:function(e){var t=lo(co),n=t[0],r=t[1];return xo((function(){var t=Xa.transition;Xa.transition=1;try{r(e)}finally{Xa.transition=t}}),[e]),n},useTransition:function(){var e=lo(co)[0];return[bo().current,e]},useMutableSource:vo,useOpaqueIdentifier:function(){return lo(co)[0]},unstable_isNewReconciler:!1},Do={readContext:oa,useCallback:To,useContext:oa,useEffect:xo,useImperativeHandle:Eo,useLayoutEffect:_o,useMemo:Io,useReducer:fo,useRef:bo,useState:function(){return fo(co)},useDebugValue:So,useDeferredValue:function(e){var t=fo(co),n=t[0],r=t[1];return xo((function(){var t=Xa.transition;Xa.transition=1;try{r(e)}finally{Xa.transition=t}}),[e]),n},useTransition:function(){var e=fo(co)[0];return[bo().current,e]},useMutableSource:vo,useOpaqueIdentifier:function(){return fo(co)[0]},unstable_isNewReconciler:!1},Lo=w.ReactCurrentOwner,Mo=!1;function Fo(e,t,n,r){t.child=null===e?Sa(t,null,n,r):Ea(t,e.child,n,r)}function Uo(e,t,n,r,i){n=n.render;var a=t.ref;return aa(t,i),r=oo(e,t,n,r,a,i),null===e||Mo?(t.flags|=1,Fo(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,au(e,t,i))}function Vo(e,t,n,r,i,a){if(null===e){var o=n.type;return"function"!==typeof o||Hs(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Gs(n.type,null,r,t,t.mode,a)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Bo(e,t,o,r,i,a))}return o=e.child,0===(i&a)&&(i=o.memoizedProps,(n=null!==(n=n.compare)?n:hr)(i,r)&&e.ref===t.ref)?au(e,t,a):(t.flags|=1,(e=Ks(o,r)).ref=t.ref,e.return=t,t.child=e)}function Bo(e,t,n,r,i,a){if(null!==e&&hr(e.memoizedProps,r)&&e.ref===t.ref){if(Mo=!1,
20===(a&i))return t.lanes=e.lanes,au(e,t,a);0!==(16384&e.flags)&&(Mo=!0)}return Wo(e,t,n,r,a)}function zo(e,t,n){var r=t.pendingProps,i=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0===(4&t.mode))t.memoizedState={baseLanes:0},Os(t,n);else{if(0===(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},Os(t,e),null;t.memoizedState={baseLanes:0},Os(t,null!==a?a.baseLanes:n)}else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,Os(t,r);return Fo(e,t,i,n),t.child}function qo(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function Wo(e,t,n,r,i){var a=yi(n)?vi:di.current;return a=mi(t,a),aa(t,i),n=oo(e,t,n,r,a,i),null===e||Mo?(t.flags|=1,Fo(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,au(e,t,i))}function Ho(e,t,n,r,i){if(yi(n)){var a=!0;wi(t)}else a=!1;if(aa(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),ba(t,n,r),wa(t,n,r,i),r=!0;else if(null===e){var o=t.stateNode,u=t.memoizedProps;o.props=u;var s=o.context,c=n.contextType;"object"===typeof c&&null!==c?c=oa(c):c=mi(t,c=yi(n)?vi:di.current);var l=n.getDerivedStateFromProps,f="function"===typeof l||"function"===typeof o.getSnapshotBeforeUpdate;f||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(u!==r||s!==c)&&ka(t,o,r,c),ua=!1;var h=t.memoizedState;o.state=h,da(t,r,o,i),s=t.memoizedState,u!==r||h!==s||pi.current||ua?("function"===typeof l&&(ma(t,n,l,r),s=t.memoizedState),(u=ua||ga(t,n,u,r,h,s,c))?(f||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||("function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"===typeof o.componentDidMount&&(t.flags|=4)):("function"===typeof o.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=s),o.props=r,o.state=s,o.context=c,r=u):("function"===typeof o.componentDidMount&&(t.flags|=4),r=!1)}else{o=t.stateNode,ca(e,t),u=t.memoizedProps,c=t.type===t.elementType?u:Xi(t.type,u),o.props=c,f=t.pendingProps,h=o.context,"object"===typeof(s=n.contextType)&&null!==s?s=oa(s):s=mi(t,s=yi(n)?vi:di.current);var d=n.getDerivedStateFromProps;(l="function"===typeof d||"function"===typeof o.getSnapshotBeforeUpdate)||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(u!==f||h!==s)&&ka(t,o,r,s),ua=!1,h=t.memoizedState,o.state=h,da(t,r,o,i);var p=t.memoizedState;u!==f||h!==p||pi.current||ua?("function"===typeof d&&(ma(t,n,d,r),p=t.memoizedState),(c=ua||ga(t,n,c,r,h,p,s))?(l||"function"!==typeof o.UNSAFE_componentWillUpdate&&"function"!==typeof o.componentWillUpdate||("function"===typeof o.componentWillUpdate&&o.componentWillUpdate(r,p,s),"function"===typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,p,s)),"function"===typeof o.componentDidUpdate&&(t.flags|=4),"function"===typeof o.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!==typeof o.componentDidUpdate||u===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||u===e.memoizedProps&&h===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=p),o.props=r,o.state=p,o.context=s,r=c):("function"!==typeof o.componentDidUpdate||u===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||u===e.memoizedProps&&h===e.memoizedState||(t.flags|=256),r=!1)}return Ko(e,t,n,r,a,i)}function Ko(e,t,n,r,i,a){qo(e,t);var o=0!==(64&t.flags);if(!r&&!o)return i&&Oi(t,n,!1),au(e,t,a);r=t.stateNode,Lo.current=t;var u=o&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&o?(t.child=Ea(t,e.child,null,a),t.child=Ea(t,null,u,a)):Fo(e,t,u,a),t.memoizedState=r.state,i&&Oi(t,n,!0),t.child}function Go(e){var t=e.stateNode;t.pendingContext?bi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&bi(0,t.context,!1),Na(e,t.containerInfo)}var $o,Qo,Yo,Xo={dehydrated:null,retryLane:0};function Jo(e,t,n){var r,i=t.pendingProps,a=Ma.current,o=!1;return(r=0!==(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!==(2&a)),r?
vendor: 4,229 bytes, line 2
2(o=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(a|=1),fi(Ma,1&a),null===e?(void 0!==i.fallback&&Wa(t),e=i.children,a=i.fallback,o?(e=Zo(t,e,a,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Xo,e):"number"===typeof i.unstable_expectedLoadTime?(e=Zo(t,e,a,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Xo,t.lanes=33554432,e):((n=Qs({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,o?(i=tu(e,t,i.children,i.fallback,n),o=t.child,a=e.child.memoizedState,o.memoizedState=null===a?{baseLanes:n}:{baseLanes:a.baseLanes|n},o.childLanes=e.childLanes&~n,t.memoizedState=Xo,i):(n=eu(e,t,i.children,n),t.memoizedState=null,n))}function Zo(e,t,n,r){var i=e.mode,a=e.child;return t={mode:"hidden",children:t},0===(2&i)&&null!==a?(a.childLanes=0,a.pendingProps=t):a=Qs(t,i,0,null),n=$s(n,i,r,null),a.return=e,n.return=e,a.sibling=n,e.child=a,n}function eu(e,t,n,r){var i=e.child;return e=i.sibling,n=Ks(i,{mode:"visible",children:n}),0===(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function tu(e,t,n,r,i){var a=t.mode,o=e.child;e=o.sibling;var u={mode:"hidden",children:n};return 0===(2&a)&&t.child!==o?((n=t.child).childLanes=0,n.pendingProps=u,null!==(o=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=o,o.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Ks(o,u),null!==e?r=Ks(e,r):(r=$s(r,a,i,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function nu(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),ia(e.return,t)}function ru(e,t,n,r,i,a){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,lastEffect:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.lastEffect=a)}function iu(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Fo(e,t,r.children,n),0!==(2&(r=Ma.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!==(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&nu(e,n);else if(19===e.tag)nu(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(fi(Ma,r),0===(2&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===Fa(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ru(t,!1,i,n,a,t.lastEffect);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===Fa(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ru(t,!0,n,null,a,t.lastEffect);break;case"together":ru(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function au(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Bu|=t.lanes,0!==(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=Ks(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ks(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function ou(e,t){if(!Ba)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function uu(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return yi(t.type)&&gi(),null;case 3:return Pa(),li(pi),li(di),Qa(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Ka(t)?t.flags|=4:r.hydrate||(t.flags|=256)),null;case 5:La(t);var a=Ra(Aa.current);if(n=t.type,null!==e&&null!=t.stateNode)Qo(e,t,n,r),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(o(166));return null}if(e=Ra(Ia.current),Ka(t)){r=t.stateNode,n=t.type;var u=t.memoizedProps;
2switch(r[Jr]=t,r[Zr]=u,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(e=0;e<Er.length;e++)Cr(Er[e],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":ee(r,u),Cr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!u.multiple},Cr("invalid",r);break;case"textarea":se(r,u),Cr("invalid",r)}for(var c in _e(n,u),e=null,u)u.hasOwnProperty(c)&&(a=u[c],"children"===c?"string"===typeof a?r.textContent!==a&&(e=["children",a]):"number"===typeof a&&r.textContent!==""+a&&(e=["children",""+a]):s.hasOwnProperty(c)&&null!=a&&"onScroll"===c&&Cr("scroll",r));switch(n){case"input":Y(r),re(r,u,!0);break;case"textarea":Y(r),le(r);break;case"select":case"option":break;default:"function"===typeof u.onClick&&(r.onclick=Vr)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(c=9===a.nodeType?a:a.ownerDocument,e===fe&&(e=de(n)),e===fe?"script"===n?((e=c.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=c.createElement(n,{is:r.is}):(e=c.createElement(n),"select"===n&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,n),e[Jr]=t,e[Zr]=r,$o(e,t),t.stateNode=e,c=je(n,r),n){case"dialog":Cr
vendor: 12,541 bytes, line 2
2("cancel",e),Cr("close",e),a=r;break;case"iframe":case"object":case"embed":Cr("load",e),a=r;break;case"video":case"audio":for(a=0;a<Er.length;a++)Cr(Er[a],e);a=r;break;case"source":Cr("error",e),a=r;break;case"img":case"image":case"link":Cr("error",e),Cr("load",e),a=r;break;case"details":Cr("toggle",e),a=r;break;case"input":ee(e,r),a=Z(e,r),Cr("invalid",e);break;case"option":a=ae(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},a=i({},r,{value:void 0}),Cr("invalid",e);break;case"textarea":se(e,r),a=ue(e,r),Cr("invalid",e);break;default:a=r}_e(n,a);var l=a;for(u in l)if(l.hasOwnProperty(u)){var f=l[u];"style"===u?Oe(e,f):"dangerouslySetInnerHTML"===u?null!=(f=f?f.__html:void 0)&&ye(e,f):"children"===u?"string"===typeof f?("textarea"!==n||""!==f)&&ge(e,f):"number"===typeof f&&ge(e,""+f):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(s.hasOwnProperty(u)?null!=f&&"onScroll"===u&&Cr("scroll",e):null!=f&&k(e,u,f,c))}switch(n){case"input":Y(e),re(e,r,!1);break;case"textarea":Y(e),le(e);break;case"option":null!=r.value&&e.setAttribute("value",""+$(r.value));break;case"select":e.multiple=!!r.multiple,null!=(u=r.value)?oe(e,!!r.multiple,u,!1):null!=r.defaultValue&&oe(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof a.onClick&&(e.onclick=Vr)}qr(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)Yo(0,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(o(166));n=Ra(Aa.current),Ra(Ia.current),Ka(t)?(r=t.stateNode,n=t.memoizedProps,r[Jr]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Jr]=t,t.stateNode=r)}return null;case 13:return li(Ma),r=t.memoizedState,0!==(64&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&Ka(t):n=null!==e.memoizedState,r&&!n&&0!==(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!==(1&Ma.current)?0===Fu&&(Fu=3):(0!==Fu&&3!==Fu||(Fu=4),null===Nu||0===(134217727&Bu)&&0===(134217727&zu)||gs(Nu,Du))),(r||n)&&(t.flags|=4),null);case 4:return Pa(),null===e&&Rr(t.stateNode.containerInfo),null;case 10:return ra(t),null;case 19:if(li(Ma),null===(r=t.memoizedState))return null;if(u=0!==(64&t.flags),null===(c=r.rendering))if(u)ou(r,!1);else{if(0!==Fu||null!==e&&0!==(64&e.flags))for(e=t.child;null!==e;){if(null!==(c=Fa(e))){for(t.flags|=64,ou(r,!1),null!==(u=c.updateQueue)&&(t.updateQueue=u,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(u=n).flags&=2,u.nextEffect=null,u.firstEffect=null,u.lastEffect=null,null===(c=u.alternate)?(u.childLanes=0,u.lanes=e,u.child=null,u.memoizedProps=null,u.memoizedState=null,u.updateQueue=null,u.dependencies=null,u.stateNode=null):(u.childLanes=c.childLanes,u.lanes=c.lanes,u.child=c.child,u.memoizedProps=c.memoizedProps,u.memoizedState=c.memoizedState,u.updateQueue=c.updateQueue,u.type=c.type,e=c.dependencies,u.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return fi(Ma,1&Ma.current|2),t.child}e=e.sibling}null!==r.tail&&qi()>Ku&&(t.flags|=64,u=!0,ou(r,!1),t.lanes=33554432)}else{if(!u)if(null!==(e=Fa(c))){if(t.flags|=64,u=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),ou(r,!0),null===r.tail&&"hidden"===r.tailMode&&!c.alternate&&!Ba)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*qi()-r.renderingStartTime>Ku&&1073741824!==n&&(t.flags|=64,u=!0,ou(r,!1),t.lanes=33554432);r.isBackwards?(c.sibling=t.child,t.child=c):(null!==(n=r.last)?n.sibling=c:t.child=c,r.last=c)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=qi(),n.sibling=null,t=Ma.current,fi(Ma,u?1&t|2:1&t),n):null;case 23:case 24:return xs(),null!==e&&null!==e.memoizedState!==(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(o(156,t.tag))}function su(e){switch(e.tag){case 1:yi(e.type)&&gi();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Pa(),li(pi),li(di),Qa(),0!==(64&(t=e.flags)))throw Error(o(285));return e.flags=-4097&t|64,e;case 5:return La(e),null;case 13:return li(Ma),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return li(Ma),null;case 4:return Pa(),null;case 10:return ra(e),null;case 23:case 24:return xs(),null;default:return null}}function cu(e,t){try{var n="",r=t;do{n+=K(r),r=r.return}while(r);var i=n}catch(a){i="\nError generating stack: "+a.message+"\n"+a.stack}return{value:e,source:t,stack:i}}function lu(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}$o=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Qo=function(e,t,n,r){var a=e.memoizedProps;if(a!==r){e=t.stateNode,Ra(Ia.current);var o,u=null;switch(n){case"input":a=Z(e,a),r=Z(e,r),u=[];break;case"option":a=ae(e,a),r=ae(e,r),u=[];break;case"select":a=i({},a,{value:void 0}),r=i({},r,{value:void 0}),u=[];break;case"textarea":a=ue(e,a),r=ue(e,r),u=[];break;default:"function"!==typeof a.onClick&&"function"===typeof r.onClick&&(e.onclick=Vr)}for(f in _e(n,r),n=null,a)if(!r.hasOwnProperty(f)&&a.hasOwnProperty(f)&&null!=a[f])if("style"===f){var c=a[f];for(o in c)c.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==f&&"children"!==f&&"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(s.hasOwnProperty(f)?u||(u=[]):(u=u||[]).push(f,null));for(f in r){var l=r[f];if(c=null!=a?a[f]:void 0,r.hasOwnProperty(f)&&l!==c&&(null!=l||null!=c))if("style"===f)if(c){for(o in c)!c.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&c[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(u||(u=[]),u.push(f,n)),n=l;else"dangerouslySetInnerHTML"===f?(l=l?l.__html:void 0,c=c?c.__html:void 0,null!=l&&c!==l&&(u=u||[]).push(f,l)):"children"===f?"string"!==typeof l&&"number"!==typeof l||(u=u||[]).push(f,""+l):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&(s.hasOwnProperty(f)?(null!=l&&"onScroll"===f&&Cr("scroll",e),u||c===l||(u=[])):"object"===typeof l&&null!==l&&l.$$typeof===D?l.toString():(u=u||[]).push(f,l))}n&&(u=u||[]).push("style",n);var f=u;(t.updateQueue=f)&&(t.flags|=4)}},Yo=function(e,t,n,r){n!==r&&(t.flags|=4)};var fu="function"===typeof WeakMap?WeakMap:Map;function hu(e,t,n){(n=la(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Yu||(Yu=!0,Xu=r),lu(0,t)},n}function du(e,t,n){(n=la(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var i=t.value;n.payload=function(){return lu(0,t),r(i)}}var a=e.stateNode;return null!==a&&"function"===typeof a.componentDidCatch&&(n.callback=function(){"function"!==typeof r&&(null===Ju?Ju=new Set([this]):Ju.add(this),lu(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var pu="function"===typeof WeakSet?WeakSet:Set;function vu(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(n){Vs(e,n)}else t.current=null}function mu(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Xi(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Gr(t.stateNode.containerInfo))}throw Error(o(163))}function yu(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3===(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var i=e;r=i.next,0!==(4&(i=i.tag))&&0!==(1&i)&&(Ms(n,e),Ls(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Xi(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&pa(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}pa(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&qr(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&Ot(n)))))}throw Error(o(163))}function gu(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"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=we("display",i)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&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}}function bu(e,t){if(_i&&"function"===typeof _i.onCommitFiberUnmount)try{_i.onCommitFiberUnmount(xi,t)}catch(a){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,i=r.destroy;if(r=r.tag,void 0!==i)if(0!==(4&r))Ms(t,n);else{r=t;try{i()}catch(a){Vs(r,a)}}n=n.next}while(n!==e)}break;case 1:if(vu(t),"function"===typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(a){Vs(t,a)}break;case 5:vu(t);break;case 4:ju(e,t)}}function ku(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function wu(e){return 5===e.tag||3===e.tag||4===e.tag}function Ou(e){e:{for(var t=e.return;null!==t;){if(wu(t))break e;t=t.return}throw Error(o(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(o(161))}16&n.flags&&(ge(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||wu(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?xu(e,n,t):_u(e,n,t)}function xu(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Vr));else if(4!==r&&null!==(e=e.child))for(xu(e,t,n),e=e.sibling;null!==e;)xu(e,t,n),e=e.sibling}function _u(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(_u(e,t,n),e=e.sibling;null!==e;)_u(e,t,n),e=e.sibling}function ju(e,t){for(var n,r,i=t,a=!1;;){if(!a){a=i.return;e:for(;;){if(null===a)throw Error(o(160));switch(n=a.stateNode,a.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}a=a.return}a=!0}if(5===i.tag||6===i.tag){e:for(var u=e,s=i,c=s;;)if(bu(u,c),null!==c.child&&4!==c.tag)c.child.return=c,c=c.child;else{if(c===s)break e;for(;null===c.sibling;){if(null===c.return||c.return===s)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}r?(u=n,s=i.stateNode,8===u.nodeType?u.parentNode.removeChild(s):u.removeChild(s)):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(bu(e,i),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(a=!1)}i.sibling.return=i.return,i=i.sibling}}function Eu(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3===(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}
vendor: 6,271 bytes, line 2
2while(r!==n)}return;case 1:case 12:case 17:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var i=null!==e?e.memoizedProps:r;e=t.type;var a=t.updateQueue;if(t.updateQueue=null,null!==a){for(n[Zr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),je(e,i),t=je(e,r),i=0;i<a.length;i+=2){var u=a[i],s=a[i+1];"style"===u?Oe(n,s):"dangerouslySetInnerHTML"===u?ye(n,s):"children"===u?ge(n,s):k(n,u,s,t)}switch(e){case"input":ne(n,r);break;case"textarea":ce(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(a=r.value)?oe(n,!!r.multiple,a,!1):e!==!!r.multiple&&(null!=r.defaultValue?oe(n,!!r.multiple,r.defaultValue,!0):oe(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(o(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,Ot(n.containerInfo)));case 13:return null!==t.memoizedState&&(Hu=qi(),gu(t.child,!0)),void Su(t);case 19:return void Su(t);case 23:case 24:return void gu(t,null!==t.memoizedState)}throw Error(o(163))}function Su(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new pu),t.forEach((function(t){var r=zs.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Tu(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var Iu=Math.ceil,Cu=w.ReactCurrentDispatcher,Au=w.ReactCurrentOwner,Ru=0,Nu=null,Pu=null,Du=0,Lu=0,Mu=ci(0),Fu=0,Uu=null,Vu=0,Bu=0,zu=0,qu=0,Wu=null,Hu=0,Ku=1/0;function Gu(){Ku=qi()+500}var $u,Qu=null,Yu=!1,Xu=null,Ju=null,Zu=!1,es=null,ts=90,ns=[],rs=[],is=null,as=0,os=null,us=-1,ss=0,cs=0,ls=null,fs=!1;function hs(){return 0!==(48&Ru)?qi():-1!==us?us:us=qi()}function ds(e){if(0===(2&(e=e.mode)))return 1;if(0===(4&e))return 99===Wi()?1:2;if(0===ss&&(ss=Vu),0!==Yi.transition){0!==cs&&(cs=null!==Wu?Wu.pendingLanes:0),e=ss;var t=4186112&~cs;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=Wi(),0!==(4&Ru)&&98===e?e=Vt(12,ss):e=Vt(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),ss),e}function ps(e,t,n){if(50<as)throw as=0,os=null,Error(o(185));if(null===(e=vs(e,t)))return null;qt(e,t,n),e===Nu&&(zu|=t,4===Fu&&gs(e,Du));var r=Wi();1===t?0!==(8&Ru)&&0===(48&Ru)?bs(e):(ms(e,n),0===Ru&&(Gu(),$i())):(0===(4&Ru)||98!==r&&99!==r||(null===is?is=new Set([e]):is.add(e)),ms(e,n)),Wu=e}function vs(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function ms(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,i=e.pingedLanes,a=e.expirationTimes,u=e.pendingLanes;0<u;){var s=31-Wt(u),c=1<<s,l=a[s];if(-1===l){if(0===(c&r)||0!==(c&i)){l=t,Mt(c);var f=Lt;a[s]=10<=f?l+250:6<=f?l+5e3:-1}}else l<=t&&(e.expiredLanes|=c);u&=~c}if(r=Ft(e,e===Nu?Du:0),t=Lt,0===r)null!==n&&(n!==Mi&&Si(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Mi&&Si(n)}15===t?(n=bs.bind(null,e),null===Ui?(Ui=[n],Vi=Ei(Ri,Qi)):Ui.push(n),n=Mi):14===t?n=Gi(99,bs.bind(null,e)):(n=function(e){switch(e){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(o(358,e))}}(t),n=Gi(n,ys.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function ys(e){if(us=-1,cs=ss=0,0!==(48&Ru))throw Error(o(327));var t=e.callbackNode;if(Ds()&&e.callbackNode!==t)return null;var n=Ft(e,e===Nu?Du:0);if(0===n)return null;var r=n,i=Ru;Ru|=16;var a=Es();for(Nu===e&&Du===r||(Gu(),_s(e,r));;)try{Is();break}catch(s){js(e,s)}if(na(),Cu.current=a,Ru=i,null!==Pu?r=0:(Nu=null,Du=0,r=Fu),0!==(Vu&zu))_s(e,0);else if(0!==r){if(2===r&&(Ru|=64,e.hydrate&&(e.hydrate=!1,Gr(e.containerInfo)),0!==(n=Ut(e))&&(r=Ss(e,n))),1===r)throw t=Uu,_s(e,0),gs(e,n),ms(e,qi()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(o(345));case 2:case 5:Rs(e);break;case 3:if(gs(e,n),(62914560&n)===n&&10<(r=Hu+500-qi())){if(0!==Ft(e,0))break;if(((i=e.suspendedLanes)&n)!==n){hs(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Hr(Rs.bind(null,e),r);break}Rs(e);break;case 4:if(gs(e,n),(4186112&n)===n)break;for(r=e.eventTimes,i=-1;0<n;){var u=31-Wt(n);a=1<<u,(u=r[u])>i&&(i=u),n&=~a}if(n=i,10<(n=(120>(n=qi()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Iu(n/1960))-n)){e.timeoutHandle=Hr(Rs.bind(null,e),n);break}Rs(e);break;default:throw Error(o(329))}}return ms(e,qi()),e.callbackNode===t?ys.bind(null,e):null}function gs(e,t){for(t&=~qu,t&=~zu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Wt(t),r=1<<n;e[n]=-1,t&=~r}}function bs(e){if(0!==(48&Ru))throw Error(o(327));if(Ds(),e===Nu&&0!==(e.expiredLanes&Du)){var t=Du,n=Ss(e,t);0!==(Vu&zu)&&(n=Ss(e,t=Ft(e,t)))}else n=Ss(e,t=Ft(e,0));if(0!==e.tag&&2===n&&(Ru|=64,e.hydrate&&(e.hydrate=!1,Gr(e.containerInfo)),0!==(t=Ut(e))&&(n=Ss(e,t))),1===n)throw n=Uu,_s(e,0),gs(e,t),ms(e,qi()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Rs(e),ms(e,qi()),null}function ks(e,t){var n=Ru;Ru|=1;try{return e(t)}finally{0===(Ru=n)&&(Gu(),$i())}}function ws(e,t){var n=Ru;Ru&=-2,Ru|=8;try{return e(t)}finally{0===(Ru=n)&&(Gu(),$i())}}function Os(e,t){fi(Mu,Lu),Lu|=t,Vu|=t}function xs(){Lu=Mu.current,li(Mu)}function _s(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Kr(n)),null!==Pu)for(n=Pu.return;null!==n;){var r=n;switch(r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&gi();break;case 3:Pa(),li(pi),li(di),Qa();break;case 5:La(r);break;case 4:Pa();break;case 13:case 19:li(Ma);break;case 10:ra(r);break;case 23:case 24:xs()}n=n.return}Nu=e,Pu=Ks(e.current,null),Du=Lu=Vu=t,Fu=0,Uu=null,qu=zu=Bu=0}function js(e,t){for(;;){var n=Pu;try{if(na(),Ya.current=Ro,no){for(var r=Za.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}no=!1}if(Ja=0,to=eo=Za=null,ro=!1,Au.current=null,null===n||null===n.return){Fu=1,Uu=t,Pu=null;break}e:{var a=e,o=n.return,u=n,s=t;
vendor: 4,446 bytes, line 2
2if(t=Du,u.flags|=2048,u.firstEffect=u.lastEffect=null,null!==s&&"object"===typeof s&&"function"===typeof s.then){var c=s;if(0===(2&u.mode)){var l=u.alternate;l?(u.updateQueue=l.updateQueue,u.memoizedState=l.memoizedState,u.lanes=l.lanes):(u.updateQueue=null,u.memoizedState=null)}var f=0!==(1&Ma.current),h=o;do{var d;if(d=13===h.tag){var p=h.memoizedState;if(null!==p)d=null!==p.dehydrated;else{var v=h.memoizedProps;d=void 0!==v.fallback&&(!0!==v.unstable_avoidThisFallback||!f)}}if(d){var m=h.updateQueue;if(null===m){var y=new Set;y.add(c),h.updateQueue=y}else m.add(c);if(0===(2&h.mode)){if(h.flags|=64,u.flags|=16384,u.flags&=-2981,1===u.tag)if(null===u.alternate)u.tag=17;else{var g=la(-1,1);g.tag=2,fa(u,g)}u.lanes|=1;break e}s=void 0,u=t;var b=a.pingCache;if(null===b?(b=a.pingCache=new fu,s=new Set,b.set(c,s)):void 0===(s=b.get(c))&&(s=new Set,b.set(c,s)),!s.has(u)){s.add(u);var k=Bs.bind(null,a,c,u);c.then(k,k)}h.flags|=4096,h.lanes=t;break e}h=h.return}while(null!==h);s=Error((G(u.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!==Fu&&(Fu=2),s=cu(s,u),h=o;do{switch(h.tag){case 3:a=s,h.flags|=4096,t&=-t,h.lanes|=t,ha(h,hu(0,a,t));break e;case 1:a=s;var w=h.type,O=h.stateNode;if(0===(64&h.flags)&&("function"===typeof w.getDerivedStateFromError||null!==O&&"function"===typeof O.componentDidCatch&&(null===Ju||!Ju.has(O)))){h.flags|=4096,t&=-t,h.lanes|=t,ha(h,du(h,a,t));break e}}h=h.return}while(null!==h)}As(n)}catch(x){t=x,Pu===n&&null!==n&&(Pu=n=n.return);continue}break}}function Es(){var e=Cu.current;return Cu.current=Ro,null===e?Ro:e}function Ss(e,t){var n=Ru;Ru|=16;var r=Es();for(Nu===e&&Du===t||_s(e,t);;)try{Ts();break}catch(i){js(e,i)}if(na(),Ru=n,Cu.current=r,null!==Pu)throw Error(o(261));return Nu=null,Du=0,Fu}function Ts(){for(;null!==Pu;)Cs(Pu)}function Is(){for(;null!==Pu&&!Ti();)Cs(Pu)}function Cs(e){var t=$u(e.alternate,e,Lu);e.memoizedProps=e.pendingProps,null===t?As(e):Pu=t,Au.current=null}function As(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(2048&t.flags)){if(null!==(n=uu(n,t,Lu)))return void(Pu=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!==(1073741824&Lu)||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!==e&&0===(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=su(t)))return n.flags&=2047,void(Pu=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(Pu=t);Pu=t=e}while(null!==t);0===Fu&&(Fu=5)}function Rs(e){var t=Wi();return Ki(99,Ns.bind(null,e,t)),null}function Ns(e,t){do{Ds()}while(null!==es);if(0!==(48&Ru))throw Error(o(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(o(177));e.callbackNode=null;var r=n.lanes|n.childLanes,i=r,a=e.pendingLanes&~i;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=i,e.mutableReadLanes&=i,e.entangledLanes&=i,i=e.entanglements;for(var u=e.eventTimes,s=e.expirationTimes;0<a;){var c=31-Wt(a),l=1<<c;i[c]=0,u[c]=-1,s[c]=-1,a&=~l}if(null!==is&&0===(24&r)&&is.has(e)&&is.delete(e),e===Nu&&(Pu=Nu=null,Du=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(i=Ru,Ru|=32,Au.current=null,Br=Qt,yr(u=mr())){if("selectionStart"in u)s={start:u.selectionStart,end:u.selectionEnd};else e:if(s=(s=u.ownerDocument)&&s.defaultView||window,(l=s.getSelection&&s.getSelection())&&0!==l.rangeCount){s=l.anchorNode,a=l.anchorOffset,c=l.focusNode,l=l.focusOffset;try{s.nodeType,c.nodeType}catch(E){s=null;break e}var f=0,h=-1,d=-1,p=0,v=0,m=u,y=null;t:for(;;){for(var g;m!==s||0!==a&&3!==m.nodeType||(h=f+a),m!==c||0!==l&&3!==m.nodeType||(d=f+l),3===m.nodeType&&(f+=m.nodeValue.length),null!==(g=m.firstChild);)y=m,m=g;for(;;){if(m===u)break t;if(y===s&&++p===a&&(h=f),y===c&&++v===l&&(d=f),null!==(g=m.nextSibling))break;y=(m=y).parentNode}m=g}s=-1===h||-1===d?null:{start:h,end:d}}else s=null;s=s||{start:0,end:0}}else s=null;zr={focusedElem:u,selectionRange:s},Qt=!1,ls=null,fs=!1,Qu=r;do{try{Ps()}
2catch(E){if(null===Qu)throw Error(o(330));Vs(Qu,E),Qu=Qu.nextEffect}}while(null!==Qu);ls=null,Qu=r;do{try{for(u=e;null!==Qu;){var b=Qu.flags;if(16&b&&ge(Qu.stateNode,""),128&b){var k=Qu.alternate;if(null!==k){var w=k.ref;null!==w&&("function"===typeof w?w(null):w.current=null)}}switch(1038&b){case 2:Ou(Qu),Qu.flags&=-3;break;case 6:Ou(Qu),Qu.flags&=-3,Eu(Qu.alternate,Qu);break;case 1024:Qu.flags&=-1025;break;case 1028:Qu.flags&=-1025,Eu(Qu.alternate,Qu);break;case 4:Eu(Qu.alternate,Qu);break;case 8:ju(u,s=Qu);var O=s.alternate;ku(s),null!==O&&ku(O)}Qu=Qu.nextEffect}}catch(E){if(null===Qu)throw Error(o(330));Vs(Qu,E),Qu=Qu.nextEffect}}while(null!==Qu);if(w=zr,k=mr(),b=w.focusedElem,u=w.selectionRange,k!==b&&b&&b.ownerDocument&&vr(b.ownerDocument.documentElement,b)){null!==u&&yr(b)&&(k=u.start,void 0===(w=u.end)&&(w=k),"selectionStart"in b?(b.selectionStart=k,b.selectionEnd=Math.min(w,b.value.length)):(w=(k=b.ownerDocument||document)&&k.defaultView||window).getSelection&&(w=w.getSelection(),s=b.textContent.length,O=Math.min(u.start,s),u=void 0===u.end?O:Math.min(u.end,s),!w.extend&&O>u&&(s=u,u=O,O=s),s=pr(b,O),a=pr(b,u),s&&a&&(1!==w.rangeCount||w.anchorNode!==s.node||w.anchorOffset!==s.offset||w.focusNode!==a.node||w.focusOffset!==a.offset)&&((k=k.createRange()).setStart(s.node,s.offset),w.removeAllRanges(),O>u?(w.addRange(k),w.extend(a.node,a.offset)):(k.setEnd(a.node,a.offset),w.addRange(k))))),k=[];for(w=b;w=w.parentNode;)1===w.nodeType&&k.push({element:w,left:w.scrollLeft,top:w.scrollTop});for("function"===typeof b.focus&&b.focus(),b=0;b<k.length;b++)(w=k[b]).element.scrollLeft=w.left,w.element.scrollTop=w.top}Qt=!!Br,zr=Br=null,e.current=n,Qu=r;do{try{for(b=e;null!==Qu;){var x=Qu.flags;if(36&x&&yu(b,Qu.alternate,Qu),128&x){k=void 0;var _=Qu.ref;if(null!==_){var j=Qu.stateNode;Qu.tag,k=j,"function"===typeof _?_(k):_.current=k}}Qu=Qu.nextEffect}}catch(E){if(null===Qu)throw Error(o(330));Vs(Qu,E),Qu=Qu.nextEffect}}while(null!==Qu);Qu=null,Fi(),Ru=i}else e.current=n;if(Zu)Zu=!1,es=e,ts=t;else for(Qu=r;null!==Qu;)t=Qu.nextEffect,Qu.nextEffect=null,8&Qu.flags&&((x=Qu).sibling=null,x.stateNode=null),Qu=t;if(0===(r=e.pendingLanes)&&(Ju=null),1===r?e===os?as++:(as=0,os=e):as=0,n=n.stateNode,_i&&"function"===typeof _i.onCommitFiberRoot)try{_i.onCommitFiberRoot(xi,n,void 0,64===(64&n.current.flags))}catch(E){}if(ms(e,qi()),Yu)throw Yu=!1,e=Xu,Xu=null,e;return 0!==(8&Ru)||$i(),null}function Ps(){for(;null!==Qu;){var e=Qu.alternate;fs||null===ls||(0!==(8&Qu.flags)?et(Qu,ls)&&(fs=!0):13===Qu.tag&&Tu(e,Qu)&&et(Qu,ls)&&(fs=!0));var t=Qu.flags;0!==(256&t)&&mu(e,Qu),0===(512&t)||Zu||(Zu=!0,Gi(97,(function(){return Ds(),null}))),Qu=Qu.nextEffect}}function Ds(){if(90!==ts){var e=97<ts?97:ts;return ts=90,Ki(e,Fs)}return!1}function Ls(e,t){ns.push(t,e),Zu||(Zu=!0,Gi(97,(function(){return Ds(),null})))}function Ms(e,t){rs.push(t,e),Zu||(Zu=!0,Gi(97,(function(){return Ds(),null})))}function Fs(){if(null===es)return!1;var e=es;if(es=null,0!==(48&Ru))throw Error(o(331));var t=Ru;Ru|=32;var n=rs;rs=[];for(var r=0;r<n.length;r+=2){var i=n[r],a=n[r+1],u=i.destroy;if(i.destroy=void 0,"function"===typeof u)try{u()}catch(c){if(null===a)throw Error(o(330));Vs(a,c)}}for(n=ns,ns=[],r=0;r<n.length;r+=2){i=n[r],a=n[r+1];try{var s=i.create;i.destroy=s()}catch(c){if(null===a)throw Error(o(330));Vs(a,c)}}for(s=e.current.firstEffect;null!==s;)e=s.nextEffect,s.nextEffect=null,8&s.flags&&(s.sibling=null,s.stateNode=null),s=e;return Ru=t,$i(),!0}function Us(e,t,n){fa(e,t=hu(0,t=cu(n,t),1)),t=hs(),null!==(e=vs(e,1))&&(qt(e,1,t),ms(e,t))}function Vs(e,t){if(3===e.tag)Us(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Us(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Ju||!Ju.has(r))){var i=du(n,e=cu(t,e),1);if(fa(n,i),i=hs(),null!==(n=vs(n,1)))qt(n,1,i),ms(n,i);else if("function"===typeof r.componentDidCatch&&(null===Ju||!Ju.has(r)))try{r.componentDidCatch(t,e)}catch(a){}break}}n=n.return}}function Bs(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=hs(),e.pingedLanes|=e.suspendedLanes&n,Nu===e&&(Du&n)===n&&(4===Fu||3===Fu&&(62914560&Du)===Du&&500>qi()-Hu?_s(e,0):qu|=n),ms(e,t)}function zs(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0===(2&(t=e.mode))?t=1:0===(4&t)?t=99===Wi()?1:2:(0===ss&&(ss=Vu),0===(t=Bt(62914560&~ss))&&(t=4194304))),n=hs(),null!==(e=vs(e,t))&&(qt(e,t,n),ms(e,n
vendor: 8,325 bytes, line 2
2))}function qs(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Ws(e,t,n,r){return new qs(e,t,n,r)}function Hs(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ks(e,t){var n=e.alternate;return null===n?((n=Ws(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Gs(e,t,n,r,i,a){var u=2;if(r=e,"function"===typeof e)Hs(e)&&(u=1);else if("string"===typeof e)u=5;else e:switch(e){case _:return $s(n.children,i,a,t);case L:u=8,i|=16;break;case j:u=8,i|=1;break;case E:return(e=Ws(12,n,t,8|i)).elementType=E,e.type=E,e.lanes=a,e;case C:return(e=Ws(13,n,t,i)).type=C,e.elementType=C,e.lanes=a,e;case A:return(e=Ws(19,n,t,i)).elementType=A,e.lanes=a,e;case M:return Qs(n,i,a,t);case F:return(e=Ws(24,n,t,i)).elementType=F,e.lanes=a,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case S:u=10;break e;case T:u=9;break e;case I:u=11;break e;case R:u=14;break e;case N:u=16,r=null;break e;case P:u=22;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Ws(u,n,t,i)).elementType=e,t.type=r,t.lanes=a,t}function $s(e,t,n,r){return(e=Ws(7,e,r,t)).lanes=n,e}function Qs(e,t,n,r){return(e=Ws(23,e,r,t)).elementType=M,e.lanes=n,e}function Ys(e,t,n){return(e=Ws(6,e,null,t)).lanes=n,e}function Xs(e,t,n){return(t=Ws(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Js(e,t,n){this.tag=t,this.containerInfo=e,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=zt(0),this.expirationTimes=zt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zt(0),this.mutableSourceEagerHydrationData=null}function Zs(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:x,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function ec(e,t,n,r){var i=t.current,a=hs(),u=ds(i);e:if(n){t:{if(Ye(n=n._reactInternals)!==n||1!==n.tag)throw Error(o(170));var s=n;do{switch(s.tag){case 3:s=s.stateNode.context;break t;case 1:if(yi(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break t}}s=s.return}while(null!==s);throw Error(o(171))}if(1===n.tag){var c=n.type;if(yi(c)){n=ki(n,c,s);break e}}n=s}else n=hi;return null===t.context?t.context=n:t.pendingContext=n,(t=la(a,u)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),fa(i,t),ps(i,u,a),u}function tc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function nc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function rc(e,t){nc(e,t),(e=e.alternate)&&nc(e,t)}function ic(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new Js(e,t,null!=n&&!0===n.hydrate),t=Ws(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,sa(t),e[ei]=n.current,Rr(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var i=(t=r[e])._getVersion;i=i(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,i]:n.mutableSourceEagerHydrationData.push(t,i)}this._internalRoot=n}function ac(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function oc(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a._internalRoot;if("function"===typeof i){var u=i;i=function(){var e=tc(o);u.call(e)}}ec(t,o,e,i)}else{if(a=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new ic(e,0,t?{hydrate:!0}:void 0)}(n,r),o=a._internalRoot,"function"===typeof i){var s=i;i=function(){var e=tc(o);s.call(e)}}ws((function(){ec(t,o,e,i)}))}return tc(o)}function uc(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ac(t))throw Error(o(200));return Zs(e,t,null,n)}$u=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||pi.current)Mo=!0;else{if(0===(n&r)){switch(Mo=!1,t.tag){case 3:Go(t),Ga();break;case 5:Da(t);break;case 1:yi(t.type)&&wi(t);break;case 4:Na(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var i=t.type._context;fi(Ji,i._currentValue),i._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(n&t.child.childLanes)?Jo(e,t,n):(fi(Ma,1&Ma.current),null!==(t=au(e,t,n))?t.sibling:null);fi(Ma,1&Ma.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(64&e.flags)){if(r)return iu(e,t,n);t.flags|=64}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),fi(Ma,Ma.current),r)break;return null;case 23:case 24:return t.lanes=0,zo(e,t,n)}return au(e,t,n)}Mo=0!==(16384&e.flags)}else Mo=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=mi(t,di.current),aa(t,n),i=oo(null,t,r,e,i,n),t.flags|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,yi(r)){var a=!0;wi(t)}else a=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,sa(t);var u=r.getDerivedStateFromProps;"function"===typeof u&&ma(t,r,u,e),i.updater=ya,t.stateNode=i,i._reactInternals=t,wa(t,r,e,n),t=Ko(null,t,r,!0,a,n)}else t.tag=0,Fo(null,t,i,n),t=t.child;return t;case 16:i=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=(a=i._init)(i._payload),t.type=i,a=t.tag=function(e){if("function"===typeof e)return Hs(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===I)return 11;if(e===R)return 14}return 2}(i),e=Xi(i,e),a){case 0:t=Wo(null,t,i,e,n);break e;case 1:t=Ho(null,t,i,e,n);break e;case 11:t=Uo(null,t,i,e,n);break e;case 14:t=Vo(null,t,i,Xi(i.type,e),r,n);break e}throw Error(o(306,i,""))}return t;case 0:return r=t.type,i=t.pendingProps,Wo(e,t,r,i=t.elementType===r?i:Xi(r,i),n);case 1:return r=t.type,i=t.pendingProps,Ho(e,t,r,i=t.elementType===r?i:Xi(r,i),n);case 3:if(Go(t),r=t.updateQueue,null===e||null===r)throw Error(o(282));if(r=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,ca(e,t),da(t,r,null,n),(r=t.memoizedState.element)===i)Ga(),t=au(e,t,n);else{if((a=(i=t.stateNode).hydrate)&&(Va=$r(t.stateNode.containerInfo.firstChild),Ua=t,a=Ba=!0),a){if(null!=(e=i.mutableSourceEagerHydrationData))for(i=0;i<e.length;i+=2)(a=e[i])._workInProgressVersionPrimary=e[i+1],$a.push(a);for(n=Sa(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Fo(e,t,r,n),Ga();t=t.child}return t;case 5:return Da(t),null===e&&Wa(t),r=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,u=i.children,Wr(r,i)?u=null:null!==a&&Wr(r,a)&&(t.flags|=16),qo(e,t),Fo(e,t,u,n),t.child;case 6:return null===e&&Wa(t),null;case 13:return Jo(e,t,n);case 4:return Na(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Ea(t,null,r,n):Fo(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Uo(e,t,r,i=t.elementType===r?i:Xi(r,i),n);case 7:return Fo(e,t,t.pendingProps,n),t.child;case 8:case 12:return Fo(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,i=t.pendingProps,u=t.memoizedProps,a=i.value;var s=t.type._context;if(fi(Ji,s._currentValue),s._currentValue=a,null!==u)if(s=u.value,0===(a=lr(s,a)?0:0|("function"===typeof r._calculateChangedBits?r._
vendor: 10,931 bytes, line 2
2calculateChangedBits(s,a):1073741823))){if(u.children===i.children&&!pi.current){t=au(e,t,n);break e}}else for(null!==(s=t.child)&&(s.return=t);null!==s;){var c=s.dependencies;if(null!==c){u=s.child;for(var l=c.firstContext;null!==l;){if(l.context===r&&0!==(l.observedBits&a)){1===s.tag&&((l=la(-1,n&-n)).tag=2,fa(s,l)),s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),ia(s.return,n),c.lanes|=n;break}l=l.next}}else u=10===s.tag&&s.type===t.type?null:s.child;if(null!==u)u.return=s;else for(u=s;null!==u;){if(u===t){u=null;break}if(null!==(s=u.sibling)){s.return=u.return,u=s;break}u=u.return}s=u}Fo(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=(a=t.pendingProps).children,aa(t,n),r=r(i=oa(i,a.unstable_observedBits)),t.flags|=1,Fo(e,t,r,n),t.child;case 14:return a=Xi(i=t.type,t.pendingProps),Vo(e,t,i,a=Xi(i.type,a),r,n);case 15:return Bo(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Xi(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,yi(r)?(e=!0,wi(t)):e=!1,aa(t,n),ba(t,r,i),wa(t,r,i,n),Ko(null,t,r,!0,e,n);case 19:return iu(e,t,n);case 23:case 24:return zo(e,t,n)}throw Error(o(156,t.tag))},ic.prototype.render=function(e){ec(e,this._internalRoot,null,null)},ic.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;ec(null,e,null,(function(){t[ei]=null}))},tt=function(e){13===e.tag&&(ps(e,4,hs()),rc(e,4))},nt=function(e){13===e.tag&&(ps(e,67108864,hs()),rc(e,67108864))},rt=function(e){if(13===e.tag){var t=hs(),n=ds(e);ps(e,n,t),rc(e,n)}},it=function(e,t){return t()},Se=function(e,t,n){switch(t){case"input":if(ne(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=ai(r);if(!i)throw Error(o(90));X(r),ne(r,i)}}}break;case"textarea":ce(e,n);break;case"select":null!=(t=n.value)&&oe(e,!!n.multiple,t,!1)}},Ne=ks,Pe=function(e,t,n,r,i){var a=Ru;Ru|=4;try{return Ki(98,e.bind(null,t,n,r,i))}finally{0===(Ru=a)&&(Gu(),$i())}},De=function(){0===(49&Ru)&&(function(){if(null!==is){var e=is;is=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,ms(e,qi())}))}$i()}(),Ds())},Le=function(e,t){var n=Ru;Ru|=2;try{return e(t)}finally{0===(Ru=n)&&(Gu(),$i())}};var sc={Events:[ri,ii,ai,Ae,Re,Ds,{current:!1}]},cc={findFiberByHostInstance:ni,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},lc={bundleType:cc.bundleType,version:cc.version,rendererPackageName:cc.rendererPackageName,rendererConfig:cc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ze(e))?null:e.stateNode},findFiberByHostInstance:cc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var fc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fc.isDisabled&&fc.supportsFiber)try{xi=fc.inject(lc),_i=fc}catch(me){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=sc,t.createPortal=uc,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(o(188));throw Error(o(268,Object.keys(e)))}return e=null===(e=Ze(t))?null:e.stateNode},t.flushSync=function(e,t){var n=Ru;if(0!==(48&n))return e(t);Ru|=1;try{if(e)return Ki(99,e.bind(null,t))}finally{Ru=n,$i()}},t.hydrate=function(e,t,n){if(!ac(t))throw Error(o(200));return oc(null,e,t,!0,n)},t.render=function(e,t,n){if(!ac(t))throw Error(o(200));return oc(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!ac(e))throw Error(o(40));return!!e._reactRootContainer&&(ws((function(){oc(null,null,e,!1,(function(){e._reactRootContainer=null,e[ei]=null}))})),!0)},t.unstable_batchedUpdates=ks,t.unstable_createPortal=function(e,t){return uc(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ac(n))throw Error(o(200));if(null==e||void 0===e._reactInternals)throw Error(o(38));return oc(e,t,n,!1,r)},t.version="17.0.2"},function(e,t,n){"use strict";e.exports=n(125)},function(e,t,n){"use strict";var r,i,a,o;if("object"===typeof performance&&"function"===typeof performance.now){var u=performance;t.unstable_now=function(){return u.now()}}else{var s=Date,c=s.now();t.unstable_now=function(){return s.now()-c}}if("undefined"===typeof window||"function"!==typeof MessageChannel){var l=null,f=null,h=function e(){if(null!==l)try{var n=t.unstable_now();l(!0,n),l=null}catch(r){throw setTimeout(e,0),r}};r=function(e){null!==l?setTimeout(r,0,e):(l=e,setTimeout(h,0))},i=function(e,t){f=setTimeout(e,t)},a=function(){clearTimeout(f)},t.unstable_shouldYield=function(){return!1},o=t.unstable_forceFrameRate=function(){}}else{var d=window.setTimeout,p=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 m=!1,y=null,g=-1,b=5,k=0;t.unstable_shouldYield=function(){return t.unstable_now()>=k},o=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):b=0<e?Math.floor(1e3/e):5};var w=new MessageChannel,O=w.port2;w.port1.onmessage=function(){if(null!==y){var e=t.unstable_now();k=e+b;try{y(!0,e)?O.postMessage(null):(m=!1,y=null)}catch(n){throw O.postMessage(null),n}}else m=!1},r=function(e){y=e,m||(m=!0,O.postMessage(null))},i=function(e,n){g=d((function(){e(t.unstable_now())}),n)},a=function(){p(g),g=-1}}function x(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,i=e[r];if(!(void 0!==i&&0<E(i,t)))break e;e[r]=t,e[n]=i,n=r}}function _(e){return void 0===(e=e[0])?null:e}function j(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length;r<i;){var a=2*(r+1)-1,o=e[a],u=a+1,s=e[u];if(void 0!==o&&0>E(o,n))void 0!==s&&0>E(s,o)?(e[r]=s,e[u]=n,r=u):(e[r]=o,e[a]=n,r=a);else{if(!(void 0!==s&&0>E(s,n)))break e;e[r]=s,e[u]=n,r=u}}}return t}return null}function E(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var S=[],T=[],I=1,C=null,A=3,R=!1,N=!1,P=!1;function D(e){for(var t=_(T);null!==t;){if(null===t.callback)j(T);else{if(!(t.startTime<=e))break;j(T),t.sortIndex=t.expirationTime,x(S,t)}t=_(T)}}function L(e){if(P=!1,D(e),!N)if(null!==_(S))N=!0,r(M);else{var t=_(T);null!==t&&i(L,t.startTime-e)}}function M(e,n){N=!1,P&&(P=!1,a()),R=!0;var r=A;try{for(D(n),C=_(S);null!==C&&(!(C.expirationTime>n)||e&&!t.unstable_shouldYield());){var o=C.callback;if("function"===typeof o){C.callback=null,A=C.priorityLevel;var u=o(C.expirationTime<=n);n=t.unstable_now(),"function"===typeof u?C.callback=u:C===_(S)&&j(S),D(n)}else j(S);C=_(S)}if(null!==C)var s=!0;else{var c=_(T);null!==c&&i(L,c.startTime-n),s=!1}return s}finally{C=null,A=r,R=!1}}var F=o;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){N||R||(N=!0,r(M))},t.unstable_getCurrentPriorityLevel=function(){return A},t.unstable_getFirstCallbackNode=function(){return _(S)},t.unstable_next=function(e){switch(A){case 1:case 2:case 3:var t=3;break;default:t=A}var n=A;A=t;try{return e()}finally{A=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=F,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=A;A=e;try{return t()}finally{A=n}},t.unstable_scheduleCallback=function(e,n,o){var u=t.unstable_now();switch("object"===typeof o&&null!==o?o="number"===typeof(o=o.delay)&&0<o?u+o:u:o=u,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:I++,callback:n,priorityLevel:e,startTime:o,expirationTime:s=o+s,sortIndex:-1},o>u?(e.sortIndex=o,x(T,e),null===_(S)&&e===_(T)&&(P?a():P=!0,i(L,o-u))):(e.sortIndex=s,x(S,e),N||R||(N=!0,r(M))),e},t.unstable_wrapCallback=function(e){var t=A;return function(){var n=A;A=t;try{return e.apply(this,arguments)}finally{A=n}}}},function(e,t,n){"use strict";var r=n(127);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var u=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 u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";n(88);var r=n(1),i=60103;if(t.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var a=Symbol.for;i=a("react.element"),t.Fragment=a("react.fragment")}var o=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u=Object.prototype.hasOwnProperty,s={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,a={},c=null,l=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(l=t.ref),t)u.call(t,r)&&!s.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===a[r]&&(a[r]=t[r]);return{$$typeof:i,type:e,key:c,ref:l,props:a,_owner:o.current}}t.jsx=c,t.jsxs=c},function(e,t,n){"use strict";var r=n(130);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var u=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 u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i}
2;return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},function(e,t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,u=r?Symbol.for("react.strict_mode"):60108,s=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,d=r?Symbol.for("react.forward_ref"):60112,p=r?Symbol.for("react.suspense"):60113,v=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,y=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,k=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function O(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case f:case h:case o:case s:case u:case p:return e;default:switch(e=e&&e.$$typeof){case l:case d:case y:case m:case c:return e;default:return t}}case a:return t}}}function x(e){return O(e)===h}t.AsyncMode=f,t.ConcurrentMode=h,t.ContextConsumer=l,t.ContextProvider=c,t.Element=i,t.ForwardRef=d,t.Fragment=o,t.Lazy=y,t.Memo=m,t.Portal=a,t.Profiler=s,t.StrictMode=u,t.Suspense=p,t.isAsyncMode=function(e){return x(e)||O(e)===f},t.isConcurrentMode=x,t.isContextConsumer=function(e){return O(e)===l},t.isContextProvider=function(e){return O(e)===c},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return O(e)===d},t.isFragment=function(e){return O(e)===o},t.isLazy=function(e){return O(e)===y},t.isMemo=function(e){return O(e)===m},t.isPortal=function(e){return O(e)===a},t.isProfiler=function(e){return O(e)===s},t.isStrictMode=function(e){return O(e)===u},t.isSuspense=function(e){return O(e)===p},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===o||e===h||e===s||e===u||e===p||e===v||"object"===typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===m||e.$$typeof===c||e.$$typeof===l||e.$$typeof===d||e.$$typeof===b||e.$$typeof===k||e.$$typeof===w||e.$$typeof===g)},t.typeOf=O},function(e,t,n){var r=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,i="function"===typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(A){s=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),o=new T(r||[]);return a._invoke=function(e,t,n){var r=f;return function(i,a){if(r===d)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw a;return C()}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var u=j(o,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var s=l(e,t,n);if("normal"===s.type){if(r=n.done?p:h,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=p,n.method="throw",n.arg=s.arg)}}}(e,n,o),a}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(A){return{type:"throw",arg:A}}}e.wrap=c;var f="suspendedStart",h="suspendedYield",d="executing",p="completed",v={};function m(){}function y(){}function g(){}var b={};s(b,a,(function(){return this}));var k=Object.getPrototypeOf,w=k&&k(k(I([])));w&&w!==n&&r.call(w,a)&&(b=w);var O=g.prototype=m.prototype=Object.create(b);function x(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(i,a,o,u){var s=l(e[i],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"===typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,o,u)}),(function(e){n("throw",e,o,u)})):t.resolve(f).then((function(e){c.value=e,o(c)}),(function(e){return n("throw",e,o,u)}))}u(s.arg)}var i;this._invoke=function(e,r){function a(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(a,a):a()}}function j(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&
vendor: 1,520 bytes, line 2
2(n.method="return",n.arg=t,j(e,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,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function I(e){if(e){var n=e[a];if(n)return n.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}return{next:C}}function C(){return{value:t,done:!0}}return y.prototype=g,s(O,"constructor",g),s(g,"constructor",y),y.displayName=s(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,s(e,u,"GeneratorFunction")),e.prototype=Object.create(O),e},e.awrap=function(e){return{__await:e}}
2,x(_.prototype),s(_.prototype,o,(function(){return this})),e.AsyncIterator=_,e.async=function(t,n,r,i,a){void 0===a&&(a=Promise);var o=new _(c(t,n,r,i),a);return e.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},x(O),s(O,u,"Generator"),s(O,a,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=I,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(S),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],u=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),c=r.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){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 a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),S(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;S(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:I(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=r}catch(i){"object"===typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},function(e,t){var n,r,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"===typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var s,c=[],l=!1,f=-1;function h(){l&&s&&(l=!1,s.length?c=s.concat(c):f=-1,c.length&&d())}function d(){if(!l){var e=u(h);l=!0;for(var t=c.length;t;){for(s=c,c=[];++f<t;)s&&s[f].run();f=-1,t=c.length}s=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function v(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new p(e,t)),1!==c.length||l||u(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){"use strict";n(136)},function(e,t,n){"use strict";(function(e){var t=n(0),r=n.n(t),i=n(2),a=n(4),o=n(3),u=n(41),s=n(10),c=n(26),l=n(8);function f(){var e;return(null===(e=null===self||void 0===self?void 0:self.location)||void 0===e?void 0:e.protocol)||null}function h(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object(l.m)();return!("file:"!==f()&&"ionic:"!==f()&&"capacitor:"!==f()||!e.toLowerCase().match(/iphone|ipad|ipod|android/))}function d(){return Object(l.r)()&&11===(null===document||void 0===document?void 0:document.documentMode)}function p(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object(l.m)();return/Edge\/\d+/.test(e)}function v(){try{var e=self.localStorage,t=s.s();if(e)return e.setItem(t,"1"),e.removeItem(t),!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object(l.m)();return d()||p(e)}()||Object(l.s)()}catch(n){return m()&&Object(l.s)()}return!1}function m(){return"undefined"!==typeof e&&"WorkerGlobalScope"in e&&"importScripts"in e}function y(){return("http:"===f()||"https:"===f()||Object(l.o)()||h())&&!(Object(l.v)()||Object(l.u)())&&v()&&!m()}function g(){return h()&&"undefined"!==typeof document}function b(){return k.apply(this,arguments)}function k(){return(k=Object(o.a)(r.a.mark((function e(){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(g()){e.next=2;break}return e.abrupt("return",!1);case 2:return e.abrupt("return",new Promise((function(e){var t=setTimeout((function(){e(!1)}),1e3);document.addEventListener("deviceready",(function(){clearTimeout(t),e(!0)}))})));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var w={LOCAL:"local",NONE:"none",SESSION:"session"},O=s.p,x="persistence";
2function _(e,t){O(Object.values(w).includes(t),e,"invalid-persistence-type"),Object(l.v)()?O(t!==w.SESSION,e,"unsupported-persistence-type"):Object(l.u)()?O(t===w.NONE,e,"unsupported-persistence-type"):m()?O(t===w.NONE||t===w.LOCAL&&Object(l.s)(),e,"unsupported-persistence-type"):O(t===w.NONE||v(),e,"unsupported-persistence-type")}function j(e){return E.apply(this,arguments)}function E(){return(E=Object(o.a)(r.a.mark((function e(t){var n,i;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t._initializationPromise;case 2:n=S(),i=s.w(x,t.config.apiKey,t.name),n&&n.setItem(i,t._getPersistence());case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function S(){var e;try{return(null===(e="undefined"!==typeof window?window:null)||void 0===e?void 0:e.sessionStorage)||null}catch(t){return null}}var T=s.p,I=function(){function e(){Object(i.a)(this,e),this.browserResolver=s.t(s.A),this.cordovaResolver=s.t(s.F),this.underlyingResolver=null,this._redirectPersistence=s.B,this._completeRedirectFn=s.u,this._overrideRedirectResult=s.v}return Object(a.a)(e,[{key:"_initialize",value:function(){var e=Object(o.a)(r.a.mark((function e(t){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.selectUnderlyingResolver();case 2:return e.abrupt("return",this.assertedUnderlyingResolver._initialize(t));case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_openPopup",value:function(){var e=Object(o.a)(r.a.mark((function e(t,n,i,a){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.selectUnderlyingResolver();case 2:return e.abrupt("return",this.assertedUnderlyingResolver._openPopup(t,n,i,a));case 3:case"end":return e.stop()}}),e,this)})));return function(t,n,r,i){return e.apply(this,arguments)}}()},{key:"_openRedirect",value:function(){var e=Object(o.a)(r.a.mark((function e(t,n,i,a){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.selectUnderlyingResolver();case 2:return e.abrupt("return",this.assertedUnderlyingResolver._openRedirect(t,n,i,a));case 3:case"end":return e.stop()}}),e,this)})));return function(t,n,r,i){return e.apply(this,arguments)}}()},{key:"_isIframeWebStorageSupported",value:function(e,t){this.assertedUnderlyingResolver._isIframeWebStorageSupported(e,t)}},{key:"_originValidation",value:function(e){return this.assertedUnderlyingResolver._originValidation(e)}},{key:"_shouldInitProactively",get:function(){return g()||this.browserResolver._shouldInitProactively}},{key:"assertedUnderlyingResolver",get:function(){return T(this.underlyingResolver,"internal-error"),this.underlyingResolver}},{key:"selectUnderlyingResolver",value:function(){var e=Object(o.a)(r.a.mark((function e(){var t;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.underlyingResolver){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,b();case 4:t=e.sent,this.underlyingResolver=t?this.cordovaResolver:this.browserResolver;case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}();function C(e){return e.unwrap()}function A(e){var t=(e instanceof l.c?e.customData:e)._tokenResponse;if(!t)return null;if(!(e instanceof l.c)&&"temporaryProof"in t&&"phoneNumber"in t)return s.i.credentialFromResult(e);var n,r=t.providerId;if(!r||r===s.k.PASSWORD)return null;switch(r){case s.k.GOOGLE:n=s.f;break;case s.k.FACEBOOK:n=s.d;break;case s.k.GITHUB:n=s.e;break;case s.k.TWITTER:n=s.o;break;default:var i=t.oauthIdToken,a=t.oauthAccessToken,o=t.oauthTokenSecret,u=t.pendingToken,c=t.nonce;return a||o||i||u?u?r.startsWith("saml.")?s.m._create(r,u):s.g._fromParams({providerId:r,signInMethod:r,pendingToken:u,idToken:i,accessToken:a}):new s.h(r).credential({idToken:i,accessToken:a,rawNonce:c}):null}return e instanceof l.c?n.credentialFromError(e):n.credentialFromResult(e)}function R(e,t){return t.catch((function(t){throw t instanceof l.c&&function(e,t){var n,r=null===(n=t.customData)||void 0===n?void 0:n._tokenResponse;if("auth/multi-factor-auth-required"===t.code)t.resolver=new D(e,s.K(e,t));else if(r){var i=A(t),a=t;i&&(a.credential=i,a.tenantId=r.tenantId||void 0,a.email=r.email||void 0,a.phoneNumber=r.phoneNumber||void 0)}}(e,t),t})).then((function(e){var t,n=e.operationType,r=e.user;return{operationType:n,credential:(t=e,A(t)),additionalUserInfo:s.J(e),user:L.getOrCreate(r)}}))}function N(e,t){return P.apply(this,arguments)}function P(){return(P=Object(o.a)(r.a.mark((function e(t,n){var i;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n;case 2:return i=e.sent,e.abrupt("return",{verificationId:i.verificationId,confirm:function(e){return R(t,i.confirm(e))}});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var D=function(){function e(t,n){Object(i.a)(this,e),this.resolver=n,this.auth=t.wrapped()}return Object(a.a)(e,[{key:"session",get:function(){return this.resolver.session}},{key:"hints",get:function(){return this.resolver.hints}},{key:"resolveSignIn",value:function(e){return R(C(this.auth),this.resolver.resolveSignIn(e))}}]),e}(),L=function(){function e(t){Object(i.a)(this,e),this._delegate=t,this.multiFactor=s.T(t)}
2return Object(a.a)(e,[{key:"delete",value:function(){return this._delegate.delete()}},{key:"reload",value:function(){return this._delegate.reload()}},{key:"toJSON",value:function(){return this._delegate.toJSON()}},{key:"getIdTokenResult",value:function(e){return this._delegate.getIdTokenResult(e)}},{key:"getIdToken",value:function(e){return this._delegate.getIdToken(e)}},{key:"linkAndRetrieveDataWithCredential",value:function(e){return this.linkWithCredential(e)}},{key:"linkWithCredential",value:function(){var e=Object(o.a)(r.a.mark((function e(t){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",R(this.auth,s.P(this._delegate,t)));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"linkWithPhoneNumber",value:function(){var e=Object(o.a)(r.a.mark((function e(t,n){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",N(this.auth,s.Q(this._delegate,t,n)));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"linkWithPopup",value:function(){var e=Object(o.a)(r.a.mark((function e(t){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",R(this.auth,s.R(this._delegate,t,I)));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"linkWithRedirect",value:function(){var e=Object(o.a)(r.a.mark((function e(t){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,j(s.q(this.auth));case 2:return e.abrupt("return",s.S(this._delegate,t,I));case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"reauthenticateAndRetrieveDataWithCredential",value:function(e){return this.reauthenticateWithCredential(e)}},{key:"reauthenticateWithCredential",value:function(){var e=Object(o.a)(r.a.mark((function e(t){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",R(this.auth,s.U(this._delegate,t)));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"reauthenticateWithPhoneNumber",value:function(e,t){return N(this.auth,s.V(this._delegate,e,t))}},{key:"reauthenticateWithPopup",value:function(e){return R(this.auth,s.W(this._delegate,e,I))}},{key:"reauthenticateWithRedirect",value:function(){var e=Object(o.a)(r.a.mark((function e(t){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,j(s.q(this.auth));case 2:return e.abrupt("return",s.X(this._delegate,t,I));case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"sendEmailVerification",value:function(e){return s.Y(this._delegate,e)}},{key:"unlink",value:function(){var e=Object(o.a)(r.a.mark((function e(t){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.jb(this._delegate,t);case 2:return e.abrupt("return",this);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"updateEmail",value:function(e){return s.kb(this._delegate,e)}},{key:"updatePassword",value:function(e){return s.lb(this._delegate,e)}},{key:"updatePhoneNumber",value:function(e){return s.mb(this._delegate,e)}},{key:"updateProfile",value:function(e){return s.nb(this._delegate,e)}},{key:"verifyBeforeUpdateEmail",value:function(e,t){return s.ob(this._delegate,e,t)}},{key:"emailVerified",get:function(){return this._delegate.emailVerified}},{key:"isAnonymous",get:function(){return this._delegate.isAnonymous}},{key:"metadata",get:function(){return this._delegate.metadata}},{key:"phoneNumber",get:function(){return this._delegate.phoneNumber}},{key:"providerData",get:function(){return this._delegate.providerData}},{key:"refreshToken",get:function(){return this._delegate.refreshToken}},{key:"tenantId",get:function(){return this._delegate.tenantId}},{key:"displayName",get:function(){return this._delegate.displayName}},{key:"email",get:function(){return this._delegate.email}},{key:"photoURL",get:function(){return this._delegate.photoURL}},{key:"providerId",get:function(){return this._delegate.providerId}},{key:"uid",get:function(){return this._delegate.uid}},{key:"auth",get:function(){return this._delegate.auth}}],[{key:"getOrCreate",value:function(t){return e.USER_MAP.has(t)||e.USER_MAP.set(t,new e(t)),e.USER_MAP.get(t)}}]),e}();L.USER_MAP=new WeakMap;var M=s.p,F=function(){function e(t,n){if(Object(i.a)(this,e),this.app=t,n.isInitialized())return this._delegate=n.getImmediate(),void this.linkUnderlyingAuth();var r=t.options.apiKey;
2M(r,"invalid-api-key",{appName:t.name}),M(r,"invalid-api-key",{appName:t.name});var a="undefined"!==typeof window?I:void 0;this._delegate=n.initialize({options:{persistence:V(r,t.name),popupRedirectResolver:a}}),this._delegate._updateErrorMap(s.H),this.linkUnderlyingAuth()}return Object(a.a)(e,[{key:"emulatorConfig",get:function(){return this._delegate.emulatorConfig}},{key:"currentUser",get:function(){return this._delegate.currentUser?L.getOrCreate(this._delegate.currentUser):null}},{key:"languageCode",get:function(){return this._delegate.languageCode},set:function(e){this._delegate.languageCode=e}},{key:"settings",get:function(){return this._delegate.settings}},{key:"tenantId",get:function(){return this._delegate.tenantId},set:function(e){this._delegate.tenantId=e}},{key:"useDeviceLanguage",value:function(){this._delegate.useDeviceLanguage()}},{key:"signOut",value:function(){return this._delegate.signOut()}},{key:"useEmulator",value:function(e,t){s.E(this._delegate,e,t)}},{key:"applyActionCode",value:function(e){return s.y(this._delegate,e)}},{key:"checkActionCode",value:function(e){return s.C(this._delegate,e)}},{key:"confirmPasswordReset",value:function(e,t){return s.D(this._delegate,e,t)}},{key:"createUserWithEmailAndPassword",value:function(){var e=Object(o.a)(r.a.mark((function e(t,n){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",R(this._delegate,s.G(this._delegate,t,n)));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"fetchProvidersForEmail",value:function(e){return this.fetchSignInMethodsForEmail(e)}},{key:"fetchSignInMethodsForEmail",value:function(e){return s.I(this._delegate,e)}},{key:"isSignInWithEmailLink",value:function(e){return s.O(this._delegate,e)}},{key:"getRedirectResult",value:function(){var e=Object(o.a)(r.a.mark((function e(){var t;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return M(y(),this._delegate,"operation-not-supported-in-this-environment"),e.next=3,s.L(this._delegate,I);case 3:if(t=e.sent){e.next=6;break}return e.abrupt("return",{credential:null,user:null});case 6:return e.abrupt("return",R(this._delegate,Promise.resolve(t)));case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"addFrameworkForLogging",value:function(e){s.x(this._delegate,e)}},{key:"onAuthStateChanged",value:function(e,t,n){var r=U(e,t,n),i=r.next,a=r.error,o=r.complete;return this._delegate.onAuthStateChanged(i,a,o)}},{key:"onIdTokenChanged",value:function(e,t,n){var r=U(e,t,n),i=r.next,a=r.error,o=r.complete;return this._delegate.onIdTokenChanged(i,a,o)}},{key:"sendSignInLinkToEmail",value:function(e,t){return s.ab(this._delegate,e,t)}},{key:"sendPasswordResetEmail",value:function(e,t){return s.Z(this._delegate,e,t||void 0)}},{key:"setPersistence",value:function(){var e=Object(o.a)(r.a.mark((function e(t){var n,i;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:_(this._delegate,t),e.t0=t,e.next=e.t0===w.SESSION?4:e.t0===w.LOCAL?6:e.t0===w.NONE?11:13;break;case 4:return n=s.B,e.abrupt("break",14);case 6:return e.next=8,s.t(s.N)._isAvailable();case 8:return i=e.sent,n=i?s.N:s.z,e.abrupt("break",14);case 11:return n=s.M,e.abrupt("break",14);case 13:return e.abrupt("return",s.r("argument-error",{appName:this._delegate.name}));case 14:return e.abrupt("return",this._delegate.setPersistence(n));case 15:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"signInAndRetrieveDataWithCredential",value:function(e){return this.signInWithCredential(e)}},{key:"signInAnonymously",value:function(){return R(this._delegate,s.bb(this._delegate))}},{key:"signInWithCredential",value:function(e){return R(this._delegate,s.cb(this._delegate,e))}},{key:"signInWithCustomToken",value:function(e){return R(this._delegate,s.db(this._delegate,e))}},{key:"signInWithEmailAndPassword",value:function(e,t){return R(this._delegate,s.eb(this._delegate,e,t))}},{key:"signInWithEmailLink",value:function(e,t){return R(this._delegate,s.fb(this._delegate,e,t))}},{key:"signInWithPhoneNumber",value:function(e,t){return N(this._delegate,s.gb(this._delegate,e,t))}},{key:"signInWithPopup",value:function(){var e=Object(o.a)(r.a.mark((function e(t){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return M(y(),this._delegate,"operation-not-supported-in-this-environment"),e.abrupt("return",R(this._delegate,s.hb(this._delegate,t,I)));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"signInWithRedirect",value:function(){var e=Object(o.a)(r.a.mark((function e(t){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return M(y(),this._delegate,"operation-not-supported-in-this-environment"),e.next=3,j(this._delegate);case 3:return e.abrupt("return",s.ib(this._delegate,t,I));case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"updateCurrentUser",value:function(e){return this._delegate.updateCurrentUser(e)}},{key:"verifyPasswordResetCode",value:function(e){return s.pb(this._delegate,e)}},{key:"unwrap",value:function(){return this._delegate}},{key:"_delete",value:function(){return this._delegate._delete()}},{key:"linkUnderlyingAuth",value:function(){var e=this;this._delegate.wrapped=function(){return e}}}]),e}();function U(e,t,n){var r=e;"function"!==typeof e&&(r=e.next,t=e.error,n=e.complete);var i=r;return{next:function(e){return i(e&&L.getOrCreate(e))},error:t,complete:n}}function V(e,t){var n=function(e,t){var n=S();if(!n)return[];var r=s.w(x,e,t);switch(n.getItem(r)){case w.NONE:return[s.M];case w.LOCAL:return[s.N,s.B];case w.SESSION:return[s.B];default:return[]}}(e,t);if("undefined"===typeof self||n.includes(s.N)||n.push(s.N),"undefined"!==typeof window)for(var r=0,i=[s.z,s.B];r<i.length;r++){var a=i[r];n.includes(a)||n.push(a)}return n.includes(s.M)||n.push(s.M),n}F.Persistence=w;var B=function(){function e(){Object(i.a)(this,e),this.providerId="phone",this._delegate=new s.i(C(u.a.auth()))}return Object(a.a)(e,[{key:"verifyPhoneNumber",value:function(e,t){return this._delegate.verifyPhoneNumber(e,t)}},{key:"unwrap",value:function(){return this._delegate}}],[{key:"credential",value:function(e,t){return s.i.credential(e,t)}}]),e}();B.PHONE_SIGN_IN_METHOD=s.i.PHONE_SIGN_IN_METHOD,B.PROVIDER_ID=s.i.PROVIDER_ID;var z,q=s.p,W=function(){function e(t,n){var r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.a.app();Object(i.a)(this,e),q(null===(r=a.options)||void 0===r?void 0:r.apiKey,"invalid-api-key",{appName:a.name}),this._delegate=new s.l(t,n,a.auth()),this.type=this._delegate.type}return Object(a.a)(e,[{key:"clear",value:function(){this._delegate.clear()}},{key:"render",value:function(){return this._delegate.render()}},{key:"verify",value:function(){return this._delegate.verify()}}]),e}();(z=u.a).INTERNAL.registerComponent(new c.a("auth-compat",(function(e){var t=e.getProvider("app-compat").getImmediate(),n=e.getProvider("auth");return new F(t,n)}),"PUBLIC").setServiceProps({ActionCodeInfo:{Operation:{EMAIL_SIGNIN:s.a.EMAIL_SIGNIN,PASSWORD_RESET:s.a.PASSWORD_RESET,RECOVER_EMAIL:s.a.RECOVER_EMAIL,REVERT_SECOND_FACTOR_ADDITION:s.a.REVERT_SECOND_FACTOR_ADDITION,VERIFY_AND_CHANGE_EMAIL:s.a.VERIFY_AND_CHANGE_EMAIL,VERIFY_EMAIL:s.a.VERIFY_EMAIL}},EmailAuthProvider:s.c,FacebookAuthProvider:s.d,GithubAuthProvider:s.e,GoogleAuthProvider:s.f,OAuthProvider:s.h,SAMLAuthProvider:s.n,PhoneAuthProvider:B,PhoneMultiFactorGenerator:s.j,RecaptchaVerifier:W,TwitterAuthProvider:s.o,Auth:F,AuthCredential:s.b,Error:l.c}).setInstantiationMode("LAZY").setMultipleInstances(!1)),z.registerVersion("@firebase/auth-compat","0.2.15")}).call(this,n(74))},function(e,t,n){e.exports=n(138)()},function(e,t,n){"use strict";var r=n(139);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var u=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 u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;
vendor: 1,688 bytes, line 2
2var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},,function(e,t,n){"use strict";var r=n(142);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var u=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 u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";var r=n(144);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var u=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 u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i}
2;return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";var r=n(146);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var u=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 u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){function n(t){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){e.exports=n(149)()},function(e,t,n){"use strict";var r=n(150);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var u=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 u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i}
2;return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";var r=60103,i=60106,a=60107,o=60108,u=60114,s=60109,c=60110,l=60112,f=60113,h=60120,d=60115,p=60116,v=60121,m=60122,y=60117,g=60129,b=60131;if("function"===typeof Symbol&&Symbol.for){var k=Symbol.for;r=k("react.element"),i=k("react.portal"),a=k("react.fragment"),o=k("react.strict_mode"),u=k("react.profiler"),s=k("react.provider"),c=k("react.context"),l=k("react.forward_ref"),f=k("react.suspense"),h=k("react.suspense_list"),d=k("react.memo"),p=k("react.lazy"),v=k("react.block"),m=k("react.server.block"),y=k("react.fundamental"),g=k("react.debug_trace_mode"),b=k("react.legacy_hidden")}function w(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case a:case u:case o:case f:case h:return e;default:switch(e=e&&e.$$typeof){case c:case l:case p:case d:case s:return e;default:return t}}case i:return t}}}var O=s,x=r,_=l,j=a,E=p,S=d,T=i,I=u,C=o,A=f;t.ContextConsumer=c,t.ContextProvider=O,t.Element=x,t.ForwardRef=_,t.Fragment=j,t.Lazy=E,t.Memo=S,t.Portal=T,t.Profiler=I,t.StrictMode=C,t.Suspense=A,t.isAsyncMode=function(){return!1},t.isConcurrentMode=function(){return!1},t.isContextConsumer=function(e){return w(e)===c},t.isContextProvider=function(e){return w(e)===s},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===l},t.isFragment=function(e){return w(e)===a},t.isLazy=function(e){return w(e)===p},t.isMemo=function(e){return w(e)===d},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===u},t.isStrictMode=function(e){return w(e)===o},t.isSuspense=function(e){return w(e)===f},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===a||e===u||e===g||e===o||e===f||e===h||e===b||"object"===typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===d||e.$$typeof===s||e.$$typeof===c||e.$$typeof===l||e.$$typeof===y||e.$$typeof===v||e[0]===m)},t.typeOf=w},function(e,t,n){var r=n(1),i=n(102),a=n(103),o=a.setStyleProp,u=a.canTextBeChildOfNode;function s(e){return a.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&a.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,n){for(var a,c,l,f,h,d=(n=n||{}).library||r,p=d.cloneElement,v=d.createElement,m=d.isValidElement,y=[],g="function"===typeof n.replace,b=n.trim,k=0,w=t.length;k<w;k++)if(a=t[k],g&&m(l=n.replace(a)))w>1&&(l=p(l,{key:l.key||k})),y.push(l);else if("text"!==a.type){switch(f=a.attribs,s(a)?o(f.style,f):f&&(f=i(f)),h=null,a.type){case"script":case"style":a.children[0]&&(f.dangerouslySetInnerHTML={__html:a.children[0].data});break;case"tag":"textarea"===a.name&&a.children[0]?f.defaultValue=a.children[0].data:a.children&&a.children.length&&(h=e(a.children,n));break;default:continue}w>1&&(f.key=k),y.push(v(a.name,f,h))}else{if((c=!a.data.trim().length)&&a.parent&&!u(a.parent))continue;if(b&&c)continue;y.push(a.data)}return 1===y.length?y[0]:y}},function(e,t,n){"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,a=[],o=!0,u=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(s){u=!0,i=s}finally{try{o||null==n.return||n.return()}finally{if(u)throw i}}return a}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e,t)||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.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}Object.defineProperty(t,"__esModule",{value:!0});function a(e,t,n,r,i,a,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var o={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((function(e){o[e]=new a(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEac
vendor: 5,006 bytes, line 2
2h((function(e){var t=r(e,2),n=t[0],i=t[1];o[n]=new a(n,1,!1,i,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){o[e]=new a(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){o[e]=new a(e,2,!1,e,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"].forEach((function(e){o[e]=new a(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){o[e]=new a(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){o[e]=new a(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){o[e]=new a(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){o[e]=new a(e,5,!1,e.toLowerCase(),null,!1,!1)}));var u=/[\-\:]([a-z])/g,s=function(e){return e[1].toUpperCase()};["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((function(e){var t=e.replace(u,s);o[t]=new a(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((function(e){var t=e.replace(u,s);o[t]=new a(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(u,s);o[t]=new a(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){o[e]=new a(e,1,!1,e.toLowerCase(),null,!1,!1)}));o.xlinkHref=new a("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){o[e]=new a(e,1,!1,e.toLowerCase(),null,!0,!0)}));var c=n(154),l=c.CAMELCASE,f=c.SAME,h=c.possibleStandardNames,d=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[: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.keys(h).reduce((function(e,t){var n=h[t];return n===f?e[t]=t:n===l?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return o.hasOwnProperty(e)?o[e]:null},t.isCustomAttribute=d,t.possibleStandardNames=p},function(e,t){t.SAME=0;t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInl
2ine:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode
2-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var i=r(n(156)),a=n(158);t.default=function(e,t){var n={};return e&&"string"===typeof e?((0,i.default)(e,(function(e,r){e&&r&&(n[(0,a.camelCase)(e,t)]=r)})),n):n}},function(e,t,n){var r=n(157);e.exports=function(e,t){var n,i=null;if(!e||"string"!==typeof e)return i;for(var a,o,u=r(e),s="function"===typeof t,c=0,l=u.length;c<l;c++)a=(n=u[c]).property,o=n.value,s?t(a,o,n):o&&(i||(i={}),i[a]=o);return i}},function(e,t){var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,c=/^\s+|\s+$/g,l="";function f(e){return e?e.replace(c,l):l}e.exports=function(e,t){if("string"!==typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var c=1,h=1;function d(e){var t=e.match(r);t&&(c+=t.length);var n=e.lastIndexOf("\n");h=~n?e.length-n:h+e.length}function p(){var e={line:c,column:h};return function(t){return t.position=new v(e),b(),t}}function v(e){this.start=e,this.end={line:c,column:h},this.source=t.source}v.prototype.content=e;var m=[];function y(n){var r=new Error(t.source+":"+c+":"+h+": "+n);if(r.reason=n,r.filename=t.source,r.line=c,r.column=h,r.source=e,!t.silent)throw r;m.push(r)}function g(t){var n=t.exec(e);if(n){var r=n[0];return d(r),e=e.slice(r.length),n}}function b(){g(i)}function k(e){var t;for(e=e||[];t=w();)!1!==t&&e.push(t);return e}function w(){var t=p();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;l!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,l===e.charAt(n-1))return y("End of comment missing");var r=e.slice(2,n-2);return h+=2,d(r),e=e.slice(n),h+=2,t({type:"comment",comment:r})}}function O(){var e=p(),t=g(a);if(t){if(w(),!g(o))return y("property missing ':'");var r=g(u),i=e({type:"declaration",property:f(t[0].replace(n,l)),value:r?f(r[0].replace(n,l)):l});return g(s),i}}return b(),function(){var e,t=[];for(k(t);e=O();)!1!==e&&(t.push(e),k(t));return t}()}},function(e,t,n){"use strict";t.__esModule=!0,t.camelCase=void 0;var r=/^--[a-zA-Z0-9-]+$/,i=/-([a-z])/g,a=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,u=/^-(ms)-/,s=function(e,t){return t.toUpperCase()},c=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||a.test(e)||r.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(u,c):e.replace(o,c)).replace(i,s))}},function(e,t,n){"use strict";n.r(t);var r=n(109);t.default=r},function(e,t,n){var r="html",i="head",a="body",o=/<([a-zA-Z]+[0-9]?)/,u=/<head.*>/i,s=/<body.*>/i,c=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},l=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"===typeof window.DOMParser){var f=new window.DOMParser;c=l=function(e,t){return t&&(e="<"+t+">"+e+"</"+t+">"),f.parseFromString(e,"text/html")}}if(document.implementation){var h=n(104).isIE,d=document.implementation.createHTMLDocument(h()?"html-dom-parser":void 0);c=function(e,t){return t?(d.documentElement.getElementsByTagName(t)[0].innerHTML=e,d):(d.documentElement.innerHTML=e,d)}}var p,v=document.createElement("template");v.content&&(p=function(e){return v.innerHTML=e,v.content.childNodes}),e.exports=function(e){var t,n,f,h,d=e.match(o);switch(d&&d[1]&&(t=d[1].toLowerCase()),t){case r:return n=l(e),u.test(e)||(f=n.getElementsByTagName(i)[0])&&f.parentNode.removeChild(f),s.test(e)||(f=n.getElementsByTagName(a)[0])&&f.parentNode.removeChild(f),n.getElementsByTagName(r);case i:case a:return h=c(e).getElementsByTagName(t),s.test(e)&&u.test(e)?h[0].parentNode.childNodes:h;default:return p?p(e):c(e,a).getElementsByTagName(a)[0].childNodes}}},function(e,t){e.exports={CASE_SENSITIVE_TAG_NAMES:["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussainBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]}},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)};
vendor: 5,081 bytes, line 2
2Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var a=n(94),o=new Map([[a.ElementType.Tag,1],[a.ElementType.Script,1],[a.ElementType.Style,1],[a.ElementType.Directive,1],[a.ElementType.Text,3],[a.ElementType.CDATA,4],[a.ElementType.Comment,8],[a.ElementType.Root,9]]),u=function(){function e(e){this.type=e,this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"nodeType",{get:function(){var e;return null!==(e=o.get(this.type))&&void 0!==e?e:1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),w(this,e)},e}();t.Node=u;var s=function(e){function t(t,n){var r=e.call(this,t)||this;return r.data=n,r}return r(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(u);t.DataNode=s;var c=function(e){function t(t){return e.call(this,a.ElementType.Text,t)||this}return r(t,e),t}(s);t.Text=c;var l=function(e){function t(t){return e.call(this,a.ElementType.Comment,t)||this}return r(t,e),t}(s);t.Comment=l;var f=function(e){function t(t,n){var r=e.call(this,a.ElementType.Directive,n)||this;return r.name=t,r}return r(t,e),t}(s);t.ProcessingInstruction=f;var h=function(e){function t(t,n){var r=e.call(this,t)||this;return r.children=n,r}return r(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(u);t.NodeWithChildren=h;var d=function(e){function t(t){return e.call(this,a.ElementType.Root,t)||this}return r(t,e),t}(h);t.Document=d;var p=function(e){function t(t,n,r,i){void 0===r&&(r=[]),void 0===i&&(i="script"===t?a.ElementType.Script:"style"===t?a.ElementType.Style:a.ElementType.Tag);var o=e.call(this,i,r)||this;return o.name=t,o.attribs=n,o}return r(t,e),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(h);function v(e){return(0,a.isTag)(e)}function m(e){return e.type===a.ElementType.CDATA}function y(e){return e.type===a.ElementType.Text}function g(e){return e.type===a.ElementType.Comment}function b(e){return e.type===a.ElementType.Directive}function k(e){return e.type===a.ElementType.Root}function w(e,t){var n;if(void 0===t&&(t=!1),y(e))n=new c(e.data);else if(g(e))n=new l(e.data);else if(v(e)){var r=t?O(e.children):[],o=new p(e.name,i({},e.attribs),r);r.forEach((function(e){return e.parent=o})),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=o}else if(m(e)){r=t?O(e.children):[];var u=new h(a.ElementType.CDATA,r);r.forEach((function(e){return e.parent=u})),n=u}else if(k(e)){r=t?O(e.children):[];var s=new d(r);r.forEach((function(e){return e.parent=s})),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),n=s}else{if(!b(e))throw new Error("Not implemented yet: ".concat(e.type));var w=new f(e.name,e.data);null!=e["x-name"]&&(w["x-name"]=e["x-name"],w["x-publicId"]=e["x-publicId"],w["x-systemId"]=e["x-systemId"]),n=w}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function O(e){for(var t=e.map((function(e){return w(e,!0)})),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}t.Element=p,t.isTag=v,t.isCDATA=m,t.isText=y,t.isComment=g,t.isDirective=b,t.isDocument=k,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=w},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);
2i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var a=n(94),o=n(105);i(n(105),t);var u=/\s+/g,s={normalizeWhitespace:!1,withStartIndices:!1,withEndIndices:!1,xmlMode:!1},c=function(){function e(e,t,n){this.dom=[],this.root=new o.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"===typeof t&&(n=t,t=s),"object"===typeof e&&(t=e,e=void 0),this.callback=null!==e&&void 0!==e?e:null,this.options=null!==t&&void 0!==t?t:s,this.elementCB=null!==n&&void 0!==n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new o.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?a.ElementType.Tag:void 0,r=new o.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.options.normalizeWhitespace,n=this.lastNode;if(n&&n.type===a.ElementType.Text)t?n.data=(n.data+e).replace(u," "):n.data+=e,this.options.withEndIndices&&(n.endIndex=this.parser.endIndex);else{t&&(e=e.replace(u," "));var r=new o.Text(e);this.addNode(r),this.lastNode=r}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===a.ElementType.Comment)this.lastNode.data+=e;else{var t=new o.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new o.Text(""),t=new o.NodeWithChildren(a.ElementType.CDATA,[e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new o.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"===typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=c,t.default=c},,function(e,t,n){"use strict";n.r(t),n.d(t,"capitalize",(function(){return r.a})),n.d(t,"createChainedFunction",(function(){return i.a})),n.d(t,"createSvgIcon",(function(){return a.a})),n.d(t,"debounce",(function(){return o.a})),n.d(t,"deprecatedPropType",(function(){return u.a})),n.d(t,"isMuiElement",(function(){return s.a})),n.d(t,"ownerDocument",(function(){return c.a})),n.d(t,"ownerWindow",(function(){return l.a})),n.d(t,"requirePropFactory",(function(){return f})),n.d(t,"setRef",(function(){return h.a})),n.d(t,"unsupportedProp",(function(){return d})),n.d(t,"useControlled",(function(){return p.a})),n.d(t,"useEventCallback",(function(){return v.a})),n.d(t,"useForkRef",(function(){return m.a})),n.d(t,"unstable_useId",(function(){return g})),n.d(t,"useIsFocusVisible",(function(){return b.a}));var r=n(20),i=n(55),a=n(77),o=n(57),u=n(49),s=n(63),c=n(32),l=n(58);function f(e){return function(){return null}}var h=n(46);function d(e,t,n,r,i){return null}var p=n(76),v=n(42),m=n(24),y=n(1);function g(e){var t=y.useState(e),n=t[0],r=t[1],i=e||n;return y.useEffect((function(){null==n&&r("mui-".concat(Math.round(1e5*Math.random())))}),[n]),i}var b=n(75)},function(e,t,n){"use strict";var r=n(2),i=n(4),a=n(41),o=n(22),u=n(0),s=n.n(u),c=n(3),l=n(19),f=n(9),h=n(47),d=n(12),p=n(13),v=n(18),m=n(8),y=n(26),g="firebasestorage.googleapis.com",b=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e,i){var a;return Object(r.a)(this,n),(a=t.call(this,k(e),"Firebase Storage: ".concat(i," (").concat(k(e),")"))).customData={serverResponse:null},a._baseMessage=a.message,Object.setPrototypeOf(Object(h.a)(a),n.prototype),a}return Object(i.a)(n,[{key:"_codeEquals",value:function(e){return k(e)===this.code}},{key:"serverResponse",get:function(){return this.customData.serverResponse},set:function(e){this.customData.serverResponse=e,this.customData.serverResponse?this.message="".concat(this._baseMessage,"\n").concat(this.customData.serverResponse):this.message=this._baseMessage}}]),n}(m.c);function k(e){return"storage/"+e}function w(){return new b("unknown","An unknown error occurred, please check the error payload for server response.")}function O(){return new b("canceled","User canceled the upload/download.")}function x(){return new b("cannot-slice-blob","Cannot slice blob for upload. Please retry the upload.")}function _(e){return new b("invalid-argument",e)}function j(){return new b("app-deleted","The Firebase app was deleted.")}function E(e){return new b("invalid-root-operation","The operation '"+e+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}function S(e,t){return new b("invalid-format","String does not match format '"+e+"': "+t)}function T(e){throw new b("internal-error","Internal error: "+e)}var I,C=function(){function e(t,n){Object(r.a)(this,e),this.bucket=t,this.path_=n}return Object(i.a)(e,[{key:"path",get:function(){return this.path_}},{key:"isRoot",get:function(){return 0===this.path.length}},{key:"fullServerUrl",value:function(){var e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o/"+e(this.path)}},{key:"bucketOnlyServerUrl",value:function(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}}],[{key:"makeFromBucketSpec",value:function(t,n){var r;try{r=e.makeFromUrl(t,n)}catch(i){return new e(t,"")}if(""===r.path)return r;throw new b("invalid-default-bucket","Invalid default bucket '"+t+"'.")}},{key:"makeFromUrl",value:function(t,n){var r=null,i="([A-Za-z0-9.\\-_]+)";var a=new RegExp("^gs://"+i+"(/(.*))?$","i");function o(e){e.path_=decodeURIComponent(e.path)}for(var u=n.replace(/[.]/g,"\\."),s=[{regex:a,indices:{bucket:1,path:3},postModify:function(e){"/"===e.path.charAt(e.path.length-1)&&(e.path_=e.path_.slice(0,-1))}},{regex:new RegExp("^https?://".concat(u,"/").concat("v[A-Za-z0-9_]+","/b/").concat(i,"/o").concat("(/([^?#]*).*)?$"),"i"),indices:{bucket:1,path:3},postModify:o},{regex:new RegExp("^https?://".concat(n===g?"(?:storage.googleapis.com|storage.cloud.google.com)":n,"/").concat(i,"/").concat("([^?#]*)"),"i"),indices:{bucket:1,path:2},postModify:o}],c=0;c<s.length;c++){var l=s[c],f=l.regex.exec(t);if(f){var h=f[l.indices.bucket],d=f[l.indices.path];d||(d=""),r=new e(h,d),l.postModify(r);break}}if(null==r)throw function(e){return new b("invalid-url","Invalid URL '"+e+"'.")}(t);return r}}]),e}(),A=function(){function e(t){Object(r.a)(this,e),this.promise_=Promise.reject(t)}return Object(i.a)(e,[{key:"getPromise",value:function(){return this.promise_}},{key:"cancel",value:function(){}}]),e}();function R(e){return"string"===typeof e||e instanceof String}function N(e){return P()&&e instanceof Blob}function P(){return"undefined"!==typeof Blob}function D(e,t,n,r){if(r<t)throw _("Invalid value for '".concat(e,"'. Expected ").concat(t," or greater."));if(r>n)throw _("Invalid value for '".concat(e,"'. Expected ").concat(n," or less."))}function L(e,t,n){var r=t;return null==n&&(r="https://".concat(t)),"".concat(n,"://").concat(r,"/v0").concat(e)}function M(e){var t=encodeURIComponent,n="?";for(var r in e){if(e.hasOwnProperty(r))n=n+(t(r)+"="+t(e[r]))+"&"}return n=n.slice(0,-1)}
2!function(e){e[e.NO_ERROR=0]="NO_ERROR",e[e.NETWORK_ERROR=1]="NETWORK_ERROR",e[e.ABORT=2]="ABORT"}(I||(I={}));var F=function(){function e(t,n,i,a,o,u,s,c,l,f,h){var d=this;Object(r.a)(this,e),this.url_=t,this.method_=n,this.headers_=i,this.body_=a,this.successCodes_=o,this.additionalRetryCodes_=u,this.callback_=s,this.errorCallback_=c,this.timeout_=l,this.progressCallback_=f,this.connectionFactory_=h,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((function(e,t){d.resolve_=e,d.reject_=t,d.start_()}))}return Object(i.a)(e,[{key:"start_",value:function(){var e=this,t=function(t,n){var r=e.resolve_,i=e.reject_,a=n.connection;if(n.wasSuccessCode)try{var o=e.callback_(a,a.getResponse());void 0!==o?r(o):r()}catch(s){i(s)}else if(null!==a){var u=w();u.serverResponse=a.getErrorText(),e.errorCallback_?i(e.errorCallback_(a,u)):i(u)}else{if(n.canceled)i(e.appDelete_?j():O());else i(new b("retry-limit-exceeded","Max retry time for operation exceeded, please try again."))}};this.canceled_?t(0,new U(!1,null,!0)):this.backoffId_=function(e,t,n){var r=1,i=null,a=null,o=!1,u=0;function s(){return 2===u}var c=!1;function l(){if(!c){c=!0;for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.apply(null,n)}}function f(t){i=setTimeout((function(){i=null,e(d,s())}),t)}function h(){a&&clearTimeout(a)}function d(e){if(c)h();else{for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];if(e)return h(),void l.call.apply(l,[null,e].concat(n));var a;if(s()||o)return h(),void l.call.apply(l,[null,e].concat(n));r<64&&(r*=2),1===u?(u=2,a=0):a=1e3*(r+Math.random()),f(a)}}var p=!1;function v(e){p||(p=!0,h(),c||(null!==i?(e||(u=2),clearTimeout(i),f(0)):e||(u=1)))}return f(0),a=setTimeout((function(){o=!0,v(!0)}),n),v}((function(t,n){if(n)t(!1,new U(!1,null,!0));else{var r=e.connectionFactory_();e.pendingConnection_=r;var i=function(t){var n=t.loaded,r=t.lengthComputable?t.total:-1;null!==e.progressCallback_&&e.progressCallback_(n,r)};null!==e.progressCallback_&&r.addUploadProgressListener(i),r.send(e.url_,e.method_,e.body_,e.headers_).then((function(){null!==e.progressCallback_&&r.removeUploadProgressListener(i),e.pendingConnection_=null;var n=r.getErrorCode()===I.NO_ERROR,a=r.getStatus();if(n&&!e.isRetryStatusCode_(a)){var o=-1!==e.successCodes_.indexOf(a);t(!0,new U(o,r))}else{var u=r.getErrorCode()===I.ABORT;t(!1,new U(!1,null,u))}}))}}),t,this.timeout_)}},{key:"getPromise",value:function(){return this.promise_}},{key:"cancel",value:function(e){this.canceled_=!0,this.appDelete_=e||!1,null!==this.backoffId_&&(0,this.backoffId_)(!1),null!==this.pendingConnection_&&this.pendingConnection_.abort()}},{key:"isRetryStatusCode_",value:function(e){var t=e>=500&&e<600,n=-1!==[408,429].indexOf(e),r=-1!==this.additionalRetryCodes_.indexOf(e);return t||n||r}}]),e}(),U=function e(t,n,i){Object(r.a)(this,e),this.wasSuccessCode=t,this.connection=n,this.canceled=!!i};function V(){return"undefined"!==typeof BlobBuilder?BlobBuilder:"undefined"!==typeof WebKitBlobBuilder?WebKitBlobBuilder:void 0}function B(){for(var e=V(),t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(void 0!==e){for(var i=new e,a=0;a<n.length;a++)i.append(n[a]);return i.getBlob()}if(P())return new Blob(n);throw new b("unsupported-environment","This browser doesn't seem to support creating Blobs")}var z={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"},q=function e(t,n){Object(r.a)(this,e),this.data=t,this.contentType=n||null};function W(e,t){switch(e){case z.RAW:return new q(H(t));case z.BASE64:case z.BASE64URL:return new q(K(e,t));case z.DATA_URL:return new q(function(e){var t=new G(e);return t.base64?K(z.BASE64,t.rest):function(e){var t;try{t=decodeURIComponent(e)}catch(n){throw S(z.DATA_URL,"Malformed data URL.")}return H(t)}(t.rest)}(t),new G(t).contentType)}throw w()}function H(e){for(var t=[],n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r<=127)t.push(r);else if(r<=2047)t.push(192|r>>6,128|63&r);else if(55296===(64512&r))if(n<e.length-1&&56320===(64512&e.charCodeAt(n+1)))r=65536|(1023&r)<<10|1023&e.charCodeAt(++n),t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r);else t.push(239,191,189);else 56320===(64512&r)?t.push(239,191,189):t.push(224|r>>12,128|r>>6&63,128|63&r)}return new Uint8Array(t)}function K(e,t){switch(e){case z.BASE64:var n=-1!==t.indexOf("-"),r=-1!==t.indexOf("_");if(n||r)throw S(e,"Invalid character '"+(n?"-":"_")+"' found: is it base64url encoded?");break;case z.BASE64URL:var i=-1!==t.indexOf("+"),a=-1!==t.indexOf("/");if(i||a)throw S(e,"Invalid character '"+(i?"+":"/")+"' found: is it base64 encoded?");t=t.replace(/-/g,"+").replace(/_/g,"/")}var o;try{o=atob(t)}catch(c){throw S(e,"Invalid character found")}for(var u=new Uint8Array(o.length),s=0;s<o.length;
2s++)u[s]=o.charCodeAt(s);return u}var G=function e(t){Object(r.a)(this,e),this.base64=!1,this.contentType=null;var n=t.match(/^data:([^,]+)?,/);if(null===n)throw S(z.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");var i=n[1]||null;null!=i&&(this.base64=function(e,t){if(!(e.length>=t.length))return!1;return e.substring(e.length-t.length)===t}(i,";base64"),this.contentType=this.base64?i.substring(0,i.length-";base64".length):i),this.rest=t.substring(t.indexOf(",")+1)};var $=function(){function e(t,n){Object(r.a)(this,e);var i=0,a="";N(t)?(this.data_=t,i=t.size,a=t.type):t instanceof ArrayBuffer?(n?this.data_=new Uint8Array(t):(this.data_=new Uint8Array(t.byteLength),this.data_.set(new Uint8Array(t))),i=this.data_.length):t instanceof Uint8Array&&(n?this.data_=t:(this.data_=new Uint8Array(t.length),this.data_.set(t)),i=t.length),this.size_=i,this.type_=a}return Object(i.a)(e,[{key:"size",value:function(){return this.size_}},{key:"type",value:function(){return this.type_}},{key:"slice",value:function(t,n){if(N(this.data_)){var r=function(e,t,n){return e.webkitSlice?e.webkitSlice(t,n):e.mozSlice?e.mozSlice(t,n):e.slice?e.slice(t,n):null}(this.data_,t,n);return null===r?null:new e(r)}var i=new Uint8Array(this.data_.buffer,t,n-t);return new e(i,!0)}},{key:"uploadData",value:function(){return this.data_}}],[{key:"getBlob",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(P()){var i=n.map((function(t){return t instanceof e?t.data_:t}));return new e(B.apply(null,i))}var a=n.map((function(e){return R(e)?W(z.RAW,e).data:e.data_})),o=0;a.forEach((function(e){o+=e.byteLength}));var u=new Uint8Array(o),s=0;return a.forEach((function(e){for(var t=0;t<e.length;t++)u[s++]=e[t]})),new e(u,!0)}}]),e}();function Q(e){var t,n;try{t=JSON.parse(e)}catch(r){return null}return"object"!==typeof(n=t)||Array.isArray(n)?null:t}function Y(e){var t=e.lastIndexOf("/",e.length-2);return-1===t?e:e.slice(t+1)}function X(e,t){return t}var J=function e(t,n,i,a){Object(r.a)(this,e),this.server=t,this.local=n||t,this.writable=!!i,this.xform=a||X},Z=null;function ee(){if(Z)return Z;var e=[];e.push(new J("bucket")),e.push(new J("generation")),e.push(new J("metageneration")),e.push(new J("name","fullPath",!0));var t=new J("name");t.xform=function(e,t){return function(e){return!R(e)||e.length<2?e:Y(e)}(t)},e.push(t);var n=new J("size");return n.xform=function(e,t){return void 0!==t?Number(t):t},e.push(n),e.push(new J("timeCreated")),e.push(new J("updated")),e.push(new J("md5Hash",null,!0)),e.push(new J("cacheControl",null,!0)),e.push(new J("contentDisposition",null,!0)),e.push(new J("contentEncoding",null,!0)),e.push(new J("contentLanguage",null,!0)),e.push(new J("contentType",null,!0)),e.push(new J("metadata","customMetadata",!0)),Z=e}function te(e,t,n){for(var r={type:"file"},i=n.length,a=0;a<i;a++){var o=n[a];r[o.local]=o.xform(r,t[o.server])}return function(e,t){Object.defineProperty(e,"ref",{get:function(){var n=e.bucket,r=e.fullPath,i=new C(n,r);return t._makeStorageReference(i)}})}(r,e),r}function ne(e,t,n){var r=Q(t);return null===r?null:te(e,r,n)}function re(e,t){for(var n={},r=t.length,i=0;i<r;i++){var a=t[i];a.writable&&(n[a.server]=e[a.local])}return JSON.stringify(n)}function ie(e,t,n){var r=Q(n);return null===r?null:function(e,t,n){var r={prefixes:[],items:[],nextPageToken:n.nextPageToken};if(n.prefixes){var i,a=Object(f.a)(n.prefixes);try{for(a.s();!(i=a.n()).done;){var o=i.value.replace(/\/$/,""),u=e._makeStorageReference(new C(t,o));r.prefixes.push(u)}}catch(d){a.e(d)}finally{a.f()}}if(n.items){var s,c=Object(f.a)(n.items);try{for(c.s();!(s=c.n()).done;){var l=s.value,h=e._makeStorageReference(new C(t,l.name));r.items.push(h)}}catch(d){c.e(d)}finally{c.f()}}return r}(e,t,r)}var ae=function e(t,n,i,a){Object(r.a)(this,e),this.url=t,this.method=n,this.handler=i,this.timeout=a,this.urlParams={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]};function oe(e){if(!e)throw w()}function ue(e,t){return function(n,r){var i=ne(e,r,t);return oe(null!==i),i}}function se(e,t){return function(n,r){var i=ne(e,r,t);return oe(null!==i),function(e,t,n,r){var i=Q(t);if(null===i)return null;if(!R(i.downloadTokens))return null;var a=i.downloadTokens;if(0===a.length)return null;var o=encodeURIComponent;return a.split(",").map((function(t){var i=e.bucket,a=e.fullPath;return L("/b/"+o(i)+"/o/"+o(a),n,r)+M({alt:"media",token:t})}))[0]}(i,r,e.host,e._protocol)}}function ce(e){return function(t,n){var r,i,a;return 401===t.getStatus()?r=t.getErrorText().includes("Firebase App Check token is invali
2d")?new b("unauthorized-app","This app does not have permission to access Firebase Storage on this project."):new b("unauthenticated","User is not authenticated, please authenticate using Firebase Authentication and try again."):402===t.getStatus()?(a=e.bucket,r=new b("quota-exceeded","Quota for bucket '"+a+"' exceeded, please view quota on https://firebase.google.com/pricing/.")):403===t.getStatus()?(i=e.path,r=new b("unauthorized","User does not have permission to access '"+i+"'.")):r=n,r.serverResponse=n.serverResponse,r}}function le(e){var t=ce(e);return function(n,r){var i,a=t(n,r);return 404===n.getStatus()&&(i=e.path,a=new b("object-not-found","Object '"+i+"' does not exist.")),a.serverResponse=r.serverResponse,a}}function fe(e,t,n){var r=L(t.fullServerUrl(),e.host,e._protocol),i=e.maxOperationRetryTime,a=new ae(r,"GET",ue(e,n),i);return a.errorHandler=le(t),a}function he(e,t,n,r,i){var a={};t.isRoot?a.prefix="":a.prefix=t.path+"/",n&&n.length>0&&(a.delimiter=n),r&&(a.pageToken=r),i&&(a.maxResults=i);var o=L(t.bucketOnlyServerUrl(),e.host,e._protocol),u=e.maxOperationRetryTime,s=new ae(o,"GET",function(e,t){return function(n,r){var i=ie(e,t,r);return oe(null!==i),i}}(e,t.bucket),u);return s.urlParams=a,s.errorHandler=ce(t),s}function de(e,t,n){var r=Object.assign({},n);return r.fullPath=e.path,r.size=t.size(),r.contentType||(r.contentType=function(e,t){return e&&e.contentType||t&&t.type()||"application/octet-stream"}(null,t)),r}function pe(e,t,n,r,i){var a=t.bucketOnlyServerUrl(),o={"X-Goog-Upload-Protocol":"multipart"};var u=function(){for(var e="",t=0;t<2;t++)e+=Math.random().toString().slice(2);return e}();o["Content-Type"]="multipart/related; boundary="+u;var s=de(t,r,i),c="--"+u+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+re(s,n)+"\r\n--"+u+"\r\nContent-Type: "+s.contentType+"\r\n\r\n",l="\r\n--"+u+"--",f=$.getBlob(c,r,l);if(null===f)throw x();var h={name:s.fullPath},d=L(a,e.host,e._protocol),p=e.maxUploadRetryTime,v=new ae(d,"POST",ue(e,n),p);return v.urlParams=h,v.headers=o,v.body=f.uploadData(),v.errorHandler=ce(t),v}var ve=function e(t,n,i,a){Object(r.a)(this,e),this.current=t,this.total=n,this.finalized=!!i,this.metadata=a||null};function me(e,t){var n=null;try{n=e.getResponseHeader("X-Goog-Upload-Status")}catch(r){oe(!1)}return oe(!!n&&-1!==(t||["active"]).indexOf(n)),n}var ye=262144;function ge(e,t,n,r,i,a,o,u){var s=new ve(0,0);if(o?(s.current=o.current,s.total=o.total):(s.current=0,s.total=r.size()),r.size()!==s.total)throw new b("server-file-wrong-size","Server recorded incorrect upload file size, please retry the upload.");var c=s.total-s.current,l=c;i>0&&(l=Math.min(l,i));var f=s.current,h=f+l,d={"X-Goog-Upload-Command":l===c?"upload, finalize":"upload","X-Goog-Upload-Offset":"".concat(s.current)},p=r.slice(f,h);if(null===p)throw x();var v=t.maxUploadRetryTime,m=new ae(n,"POST",(function(e,n){var i,o=me(e,["active","final"]),u=s.current+l,c=r.size();return i="final"===o?ue(t,a)(e,n):null,new ve(u,c,"final"===o,i)}),v);return m.headers=d,m.body=p.uploadData(),m.progressCallback=u||null,m.errorHandler=ce(e),m}var be={STATE_CHANGED:"state_changed"},ke={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};function we(e){switch(e){case"running":case"pausing":case"canceling":return ke.RUNNING;case"paused":return ke.PAUSED;case"success":return ke.SUCCESS;case"canceled":return ke.CANCELED;default:return ke.ERROR}}var Oe=function e(t,n,i){if(Object(r.a)(this,e),"function"===typeof t||null!=n||null!=i)this.next=t,this.error=null!==n&&void 0!==n?n:void 0,this.complete=null!==i&&void 0!==i?i:void 0;else{var a=t;this.next=a.next,this.error=a.error,this.complete=a.complete}};function xe(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];Promise.resolve().then((function(){return e.apply(void 0,n)}))}}var _e=function(){function e(){var t=this;Object(r.a)(this,e),this.sent_=!1,this.xhr_=new XMLHttpRequest,this.initXhr(),this.errorCode_=I.NO_ERROR,this.sendPromise_=new Promise((function(e){t.xhr_.addEventListener("abort",(function(){t.errorCode_=I.ABORT,e()})),t.xhr_.addEventListener("error",(function(){t.errorCode_=I.NETWORK_E
2RROR,e()})),t.xhr_.addEventListener("load",(function(){e()}))}))}return Object(i.a)(e,[{key:"send",value:function(e,t,n,r){if(this.sent_)throw T("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(t,e,!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_}},{key:"getErrorCode",value:function(){if(!this.sent_)throw T("cannot .getErrorCode() before sending");return this.errorCode_}},{key:"getStatus",value:function(){if(!this.sent_)throw T("cannot .getStatus() before sending");try{return this.xhr_.status}catch(e){return-1}}},{key:"getResponse",value:function(){if(!this.sent_)throw T("cannot .getResponse() before sending");return this.xhr_.response}},{key:"getErrorText",value:function(){if(!this.sent_)throw T("cannot .getErrorText() before sending");return this.xhr_.statusText}},{key:"abort",value:function(){this.xhr_.abort()}},{key:"getResponseHeader",value:function(e){return this.xhr_.getResponseHeader(e)}},{key:"addUploadProgressListener",value:function(e){null!=this.xhr_.upload&&this.xhr_.upload.addEventListener("progress",e)}},{key:"removeUploadProgressListener",value:function(e){null!=this.xhr_.upload&&this.xhr_.upload.removeEventListener("progress",e)}}]),e}(),je=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"initXhr",value:function(){this.xhr_.responseType="text"}}]),n}(_e);function Ee(){return new je}var Se=function(){function e(t,n){var i=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;Object(r.a)(this,e),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=n,this._metadata=a,this._mappings=ee(),this._resumable=this._shouldDoResumable(this._blob),this._state="running",this._errorHandler=function(e){i._request=void 0,i._chunkMultiplier=1,e._codeEquals("canceled")?(i._needToFetchStatus=!0,i.completeTransitions_()):(i._error=e,i._transition("error"))},this._metadataErrorHandler=function(e){i._request=void 0,e._codeEquals("canceled")?i.completeTransitions_():(i._error=e,i._transition("error"))},this._promise=new Promise((function(e,t){i._resolve=e,i._reject=t,i._start()})),this._promise.then(null,(function(){}))}return Object(i.a)(e,[{key:"_makeProgressCallback",value:function(){var e=this,t=this._transferred;return function(n){return e._updateProgress(t+n)}}},{key:"_shouldDoResumable",value:function(e){return e.size()>262144}},{key:"_start",value:function(){"running"===this._state&&void 0===this._request&&(this._resumable?void 0===this._uploadUrl?this._createResumable():this._needToFetchStatus?this._fetchStatus():this._needToFetchMetadata?this._fetchMetadata():this._continueUpload():this._oneShotUpload())}},{key:"_resolveToken",value:function(e){var t=this;Promise.all([this._ref.storage._getAuthToken(),this._ref.storage._getAppCheckToken()]).then((function(n){var r=Object(l.a)(n,2),i=r[0],a=r[1];switch(t._state){case"running":e(i,a);break;case"canceling":t._transition("canceled");break;case"pausing":t._transition("paused")}}))}},{key:"_createResumable",value:function(){var e=this;this._resolveToken((function(t,n){var r=function(e,t,n,r,i){var a=t.bucketOnlyServerUrl(),o=de(t,r,i),u={name:o.fullPath},s=L(a,e.host,e._protocol),c={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":"".concat(r.size()),"X-Goog-Upload-Header-Content-Type":o.contentType,"Content-Type":"application/json; charset=utf-8"},l=re(o,n),f=e.maxUploadRetryTime,h=new ae(s,"POST",(function(e){var t;me(e);try{t=e.getResponseHeader("X-Goog-Upload-URL")}catch(n){oe(!1)}return oe(R(t)),t}),f);return h.urlParams=u,h.headers=c,h.body=l,h.errorHandler=ce(t),h}(e._ref.storage,e._ref._location,e._mappings,e._blob,e._metadata),i=e._ref.storage._makeRequest(r,Ee,t,n);e._request=i,i.getPromise().then((function(t){e._request=void 0,e._uploadUrl=t,e._needToFetchStatus=!1,e.completeTransitions_()}),e._errorHandler)}))}},{key:"_fetchStatus",value:function(){var e=this,t=this._uploadUrl;this._resolveToken((function(n,r){var i=function(e,t,n,r){var i=e.maxUploadRetryTime,a=new ae(n,"POST",(function(e){var t=me(e,["active","final"]),n=null;try{n=e.getResponseHeader("X-Goog-Upload-Size-Received")}catch(a){oe(!1)}n||oe(!1);var i=Number(n);return oe(!isNaN(i)),new ve(i,r.size(),"final"===t)}),i);return a.headers={"X-Goog-Upload-Command":"query"},a.errorHandler=ce(t),a}(e._ref.storage,e._ref._location,t,e._blob),a=e._ref.storage._makeRequest
2(i,Ee,n,r);e._request=a,a.getPromise().then((function(t){t=t,e._request=void 0,e._updateProgress(t.current),e._needToFetchStatus=!1,t.finalized&&(e._needToFetchMetadata=!0),e.completeTransitions_()}),e._errorHandler)}))}},{key:"_continueUpload",value:function(){var e=this,t=ye*this._chunkMultiplier,n=new ve(this._transferred,this._blob.size()),r=this._uploadUrl;this._resolveToken((function(i,a){var o;try{o=ge(e._ref._location,e._ref.storage,r,e._blob,t,e._mappings,n,e._makeProgressCallback())}catch(s){return e._error=s,void e._transition("error")}var u=e._ref.storage._makeRequest(o,Ee,i,a);e._request=u,u.getPromise().then((function(t){e._increaseMultiplier(),e._request=void 0,e._updateProgress(t.current),t.finalized?(e._metadata=t.metadata,e._transition("success")):e.completeTransitions_()}),e._errorHandler)}))}},{key:"_increaseMultiplier",value:function(){ye*this._chunkMultiplier<33554432&&(this._chunkMultiplier*=2)}},{key:"_fetchMetadata",value:function(){var e=this;this._resolveToken((function(t,n){var r=fe(e._ref.storage,e._ref._location,e._mappings),i=e._ref.storage._makeRequest(r,Ee,t,n);e._request=i,i.getPromise().then((function(t){e._request=void 0,e._metadata=t,e._transition("success")}),e._metadataErrorHandler)}))}},{key:"_oneShotUpload",value:function(){var e=this;this._resolveToken((function(t,n){var r=pe(e._ref.storage,e._ref._location,e._mappings,e._blob,e._metadata),i=e._ref.storage._makeRequest(r,Ee,t,n);e._request=i,i.getPromise().then((function(t){e._request=void 0,e._metadata=t,e._updateProgress(e._blob.size()),e._transition("success")}),e._errorHandler)}))}},{key:"_updateProgress",value:function(e){var t=this._transferred;this._transferred=e,this._transferred!==t&&this._notifyObservers()}},{key:"_transition",value:function(e){if(this._state!==e)switch(e){case"canceling":case"pausing":this._state=e,void 0!==this._request&&this._request.cancel();break;case"running":var t="paused"===this._state;this._state=e,t&&(this._notifyObservers(),this._start());break;case"paused":case"error":case"success":this._state=e,this._notifyObservers();break;case"canceled":this._error=O(),this._state=e,this._notifyObservers()}}},{key:"completeTransitions_",value:function(){switch(this._state){case"pausing":this._transition("paused");break;case"canceling":this._transition("canceled");break;case"running":this._start()}}},{key:"snapshot",get:function(){var e=we(this._state);return{bytesTransferred:this._transferred,totalBytes:this._blob.size(),state:e,metadata:this._metadata,task:this,ref:this._ref}}},{key:"on",value:function(e,t,n,r){var i=this,a=new Oe(t||void 0,n||void 0,r||void 0);return this._addObserver(a),function(){i._removeObserver(a)}}},{key:"then",value:function(e,t){return this._promise.then(e,t)}},{key:"catch",value:function(e){return this.then(null,e)}},{key:"_addObserver",value:function(e){this._observers.push(e),this._notifyObserver(e)}},{key:"_removeObserver",value:function(e){var t=this._observers.indexOf(e);-1!==t&&this._observers.splice(t,1)}},{key:"_notifyObservers",value:function(){var e=this;this._finishPromise(),this._observers.slice().forEach((function(t){e._notifyObserver(t)}))}},{key:"_finishPromise",value:function(){if(void 0!==this._resolve){var e=!0;switch(we(this._state)){case ke.SUCCESS:xe(this._resolve.bind(null,this.snapshot))();break;case ke.CANCELED:case ke.ERROR:xe(this._reject.bind(null,this._error))();break;default:e=!1}e&&(this._resolve=void 0,this._reject=void 0)}}},{key:"_notifyObserver",value:function(e){switch(we(this._state)){case ke.RUNNING:case ke.PAUSED:e.next&&xe(e.next.bind(e,this.snapshot))();break;case ke.SUCCESS:e.complete&&xe(e.complete.bind(e))();break;default:e.error&&xe(e.error.bind(e,this._error))()}}},{key:"resume",value:function(){var e="paused"===this._state||"pausing"===this._state;return e&&this._transition("running"),e}},{key:"pause",value:function(){var e="running"===this._state;return e&&this._transition("pausing"),e}},{key:"cancel",value:function(){var e="running"===this._state||"pausing"===this._state;return e&&this._transition("canceling"),e}}]),e}(),Te=function(){function e(t,n){Object(r.a)(this,e),this._service=t,this._location=n instanceof C?n:C.makeFromUrl(n,t.host)}return Object(i.a)(e,[{key:"toString",value:function(){return"gs://"+this._location.bucket+"/"+this._location.path}},{key:"_newRef",value:function(t,n){return new e(t,n)}},{key:"root",get:function(){var e=new C(this._location.bucket,"");return this._newRef(this._service,e)}},{key:"bucket",get:function(){return this._location.bucket}},{key:"fullPath",get:function(){return this._location.path}},{key:"name",get:function(){return Y(this._location.path)}},{key:"storage",get:function(){return this._service}},{key:"parent",get:function(){var t=function(e){if(0===e.length)return null;var t=e.lastIndexOf("/");return-1===t?"":e.slice(0,t)}(this._location.path);if(null===t)return null;var n=new C(this._location.bucket,t);return new e(this._service,n)}},{key:"_throwIfRoot",value:function(e){if(""===this._location.path)throw E(e)}}]),e}();function Ie(e,t,n){return Ce.apply(this,arguments)}function Ce(){return(Ce=Object(c.a)(s.a.mark((function e(t,n,r){var i,a,u,c;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u={pageToken:r},e.next=3,Ae(t,u);case 3:if(c=e.sent,(i=n.prefixes).push.apply(i,Object(o.a)(c.prefixes)),(a=n.items).push.apply(a,Ob
2ject(o.a)(c.items)),null==c.nextPageToken){e.next=9;break}return e.next=9,Ie(t,n,c.nextPageToken);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ae(e,t){null!=t&&"number"===typeof t.maxResults&&D("options.maxResults",1,1e3,t.maxResults);var n=t||{},r=he(e.storage,e._location,"/",n.pageToken,n.maxResults);return e.storage.makeRequestWithTokens(r,Ee)}function Re(e,t){e._throwIfRoot("updateMetadata");var n=function(e,t,n,r){var i=L(t.fullServerUrl(),e.host,e._protocol),a=re(n,r),o=e.maxOperationRetryTime,u=new ae(i,"PATCH",ue(e,r),o);return u.headers={"Content-Type":"application/json; charset=utf-8"},u.body=a,u.errorHandler=le(t),u}(e.storage,e._location,t,ee());return e.storage.makeRequestWithTokens(n,Ee)}function Ne(e){e._throwIfRoot("getDownloadURL");var t=function(e,t,n){var r=L(t.fullServerUrl(),e.host,e._protocol),i=e.maxOperationRetryTime,a=new ae(r,"GET",se(e,n),i);return a.errorHandler=le(t),a}(e.storage,e._location,ee());return e.storage.makeRequestWithTokens(t,Ee).then((function(e){if(null===e)throw new b("no-download-url","The given file does not have any download URLs.");return e}))}function Pe(e){e._throwIfRoot("deleteObject");var t=function(e,t){var n=L(t.fullServerUrl(),e.host,e._protocol),r=e.maxOperationRetryTime,i=new ae(n,"DELETE",(function(e,t){}),r);return i.successCodes=[200,204],i.errorHandler=le(t),i}(e.storage,e._location);return e.storage.makeRequestWithTokens(t,Ee)}function De(e,t){var n=function(e,t){var n=t.split("/").filter((function(e){return e.length>0})).join("/");return 0===e.length?n:e+"/"+n}(e._location.path,t),r=new C(e._location.bucket,n);return new Te(e.storage,r)}function Le(e,t){if(e instanceof Ve){var n=e;if(null==n._bucket)throw new b("no-default-bucket","No default bucket found. Did you set the 'storageBucket' property when initializing the app?");var r=new Te(n,n._bucket);return null!=t?Le(r,t):r}return void 0!==t?De(e,t):e}function Me(e,t){if(t&&/^[A-Za-z]+:\/\//.test(t)){if(e instanceof Ve)return new Te(e,t);throw _("To use ref(service, url), the first argument must be a Storage instance.")}return Le(e,t)}function Fe(e,t){var n=null===t||void 0===t?void 0:t.storageBucket;return null==n?null:C.makeFromBucketSpec(n,e)}function Ue(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};e.host="".concat(t,":").concat(n),e._protocol="http";var i=r.mockUserToken;i&&(e._overrideAuthToken="string"===typeof i?i:Object(m.g)(i,e.app.options.projectId))}var Ve=function(){function e(t,n,i,a,o){Object(r.a)(this,e),this.app=t,this._authProvider=n,this._appCheckProvider=i,this._url=a,this._firebaseVersion=o,this._bucket=null,this._host=g,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=12e4,this._maxUploadRetryTime=6e5,this._requests=new Set,this._bucket=null!=a?C.makeFromBucketSpec(a,this._host):Fe(this._host,this.app.options)}return Object(i.a)(e,[{key:"host",get:function(){return this._host},set:function(e){this._host=e,null!=this._url?this._bucket=C.makeFromBucketSpec(this._url,e):this._bucket=Fe(e,this.app.options)}},{key:"maxUploadRetryTime",get:function(){return this._maxUploadRetryTime},set:function(e){D("time",0,Number.POSITIVE_INFINITY,e),this._maxUploadRetryTime=e}},{key:"maxOperationRetryTime",get:function(){return this._maxOperationRetryTime},set:function(e){D("time",0,Number.POSITIVE_INFINITY,e),this._maxOperationRetryTime=e}},{key:"_getAuthToken",value:function(){var e=Object(c.a)(s.a.mark((function e(){var t,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._overrideAuthToken){e.next=2;break}return e.abrupt("return",this._overrideAuthToken);case 2:if(!(t=this._authProvider.getImmediate({optional:!0}))){e.next=9;break}return e.next=6,t.getToken();case 6:if(null===(n=e.sent)){e.next=9;break}return e.abrupt("return",n.accessToken);case 9:return e.abrupt("return",null);case 10:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_getAppCheckToken",value:function(){var e=Object(c.a)(s.a.mark((function e(){var t,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=this._appCheckProvider.getImmediate({optional:!0}))){e.next=6;break}return e.next=4,t.getToken();case 4:return n=e.sent,e.abrupt("return",n.token);case 6:return e.abrupt("return",null);case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_delete",value:function(){return this._deleted||(this._deleted=!0,this._requests.forEac
2h((function(e){return e.cancel()})),this._requests.clear()),Promise.resolve()}},{key:"_makeStorageReference",value:function(e){return new Te(this,e)}},{key:"_makeRequest",value:function(e,t,n,r){var i=this;if(this._deleted)return new A(j());var a=function(e,t,n,r,i,a){var o=M(e.urlParams),u=e.url+o,s=Object.assign({},e.headers);return function(e,t){t&&(e["X-Firebase-GMPID"]=t)}(s,t),function(e,t){null!==t&&t.length>0&&(e.Authorization="Firebase "+t)}(s,n),function(e,t){e["X-Firebase-Storage-Version"]="webjs/"+(null!==t&&void 0!==t?t:"AppManager")}(s,a),function(e,t){null!==t&&(e["X-Firebase-AppCheck"]=t)}(s,r),new F(u,e.method,s,e.body,e.successCodes,e.additionalRetryCodes,e.handler,e.errorHandler,e.timeout,e.progressCallback,i)}(e,this._appId,n,r,t,this._firebaseVersion);return this._requests.add(a),a.getPromise().then((function(){return i._requests.delete(a)}),(function(){return i._requests.delete(a)})),a}},{key:"makeRequestWithTokens",value:function(){var e=Object(c.a)(s.a.mark((function e(t,n){var r,i,a,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([this._getAuthToken(),this._getAppCheckToken()]);case 2:return r=e.sent,i=Object(l.a)(r,2),a=i[0],o=i[1],e.abrupt("return",this._makeRequest(t,n,a,o).getPromise());case 7:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()}]),e}(),Be="@firebase/storage",ze="0.9.6",qe="storage";function We(e,t,n){return function(e,t,n){return e._throwIfRoot("uploadBytesResumable"),new Se(e,new $(t),n)}(e=Object(m.l)(e),t,n)}function He(e){return function(e){e._throwIfRoot("getMetadata");var t=fe(e.storage,e._location,ee());return e.storage.makeRequestWithTokens(t,Ee)}(e=Object(m.l)(e))}function Ke(e){return function(e){var t={prefixes:[],items:[]};return Ie(e,t).then((function(){return t}))}(e=Object(m.l)(e))}function Ge(e,t){return Me(e=Object(m.l)(e),t)}function $e(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Ue(e,t,n,r)}function Qe(e,t){var n=t.instanceIdentifier,r=e.getProvider("app").getImmediate(),i=e.getProvider("auth-internal"),a=e.getProvider("app-check-internal");return new Ve(r,i,a,n,v.SDK_VERSION)}Object(v._registerComponent)(new y.a(qe,Qe,"PUBLIC").setMultipleInstances(!0)),Object(v.registerVersion)(Be,ze,""),Object(v.registerVersion)(Be,ze,"esm2017");var Ye=function(){function e(t,n,i){Object(r.a)(this,e),this._delegate=t,this.task=n,this.ref=i}
2return Object(i.a)(e,[{key:"bytesTransferred",get:function(){return this._delegate.bytesTransferred}},{key:"metadata",get:function(){return this._delegate.metadata}},{key:"state",get:function(){return this._delegate.state}},{key:"totalBytes",get:function(){return this._delegate.totalBytes}}]),e}(),Xe=function(){function e(t,n){Object(r.a)(this,e),this._delegate=t,this._ref=n,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)}return Object(i.a)(e,[{key:"snapshot",get:function(){return new Ye(this._delegate.snapshot,this,this._ref)}},{key:"then",value:function(e,t){var n=this;return this._delegate.then((function(t){if(e)return e(new Ye(t,n,n._ref))}),t)}},{key:"on",value:function(e,t,n,r){var i=this,a=void 0;return t&&(a="function"===typeof t?function(e){return t(new Ye(e,i,i._ref))}:{next:t.next?function(e){return t.next(new Ye(e,i,i._ref))}:void 0,complete:t.complete||void 0,error:t.error||void 0}),this._delegate.on(e,a,n||void 0,r||void 0)}}]),e}(),Je=function(){function e(t,n){Object(r.a)(this,e),this._delegate=t,this._service=n}return Object(i.a)(e,[{key:"prefixes",get:function(){var e=this;return this._delegate.prefixes.map((function(t){return new Ze(t,e._service)}))}},{key:"items",get:function(){var e=this;return this._delegate.items.map((function(t){return new Ze(t,e._service)}))}},{key:"nextPageToken",get:function(){return this._delegate.nextPageToken||null}}]),e}(),Ze=function(){function e(t,n){Object(r.a)(this,e),this._delegate=t,this.storage=n}return Object(i.a)(e,[{key:"name",get:function(){return this._delegate.name}},{key:"bucket",get:function(){return this._delegate.bucket}},{key:"fullPath",get:function(){return this._delegate.fullPath}},{key:"toString",value:function(){return this._delegate.toString()}},{key:"child",value:function(t){var n=function(e,t){return De(e,t)}(this._delegate,t);return new e(n,this.storage)}},{key:"root",get:function(){return new e(this._delegate.root,this.storage)}},{key:"parent",get:function(){var t=this._delegate.parent;return null==t?null:new e(t,this.storage)}},{key:"put",value:function(e,t){return this._throwIfRoot("put"),new Xe(We(this._delegate,e,t),this)}},{key:"putString",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:z.RAW,n=arguments.length>2?arguments[2]:void 0;this._throwIfRoot("putString");var r=W(t,e),i=Object.assign({},n);return null==i.contentType&&null!=r.contentType&&(i.contentType=r.contentType),new Xe(new Se(this._delegate,new $(r.data,!0),i),this)}},{key:"listAll",value:function(){var e=this;return Ke(this._delegate).then((function(t){return new Je(t,e.storage)}))}},{key:"list",value:function(e){var t=this;return function(e,t){return Ae(e=Object(m.l)(e),t)}(this._delegate,e||void 0).then((function(e){return new Je(e,t.storage)}))}},{key:"getMetadata",value:function(){return He(this._delegate)}},{key:"updateMetadata",value:function(e){return function(e,t){return Re(e=Object(m.l)(e),t)}(this._delegate,e)}},{key:"getDownloadURL",value:function(){return e=this._delegate,Ne(e=Object(m.l)(e));var e}},{key:"delete",value:function(){return this._throwIfRoot("delete"),e=this._delegate,Pe(e=Object(m.l)(e));var e}},{key:"_throwIfRoot",value:function(e){if(""===this._delegate._location.path)throw E(e)}}]),e}(),et=function(){function e(t,n){Object(r.a)(this,e),this.app=t,this._delegate=n}return Object(i.a)(e,[{key:"maxOperationRetryTime",get:function(){return this._delegate.maxOperationRetryTime}},{key:"maxUploadRetryTime",get:function(){return this._delegate.maxUploadRetryTime}},{key:"ref",value:function(e){if(tt(e))throw _("ref() expected a child path but got a URL, use refFromURL instead.");return new Ze(Ge(this._delegate,e),this)}},{key:"refFromURL",value:function(e){if(!tt(e))throw _("refFromURL() expected a full URL but got a child path, use ref() instead.");try{C.makeFromUrl(e,this._delegate.host)}catch(t){throw _("refFromUrl() expected a valid full URL but got an invalid one.")}return new Ze(Ge(this._delegate,e),this)}},{key:"setMaxUploadRetryTime",value:function(e){this._delegate.maxUploadRetryTime=e}},{key:"setMaxOperationRetryTime",value:function(e){this._delegate.maxOperationRetryTime=e}},{key:"useEmulator",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};$e(this._delegate,e,t,n)}}]),e}();function tt(e){return/^[A-Za-z]+:\/\//.test(e)}function nt(e,t){var n=t.instanceIdentifier,r=e.getProvider("app-compat").getImmediate(),i=e.getProvider("storage").getImmediate({identifier:n});return new et(r,i)}!function(e){var t={TaskState:ke,TaskEvent:be,StringFormat:z,Storage:et,Reference:Ze};e.INTERNAL.registerComponent(new y.a("storage-compat",nt,"PUBLIC").setServiceProps(t).setMultipleInstances(!0)),e.registerVersion("@firebase/storage-compat","0.1.14")}(a.a)},function(e,t,n){"use strict";var r=n(61),i=n(12),a=n(13),o=n(9),u=n(2),s=n(4),c=n(41),l=n(11),f=n(8),h=n(26);function d(e,t){if(void 0===t)return{merge:!1};if(void 0!==t.mergeFields&&void 0!==t.merge)throw new l.g("invalid-argument","Invalid options passed to function ".concat(e,"(): You cannot ")+'specify both "merge" and "mergeFields".');return t}function p(){if("undefined"===typeof Uint8Array)throw new l.g("unimplemented","Uint8Arrays are not available in this environment.")}function v(){if(!Object(l.r)())throw new l.g("unimplemented","Blobs are unavailable in Firestore in this environment.")}var m=function(){function e(t){Object(u.a)(this,e),this._delegate=t}return Object(s.a)(e,[{key:"toBase64",value:function(){return v(),this._delegate.toBase64()}},{key:"toUint8Array",value:function(){return p(),this._delegate.toUint8Array()}},{key:"isEqual",value:function(e){return this._delegate.isEqual(e._delegate)}},{key:"toString",value:function(){return"Blob(base64: "+this.toBase64()+")"}}],[{key:"fromBase64String",value:function(t){return v(),new e(l.b.fromBase64String(t))}},{key:"fromUint8Array",value:function(t){return p(),new e(l.b.fromUint8Array(t))}}]),e}();function y(e){return function(e,t){if("object"!==typeof e||null===e)return!1;var n,r=e,i=Object(o.a)(t);try{for(i.s();!(n=i.n()).done;){var a=n.value;if(a in r&&"function"===typeof r[a])return!0}}catch(u){i.e(u)}finally{i.f()}return!1}(e,["next","error","complete"])}var g=function(){function e(){Object(u.a)(this,e)}return Object(s.a)(e,[{key:"enableIndexedDbPersistence",value:function(e,t){return Object(l.F)(e._delegate,{forceOwnership:t})}},{key:"enableMultiTabIndexedDbPersistence",value:function(e){return Object(l.G)(e._delegate)}},{key:"clearIndexedDbPersistence",value:function(e){return Object(l.x)(e._delegate)}}]),e}(),b=function(){function e(t,n,r){var i=this;Object(u.a)(this,e),this._delegate=n,this._persistenceProvider=r,this.INTERNAL={delete:function(){return i.terminate()}},t instanceof l.m||(this._appCompat=t)}return Object(s.a)(e,[{key:"_databaseId",get:function(){return this._delegate._databaseId}},{key:"settings",value:function(e){var t=this._delegate._getSettings();e.merge||t.host===e.host||Object(l.s)("You are overriding the original host. If you did not intend to override your settings, use {merge: true}."),e.merge&&delete(e=Object.assign(Object.assign({},t),e)).merge,this._delegate._setSettings(e)}},{key:"useEmulator",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object(l.A)(this._delegate,e,t,n)}},{key:"enableNetwork",value:function(){return Object(l.H)(this._delegate)}},{key:"disableNetwork",value:function(){return Object(l.D)(this._delegate)}},{key:"enablePersistence",value:function(e){var t=!1,n=!1;return e&&(t=!!e.synchronizeTabs,n=!!e.experimentalForceOwningTab,Object(l.t)("synchronizeTabs",t,"experimentalForceOwningTab",n)),t?this._persistenceProvider.enableMultiTabIndexedDbPersistence(this):this._persistenceProvider.enableIndexedDbPersistence(this,n)}},{key:"clearPersistence",value:function(){return this._persistenceProvider.clearIndexedDbPersistence(this)}},{key:"terminate",value:function(){return this._appCompat&&(this._appCompat._removeServiceInstance("firestore-compat"),this._appCompat._removeServiceInstance("firestore")),this._delegate._delete()}},{key:"waitForPendingWrites",value:function(){return Object(l.lb)(this._delegate)}},{key:"onSnapshotsInSync",value:function(e){return Object(l.Y)(this._delegate,e)}},{key:"app",get:function(){if(!this._appCompat)throw new l.g("failed-precondition","Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._appCompat}},{key:"collection",value:function(e){try{return new N(this,Object(l.y)(this._delegate,e))}catch(t){throw j(t,"collection()","Firestore.collection()")}}},{key:"doc",value:function(e){try{return new _(this,Object(l.E)(this._delegate,e))}catch(t){throw j(t,"doc()","Firestore.doc()")}}},{key:"collectionGroup",value:function(e){try{return new C(this,Object(l.z)(this._delegate,e))}catch(t){throw j(t,"collectionGroup()","Firestore.collectionGroup()")}}},{key:"runTransaction",value:function(e){var t=this;return Object(l.db)(this._delegate,(function(n){return e(new w(t,n))}
2))}},{key:"batch",value:function(){var e=this;return Object(l.K)(this._delegate),new O(new l.l(this._delegate,(function(t){return Object(l.L)(e._delegate,t)})))}},{key:"loadBundle",value:function(e){return Object(l.V)(this._delegate,e)}},{key:"namedQuery",value:function(e){var t=this;return Object(l.W)(this._delegate,e).then((function(e){return e?new C(t,e):null}))}}]),e}(),k=function(e){Object(i.a)(n,e);var t=Object(a.a)(n);function n(e){var r;return Object(u.a)(this,n),(r=t.call(this)).firestore=e,r}return Object(s.a)(n,[{key:"convertBytes",value:function(e){return new m(new l.b(e))}},{key:"convertReference",value:function(e){var t=this.convertDocumentKey(e,this.firestore._databaseId);return _.forKey(t,this.firestore,null)}}]),n}(l.a);var w=function(){function e(t,n){Object(u.a)(this,e),this._firestore=t,this._delegate=n,this._userDataWriter=new k(t)}return Object(s.a)(e,[{key:"get",value:function(e){var t=this,n=P(e);return this._delegate.get(n).then((function(e){return new T(t._firestore,new l.e(t._firestore._delegate,t._userDataWriter,e._key,e._document,e.metadata,n.converter))}))}},{key:"set",value:function(e,t,n){var r=P(e);return n?(d("Transaction.set",n),this._delegate.set(r,t,n)):this._delegate.set(r,t),this}},{key:"update",value:function(e,t,n){for(var r=arguments.length,i=new Array(r>3?r-3:0),a=3;a<r;a++)i[a-3]=arguments[a];var o,u=P(e);2===arguments.length?this._delegate.update(u,t):(o=this._delegate).update.apply(o,[u,t,n].concat(i));return this}},{key:"delete",value:function(e){var t=P(e);return this._delegate.delete(t),this}}]),e}(),O=function(){function e(t){Object(u.a)(this,e),this._delegate=t}return Object(s.a)(e,[{key:"set",value:function(e,t,n){var r=P(e);return n?(d("WriteBatch.set",n),this._delegate.set(r,t,n)):this._delegate.set(r,t),this}},{key:"update",value:function(e,t,n){for(var r=arguments.length,i=new Array(r>3?r-3:0),a=3;a<r;a++)i[a-3]=arguments[a];var o,u=P(e);2===arguments.length?this._delegate.update(u,t):(o=this._delegate).update.apply(o,[u,t,n].concat(i));return this}},{key:"delete",value:function(e){var t=P(e);return this._delegate.delete(t),this}},{key:"commit",value:function(){return this._delegate.commit()}}]),e}(),x=function(){function e(t,n,r){Object(u.a)(this,e),this._firestore=t,this._userDataWriter=n,this._delegate=r}return Object(s.a)(e,[{key:"fromFirestore",value:function(e,t){var n=new l.i(this._firestore._delegate,this._userDataWriter,e._key,e._document,e.metadata,null);return this._delegate.fromFirestore(new I(this._firestore,n),null!==t&&void 0!==t?t:{})}},{key:"toFirestore",value:function(e,t){return t?this._delegate.toFirestore(e,t):this._delegate.toFirestore(e)}}],[{key:"getInstance",value:function(t,n){var r=e.INSTANCES,i=r.get(t);i||(i=new WeakMap,r.set(t,i));var a=i.get(n);return a||(a=new e(t,new k(t),n),i.set(n,a)),a}}]),e}();x.INSTANCES=new WeakMap;var _=function(){function e(t,n){Object(u.a)(this,e),this.firestore=t,this._delegate=n,this._userDataWriter=new k(t)}return Object(s.a)(e,[{key:"id",get:function(){return this._delegate.id}},{key:"parent",get:function(){return new N(this.firestore,this._delegate.parent)}},{key:"path",get:function(){return this._delegate.path}},{key:"collection",value:function(e){try{return new N(this.firestore,Object(l.y)(this._delegate,e))}catch(t){throw j(t,"collection()","DocumentReference.collection()")}}},{key:"isEqual",value:function(e){return(e=Object(f.l)(e))instanceof l.d&&Object(l.cb)(this._delegate,e)}},{key:"set",value:function(e,t){t=d("DocumentReference.set",t);try{return t?Object(l.fb)(this._delegate,e,t):Object(l.fb)(this._delegate,e)}catch(n){throw j(n,"setDoc()","DocumentReference.set()")}}},{key:"update",value:function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];try{return 1===arguments.length?Object(l.kb)(this._delegate,e):l.kb.apply(void 0,[this._delegate,e,t].concat(r))}catch(a){throw j(a,"updateDoc()","DocumentReference.update()")}}},{key:"delete",value:function(){return Object(l.B)(this._delegate)}},{key:"onSnapshot",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];
2var i=E(n),a=S(n,(function(t){return new T(e.firestore,new l.e(e.firestore._delegate,e._userDataWriter,t._key,t._document,t.metadata,e._delegate.converter))}));return Object(l.X)(this._delegate,i,a)}},{key:"get",value:function(e){var t=this;return("cache"===(null===e||void 0===e?void 0:e.source)?Object(l.N)(this._delegate):"server"===(null===e||void 0===e?void 0:e.source)?Object(l.O)(this._delegate):Object(l.M)(this._delegate)).then((function(e){return new T(t.firestore,new l.e(t.firestore._delegate,t._userDataWriter,e._key,e._document,e.metadata,t._delegate.converter))}))}},{key:"withConverter",value:function(t){return new e(this.firestore,t?this._delegate.withConverter(x.getInstance(this.firestore,t)):this._delegate.withConverter(null))}}],[{key:"forPath",value:function(t,n,r){if(t.length%2!==0)throw new l.g("invalid-argument","Invalid document reference. Document references must have an even number of segments, but "+"".concat(t.canonicalString()," has ").concat(t.length));return new e(n,new l.d(n._delegate,r,new l.n(t)))}},{key:"forKey",value:function(t,n,r){return new e(n,new l.d(n._delegate,r,t))}}]),e}();function j(e,t,n){return e.message=e.message.replace(t,n),e}function E(e){var t,n=Object(o.a)(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;if("object"===typeof r&&!y(r))return r}}catch(i){n.e(i)}finally{n.f()}return{}}function S(e,t){var n,r,i;return{next:function(e){i.next&&i.next(t(e))},error:null===(n=(i=y(e[0])?e[0]:y(e[1])?e[1]:"function"===typeof e[0]?{next:e[0],error:e[1],complete:e[2]}:{next:e[1],error:e[2],complete:e[3]}).error)||void 0===n?void 0:n.bind(i),complete:null===(r=i.complete)||void 0===r?void 0:r.bind(i)}}var T=function(){function e(t,n){Object(u.a)(this,e),this._firestore=t,this._delegate=n}return Object(s.a)(e,[{key:"ref",get:function(){return new _(this._firestore,this._delegate.ref)}},{key:"id",get:function(){return this._delegate.id}},{key:"metadata",get:function(){return this._delegate.metadata}},{key:"exists",get:function(){return this._delegate.exists()}},{key:"data",value:function(e){return this._delegate.data(e)}},{key:"get",value:function(e,t){return this._delegate.get(e,t)}},{key:"isEqual",value:function(e){return Object(l.hb)(this._delegate,e._delegate)}}]),e}(),I=function(e){Object(i.a)(n,e);var t=Object(a.a)(n);function n(){return Object(u.a)(this,n),t.apply(this,arguments)}return Object(s.a)(n,[{key:"data",value:function(e){var t=this._delegate.data(e);return Object(l.q)(void 0!==t,"Document in a QueryDocumentSnapshot should exist"),t}}]),n}(T),C=function(){function e(t,n){Object(u.a)(this,e),this.firestore=t,this._delegate=n,this._userDataWriter=new k(t)}return Object(s.a)(e,[{key:"where",value:function(t,n,r){try{return new e(this.firestore,Object(l.ab)(this._delegate,Object(l.mb)(t,n,r)))}catch(i){throw j(i,/(orderBy|where)\(\)/,"Query.$1()")}}},{key:"orderBy",value:function(t,n){try{return new e(this.firestore,Object(l.ab)(this._delegate,Object(l.Z)(t,n)))}catch(r){throw j(r,/(orderBy|where)\(\)/,"Query.$1()")}}},{key:"limit",value:function(t){try{return new e(this.firestore,Object(l.ab)(this._delegate,Object(l.T)(t)))}catch(n){throw j(n,"limit()","Query.limit()")}}},{key:"limitToLast",value:function(t){try{return new e(this.firestore,Object(l.ab)(this._delegate,Object(l.U)(t)))}catch(n){throw j(n,"limitToLast()","Query.limitToLast()")}}},{key:"startAt",value:function(){try{return new e(this.firestore,Object(l.ab)(this._delegate,l.jb.apply(void 0,arguments)))}catch(t){throw j(t,"startAt()","Query.startAt()")}}},{key:"startAfter",value:function(){try{return new e(this.firestore,Object(l.ab)(this._delegate,l.ib.apply(void 0,arguments)))}catch(t){throw j(t,"startAfter()","Query.startAfter()")}}},{key:"endBefore",value:function(){try{return new e(this.firestore,Object(l.ab)(this._delegate,l.J.apply(void 0,arguments)))}catch(t){throw j(t,"endBefore()","Query.endBefore()")}}},{key:"endAt",value:function(){try{return new e(this.firestore,Object(l.ab)(this._delegate,l.I.apply(void 0,arguments)))}catch(t){throw j(t,"endAt()","Query.endAt()")}}},{key:"isEqual",value:function(e){return Object(l.bb)(this._delegate,e._delegate)}},{key:"get",value:function(e){var t=this;
2return("cache"===(null===e||void 0===e?void 0:e.source)?Object(l.Q)(this._delegate):"server"===(null===e||void 0===e?void 0:e.source)?Object(l.R)(this._delegate):Object(l.P)(this._delegate)).then((function(e){return new R(t.firestore,new l.j(t.firestore._delegate,t._userDataWriter,t._delegate,e._snapshot))}))}},{key:"onSnapshot",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=E(n),a=S(n,(function(t){return new R(e.firestore,new l.j(e.firestore._delegate,e._userDataWriter,e._delegate,t._snapshot))}));return Object(l.X)(this._delegate,i,a)}},{key:"withConverter",value:function(t){return new e(this.firestore,t?this._delegate.withConverter(x.getInstance(this.firestore,t)):this._delegate.withConverter(null))}}]),e}(),A=function(){function e(t,n){Object(u.a)(this,e),this._firestore=t,this._delegate=n}return Object(s.a)(e,[{key:"type",get:function(){return this._delegate.type}},{key:"doc",get:function(){return new I(this._firestore,this._delegate.doc)}},{key:"oldIndex",get:function(){return this._delegate.oldIndex}},{key:"newIndex",get:function(){return this._delegate.newIndex}}]),e}(),R=function(){function e(t,n){Object(u.a)(this,e),this._firestore=t,this._delegate=n}return Object(s.a)(e,[{key:"query",get:function(){return new C(this._firestore,this._delegate.query)}},{key:"metadata",get:function(){return this._delegate.metadata}},{key:"size",get:function(){return this._delegate.size}},{key:"empty",get:function(){return this._delegate.empty}},{key:"docs",get:function(){var e=this;return this._delegate.docs.map((function(t){return new I(e._firestore,t)}))}},{key:"docChanges",value:function(e){var t=this;return this._delegate.docChanges(e).map((function(e){return new A(t._firestore,e)}))}},{key:"forEach",value:function(e,t){var n=this;this._delegate.forEach((function(r){e.call(t,new I(n._firestore,r))}))}},{key:"isEqual",value:function(e){return Object(l.hb)(this._delegate,e._delegate)}}]),e}(),N=function(e){Object(i.a)(n,e);var t=Object(a.a)(n);function n(e,r){var i;return Object(u.a)(this,n),(i=t.call(this,e,r)).firestore=e,i._delegate=r,i}return Object(s.a)(n,[{key:"id",get:function(){return this._delegate.id}},{key:"path",get:function(){return this._delegate.path}},{key:"parent",get:function(){var e=this._delegate.parent;return e?new _(this.firestore,e):null}},{key:"doc",value:function(e){try{return new _(this.firestore,void 0===e?Object(l.E)(this._delegate):Object(l.E)(this._delegate,e))}catch(t){throw j(t,"doc()","CollectionReference.doc()")}}},{key:"add",value:function(e){var t=this;return Object(l.u)(this._delegate,e).then((function(e){return new _(t.firestore,e)}))}},{key:"isEqual",value:function(e){return Object(l.cb)(this._delegate,e._delegate)}},{key:"withConverter",value:function(e){return new n(this.firestore,e?this._delegate.withConverter(x.getInstance(this.firestore,e)):this._delegate.withConverter(null))}}]),n}(C);function P(e){return Object(l.p)(e,l.d)}var D=function(){function e(){Object(u.a)(this,e);for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];this._delegate=Object(r.a)(l.f,n)}return Object(s.a)(e,[{key:"isEqual",value:function(e){return(e=Object(f.l)(e))instanceof l.f&&this._delegate._internalPath.isEqual(e._internalPath)}}],[{key:"documentId",value:function(){return new e(l.o.keyField().canonicalString())}}]),e}(),L=function(){function e(t){Object(u.a)(this,e),this._delegate=t}return Object(s.a)(e,[{key:"isEqual",value:function(e){return this._delegate.isEqual(e._delegate)}}],[{key:"serverTimestamp",value:function(){var t=Object(l.eb)();return t._methodName="FieldValue.serverTimestamp",new e(t)}},{key:"delete",value:function(){var t=Object(l.C)();return t._methodName="FieldValue.delete",new e(t)}},{key:"arrayUnion",value:function(){var t=l.w.apply(void 0,arguments);return t._methodName="FieldValue.arrayUnion",new e(t)}},{key:"arrayRemove",value:function(){var t=l.v.apply(void 0,arguments);return t._methodName="FieldValue.arrayRemove",new e(t)}},{key:"increment",value:function(t){var n=Object(l.S)(t);return n._methodName="FieldValue.increment",new e(n)}}]),e}(),M={Firestore:b,GeoPoint:l.h,Timestamp:l.k,Blob:m,Transaction:w,WriteBatch:O,DocumentReference:_,DocumentSnapshot:T,Query:C,QueryDocumentSnapshot:I,QuerySnapsh
2ot:R,CollectionReference:N,FieldPath:D,FieldValue:L,setLogLevel:function(e){Object(l.gb)(e)},CACHE_SIZE_UNLIMITED:l.c};!function(e){var t;t=function(e,t){return new b(e,t,new g)},e.INTERNAL.registerComponent(new h.a("firestore-compat",(function(e){var n=e.getProvider("app-compat").getImmediate(),r=e.getProvider("firestore").getImmediate();return t(n,r)}),"PUBLIC").setServiceProps(Object.assign({},M))),e.registerVersion("@firebase/firestore-compat","0.1.18")}(c.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return gn}));var r=n(14),i=n(7),a=n(1),o=n.n(a),u="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s="object"===("undefined"===typeof window?"undefined":u(window))&&"object"===("undefined"===typeof document?"undefined":u(document))&&9===document.nodeType,c=(n(50),n(66)),l=n(28),f=n(71),h=n(36),d={}.constructor;function p(e){if(null==e||"object"!==typeof e)return e;if(Array.isArray(e))return e.map(p);if(e.constructor!==d)return e;var t={};for(var n in e)t[n]=p(e[n]);return t}function v(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,i=p(t),a=r.plugins.onCreateRule(e,i,n);return a||(e[0],null)}var m=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n},y=function(e,t){if(void 0===t&&(t=!1),!Array.isArray(e))return e;var n="";if(Array.isArray(e[0]))for(var r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=", "),n+=m(e[r]," ");else n=m(e,", ");return t||"!important"!==e[e.length-1]||(n+=" !important"),n};function g(e){return e&&!1===e.format?{linebreak:"",space:""}:{linebreak:"\n",space:" "}}function b(e,t){for(var n="",r=0;r<t;r++)n+="  ";return n+e}function k(e,t,n){void 0===n&&(n={});var r="";if(!t)return r;var i=n.indent,a=void 0===i?0:i,o=t.fallbacks;!1===n.format&&(a=-1/0);var u=g(n),s=u.linebreak,c=u.space;if(e&&a++,o)if(Array.isArray(o))for(var l=0;l<o.length;l++){var f=o[l];for(var h in f){var d=f[h];null!=d&&(r&&(r+=s),r+=b(h+":"+c+y(d)+";",a))}}else for(var p in o){var v=o[p];null!=v&&(r&&(r+=s),r+=b(p+":"+c+y(v)+";",a))}for(var m in t){var k=t[m];null!=k&&"fallbacks"!==m&&(r&&(r+=s),r+=b(m+":"+c+y(k)+";",a))}return(r||n.allowEmpty)&&e?(r&&(r=""+s+r+s),b(""+e+c+"{"+r,--a)+b("}",a)):r}var w=/([[\].#*$><+~=|^:(),"'`\s])/g,O="undefined"!==typeof CSS&&CSS.escape,x=function(e){return O?O(e):e.replace(w,"\\$1")},_=function(){function e(e,t,n){this.type="style",this.isProcessed=!1;var r=n.sheet,i=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:i&&(this.renderer=new i)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var i=t;n&&!1===n.process||(i=this.options.jss.plugins.onChangeValue(t,e,this));var a=null==i||!1===i,o=e in this.style;if(a&&!o&&!r)return this;var u=a&&o;if(u?delete this.style[e]:this.style[e]=i,this.renderable&&this.renderer)return u?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,i),this;var s=this.options.sheet;return s&&s.attached,this},e}(),j=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var a=r.selector,o=r.scoped,u=r.sheet,s=r.generateId;return a?i.selectorText=a:!1!==o&&(i.id=s(Object(f.a)(Object(f.a)(i)),u),i.selectorText="."+x(i.id)),i}Object(l.a)(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!==typeof n?e[t]=n:Array.isArray(n)&&(e[t]=y(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?Object(i.a)({},e,{allowEmpty:!0}):e;return k(this.selectorText,this.style,n)},Object(c.a)(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(_),E={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new j(e,t,n)}},S={indent:1,children:!0},T=/@([\w-]+)/,I=function(){function e(e,t,n){this.type="conditional",this.isProcessed=!1,this.key=e;var r=e.match(T);for(var a in this.at=r?r[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new J(Object(i.a)({},n,{parent:this})),t)this.rules.add(a,t[a]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.toString=function(e){void 0===e&&(e=S);var t=g(e).linebreak;if(null==e.indent&&(e.indent=S.indent),null==e.children&&(e.children=S.children),!1===e.children)return this.query+" {}";var n=this.rules.toString(e);
2return n?this.query+" {"+t+n+t+"}":""},e}(),C=/@media|@supports\s+/,A={onCreateRule:function(e,t,n){return C.test(e)?new I(e,t,n):null}},R={indent:1,children:!0},N=/@keyframes\s+([\w-]+)/,P=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var r=e.match(N);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var a=n.scoped,o=n.sheet,u=n.generateId;for(var s in this.id=!1===a?this.name:x(u(this,o)),this.rules=new J(Object(i.a)({},n,{parent:this})),t)this.rules.add(s,t[s],Object(i.a)({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){void 0===e&&(e=R);var t=g(e).linebreak;if(null==e.indent&&(e.indent=R.indent),null==e.children&&(e.children=R.children),!1===e.children)return this.at+" "+this.id+" {}";var n=this.rules.toString(e);return n&&(n=""+t+n+t),this.at+" "+this.id+" {"+n+"}"},e}(),D=/@keyframes\s+/,L=/\$([\w-]+)/g,M=function(e,t){return"string"===typeof e?e.replace(L,(function(e,n){return n in t?t[n]:e})):e},F=function(e,t,n){var r=e[t],i=M(r,n);i!==r&&(e[t]=i)},U={onCreateRule:function(e,t,n){return"string"===typeof e&&D.test(e)?new P(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&F(e,"animation-name",n.keyframes),"animation"in e&&F(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return M(e,r.keyframes);default:return e}}},V=function(e){function t(){return e.apply(this,arguments)||this}return Object(l.a)(t,e),t.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?Object(i.a)({},e,{allowEmpty:!0}):e;return k(this.key,this.style,n)},t}(_),B={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new V(e,t,n
vendor: 8,232 bytes, line 2
2):null}},z=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){var t=g(e).linebreak;if(Array.isArray(this.style)){for(var n="",r=0;r<this.style.length;r++)n+=k(this.at,this.style[r]),this.style[r+1]&&(n+=t);return n}return k(this.at,this.style,e)},e}(),q=/@font-face/,W={onCreateRule:function(e,t,n){return q.test(e)?new z(e,t,n):null}},H=function(){function e(e,t,n){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){return k(this.key,this.style,e)},e}(),K={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-viewport"===e?new H(e,t,n):null}},G=function(){function e(e,t,n){this.type="simple",this.isProcessed=!1,this.key=e,this.value=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"},e}(),$={"@charset":!0,"@import":!0,"@namespace":!0},Q=[E,A,U,B,W,K,{onCreateRule:function(e,t,n){return e in $?new G(e,t,n):null}}],Y={process:!0},X={force:!0,process:!0},J=function(){function e(e){this.map={},this.raw={},this.index=[],this.counter=0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var t=e.prototype;return t.add=function(e,t,n){var r=this.options,a=r.parent,o=r.sheet,u=r.jss,s=r.Renderer,c=r.generateId,l=r.scoped,f=Object(i.a)({classes:this.classes,parent:a,sheet:o,jss:u,Renderer:s,generateId:c,scoped:l,name:e,keyframes:this.keyframes,selector:void 0},n),h=e;e in this.raw&&(h=e+"-d"+this.counter++),this.raw[h]=t,h in this.classes&&(f.selector="."+x(this.classes[h]));var d=v(h,t,f);if(!d)return null;this.register(d);var p=void 0===f.index?this.index.length:f.index;return this.index.splice(p,0,d),d},t.get=function(e){return this.map[e]},t.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.index.indexOf(e),1)},t.indexOf=function(e){return this.index.indexOf(e)},t.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},t.register=function(e){this.map[e.key]=e,e instanceof j?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof P&&this.keyframes&&(this.keyframes[e.name]=e.id)},t.unregister=function(e){delete this.map[e.key],e instanceof j?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof P&&delete this.keyframes[e.name]},t.update=function(){var e,t,n;if("string"===typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],e=null),e)this.updateOne(this.map[e],t,n);else for(var r=0;r<this.index.length;r++)this.updateOne(this.index[r],t,n)},t.updateOne=function(t,n,r){void 0===r&&(r=Y);var i=this.options,a=i.jss.plugins,o=i.sheet;if(t.rules instanceof e)t.rules.update(n,r);else{var u=t.style;if(a.onUpdate(n,t,o,r),r.process&&u&&u!==t.style){for(var s in a.onProcessStyle(t.style,t,o),t.style){var c=t.style[s];c!==u[s]&&t.prop(s,c,X)}for(var l in u){var f=t.style[l],h=u[l];null==f&&f!==h&&t.prop(l,null,X)}}}},t.toString=function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,i=g(e).linebreak,a=0;a<this.index.length;a++){var o=this.index[a].toString(e);(o||r)&&(t&&(t+=i),t+=o)}return t},e}(),Z=function(){function e(e,t){for(var n in this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=Object(i.a)({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),t.Renderer&&(this.renderer=new t.Renderer(this)),this.rules=new J(this.options),e)this.rules.add(n,e[n]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var i=this.rules.add(e,t,n);return i?(this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(r?r.push(i):(this.insertRule(i),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),i):i:(this.deployed=!1,i)):null},t.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},t.addRules=function(e,t){var n=[];for(var r in e){var i=this.addRule(r,e[r],t);i&&n.push(i)}return n},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t="object"===typeof e?e:this.rules.get(e);return!(!t||this.attached&&!t.renderable)&&(this.rules.remove(t),!(this.attached&&t.renderable&&this.renderer)||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.updateOne=function(e,t,n){return this.rules.updateOne(e,t,n),this},t.toString=function(e){return this.rules.toString(e)},e}(),ee=function(){function e(){this.plugins={internal:[],external:[]},this.registry={}}var t=e.prototype;return t.onCreateRule=function(e,t,n){for(var r=0;r<this.registry.onCreateRule.length;r++){var i=this.registry.onCreateRule[r](e,t,n);if(i)return i}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,n){for(var r=0;r<this.registry.onProcessStyle.length;r++)t.style=this.registry.onProcessStyle[r](t.style,t,n)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,n,r){for(var i=0;i<this.registry.onUpdate.length;i++)this.registry.onUpdate[i](e,t,n,r)},t.onChangeValue=function(e,t,n){for(var r=e,i=0;i<this.registry.onChangeValue.length;i++)r=this.registry.onChangeValue[i](r,t,n);return r},t.use=function(e,t){void 0===t&&(t={queue:"external"});var n=this.plugins[t.queue];-1===n.indexOf(e)&&(n.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce((function(e,t){for(var n in t)n in e&&e[n].push(t[n]);return e}),{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),te=new(function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=Object(h.a)(t,["attached"]),i=g(r).linebreak,a="",o=0;o<this.registry.length;o++){var u=this.registry[o];null!=n&&u.attached!==n||(a&&(a+=i),a+=u.toString(r))}return a},Object(c.a)(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}()),ne="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window&&window.Math===Math?window:"undefined"!==typeof self&&self.Math===Math?self:Function("return this")(),re="2f1acc6c3a606b082e5eef5e54414ffb";null==ne[re]&&(ne[re]=0);var ie=ne[re]++,ae=function(e){void 0===e&&(e={});var t=0;return function(n,r){t+=1;var i="",a="";return r&&(r.options.classNamePrefix&&(a=r.options.classNamePrefix),null!=r.options.jss.id&&(i=String(r.options.jss.id))),e.minify?""+(a||"c")+ie+i+t:a+n.key+"-"+ie+(i?"-"+i:"")+"-"+t}},oe=function(e){var t;return function(){return t||(t=e()),t}},ue=function(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(n){return""}},se=function(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=y(n,!0),"!important"===n[n.length-1]))return e.style.setProperty(t,r,"
2important"),!0;e.attributeStyleMap?e.attributeStyleMap.set(t,r):e.style.setProperty(t,r)}catch(i){return!1}return!0},ce=function(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(n){}},le=function(e,t){return e.selectorText=t,e.selectorText===t},fe=oe((function(){return document.querySelector("head")}));function he(e){var t=te.registry;if(t.length>0){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"===typeof r){var i=function(e){for(var t=fe(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}var de=oe((function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null})),pe=function(e,t,n){try{"insertRule"in e?e.insertRule(t,n):"appendRule"in e&&e.appendRule(t)}catch(r){return!1}return e.cssRules[n]},ve=function(e,t){var n=e.cssRules.length;return void 0===t||t>n?n:t},me=function(){function e(e){this.getPropertyValue=ue,this.setProperty=se,this.removeProperty=ce,this.setSelector=le,this.hasInsertedRules=!1,this.cssRules=[],e&&te.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,i=t.element;this.element=i||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var a=de();a&&this.element.setAttribute("nonce",a)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=he(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"===typeof n.nodeType){var i=n,a=i.parentNode;a&&a.insertBefore(e,i.nextSibling)}else fe().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n<e.index.length;n++)this.insertRule(e.index[n],n,t)},t.insertRule=function(e,t,n){if(void 0===n&&(n=this.element.sheet),e.rules){var r=e,i=n;if("conditional"===e.type||"keyframes"===e.type){var a=ve(n,t);if(!1===(i=pe(n,r.toString({children:!1}),a)))return!1;this.refCssRule(e,a,i)}return this.insertRules(r.rules,i),i}var o=e.toString();if(!o)return!1;var u=ve(n,t),s=pe(n,o,u);return!1!==s&&(this.hasInsertedRules=!0,this.refCssRule(e,u,s),s)},t.refCssRule=function(e,t,n){e.renderable=n,e.options.parent instanceof Z&&(this.cssRules[t]=n)},t.deleteRule=function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),this.cssRules.splice(n,1),!0)},t.indexOf=function(e){return this.cssRules.indexOf(e)},t.replaceRule=function(e,t){var n=this.indexOf(e);return-1!==n&&(this.element.sheet.deleteRule(n),this.cssRules.splice(n,1),this.insertRule(t,n))},t.getRules=function(){return this.element.sheet.cssRules},e}(),ye=0,ge=function(){function e(e){this.id=ye++,this.version="10.8.0",this.plugins=new ee,this.options={id:{minify:!1},createGenerateId:ae,Renderer:s?me:null,plugins:[]},this.generateId=ae({minify:!1});for(var t=0;t<Q.length;t++)this.plugins.use(Q[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=Object(i.a)({}
2,this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var n=t.index;"number"!==typeof n&&(n=0===te.index?0:te.index+1);var r=new Z(e,Object(i.a)({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r},t.removeStyleSheet=function(e){return e.detach(),te.remove(e),this},t.createRule=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n={}),"object"===typeof e)return this.createRule(void 0,e,t);var r=Object(i.a)({},n,{name:e,jss:this,Renderer:this.options.Renderer});r.generateId||(r.generateId=this.generateId),r.classes||(r.classes={}),r.keyframes||(r.keyframes={});var a=v(e,t,r);return a&&this.plugins.onProcessRule(a),a},t.use=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){e.plugins.use(t)})),this},e}(),be=function(e){return new ge(e)},ke="object"===typeof CSS&&null!=CSS&&"number"in CSS;function we(e){var t=null;for(var n in e){var r=e[n],i=typeof r;if("function"===i)t||(t={}),t[n]=r;else if("object"===i&&null!==r&&!Array.isArray(r)){var a=we(r);a&&(t||(t={}),t[n]=a)}}return t}be();var Oe=n(199),xe={set:function(e,t,n,r){var i=e.get(t);i||(i=new Map,e.set(t,i)),i.set(n,r)},get:function(e,t,n){var r=e.get(t);return r?r.get(n):void 0},delete:function(e,t,n){e.get(t).delete(n)}},_e=xe,je=n(114),Ee=(n(89),n(86)),Se=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];var Te=Date.now(),Ie="fnValues"+Te,Ce="fnStyle"+ ++Te,Ae=function(){return{onCreateRule:function(e,t,n){if("function"!==typeof t)return null;var r=v(e,{},n);return r[Ce]=t,r},onProcessStyle:function(e,t){if(Ie in t||Ce in t)return e;var n={};for(var r in e){var i=e[r];"function"===typeof i&&(delete e[r],n[r]=i)}return t[Ie]=n,e},onUpdate:function(e,t,n,r){var i=t,a=i[Ce];a&&(i.style=a(e)||{});var o=i[Ie];if(o)for(var u in o)i.prop(u,o[u](e),r)}}},Re="@global",Ne="@global ",Pe=function(){function e(e,t,n){for(var r in this.type="global",this.at=Re,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new J(Object(i.a)({},n,{parent:this})),t)this.rules.add(r,t[r]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(){return this.rules.toString()},e}(),De=function(){function e(e,t,n){this.type="global",this.at=Re,this.isProcessed=!1,this.key=e,this.options=n;var r=e.substr(Ne.length);this.rule=n.jss.createRule(r,t,Object(i.a)({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),Le=/\s*,\s*/g;function Me(e,t){for(var n=e.split(Le),r="",i=0;i<n.length;i++)r+=t+" "+n[i].trim(),n[i+1]&&(r+=", ");return r}var Fe=function(){return{onCreateRule:function(e,t,n){if(!e)return null;if(e===Re)return new Pe(e,t,n);if("@"===e[0]&&e.substr(0,Ne.length)===Ne)return new De(e,t,n);var r=n.parent;return r&&("global"===r.type||r.options.parent&&"global"===r.options.parent.type)&&(n.scoped=!1),!1===n.scoped&&(n.selector=e),null},onProcessRule:function(e,t){"style"===e.type&&t&&(function(e,t){var n=e.options,r=e.style,a=r?r[Re]:null;if(a){for(var o in a)t.addRule(o,a[o],Object(i.a)({},n,{selector:Me(o,e.selector)}));delete r[Re]}}(e,t),function(e,t){var n=e.options,r=e.style;for(var a in r)if("@"===a[0]&&a.substr(0,Re.length)===Re){var o=Me(a.substr(Re.length),e.selector);t.addRule(o,r[a],Object(i.a)({},n,{selector:o})),delete r[a]}}(e,t))}}},Ue=/\s*,\s*/g,Ve=/&/g,Be=/\$([\w-]+)/g;var ze=function(){function e(e,t){return function(n,r){var i=e.getRule(r)||t&&t.getRule(r);return i?i.selector:r}}function t(e,t){for(var n=t.split(Ue),r=e.split(Ue),i="",a=0;a<n.length;a++)for(var o=n[a],u=0;u<r.length;u++){var s=r[u];
2i&&(i+=", "),i+=-1!==s.indexOf("&")?s.replace(Ve,o):o+" "+s}return i}function n(e,t,n){if(n)return Object(i.a)({},n,{index:n.index+1});var r=e.options.nestingLevel;r=void 0===r?1:r+1;var a=Object(i.a)({},e.options,{nestingLevel:r,index:t.indexOf(e)+1});return delete a.name,a}return{onProcessStyle:function(r,a,o){if("style"!==a.type)return r;var u,s,c=a,l=c.options.parent;for(var f in r){var h=-1!==f.indexOf("&"),d="@"===f[0];if(h||d){if(u=n(c,l,u),h){var p=t(f,c.selector);s||(s=e(l,o)),p=p.replace(Be,s),l.addRule(p,r[f],Object(i.a)({},u,{selector:p}))}else d&&l.addRule(f,{},u).addRule(c.key,r[f],{selector:c.selector});delete r[f]}}return r}}},qe=/[A-Z]/g,We=/^ms-/,He={};function Ke(e){return"-"+e.toLowerCase()}var Ge=function(e){if(He.hasOwnProperty(e))return He[e];var t=e.replace(qe,Ke);return He[e]=We.test(t)?"-"+t:t};function $e(e){var t={};for(var n in e){t[0===n.indexOf("--")?n:Ge(n)]=e[n]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map($e):t.fallbacks=$e(e.fallbacks)),t}var Qe=function(){return{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=$e(e[t]);return e}return $e(e)},onChangeValue:function(e,t,n){if(0===t.indexOf("--"))return e;var r=Ge(t);return t===r?e:(n.prop(r,e),null)}}},Ye=ke&&CSS?CSS.px:"px",Xe=ke&&CSS?CSS.ms:"ms",Je=ke&&CSS?CSS.percent:"%";function Ze(e){var t=/(-[a-z])/g,n=function(e){return e[1].toUpperCase()},r={};for(var i in e)r[i]=e[i],r[i.replace(t,n)]=e[i];return r}var et=Ze({"animation-delay":Xe,"animation-duration":Xe,"background-position":Ye,"background-position-x":Ye,"background-position-y":Ye,"background-size":Ye,border:Ye,"border-bottom":Ye,"border-bottom-left-radius":Ye,"border-bottom-right-radius":Ye,"border-bottom-width":Ye,"border-left":Ye,"border-left-width":Ye,"border-radius":Ye,"border-right":Ye,"border-right-width":Ye,"border-top":Ye,"border-top-left-radius":Ye,"border-top-right-radius":Ye,"border-top-width":Ye,"border-width":Ye,"border-block":Ye,"border-block-end":Ye,"border-block-end-width":Ye,"border-block-start":Ye,"border-block-start-width":Ye,"border-block-width":Ye,"border-inline":Ye,"border-inline-end":Ye,"border-inline-end-width":Ye,"border-inline-start":Ye,"border-inline-start-width":Ye,"border-inline-width":Ye,"border-start-start-radius":Ye,"border-start-end-radius":Ye,"border-end-start-radius":Ye,"border-end-end-radius":Ye,margin:Ye,"margin-bottom":Ye,"margin-left":Ye,"margin-right":Ye,"margin-top":Ye,"margin-block":Ye,"margin-block-end":Ye,"margin-block-start":Ye,"margin-inline":Ye,"margin-inline-end":Ye,"margin-inline-start":Ye,padding:Ye,"padding-bottom":Ye,"padding-left":Ye,"padding-right":Ye,"padding-top":Ye,"padding-block":Ye,"padding-block-end":Ye,"padding-block-start":Ye,"padding-inline":Ye,"padding-inline-end":Ye,"padding-inline-start":Ye,"mask-position-x":Ye,"mask-position-y":Ye,"mask-size":Ye,height:Ye,width:Ye,"min-height":Ye,"max-height":Ye,"min-width":Ye,"max-width":Ye,bottom:Ye,left:Ye,top:Ye,right:Ye,inset:Ye,"inset-block":Ye,"inset-block-end":Ye,"inset-block-start":Ye,"inset-inline":Ye,"inset-inline-end":Ye,"inset-inline-start":Ye,"box-shadow":Ye,"text-shadow":Ye,"column-gap":Ye,"column-rule":Ye,"column-rule-width":Ye,"column-width":Ye,"font-size":Ye,"font-size-delta":Ye,"letter-spacing":Ye,"text-decoration-thickness":Ye,"text-indent":Ye,"text-stroke":Ye,"text-stroke-width":Ye,"word-spacing":Ye,motion:Ye,"motion-offset":Ye,outline:Ye,"outline-offset":Ye,"outline-width":Ye,perspective:Ye,"perspective-origin-x":Je,"perspective-origin-y":Je,"transform-origin":Je,"transform-origin-x":Je,"transform-origin-y":Je,"transform-origin-z":Je,"transition-delay":Xe,"transition-duration":Xe,"vertical-align":Ye,"flex-basis":Ye,"shape-margin":Ye,size:Ye,gap:Ye,grid:Ye,"grid-gap":Ye,"row-gap":Ye,"grid-row-gap":Ye,"grid-column-gap":Ye,"grid-template-rows":Ye,"grid-template-columns":Ye,"grid-auto-rows":Ye,"grid-auto-columns":Ye,"box-shadow-x":Ye,"box-shadow-y":Ye,"box-shadow-blur":Ye,"box-shadow-spread":Ye,"font-line-height":Ye,"text-shadow-x":Ye,"text-shadow-y":Ye,"text-shadow-blur":Ye});function tt(e,t,n){if(null==t)return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]=tt(e,t[r],n);else if("object"===typeof t)if("fallbacks"===e)for(var i in t)t[i]=tt(i,t[i],n);else for(var a in t)t[a]=tt(e+"-"+a,t[a],n);else if("number"===typeof t&&!1===isNaN(t)){var o=n[e]||et[e];return!o||0===t&&o===Ye?t.toString():"function"===typeof o?o(t).toString():""+t+o}return t}var nt=function(e){void 0===e&&(e={});var t=Ze(e);return{onProcessStyle:function(e,n){if("style"!==n.type)return e;for(var r in e)e[r]=tt(r,e[r],t);return e},onChangeValue:function(e,n){return tt(n,e,t)}}},rt=n(52),it="",at="",ot="",ut="",st=s&&"ontouchstart"in document.documentElement;if(s){var ct={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},lt=document.createElement("p").style;for(var ft in ct)if(ft+"Transform"in lt){it=ft,at=ct[ft];break}"Webkit"===it&&"msHyphens"in lt&&(it="ms",at=ct.ms,ut="edge"),"Webkit"===it&&"-apple-trailing-word"in lt&&(ot="apple")}var ht=it,dt=at,pt=ot,vt=ut,mt=st;var yt={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===ht?"-webkit-"+e:dt+e)}},gt={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===ht?dt+"print-"+e:e)}},bt=/[-\s]+(.)?/g;function kt(e,t){return t?t.toUpperCase():""}function wt(e){return e.replace(bt,kt)}function Ot(e){return wt("-"+e)}var xt,_t={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===ht){var n="mask-image";if(wt(n)in t)return e;if(ht+Ot(n)in t)return dt+e}return e}},jt={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==pt||mt?e:dt+e)}},Et={noPrefill:["transform"],supportedProperty:function(e,t,n){return"transform"===e&&(n.transform?e:dt+e)}},St={noPrefill:["transition"],supportedProperty:function(e,t,n){return"transition"===e&&(n.transition?e:dt+e)}},Tt={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===ht||"ms"===ht&&"edge"!==vt?dt+e:e)}},It={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===ht||"ms"===ht||"apple"===pt?dt+e:e)}},Ct={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===ht?"WebkitColumn"+Ot(e)in t&&dt+"column-"+e:"Moz"===ht&&("page"+Ot(e)in t&&"page-"+e))}}
2,At={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===ht)return e;var n=e.replace("-inline","");return ht+Ot(n)in t&&dt+n}},Rt={supportedProperty:function(e,t){return wt(e)in t&&e}},Nt={supportedProperty:function(e,t){var n=Ot(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:ht+n in t?dt+e:"Webkit"!==ht&&"Webkit"+n in t&&"-webkit-"+e}},Pt={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===ht?""+dt+e:e)}},Dt={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===ht?dt+"scroll-chaining":e)}},Lt={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},Mt={supportedProperty:function(e,t){var n=Lt[e];return!!n&&(ht+Ot(n)in t&&dt+n)}},Ft={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},Ut=Object.keys(Ft),Vt=function(e){return dt+e},Bt=[yt,gt,_t,jt,Et,St,Tt,It,Ct,At,Rt,Nt,Pt,Dt,Mt,{supportedProperty:function(e,t,n){var r=n.multiple;if(Ut.indexOf(e)>-1){var i=Ft[e];if(!Array.isArray(i))return ht+Ot(i)in t&&dt+i;if(!r)return!1;for(var a=0;a<i.length;a++)if(!(ht+Ot(i[0])in t))return!1;return i.map(Vt)}return!1}}],zt=Bt.filter((function(e){return e.supportedProperty})).map((function(e){return e.supportedProperty})),qt=Bt.filter((function(e){return e.noPrefill})).reduce((function(e,t){return e.push.apply(e,Object(rt.a)(t.noPrefill)),e}),[]),Wt={};if(s){xt=document.createElement("p");var Ht=window.getComputedStyle(document.documentElement,"");for(var Kt in Ht)isNaN(Kt)||(Wt[Ht[Kt]]=Ht[Kt]);qt.forEach((function(e){return delete Wt[e]}))}function Gt(e,t){if(void 0===t&&(t={}),!xt)return e;if(null!=Wt[e])return Wt[e];"transition"!==e&&"transform"!==e||(t[e]=e in xt.style);for(var n=0;n<zt.length&&(Wt[e]=zt[n](e,xt.style,t),!Wt[e]);n++);try{xt.style[e]=""}catch(r){return!1}return Wt[e]}var $t,Qt={},Yt={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},Xt=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function Jt(e,t,n){if("var"===t)return"var";if("all"===t)return"all";if("all"===n)return", all";var r=t?Gt(t):", "+Gt(n);return r||(t||n)}function Zt(e,t){var n=t;if(!$t||"content"===e)return t;if("string"!==typeof n||!isNaN(parseInt(n,10)))return n;var r=e+n;if(null!=Qt[r])return Qt[r];try{$t.style[e]=n}catch(i){return Qt[r]=!1,!1}if(Yt[e])n=n.replace(Xt,Jt);else if(""===$t.style[e]&&("-ms-flex"===(n=dt+n)&&($t.style[e]="-ms-flexbox"),$t.style[e]=n,""===$t.style[e]))return Qt[r]=!1,!1;return $t.style[e]="",Qt[r]=n,Qt[r]}s&&($t=document.createElement("p"));var en=function(){function e(t){for(var n in t){var r=t[n];if("fallbacks"===n&&Array.isArray(r))t[n]=r.map(e);else{var i=!1,a=Gt(n);a&&a!==n&&(i=!0);var o=!1,u=Zt(a,y(r));u&&u!==r&&(o=!0),(i||o)&&(i&&delete t[n],t[a||n]=u||r)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at="-"===(n=t.at)[1]||"ms"===ht?n:"@"+dt+"keyframes"+n.substr(10)}var n},onProcessStyle:function(t,n){return"style"!==n.type?t:e(t)},onChangeValue:function(e,t){return Zt(t,y(e))||e}}};var tn=function(){var e=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},i=Object.keys(t).sort(e),a=0;a<i.length;a++)r[i[a]]=t[i[a]];return r}}};function nn(){return{plugins:[Ae(),Fe(),ze(),Qe(),nt(),"undefined"===typeof window?null:en(),tn()]}}var rn=be(nn()),an=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,r=e.productionPrefix,i=void 0===r?"jss":r,a=e.seed,o=void 0===a?"":a,u=""===o?"":"".concat(o,"-"),s=0,c=function(){return s+=1};return function(e,t){var r=t.options.name;if(r&&0===r.indexOf("Mui")&&!t.options.link&&!n){if(-1!==Se.indexOf(e.key))return"Mui-".concat(e.key);var a="".concat(u).concat(r,"-").concat(e.key);return t.options.theme[Ee.a]&&""===o?"".concat(a,"-").concat(c()):a}
2return"".concat(u).concat(i).concat(c())}}(),on={disableGeneration:!1,generateClassName:an,jss:rn,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},un=o.a.createContext(on);var sn=-1e9;function cn(){return sn+=1}n(54);var ln=n(197);function fn(e){var t="function"===typeof e;return{create:function(n,r){var a;try{a=t?e(n):e}catch(s){throw s}if(!r||!n.overrides||!n.overrides[r])return a;var o=n.overrides[r],u=Object(i.a)({},a);return Object.keys(o).forEach((function(e){u[e]=Object(ln.a)(u[e],o[e])})),u},options:{}}}var hn={};function dn(e,t,n){var r=e.state;if(e.stylesOptions.disableGeneration)return t||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});var i=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,i=!0),t!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=t,i=!0),i&&(r.cacheClasses.value=Object(Oe.a)({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:n})),r.cacheClasses.value}function pn(e,t){var n=e.state,r=e.theme,a=e.stylesOptions,o=e.stylesCreator,u=e.name;if(!a.disableGeneration){var s=_e.get(a.sheetsManager,o,r);s||(s={refs:0,staticSheet:null,dynamicStyles:null},_e.set(a.sheetsManager,o,r,s));var c=Object(i.a)({},o.options,a,{theme:r,flip:"boolean"===typeof a.flip?a.flip:"rtl"===r.direction});c.generateId=c.serverGenerateClassName||c.generateClassName;var l=a.sheetsRegistry;if(0===s.refs){var f;a.sheetsCache&&(f=_e.get(a.sheetsCache,o,r));var h=o.create(r,u);f||((f=a.jss.createStyleSheet(h,Object(i.a)({link:!1},c))).attach(),a.sheetsCache&&_e.set(a.sheetsCache,o,r,f)),l&&l.add(f),s.staticSheet=f,s.dynamicStyles=we(h)}if(s.dynamicStyles){var d=a.jss.createStyleSheet(s.dynamicStyles,Object(i.a)({link:!0},c));d.update(t),d.attach(),n.dynamicSheet=d,n.classes=Object(Oe.a)({baseClasses:s.staticSheet.classes,newClasses:d.classes}),l&&l.add(d)}else n.classes=s.staticSheet.classes;s.refs+=1}}function vn(e,t){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(t)}function mn(e){var t=e.state,n=e.theme,r=e.stylesOptions,i=e.stylesCreator;if(!r.disableGeneration){var a=_e.get(r.sheetsManager,i,n);a.refs-=1;var o=r.sheetsRegistry;0===a.refs&&(_e.delete(r.sheetsManager,i,n),r.jss.removeStyleSheet(a.staticSheet),o&&o.remove(a.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),o&&o.remove(t.dynamicSheet))}}function yn(e,t){var n,r=o.a.useRef([]),i=o.a.useMemo((function(){return{}}),t);r.current!==i&&(r.current=i,n=e()),o.a.useEffect((function(){return function(){n&&n()}}),[i])}function gn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,a=t.classNamePrefix,u=t.Component,s=t.defaultTheme,c=void 0===s?hn:s,l=Object(r.a)(t,["name","classNamePrefix","Component","defaultTheme"]),f=fn(e),h=n||a||"makeStyles";f.options={index:cn(),name:n,meta:h,classNamePrefix:h};var d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(je.a)()||c,r=Object(i.a)({},o.a.useContext(un),l),a=o.a.useRef(),s=o.a.useRef();yn((function(){var i={name:n,state:{},stylesCreator:f,stylesOptions:r,theme:t};return pn(i,e),s.current=!1,a.current=i,function(){mn(i)}}),[t,f]),o.a.useEffect((function(){s.current&&vn(a.current,e),s.current=!0}));var h=dn(a.current,e.classes,u);return h};return d}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(7),i=n(54);function a(e){return e&&"object"===Object(i.a)(e)&&e.constructor===Object}function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},i=n.clone?Object(r.a)({},e):e;return a(e)&&a(t)&&Object.keys(t).forEach((function(r){"__proto__"!==r&&(a(t[r])&&r in e?i[r]=o(e[r],t[r],n):i[r]=t[r])})),i}},function(e,t,n){"use strict";var r=n(7),i=n(168),a=n(62);t.a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(i.a)(e,Object(r.a)({defaultTheme:a.a},t))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(7);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;e.Component;if(!n)return t;var i=Object(r.a)({},t);
2return Object.keys(n).forEach((function(e){n[e]&&(i[e]="".concat(t[e]," ").concat(n[e]))})),i}},function(e,t,n){"use strict";var r=n(14),i=n(7),a=n(1),o=(n(16),n(15)),u=n(17),s=a.forwardRef((function(e,t){var n=e.classes,u=e.className,s=e.component,c=void 0===s?"div":s,l=e.square,f=void 0!==l&&l,h=e.elevation,d=void 0===h?1:h,p=e.variant,v=void 0===p?"elevation":p,m=Object(r.a)(e,["classes","className","component","square","elevation","variant"]);return a.createElement(c,Object(i.a)({className:Object(o.a)(n.root,u,"outlined"===v?n.outlined:n["elevation".concat(d)],!f&&n.rounded),ref:t},m))}));t.a=Object(u.a)((function(e){var t={};return e.shadows.forEach((function(e,n){t["elevation".concat(n)]={boxShadow:e}})),Object(i.a)({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius},outlined:{border:"1px solid ".concat(e.palette.divider)}},t)}),{name:"MuiPaper"})(s)},function(e,t,n){"use strict";function r(e){var t=e.theme,n=e.name,r=e.props;if(!t||!t.props||!t.props[n])return r;var i,a=t.props[n];for(i in a)void 0===r[i]&&(r[i]=a[i]);return r}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(7),i=n(14),a=n(1),o=(n(16),n(15)),u=n(20),s=n(17),c=n(30),l=n(37),f=a.forwardRef((function(e,t){var n=e.classes,s=e.className,c=e.color,f=void 0===c?"primary":c,h=e.value,d=e.valueBuffer,p=e.variant,v=void 0===p?"indeterminate":p,m=Object(i.a)(e,["classes","className","color","value","valueBuffer","variant"]),y=Object(l.a)(),g={},b={bar1:{},bar2:{}};if("determinate"===v||"buffer"===v)if(void 0!==h){g["aria-valuenow"]=Math.round(h),g["aria-valuemin"]=0,g["aria-valuemax"]=100;var k=h-100;"rtl"===y.direction&&(k=-k),b.bar1.transform="translateX(".concat(k,"%)")}else 0;if("buffer"===v)if(void 0!==d){var w=(d||0)-100;"rtl"===y.direction&&(w=-w),b.bar2.transform="translateX(".concat(w,"%)")}else 0;return a.createElement("div",Object(r.a)({className:Object(o.a)(n.root,n["color".concat(Object(u.a)(f))],s,{determinate:n.determinate,indeterminate:n.indeterminate,buffer:n.buffer,query:n.query}[v]),role:"progressbar"},g,{ref:t},m),"buffer"===v?a.createElement("div",{className:Object(o.a)(n.dashed,n["dashedColor".concat(Object(u.a)(f))])}):null,a.createElement("div",{className:Object(o.a)(n.bar,n["barColor".concat(Object(u.a)(f))],("indeterminate"===v||"query"===v)&&n.bar1Indeterminate,{determinate:n.bar1Determinate,buffer:n.bar1Buffer}[v]),style:b.bar1}),"determinate"===v?null:a.createElement("div",{className:Object(o.a)(n.bar,("indeterminate"===v||"query"===v)&&n.bar2Indeterminate,"buffer"===v?[n["color".concat(Object(u.a)(f))],n.bar2Buffer]:n["barColor".concat(Object(u.a)(f))]),style:b.bar2}))}));t.a=Object(s.a)((function(e){var t=function(t){return"light"===e.palette.type?Object(c.d)(t,.62):Object(c.b)(t,.5)},n=t(e.palette.primary.main),r=t(e.palette.secondary.main);return{root:{position:"relative",overflow:"hidden",height:4,"@media print":{colorAdjust:"exact"}},colorPrimary:{backgroundColor:n},colorSecondary:{backgroundColor:r},determinate:{},indeterminate:{},buffer:{backgroundColor:"transparent"},query:{transform:"rotate(180deg)"},dashed:{position:"absolute",marginTop:0,height:"100%",width:"100%",animation:"$buffer 3s infinite linear"},dashedColorPrimary:{backgroundImage:"radial-gradient(".concat(n," 0%, ").concat(n," 16%, transparent 42%)"),backgroundSize:"10px 10px",backgroundPosition:"0 -23px"},dashedColorSecondary:{backgroundImage:"radial-gradient(".concat(r," 0%, ").concat(r," 16%, transparent 42%)"),backgroundSize:"10px 10px",backgroundPosition:"0 -23px"},bar:{width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},barColorPrimary:{backgroundColor:e.palette.primary.main},barColorSecondary:{backgroundColor:e.palette.secondary.main},bar1Indeterminate:{width:"auto",animation:"$indeterminate1 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite"},bar1Determinate:{transition:"transform .".concat(4,"s linear")},bar1Buffer:{zIndex:1,transition:"transform .".concat(4,"s linear")},bar2Indeterminate:{width:"auto",animation:"$indeterminate2 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite"},bar2Buffer:{transition:"transform .".concat(4,"s linear")},"@keyframes indeterminate1":{"0%":{left:"-35%",right:"100%"},"60%":{left:"100%",right:"-90%"},"100%":{left:"100%",right:"-90%"}},"@keyframes indeterminate2":{"0%":{left:"-200%",right:"100%"},"60%":{left:"107%",right:"-8%"},"100%":{left:"107%",right:"-8%"}},"@keyframes buffer":{"0%":{opacity:1,backgroundPosition:"0 -23px"},"50%":{opacity:0,backgroundPosition:"0 -23px"},"100%":{opacity:1,backgroundPosition:"-200px -23px"}}}}),{name:"MuiLinearProgress"})(f)},function(e,t,n){"use strict";var r=n(14),i=n(7),a=n(1),o=(n(16),n(15)),u=n(17),s=n(30),c=n(115),l=n(20),f=a.forwardRef((function(e,t){var n=e.children,u=e.classes,s=e.className,f=e.color,h=void 0===f?"default":f,d=e.component,p=void 0===d?"button":d,v=e.disabled,m=void 0!==v&&v,y=e.disableElevation,g=void 0!==y&&y,b=e.disableFocusRipple,k=void 0!==b&&b,w=e.endIcon,O=e.focusVisibleClassName,x=e.fullWidth,_=void 0!==x&&x,j=e.size,E=void 0===j?"medium":j,S=e.startIcon,T=e.type,I=void 0===T?"button":T,C=e.variant,A=void 0===C?"text":C,R=Object(r.a)(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),N=S&&a.createElement("span",{className:Object(o.a)(u.startIcon,u["iconSize".concat(Object(l.a)(E))])},S),P=w&&a.createElement("span",{className:Object(o.a)(u.endIcon,u["iconSize".concat(Object(l.a)(E))])},w);return a.createElement(c.a,Object(i.a)({className:Object(o.a)(u.root,u[A],s,"inherit"===h?u.colorInherit:"default"!==h&&u["".concat(A).
2concat(Object(l.a)(h))],"medium"!==E&&[u["".concat(A,"Size").concat(Object(l.a)(E))],u["size".concat(Object(l.a)(E))]],g&&u.disableElevation,m&&u.disabled,_&&u.fullWidth),component:p,disabled:m,focusRipple:!k,focusVisibleClassName:Object(o.a)(u.focusVisible,O),ref:t,type:I},R),a.createElement("span",{className:u.label},N,n,P))}));t.a=Object(u.a)((function(e){return{root:Object(i.a)({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:Object(s.a)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:Object(s.a)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:Object(s.a)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(Object(s.a)(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:Object(s.a)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(Object(s.a)(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:Object(s.a)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(f)},function(e,t,n){"use strict";var r=n(7),i=n(14),a=n(1),o=(n(16),n(15)),u=n(17),s=n(20),c={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h
25:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},l=a.forwardRef((function(e,t){var n=e.align,u=void 0===n?"inherit":n,l=e.classes,f=e.className,h=e.color,d=void 0===h?"initial":h,p=e.component,v=e.display,m=void 0===v?"initial":v,y=e.gutterBottom,g=void 0!==y&&y,b=e.noWrap,k=void 0!==b&&b,w=e.paragraph,O=void 0!==w&&w,x=e.variant,_=void 0===x?"body1":x,j=e.variantMapping,E=void 0===j?c:j,S=Object(i.a)(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),T=p||(O?"p":E[_]||c[_])||"span";return a.createElement(T,Object(r.a)({className:Object(o.a)(l.root,f,"inherit"!==_&&l[_],"initial"!==d&&l["color".concat(Object(s.a)(d))],k&&l.noWrap,g&&l.gutterBottom,O&&l.paragraph,"inherit"!==u&&l["align".concat(Object(s.a)(u))],"initial"!==m&&l["display".concat(Object(s.a)(m))]),ref:t},S))}));t.a=Object(u.a)((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(l)},function(e,t,n){"use strict";var r=n(7),i=n(14),a=n(1),o=(n(16),n(15)),u=n(17),s=n(30),c=n(115),l=n(20),f=a.forwardRef((function(e,t){var n=e.edge,u=void 0!==n&&n,s=e.children,f=e.classes,h=e.className,d=e.color,p=void 0===d?"default":d,v=e.disabled,m=void 0!==v&&v,y=e.disableFocusRipple,g=void 0!==y&&y,b=e.size,k=void 0===b?"medium":b,w=Object(i.a)(e,["edge","children","classes","className","color","disabled","disableFocusRipple","size"]);return a.createElement(c.a,Object(r.a)({className:Object(o.a)(f.root,h,"default"!==p&&f["color".concat(Object(l.a)(p))],m&&f.disabled,"small"===k&&f["size".concat(Object(l.a)(k))],{start:f.edgeStart,end:f.edgeEnd}[u]),centerRipple:!0,focusRipple:!g,disabled:m,ref:t},w),a.createElement("span",{className:f.label},s))}));t.a=Object(u.a)((function(e){return{root:{textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:12,borderRadius:"50%",overflow:"visible",color:e.palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{backgroundColor:Object(s.a)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{backgroundColor:"transparent",color:e.palette.action.disabled}},edgeStart:{marginLeft:-12,"$sizeSmall&":{marginLeft:-3}},edgeEnd:{marginRight:-12,"$sizeSmall&":{marginRight:-3}},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:Object(s.a)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},colorSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:Object(s.a)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},disabled:{},sizeSmall:{padding:3,fontSize:e.typography.pxToRem(18)},label:{width:"100%",display:"flex",alignItems:"inherit",justifyContent:"inherit"}}}),{name:"MuiIconButton"})(f)},function(e,t,n){"use strict";var r=n(7),i=n(1),a=n.n(i),o=(n(89),n(85)),u=n(114),s=n(86);t.a=function(e){var t=e.children,n=e.theme,i=Object(u.a)(),c=a.a.useMemo((function(){var e=null===i?n:function(e,t){return"function"===typeof t?t(e):Object(r.a)({},e,t)}(i,n);return null!=e&&(e[s.a]=null!==i),e}),[n,i]);return a.a.createElement(o.a.Provider,{value:c},t)}},function(e,t,n){"use strict";var r=n(7),i=n(14),a=n(1),o=n.n(a),u=(n(16),n(15)),s=n(113);function c(e){var t=e.props,n=e.states,r=e.muiFormControl;return n.reduce((function(e,n){return e[n]=t[n],r&&"undefined"===typeof t[n]&&(e[n]=r[n]),e}),{})}var l=a.createContext();var f=l,h=n(17),d=n(20),p=n(24),v=n(57);function m(e,t){return parseInt(e[t],10)||0}var y="undefined"!==typeof window?a.useLayoutEffect:a.useEffect,g={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}
2,b=a.forwardRef((function(e,t){var n=e.onChange,o=e.rows,u=e.rowsMax,s=e.rowsMin,c=e.maxRows,l=e.minRows,f=void 0===l?1:l,h=e.style,d=e.value,b=Object(i.a)(e,["onChange","rows","rowsMax","rowsMin","maxRows","minRows","style","value"]),k=c||u,w=o||s||f,O=a.useRef(null!=d).current,x=a.useRef(null),_=Object(p.a)(t,x),j=a.useRef(null),E=a.useRef(0),S=a.useState({}),T=S[0],I=S[1],C=a.useCallback((function(){var t=x.current,n=window.getComputedStyle(t),r=j.current;r.style.width=n.width,r.value=t.value||e.placeholder||"x","\n"===r.value.slice(-1)&&(r.value+=" ");var i=n["box-sizing"],a=m(n,"padding-bottom")+m(n,"padding-top"),o=m(n,"border-bottom-width")+m(n,"border-top-width"),u=r.scrollHeight-a;r.value="x";var s=r.scrollHeight-a,c=u;w&&(c=Math.max(Number(w)*s,c)),k&&(c=Math.min(Number(k)*s,c));var l=(c=Math.max(c,s))+("border-box"===i?a+o:0),f=Math.abs(c-u)<=1;I((function(e){return E.current<20&&(l>0&&Math.abs((e.outerHeightStyle||0)-l)>1||e.overflow!==f)?(E.current+=1,{overflow:f,outerHeightStyle:l}):e}))}),[k,w,e.placeholder]);a.useEffect((function(){var e=Object(v.a)((function(){E.current=0,C()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[C]),y((function(){C()})),a.useEffect((function(){E.current=0}),[d]);return a.createElement(a.Fragment,null,a.createElement("textarea",Object(r.a)({value:d,onChange:function(e){E.current=0,O||C(),n&&n(e)},ref:_,rows:w,style:Object(r.a)({height:T.outerHeightStyle,overflow:T.overflow?"hidden":null},h)},b)),a.createElement("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:j,tabIndex:-1,style:Object(r.a)({},g,h)}))}));function k(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function w(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(k(e.value)&&""!==e.value||t&&k(e.defaultValue)&&""!==e.defaultValue)}var O="undefined"===typeof window?a.useEffect:a.useLayoutEffect,x=a.forwardRef((function(e,t){var n=e["aria-describedby"],o=e.autoComplete,h=e.autoFocus,v=e.classes,m=e.className,y=(e.color,e.defaultValue),g=e.disabled,k=e.endAdornment,x=(e.error,e.fullWidth),_=void 0!==x&&x,j=e.id,E=e.inputComponent,S=void 0===E?"input":E,T=e.inputProps,I=void 0===T?{}:T,C=e.inputRef,A=(e.margin,e.multiline),R=void 0!==A&&A,N=e.name,P=e.onBlur,D=e.onChange,L=e.onClick,M=e.onFocus,F=e.onKeyDown,U=e.onKeyUp,V=e.placeholder,B=e.readOnly,z=e.renderSuffix,q=e.rows,W=e.rowsMax,H=e.rowsMin,K=e.maxRows,G=e.minRows,$=e.startAdornment,Q=e.type,Y=void 0===Q?"text":Q,X=e.value,J=Object(i.a)(e,["aria-describedby","autoComplete","autoFocus","classes","className","color","defaultValue","disabled","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","rowsMax","rowsMin","maxRows","minRows","startAdornment","type","value"]),Z=null!=I.value?I.value:X,ee=a.useRef(null!=Z).current,te=a.useRef(),ne=a.useCallback((function(e){0}),[]),re=Object(p.a)(I.ref,ne),ie=Object(p.a)(C,re),ae=Object(p.a)(te,ie),oe=a.useState(!1),ue=oe[0],se=oe[1],ce=a.useContext(l);var le=c({props:e,muiFormControl:ce,states:["color","disabled","error","hiddenLabel","margin","required","filled"]});le.focused=ce?ce.focused:ue,a.useEffect((function(){!ce&&g&&ue&&(se(!1),P&&P())}),[ce,g,ue,P]);var fe=ce&&ce.onFilled,he=ce&&ce.onEmpty,de=a.useCallback((function(e){w(e)?fe&&fe():he&&he()}),[fe,he]);O((function(){ee&&de({value:Z})}),[Z,de,ee]);a.useEffect((function(){de(te.current)}),[]);var pe=S,ve=Object(r.a)({},I,{ref:ae});"string"!==typeof pe?ve=Object(r.a)({inputRef:ae,type:Y},ve,{ref:null}):R?!q||K||G||W||H?(ve=Object(r.a)({minRows:q||G,rowsMax:W,maxRows:K},ve),pe=b):pe="textarea":ve=Object(r.a)({type:Y},ve);return a.useEffect((function(){ce&&ce.setAdornedStart(Boolean($))}),[ce,$]),a.createElement("div",Object(r.a)({className:Object(u.a)(v.root,v["color".concat(Object(d.a)(le.color||"primary"))],m,le.disabled&&v.disabled,le.error&&v.error,_&&v.fullWidth,le.focused&&v.focused,ce&&v.formControl,R&&v.multiline,$&&v.adornedStart,k&&v.adornedEnd,"dense"===le.margin&&v.marginDense),onClick:function(e){te.current&&e.currentTarget===e.target&&te.current.focus(),L&&L(e)},ref:t}
2,J),$,a.createElement(f.Provider,{value:null},a.createElement(pe,Object(r.a)({"aria-invalid":le.error,"aria-describedby":n,autoComplete:o,autoFocus:h,defaultValue:y,disabled:le.disabled,id:j,onAnimationStart:function(e){de("mui-auto-fill-cancel"===e.animationName?te.current:{value:"x"})},name:N,placeholder:V,readOnly:B,required:le.required,rows:q,value:Z,onKeyDown:F,onKeyUp:U},ve,{className:Object(u.a)(v.input,I.className,le.disabled&&v.disabled,R&&v.inputMultiline,le.hiddenLabel&&v.inputHiddenLabel,$&&v.inputAdornedStart,k&&v.inputAdornedEnd,"search"===Y&&v.inputTypeSearch,"dense"===le.margin&&v.inputMarginDense),onBlur:function(e){P&&P(e),I.onBlur&&I.onBlur(e),ce&&ce.onBlur?ce.onBlur(e):se(!1)},onChange:function(e){if(!ee){var t=e.target||te.current;if(null==t)throw new Error(Object(s.a)(1));de({value:t.value})}for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];I.onChange&&I.onChange.apply(I,[e].concat(r)),D&&D.apply(void 0,[e].concat(r))},onFocus:function(e){le.disabled?e.stopPropagation():(M&&M(e),I.onFocus&&I.onFocus(e),ce&&ce.onFocus?ce.onFocus(e):se(!0))}}))),k,z?z(Object(r.a)({},le,{startAdornment:$})):null)})),_=Object(h.a)((function(e){var t="light"===e.palette.type,n={color:"currentColor",opacity:t?.42:.5,transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},i={opacity:"0 !important"},a={opacity:t?.42:.5};return{"@global":{"@keyframes mui-auto-fill":{},"@keyframes mui-auto-fill-cancel":{}},root:Object(r.a)({},e.typography.body1,{color:e.palette.text.primary,lineHeight:"1.1876em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center","&$disabled":{color:e.palette.text.disabled,cursor:"default"}}),formControl:{},focused:{},disabled:{},adornedStart:{},adornedEnd:{},error:{},marginDense:{},multiline:{padding:"".concat(6,"px 0 ").concat(7,"px"),"&$marginDense":{paddingTop:3}},colorSecondary:{},fullWidth:{width:"100%"},input:{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"".concat(6,"px 0 ").concat(7,"px"),border:0,boxSizing:"content-box",background:"none",height:"1.1876em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&:-ms-input-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{"-webkit-appearance":"none"},"label[data-shrink=false] + $formControl &":{"&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus::-webkit-input-placeholder":a,"&:focus::-moz-placeholder":a,"&:focus:-ms-input-placeholder":a,"&:focus::-ms-input-placeholder":a},"&$disabled":{opacity:1},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},inputMarginDense:{paddingTop:3},inputMultiline:{height:"auto",resize:"none",padding:0},inputTypeSearch:{"-moz-appearance":"textfield","-webkit-appearance":"textfield"},inputAdornedStart:{},inputAdornedEnd:{},inputHiddenLabel:{}}}),{name:"MuiInputBase"})(x),j=a.forwardRef((function(e,t){var n=e.disableUnderline,o=e.classes,s=e.fullWidth,c=void 0!==s&&s,l=e.inputComponent,f=void 0===l?"input":l,h=e.multiline,d=void 0!==h&&h,p=e.type,v=void 0===p?"text":p,m=Object(i.a)(e,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return a.createElement(_,Object(r.a)({classes:Object(r.a)({},o,{root:Object(u.a)(o.root,!n&&o.underline),underline:null}),fullWidth:c,inputComponent:f,multiline:d,ref:t,type:v},m))}));j.muiName="Input";var E=Object(h.a)((function(e){var t="light"===e.palette.type?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return{root:{position:"relative"},formControl:{"label + &":{marginTop:16}},focused:{},disabled:{},colorSecondary:{"&$underline:after":{borderBottomColor:e.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(t),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"}
2,"&:hover:not($disabled):before":{borderBottom:"2px solid ".concat(e.palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(t)}},"&$disabled:before":{borderBottomStyle:"dotted"}},error:{},marginDense:{},multiline:{},fullWidth:{},input:{},inputMarginDense:{},inputMultiline:{},inputTypeSearch:{}}}),{name:"MuiInput"})(j),S=a.forwardRef((function(e,t){var n=e.disableUnderline,o=e.classes,s=e.fullWidth,c=void 0!==s&&s,l=e.inputComponent,f=void 0===l?"input":l,h=e.multiline,d=void 0!==h&&h,p=e.type,v=void 0===p?"text":p,m=Object(i.a)(e,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return a.createElement(_,Object(r.a)({classes:Object(r.a)({},o,{root:Object(u.a)(o.root,!n&&o.underline),underline:null}),fullWidth:c,inputComponent:f,multiline:d,ref:t,type:v},m))}));S.muiName="Input";var T=Object(h.a)((function(e){var t="light"===e.palette.type,n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)";return{root:{position:"relative",backgroundColor:r,borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:t?"rgba(0, 0, 0, 0.13)":"rgba(255, 255, 255, 0.13)","@media (hover: none)":{backgroundColor:r}},"&$focused":{backgroundColor:t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)"},"&$disabled":{backgroundColor:t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)"}},colorSecondary:{"&$underline:after":{borderBottomColor:e.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(n),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:before":{borderBottom:"1px solid ".concat(e.palette.text.primary)},"&$disabled:before":{borderBottomStyle:"dotted"}},focused:{},disabled:{},adornedStart:{paddingLeft:12},adornedEnd:{paddingRight:12},error:{},marginDense:{},multiline:{padding:"27px 12px 10px","&$marginDense":{paddingTop:23,paddingBottom:6}},input:{padding:"27px 12px 10px","&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.type?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.type?null:"#fff",caretColor:"light"===e.palette.type?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},inputMarginDense:{paddingTop:23,paddingBottom:6},inputHiddenLabel:{paddingTop:18,paddingBottom:19,"&$inputMarginDense":{paddingTop:10,paddingBottom:11}},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}}),{name:"MuiFilledInput"})(S),I=n(43),C=n(37),A=a.forwardRef((function(e,t){e.children;var n=e.classes,o=e.className,s=e.label,c=e.labelWidth,l=e.notched,f=e.style,h=Object(i.a)(e,["children","classes","className","label","labelWidth","notched","style"]),p="rtl"===Object(C.a)().direction?"right":"left";if(void 0!==s)return a.createElement("fieldset",Object(r.a)({"aria-hidden":!0,className:Object(u.a)(n.root,o),ref:t,style:f},h),a.createElement("legend",{className:Object(u.a)(n.legendLabelled,l&&n.legendNotched)},s?a.createElement("span",null,s):a.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}})));var v=c>0?.75*c+8:.01;return a.createElement("fieldset",Object(r.a)({"aria-hidden":!0,style:Object(r.a)(Object(I.a)({},"padding".concat(Object(d.a)(p)),8),f),className:Object(u.a)(n.root,o),ref:t},h),a.createElement("legend",{className:n.legend,style:{width:l?v:.01}},a.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}})))})),R=Object(h.a)((function(e){return{root:{position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden"},legend:{textAlign:"left",padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})},legendLabelled:{display:"block",width:"auto",textAlign:"left",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),"& > span":{paddingLeft:5,paddingRight:5,display:"inline-block"}},legendNotched:{maxWidth:1e3,transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}}),{name:"PrivateNotchedOutline"})(A),N=a.forwardRef((function(e,t){var n=e.classes,o=e.fullWidth,s=void 0!==o&&o,c=e.inputComponent,l=void 0===c?"input":c,f=e.label,h=e.labelWidth,d=void 0===h?0:h,p=e.multiline,v=void 0!==p&&p,m=e.notched,y=e.type,g=void 0===y?"text":y,b=Object(i.a)(e,["classes","fullWidth","inputComponent","label","labelWidth","multiline","notched","type"]);return a.createElement(_,Object(r.a)({renderSuffix:function(e){return a.createElement(R,{className:n.notchedOutline,label:f,labelWidth:d,notched:"undefined"!==typeof m?m:
2Boolean(e.startAdornment||e.filled||e.focused)})},classes:Object(r.a)({},n,{root:Object(u.a)(n.root,n.underline),notchedOutline:null}),fullWidth:s,inputComponent:l,multiline:v,ref:t,type:g},b))}));N.muiName="Input";var P=Object(h.a)((function(e){var t="light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{root:{position:"relative",borderRadius:e.shape.borderRadius,"&:hover $notchedOutline":{borderColor:e.palette.text.primary},"@media (hover: none)":{"&:hover $notchedOutline":{borderColor:t}},"&$focused $notchedOutline":{borderColor:e.palette.primary.main,borderWidth:2},"&$error $notchedOutline":{borderColor:e.palette.error.main},"&$disabled $notchedOutline":{borderColor:e.palette.action.disabled}},colorSecondary:{"&$focused $notchedOutline":{borderColor:e.palette.secondary.main}},focused:{},disabled:{},adornedStart:{paddingLeft:14},adornedEnd:{paddingRight:14},error:{},marginDense:{},multiline:{padding:"18.5px 14px","&$marginDense":{paddingTop:10.5,paddingBottom:10.5}},notchedOutline:{borderColor:t},input:{padding:"18.5px 14px","&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.type?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.type?null:"#fff",caretColor:"light"===e.palette.type?null:"#fff",borderRadius:"inherit"}},inputMarginDense:{paddingTop:10.5,paddingBottom:10.5},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}}),{name:"MuiOutlinedInput"})(N);function D(){return a.useContext(f)}var L=a.forwardRef((function(e,t){var n=e.children,o=e.classes,s=e.className,l=(e.color,e.component),f=void 0===l?"label":l,h=(e.disabled,e.error,e.filled,e.focused,e.required,Object(i.a)(e,["children","classes","className","color","component","disabled","error","filled","focused","required"])),p=c({props:e,muiFormControl:D(),states:["color","required","focused","disabled","error","filled"]});return a.createElement(f,Object(r.a)({className:Object(u.a)(o.root,o["color".concat(Object(d.a)(p.color||"primary"))],s,p.disabled&&o.disabled,p.error&&o.error,p.filled&&o.filled,p.focused&&o.focused,p.required&&o.required),ref:t},h),n,p.required&&a.createElement("span",{"aria-hidden":!0,className:Object(u.a)(o.asterisk,p.error&&o.error)},"\u2009","*"))})),M=Object(h.a)((function(e){return{root:Object(r.a)({color:e.palette.text.secondary},e.typography.body1,{lineHeight:1,padding:0,"&$focused":{color:e.palette.primary.main},"&$disabled":{color:e.palette.text.disabled},"&$error":{color:e.palette.error.main}}),colorSecondary:{"&$focused":{color:e.palette.secondary.main}},focused:{},disabled:{},error:{},filled:{},required:{},asterisk:{"&$error":{color:e.palette.error.main}}}}),{name:"MuiFormLabel"})(L),F=a.forwardRef((function(e,t){var n=e.classes,o=e.className,s=e.disableAnimation,l=void 0!==s&&s,f=(e.margin,e.shrink),h=(e.variant,Object(i.a)(e,["classes","className","disableAnimation","margin","shrink","variant"])),d=D(),p=f;"undefined"===typeof p&&d&&(p=d.filled||d.focused||d.adornedStart);var v=c({props:e,muiFormControl:d,states:["margin","variant"]});return a.createElement(M,Object(r.a)({"data-shrink":p,className:Object(u.a)(n.root,o,d&&n.formControl,!l&&n.animated,p&&n.shrink,"dense"===v.margin&&n.marginDense,{filled:n.filled,outlined:n.outlined}[v.variant]),classes:{focused:n.focused,disabled:n.disabled,error:n.error,required:n.required,asterisk:n.asterisk},ref:t},h))})),U=Object(h.a)((function(e){return{root:{display:"block",transformOrigin:"top left"},focused:{},disabled:{},error:{},required:{},asterisk:{},formControl:{position:"absolute",left:0,top:0,transform:"translate(0, 24px) scale(1)"},marginDense:{transform:"translate(0, 21px) scale(1)"},shrink:{transform:"translate(0, 1.5px) scale(0.75)",transformOrigin:"top left"},animated:{transition:e.transitions.create(["color","transform"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},filled:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 20px) scale(1)","&$marginDense":{transform:"translate(12px, 17px) scale(1)"},"&$shrink":{transform:"translate(12px, 10px) scale(0.75)","&$marginDense":{transform:"translate(12px, 7
2px) scale(0.75)"}}},outlined:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 20px) scale(1)","&$marginDense":{transform:"translate(14px, 12px) scale(1)"},"&$shrink":{transform:"translate(14px, -6px) scale(0.75)"}}}}),{name:"MuiInputLabel"})(F),V=n(63),B=a.forwardRef((function(e,t){var n=e.children,o=e.classes,s=e.className,c=e.color,l=void 0===c?"primary":c,h=e.component,p=void 0===h?"div":h,v=e.disabled,m=void 0!==v&&v,y=e.error,g=void 0!==y&&y,b=e.fullWidth,k=void 0!==b&&b,O=e.focused,x=e.hiddenLabel,_=void 0!==x&&x,j=e.margin,E=void 0===j?"none":j,S=e.required,T=void 0!==S&&S,I=e.size,C=e.variant,A=void 0===C?"standard":C,R=Object(i.a)(e,["children","classes","className","color","component","disabled","error","fullWidth","focused","hiddenLabel","margin","required","size","variant"]),N=a.useState((function(){var e=!1;return n&&a.Children.forEach(n,(function(t){if(Object(V.a)(t,["Input","Select"])){var n=Object(V.a)(t,["Select"])?t.props.input:t;n&&n.props.startAdornment&&(e=!0)}})),e})),P=N[0],D=N[1],L=a.useState((function(){var e=!1;return n&&a.Children.forEach(n,(function(t){Object(V.a)(t,["Input","Select"])&&w(t.props,!0)&&(e=!0)})),e})),M=L[0],F=L[1],U=a.useState(!1),B=U[0],z=U[1],q=void 0!==O?O:B;m&&q&&z(!1);var W=a.useCallback((function(){F(!0)}),[]),H={adornedStart:P,setAdornedStart:D,color:l,disabled:m,error:g,filled:M,focused:q,fullWidth:k,hiddenLabel:_,margin:("small"===I?"dense":void 0)||E,onBlur:function(){z(!1)},onEmpty:a.useCallback((function(){F(!1)}),[]),onFilled:W,onFocus:function(){z(!0)},registerEffect:undefined,required:T,variant:A};return a.createElement(f.Provider,{value:H},a.createElement(p,Object(r.a)({className:Object(u.a)(o.root,s,"none"!==E&&o["margin".concat(Object(d.a)(E))],k&&o.fullWidth),ref:t},R),n))})),z=Object(h.a)({root:{display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},marginNormal:{marginTop:16,marginBottom:8},marginDense:{marginTop:8,marginBottom:4},fullWidth:{width:"100%"}},{name:"MuiFormControl"})(B),q=a.forwardRef((function(e,t){var n=e.children,o=e.classes,s=e.className,l=e.component,f=void 0===l?"p":l,h=(e.disabled,e.error,e.filled,e.focused,e.margin,e.required,e.variant,Object(i.a)(e,["children","classes","className","component","disabled","error","filled","focused","margin","required","variant"])),d=c({props:e,muiFormControl:D(),states:["variant","margin","disabled","error","filled","focused","required"]});return a.createElement(f,Object(r.a)({className:Object(u.a)(o.root,("filled"===d.variant||"outlined"===d.variant)&&o.contained,s,d.disabled&&o.disabled,d.error&&o.error,d.filled&&o.filled,d.focused&&o.focused,d.required&&o.required,"dense"===d.margin&&o.marginDense),ref:t},h)," "===n?a.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}}):n)})),W=Object(h.a)((function(e){return{root:Object(r.a)({color:e.palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,margin:0,"&$disabled":{color:e.palette.text.disabled},"&$error":{color:e.palette.error.main}}),error:{},disabled:{},marginDense:{marginTop:4},contained:{marginLeft:14,marginRight:14},focused:{},filled:{},required:{}}}),{name:"MuiFormHelperText"})(q),H=n(199),K=n(65),G=n(54),$=(n(93),n(32)),Q=n(25),Y=n.n(Q),X=n(58),J=n(55),Z=n(114),ee=n(201),te=n(46);var ne="undefined"!==typeof window?a.useLayoutEffect:a.useEffect;var re=a.forwardRef((function(e,t){var n=e.children,r=e.container,i=e.disablePortal,o=void 0!==i&&i,u=e.onRendered,s=a.useState(null),c=s[0],l=s[1],f=Object(p.a)(a.isValidElement(n)?n.ref:null,t);return ne((function(){o||l(function(e){return e="function"===typeof e?e():e,Q.findDOMNode(e)}(r)||document.body)}),[r,o]),ne((function(){if(c&&!o)return Object(te.a)(t,c),function(){Object(te.a)(t,null)}}),[t,c,o]),ne((function(){u&&(c||o)&&u()}),[u,c,o]),o?a.isValidElement(n)?a.cloneElement(n,{ref:f}):n:c?Q.createPortal(n,c):c})),ie=n(42),ae=n(84);var oe=n(66),ue=n(52);function se(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}function ce(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function le(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function fe(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4?arguments[4]:void 0,a=[t,n].concat(Object(ue.a)(r)),o=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===a.indexOf(e)&&-1===o.indexOf(e.tagName)&&ce(e,i)}))}function he(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}function de(e,t){var n,r=[],i=[],a=e.container;if(!t.disableScrollLock){if(function(e){var t=Object($.a)(e);return t.body===e?Object(X.a)(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(a)){var o=se();r.push({value:a.style.paddingRight,key:"padding-right",el:a}),a.style["padding-right"]="".concat(le(a)+o,"px"),n=Object($.a)(a).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){i.push(e.style.paddingRight),e.style.paddingRight="".concat(le(e)+o,"px")}))}var u=a.parentElement,s="HTML"===u.nodeName&&"scroll"===window.getComputedStyle(u)["overflow-y"]?u:a;r.push({value:s.style.overflow,key:"overflow",el:s}),s.style.overflow="hidden"}
2return function(){n&&[].forEach.call(n,(function(e,t){i[t]?e.style.paddingRight=i[t]:e.style.removeProperty("padding-right")})),r.forEach((function(e){var t=e.value,n=e.el,r=e.key;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}var pe=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modals=[],this.containers=[]}return Object(oe.a)(e,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&ce(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);fe(t,e.mountNode,e.modalRef,r,!0);var i=he(this.containers,(function(e){return e.container===t}));return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=he(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=de(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=he(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&ce(e.modalRef,!0),fe(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var i=r.modals[r.modals.length-1];i.modalRef&&ce(i.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}();var ve=function(e){var t=e.children,n=e.disableAutoFocus,r=void 0!==n&&n,i=e.disableEnforceFocus,o=void 0!==i&&i,u=e.disableRestoreFocus,s=void 0!==u&&u,c=e.getDoc,l=e.isEnabled,f=e.open,h=a.useRef(),d=a.useRef(null),v=a.useRef(null),m=a.useRef(),y=a.useRef(null),g=a.useCallback((function(e){y.current=Q.findDOMNode(e)}),[]),b=Object(p.a)(t.ref,g),k=a.useRef();return a.useEffect((function(){k.current=f}),[f]),!k.current&&f&&"undefined"!==typeof window&&(m.current=c().activeElement),a.useEffect((function(){if(f){var e=Object($.a)(y.current);r||!y.current||y.current.contains(e.activeElement)||(y.current.hasAttribute("tabIndex")||y.current.setAttribute("tabIndex",-1),y.current.focus());var t=function(){null!==y.current&&(e.hasFocus()&&!o&&l()&&!h.current?y.current&&!y.current.contains(e.activeElement)&&y.current.focus():h.current=!1)},n=function(t){!o&&l()&&9===t.keyCode&&e.activeElement===y.current&&(h.current=!0,t.shiftKey?v.current.focus():d.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",n,!0);var i=setInterval((function(){t()}),50);return function(){clearInterval(i),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",n,!0),s||(m.current&&m.current.focus&&m.current.focus(),m.current=null)}}}),[r,o,s,l,f]),a.createElement(a.Fragment,null,a.createElement("div",{tabIndex:0,ref:d,"data-test":"sentinelStart"}),a.cloneElement(t,{ref:b}),a.createElement("div",{tabIndex:0,ref:v,"data-test":"sentinelEnd"}))},me={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},ye=a.forwardRef((function(e,t){var n=e.invisible,o=void 0!==n&&n,u=e.open,s=Object(i.a)(e,["invisible","open"]);return u?a.createElement("div",Object(r.a)({"aria-hidden":!0,ref:t},s,{style:Object(r.a)({},me.root,o?me.invisible:{},s.style)})):null}));var ge=new pe,be=a.forwardRef((function(e,t){var n=Object(Z.a)(),o=Object(ee.a)({name:"MuiModal",props:Object(r.a)({},e),theme:n}),u=o.BackdropComponent,s=void 0===u?ye:u,c=o.BackdropProps,l=o.children,f=o.closeAfterTransition,h=void 0!==f&&f,d=o.container,v=o.disableAutoFocus,m=void 0!==v&&v,y=o.disableBackdropClick,g=void 0!==y&&y,b=o.disableEnforceFocus,k=void 0!==b&&b,w=o.disableEscapeKeyDown,O=void 0!==w&&w,x=o.disablePortal,_=void 0!==x&&x,j=o.disableRestoreFocus,E=void 0!==j&&j,S=o.disableScrollLock,T=void 0!==S&&S,I=o.hideBackdrop,C=void 0!==I&&I,A=o.keepMounted,R=void 0!==A&&A,N=o.manager,P=void 0===N?ge:N,D=o.onBackdropClick,L=o.onClose,M=o.onEscapeKeyDown,F=o.onRendered,U=o.open,V=Object(i.a)(o,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),B=a.useState(!0),z=B[0],q=B[1],W=a.useRef({}),H=a.useRef(null),K=a.useRef(null),G=Object(p.a)(K,t),Y=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(o),X=function(){return Object($.a)(H.current)},te=function(){return W.current.modalRef=K.current,W.current.mountNode=H.current,W.current},ne=function(){P.mount(te(),{disableScrollLock:T}),K.current.scrollTop=0},oe=Object(ie.a)((function(){var e=function(e){return e="function"===typeof e?e():e,Q.findDOMNode(e)}(d)||X().body;P.add(te(),e),K.current&&ne()})),ue=a.useCallback((function(){return P.isTopModal(te())}),[P]),se=Object(ie.a)((function(e){H.current=e,e&&(F&&F(),U&&ue()?ne():ce(K.current,!0))})),le=a.useCallback((function(){P.remove(te())}),[P]);if(a.useEffect((function(){return function(){le()}}),[le]),a.useEffect((function(){U?oe():Y&&h||le()}),[U,le,Y,h,oe]),!R&&!U&&(!Y||z))return null;var fe=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:ae.a}),he={};return void 0===l.props.tabIndex&&(he.tabIndex=l.props.tabIndex||"-1"),Y&&(he.onEnter=Object(J.a)((function(){q(!1)}),l.props.onEnter),he.onExited=Object(J.a)((function(){q(!0),h&&le()}),l.props.onExited)),a.createElement(re,{ref:se,container:d,disablePortal:_},a.createElement("div",Object(r.a)({ref:G,onKeyDown:function(e){"Escape"===e.key&&ue()&&(M&&M(e),O||(e.stopPropagation(),L&&L(e,"escapeKeyDown")))},role:"presentation"},V,{style:Object(r.a)({},fe.root,!U&&z?fe.hidden:{},V.style)}),C?null:a.createElement(s,Object(r.a)({open:U,onClick:function(e){e.target===e.currentTarget&&(D&&D(e),!g&&L&&L(e,"backdropClick"))}},c)),a.createElement(ve,{disableEnforceFocus:k,disableAutoFocus:m,disableRestoreFocus:E,getDoc:X,isEnabled:ue,open:U},a.cloneElement(l,he))))})),ke=n(36),we=n(28),Oe=(n(101),!1),xe=n(67),_e="unmounted",je="exited",Ee="entering",Se="entered",Te="exiting",Ie=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,a=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?a?(i=je,r.appearStatus=Ee):i=Se:i=t.unmountOnExit||t.mountOnEnter?_e:je,r.state={status:i},r.nextCallback=null,r}Object(we.a)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===_e?{status:je}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==Ee&&n!==Se&&(t=Ee):n!==Ee&&n!==Se||(t=Te)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!==typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,a
2ppear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===Ee?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===je&&this.setState({status:_e})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[Y.a.findDOMNode(this),r],a=i[0],o=i[1],u=this.getTimeouts(),s=r?u.appear:u.enter;!e&&!n||Oe?this.safeSetState({status:Se},(function(){t.props.onEntered(a)})):(this.props.onEnter(a,o),this.safeSetState({status:Ee},(function(){t.props.onEntering(a,o),t.onTransitionEnd(s,(function(){t.safeSetState({status:Se},(function(){t.props.onEntered(a,o)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:Y.a.findDOMNode(this);t&&!Oe?(this.props.onExit(r),this.safeSetState({status:Te},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:je},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:je},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:Y.a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===_e)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,Object(ke.a)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return o.a.createElement(xe.a.Provider,{value:null},"function"===typeof n?n(e,r):o.a.cloneElement(o.a.Children.only(n),r))},t}(o.a.Component);function Ce(){}Ie.contextType=xe.a,Ie.propTypes={},Ie.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ce,onEntering:Ce,onEntered:Ce,onExit:Ce,onExiting:Ce,onExited:Ce},Ie.UNMOUNTED=_e,Ie.EXITED=je,Ie.ENTERING=Ee,Ie.ENTERED=Se,Ie.EXITING=Te;var Ae=Ie;function Re(e,t){var n=e.timeout,r=e.style,i=void 0===r?{}:r;return{duration:i.transitionDuration||"number"===typeof n?n:n[t.mode]||0,delay:i.transitionDelay}}function Ne(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var Pe={entering:{opacity:1,transform:Ne(1)},entered:{opacity:1,transform:"none"}},De=a.forwardRef((function(e,t){var n=e.children,o=e.disableStrictModeCompat,u=void 0!==o&&o,s=e.in,c=e.onEnter,l=e.onEntered,f=e.onEntering,h=e.onExit,d=e.onExited,v=e.onExiting,m=e.style,y=e.timeout,g=void 0===y?"auto":y,b=e.TransitionComponent,k=void 0===b?Ae:b,w=Object(i.a)(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),O=a.useRef(),x=a.useRef(),_=Object(C.a)(),j=_.unstable_strictMode&&!u,E=a.useRef(null),S=Object(p.a)(n.ref,t),T=Object(p.a)(j?E:void 0,S),I=function(e){return function(t,n){if(e){var r=j?[E.current,t]:[t,n],i=Object(K.a)(r,2),a=i[0],o=i[1];void 0===o?e(a):e(a,o)}}},A=I(f),R=I((function(e,t){!function(e){e.scrollTop}(e);var n,r=Re({style:m,timeout:g},{mode:"enter"}),i=r.duration,a=r.delay;"auto"===g?(n=_.transitions.getAutoHeightDuration(e.clientHeight),x.current=n):n=i,e.style.transition=[_.transitions.create("opacity",{duration:n,delay:a}),_.transitions.create("transform",{duration:.666*n,delay:a})].join(","),c&&c(e,t)})),N=I(l),P=I(v),D=I((function(e){var t,n=Re({style:m,timeout:g},{mode:"exit"}),r=n.duration,i=n.delay;"auto"===g?(t=_.transitions.getAutoHeightDuration(e.clientHeight),x.current=t):t=r,e.style.transition=[_.transitions.create("opacity",{duration:t,delay:i}),_.transitions.create("transform",{duration:.666*t,delay:i||.333*t}
2)].join(","),e.style.opacity="0",e.style.transform=Ne(.75),h&&h(e)})),L=I(d);return a.useEffect((function(){return function(){clearTimeout(O.current)}}),[]),a.createElement(k,Object(r.a)({appear:!0,in:s,nodeRef:j?E:void 0,onEnter:R,onEntered:N,onEntering:A,onExit:D,onExited:L,onExiting:P,addEndListener:function(e,t){var n=j?e:t;"auto"===g&&(O.current=setTimeout(n,x.current||0))},timeout:"auto"===g?null:g},w),(function(e,t){return a.cloneElement(n,Object(r.a)({style:Object(r.a)({opacity:0,transform:Ne(.75),visibility:"exited"!==e||s?void 0:"hidden"},Pe[e],m,n.props.style),ref:T},t))}))}));De.muiSupportAuto=!0;var Le=De,Me=n(200);function Fe(e,t){var n=0;return"number"===typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function Ue(e,t){var n=0;return"number"===typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function Ve(e){return[e.horizontal,e.vertical].map((function(e){return"number"===typeof e?"".concat(e,"px"):e})).join(" ")}function Be(e){return"function"===typeof e?e():e}var ze=a.forwardRef((function(e,t){var n=e.action,o=e.anchorEl,s=e.anchorOrigin,c=void 0===s?{vertical:"top",horizontal:"left"}:s,l=e.anchorPosition,f=e.anchorReference,h=void 0===f?"anchorEl":f,d=e.children,p=e.classes,m=e.className,y=e.container,g=e.elevation,b=void 0===g?8:g,k=e.getContentAnchorEl,w=e.marginThreshold,O=void 0===w?16:w,x=e.onEnter,_=e.onEntered,j=e.onEntering,E=e.onExit,S=e.onExited,T=e.onExiting,I=e.open,C=e.PaperProps,A=void 0===C?{}:C,R=e.transformOrigin,N=void 0===R?{vertical:"top",horizontal:"left"}:R,P=e.TransitionComponent,D=void 0===P?Le:P,L=e.transitionDuration,M=void 0===L?"auto":L,F=e.TransitionProps,U=void 0===F?{}:F,V=Object(i.a)(e,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),B=a.useRef(),z=a.useCallback((function(e){if("anchorPosition"===h)return l;var t=Be(o),n=(t&&1===t.nodeType?t:Object($.a)(B.current).body).getBoundingClientRect(),r=0===e?c.vertical:"center";return{top:n.top+Fe(n,r),left:n.left+Ue(n,c.horizontal)}}),[o,c.horizontal,c.vertical,l,h]),q=a.useCallback((function(e){var t=0;if(k&&"anchorEl"===h){var n=k(e);if(n&&e.contains(n)){var r=function(e,t){for(var n=t,r=0;n&&n!==e;)r+=(n=n.parentElement).scrollTop;return r}(e,n);t=n.offsetTop+n.clientHeight/2-r||0}0}return t}),[c.vertical,h,k]),W=a.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:Fe(e,N.vertical)+t,horizontal:Ue(e,N.horizontal)}}),[N.horizontal,N.vertical]),H=a.useCallback((function(e){var t=q(e),n={width:e.offsetWidth,height:e.offsetHeight},r=W(n,t);if("none"===h)return{top:null,left:null,transformOrigin:Ve(r)};var i=z(t),a=i.top-r.vertical,u=i.left-r.horizontal,s=a+n.height,c=u+n.width,l=Object(X.a)(Be(o)),f=l.innerHeight-O,d=l.innerWidth-O;if(a<O){var p=a-O;a-=p,r.vertical+=p}else if(s>f){var v=s-f;a-=v,r.vertical+=v}if(u<O){var m=u-O;u-=m,r.horizontal+=m}else if(c>d){var y=c-d;u-=y,r.horizontal+=y}return{top:"".concat(Math.round(a),"px"),left:"".concat(Math.round(u),"px"),transformOrigin:Ve(r)}}),[o,h,z,q,W,O]),K=a.useCallback((function(){var e=B.current;if(e){var t=H(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}}),[H]),G=a.useCallback((function(e){B.current=Q.findDOMNode(e)}),[]);a.useEffect((function(){I&&K()})),a.useImperativeHandle(n,(function(){return I?{updatePosition:function(){K()}}:null}),[I,K]),a.useEffect((function(){if(I){var e=Object(v.a)((function(){K()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[I,K]);var Y=M;"auto"!==M||D.muiSupportAuto||(Y=void 0);var Z=y||(o?Object($.a)(Be(o)).body:void 0);return a.createElement(be,Object(r.a)({container:Z,open:I,ref:t,BackdropProps:{invisible:!0},className:Object(u.a)(p.root,m)},V),a.createElement(D,Object(r.a)({appear:!0,in:I,onEnter:x,onEntered:_,onExit:E,onExited:S,onExiting:T,timeout:Y},U,{onEntering:Object(J.a)((function(e,t){j&&j(e,t),K()}),U.onEntering)}),a.createElement(Me.a,Object(r.a)({elevation:b,ref:G},A,{className:Object(u.a)(p.paper,A.className)}),d)))})),qe=Object(h.a)({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(ze);var We=a.createContext({}),He=a.forwardRef((function(e,t){var n=e.children,o=e.classes,s=e.className,c=e.component,l=void 0===c?"ul":c,f=e.dense,h=void 0!==f&&f,d=e.disablePadding,p=void 0!==d&&d,v=e.subheader,m=Object(i.a)(e,["children","classes","className","component","dense","disablePadding","subheader"]),y=a.useMemo((function(){return{dense:h}}),[h]);return a.createElement(We.Provider,{value:y},a.createElement(l,Object(r.a)({className:Object(u.a)(o.root,s,h&&o.dense,!p&&o.padding,v&&o.subheader),ref:t},m),v,n))}
2)),Ke=Object(h.a)({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(He);function Ge(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function $e(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function Qe(e,t){if(void 0===t)return!0;var n=e.innerText;return void 0===n&&(n=e.textContent),0!==(n=n.trim().toLowerCase()).length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function Ye(e,t,n,r,i,a){for(var o=!1,u=i(e,t,!!t&&n);u;){if(u===e.firstChild){if(o)return;o=!0}var s=!r&&(u.disabled||"true"===u.getAttribute("aria-disabled"));if(u.hasAttribute("tabindex")&&Qe(u,a)&&!s)return void u.focus();u=i(e,u,n)}}var Xe="undefined"===typeof window?a.useEffect:a.useLayoutEffect,Je=a.forwardRef((function(e,t){var n=e.actions,o=e.autoFocus,u=void 0!==o&&o,s=e.autoFocusItem,c=void 0!==s&&s,l=e.children,f=e.className,h=e.disabledItemsFocusable,d=void 0!==h&&h,v=e.disableListWrap,m=void 0!==v&&v,y=e.onKeyDown,g=e.variant,b=void 0===g?"selectedMenu":g,k=Object(i.a)(e,["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"]),w=a.useRef(null),O=a.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Xe((function(){u&&w.current.focus()}),[u]),a.useImperativeHandle(n,(function(){return{adjustStyleForScrollbar:function(e,t){var n=!w.current.style.width;if(e.clientHeight<w.current.clientHeight&&n){var r="".concat(se(),"px");w.current.style["rtl"===t.direction?"paddingLeft":"paddingRight"]=r,w.current.style.width="calc(100% + ".concat(r,")")}return w.current}}}),[]);var x=a.useCallback((function(e){w.current=Q.findDOMNode(e)}),[]),_=Object(p.a)(x,t),j=-1;a.Children.forEach(l,(function(e,t){a.isValidElement(e)&&(e.props.disabled||("selectedMenu"===b&&e.props.selected||-1===j)&&(j=t))}));var E=a.Children.map(l,(function(e,t){if(t===j){var n={};return c&&(n.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===b&&(n.tabIndex=0),a.cloneElement(e,n)}return e}));return a.createElement(Ke,Object(r.a)({role:"menu",ref:_,className:f,onKeyDown:function(e){var t=w.current,n=e.key,r=Object($.a)(t).activeElement;if("ArrowDown"===n)e.preventDefault(),Ye(t,r,m,d,Ge);else if("ArrowUp"===n)e.preventDefault(),Ye(t,r,m,d,$e);else if("Home"===n)e.preventDefault(),Ye(t,null,m,d,Ge);else if("End"===n)e.preventDefault(),Ye(t,null,m,d,$e);else if(1===n.length){var i=O.current,a=n.toLowerCase(),o=performance.now();i.keys.length>0&&(o-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&a!==i.keys[0]&&(i.repeating=!1)),i.lastTime=o,i.keys.push(a);var u=r&&!i.repeating&&Qe(r,i);i.previousKeyMatched&&(u||Ye(t,r,!1,d,Ge,i))?e.preventDefault():i.previousKeyMatched=!1}y&&y(e)},tabIndex:u?0:-1},k),E)})),Ze={vertical:"top",horizontal:"right"},et={vertical:"top",horizontal:"left"},tt=a.forwardRef((function(e,t){var n=e.autoFocus,o=void 0===n||n,s=e.children,c=e.classes,l=e.disableAutoFocusItem,f=void 0!==l&&l,h=e.MenuListProps,d=void 0===h?{}:h,p=e.onClose,v=e.onEntering,m=e.open,y=e.PaperProps,g=void 0===y?{}:y,b=e.PopoverClasses,k=e.transitionDuration,w=void 0===k?"auto":k,O=e.TransitionProps,x=(O=void 0===O?{}:O).onEntering,_=Object(i.a)(O,["onEntering"]),j=e.variant,E=void 0===j?"selectedMenu":j,S=Object(i.a)(e,["autoFocus","children","classes","disableAutoFocusItem","MenuListProps","onClose","onEntering","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant"]),T=Object(C.a)(),I=o&&!f&&m,A=a.useRef(null),R=a.useRef(null),N=-1;a.Children.map(s,(function(e,t){a.isValidElement(e)&&(e.props.disabled||("menu"!==E&&e.props.selected||-1===N)&&(N=t))}));var P=a.Children.map(s,(function(e,t){return t===N?a.cloneElement(e,{ref:function(t){R.current=Q.findDOMNode(t),Object(te.a)(e.ref,t)}}):e}));return a.createElement(qe,Object(r.a)({getContentAnchorEl:function(){return R.current},classes:b,onClose:p,TransitionProps:Object(r.a)({onEntering:function(e,t){A.current&&A.current.adjustStyleForScrollbar(e,T),v&&v(e,t),x&&x(e,t)}},_),anchorOrigin:"rtl"===T.direction?Ze:et,transformOrigin:"rtl"===T.direction?Ze:et,PaperProps:Object(r.a)({},g,{classes:Object(r.a)({},g.classes,{root:c.paper})}),open:m,ref:t,transitionDuration:w},S),a.createElement(Je,Object(r.a)({onKeyDown:function(e){"Tab"===e.key&&(e.preventDefault(),p&&p(e,"tabKeyDown"))},actions:A,autoFocus:o&&(-1===N||f),autoFocusItem:I,variant:E},d,{className:Object(u.a)(c.list,d.className)}),P))})),nt=Object(h.a)({paper:{maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"},list:{outline:0}},{name:"MuiMenu"})(tt),rt=n(76);function it(e,t){return"object"===Object(G.a)(t)&&null!==t?e===t:String(e)===String(t)}var at=a.forwardRef((function(e,t){var n=e["aria-label"],o=e.autoFocus,c=e.autoWidth,l=e.children,f=e.classes,h=e.className,v=e.defaultValue,m=e.disabled,y=e.displayEmpty,g=e.IconComponent,b=e.inputRef,k=e.labelId,O=e.MenuProps,x=void 0===O?{}
2:O,_=e.multiple,j=e.name,E=e.onBlur,S=e.onChange,T=e.onClose,I=e.onFocus,C=e.onOpen,A=e.open,R=e.readOnly,N=e.renderValue,P=e.SelectDisplayProps,D=void 0===P?{}:P,L=e.tabIndex,M=(e.type,e.value),F=e.variant,U=void 0===F?"standard":F,V=Object(i.a)(e,["aria-label","autoFocus","autoWidth","children","classes","className","defaultValue","disabled","displayEmpty","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"]),B=Object(rt.a)({controlled:M,default:v,name:"Select"}),z=Object(K.a)(B,2),q=z[0],W=z[1],H=a.useRef(null),G=a.useState(null),Q=G[0],Y=G[1],X=a.useRef(null!=A).current,J=a.useState(),Z=J[0],ee=J[1],te=a.useState(!1),ne=te[0],re=te[1],ie=Object(p.a)(t,b);a.useImperativeHandle(ie,(function(){return{focus:function(){Q.focus()},node:H.current,value:q}}),[Q,q]),a.useEffect((function(){o&&Q&&Q.focus()}),[o,Q]),a.useEffect((function(){if(Q){var e=Object($.a)(Q).getElementById(k);if(e){var t=function(){getSelection().isCollapsed&&Q.focus()};return e.addEventListener("click",t),function(){e.removeEventListener("click",t)}}}}),[k,Q]);var ae,oe,ue=function(e,t){e?C&&C(t):T&&T(t),X||(ee(c?null:Q.clientWidth),re(e))},se=a.Children.toArray(l),ce=function(e){return function(t){var n;if(_||ue(!1,t),_){n=Array.isArray(q)?q.slice():[];var r=q.indexOf(e.props.value);-1===r?n.push(e.props.value):n.splice(r,1)}else n=e.props.value;e.props.onClick&&e.props.onClick(t),q!==n&&(W(n),S&&(t.persist(),Object.defineProperty(t,"target",{writable:!0,value:{value:n,name:j}}),S(t,e)))}},le=null!==Q&&(X?A:ne);delete V["aria-invalid"];var fe=[],he=!1;(w({value:q})||y)&&(N?ae=N(q):he=!0);var de=se.map((function(e){if(!a.isValidElement(e))return null;var t;if(_){if(!Array.isArray(q))throw new Error(Object(s.a)(2));(t=q.some((function(t){return it(t,e.props.value)})))&&he&&fe.push(e.props.children)}else(t=it(q,e.props.value))&&he&&(oe=e.props.children);return t&&!0,a.cloneElement(e,{"aria-selected":t?"true":void 0,onClick:ce(e),onKeyUp:function(t){" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})}));he&&(ae=_?fe.join(", "):oe);var pe,ve=Z;!c&&X&&Q&&(ve=Q.clientWidth),pe="undefined"!==typeof L?L:m?null:0;var me=D.id||(j?"mui-component-select-".concat(j):void 0);return a.createElement(a.Fragment,null,a.createElement("div",Object(r.a)({className:Object(u.a)(f.root,f.select,f.selectMenu,f[U],h,m&&f.disabled),ref:Y,tabIndex:pe,role:"button","aria-disabled":m?"true":void 0,"aria-expanded":le?"true":void 0,"aria-haspopup":"listbox","aria-label":n,"aria-labelledby":[k,me].filter(Boolean).join(" ")||void 0,onKeyDown:function(e){if(!R){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),ue(!0,e))}},onMouseDown:m||R?null:function(e){0===e.button&&(e.preventDefault(),Q.focus(),ue(!0,e))},onBlur:function(e){!le&&E&&(e.persist(),Object.defineProperty(e,"target",{writable:!0,value:{value:q,name:j}}),E(e))},onFocus:I},D,{id:me}),function(e){return null==e||"string"===typeof e&&!e.trim()}(ae)?a.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}}):ae),a.createElement("input",Object(r.a)({value:Array.isArray(q)?q.join(","):q,name:j,ref:H,"aria-hidden":!0,onChange:function(e){var t=se.map((function(e){return e.props.value})).indexOf(e.target.value);if(-1!==t){var n=se[t];W(n.props.value),S&&S(e,n)}},tabIndex:-1,className:f.nativeInput,autoFocus:o},V)),a.createElement(g,{className:Object(u.a)(f.icon,f["icon".concat(Object(d.a)(U))],le&&f.iconOpen,m&&f.disabled)}),a.createElement(nt,Object(r.a)({id:"menu-".concat(j||""),anchorEl:Q,open:le,onClose:function(e){ue(!1,e)}},x,{MenuListProps:Object(r.a)({"aria-labelledby":k,role:"listbox",disableListWrap:!0},x.MenuListProps),PaperProps:Object(r.a)({},x.PaperProps,{style:Object(r.a)({minWidth:ve},null!=x.PaperProps?x.PaperProps.style:null)})}),de))})),ot=n(77),ut=Object(ot.a)(a.createElement("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),st=a.forwardRef((function(e,t){var n=e.classes,o=e.className,s=e.disabled,c=e.IconComponent,l=e.inputRef,f=e.variant,h=void 0===f?"standard":f,p=Object(i.a)(e,["classes","className","disabled","IconComponent","inputRef","variant"]);return a.createElement(a.Fragment,null,a.createElement("select",Object(r.a)({className:Object(u.a)(n.root,n.select,n[h],o,s&&n.disabled),disabled:s,ref:l||t},p)),e.multiple?null:a.createElement(c,{className:Object(u.a)(n.icon,n["icon".concat(Object(d.a)(h))],s&&n.disabled)}))})),ct=function(e){return{root:{},select:{"-moz-appearance":"none","-webkit-appearance":"none",userSelect:"none",borderRadius:0,minWidth:16,cursor:"pointer","&:focus":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)",borderRadius:0},"&::-ms-expand":{display:"none"},"&$disabled":{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:e.palette.background.paper},"&&":{paddingRight:24}},filled:{"&&":{paddingRight:32}},outlined:{borderRadius:e.shape.borderRadius,"&&":{paddingRight:32}},selectMenu:{height:"auto",minHeight:"1.1876em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},disabled:{},icon:{position:"absolute",right:0,top:"calc(50% - 12px)",pointerEvents:"none",color:e.palette.action.active,"&$disabled":{color:e.palette.action.disabled}},iconOpen:{transform:"rotate(180deg)"},iconFilled:{right:7},iconOutlined:{right:7},nativeInput:{bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%"}}},lt=a.createElement(E,null),ft=a.forwardRef((function(e,t){var n=e.children,o=e.classes,u=e.IconComponent,s=void 0===u?ut:u,l=e.input,f=void 0===l?lt:l,h=e.inputProps,d=(e.variant,Object(i.a)(e,["children","classes","IconComponent","input","inputProps","variant"])),p=c({props:e,muiFormControl:D(),states:["variant"]});return a.cloneElement(f,Object(r.a)({inputComponent:st,inputProps:Object(r.a)({children:n,classes:o,IconComponent:s,variant:p.variant,type:void 0},h,f?f.props.inputProps:{}),ref:t},d))}));ft.muiName="Select";Object(h.a)(ct,{name:"MuiNativeSelect"})(ft);var ht=ct,dt=a.createElement(E,null),pt=a.createElement(T,null),vt=a.forwardRef((function e(t,n){var o=t.autoWidth,u=void 0!==o&&o,s=t.children,l=t.classes,f=t.displayEmpty,h=void 0!==f&&f,d=t.IconComponent,p=void 0===d?ut:d,v=t.i
2d,m=t.input,y=t.inputProps,g=t.label,b=t.labelId,k=t.labelWidth,w=void 0===k?0:k,O=t.MenuProps,x=t.multiple,_=void 0!==x&&x,j=t.native,E=void 0!==j&&j,S=t.onClose,T=t.onOpen,I=t.open,C=t.renderValue,A=t.SelectDisplayProps,R=t.variant,N=void 0===R?"standard":R,L=Object(i.a)(t,["autoWidth","children","classes","displayEmpty","IconComponent","id","input","inputProps","label","labelId","labelWidth","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"]),M=E?st:at,F=c({props:t,muiFormControl:D(),states:["variant"]}).variant||N,U=m||{standard:dt,outlined:a.createElement(P,{label:g,labelWidth:w}),filled:pt}[F];return a.cloneElement(U,Object(r.a)({inputComponent:M,inputProps:Object(r.a)({children:s,IconComponent:p,variant:F,type:void 0,multiple:_},E?{id:v}:{autoWidth:u,displayEmpty:h,labelId:b,MenuProps:O,onClose:S,onOpen:T,open:I,renderValue:C,SelectDisplayProps:Object(r.a)({id:v},A)},y,{classes:y?Object(H.a)({baseClasses:l,newClasses:y.classes,Component:e}):l},m?m.props.inputProps:{}),ref:n},L))}));vt.muiName="Select";var mt=Object(h.a)(ht,{name:"MuiSelect"})(vt),yt={standard:E,filled:T,outlined:P},gt=a.forwardRef((function(e,t){var n=e.autoComplete,o=e.autoFocus,s=void 0!==o&&o,c=e.children,l=e.classes,f=e.className,h=e.color,d=void 0===h?"primary":h,p=e.defaultValue,v=e.disabled,m=void 0!==v&&v,y=e.error,g=void 0!==y&&y,b=e.FormHelperTextProps,k=e.fullWidth,w=void 0!==k&&k,O=e.helperText,x=e.hiddenLabel,_=e.id,j=e.InputLabelProps,E=e.inputProps,S=e.InputProps,T=e.inputRef,I=e.label,C=e.multiline,A=void 0!==C&&C,R=e.name,N=e.onBlur,P=e.onChange,D=e.onFocus,L=e.placeholder,M=e.required,F=void 0!==M&&M,V=e.rows,B=e.rowsMax,q=e.maxRows,H=e.minRows,K=e.select,G=void 0!==K&&K,$=e.SelectProps,Q=e.type,Y=e.value,X=e.variant,J=void 0===X?"standard":X,Z=Object(i.a)(e,["autoComplete","autoFocus","children","classes","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","hiddenLabel","id","InputLabelProps","inputProps","InputProps","inputRef","label","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","rowsMax","maxRows","minRows","select","SelectProps","type","value","variant"]);var ee={};if("outlined"===J&&(j&&"undefined"!==typeof j.shrink&&(ee.notched=j.shrink),I)){var te,ne=null!==(te=null===j||void 0===j?void 0:j.required)&&void 0!==te?te:F;ee.label=a.createElement(a.Fragment,null,I,ne&&"\xa0*")}G&&($&&$.native||(ee.id=void 0),ee["aria-describedby"]=void 0);var re=O&&_?"".concat(_,"-helper-text"):void 0,ie=I&&_?"".concat(_,"-label"):void 0,ae=yt[J],oe=a.createElement(ae,Object(r.a)({"aria-describedby":re,autoComplete:n,autoFocus:s,defaultValue:p,fullWidth:w,multiline:A,name:R,rows:V,rowsMax:B,maxRows:q,minRows:H,type:Q,value:Y,id:_,inputRef:T,onBlur:N,onChange:P,onFocus:D,placeholder:L,inputProps:E},ee,S));return a.createElement(z,Object(r.a)({className:Object(u.a)(l.root,f),disabled:m,error:g,fullWidth:w,hiddenLabel:x,ref:t,required:F,color:d,variant:J},Z),I&&a.createElement(U,Object(r.a)({htmlFor:_,id:ie},j),I),G?a.createElement(mt,Object(r.a)({"aria-describedby":re,id:_,labelId:ie,value:Y,input:oe},$),c):oe,O&&a.createElement(W,Object(r.a)({id:re},b),O))}));t.a=Object(h.a)({root:{}},{name:"MuiTextField"})(gt)},function(e,t,n){"use strict";var r=n(7),i=n(14),a=n(1),o=n(16),u=n.n(o),s=n(201),c=n(59),l=n.n(c),f=n(37),h=n(45),d=n(114);function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(d.a)(),i=Object(s.a)({theme:n,name:"MuiUseMediaQuery",props:{}});var o="function"===typeof e?e(n):e;o=o.replace(/^@media( ?)/m,"");var u="undefined"!==typeof window&&"undefined"!==typeof window.matchMedia,c=Object(r.a)({},i,t),l=c.defaultMatches,f=void 0!==l&&l,h=c.matchMedia,p=void 0===h?u?window.matchMedia:null:h,v=c.noSsr,m=void 0!==v&&v,y=c.ssrMatchMedia,g=void 0===y?null:y,b=a.useState((function(){return m&&u?p(o).matches:g?g(o).matches:f})),k=b[0],w=b[1];return a.useEffect((function(){var e=!0;if(u){var t=p(o),n=function(){e&&w(t.matches)};return n(),t.addListener(n),function(){e=!1,t.removeListener(n)}}}),[o,p,u]),k}var v=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return n?h.b.indexOf(e)<=h.b.indexOf(t):h.b.indexOf(e)<h.b.indexOf(t)},m=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return n?h.b.indexOf(t)<=h.b.indexOf(e):h.b.indexOf(t)<h.b.indexOf(e)},y="undefined"===typeof window?a.useEffect:a.useLayoutEffect,g=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=e.withTheme,o=void 0!==n&&n,u=e.noSSR,c=void 0!==u&&u,h=e.initialWidth;function d(e){var n=Object(f.a)(),u=e.theme||n,l=Object(s.a)({theme:u,name:"MuiWithWidth",props:Object(r.a)({},e)}),d=l.initialWidth,v=l.width,m=Object(i.a)(l,["initialWidth","width"]),g=a.useState(!1),b=g[0],k=g[1];y((function(){k(!0)}),[]);var w=u.breakpoints.keys.slice().reverse().reduce((function(e,t){var n=p(u.breakpoints.up(t));return!e&&n?t:e}),null),O=Object(r.a)({width:v||(b||c?w:void 0)||d||h},o?{theme:u}:{},m);return void 0===O.width?null:a.createElement(t,O)}return l()(d,t),d}};function b(e){var t=e.children,n=e.only,r=e.width,i=Object(f.a)(),a=!0;if(n)if(Array.isArray(n))for(var o=0;o<n.length;o+=1){if(r===n[o]){a=!1;break}}else n&&r===n&&(a=!1);if(a)for(var u=0;u<i.breakpoints.keys.length;u+=1){var s=i.breakpoints.keys[u],c=e["".concat(s,"Up")],l=e["".concat(s,"Down")];if(c&&v(s,r)||l&&m(s,r)){a=!1;break}}return a?t:null}b.propTypes={children:u.a.node,className:u.a.string,implementation:u.a.oneOf(["js","css"]),initialWidth:u.a.oneOf(["xs","sm","md","lg","xl"]),lgDown:u.a.bool,lgUp:u.a.bool,mdDown:u.a.bool,mdUp:u.a.bool,only:u.a.oneOfType([u.a.oneOf(["xs","sm","md","lg","xl"]),u.a.arrayOf(u.a.oneOf(["xs","sm","md","lg","xl"]))]),smDown:u.a.bool,smUp:u.a.bool,width:u.a.string.isRequired,xlDown:u.a.bool,xlUp:u.a.bool,xsDown:u.a.bool,xsUp:u.a.bool};var k=g()(b),w=n(43),O=n(20),x=n(17);var _=Object(x.a)((function(e){var t={display:"none"};return e.breakpoints.keys.reduce((function(n,r){return n["only".concat(Object(O.a)(r))]=Object(w.a)({},e.breakpoints.only(r),t),n["".concat(r,"Up")]=Object(w.a)({},e.breakpoints.up(r),t),n["".concat(r,"Down")]=Object(w.a)({},e.breakpoints.down(r),t),n}),{})}),{name:"PrivateHiddenCss"})((function(e){var t=e.children,n=e.classes,r=e.className,o=e.only,u=(Object(i.a)(e,["children","classes","className","only"]),Object(f.a)()),s=[];r&&s.push(r);for(var c=0;c<u.breakpoints.keys.length;c+=1){var l=u.breakpoints.keys[c],h=e["".concat(l,"Up")],d=e["".concat(l,"Down")];h&&s.push(n["".concat(l,"Up")]),d&&s.push(n["".concat(l,"Down")])}
2return o&&(Array.isArray(o)?o:[o]).forEach((function(e){s.push(n["only".concat(Object(O.a)(e))])})),a.createElement("div",{className:s.join(" ")},t)}));t.a=function(e){var t=e.implementation,n=void 0===t?"js":t,o=e.lgDown,u=void 0!==o&&o,s=e.lgUp,c=void 0!==s&&s,l=e.mdDown,f=void 0!==l&&l,h=e.mdUp,d=void 0!==h&&h,p=e.smDown,v=void 0!==p&&p,m=e.smUp,y=void 0!==m&&m,g=e.xlDown,b=void 0!==g&&g,w=e.xlUp,O=void 0!==w&&w,x=e.xsDown,j=void 0!==x&&x,E=e.xsUp,S=void 0!==E&&E,T=Object(i.a)(e,["implementation","lgDown","lgUp","mdDown","mdUp","smDown","smUp","xlDown","xlUp","xsDown","xsUp"]);return"js"===n?a.createElement(k,Object(r.a)({lgDown:u,lgUp:c,mdDown:f,mdUp:d,smDown:v,smUp:y,xlDown:b,xlUp:O,xsDown:j,xsUp:S},T)):a.createElement(_,Object(r.a)({lgDown:u,lgUp:c,mdDown:f,mdUp:d,smDown:v,smUp:y,xlDown:b,xlUp:O,xsDown:j,xsUp:S},T))}}]]);
3//# sourceMappingURL=2.92ac3610.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.