diff --git a/.gitignore b/.gitignore index fd3dbb5..bb25f43 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,7 @@ # next.js /.next/ -/out/ +#/out/ # production /build diff --git a/out/_next/static/9eBe5YIUR4H0-KLOLc7L8/_buildManifest.js b/out/_next/static/9eBe5YIUR4H0-KLOLc7L8/_buildManifest.js new file mode 100644 index 0000000..ab89fac --- /dev/null +++ b/out/_next/static/9eBe5YIUR4H0-KLOLc7L8/_buildManifest.js @@ -0,0 +1 @@ +self.__BUILD_MANIFEST=function(s,c,a,t,e,f,i){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/HomePage":[s,c,t,a,e,f,"static/css/e130bca707775ff7.css","static/chunks/pages/HomePage-7f3311ca13dcbc17.js"],"/MyProfile":[s,c,t,a,e,i,f,"static/css/43638933c7d74c45.css","static/chunks/pages/MyProfile-f0a2f408dcbcc1c4.js"],"/_error":["static/chunks/pages/_error-9a890acb1e81c3fc.js"],"/about":[s,c,a,i,"static/css/d738220cac7d818f.css","static/chunks/pages/about-c67f1bc81dd104aa.js"],sortedPages:["/HomePage","/MyProfile","/_app","/_error","/about"]}}("static/chunks/7112840a-72dfded408591da7.js","static/chunks/9f5cd2ed-d01a892385009708.js","static/chunks/870-f591a4fa74f41ccf.js","static/chunks/c16184b3-33702c9ab78f9540.js","static/chunks/746-c0558fbaf6b4ebbd.js","static/chunks/518-2b899c8b54bd7cfa.js","static/chunks/664-ac01f0104386d934.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/out/_next/static/9eBe5YIUR4H0-KLOLc7L8/_ssgManifest.js b/out/_next/static/9eBe5YIUR4H0-KLOLc7L8/_ssgManifest.js new file mode 100644 index 0000000..5b3ff59 --- /dev/null +++ b/out/_next/static/9eBe5YIUR4H0-KLOLc7L8/_ssgManifest.js @@ -0,0 +1 @@ +self.__SSG_MANIFEST=new Set([]);self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB() \ No newline at end of file diff --git a/out/_next/static/chunks/078dd349-1fb1d8b17c8779a7.js b/out/_next/static/chunks/078dd349-1fb1d8b17c8779a7.js new file mode 100644 index 0000000..2a616f9 --- /dev/null +++ b/out/_next/static/chunks/078dd349-1fb1d8b17c8779a7.js @@ -0,0 +1,976 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[380],{5554:function(e,t,i){i.d(t,{C:function(){return e3},X:function(){return eq},c:function(){return tT},o:function(){return t8}});var r,n=i(8954),s=i(5723),a=i(9858),o=i(9703),l=i(6574);function c(){return{"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."}}let u=new n.LL("auth","Firebase",c()),h=new a.Yd("@firebase/auth");function d(e,...t){h.logLevel<=a.in.ERROR&&h.error(`Auth (${s.Jn}): ${e}`,...t)}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function p(e,...t){throw g(e,...t)}function f(e,...t){return g(e,...t)}function m(e,t,i){let r=Object.assign(Object.assign({},c()),{[t]:i});return new n.LL("auth","Firebase",r).create(t,{appName:e.name})}function g(e,...t){if("string"!=typeof e){let i=t[0],r=[...t.slice(1)];return r[0]&&(r[0].appName=e.name),e._errorFactory.create(i,...r)}return u.create(e,...t)}function v(e,t,...i){if(!e)throw g(t,...i)}function _(e){let t="INTERNAL ASSERTION FAILED: "+e;throw d(t),Error(t)}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function I(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.href)||""}function w(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.protocol)||null}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class y{constructor(e,t){this.shortDelay=e,this.longDelay=t,t>e||_("Short delay should be less than long delay!"),this.isMobile=(0,n.uI)()||(0,n.b$)()}get(){return!("undefined"!=typeof navigator&&navigator&&"onLine"in navigator&&"boolean"==typeof navigator.onLine&&("http:"===w()||"https:"===w()||(0,n.ru)()||"connection"in navigator))||navigator.onLine?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function T(e,t){e.emulator||_("Emulator should always be set here");let{url:i}=e.emulator;return t?`${i}${t.startsWith("/")?t.slice(1):t}`:i}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class E{static initialize(e,t,i){this.fetchImpl=e,t&&(this.headersImpl=t),i&&(this.responseImpl=i)}static fetch(){return this.fetchImpl?this.fetchImpl:"undefined"!=typeof self&&"fetch"in self?self.fetch:"undefined"!=typeof globalThis&&globalThis.fetch?globalThis.fetch:"undefined"!=typeof fetch?fetch:void _("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){return this.headersImpl?this.headersImpl:"undefined"!=typeof self&&"Headers"in self?self.Headers:"undefined"!=typeof globalThis&&globalThis.Headers?globalThis.Headers:"undefined"!=typeof Headers?Headers:void _("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){return this.responseImpl?this.responseImpl:"undefined"!=typeof self&&"Response"in self?self.Response:"undefined"!=typeof globalThis&&globalThis.Response?globalThis.Response:"undefined"!=typeof Response?Response:void _("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let k={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"},S=new y(3e4,6e4);function R(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}async function P(e,t,i,r,s={}){return O(e,s,async()=>{let s={},a={};r&&("GET"===t?a=r:s={body:JSON.stringify(r)});let o=(0,n.xO)(Object.assign({key:e.config.apiKey},a)).slice(1),l=await e._getAdditionalHeaders();return l["Content-Type"]="application/json",e.languageCode&&(l["X-Firebase-Locale"]=e.languageCode),E.fetch()(b(e,e.config.apiHost,i,o),Object.assign({method:t,headers:l,referrerPolicy:"no-referrer"},s))})}async function O(e,t,i){e._canInitEmulator=!1;let r=Object.assign(Object.assign({},k),t);try{let t=new N(e),n=await Promise.race([i(),t.promise]);t.clearNetworkTimeout();let s=await n.json();if("needConfirmation"in s)throw A(e,"account-exists-with-different-credential",s);if(n.ok&&!("errorMessage"in s))return s;{let[t,i]=(n.ok?s.errorMessage:s.error.message).split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===t)throw A(e,"credential-already-in-use",s);if("EMAIL_EXISTS"===t)throw A(e,"email-already-in-use",s);if("USER_DISABLED"===t)throw A(e,"user-disabled",s);let a=r[t]||t.toLowerCase().replace(/[_\s]+/g,"-");if(i)throw m(e,a,i);p(e,a)}}catch(t){if(t instanceof n.ZR)throw t;p(e,"network-request-failed",{message:String(t)})}}async function C(e,t,i,r,n={}){let s=await P(e,t,i,r,n);return"mfaPendingCredential"in s&&p(e,"multi-factor-auth-required",{_serverResponse:s}),s}function b(e,t,i,r){let n=`${t}${i}?${r}`;return e.config.emulator?T(e.config,n):`${e.config.apiScheme}://${n}`}class N{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((e,t)=>{this.timer=setTimeout(()=>t(f(this.auth,"network-request-failed")),S.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function A(e,t,i){let r={appName:e.name};i.email&&(r.email=i.email),i.phoneNumber&&(r.phoneNumber=i.phoneNumber);let n=f(e,t,r);return n.customData._tokenResponse=i,n}function L(e){return void 0!==e&&void 0!==e.enterprise}class D{constructor(e){if(this.siteKey="",this.recaptchaEnforcementState=[],void 0===e.recaptchaKey)throw Error("recaptchaKey undefined");this.siteKey=e.recaptchaKey.split("/")[3],this.recaptchaEnforcementState=e.recaptchaEnforcementState}getProviderEnforcementState(e){if(!this.recaptchaEnforcementState||0===this.recaptchaEnforcementState.length)return null;for(let t of this.recaptchaEnforcementState)if(t.provider&&t.provider===e)return function(e){switch(e){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}(t.enforcementState);return null}isProviderEnabled(e){return"ENFORCE"===this.getProviderEnforcementState(e)||"AUDIT"===this.getProviderEnforcementState(e)}}async function M(e,t){return P(e,"GET","/v2/recaptchaConfig",R(e,t))}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function U(e,t){return P(e,"POST","/v1/accounts:delete",t)}async function x(e,t){return P(e,"POST","/v1/accounts:lookup",t)}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function V(e){if(e)try{let t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(e){}}async function F(e,t=!1){let i=(0,n.m9)(e),r=await i.getIdToken(t),s=z(r);v(s&&s.exp&&s.auth_time&&s.iat,i.auth,"internal-error");let a="object"==typeof s.firebase?s.firebase:void 0,o=null==a?void 0:a.sign_in_provider;return{claims:s,token:r,authTime:V(j(s.auth_time)),issuedAtTime:V(j(s.iat)),expirationTime:V(j(s.exp)),signInProvider:o||null,signInSecondFactor:(null==a?void 0:a.sign_in_second_factor)||null}}function j(e){return 1e3*Number(e)}function z(e){let[t,i,r]=e.split(".");if(void 0===t||void 0===i||void 0===r)return d("JWT malformed, contained fewer than 3 sections"),null;try{let e=(0,n.tV)(i);if(!e)return d("Failed to decode base64 JWT payload"),null;return JSON.parse(e)}catch(e){return d("Caught error parsing JWT payload as JSON",null==e?void 0:e.toString()),null}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function H(e,t,i=!1){if(i)return t;try{return await t}catch(t){throw t instanceof n.ZR&&function({code:e}){return"auth/user-disabled"===e||"auth/user-token-expired"===e}(t)&&e.auth.currentUser===e&&await e.auth.signOut(),t}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class W{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,null!==this.timerId&&clearTimeout(this.timerId))}getInterval(e){var t;if(!e)return this.errorBackoff=3e4,Math.max(0,(null!==(t=this.user.stsTokenManager.expirationTime)&&void 0!==t?t:0)-Date.now()-3e5);{let e=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),e}}schedule(e=!1){if(!this.isRunning)return;let t=this.getInterval(e);this.timerId=setTimeout(async()=>{await this.iteration()},t)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){(null==e?void 0:e.code)==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ${constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=V(this.lastLoginAt),this.creationTime=V(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function K(e){var t;let i=e.auth,r=await e.getIdToken(),n=await H(e,x(i,{idToken:r}));v(null==n?void 0:n.users.length,i,"internal-error");let s=n.users[0];e._notifyReloadListener(s);let a=(null===(t=s.providerUserInfo)||void 0===t?void 0:t.length)?s.providerUserInfo.map(e=>{var{providerId:t}=e,i=(0,o._T)(e,["providerId"]);return{providerId:t,uid:i.rawId||"",displayName:i.displayName||null,email:i.email||null,phoneNumber:i.phoneNumber||null,photoURL:i.photoUrl||null}}):[],l=[...e.providerData.filter(e=>!a.some(t=>t.providerId===e.providerId)),...a],c=e.isAnonymous,u=!(e.email&&s.passwordHash)&&!(null==l?void 0:l.length);Object.assign(e,{uid:s.localId,displayName:s.displayName||null,photoURL:s.photoUrl||null,email:s.email||null,emailVerified:s.emailVerified||!1,phoneNumber:s.phoneNumber||null,tenantId:s.tenantId||null,providerData:l,metadata:new $(s.createdAt,s.lastLoginAt),isAnonymous:!!c&&u})}async function q(e){let t=(0,n.m9)(e);await K(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function G(e,t){let i=await O(e,{},async()=>{let i=(0,n.xO)({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:r,apiKey:s}=e.config,a=b(e,r,"/v1/token",`key=${s}`),o=await e._getAdditionalHeaders();return o["Content-Type"]="application/x-www-form-urlencoded",E.fetch()(a,{method:"POST",headers:o,body:i})});return{accessToken:i.access_token,expiresIn:i.expires_in,refreshToken:i.refresh_token}}async function J(e,t){return P(e,"POST","/v2/accounts:revokeToken",R(e,t))}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class B{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){v(e.idToken,"internal-error"),v(void 0!==e.idToken,"internal-error"),v(void 0!==e.refreshToken,"internal-error");let t="expiresIn"in e&&void 0!==e.expiresIn?Number(e.expiresIn):function(e){let t=z(e);return v(t,"internal-error"),v(void 0!==t.exp,"internal-error"),v(void 0!==t.iat,"internal-error"),Number(t.exp)-Number(t.iat)}(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}async getToken(e,t=!1){return(v(!this.accessToken||this.refreshToken,e,"user-token-expired"),t||!this.accessToken||this.isExpired)?this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null:this.accessToken}clearRefreshToken(){this.refreshToken=null}async refresh(e,t){let{accessToken:i,refreshToken:r,expiresIn:n}=await G(e,t);this.updateTokensAndExpiration(i,r,Number(n))}updateTokensAndExpiration(e,t,i){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*i}static fromJSON(e,t){let{refreshToken:i,accessToken:r,expirationTime:n}=t,s=new B;return i&&(v("string"==typeof i,"internal-error",{appName:e}),s.refreshToken=i),r&&(v("string"==typeof r,"internal-error",{appName:e}),s.accessToken=r),n&&(v("number"==typeof n,"internal-error",{appName:e}),s.expirationTime=n),s}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new B,this.toJSON())}_performRefresh(){return _("not implemented")}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function X(e,t){v("string"==typeof e||void 0===e,"internal-error",{appName:t})}class Y{constructor(e){var{uid:t,auth:i,stsTokenManager:r}=e,n=(0,o._T)(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new W(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=t,this.auth=i,this.stsTokenManager=r,this.accessToken=r.accessToken,this.displayName=n.displayName||null,this.email=n.email||null,this.emailVerified=n.emailVerified||!1,this.phoneNumber=n.phoneNumber||null,this.photoURL=n.photoURL||null,this.isAnonymous=n.isAnonymous||!1,this.tenantId=n.tenantId||null,this.providerData=n.providerData?[...n.providerData]:[],this.metadata=new $(n.createdAt||void 0,n.lastLoginAt||void 0)}async getIdToken(e){let t=await H(this,this.stsTokenManager.getToken(this.auth,e));return v(t,this.auth,"internal-error"),this.accessToken!==t&&(this.accessToken=t,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),t}getIdTokenResult(e){return F(this,e)}reload(){return q(this)}_assign(e){this!==e&&(v(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,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(e=>Object.assign({},e)),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){let t=new Y(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return t.metadata._copy(this.metadata),t}_onReload(e){v(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e,t=!1){let i=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),i=!0),t&&await K(this),await this.auth._persistUserIfCurrent(this),i&&this.auth._notifyListenersIfCurrent(this)}async delete(){let e=await this.getIdToken();return await H(this,U(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){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(e=>Object.assign({},e)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,t){var i,r,n,s,a,o,l,c;let u=null!==(i=t.displayName)&&void 0!==i?i:void 0,h=null!==(r=t.email)&&void 0!==r?r:void 0,d=null!==(n=t.phoneNumber)&&void 0!==n?n:void 0,p=null!==(s=t.photoURL)&&void 0!==s?s:void 0,f=null!==(a=t.tenantId)&&void 0!==a?a:void 0,m=null!==(o=t._redirectEventId)&&void 0!==o?o:void 0,g=null!==(l=t.createdAt)&&void 0!==l?l:void 0,_=null!==(c=t.lastLoginAt)&&void 0!==c?c:void 0,{uid:I,emailVerified:w,isAnonymous:y,providerData:T,stsTokenManager:E}=t;v(I&&E,e,"internal-error");let k=B.fromJSON(this.name,E);v("string"==typeof I,e,"internal-error"),X(u,e.name),X(h,e.name),v("boolean"==typeof w,e,"internal-error"),v("boolean"==typeof y,e,"internal-error"),X(d,e.name),X(p,e.name),X(f,e.name),X(m,e.name),X(g,e.name),X(_,e.name);let S=new Y({uid:I,auth:e,email:h,emailVerified:w,displayName:u,isAnonymous:y,photoURL:p,phoneNumber:d,tenantId:f,stsTokenManager:k,createdAt:g,lastLoginAt:_});return T&&Array.isArray(T)&&(S.providerData=T.map(e=>Object.assign({},e))),m&&(S._redirectEventId=m),S}static async _fromIdTokenResponse(e,t,i=!1){let r=new B;r.updateFromServerResponse(t);let n=new Y({uid:t.localId,auth:e,stsTokenManager:r,isAnonymous:i});return await K(n),n}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let Q=new Map;function Z(e){e instanceof Function||_("Expected a class definition");let t=Q.get(e);return t?t instanceof e||_("Instance stored in cache mismatched with class"):(t=new e,Q.set(e,t)),t}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ee{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,t){this.storage[e]=t}async _get(e){let t=this.storage[e];return void 0===t?null:t}async _remove(e){delete this.storage[e]}_addListener(e,t){}_removeListener(e,t){}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function et(e,t,i){return`firebase:${e}:${t}:${i}`}ee.type="NONE";class ei{constructor(e,t,i){this.persistence=e,this.auth=t,this.userKey=i;let{config:r,name:n}=this.auth;this.fullUserKey=et(this.userKey,r.apiKey,n),this.fullPersistenceKey=et("persistence",r.apiKey,n),this.boundEventHandler=t._onStorageEvent.bind(t),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){let e=await this.persistence._get(this.fullUserKey);return e?Y._fromJSON(this.auth,e):null}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;let t=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=e,t)return this.setCurrentUser(t)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,t,i="authUser"){if(!t.length)return new ei(Z(ee),e,i);let r=(await Promise.all(t.map(async e=>{if(await e._isAvailable())return e}))).filter(e=>e),n=r[0]||Z(ee),s=et(i,e.config.apiKey,e.name),a=null;for(let i of t)try{let t=await i._get(s);if(t){let r=Y._fromJSON(e,t);i!==n&&(a=r),n=i;break}}catch(e){}let o=r.filter(e=>e._shouldAllowMigration);return n._shouldAllowMigration&&o.length&&(n=o[0],a&&await n._set(s,a.toJSON()),await Promise.all(t.map(async e=>{if(e!==n)try{await e._remove(s)}catch(e){}}))),new ei(n,e,i)}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function er(e){let t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(eo(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";{if(t.includes("edge/"))return"Edge";if(en(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(ec(t))return"Blackberry";if(eu(t))return"Webos";if(es(t))return"Safari";if((t.includes("chrome/")||ea(t))&&!t.includes("edge/"))return"Chrome";if(el(t))return"Android";let i=e.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/);if((null==i?void 0:i.length)===2)return i[1]}return"Other"}function en(e=(0,n.z$)()){return/firefox\//i.test(e)}function es(e=(0,n.z$)()){let t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function ea(e=(0,n.z$)()){return/crios\//i.test(e)}function eo(e=(0,n.z$)()){return/iemobile/i.test(e)}function el(e=(0,n.z$)()){return/android/i.test(e)}function ec(e=(0,n.z$)()){return/blackberry/i.test(e)}function eu(e=(0,n.z$)()){return/webos/i.test(e)}function eh(e=(0,n.z$)()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function ed(e=(0,n.z$)()){return eh(e)||el(e)||eu(e)||ec(e)||/windows phone/i.test(e)||eo(e)}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function ep(e,t=[]){let i;switch(e){case"Browser":i=er((0,n.z$)());break;case"Worker":i=`${er((0,n.z$)())}-${e}`;break;default:i=e}let r=t.length?t.join(","):"FirebaseCore-web";return`${i}/JsCore/${s.Jn}/${r}`}/** + * @license + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ef{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){let i=t=>new Promise((i,r)=>{try{let r=e(t);i(r)}catch(e){r(e)}});i.onAbort=t,this.queue.push(i);let r=this.queue.length-1;return()=>{this.queue[r]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;let t=[];try{for(let i of this.queue)await i(e),i.onAbort&&t.push(i.onAbort)}catch(e){for(let e of(t.reverse(),t))try{e()}catch(e){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:null==e?void 0:e.message})}}}/** + * @license + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function em(e,t={}){return P(e,"GET","/v2/passwordPolicy",R(e,t))}class eg{constructor(e){var t,i,r,n;let s=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=null!==(t=s.minPasswordLength)&&void 0!==t?t:6,s.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=s.maxPasswordLength),void 0!==s.containsLowercaseCharacter&&(this.customStrengthOptions.containsLowercaseLetter=s.containsLowercaseCharacter),void 0!==s.containsUppercaseCharacter&&(this.customStrengthOptions.containsUppercaseLetter=s.containsUppercaseCharacter),void 0!==s.containsNumericCharacter&&(this.customStrengthOptions.containsNumericCharacter=s.containsNumericCharacter),void 0!==s.containsNonAlphanumericCharacter&&(this.customStrengthOptions.containsNonAlphanumericCharacter=s.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,"ENFORCEMENT_STATE_UNSPECIFIED"===this.enforcementState&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=null!==(r=null===(i=e.allowedNonAlphanumericCharacters)||void 0===i?void 0:i.join(""))&&void 0!==r?r:"",this.forceUpgradeOnSignin=null!==(n=e.forceUpgradeOnSignin)&&void 0!==n&&n,this.schemaVersion=e.schemaVersion}validatePassword(e){var t,i,r,n,s,a;let o={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,o),this.validatePasswordCharacterOptions(e,o),o.isValid&&(o.isValid=null===(t=o.meetsMinPasswordLength)||void 0===t||t),o.isValid&&(o.isValid=null===(i=o.meetsMaxPasswordLength)||void 0===i||i),o.isValid&&(o.isValid=null===(r=o.containsLowercaseLetter)||void 0===r||r),o.isValid&&(o.isValid=null===(n=o.containsUppercaseLetter)||void 0===n||n),o.isValid&&(o.isValid=null===(s=o.containsNumericCharacter)||void 0===s||s),o.isValid&&(o.isValid=null===(a=o.containsNonAlphanumericCharacter)||void 0===a||a),o}validatePasswordLengthOptions(e,t){let i=this.customStrengthOptions.minPasswordLength,r=this.customStrengthOptions.maxPasswordLength;i&&(t.meetsMinPasswordLength=e.length>=i),r&&(t.meetsMaxPasswordLength=e.length<=r)}validatePasswordCharacterOptions(e,t){let i;this.updatePasswordCharacterOptionsStatuses(t,!1,!1,!1,!1);for(let r=0;r="a"&&i<="z",i>="A"&&i<="Z",i>="0"&&i<="9",this.allowedNonAlphanumericCharacters.includes(i))}updatePasswordCharacterOptionsStatuses(e,t,i,r,n){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=t)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=i)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=r)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=n))}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ev{constructor(e,t,i,r){this.app=e,this.heartbeatServiceProvider=t,this.appCheckServiceProvider=i,this.config=r,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new eI(this),this.idTokenSubscription=new eI(this),this.beforeStateQueue=new ef(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=u,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=r.sdkClientVersion}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=Z(t)),this._initializationPromise=this.queue(async()=>{var i,r;if(!this._deleted&&(this.persistenceManager=await ei.create(this,e),!this._deleted)){if(null===(i=this._popupRedirectResolver)||void 0===i?void 0:i._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch(e){}await this.initializeCurrentUser(t),this.lastNotifiedUid=(null===(r=this.currentUser)||void 0===r?void 0:r.uid)||null,this._deleted||(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;let e=await this.assertedPersistence.getCurrentUser();if(this.currentUser||e){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),await this.currentUser.getIdToken();return}await this._updateCurrentUser(e,!0)}}async initializeCurrentUser(e){var t;let i=await this.assertedPersistence.getCurrentUser(),r=i,n=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();let i=null===(t=this.redirectUser)||void 0===t?void 0:t._redirectEventId,s=null==r?void 0:r._redirectEventId,a=await this.tryRedirectSignIn(e);(!i||i===s)&&(null==a?void 0:a.user)&&(r=a.user,n=!0)}if(!r)return this.directlySetCurrentUser(null);if(!r._redirectEventId){if(n)try{await this.beforeStateQueue.runMiddleware(r)}catch(e){r=i,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(e))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return(v(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===r._redirectEventId)?this.directlySetCurrentUser(r):this.reloadAndSetCurrentUserOrClear(r)}async tryRedirectSignIn(e){let t=null;try{t=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch(e){await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){try{await K(e)}catch(e){if((null==e?void 0:e.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=function(){if("undefined"==typeof navigator)return null;let e=navigator;return e.languages&&e.languages[0]||e.language||null}()}async _delete(){this._deleted=!0}async updateCurrentUser(e){let t=e?(0,n.m9)(e):null;return t&&v(t.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(t&&t._clone(this))}async _updateCurrentUser(e,t=!1){if(!this._deleted)return e&&v(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),t||await this.beforeStateQueue.runMiddleware(e),this.queue(async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()})}async signOut(){return await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0)}setPersistence(e){return this.queue(async()=>{await this.assertedPersistence.setPersistence(Z(e))})}_getRecaptchaConfig(){return null==this.tenantId?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(e){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();let t=this._getPasswordPolicyInternal();return t.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):t.validatePassword(e)}_getPasswordPolicyInternal(){return null===this.tenantId?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){let e=new eg(await em(this));null===this.tenantId?this._projectPasswordPolicy=e:this._tenantPasswordPolicies[this.tenantId]=e}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new n.LL("auth","Firebase",e())}onAuthStateChanged(e,t,i){return this.registerStateListener(this.authStateSubscription,e,t,i)}beforeAuthStateChanged(e,t){return this.beforeStateQueue.pushCallback(e,t)}onIdTokenChanged(e,t,i){return this.registerStateListener(this.idTokenSubscription,e,t,i)}authStateReady(){return new Promise((e,t)=>{if(this.currentUser)e();else{let i=this.onAuthStateChanged(()=>{i(),e()},t)}})}async revokeAccessToken(e){if(this.currentUser){let t={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:e,idToken:await this.currentUser.getIdToken()};null!=this.tenantId&&(t.tenantId=this.tenantId),await J(this,t)}}toJSON(){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()}}async _setRedirectUser(e,t){let i=await this.getOrInitRedirectPersistenceManager(t);return null===e?i.removeCurrentUser():i.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){let t=e&&Z(e)||this._popupRedirectResolver;v(t,this,"argument-error"),this.redirectPersistenceManager=await ei.create(this,[Z(t._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var t,i;return(this._isInitialized&&await this.queue(async()=>{}),(null===(t=this._currentUser)||void 0===t?void 0:t._redirectEventId)===e)?this._currentUser:(null===(i=this.redirectUser)||void 0===i?void 0:i._redirectEventId)===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(e))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var e,t;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);let i=null!==(t=null===(e=this.currentUser)||void 0===e?void 0:e.uid)&&void 0!==t?t:null;this.lastNotifiedUid!==i&&(this.lastNotifiedUid=i,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,i,r){if(this._deleted)return()=>{};let n="function"==typeof t?t:t.next.bind(t),s=!1,a=this._isInitialized?Promise.resolve():this._initializationPromise;if(v(a,this,"internal-error"),a.then(()=>{s||n(this.currentUser)}),"function"==typeof t){let n=e.addObserver(t,i,r);return()=>{s=!0,n()}}{let i=e.addObserver(t);return()=>{s=!0,i()}}}async directlySetCurrentUser(e){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?await this.assertedPersistence.setCurrentUser(e):await this.assertedPersistence.removeCurrentUser()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return v(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=ep(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var e;let t={"X-Client-Version":this.clientVersion};this.app.options.appId&&(t["X-Firebase-gmpid"]=this.app.options.appId);let i=await (null===(e=this.heartbeatServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getHeartbeatsHeader());i&&(t["X-Firebase-Client"]=i);let r=await this._getAppCheckToken();return r&&(t["X-Firebase-AppCheck"]=r),t}async _getAppCheckToken(){var e;let t=await (null===(e=this.appCheckServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getToken());return(null==t?void 0:t.error)&&function(e,...t){h.logLevel<=a.in.WARN&&h.warn(`Auth (${s.Jn}): ${e}`,...t)}(`Error while retrieving App Check token: ${t.error}`),null==t?void 0:t.token}}function e_(e){return(0,n.m9)(e)}class eI{constructor(e){this.auth=e,this.observer=null,this.addObserver=(0,n.ne)(e=>this.observer=e)}get next(){return v(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let ew={async loadJS(){throw Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function ey(e){return`__${e}${Math.floor(1e6*Math.random())}`}class eT{constructor(e){this.type="recaptcha-enterprise",this.auth=e_(e)}async verify(e="verify",t=!1){async function i(e){if(!t){if(null==e.tenantId&&null!=e._agentRecaptchaConfig)return e._agentRecaptchaConfig.siteKey;if(null!=e.tenantId&&void 0!==e._tenantRecaptchaConfigs[e.tenantId])return e._tenantRecaptchaConfigs[e.tenantId].siteKey}return new Promise(async(t,i)=>{M(e,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(r=>{if(void 0===r.recaptchaKey)i(Error("recaptcha Enterprise site key undefined"));else{let i=new D(r);return null==e.tenantId?e._agentRecaptchaConfig=i:e._tenantRecaptchaConfigs[e.tenantId]=i,t(i.siteKey)}}).catch(e=>{i(e)})})}function r(t,i,r){let n=window.grecaptcha;L(n)?n.enterprise.ready(()=>{n.enterprise.execute(t,{action:e}).then(e=>{i(e)}).catch(()=>{i("NO_RECAPTCHA")})}):r(Error("No reCAPTCHA enterprise script loaded."))}return new Promise((e,n)=>{i(this.auth).then(i=>{if(!t&&L(window.grecaptcha))r(i,e,n);else{var s;if("undefined"==typeof window){n(Error("RecaptchaVerifier is only supported in browser"));return}let t=ew.recaptchaEnterpriseScript;0!==t.length&&(t+=i),(s=t,ew.loadJS(s)).then(()=>{r(i,e,n)}).catch(e=>{n(e)})}}).catch(e=>{n(e)})})}}async function eE(e,t,i,r=!1){let n;let s=new eT(e);try{n=await s.verify(i)}catch(e){n=await s.verify(i,!0)}let a=Object.assign({},t);return r?Object.assign(a,{captchaResp:n}):Object.assign(a,{captchaResponse:n}),Object.assign(a,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(a,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),a}async function ek(e,t,i,r){var n;if(null===(n=e._getRecaptchaConfig())||void 0===n||!n.isProviderEnabled("EMAIL_PASSWORD_PROVIDER"))return r(e,t).catch(async n=>{if("auth/missing-recaptcha-token"!==n.code)return Promise.reject(n);{console.log(`${i} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);let n=await eE(e,t,i,"getOobCode"===i);return r(e,n)}});{let n=await eE(e,t,i,"getOobCode"===i);return r(e,n)}}function eS(e){let t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function eR(e){if(!e)return null;let t=Number(e);return isNaN(t)?null:t}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class eP{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return _("not implemented")}_getIdTokenResponse(e){return _("not implemented")}_linkToIdToken(e,t){return _("not implemented")}_getReauthenticationResolver(e){return _("not implemented")}}async function eO(e,t){return P(e,"POST","/v1/accounts:signUp",t)}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function eC(e,t){return C(e,"POST","/v1/accounts:signInWithPassword",R(e,t))}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function eb(e,t){return C(e,"POST","/v1/accounts:signInWithEmailLink",R(e,t))}async function eN(e,t){return C(e,"POST","/v1/accounts:signInWithEmailLink",R(e,t))}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class eA extends eP{constructor(e,t,i,r=null){super("password",i),this._email=e,this._password=t,this._tenantId=r}static _fromEmailAndPassword(e,t){return new eA(e,t,"password")}static _fromEmailAndCode(e,t,i=null){return new eA(e,t,"emailLink",i)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){let t="string"==typeof e?JSON.parse(e):e;if((null==t?void 0:t.email)&&(null==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}async _getIdTokenResponse(e){switch(this.signInMethod){case"password":return ek(e,{returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signInWithPassword",eC);case"emailLink":return eb(e,{email:this._email,oobCode:this._password});default:p(e,"internal-error")}}async _linkToIdToken(e,t){switch(this.signInMethod){case"password":return ek(e,{idToken:t,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",eO);case"emailLink":return eN(e,{idToken:t,email:this._email,oobCode:this._password});default:p(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function eL(e,t){return C(e,"POST","/v1/accounts:signInWithIdp",R(e,t))}class eD extends eP{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){let t=new eD(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):p("argument-error"),t}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){let t="string"==typeof e?JSON.parse(e):e,{providerId:i,signInMethod:r}=t,n=(0,o._T)(t,["providerId","signInMethod"]);if(!i||!r)return null;let s=new eD(i,r);return s.idToken=n.idToken||void 0,s.accessToken=n.accessToken||void 0,s.secret=n.secret,s.nonce=n.nonce,s.pendingToken=n.pendingToken||null,s}_getIdTokenResponse(e){return eL(e,this.buildRequest())}_linkToIdToken(e,t){let i=this.buildRequest();return i.idToken=t,eL(e,i)}_getReauthenticationResolver(e){let t=this.buildRequest();return t.autoCreate=!1,eL(e,t)}buildRequest(){let e={requestUri:"http://localhost",returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{let 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=(0,n.xO)(t)}return e}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function eM(e,t){return P(e,"POST","/v1/accounts:sendVerificationCode",R(e,t))}async function eU(e,t){return C(e,"POST","/v1/accounts:signInWithPhoneNumber",R(e,t))}async function ex(e,t){let i=await C(e,"POST","/v1/accounts:signInWithPhoneNumber",R(e,t));if(i.temporaryProof)throw A(e,"account-exists-with-different-credential",i);return i}let eV={USER_NOT_FOUND:"user-not-found"};async function eF(e,t){return C(e,"POST","/v1/accounts:signInWithPhoneNumber",R(e,Object.assign(Object.assign({},t),{operation:"REAUTH"})),eV)}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ej extends eP{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,t){return new ej({verificationId:e,verificationCode:t})}static _fromTokenResponse(e,t){return new ej({phoneNumber:e,temporaryProof:t})}_getIdTokenResponse(e){return eU(e,this._makeVerificationRequest())}_linkToIdToken(e,t){return ex(e,Object.assign({idToken:t},this._makeVerificationRequest()))}_getReauthenticationResolver(e){return eF(e,this._makeVerificationRequest())}_makeVerificationRequest(){let{temporaryProof:e,phoneNumber:t,verificationId:i,verificationCode:r}=this.params;return e&&t?{temporaryProof:e,phoneNumber:t}:{sessionInfo:i,code:r}}toJSON(){let 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}static fromJSON(e){"string"==typeof e&&(e=JSON.parse(e));let{verificationId:t,verificationCode:i,phoneNumber:r,temporaryProof:n}=e;return i||t||r||n?new ej({verificationId:t,verificationCode:i,phoneNumber:r,temporaryProof:n}):null}}class ez{constructor(e){var t,i,r,s,a,o;let l=(0,n.zd)((0,n.pd)(e)),c=null!==(t=l.apiKey)&&void 0!==t?t:null,u=null!==(i=l.oobCode)&&void 0!==i?i:null,h=/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function(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!==(r=l.mode)&&void 0!==r?r:null);v(c&&u&&h,"argument-error"),this.apiKey=c,this.operation=h,this.code=u,this.continueUrl=null!==(s=l.continueUrl)&&void 0!==s?s:null,this.languageCode=null!==(a=l.languageCode)&&void 0!==a?a:null,this.tenantId=null!==(o=l.tenantId)&&void 0!==o?o:null}static parseLink(e){let t=function(e){let t=(0,n.zd)((0,n.pd)(e)).link,i=t?(0,n.zd)((0,n.pd)(t)).deep_link_id:null,r=(0,n.zd)((0,n.pd)(e)).deep_link_id;return(r?(0,n.zd)((0,n.pd)(r)).link:null)||r||i||t||e}(e);try{return new ez(t)}catch(e){return null}}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class eH{constructor(){this.providerId=eH.PROVIDER_ID}static credential(e,t){return eA._fromEmailAndPassword(e,t)}static credentialWithLink(e,t){let i=ez.parseLink(t);return v(i,"argument-error"),eA._fromEmailAndCode(e,i.code,i.tenantId)}}eH.PROVIDER_ID="password",eH.EMAIL_PASSWORD_SIGN_IN_METHOD="password",eH.EMAIL_LINK_SIGN_IN_METHOD="emailLink";/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class eW{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class e$ extends eW{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class eK extends e${constructor(){super("facebook.com")}static credential(e){return eD._fromParams({providerId:eK.PROVIDER_ID,signInMethod:eK.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return eK.credentialFromTaggedObject(e)}static credentialFromError(e){return eK.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return eK.credential(e.oauthAccessToken)}catch(e){return null}}}eK.FACEBOOK_SIGN_IN_METHOD="facebook.com",eK.PROVIDER_ID="facebook.com";/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class eq extends e${constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return eD._fromParams({providerId:eq.PROVIDER_ID,signInMethod:eq.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return eq.credentialFromTaggedObject(e)}static credentialFromError(e){return eq.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthIdToken:t,oauthAccessToken:i}=e;if(!t&&!i)return null;try{return eq.credential(t,i)}catch(e){return null}}}eq.GOOGLE_SIGN_IN_METHOD="google.com",eq.PROVIDER_ID="google.com";/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class eG extends e${constructor(){super("github.com")}static credential(e){return eD._fromParams({providerId:eG.PROVIDER_ID,signInMethod:eG.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return eG.credentialFromTaggedObject(e)}static credentialFromError(e){return eG.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return eG.credential(e.oauthAccessToken)}catch(e){return null}}}eG.GITHUB_SIGN_IN_METHOD="github.com",eG.PROVIDER_ID="github.com";/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class eJ extends e${constructor(){super("twitter.com")}static credential(e,t){return eD._fromParams({providerId:eJ.PROVIDER_ID,signInMethod:eJ.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return eJ.credentialFromTaggedObject(e)}static credentialFromError(e){return eJ.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthAccessToken:t,oauthTokenSecret:i}=e;if(!t||!i)return null;try{return eJ.credential(t,i)}catch(e){return null}}}eJ.TWITTER_SIGN_IN_METHOD="twitter.com",eJ.PROVIDER_ID="twitter.com";/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class eB{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,t,i,r=!1){return new eB({user:await Y._fromIdTokenResponse(e,i,r),providerId:eX(i),_tokenResponse:i,operationType:t})}static async _forOperation(e,t,i){return await e._updateTokensIfNecessary(i,!0),new eB({user:e,providerId:eX(i),_tokenResponse:i,operationType:t})}}function eX(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class eY extends n.ZR{constructor(e,t,i,r){var n;super(t.code,t.message),this.operationType=i,this.user=r,Object.setPrototypeOf(this,eY.prototype),this.customData={appName:e.name,tenantId:null!==(n=e.tenantId)&&void 0!==n?n:void 0,_serverResponse:t.customData._serverResponse,operationType:i}}static _fromErrorAndOperation(e,t,i,r){return new eY(e,t,i,r)}}function eQ(e,t,i,r){return("reauthenticate"===t?i._getReauthenticationResolver(e):i._getIdTokenResponse(e)).catch(i=>{if("auth/multi-factor-auth-required"===i.code)throw eY._fromErrorAndOperation(e,i,t,r);throw i})}async function eZ(e,t,i=!1){let r=await H(e,t._linkToIdToken(e.auth,await e.getIdToken()),i);return eB._forOperation(e,"link",r)}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function e0(e,t,i=!1){let{auth:r}=e,n="reauthenticate";try{let s=await H(e,eQ(r,n,t,e),i);v(s.idToken,r,"internal-error");let a=z(s.idToken);v(a,r,"internal-error");let{sub:o}=a;return v(e.uid===o,r,"user-mismatch"),eB._forOperation(e,n,s)}catch(e){throw(null==e?void 0:e.code)==="auth/user-not-found"&&p(r,"user-mismatch"),e}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function e1(e,t,i=!1){let r="signIn",n=await eQ(e,r,t),s=await eB._fromIdTokenResponse(e,r,n);return i||await e._updateCurrentUser(s.user),s}function e3(e){return(0,n.m9)(e).signOut()}new WeakMap;let e2="__sak";/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class e4{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{if(!this.storage)return Promise.resolve(!1);return this.storage.setItem(e2,"1"),this.storage.removeItem(e2),Promise.resolve(!0)}catch(e){return Promise.resolve(!1)}}_set(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}_get(e){let t=this.storage.getItem(e);return Promise.resolve(t?JSON.parse(t):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}class e5 extends e4{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function(){let e=(0,n.z$)();return es(e)||eh(e)}()&&function(){try{return!!(window&&window!==window.top)}catch(e){return!1}}(),this.fallbackToPolling=ed(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(let t of Object.keys(this.listeners)){let i=this.storage.getItem(t),r=this.localCache[t];i!==r&&e(t,r,i)}}onStorageEvent(e,t=!1){if(!e.key){this.forAllChangedKeys((e,t,i)=>{this.notifyListeners(e,i)});return}let i=e.key;if(t?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){let r=this.storage.getItem(i);if(e.newValue!==r)null!==e.newValue?this.storage.setItem(i,e.newValue):this.storage.removeItem(i);else if(this.localCache[i]===e.newValue&&!t)return}let r=()=>{let e=this.storage.getItem(i);(t||this.localCache[i]!==e)&&this.notifyListeners(i,e)},s=this.storage.getItem(i);(0,n.w1)()&&10===document.documentMode&&s!==e.newValue&&e.newValue!==e.oldValue?setTimeout(r,10):r()}notifyListeners(e,t){this.localCache[e]=t;let i=this.listeners[e];if(i)for(let e of Array.from(i))e(t?JSON.parse(t):t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,t,i)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:t,newValue:i}),!0)})},1e3)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(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)}_removeListener(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())}async _set(e,t){await super._set(e,t),this.localCache[e]=JSON.stringify(t)}async _get(e){let t=await super._get(e);return this.localCache[e]=JSON.stringify(t),t}async _remove(e){await super._remove(e),delete this.localCache[e]}}e5.type="LOCAL";/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class e9 extends e4{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,t){}_removeListener(e,t){}}e9.type="SESSION";/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class e6{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){let t=this.receivers.find(t=>t.isListeningto(e));if(t)return t;let i=new e6(e);return this.receivers.push(i),i}isListeningto(e){return this.eventTarget===e}async handleEvent(e){let{eventId:t,eventType:i,data:r}=e.data,n=this.handlersMap[i];if(!(null==n?void 0:n.size))return;e.ports[0].postMessage({status:"ack",eventId:t,eventType:i});let s=Array.from(n).map(async t=>t(e.origin,r)),a=await Promise.all(s.map(async e=>{try{let t=await e;return{fulfilled:!0,value:t}}catch(e){return{fulfilled:!1,reason:e}}}));e.ports[0].postMessage({status:"done",eventId:t,eventType:i,response:a})}_subscribe(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)}_unsubscribe(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)}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function e8(e="",t=10){let i="";for(let e=0;e{let l=e8("",20);s.port1.start();let c=setTimeout(()=>{o(Error("unsupported_event"))},i);n={messageChannel:s,onMessage(e){if(e.data.eventId===l)switch(e.data.status){case"ack":clearTimeout(c),r=setTimeout(()=>{o(Error("timeout"))},3e3);break;case"done":clearTimeout(r),a(e.data.response);break;default:clearTimeout(c),clearTimeout(r),o(Error("invalid_response"))}}},this.handlers.add(n),s.port1.addEventListener("message",n.onMessage),this.target.postMessage({eventType:e,eventId:l,data:t},[s.port2])}).finally(()=>{n&&this.removeMessageHandler(n)})}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function te(){return window}/** + * @license + * Copyright 2020 Google LLC. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function tt(){return void 0!==te().WorkerGlobalScope&&"function"==typeof te().importScripts}async function ti(){if(!(null==navigator?void 0:navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch(e){return null}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let tr="firebaseLocalStorageDb",tn="firebaseLocalStorage",ts="fbase_key";class ta{constructor(e){this.request=e}toPromise(){return new Promise((e,t)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{t(this.request.error)})})}}function to(e,t){return e.transaction([tn],t?"readwrite":"readonly").objectStore(tn)}function tl(){let e=indexedDB.open(tr,1);return new Promise((t,i)=>{e.addEventListener("error",()=>{i(e.error)}),e.addEventListener("upgradeneeded",()=>{let t=e.result;try{t.createObjectStore(tn,{keyPath:ts})}catch(e){i(e)}}),e.addEventListener("success",async()=>{let i=e.result;i.objectStoreNames.contains(tn)?t(i):(i.close(),await new ta(indexedDB.deleteDatabase(tr)).toPromise(),t(await tl()))})})}async function tc(e,t,i){return new ta(to(e,!0).put({[ts]:t,value:i})).toPromise()}async function tu(e,t){let i=to(e,!1).get(t),r=await new ta(i).toPromise();return void 0===r?null:r.value}function th(e,t){return new ta(to(e,!0).delete(t)).toPromise()}class td{constructor(){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(()=>{},()=>{})}async _openDb(){return this.db||(this.db=await tl()),this.db}async _withRetries(e){let t=0;for(;;)try{let t=await this._openDb();return await e(t)}catch(e){if(t++>3)throw e;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return tt()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=e6._getInstance(tt()?self:null),this.receiver._subscribe("keyChanged",async(e,t)=>({keyProcessed:(await this._poll()).includes(t.key)})),this.receiver._subscribe("ping",async(e,t)=>["keyChanged"])}async initializeSender(){var e,t;if(this.activeServiceWorker=await ti(),!this.activeServiceWorker)return;this.sender=new e7(this.activeServiceWorker);let i=await this.sender._send("ping",{},800);i&&(null===(e=i[0])||void 0===e?void 0:e.fulfilled)&&(null===(t=i[0])||void 0===t?void 0:t.value.includes("keyChanged"))&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){var t;if(this.sender&&this.activeServiceWorker&&((null===(t=null==navigator?void 0:navigator.serviceWorker)||void 0===t?void 0:t.controller)||null)===this.activeServiceWorker)try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch(e){}}async _isAvailable(){try{if(!indexedDB)return!1;let e=await tl();return await tc(e,e2,"1"),await th(e,e2),!0}catch(e){}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite(async()=>(await this._withRetries(i=>tc(i,e,t)),this.localCache[e]=t,this.notifyServiceWorker(e)))}async _get(e){let t=await this._withRetries(t=>tu(t,e));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(t=>th(t,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){let e=await this._withRetries(e=>new ta(to(e,!1).getAll()).toPromise());if(!e||0!==this.pendingWrites)return[];let t=[],i=new Set;if(0!==e.length)for(let{fbase_key:r,value:n}of e)i.add(r),JSON.stringify(this.localCache[r])!==JSON.stringify(n)&&(this.notifyListeners(r,n),t.push(r));for(let e of Object.keys(this.localCache))this.localCache[e]&&!i.has(e)&&(this.notifyListeners(e,null),t.push(e));return t}notifyListeners(e,t){this.localCache[e]=t;let i=this.listeners[e];if(i)for(let e of Array.from(i))e(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),800)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(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)}_removeListener(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()}}async function tp(e,t,i){var r,n,s;let a=await i.verify();try{let o;if(v("string"==typeof a,e,"argument-error"),v("recaptcha"===i.type,e,"argument-error"),o="string"==typeof t?{phoneNumber:t}:t,"session"in o){let t=o.session;if("phoneNumber"in o)return v("enroll"===t.type,e,"internal-error"),(await (n={idToken:t.credential,phoneEnrollmentInfo:{phoneNumber:o.phoneNumber,recaptchaToken:a}},P(e,"POST","/v2/accounts/mfaEnrollment:start",R(e,n)))).phoneSessionInfo.sessionInfo;{v("signin"===t.type,e,"internal-error");let i=(null===(r=o.multiFactorHint)||void 0===r?void 0:r.uid)||o.multiFactorUid;return v(i,e,"missing-multi-factor-info"),(await (s={mfaPendingCredential:t.credential,mfaEnrollmentId:i,phoneSignInInfo:{recaptchaToken:a}},P(e,"POST","/v2/accounts/mfaSignIn:start",R(e,s)))).phoneResponseInfo.sessionInfo}}{let{sessionInfo:t}=await eM(e,{phoneNumber:o.phoneNumber,recaptchaToken:a});return t}}finally{i._reset()}}td.type="LOCAL",ey("rcb"),new y(3e4,6e4);/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class tf{constructor(e){this.providerId=tf.PROVIDER_ID,this.auth=e_(e)}verifyPhoneNumber(e,t){return tp(this.auth,e,(0,n.m9)(t))}static credential(e,t){return ej._fromVerification(e,t)}static credentialFromResult(e){return tf.credentialFromTaggedObject(e)}static credentialFromError(e){return tf.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{phoneNumber:t,temporaryProof:i}=e;return t&&i?ej._fromTokenResponse(t,i):null}}/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function tm(e,t){return t?Z(t):(v(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}tf.PROVIDER_ID="phone",tf.PHONE_SIGN_IN_METHOD="phone";/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class tg extends eP{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return eL(e,this._buildIdpRequest())}_linkToIdToken(e,t){return eL(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return eL(e,this._buildIdpRequest())}_buildIdpRequest(e){let 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}}function tv(e){return e1(e.auth,new tg(e),e.bypassAuthState)}function t_(e){let{auth:t,user:i}=e;return v(i,t,"internal-error"),e0(i,new tg(e),e.bypassAuthState)}async function tI(e){let{auth:t,user:i}=e;return v(i,t,"internal-error"),eZ(i,new tg(e),e.bypassAuthState)}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class tw{constructor(e,t,i,r,n=!1){this.auth=e,this.resolver=i,this.user=r,this.bypassAuthState=n,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(t)?t:[t]}execute(){return new Promise(async(e,t)=>{this.pendingPromise={resolve:e,reject:t};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(e){this.reject(e)}})}async onAuthEvent(e){let{urlResponse:t,sessionId:i,postBody:r,tenantId:n,error:s,type:a}=e;if(s){this.reject(s);return}let o={auth:this.auth,requestUri:t,sessionId:i,tenantId:n||void 0,postBody:r||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(a)(o))}catch(e){this.reject(e)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return tv;case"linkViaPopup":case"linkViaRedirect":return tI;case"reauthViaPopup":case"reauthViaRedirect":return t_;default:p(this.auth,"internal-error")}}resolve(e){this.pendingPromise||_("Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){this.pendingPromise||_("Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let ty=new y(2e3,1e4);async function tT(e,t,i){let r=e_(e);!function(e,t,i){if(!(t instanceof i))throw i.name!==t.constructor.name&&p(e,"argument-error"),m(e,"argument-error",`Type of ${t.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}(e,t,eW);let n=tm(r,i);return new tE(r,"signInViaPopup",t,n).executeNotNull()}class tE extends tw{constructor(e,t,i,r,n){super(e,t,r,n),this.provider=i,this.authWindow=null,this.pollId=null,tE.currentPopupAction&&tE.currentPopupAction.cancel(),tE.currentPopupAction=this}async executeNotNull(){let e=await this.execute();return v(e,this.auth,"internal-error"),e}async onExecution(){1===this.filter.length||_("Popup operations only handle one event");let e=e8();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch(e=>{this.reject(e)}),this.resolver._isIframeWebStorageSupported(this.auth,e=>{e||this.reject(f(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){var e;return(null===(e=this.authWindow)||void 0===e?void 0:e.associatedEvent)||null}cancel(){this.reject(f(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,tE.currentPopupAction=null}pollUserCancellation(){let e=()=>{var t,i;if(null===(i=null===(t=this.authWindow)||void 0===t?void 0:t.window)||void 0===i?void 0:i.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(f(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(e,ty.get())};e()}}tE.currentPopupAction=null;let tk=new Map;class tS extends tw{constructor(e,t,i=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,i),this.eventId=null}async execute(){let e=tk.get(this.auth._key());if(!e){try{let t=await tR(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(t)}catch(t){e=()=>Promise.reject(t)}tk.set(this.auth._key(),e)}return this.bypassAuthState||tk.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if("signInViaRedirect"===e.type)return super.onAuthEvent(e);if("unknown"===e.type){this.resolve(null);return}if(e.eventId){let t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function tR(e,t){let i=et("pendingRedirect",t.config.apiKey,t.name),r=Z(e._redirectPersistence);if(!await r._isAvailable())return!1;let n=await r._get(i)==="true";return await r._remove(i),n}function tP(e,t){tk.set(e._key(),t)}async function tO(e,t,i=!1){let r=e_(e),n=tm(r,t),s=new tS(r,n,i),a=await s.execute();return a&&!i&&(delete a.user._redirectEventId,await r._persistUserIfCurrent(a.user),await r._setRedirectUser(null,t)),a}class tC{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let t=!1;return this.consumers.forEach(i=>{this.isEventForConsumer(e,i)&&(t=!0,this.sendToConsumer(e,i),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!function(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return tN(e);default:return!1}}(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){var i;if(e.error&&!tN(e)){let r=(null===(i=e.error.code)||void 0===i?void 0:i.split("auth/")[1])||"internal-error";t.onError(f(this.auth,r))}else t.onAuthEvent(e)}isEventForConsumer(e,t){let i=null===t.eventId||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&i}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(tb(e))}saveEventToCache(e){this.cachedEventUids.add(tb(e)),this.lastProcessedEventTime=Date.now()}}function tb(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter(e=>e).join("-")}function tN({type:e,error:t}){return"unknown"===e&&(null==t?void 0:t.code)==="auth/no-auth-event"}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function tA(e,t={}){return P(e,"GET","/v1/projects",t)}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let tL=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,tD=/^https?/;async function tM(e){if(e.config.emulator)return;let{authorizedDomains:t}=await tA(e);for(let e of t)try{if(function(e){let t=I(),{protocol:i,hostname:r}=new URL(t);if(e.startsWith("chrome-extension://")){let n=new URL(e);return""===n.hostname&&""===r?"chrome-extension:"===i&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):"chrome-extension:"===i&&n.hostname===r}if(!tD.test(i))return!1;if(tL.test(e))return r===e;let n=e.replace(/\./g,"\\.");return RegExp("^(.+\\."+n+"|"+n+")$","i").test(r)}(e))return}catch(e){}p(e,"unauthorized-domain")}/** + * @license + * Copyright 2020 Google LLC. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let tU=new y(3e4,6e4);function tx(){let e=te().___jsl;if(null==e?void 0:e.H){for(let t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let t=0;t{var r,n,s,a;function o(){tx(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{tx(),i(f(e,"network-request-failed"))},timeout:tU.get()})}if(null===(n=null===(r=te().gapi)||void 0===r?void 0:r.iframes)||void 0===n?void 0:n.Iframe)t(gapi.iframes.getContext());else if(null===(s=te().gapi)||void 0===s?void 0:s.load)o();else{let t=ey("iframefcb");return te()[t]=()=>{gapi.load?o():i(f(e,"network-request-failed"))},(a=`${ew.gapiScript}?onload=${t}`,ew.loadJS(a)).catch(e=>i(e))}}).catch(e=>{throw tV=null,e})),i=te().gapi;return v(i,e,"internal-error"),t.open({where:document.body,url:function(e){let t=e.config;v(t.authDomain,e,"auth-domain-config-required");let i=t.emulator?T(t,"emulator/auth/iframe"):`https://${e.config.authDomain}/__/auth/iframe`,r={apiKey:t.apiKey,appName:e.name,v:s.Jn},a=tz.get(e.config.apiHost);a&&(r.eid=a);let o=e._getFrameworks();return o.length&&(r.fw=o.join(",")),`${i}?${(0,n.xO)(r).slice(1)}`}(e),messageHandlersFilter:i.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:tj,dontclear:!0},t=>new Promise(async(i,r)=>{await t.restyle({setHideOnLeave:!1});let n=f(e,"network-request-failed"),s=te().setTimeout(()=>{r(n)},tF.get());function a(){te().clearTimeout(s),i(t)}t.ping(a).then(a,()=>{r(n)})}))}/** + * @license + * Copyright 2020 Google LLC. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let tW={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class t${constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(e){}}}let tK=encodeURIComponent("fac");async function tq(e,t,i,r,a,o){v(e.config.authDomain,e,"auth-domain-config-required"),v(e.config.apiKey,e,"invalid-api-key");let l={apiKey:e.config.apiKey,appName:e.name,authType:i,redirectUrl:r,v:s.Jn,eventId:a};if(t instanceof eW)for(let[i,r]of(t.setDefaultLanguage(e.languageCode),l.providerId=t.providerId||"",(0,n.xb)(t.getCustomParameters())||(l.customParameters=JSON.stringify(t.getCustomParameters())),Object.entries(o||{})))l[i]=r;if(t instanceof e$){let e=t.getScopes().filter(e=>""!==e);e.length>0&&(l.scopes=e.join(","))}for(let t of(e.tenantId&&(l.tid=e.tenantId),Object.keys(l)))void 0===l[t]&&delete l[t];let c=await e._getAppCheckToken(),u=c?`#${tK}=${encodeURIComponent(c)}`:"";return`${function({config:e}){return e.emulator?T(e,"emulator/auth/handler"):`https://${e.authDomain}/__/auth/handler`}(e)}?${(0,n.xO)(l).slice(1)}${u}`}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let tG="webStorageSupport";class tJ{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=e9,this._completeRedirectFn=tO,this._overrideRedirectResult=tP}async _openPopup(e,t,i,r){var s;(null===(s=this.eventManagers[e._key()])||void 0===s?void 0:s.manager)||_("_initialize() not called before _openPopup()");let a=await tq(e,t,i,I(),r);return function(e,t,i,r=500,s=600){let a=Math.max((window.screen.availHeight-s)/2,0).toString(),o=Math.max((window.screen.availWidth-r)/2,0).toString(),l="",c=Object.assign(Object.assign({},tW),{width:r.toString(),height:s.toString(),top:a,left:o}),u=(0,n.z$)().toLowerCase();i&&(l=ea(u)?"_blank":i),en(u)&&(t=t||"http://localhost",c.scrollbars="yes");let h=Object.entries(c).reduce((e,[t,i])=>`${e}${t}=${i},`,"");if(function(e=(0,n.z$)()){var t;return eh(e)&&!!(null===(t=window.navigator)||void 0===t?void 0:t.standalone)}(u)&&"_self"!==l)return function(e,t){let i=document.createElement("a");i.href=e,i.target=t;let r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),i.dispatchEvent(r)}(t||"",l),new t$(null);let d=window.open(t||"",l,h);v(d,e,"popup-blocked");try{d.focus()}catch(e){}return new t$(d)}(e,a,e8())}async _openRedirect(e,t,i,r){var n;return await this._originValidation(e),n=await tq(e,t,i,I(),r),te().location.href=n,new Promise(()=>{})}_initialize(e){let t=e._key();if(this.eventManagers[t]){let{manager:e,promise:i}=this.eventManagers[t];return e?Promise.resolve(e):(i||_("If manager is not set, promise should be"),i)}let i=this.initAndGetManager(e);return this.eventManagers[t]={promise:i},i.catch(()=>{delete this.eventManagers[t]}),i}async initAndGetManager(e){let t=await tH(e),i=new tC(e);return t.register("authEvent",t=>(v(null==t?void 0:t.authEvent,e,"invalid-auth-event"),{status:i.onEvent(t.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:i},this.iframes[e._key()]=t,i}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(tG,{type:tG},i=>{var r;let n=null===(r=null==i?void 0:i[0])||void 0===r?void 0:r[tG];void 0!==n&&t(!!n),p(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){let t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=tM(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return ed()||es()||eh()}}class tB{constructor(e){this.factorId=e}_process(e,t,i){switch(t.type){case"enroll":return this._finalizeEnroll(e,t.credential,i);case"signin":return this._finalizeSignIn(e,t.credential);default:return _("unexpected MultiFactorSessionType")}}}class tX extends tB{constructor(e){super("phone"),this.credential=e}static _fromCredential(e){return new tX(e)}_finalizeEnroll(e,t,i){return P(e,"POST","/v2/accounts/mfaEnrollment:finalize",R(e,{idToken:t,displayName:i,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}_finalizeSignIn(e,t){return P(e,"POST","/v2/accounts/mfaSignIn:finalize",R(e,{mfaPendingCredential:t,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}}class tY{constructor(){}static assertion(e){return tX._fromCredential(e)}}tY.FACTOR_ID="phone";class tQ{static assertionForEnrollment(e,t){return tZ._fromSecret(e,t)}static assertionForSignIn(e,t){return tZ._fromEnrollmentId(e,t)}static async generateSecret(e){var t,i;v(void 0!==(null===(t=e.user)||void 0===t?void 0:t.auth),"internal-error");let r=await P(i=e.user.auth,"POST","/v2/accounts/mfaEnrollment:start",R(i,{idToken:e.credential,totpEnrollmentInfo:{}}));return t0._fromStartTotpMfaEnrollmentResponse(r,e.user.auth)}}tQ.FACTOR_ID="totp";class tZ extends tB{constructor(e,t,i){super("totp"),this.otp=e,this.enrollmentId=t,this.secret=i}static _fromSecret(e,t){return new tZ(t,void 0,e)}static _fromEnrollmentId(e,t){return new tZ(t,e)}async _finalizeEnroll(e,t,i){return v(void 0!==this.secret,e,"argument-error"),P(e,"POST","/v2/accounts/mfaEnrollment:finalize",R(e,{idToken:t,displayName:i,totpVerificationInfo:this.secret._makeTotpVerificationInfo(this.otp)}))}async _finalizeSignIn(e,t){v(void 0!==this.enrollmentId&&void 0!==this.otp,e,"argument-error");let i={verificationCode:this.otp};return P(e,"POST","/v2/accounts/mfaSignIn:finalize",R(e,{mfaPendingCredential:t,mfaEnrollmentId:this.enrollmentId,totpVerificationInfo:i}))}}class t0{constructor(e,t,i,r,n,s,a){this.sessionInfo=s,this.auth=a,this.secretKey=e,this.hashingAlgorithm=t,this.codeLength=i,this.codeIntervalSeconds=r,this.enrollmentCompletionDeadline=n}static _fromStartTotpMfaEnrollmentResponse(e,t){return new t0(e.totpSessionInfo.sharedSecretKey,e.totpSessionInfo.hashingAlgorithm,e.totpSessionInfo.verificationCodeLength,e.totpSessionInfo.periodSec,new Date(e.totpSessionInfo.finalizeEnrollmentTime).toUTCString(),e.totpSessionInfo.sessionInfo,t)}_makeTotpVerificationInfo(e){return{sessionInfo:this.sessionInfo,verificationCode:e}}generateQrCodeUrl(e,t){var i;let r=!1;return(t1(e)||t1(t))&&(r=!0),r&&(t1(e)&&(e=(null===(i=this.auth.currentUser)||void 0===i?void 0:i.email)||"unknownuser"),t1(t)&&(t=this.auth.name)),`otpauth://totp/${t}:${e}?secret=${this.secretKey}&issuer=${t}&algorithm=${this.hashingAlgorithm}&digits=${this.codeLength}`}}function t1(e){return void 0===e||(null==e?void 0:e.length)===0}var t3="@firebase/auth",t2="1.6.0";/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class t4{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),(null===(e=this.auth.currentUser)||void 0===e?void 0:e.uid)||null}async getToken(e){return(this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser)?{accessToken:await this.auth.currentUser.getIdToken(e)}:null}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;let t=this.auth.onIdTokenChanged(t=>{e((null==t?void 0:t.stsTokenManager.accessToken)||null)});this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();let t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){v(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}let t5=(0,n.Pz)("authIdTokenMaxAge")||300,t9=null,t6=e=>async t=>{let i=t&&await t.getIdTokenResult(),r=i&&(new Date().getTime()-Date.parse(i.issuedAtTime))/1e3;if(r&&r>t5)return;let n=null==i?void 0:i.token;t9!==n&&(t9=n,await fetch(e,{method:n?"POST":"DELETE",headers:n?{Authorization:`Bearer ${n}`}:{}}))};function t8(e=(0,s.Mq)()){let t=(0,s.qX)(e,"auth");if(t.isInitialized())return t.getImmediate();let i=/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function(e,t){let i=(0,s.qX)(e,"auth");if(i.isInitialized()){let e=i.getImmediate(),r=i.getOptions();if((0,n.vZ)(r,null!=t?t:{}))return e;p(e,"already-initialized")}return i.initialize({options:t})}(e,{popupRedirectResolver:tJ,persistence:[td,e5,e9]}),r=(0,n.Pz)("authTokenSyncURL");if(r){let e=t6(r);(0,n.m9)(i).beforeAuthStateChanged(e,()=>e(i.currentUser)),(0,n.m9)(i).onIdTokenChanged(t=>e(t),void 0,void 0)}let a=(0,n.q4)("auth");return a&&function(e,t,i){let r=e_(e);v(r._canInitEmulator,r,"emulator-config-failed"),v(/^https?:\/\//.test(t),r,"invalid-emulator-scheme");let n=!!(null==i?void 0:i.disableWarnings),s=eS(t),{host:a,port:o}=function(e){let t=eS(e),i=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!i)return{host:"",port:null};let r=i[2].split("@").pop()||"",n=/^(\[[^\]]+\])(:|$)/.exec(r);if(n){let e=n[1];return{host:e,port:eR(r.substr(e.length+1))}}{let[e,t]=r.split(":");return{host:e,port:eR(t)}}}(t),l=null===o?"":`:${o}`;r.config.emulator={url:`${s}//${a}${l}/`},r.settings.appVerificationDisabledForTesting=!0,r.emulatorConfig=Object.freeze({host:a,port:o,protocol:s.replace(":",""),options:Object.freeze({disableWarnings:n})}),n||function(){function e(){let 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())}()}(i,`http://${a}`),i}ew={loadJS:e=>new Promise((t,i)=>{var r,n;let s=document.createElement("script");s.setAttribute("src",e),s.onload=t,s.onerror=e=>{let t=f("internal-error");t.customData=e,i(t)},s.type="text/javascript",s.charset="UTF-8",(null!==(n=null===(r=document.getElementsByTagName("head"))||void 0===r?void 0:r[0])&&void 0!==n?n:document).appendChild(s)}),gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="},r="Browser",(0,s.Xd)(new l.wA("auth",(e,{options:t})=>{let i=e.getProvider("app").getImmediate(),n=e.getProvider("heartbeat"),s=e.getProvider("app-check-internal"),{apiKey:a,authDomain:o}=i.options;v(a&&!a.includes(":"),"invalid-api-key",{appName:i.name});let l=new ev(i,n,s,{apiKey:a,authDomain:o,clientPlatform:r,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:ep(r)});return function(e,t){let i=(null==t?void 0:t.persistence)||[],r=(Array.isArray(i)?i:[i]).map(Z);(null==t?void 0:t.errorMap)&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,null==t?void 0:t.popupRedirectResolver)}(l,t),l},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,i)=>{e.getProvider("auth-internal").initialize()})),(0,s.Xd)(new l.wA("auth-internal",e=>new t4(e_(e.getProvider("auth").getImmediate())),"PRIVATE").setInstantiationMode("EXPLICIT")),(0,s.KN)(t3,t2,/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}(r)),(0,s.KN)(t3,t2,"esm2017")}}]); \ No newline at end of file diff --git a/out/_next/static/chunks/228-1f535c6a45b36ba6.js b/out/_next/static/chunks/228-1f535c6a45b36ba6.js new file mode 100644 index 0000000..9c6366f --- /dev/null +++ b/out/_next/static/chunks/228-1f535c6a45b36ba6.js @@ -0,0 +1,512 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[228],{8954:function(t,e,n){"use strict";n.d(e,{BH:function(){return v},G6:function(){return O},L:function(){return h},LL:function(){return k},P0:function(){return m},Pz:function(){return y},Sg:function(){return _},ZR:function(){return A},aH:function(){return b},b$:function(){return R},eu:function(){return I},hl:function(){return C},m9:function(){return H},ne:function(){return U},pd:function(){return L},q4:function(){return g},ru:function(){return T},tV:function(){return u},uI:function(){return E},vZ:function(){return function t(e,n){if(e===n)return!0;let r=Object.keys(e),i=Object.keys(n);for(let s of r){if(!i.includes(s))return!1;let r=e[s],o=n[s];if(N(r)&&N(o)){if(!t(r,o))return!1}else if(r!==o)return!1}for(let t of i)if(!r.includes(t))return!1;return!0}},w1:function(){return S},xO:function(){return D},xb:function(){return x},z$:function(){return w},zd:function(){return j}});var r=n(9079);/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let i=function(t){let e=[],n=0;for(let r=0;r>6|192:((64512&i)==55296&&r+1>18|240,e[n++]=i>>12&63|128):e[n++]=i>>12|224,e[n++]=i>>6&63|128),e[n++]=63&i|128)}return e},s=function(t){let e=[],n=0,r=0;for(;n191&&i<224){let s=t[n++];e[r++]=String.fromCharCode((31&i)<<6|63&s)}else if(i>239&&i<365){let s=((7&i)<<18|(63&t[n++])<<12|(63&t[n++])<<6|63&t[n++])-65536;e[r++]=String.fromCharCode(55296+(s>>10)),e[r++]=String.fromCharCode(56320+(1023&s))}else{let s=t[n++],o=t[n++];e[r++]=String.fromCharCode((15&i)<<12|(63&s)<<6|63&o)}}return e.join("")},o={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(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();let n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let e=0;e>2,u=(3&i)<<4|o>>4,c=(15&o)<<2|l>>6,f=63&l;a||(f=64,s||(c=64)),r.push(n[h],n[u],n[c],n[f])}return r.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(i(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):s(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();let n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let e=0;e>4;if(r.push(h),64!==o){let t=s<<4&240|o>>2;if(r.push(t),64!==l){let t=o<<6&192|l;r.push(t)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}};class a extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}let l=function(t){let e=i(t);return o.encodeByteArray(e,!0)},h=function(t){return l(t).replace(/\./g,"")},u=function(t){try{return o.decodeString(t,!0)}catch(t){console.error("base64Decode failed: ",t)}return null},c=()=>/** + * @license + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */(function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw Error("Unable to locate global object.")})().__FIREBASE_DEFAULTS__,f=()=>{if(void 0===r||void 0===r.env)return;let t=r.env.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},d=()=>{let t;if("undefined"==typeof document)return;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(t){return}let e=t&&u(t[1]);return e&&JSON.parse(e)},p=()=>{try{return c()||f()||d()}catch(t){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);return}},g=t=>{var e,n;return null===(n=null===(e=p())||void 0===e?void 0:e.emulatorHosts)||void 0===n?void 0:n[t]},m=t=>{let e=g(t);if(!e)return;let n=e.lastIndexOf(":");if(n<=0||n+1===e.length)throw Error(`Invalid host ${e} with no separate hostname and port!`);let r=parseInt(e.substring(n+1),10);return"["===e[0]?[e.substring(1,n-1),r]:[e.substring(0,n),r]},b=()=>{var t;return null===(t=p())||void 0===t?void 0:t.config},y=t=>{var e;return null===(e=p())||void 0===e?void 0:e[`_${t}`]};/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class v{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}wrapCallback(t){return(e,n)=>{e?this.reject(e):this.resolve(n),"function"==typeof t&&(this.promise.catch(()=>{}),1===t.length?t(e):t(e,n))}}}/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function _(t,e){if(t.uid)throw Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');let n=e||"demo-project",r=t.iat||0,i=t.sub||t.user_id;if(!i)throw Error("mockUserToken must contain 'sub' or 'user_id' field!");let s=Object.assign({iss:`https://securetoken.google.com/${n}`,aud:n,iat:r,exp:r+3600,auth_time:r,sub:i,user_id:i,firebase:{sign_in_provider:"custom",identities:{}}},t);return[h(JSON.stringify({alg:"none",type:"JWT"})),h(JSON.stringify(s)),""].join(".")}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function w(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function E(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(w())}function T(){let t="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof t&&void 0!==t.id}function R(){return"object"==typeof navigator&&"ReactNative"===navigator.product}function S(){let t=w();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0}function O(){return!function(){var t;let e=null===(t=p())||void 0===t?void 0:t.forceEnvironment;if("node"===e)return!0;if("browser"===e)return!1;try{return"[object process]"===Object.prototype.toString.call(n.g.process)}catch(t){return!1}}()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function C(){try{return"object"==typeof indexedDB}catch(t){return!1}}function I(){return new Promise((t,e)=>{try{let n=!0,r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),t(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var t;e((null===(t=i.error)||void 0===t?void 0:t.message)||"")}}catch(t){e(t)}})}class A extends Error{constructor(t,e,n){super(e),this.code=t,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,A.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,k.prototype.create)}}class k{constructor(t,e,n){this.service=t,this.serviceName=e,this.errors=n}create(t,...e){let n=e[0]||{},r=`${this.service}/${t}`,i=this.errors[t],s=i?i.replace(P,(t,e)=>{let r=n[e];return null!=r?String(r):`<${e}?>`}):"Error",o=`${this.serviceName}: ${s} (${r}).`;return new A(r,o,n)}}let P=/\{\$([^}]+)}/g;function x(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function N(t){return null!==t&&"object"==typeof t}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function D(t){let e=[];for(let[n,r]of Object.entries(t))Array.isArray(r)?r.forEach(t=>{e.push(encodeURIComponent(n)+"="+encodeURIComponent(t))}):e.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return e.length?"&"+e.join("&"):""}function j(t){let e={};return t.replace(/^\?/,"").split("&").forEach(t=>{if(t){let[n,r]=t.split("=");e[decodeURIComponent(n)]=decodeURIComponent(r)}}),e}function L(t){let e=t.indexOf("?");if(!e)return"";let n=t.indexOf("#",e);return t.substring(e,n>0?n:void 0)}function U(t,e){let n=new M(t,e);return n.subscribe.bind(n)}class M{constructor(t,e){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=e,this.task.then(()=>{t(this)}).catch(t=>{this.error(t)})}next(t){this.forEachObserver(e=>{e.next(t)})}error(t){this.forEachObserver(e=>{e.error(t)}),this.close(t)}complete(){this.forEachObserver(t=>{t.complete()}),this.close()}subscribe(t,e,n){let r;if(void 0===t&&void 0===e&&void 0===n)throw Error("Missing Observer.");void 0===(r=!function(t,e){if("object"!=typeof t||null===t)return!1;for(let n of e)if(n in t&&"function"==typeof t[n])return!0;return!1}(t,["next","error","complete"])?{next:t,error:e,complete:n}:t).next&&(r.next=B),void 0===r.error&&(r.error=B),void 0===r.complete&&(r.complete=B);let i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch(t){}}),this.observers.push(r),i}unsubscribeOne(t){void 0!==this.observers&&void 0!==this.observers[t]&&(delete this.observers[t],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver(t){if(!this.finalized)for(let e=0;e{if(void 0!==this.observers&&void 0!==this.observers[t])try{e(this.observers[t])}catch(t){"undefined"!=typeof console&&console.error&&console.error(t)}})}close(t){this.finalized||(this.finalized=!0,void 0!==t&&(this.finalError=t),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function B(){}/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function H(t){return t&&t._delegate?t._delegate:t}},8792:function(t,e,n){"use strict";n.d(e,{default:function(){return i.a}});var r=n(5250),i=n.n(r)},9079:function(t,e,n){"use strict";var r,i;t.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(i=n.g.process)?void 0:i.env)?n.g.process:n(3127)},2956:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addLocale",{enumerable:!0,get:function(){return r}}),n(2139);let r=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r{})}}function v(t){return"string"==typeof t?t:(0,l.formatUrl)(t)}let _=s.default.forwardRef(function(t,e){let n,r;let{href:l,as:b,children:_,prefetch:w=null,passHref:E,replace:T,shallow:R,scroll:S,locale:O,onClick:C,onMouseEnter:I,onTouchStart:A,legacyBehavior:k=!1,...P}=t;n=_,k&&("string"==typeof n||"number"==typeof n)&&(n=(0,i.jsx)("a",{children:n}));let x=s.default.useContext(c.RouterContext),N=s.default.useContext(f.AppRouterContext),D=null!=x?x:N,j=!x,L=!1!==w,U=null===w?m.PrefetchKind.AUTO:m.PrefetchKind.FULL,{href:M,as:B}=s.default.useMemo(()=>{if(!x){let t=v(l);return{href:t,as:b?v(b):t}}let[t,e]=(0,o.resolveHref)(x,l,!0);return{href:t,as:b?(0,o.resolveHref)(x,b):e||t}},[x,l,b]),H=s.default.useRef(M),F=s.default.useRef(B);k&&(r=s.default.Children.only(n));let z=k?r&&"object"==typeof r&&r.ref:e,[$,W,V]=(0,d.useIntersection)({rootMargin:"200px"}),q=s.default.useCallback(t=>{(F.current!==B||H.current!==M)&&(V(),F.current=B,H.current=M),$(t),z&&("function"==typeof z?z(t):"object"==typeof z&&(z.current=t))},[B,z,M,V,$]);s.default.useEffect(()=>{D&&W&&L&&y(D,M,B,{locale:O},{kind:U},j)},[B,M,W,O,L,null==x?void 0:x.locale,D,j,U]);let X={ref:q,onClick(t){k||"function"!=typeof C||C(t),k&&r.props&&"function"==typeof r.props.onClick&&r.props.onClick(t),D&&!t.defaultPrevented&&function(t,e,n,r,i,o,l,h,u){let{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&(function(t){let e=t.currentTarget.getAttribute("target");return e&&"_self"!==e||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which}(t)||!u&&!(0,a.isLocalURL)(n)))return;t.preventDefault();let f=()=>{let t=null==l||l;"beforePopState"in e?e[i?"replace":"push"](n,r,{shallow:o,locale:h,scroll:t}):e[i?"replace":"push"](r||n,{scroll:t})};u?s.default.startTransition(f):f()}(t,D,M,B,T,R,S,O,j)},onMouseEnter(t){k||"function"!=typeof I||I(t),k&&r.props&&"function"==typeof r.props.onMouseEnter&&r.props.onMouseEnter(t),D&&(L||!j)&&y(D,M,B,{locale:O,priority:!0,bypassPrefetchedCheck:!0},{kind:U},j)},onTouchStart(t){k||"function"!=typeof A||A(t),k&&r.props&&"function"==typeof r.props.onTouchStart&&r.props.onTouchStart(t),D&&(L||!j)&&y(D,M,B,{locale:O,priority:!0,bypassPrefetchedCheck:!0},{kind:U},j)}};if((0,h.isAbsoluteUrl)(B))X.href=B;else if(!k||E||"a"===r.type&&!("href"in r.props)){let t=void 0!==O?O:null==x?void 0:x.locale,e=(null==x?void 0:x.isLocaleDomain)&&(0,p.getDomainLocale)(B,t,null==x?void 0:x.locales,null==x?void 0:x.domainLocales);X.href=e||(0,g.addBasePath)((0,u.addLocale)(B,t,null==x?void 0:x.defaultLocale))}return k?s.default.cloneElement(r,X):(0,i.jsx)("a",{...P,...X,children:n})});("function"==typeof e.default||"object"==typeof e.default&&null!==e.default)&&void 0===e.default.__esModule&&(Object.defineProperty(e.default,"__esModule",{value:!0}),Object.assign(e.default,e),t.exports=e.default)},2185:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t,e){for(var n in e)Object.defineProperty(t,n,{enumerable:!0,get:e[n]})}(e,{requestIdleCallback:function(){return n},cancelIdleCallback:function(){return r}});let n="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(t){let e=Date.now();return self.setTimeout(function(){t({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-e))}})},1)},r="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(t){return clearTimeout(t)};("function"==typeof e.default||"object"==typeof e.default&&null!==e.default)&&void 0===e.default.__esModule&&(Object.defineProperty(e.default,"__esModule",{value:!0}),Object.assign(e.default,e),t.exports=e.default)},4542:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"resolveHref",{enumerable:!0,get:function(){return c}});let r=n(5770),i=n(1030),s=n(4544),o=n(6874),a=n(2139),l=n(7434),h=n(2360),u=n(6735);function c(t,e,n){let c;let f="string"==typeof e?e:(0,i.formatWithValidation)(e),d=f.match(/^[a-zA-Z]{1,}:\/\//),p=d?f.slice(d[0].length):f;if((p.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+f+"' passed to next/router in page: '"+t.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");let e=(0,o.normalizeRepeatedSlashes)(p);f=(d?d[0]:"")+e}if(!(0,l.isLocalURL)(f))return n?[f]:f;try{c=new URL(f.startsWith("#")?t.asPath:t.pathname,"http://n")}catch(t){c=new URL("/","http://n")}try{let t=new URL(f,c);t.pathname=(0,a.normalizePathTrailingSlash)(t.pathname);let e="";if((0,h.isDynamicRoute)(t.pathname)&&t.searchParams&&n){let n=(0,r.searchParamsToUrlQuery)(t.searchParams),{result:o,params:a}=(0,u.interpolateAs)(t.pathname,t.pathname,n);o&&(e=(0,i.formatWithValidation)({pathname:o,hash:t.hash,query:(0,s.omit)(n,a)}))}let o=t.origin===c.origin?t.href.slice(t.origin.length):t.href;return n?[o,e||o]:o}catch(t){return n?[f]:f}}("function"==typeof e.default||"object"==typeof e.default&&null!==e.default)&&void 0===e.default.__esModule&&(Object.defineProperty(e.default,"__esModule",{value:!0}),Object.assign(e.default,e),t.exports=e.default)},5291:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"useIntersection",{enumerable:!0,get:function(){return l}});let r=n(2265),i=n(2185),s="function"==typeof IntersectionObserver,o=new Map,a=[];function l(t){let{rootRef:e,rootMargin:n,disabled:l}=t,h=l||!s,[u,c]=(0,r.useState)(!1),f=(0,r.useRef)(null),d=(0,r.useCallback)(t=>{f.current=t},[]);return(0,r.useEffect)(()=>{if(s){if(h||u)return;let t=f.current;if(t&&t.tagName)return function(t,e,n){let{id:r,observer:i,elements:s}=function(t){let e;let n={root:t.root||null,margin:t.rootMargin||""},r=a.find(t=>t.root===n.root&&t.margin===n.margin);if(r&&(e=o.get(r)))return e;let i=new Map;return e={id:n,observer:new IntersectionObserver(t=>{t.forEach(t=>{let e=i.get(t.target),n=t.isIntersecting||t.intersectionRatio>0;e&&n&&e(n)})},t),elements:i},a.push(n),o.set(n,e),e}(n);return s.set(t,e),i.observe(t),function(){if(s.delete(t),i.unobserve(t),0===s.size){i.disconnect(),o.delete(r);let t=a.findIndex(t=>t.root===r.root&&t.margin===r.margin);t>-1&&a.splice(t,1)}}}(t,t=>t&&c(t),{root:null==e?void 0:e.current,rootMargin:n})}else if(!u){let t=(0,i.requestIdleCallback)(()=>c(!0));return()=>(0,i.cancelIdleCallback)(t)}},[h,n,e,u,f.current]),[d,u,(0,r.useCallback)(()=>{c(!1)},[])]}("function"==typeof e.default||"object"==typeof e.default&&null!==e.default)&&void 0===e.default.__esModule&&(Object.defineProperty(e.default,"__esModule",{value:!0}),Object.assign(e.default,e),t.exports=e.default)},3127:function(t){!function(){var e={229:function(t){var e,n,r,i=t.exports={};function s(){throw Error("setTimeout has not been defined")}function o(){throw Error("clearTimeout has not been defined")}function a(t){if(e===setTimeout)return setTimeout(t,0);if((e===s||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(n){try{return e.call(null,t,0)}catch(n){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:s}catch(t){e=s}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(t){n=o}}();var l=[],h=!1,u=-1;function c(){h&&r&&(h=!1,r.length?l=r.concat(l):u=-1,l.length&&f())}function f(){if(!h){var t=a(c);h=!0;for(var e=l.length;e;){for(r=l,l=[];++u1)for(var n=1;n{let e=l[t]||"",{repeat:n,optional:r}=a[t],i="["+(n?"...":"")+t+"]";return r&&(i=(e?"":"/")+"["+i+"]"),n&&!Array.isArray(e)&&(e=[e]),(r||t in l)&&(s=s.replace(i,n?e.map(t=>encodeURIComponent(t)).join("/"):encodeURIComponent(e))||"/")})||(s=""),{params:h,result:s}}},1305:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isDynamicRoute",{enumerable:!0,get:function(){return s}});let r=n(4749),i=/\/\[[^/]+?\](?=\/|$)/;function s(t){return(0,r.isInterceptionRouteAppPath)(t)&&(t=(0,r.extractInterceptionRouteInformation)(t).interceptedRoute),i.test(t)}},7434:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isLocalURL",{enumerable:!0,get:function(){return s}});let r=n(6874),i=n(7379);function s(t){if(!(0,r.isAbsoluteUrl)(t))return!0;try{let e=(0,r.getLocationOrigin)(),n=new URL(t,e);return n.origin===e&&(0,i.hasBasePath)(n.pathname)}catch(t){return!1}}},4544:function(t,e){"use strict";function n(t,e){let n={};return Object.keys(t).forEach(r=>{e.includes(r)||(n[r]=t[r])}),n}Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"omit",{enumerable:!0,get:function(){return n}})},5770:function(t,e){"use strict";function n(t){let e={};return t.forEach((t,n)=>{void 0===e[n]?e[n]=t:Array.isArray(e[n])?e[n].push(t):e[n]=[e[n],t]}),e}function r(t){return"string"!=typeof t&&("number"!=typeof t||isNaN(t))&&"boolean"!=typeof t?"":String(t)}function i(t){let e=new URLSearchParams;return Object.entries(t).forEach(t=>{let[n,i]=t;Array.isArray(i)?i.forEach(t=>e.append(n,r(t))):e.set(n,r(i))}),e}function s(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r{Array.from(e.keys()).forEach(e=>t.delete(e)),e.forEach((e,n)=>t.append(n,e))}),t}Object.defineProperty(e,"__esModule",{value:!0}),function(t,e){for(var n in e)Object.defineProperty(t,n,{enumerable:!0,get:e[n]})}(e,{searchParamsToUrlQuery:function(){return n},urlQueryToSearchParams:function(){return i},assign:function(){return s}})},2395:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getRouteMatcher",{enumerable:!0,get:function(){return i}});let r=n(6874);function i(t){let{re:e,groups:n}=t;return t=>{let i=e.exec(t);if(!i)return!1;let s=t=>{try{return decodeURIComponent(t)}catch(t){throw new r.DecodeError("failed to decode param")}},o={};return Object.keys(n).forEach(t=>{let e=n[t],r=i[e.pos];void 0!==r&&(o[t]=~r.indexOf("/")?r.split("/").map(t=>s(t)):e.repeat?[s(r)]:s(r))}),o}}},9935:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t,e){for(var n in e)Object.defineProperty(t,n,{enumerable:!0,get:e[n]})}(e,{getRouteRegex:function(){return l},getNamedRouteRegex:function(){return c},getNamedMiddlewareRegex:function(){return f}});let r=n(4749),i=n(2202),s=n(5868);function o(t){let e=t.startsWith("[")&&t.endsWith("]");e&&(t=t.slice(1,-1));let n=t.startsWith("...");return n&&(t=t.slice(3)),{key:t,repeat:n,optional:e}}function a(t){let e=(0,s.removeTrailingSlash)(t).slice(1).split("/"),n={},a=1;return{parameterizedRoute:e.map(t=>{let e=r.INTERCEPTION_ROUTE_MARKERS.find(e=>t.startsWith(e)),s=t.match(/\[((?:\[.*\])|.+)\]/);if(e&&s){let{key:t,optional:r,repeat:l}=o(s[1]);return n[t]={pos:a++,repeat:l,optional:r},"/"+(0,i.escapeStringRegexp)(e)+"([^/]+?)"}if(!s)return"/"+(0,i.escapeStringRegexp)(t);{let{key:t,repeat:e,optional:r}=o(s[1]);return n[t]={pos:a++,repeat:e,optional:r},e?r?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}}).join(""),groups:n}}function l(t){let{parameterizedRoute:e,groups:n}=a(t);return{re:RegExp("^"+e+"(?:/)?$"),groups:n}}function h(t){let{interceptionMarker:e,getSafeRouteKey:n,segment:r,routeKeys:s,keyPrefix:a}=t,{key:l,optional:h,repeat:u}=o(r),c=l.replace(/\W/g,"");a&&(c=""+a+c);let f=!1;(0===c.length||c.length>30)&&(f=!0),isNaN(parseInt(c.slice(0,1)))||(f=!0),f&&(c=n()),a?s[c]=""+a+l:s[c]=l;let d=e?(0,i.escapeStringRegexp)(e):"";return u?h?"(?:/"+d+"(?<"+c+">.+?))?":"/"+d+"(?<"+c+">.+?)":"/"+d+"(?<"+c+">[^/]+?)"}function u(t,e){let n;let o=(0,s.removeTrailingSlash)(t).slice(1).split("/"),a=(n=0,()=>{let t="",e=++n;for(;e>0;)t+=String.fromCharCode(97+(e-1)%26),e=Math.floor((e-1)/26);return t}),l={};return{namedParameterizedRoute:o.map(t=>{let n=r.INTERCEPTION_ROUTE_MARKERS.some(e=>t.startsWith(e)),s=t.match(/\[((?:\[.*\])|.+)\]/);if(n&&s){let[n]=t.split(s[0]);return h({getSafeRouteKey:a,interceptionMarker:n,segment:s[1],routeKeys:l,keyPrefix:e?"nxtI":void 0})}return s?h({getSafeRouteKey:a,segment:s[1],routeKeys:l,keyPrefix:e?"nxtP":void 0}):"/"+(0,i.escapeStringRegexp)(t)}).join(""),routeKeys:l}}function c(t,e){let n=u(t,e);return{...l(t),namedRegex:"^"+n.namedParameterizedRoute+"(?:/)?$",routeKeys:n.routeKeys}}function f(t,e){let{parameterizedRoute:n}=a(t),{catchAll:r=!0}=e;if("/"===n)return{namedRegex:"^/"+(r?".*":"")+"$"};let{namedParameterizedRoute:i}=u(t,!1);return{namedRegex:"^"+i+(r?"(?:(/.*)?)":"")+"$"}}},7409:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getSortedRoutes",{enumerable:!0,get:function(){return r}});class n{insert(t){this._insert(t.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(t){void 0===t&&(t="/");let e=[...this.children.keys()].sort();null!==this.slugName&&e.splice(e.indexOf("[]"),1),null!==this.restSlugName&&e.splice(e.indexOf("[...]"),1),null!==this.optionalRestSlugName&&e.splice(e.indexOf("[[...]]"),1);let n=e.map(e=>this.children.get(e)._smoosh(""+t+e+"/")).reduce((t,e)=>[...t,...e],[]);if(null!==this.slugName&&n.push(...this.children.get("[]")._smoosh(t+"["+this.slugName+"]/")),!this.placeholder){let e="/"===t?"/":t.slice(0,-1);if(null!=this.optionalRestSlugName)throw Error('You cannot define a route with the same specificity as a optional catch-all route ("'+e+'" and "'+e+"[[..."+this.optionalRestSlugName+']]").');n.unshift(e)}return null!==this.restSlugName&&n.push(...this.children.get("[...]")._smoosh(t+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&n.push(...this.children.get("[[...]]")._smoosh(t+"[[..."+this.optionalRestSlugName+"]]/")),n}_insert(t,e,r){if(0===t.length){this.placeholder=!1;return}if(r)throw Error("Catch-all must be the last part of the URL.");let i=t[0];if(i.startsWith("[")&&i.endsWith("]")){let n=i.slice(1,-1),o=!1;if(n.startsWith("[")&&n.endsWith("]")&&(n=n.slice(1,-1),o=!0),n.startsWith("...")&&(n=n.substring(3),r=!0),n.startsWith("[")||n.endsWith("]"))throw Error("Segment names may not start or end with extra brackets ('"+n+"').");if(n.startsWith("."))throw Error("Segment names may not start with erroneous periods ('"+n+"').");function s(t,n){if(null!==t&&t!==n)throw Error("You cannot use different slug names for the same dynamic path ('"+t+"' !== '"+n+"').");e.forEach(t=>{if(t===n)throw Error('You cannot have the same slug name "'+n+'" repeat within a single dynamic path');if(t.replace(/\W/g,"")===i.replace(/\W/g,""))throw Error('You cannot have the slug names "'+t+'" and "'+n+'" differ only by non-word symbols within a single dynamic path')}),e.push(n)}if(r){if(o){if(null!=this.restSlugName)throw Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+t[0]+'" ).');s(this.optionalRestSlugName,n),this.optionalRestSlugName=n,i="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+t[0]+'").');s(this.restSlugName,n),this.restSlugName=n,i="[...]"}}else{if(o)throw Error('Optional route parameters are not yet supported ("'+t[0]+'").');s(this.slugName,n),this.slugName=n,i="[]"}}this.children.has(i)||this.children.set(i,new n),this.children.get(i)._insert(t.slice(1),e,r)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function r(t){let e=new n;return t.forEach(t=>e.insert(t)),e.smoosh()}},6874:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t,e){for(var n in e)Object.defineProperty(t,n,{enumerable:!0,get:e[n]})}(e,{WEB_VITALS:function(){return n},execOnce:function(){return r},isAbsoluteUrl:function(){return s},getLocationOrigin:function(){return o},getURL:function(){return a},getDisplayName:function(){return l},isResSent:function(){return h},normalizeRepeatedSlashes:function(){return u},loadGetInitialProps:function(){return c},SP:function(){return f},ST:function(){return d},DecodeError:function(){return p},NormalizeError:function(){return g},PageNotFoundError:function(){return m},MissingStaticPage:function(){return b},MiddlewareNotFoundError:function(){return y},stringifyError:function(){return v}});let n=["CLS","FCP","FID","INP","LCP","TTFB"];function r(t){let e,n=!1;return function(){for(var r=arguments.length,i=Array(r),s=0;si.test(t);function o(){let{protocol:t,hostname:e,port:n}=window.location;return t+"//"+e+(n?":"+n:"")}function a(){let{href:t}=window.location,e=o();return t.substring(e.length)}function l(t){return"string"==typeof t?t:t.displayName||t.name||"Unknown"}function h(t){return t.finished||t.headersSent}function u(t){let e=t.split("?");return e[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(e[1]?"?"+e.slice(1).join("?"):"")}async function c(t,e){let n=e.res||e.ctx&&e.ctx.res;if(!t.getInitialProps)return e.ctx&&e.Component?{pageProps:await c(e.Component,e.ctx)}:{};let r=await t.getInitialProps(e);if(n&&h(n))return r;if(!r)throw Error('"'+l(t)+'.getInitialProps()" should resolve to an object. But found "'+r+'" instead.');return r}let f="undefined"!=typeof performance,d=f&&["mark","measure","getEntriesByName"].every(t=>"function"==typeof performance[t]);class p extends Error{}class g extends Error{}class m extends Error{constructor(t){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+t}}class b extends Error{constructor(t,e){super(),this.message="Failed to load static file for page: "+t+" "+e}}class y extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function v(t){return JSON.stringify({message:t.message,stack:t.stack})}},5723:function(t,e,n){"use strict";let r,i;n.d(e,{Jn:function(){return D},qX:function(){return P},Xd:function(){return k},Mq:function(){return L},ZF:function(){return j},KN:function(){return U}});var s,o=n(6574),a=n(9858),l=n(8954);let h=(t,e)=>e.some(e=>t instanceof e),u=new WeakMap,c=new WeakMap,f=new WeakMap,d=new WeakMap,p=new WeakMap,g={get(t,e,n){if(t instanceof IDBTransaction){if("done"===e)return c.get(t);if("objectStoreNames"===e)return t.objectStoreNames||f.get(t);if("store"===e)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return m(t[e])},set:(t,e,n)=>(t[e]=n,!0),has:(t,e)=>t instanceof IDBTransaction&&("done"===e||"store"===e)||e in t};function m(t){var e;if(t instanceof IDBRequest)return function(t){let e=new Promise((e,n)=>{let r=()=>{t.removeEventListener("success",i),t.removeEventListener("error",s)},i=()=>{e(m(t.result)),r()},s=()=>{n(t.error),r()};t.addEventListener("success",i),t.addEventListener("error",s)});return e.then(e=>{e instanceof IDBCursor&&u.set(e,t)}).catch(()=>{}),p.set(e,t),e}(t);if(d.has(t))return d.get(t);let n="function"==typeof(e=t)?e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(i||(i=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(b(this),t),m(u.get(this))}:function(...t){return m(e.apply(b(this),t))}:function(t,...n){let r=e.call(b(this),t,...n);return f.set(r,t.sort?t.sort():[t]),m(r)}:(e instanceof IDBTransaction&&function(t){if(c.has(t))return;let e=new Promise((e,n)=>{let r=()=>{t.removeEventListener("complete",i),t.removeEventListener("error",s),t.removeEventListener("abort",s)},i=()=>{e(),r()},s=()=>{n(t.error||new DOMException("AbortError","AbortError")),r()};t.addEventListener("complete",i),t.addEventListener("error",s),t.addEventListener("abort",s)});c.set(t,e)}(e),h(e,r||(r=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])))?new Proxy(e,g):e;return n!==t&&(d.set(t,n),p.set(n,t)),n}let b=t=>p.get(t),y=["get","getKey","getAll","getAllKeys","count"],v=["put","add","delete","clear"],_=new Map;function w(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&"string"==typeof e))return;if(_.get(e))return _.get(e);let n=e.replace(/FromIndex$/,""),r=e!==n,i=v.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||y.includes(n)))return;let s=async function(t,...e){let s=this.transaction(t,i?"readwrite":"readonly"),o=s.store;return r&&(o=o.index(e.shift())),(await Promise.all([o[n](...e),i&&s.done]))[0]};return _.set(e,s),s}g={...s=g,get:(t,e,n)=>w(t,e)||s.get(t,e,n),has:(t,e)=>!!w(t,e)||s.has(t,e)};/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class E{constructor(t){this.container=t}getPlatformInfoString(){return this.container.getProviders().map(t=>{if(!function(t){let e=t.getComponent();return(null==e?void 0:e.type)==="VERSION"}(t))return null;{let e=t.getImmediate();return`${e.library}/${e.version}`}}).filter(t=>t).join(" ")}}let T="@firebase/app",R="0.9.27",S=new a.Yd("@firebase/app"),O="[DEFAULT]",C={[T]:"fire-core","@firebase/app-compat":"fire-core-compat","@firebase/analytics":"fire-analytics","@firebase/analytics-compat":"fire-analytics-compat","@firebase/app-check":"fire-app-check","@firebase/app-check-compat":"fire-app-check-compat","@firebase/auth":"fire-auth","@firebase/auth-compat":"fire-auth-compat","@firebase/database":"fire-rtdb","@firebase/database-compat":"fire-rtdb-compat","@firebase/functions":"fire-fn","@firebase/functions-compat":"fire-fn-compat","@firebase/installations":"fire-iid","@firebase/installations-compat":"fire-iid-compat","@firebase/messaging":"fire-fcm","@firebase/messaging-compat":"fire-fcm-compat","@firebase/performance":"fire-perf","@firebase/performance-compat":"fire-perf-compat","@firebase/remote-config":"fire-rc","@firebase/remote-config-compat":"fire-rc-compat","@firebase/storage":"fire-gcs","@firebase/storage-compat":"fire-gcs-compat","@firebase/firestore":"fire-fst","@firebase/firestore-compat":"fire-fst-compat","fire-js":"fire-js",firebase:"fire-js-all"},I=new Map,A=new Map;function k(t){let e=t.name;if(A.has(e))return S.debug(`There were multiple attempts to register component ${e}.`),!1;for(let n of(A.set(e,t),I.values()))!function(t,e){try{t.container.addComponent(e)}catch(n){S.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,n)}}(n,t);return!0}function P(t,e){let n=t.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),t.container.getProvider(e)}let x=new l.LL("app","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."});/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class N{constructor(t,e,n){this._isDeleted=!1,this._options=Object.assign({},t),this._config=Object.assign({},e),this._name=e.name,this._automaticDataCollectionEnabled=e.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new o.wA("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(t){this.checkDestroyed(),this._automaticDataCollectionEnabled=t}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(t){this._isDeleted=t}checkDestroyed(){if(this.isDeleted)throw x.create("app-deleted",{appName:this._name})}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let D="10.8.0";function j(t,e={}){let n=t;"object"!=typeof e&&(e={name:e});let r=Object.assign({name:O,automaticDataCollectionEnabled:!1},e),i=r.name;if("string"!=typeof i||!i)throw x.create("bad-app-name",{appName:String(i)});if(n||(n=(0,l.aH)()),!n)throw x.create("no-options");let s=I.get(i);if(s){if((0,l.vZ)(n,s.options)&&(0,l.vZ)(r,s.config))return s;throw x.create("duplicate-app",{appName:i})}let a=new o.H0(i);for(let t of A.values())a.addComponent(t);let h=new N(n,r,a);return I.set(i,h),h}function L(t=O){let e=I.get(t);if(!e&&t===O&&(0,l.aH)())return j();if(!e)throw x.create("no-app",{appName:t});return e}function U(t,e,n){var r;let i=null!==(r=C[t])&&void 0!==r?r:t;n&&(i+=`-${n}`);let s=i.match(/\s|\//),a=e.match(/\s|\//);if(s||a){let t=[`Unable to register library "${i}" with version "${e}":`];s&&t.push(`library name "${i}" contains illegal characters (whitespace or "/")`),s&&a&&t.push("and"),a&&t.push(`version name "${e}" contains illegal characters (whitespace or "/")`),S.warn(t.join(" "));return}k(new o.wA(`${i}-version`,()=>({library:i,version:e}),"VERSION"))}let M="firebase-heartbeat-store",B=null;function H(){return B||(B=(function(t,e,{blocked:n,upgrade:r,blocking:i,terminated:s}={}){let o=indexedDB.open(t,1),a=m(o);return r&&o.addEventListener("upgradeneeded",t=>{r(m(o.result),t.oldVersion,t.newVersion,m(o.transaction),t)}),n&&o.addEventListener("blocked",t=>n(t.oldVersion,t.newVersion,t)),a.then(t=>{s&&t.addEventListener("close",()=>s()),i&&t.addEventListener("versionchange",t=>i(t.oldVersion,t.newVersion,t))}).catch(()=>{}),a})("firebase-heartbeat-database",0,{upgrade:(t,e)=>{if(0===e)try{t.createObjectStore(M)}catch(t){console.warn(t)}}}).catch(t=>{throw x.create("idb-open",{originalErrorMessage:t.message})})),B}async function F(t){try{let e=(await H()).transaction(M),n=await e.objectStore(M).get($(t));return await e.done,n}catch(t){if(t instanceof l.ZR)S.warn(t.message);else{let e=x.create("idb-get",{originalErrorMessage:null==t?void 0:t.message});S.warn(e.message)}}}async function z(t,e){try{let n=(await H()).transaction(M,"readwrite"),r=n.objectStore(M);await r.put(e,$(t)),await n.done}catch(t){if(t instanceof l.ZR)S.warn(t.message);else{let e=x.create("idb-set",{originalErrorMessage:null==t?void 0:t.message});S.warn(e.message)}}}function $(t){return`${t.name}!${t.options.appId}`}class W{constructor(t){this.container=t,this._heartbeatsCache=null;let e=this.container.getProvider("app").getImmediate();this._storage=new q(e),this._heartbeatsCachePromise=this._storage.read().then(t=>(this._heartbeatsCache=t,t))}async triggerHeartbeat(){var t,e;let n=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),r=V();return(null===(t=this._heartbeatsCache)||void 0===t?void 0:t.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,(null===(e=this._heartbeatsCache)||void 0===e?void 0:e.heartbeats)==null)?void 0:this._heartbeatsCache.lastSentHeartbeatDate===r||this._heartbeatsCache.heartbeats.some(t=>t.date===r)?void 0:(this._heartbeatsCache.heartbeats.push({date:r,agent:n}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(t=>{let e=new Date(t.date).valueOf();return Date.now()-e<=2592e6}),this._storage.overwrite(this._heartbeatsCache))}async getHeartbeatsHeader(){var t;if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,(null===(t=this._heartbeatsCache)||void 0===t?void 0:t.heartbeats)==null||0===this._heartbeatsCache.heartbeats.length)return"";let e=V(),{heartbeatsToSend:n,unsentEntries:r}=function(t,e=1024){let n=[],r=t.slice();for(let i of t){let t=n.find(t=>t.agent===i.agent);if(t){if(t.dates.push(i.date),X(n)>e){t.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),X(n)>e){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}(this._heartbeatsCache.heartbeats),i=(0,l.L)(JSON.stringify({version:2,heartbeats:n}));return this._heartbeatsCache.lastSentHeartbeatDate=e,r.length>0?(this._heartbeatsCache.heartbeats=r,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),i}}function V(){return new Date().toISOString().substring(0,10)}class q{constructor(t){this.app=t,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!(0,l.hl)()&&(0,l.eu)().then(()=>!0).catch(()=>!1)}async read(){if(!await this._canUseIndexedDBPromise)return{heartbeats:[]};{let t=await F(this.app);return(null==t?void 0:t.heartbeats)?t:{heartbeats:[]}}}async overwrite(t){var e;if(await this._canUseIndexedDBPromise){let n=await this.read();return z(this.app,{lastSentHeartbeatDate:null!==(e=t.lastSentHeartbeatDate)&&void 0!==e?e:n.lastSentHeartbeatDate,heartbeats:t.heartbeats})}}async add(t){var e;if(await this._canUseIndexedDBPromise){let n=await this.read();return z(this.app,{lastSentHeartbeatDate:null!==(e=t.lastSentHeartbeatDate)&&void 0!==e?e:n.lastSentHeartbeatDate,heartbeats:[...n.heartbeats,...t.heartbeats]})}}}function X(t){return(0,l.L)(JSON.stringify({version:2,heartbeats:t})).length}k(new o.wA("platform-logger",t=>new E(t),"PRIVATE")),k(new o.wA("heartbeat",t=>new W(t),"PRIVATE")),U(T,R,""),U(T,R,"esm2017"),U("fire-js","")},6574:function(t,e,n){"use strict";n.d(e,{H0:function(){return a},wA:function(){return i}});var r=n(8954);class i{constructor(t,e,n){this.name=t,this.instanceFactory=e,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(t){return this.instantiationMode=t,this}setMultipleInstances(t){return this.multipleInstances=t,this}setServiceProps(t){return this.serviceProps=t,this}setInstanceCreatedCallback(t){return this.onInstanceCreated=t,this}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let s="[DEFAULT]";/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class o{constructor(t,e){this.name=t,this.container=e,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(t){let e=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(e)){let t=new r.BH;if(this.instancesDeferred.set(e,t),this.isInitialized(e)||this.shouldAutoInitialize())try{let n=this.getOrInitializeService({instanceIdentifier:e});n&&t.resolve(n)}catch(t){}}return this.instancesDeferred.get(e).promise}getImmediate(t){var e;let n=this.normalizeInstanceIdentifier(null==t?void 0:t.identifier),r=null!==(e=null==t?void 0:t.optional)&&void 0!==e&&e;if(this.isInitialized(n)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:n})}catch(t){if(r)return null;throw t}else{if(r)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(t){if(t.name!==this.name)throw Error(`Mismatching Component ${t.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=t,this.shouldAutoInitialize()){if("EAGER"===t.instantiationMode)try{this.getOrInitializeService({instanceIdentifier:s})}catch(t){}for(let[t,e]of this.instancesDeferred.entries()){let n=this.normalizeInstanceIdentifier(t);try{let t=this.getOrInitializeService({instanceIdentifier:n});e.resolve(t)}catch(t){}}}}clearInstance(t=s){this.instancesDeferred.delete(t),this.instancesOptions.delete(t),this.instances.delete(t)}async delete(){let t=Array.from(this.instances.values());await Promise.all([...t.filter(t=>"INTERNAL"in t).map(t=>t.INTERNAL.delete()),...t.filter(t=>"_delete"in t).map(t=>t._delete())])}isComponentSet(){return null!=this.component}isInitialized(t=s){return this.instances.has(t)}getOptions(t=s){return this.instancesOptions.get(t)||{}}initialize(t={}){let{options:e={}}=t,n=this.normalizeInstanceIdentifier(t.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);let r=this.getOrInitializeService({instanceIdentifier:n,options:e});for(let[t,e]of this.instancesDeferred.entries())n===this.normalizeInstanceIdentifier(t)&&e.resolve(r);return r}onInit(t,e){var n;let r=this.normalizeInstanceIdentifier(e),i=null!==(n=this.onInitCallbacks.get(r))&&void 0!==n?n:new Set;i.add(t),this.onInitCallbacks.set(r,i);let s=this.instances.get(r);return s&&t(s,r),()=>{i.delete(t)}}invokeOnInitCallbacks(t,e){let n=this.onInitCallbacks.get(e);if(n)for(let r of n)try{r(t,e)}catch(t){}}getOrInitializeService({instanceIdentifier:t,options:e={}}){let n=this.instances.get(t);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:t===s?void 0:t,options:e}),this.instances.set(t,n),this.instancesOptions.set(t,e),this.invokeOnInitCallbacks(n,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,n)}catch(t){}return n||null}normalizeInstanceIdentifier(t=s){return this.component?this.component.multipleInstances?t:s:t}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class a{constructor(t){this.name=t,this.providers=new Map}addComponent(t){let e=this.getProvider(t.name);if(e.isComponentSet())throw Error(`Component ${t.name} has already been registered with ${this.name}`);e.setComponent(t)}addOrOverwriteComponent(t){this.getProvider(t.name).isComponentSet()&&this.providers.delete(t.name),this.addComponent(t)}getProvider(t){if(this.providers.has(t))return this.providers.get(t);let e=new o(t,this);return this.providers.set(t,e),e}getProviders(){return Array.from(this.providers.values())}}},9858:function(t,e,n){"use strict";var r,i;n.d(e,{Yd:function(){return u},in:function(){return r}});/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let s=[];(i=r||(r={}))[i.DEBUG=0]="DEBUG",i[i.VERBOSE=1]="VERBOSE",i[i.INFO=2]="INFO",i[i.WARN=3]="WARN",i[i.ERROR=4]="ERROR",i[i.SILENT=5]="SILENT";let o={debug:r.DEBUG,verbose:r.VERBOSE,info:r.INFO,warn:r.WARN,error:r.ERROR,silent:r.SILENT},a=r.INFO,l={[r.DEBUG]:"log",[r.VERBOSE]:"log",[r.INFO]:"info",[r.WARN]:"warn",[r.ERROR]:"error"},h=(t,e,...n)=>{if(e{};c.addEventListener("test",t,e),c.removeEventListener("test",t,e)}catch(t){}return t}();function S(t){return/^[\s\xa0]*$/.test(t)}function O(){var t=c.navigator;return t&&(t=t.userAgent)?t:""}function C(t){return -1!=O().indexOf(t)}function I(t){return I[" "](t),t}I[" "]=function(){};var A=C("Opera"),k=C("Trident")||C("MSIE"),P=C("Edge"),x=P||k,N=C("Gecko")&&!(-1!=O().toLowerCase().indexOf("webkit")&&!C("Edge"))&&!(C("Trident")||C("MSIE"))&&!C("Edge"),D=-1!=O().toLowerCase().indexOf("webkit")&&!C("Edge");function j(){var t=c.document;return t?t.documentMode:void 0}t:{var L,U="",M=(L=O(),N?/rv:([^\);]+)(\)|;)/.exec(L):P?/Edge\/([\d\.]+)/.exec(L):k?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(L):D?/WebKit\/(\S+)/.exec(L):A?/(?:Version)[ \/]?(\S+)/.exec(L):void 0);if(M&&(U=M?M[1]:""),k){var B=j();if(null!=B&&B>parseFloat(U)){i=String(B);break t}}i=U}var H=c.document&&k&&(j()||parseInt(i,10))||void 0;function F(t,e){if(T.call(this,t?t.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,t){var n=this.type=t.type,r=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:null;if(this.target=t.target||t.srcElement,this.g=e,e=t.relatedTarget){if(N){t:{try{I(e.nodeName);var i=!0;break t}catch(t){}i=!1}i||(e=null)}}else"mouseover"==n?e=t.fromElement:"mouseout"==n&&(e=t.toElement);this.relatedTarget=e,r?(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=void 0!==t.clientX?t.clientX:t.pageX,this.clientY=void 0!==t.clientY?t.clientY:t.pageY,this.screenX=t.screenX||0,this.screenY=t.screenY||0),this.button=t.button,this.key=t.key||"",this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.pointerId=t.pointerId||0,this.pointerType="string"==typeof t.pointerType?t.pointerType:z[t.pointerType]||"",this.state=t.state,this.i=t,t.defaultPrevented&&F.$.h.call(this)}}y(F,T);var z={2:"touch",3:"pen",4:"mouse"};F.prototype.h=function(){F.$.h.call(this);var t=this.i;t.preventDefault?t.preventDefault():t.returnValue=!1};var $="closure_listenable_"+(1e6*Math.random()|0),W=0;function V(t,e,n,r,i){this.listener=t,this.proxy=null,this.src=e,this.type=n,this.capture=!!r,this.la=i,this.key=++W,this.fa=this.ia=!1}function q(t){t.fa=!0,t.listener=null,t.proxy=null,t.src=null,t.la=null}function X(t,e,n){for(let r in t)e.call(n,t[r],r,t)}function K(t){let e={};for(let n in t)e[n]=t[n];return e}let G="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function J(t,e){let n,r;for(let e=1;e>>0);function tl(t){return"function"==typeof t?t:(t[ta]||(t[ta]=function(e){return t.handleEvent(e)}),t[ta])}function th(){v.call(this),this.i=new Y(this),this.S=this,this.J=null}function tu(t,e){var n,r=t.J;if(r)for(n=[];r;r=r.J)n.push(r);if(t=t.S,r=e.type||e,"string"==typeof e)e=new T(e,t);else if(e instanceof T)e.target=e.target||t;else{var i=e;J(e=new T(r,t),i)}if(i=!0,n)for(var s=n.length-1;0<=s;s--){var o=e.g=n[s];i=tc(o,r,!0,e)&&i}if(i=tc(o=e.g=t,r,!0,e)&&i,i=tc(o,r,!1,e)&&i,n)for(s=0;snew tm,t=>t.reset());class tm{constructor(){this.next=this.g=this.h=null}set(t,e){this.h=t,this.g=e,this.next=null}reset(){this.next=this.g=this.h=null}}let tb,ty=!1,tv=new tp,t_=()=>{let t=c.Promise.resolve(void 0);tb=()=>{t.then(tw)}};var tw=()=>{let t;for(var e;t=null,tv.g&&(t=tv.g,tv.g=tv.g.next,tv.g||(tv.h=null),t.next=null),e=t;){try{e.h.call(e.g)}catch(t){!function(t){c.setTimeout(()=>{throw t},0)}(t)}tg.j(e),100>tg.h&&(tg.h++,e.next=tg.g,tg.g=e)}ty=!1};function tE(t,e){th.call(this),this.h=t||1,this.g=e||c,this.j=m(this.qb,this),this.l=Date.now()}function tT(t){t.ga=!1,t.T&&(t.g.clearTimeout(t.T),t.T=null)}function tR(t,e,n){if("function"==typeof t)n&&(t=m(t,n));else if(t&&"function"==typeof t.handleEvent)t=m(t.handleEvent,t);else throw Error("Invalid listener argument");return 2147483647{e.g=null,e.i&&(e.i=!1,t(e))},e.j);let n=e.h;e.h=null,e.m.apply(null,n)}(this)}N(){super.N(),this.g&&(c.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function tO(t){v.call(this),this.h=t,this.g={}}y(tO,v);var tC=[];function tI(t,e,n,r){Array.isArray(n)||(n&&(tC[0]=n.toString()),n=tC);for(var i=0;ir.length)){var i=r[1];if(Array.isArray(i)&&!(1>i.length)){var s=i[0];if("noop"!=s&&"stop"!=s&&"close"!=s)for(var o=1;oe.length?t0:(e=e.slice(r,r+n),t.o=r+n,e)}(t,n))==t0){4==e&&(t.s=4,tM(14),r=!1),tP(t.j,t.m,null,"[Incomplete Response]");break}else if(i==tQ){t.s=4,tM(15),tP(t.j,t.m,n,"[Invalid Chunk]"),r=!1;break}else tP(t.j,t.m,i,null),et(t,i);t9(t)&&0!=t.o&&(t.h.g=t.h.g.slice(t.o),t.o=0),4!=e||0!=n.length||t.h.h||(t.s=1,tM(16),r=!1),t.i=t.i&&r,r?0i[2]&&n.G&&0==n.A&&!n.v&&(n.v=tH(m(n.ib,n),6e3));if(1>=eI(n.i)&&n.oa){try{n.oa()}catch(t){}n.oa=void 0}}else nl(n,11)}else if((t.K||n.g==t)&&ns(n),!S(e))for(i=n.Ja.g.parse(e),e=0;eu)&&(3!=u||x||this.g&&(this.h.h||this.g.ja()||eQ(this.g)))){this.J||4!=u||7==e||(8==e||0>=f?tL(3):tL(2)),t7(this);var n=this.g.da();this.ca=n;e:if(t9(this)){var r=eQ(this.g);t="";var i=r.length,s=4==eZ(this.g);if(!this.h.i){if("undefined"==typeof TextDecoder){t8(this),t3(this);var o="";break e}this.h.i=new c.TextDecoder}for(e=0;ee)throw Error("Bad port number "+e);t.m=e}else t.m=null}function ea(t,e,n){var r,i;e instanceof ey?(t.i=e,r=t.i,(i=t.h)&&!r.j&&(ev(r),r.i=null,r.g.forEach(function(t,e){var n=e.toLowerCase();e!=n&&(e_(this,e),eE(this,n,t))},r)),r.j=i):(n||(e=ec(e,em)),t.i=new ey(e,t.h))}function el(t,e,n){t.i.set(e,n)}function eh(t){return el(t,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),t}function eu(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function ec(t,e,n){return"string"==typeof t?(t=encodeURI(t).replace(e,ef),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function ef(t){return"%"+((t=t.charCodeAt(0))>>4&15).toString(16)+(15&t).toString(16)}er.prototype.toString=function(){var t=[],e=this.j;e&&t.push(ec(e,ed,!0),":");var n=this.g;return(n||"file"==e)&&(t.push("//"),(e=this.s)&&t.push(ec(e,ed,!0),"@"),t.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.m)&&t.push(":",String(n))),(n=this.l)&&(this.g&&"/"!=n.charAt(0)&&t.push("/"),t.push(ec(n,"/"==n.charAt(0)?eg:ep,!0))),(n=this.i.toString())&&t.push("?",n),(n=this.o)&&t.push("#",ec(n,eb)),t.join("")};var ed=/[#\/\?@]/g,ep=/[#\?:]/g,eg=/[#\?]/g,em=/[#\?@]/g,eb=/#/g;function ey(t,e){this.h=this.g=null,this.i=t||null,this.j=!!e}function ev(t){t.g||(t.g=new Map,t.h=0,t.i&&function(t,e){if(t){t=t.split("&");for(var n=0;n=t.j}function eI(t){return t.h?1:t.g?t.g.size:0}function eA(t,e){return t.h?t.h==e:!!t.g&&t.g.has(e)}function ek(t,e){t.g?t.g.add(e):t.h=e}function eP(t,e){t.h&&t.h==e?t.h=null:t.g&&t.g.has(e)&&t.g.delete(e)}function ex(t){if(null!=t.h)return t.i.concat(t.h.F);if(null!=t.g&&0!==t.g.size){let e=t.i;for(let n of t.g.values())e=e.concat(n.F);return e}return w(t.i)}eS.prototype.cancel=function(){if(this.i=ex(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){for(let t of this.g.values())t.cancel();this.g.clear()}};var eN=class{stringify(t){return c.JSON.stringify(t,void 0)}parse(t){return c.JSON.parse(t,void 0)}};function eD(){this.g=new eN}function ej(t,e,n,r,i){try{e.onload=null,e.onerror=null,e.onabort=null,e.ontimeout=null,i(r)}catch(t){}}function eL(t){this.l=t.ec||null,this.j=t.ob||!1}function eU(t,e){th.call(this),this.F=t,this.u=e,this.m=void 0,this.readyState=eM,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}y(eL,t$),eL.prototype.g=function(){return new eU(this.l,this.j)},eL.prototype.i=(r={},function(){return r}),y(eU,th);var eM=0;function eB(t){t.j.read().then(t.Xa.bind(t)).catch(t.ka.bind(t))}function eH(t){t.readyState=4,t.l=null,t.j=null,t.A=null,eF(t)}function eF(t){t.onreadystatechange&&t.onreadystatechange.call(t)}(a=eU.prototype).open=function(t,e){if(this.readyState!=eM)throw this.abort(),Error("Error reopening a connection");this.C=t,this.B=e,this.readyState=1,eF(this)},a.send=function(t){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.g=!0;let e={headers:this.v,method:this.C,credentials:this.m,cache:void 0};t&&(e.body=t),(this.F||c).fetch(new Request(this.B,e)).then(this.$a.bind(this),this.ka.bind(this))},a.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),1<=this.readyState&&this.g&&4!=this.readyState&&(this.g=!1,eH(this)),this.readyState=eM},a.$a=function(t){if(this.g&&(this.l=t,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=t.headers,this.readyState=2,eF(this)),this.g&&(this.readyState=3,eF(this),this.g))){if("arraybuffer"===this.responseType)t.arrayBuffer().then(this.Ya.bind(this),this.ka.bind(this));else if(void 0!==c.ReadableStream&&"body"in t){if(this.j=t.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;eB(this)}else t.text().then(this.Za.bind(this),this.ka.bind(this))}},a.Xa=function(t){if(this.g){if(this.u&&t.value)this.response.push(t.value);else if(!this.u){var e=t.value?t.value:new Uint8Array(0);(e=this.A.decode(e,{stream:!t.done}))&&(this.response=this.responseText+=e)}t.done?eH(this):eF(this),3==this.readyState&&eB(this)}},a.Za=function(t){this.g&&(this.response=this.responseText=t,eH(this))},a.Ya=function(t){this.g&&(this.response=t,eH(this))},a.ka=function(){this.g&&eH(this)},a.setRequestHeader=function(t,e){this.v.append(t,e)},a.getResponseHeader=function(t){return this.h&&this.h.get(t.toLowerCase())||""},a.getAllResponseHeaders=function(){if(!this.h)return"";let t=[],e=this.h.entries();for(var n=e.next();!n.done;)t.push((n=n.value)[0]+": "+n[1]),n=e.next();return t.join("\r\n")},Object.defineProperty(eU.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(t){this.m=t?"include":"same-origin"}});var ez=c.JSON.parse;function e$(t){th.call(this),this.headers=new Map,this.u=t||null,this.h=!1,this.C=this.g=null,this.I="",this.m=0,this.j="",this.l=this.G=this.v=this.F=!1,this.B=0,this.A=null,this.K=eW,this.L=this.M=!1}y(e$,th);var eW="",eV=/^https?$/i,eq=["POST","PUT"];function eX(t,e){t.h=!1,t.g&&(t.l=!0,t.g.abort(),t.l=!1),t.j=e,t.m=5,eK(t),eJ(t)}function eK(t){t.F||(t.F=!0,tu(t,"complete"),tu(t,"error"))}function eG(t){if(t.h&&void 0!==u&&(!t.C[1]||4!=eZ(t)||2!=t.da())){if(t.v&&4==eZ(t))tR(t.La,0,t);else if(tu(t,"readystatechange"),4==eZ(t)){t.h=!1;try{let o=t.da();switch(o){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var e,n,r=!0;break;default:r=!1}if(!(e=r)){if(n=0===o){var i=String(t.I).match(en)[1]||null;!i&&c.self&&c.self.location&&(i=c.self.location.protocol.slice(0,-1)),n=!eV.test(i?i.toLowerCase():"")}e=n}if(e)tu(t,"complete"),tu(t,"success");else{t.m=6;try{var s=2{}:null;t.g=null,t.C=null,e||tu(t,"ready");try{n.onreadystatechange=r}catch(t){}}}function eY(t){t.g&&t.L&&(t.g.ontimeout=null),t.A&&(c.clearTimeout(t.A),t.A=null)}function eZ(t){return t.g?t.g.readyState:0}function eQ(t){try{if(!t.g)return null;if("response"in t.g)return t.g.response;switch(t.K){case eW:case"text":return t.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in t.g)return t.g.mozResponseArrayBuffer}return null}catch(t){return null}}function e0(t){let e="";return X(t,function(t,n){e+=n+":"+t+"\r\n"}),e}function e1(t,e,n){t:{for(r in n){var r=!1;break t}r=!0}r||(n=e0(n),"string"==typeof t?null!=n&&encodeURIComponent(String(n)):el(t,e,n))}function e2(t,e,n){return n&&n.internalChannelParams&&n.internalChannelParams[t]||e}function e9(t){this.Ga=0,this.j=[],this.l=new tk,this.pa=this.wa=this.I=this.Y=this.g=this.Da=this.F=this.na=this.o=this.U=this.s=null,this.fb=this.W=0,this.cb=e2("failFast",!1,t),this.G=this.v=this.u=this.m=this.h=null,this.aa=!0,this.Fa=this.V=-1,this.ba=this.A=this.C=0,this.ab=e2("baseRetryDelayMs",5e3,t),this.hb=e2("retryDelaySeedMs",1e4,t),this.eb=e2("forwardChannelMaxRetries",2,t),this.xa=e2("forwardChannelRequestTimeoutMs",2e4,t),this.va=t&&t.xmlHttpFactory||void 0,this.Ha=t&&t.useFetchStreams||!1,this.L=void 0,this.J=t&&t.supportsCrossDomainXhr||!1,this.K="",this.i=new eS(t&&t.concurrentRequestLimit),this.Ja=new eD,this.P=t&&t.fastHandshake||!1,this.O=t&&t.encodeInitMessageHeaders||!1,this.P&&this.O&&(this.O=!1),this.bb=t&&t.bc||!1,t&&t.Ea&&this.l.Ea(),t&&t.forceLongPolling&&(this.aa=!1),this.ca=!this.P&&this.aa&&t&&t.detectBufferingProxy||!1,this.qa=void 0,t&&t.longPollingTimeout&&0(n-=e))e=Math.max(0,i[o].g-100),s=!1;else try{!function(t,e,n){let r=n||"";try{ee(t,function(t,n){let i=t;d(t)&&(i=tf(t)),e.push(r+n+"="+encodeURIComponent(i))})}catch(t){throw e.push(r+"type="+encodeURIComponent("_badmap")),t}}(a,t,"req"+n+"_")}catch(t){r&&r(a)}}if(s){r=t.join("&");break t}}}return t=t.j.splice(0,n),e.F=t,r}function ne(t){if(!t.g&&!t.u){t.ba=1;var e=t.Ma;tb||t_(),ty||(tb(),ty=!0),tv.add(e,t),t.A=0}}function nn(t){return!t.g&&!t.u&&!(3<=t.A)&&(t.ba++,t.u=tH(m(t.Ma,t),na(t,t.A)),t.A++,!0)}function nr(t){null!=t.B&&(c.clearTimeout(t.B),t.B=null)}function ni(t){t.g=new tJ(t,t.l,"rpc",t.ba),null===t.o&&(t.g.I=t.s),t.g.O=0;var e=ei(t.wa);el(e,"RID","rpc"),el(e,"SID",t.K),el(e,"AID",t.V),el(e,"CI",t.G?"0":"1"),!t.G&&t.qa&&el(e,"TO",t.qa),el(e,"TYPE","xmlhttp"),e8(t,e),t.o&&t.s&&e1(e,t.o,t.s),t.L&&t.g.setTimeout(t.L);var n=t.g;t=t.pa,n.L=1,n.A=eh(ei(e)),n.u=null,n.S=!0,t2(n,t)}function ns(t){null!=t.v&&(c.clearTimeout(t.v),t.v=null)}function no(t,e){var n=null;if(t.g==e){ns(t),nr(t),t.g=null;var r=2}else{if(!eA(t.i,e))return;n=e.F,eP(t.i,e),r=1}if(0!=t.H){if(e.i){if(1==r){n=e.u?e.u.length:0,e=Date.now()-e.G;var i,s=t.C;tu(r=tD(),new tB(r,n)),e7(t)}else ne(t)}else if(3==(s=e.s)||0==s&&0=t.i.j-(t.m?1:0))&&(t.m?(t.j=i.F.concat(t.j),!0):1!=t.H&&2!=t.H&&!(t.C>=(t.cb?0:t.eb))&&(t.m=tH(m(t.Na,t,i),na(t,t.C)),t.C++,!0)))||2==r&&nn(t)))switch(n&&0i;++i)r[i]=e.charCodeAt(n++)|e.charCodeAt(n++)<<8|e.charCodeAt(n++)<<16|e.charCodeAt(n++)<<24;else for(i=0;16>i;++i)r[i]=e[n++]|e[n++]<<8|e[n++]<<16|e[n++]<<24;e=t.g[0],n=t.g[1],i=t.g[2];var s=t.g[3],o=e+(s^n&(i^s))+r[0]+3614090360&4294967295;o=s+(i^(e=n+(o<<7&4294967295|o>>>25))&(n^i))+r[1]+3905402710&4294967295,o=i+(n^(s=e+(o<<12&4294967295|o>>>20))&(e^n))+r[2]+606105819&4294967295,o=n+(e^(i=s+(o<<17&4294967295|o>>>15))&(s^e))+r[3]+3250441966&4294967295,o=e+(s^(n=i+(o<<22&4294967295|o>>>10))&(i^s))+r[4]+4118548399&4294967295,o=s+(i^(e=n+(o<<7&4294967295|o>>>25))&(n^i))+r[5]+1200080426&4294967295,o=i+(n^(s=e+(o<<12&4294967295|o>>>20))&(e^n))+r[6]+2821735955&4294967295,o=n+(e^(i=s+(o<<17&4294967295|o>>>15))&(s^e))+r[7]+4249261313&4294967295,o=e+(s^(n=i+(o<<22&4294967295|o>>>10))&(i^s))+r[8]+1770035416&4294967295,o=s+(i^(e=n+(o<<7&4294967295|o>>>25))&(n^i))+r[9]+2336552879&4294967295,o=i+(n^(s=e+(o<<12&4294967295|o>>>20))&(e^n))+r[10]+4294925233&4294967295,o=n+(e^(i=s+(o<<17&4294967295|o>>>15))&(s^e))+r[11]+2304563134&4294967295,o=e+(s^(n=i+(o<<22&4294967295|o>>>10))&(i^s))+r[12]+1804603682&4294967295,o=s+(i^(e=n+(o<<7&4294967295|o>>>25))&(n^i))+r[13]+4254626195&4294967295,o=i+(n^(s=e+(o<<12&4294967295|o>>>20))&(e^n))+r[14]+2792965006&4294967295,o=n+(e^(i=s+(o<<17&4294967295|o>>>15))&(s^e))+r[15]+1236535329&4294967295,n=i+(o<<22&4294967295|o>>>10),o=e+(i^s&(n^i))+r[1]+4129170786&4294967295,e=n+(o<<5&4294967295|o>>>27),o=s+(n^i&(e^n))+r[6]+3225465664&4294967295,s=e+(o<<9&4294967295|o>>>23),o=i+(e^n&(s^e))+r[11]+643717713&4294967295,i=s+(o<<14&4294967295|o>>>18),o=n+(s^e&(i^s))+r[0]+3921069994&4294967295,n=i+(o<<20&4294967295|o>>>12),o=e+(i^s&(n^i))+r[5]+3593408605&4294967295,e=n+(o<<5&4294967295|o>>>27),o=s+(n^i&(e^n))+r[10]+38016083&4294967295,s=e+(o<<9&4294967295|o>>>23),o=i+(e^n&(s^e))+r[15]+3634488961&4294967295,i=s+(o<<14&4294967295|o>>>18),o=n+(s^e&(i^s))+r[4]+3889429448&4294967295,n=i+(o<<20&4294967295|o>>>12),o=e+(i^s&(n^i))+r[9]+568446438&4294967295,e=n+(o<<5&4294967295|o>>>27),o=s+(n^i&(e^n))+r[14]+3275163606&4294967295,s=e+(o<<9&4294967295|o>>>23),o=i+(e^n&(s^e))+r[3]+4107603335&4294967295,i=s+(o<<14&4294967295|o>>>18),o=n+(s^e&(i^s))+r[8]+1163531501&4294967295,n=i+(o<<20&4294967295|o>>>12),o=e+(i^s&(n^i))+r[13]+2850285829&4294967295,e=n+(o<<5&4294967295|o>>>27),o=s+(n^i&(e^n))+r[2]+4243563512&4294967295,s=e+(o<<9&4294967295|o>>>23),o=i+(e^n&(s^e))+r[7]+1735328473&4294967295,i=s+(o<<14&4294967295|o>>>18),o=n+(s^e&(i^s))+r[12]+2368359562&4294967295,o=e+((n=i+(o<<20&4294967295|o>>>12))^i^s)+r[5]+4294588738&4294967295,o=s+((e=n+(o<<4&4294967295|o>>>28))^n^i)+r[8]+2272392833&4294967295,o=i+((s=e+(o<<11&4294967295|o>>>21))^e^n)+r[11]+1839030562&4294967295,o=n+((i=s+(o<<16&4294967295|o>>>16))^s^e)+r[14]+4259657740&4294967295,o=e+((n=i+(o<<23&4294967295|o>>>9))^i^s)+r[1]+2763975236&4294967295,o=s+((e=n+(o<<4&4294967295|o>>>28))^n^i)+r[4]+1272893353&4294967295,o=i+((s=e+(o<<11&4294967295|o>>>21))^e^n)+r[7]+4139469664&4294967295,o=n+((i=s+(o<<16&4294967295|o>>>16))^s^e)+r[10]+3200236656&4294967295,o=e+((n=i+(o<<23&4294967295|o>>>9))^i^s)+r[13]+681279174&4294967295,o=s+((e=n+(o<<4&4294967295|o>>>28))^n^i)+r[0]+3936430074&4294967295,o=i+((s=e+(o<<11&4294967295|o>>>21))^e^n)+r[3]+3572445317&4294967295,o=n+((i=s+(o<<16&4294967295|o>>>16))^s^e)+r[6]+76029189&4294967295,o=e+((n=i+(o<<23&4294967295|o>>>9))^i^s)+r[9]+3654602809&4294967295,o=s+((e=n+(o<<4&4294967295|o>>>28))^n^i)+r[12]+3873151461&4294967295,o=i+((s=e+(o<<11&4294967295|o>>>21))^e^n)+r[15]+530742520&4294967295,o=n+((i=s+(o<<16&4294967295|o>>>16))^s^e)+r[2]+3299628645&4294967295,n=i+(o<<23&4294967295|o>>>9),o=e+(i^(n|~s))+r[0]+4096336452&4294967295,e=n+(o<<6&4294967295|o>>>26),o=s+(n^(e|~i))+r[7]+1126891415&4294967295,s=e+(o<<10&4294967295|o>>>22),o=i+(e^(s|~n))+r[14]+2878612391&4294967295,i=s+(o<<15&4294967295|o>>>17),o=n+(s^(i|~e))+r[5]+4237533241&4294967295,n=i+(o<<21&4294967295|o>>>11),o=e+(i^(n|~s))+r[12]+1700485571&4294967295,e=n+(o<<6&4294967295|o>>>26),o=s+(n^(e|~i))+r[3]+2399980690&4294967295,s=e+(o<<10&4294967295|o>>>22),o=i+(e^(s|~n))+r[10]+4293915773&4294967295,i=s+(o<<15&4294967295|o>>>17),o=n+(s^(i|~e))+r[1]+2240044497&4294967295,n=i+(o<<21&4294967295|o>>>11),o=e+(i^(n|~s))+r[8]+1873313359&4294967295,e=n+(o<<6&4294967295|o>>>26),o=s+(n^(e|~i))+r[15]+4264355552&4294967295,s=e+(o<<10&4294967295|o>>>22),o=i+(e^(s|~n))+r[6]+2734768916&4294967295,i=s+(o<<15&4294967295|o>>>17),o=n+(s^(i|~e))+r[13]+1309151649&4294967295,n=i+(o<<21&4294967295|o>>>11),o=e+(i^(n|~s))+r[4]+4149444226&4294967295,e=n+(o<<6&4294967295|o>>>26),o=s+(n^(e|~i))+r[11]+3174756917&4294967295,s=e+(o<<10&4294967295|o>>>22),o=i+(e^(s|~n))+r[2]+718787259&4294967295,i=s+(o<<15&4294967295|o>>>17),o=n+(s^(i|~e))+r[9]+3951481745&4294967295,t.g[0]=t.g[0]+e&4294967295,t.g[1]=t.g[1]+(i+(o<<21&4294967295|o>>>11))&4294967295,t.g[2]=t.g[2]+i&4294967295,t.g[3]=t.g[3]+s&4294967295}function n_(t,e){this.h=e;for(var n=[],r=!0,i=t.length-1;0<=i;i--){var s=0|t[i];r&&s==e||(n[i]=s,r=!1)}this.g=n}(a=e$.prototype).Oa=function(t){this.M=t},a.ha=function(t,e,n,r){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.I+"; newUri="+t);e=e?e.toUpperCase():"GET",this.I=t,this.j="",this.m=0,this.F=!1,this.h=!0,this.g=this.u?this.u.g():o.g(),this.C=this.u?tW(this.u):tW(o),this.g.onreadystatechange=m(this.La,this);try{this.G=!0,this.g.open(e,String(t),!0),this.G=!1}catch(t){eX(this,t);return}if(t=n||"",n=new Map(this.headers),r){if(Object.getPrototypeOf(r)===Object.prototype)for(var i in r)n.set(i,r[i]);else if("function"==typeof r.keys&&"function"==typeof r.get)for(let t of r.keys())n.set(t,r.get(t));else throw Error("Unknown input type for opt_headers: "+String(r))}for(let[s,o]of(r=Array.from(n.keys()).find(t=>"content-type"==t.toLowerCase()),i=c.FormData&&t instanceof c.FormData,!(0<=_(eq,e))||r||i||n.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),n))this.g.setRequestHeader(s,o);this.K&&(this.g.responseType=this.K),"withCredentials"in this.g&&this.g.withCredentials!==this.M&&(this.g.withCredentials=this.M);try{var s;eY(this),0=this.S)){var t=2*this.S;this.l.info("BP detection timer enabled: "+t),this.B=tH(m(this.jb,this),t)}},a.jb=function(){this.B&&(this.B=null,this.l.info("BP detection timeout reached."),this.l.info("Buffering proxy detected and switch to long-polling!"),this.G=!1,this.M=!0,tM(10),e6(this),ni(this))},a.ib=function(){null!=this.v&&(this.v=null,e6(this),nn(this),tM(19))},a.pb=function(t){t?(this.l.info("Successfully pinged google.com"),tM(2)):(this.l.info("Failed to ping google.com"),tM(1))},a.isActive=function(){return!!this.h&&this.h.isActive(this)},(a=nf.prototype).Ba=function(){},a.Aa=function(){},a.za=function(){},a.ya=function(){},a.isActive=function(){return!0},a.Va=function(){},nd.prototype.g=function(t,e){return new np(t,e)},y(np,th),np.prototype.m=function(){this.g.h=this.j,this.A&&(this.g.J=!0);var t=this.g,e=this.l,n=this.h||void 0;tM(0),t.Y=e,t.na=n||{},t.G=t.aa,t.I=nu(t,null,t.Y),e7(t)},np.prototype.close=function(){e4(this.g)},np.prototype.u=function(t){var e=this.g;if("string"==typeof t){var n={};n.__data__=t,t=n}else this.v&&((n={}).__data__=tf(t),t=n);e.j.push(new eR(e.fb++,t)),3==e.H&&e7(e)},np.prototype.N=function(){this.g.h=null,delete this.j,e4(this.g),delete this.g,np.$.N.call(this)},y(ng,tX),y(nm,tK),y(nb,nf),nb.prototype.Ba=function(){tu(this.g,"a")},nb.prototype.Aa=function(t){tu(this.g,new ng(t))},nb.prototype.za=function(t){tu(this.g,new nm)},nb.prototype.ya=function(){tu(this.g,"b")},y(ny,function(){this.blockSize=-1}),ny.prototype.reset=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.i=this.h=0},ny.prototype.j=function(t,e){void 0===e&&(e=t.length);for(var n=e-this.blockSize,r=this.m,i=this.h,s=0;sthis.h?this.blockSize:2*this.blockSize)-this.h);t[0]=128;for(var e=1;ee;++e)for(var r=0;32>r;r+=8)t[n++]=this.g[e]>>>r&255;return t};var nw={};function nE(t){return -128<=t&&128>t?Object.prototype.hasOwnProperty.call(nw,t)?nw[t]:nw[t]=new n_([0|t],0>t?-1:0):new n_([0|t],0>t?-1:0)}function nT(t){if(isNaN(t)||!isFinite(t))return nS;if(0>t)return nk(nT(-t));for(var e=[],n=1,r=0;t>=n;r++)e[r]=t/n|0,n*=nR;return new n_(e,0)}var nR=4294967296,nS=nE(0),nO=nE(1),nC=nE(16777216);function nI(t){if(0!=t.h)return!1;for(var e=0;e>>16,t[e]&=65535,e++}function nN(t,e){this.g=t,this.h=e}function nD(t,e){if(nI(e))throw Error("division by zero");if(nI(t))return new nN(nS,nS);if(nA(t))return e=nD(nk(t),e),new nN(nk(e.g),nk(e.h));if(nA(e))return e=nD(t,nk(e)),new nN(nk(e.g),e.h);if(30=r.X(t);)n=nj(n),r=nj(r);var i=nL(n,1),s=nL(r,1);for(r=nL(r,2),n=nL(n,2);!nI(r);){var o=s.add(r);0>=o.X(t)&&(i=i.add(n),s=o),r=nL(r,1),n=nL(n,1)}return e=nP(t,i.R(e)),new nN(i,e)}for(i=nS;0<=t.X(e);){for(r=48>=(r=Math.ceil(Math.log(n=Math.max(1,Math.floor(t.ea()/e.ea())))/Math.LN2))?1:Math.pow(2,r-48),o=(s=nT(n)).R(e);nA(o)||0>>31;return new n_(n,t.h)}function nL(t,e){var n=e>>5;e%=32;for(var r=t.g.length-n,i=[],s=0;s>>e|t.D(s+n+1)<<32-e:t.D(s+n);return new n_(i,t.h)}(a=n_.prototype).ea=function(){if(nA(this))return-nk(this).ea();for(var t=0,e=1,n=0;n(t=t||10)||36>>0).toString(t);if(nI(n=i))return s+r;for(;6>s.length;)s="0"+s;r=s+r}},a.D=function(t){return 0>t?0:t>>16)+(this.D(i)>>>16)+(t.D(i)>>>16);r=o>>>16,s&=65535,o&=65535,n[i]=o<<16|s}return new n_(n,-2147483648&n[n.length-1]?-1:0)},a.R=function(t){if(nI(this)||nI(t))return nS;if(nA(this))return nA(t)?nk(this).R(nk(t)):nk(nk(this).R(t));if(nA(t))return nk(this.R(nk(t)));if(0>this.X(nC)&&0>t.X(nC))return nT(this.ea()*t.ea());for(var e=this.g.length+t.g.length,n=[],r=0;r<2*e;r++)n[r]=0;for(r=0;r>>16,o=65535&this.D(r),a=t.D(i)>>>16,l=65535&t.D(i);n[2*r+2*i]+=o*l,nx(n,2*r+2*i),n[2*r+2*i+1]+=s*l,nx(n,2*r+2*i+1),n[2*r+2*i+1]+=o*a,nx(n,2*r+2*i+1),n[2*r+2*i+2]+=s*a,nx(n,2*r+2*i+2)}for(r=0;r(n=n||10)||36o?(o=nT(Math.pow(n,o)),i=i.R(o).add(nT(a))):i=(i=i.R(r)).add(nT(a))}return i};var nU=h.createWebChannelTransport=function(){return new nd},nM=h.getStatEventTarget=function(){return tD()},nB=h.ErrorCode=tF,nH=h.EventType=tz,nF=h.Event=tx,nz=h.Stat={xb:0,Ab:1,Bb:2,Ub:3,Zb:4,Wb:5,Xb:6,Vb:7,Tb:8,Yb:9,PROXY:10,NOPROXY:11,Rb:12,Nb:13,Ob:14,Mb:15,Pb:16,Qb:17,tb:18,sb:19,ub:20};h.FetchXmlHttpFactory=eL;var n$=h.WebChannel=tV,nW=h.XhrIo=e$,nV=h.Md5=ny,nq=h.Integer=n_},6142:function(t,e,n){"use strict";n.d(e,{ZF:function(){return r.ZF}});var r=n(5723);/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */(0,r.KN)("firebase","10.8.0","app")},2730:function(t,e,n){"use strict";n.d(e,{hJ:function(){return r.X},v0:function(){return r.o},rh:function(){return r.c},w7:function(){return r.C}});var r=n(5554);n(8954),n(5723),n(9858),n(6574)},8121:function(t,e,n){"use strict";n.d(e,{ET:function(){return r.ET},IO:function(){return r.IO},JU:function(){return r.JU},Jm:function(){return r.Jm},PL:function(){return r.PL},QT:function(){return r.QT},ad:function(){return r.ad},ar:function(){return r.ar},hJ:function(){return r.hJ},oe:function(){return r.oe},r7:function(){return r.r7}});var r=n(9009)},4905:function(t,e,n){"use strict";n.d(e,{oq:function(){return tE},Jt:function(){return tw},cF:function(){return tR},aF:function(){return t_},iH:function(){return tT},B0:function(){return tv}});var r,i,s,o,a=n(5723),l=n(8954),h=n(6574);/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let u="firebasestorage.googleapis.com",c="storageBucket";/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class f extends l.ZR{constructor(t,e,n=0){super(d(t),`Firebase Storage: ${e} (${d(t)})`),this.status_=n,this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,f.prototype)}get status(){return this.status_}set status(t){this.status_=t}_codeEquals(t){return d(t)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(t){this.customData.serverResponse=t,this.customData.serverResponse?this.message=`${this._baseMessage} +${this.customData.serverResponse}`:this.message=this._baseMessage}}function d(t){return"storage/"+t}function p(){return new f(s.UNKNOWN,"An unknown error occurred, please check the error payload for server response.")}function g(){return new f(s.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function m(){return new f(s.CANCELED,"User canceled the upload/download.")}function b(){return new f(s.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.")}function y(t){return new f(s.INVALID_ARGUMENT,t)}function v(){return new f(s.APP_DELETED,"The Firebase app was deleted.")}function _(t,e){return new f(s.INVALID_FORMAT,"String does not match format '"+t+"': "+e)}function w(t){throw new f(s.INTERNAL_ERROR,"Internal error: "+t)}(r=s||(s={})).UNKNOWN="unknown",r.OBJECT_NOT_FOUND="object-not-found",r.BUCKET_NOT_FOUND="bucket-not-found",r.PROJECT_NOT_FOUND="project-not-found",r.QUOTA_EXCEEDED="quota-exceeded",r.UNAUTHENTICATED="unauthenticated",r.UNAUTHORIZED="unauthorized",r.UNAUTHORIZED_APP="unauthorized-app",r.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",r.INVALID_CHECKSUM="invalid-checksum",r.CANCELED="canceled",r.INVALID_EVENT_NAME="invalid-event-name",r.INVALID_URL="invalid-url",r.INVALID_DEFAULT_BUCKET="invalid-default-bucket",r.NO_DEFAULT_BUCKET="no-default-bucket",r.CANNOT_SLICE_BLOB="cannot-slice-blob",r.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",r.NO_DOWNLOAD_URL="no-download-url",r.INVALID_ARGUMENT="invalid-argument",r.INVALID_ARGUMENT_COUNT="invalid-argument-count",r.APP_DELETED="app-deleted",r.INVALID_ROOT_OPERATION="invalid-root-operation",r.INVALID_FORMAT="invalid-format",r.INTERNAL_ERROR="internal-error",r.UNSUPPORTED_ENVIRONMENT="unsupported-environment";/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class E{constructor(t,e){this.bucket=t,this.path_=e}get path(){return this.path_}get isRoot(){return 0===this.path.length}fullServerUrl(){let t=encodeURIComponent;return"/b/"+t(this.bucket)+"/o/"+t(this.path)}bucketOnlyServerUrl(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}static makeFromBucketSpec(t,e){let n;try{n=E.makeFromUrl(t,e)}catch(e){return new E(t,"")}if(""===n.path)return n;throw new f(s.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+t+"'.")}static makeFromUrl(t,e){let n=null,r="([A-Za-z0-9.\\-_]+)",i=RegExp("^gs://"+r+"(/(.*))?$","i");function o(t){t.path_=decodeURIComponent(t.path)}let a=e.replace(/[.]/g,"\\."),l=[{regex:i,indices:{bucket:1,path:3},postModify:function(t){"/"===t.path.charAt(t.path.length-1)&&(t.path_=t.path_.slice(0,-1))}},{regex:RegExp(`^https?://${a}/v[A-Za-z0-9_]+/b/${r}/o(/([^?#]*).*)?$`,"i"),indices:{bucket:1,path:3},postModify:o},{regex:RegExp(`^https?://${e===u?"(?:storage.googleapis.com|storage.cloud.google.com)":e}/${r}/([^?#]*)`,"i"),indices:{bucket:1,path:2},postModify:o}];for(let e=0;en)throw y(`Invalid value for '${t}'. Expected ${n} or less.`)}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function I(t,e,n){let r=e;return null==n&&(r=`https://${e}`),`${n}://${r}/v0${t}`}function A(t){let e=encodeURIComponent,n="?";for(let r in t)t.hasOwnProperty(r)&&(n=n+(e(r)+"=")+e(t[r])+"&");return n.slice(0,-1)}/** + * @license + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function k(t,e){let n=t>=500&&t<600,r=-1!==[408,429].indexOf(t),i=-1!==e.indexOf(t);return n||r||i}(i=o||(o={}))[i.NO_ERROR=0]="NO_ERROR",i[i.NETWORK_ERROR=1]="NETWORK_ERROR",i[i.ABORT=2]="ABORT";/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class P{constructor(t,e,n,r,i,s,o,a,l,h,u,c=!0){this.url_=t,this.method_=e,this.headers_=n,this.body_=r,this.successCodes_=i,this.additionalRetryCodes_=s,this.callback_=o,this.errorCallback_=a,this.timeout_=l,this.progressCallback_=h,this.connectionFactory_=u,this.retry=c,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((t,e)=>{this.resolve_=t,this.reject_=e,this.start_()})}start_(){let t=(t,e)=>{let n=this.resolve_,r=this.reject_,i=e.connection;if(e.wasSuccessCode)try{let t=this.callback_(i,i.getResponse());void 0!==t?n(t):n()}catch(t){r(t)}else if(null!==i){let t=p();t.serverResponse=i.getErrorText(),r(this.errorCallback_?this.errorCallback_(i,t):t)}else r(e.canceled?this.appDelete_?v():m():g())};this.canceled_?t(!1,new x(!1,null,!0)):this.backoffId_=/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function(t,e,n){let r=1,i=null,s=null,o=!1,a=0,l=!1;function h(...t){l||(l=!0,e.apply(null,t))}function u(e){i=setTimeout(()=>{i=null,t(f,2===a)},e)}function c(){s&&clearTimeout(s)}function f(t,...e){let n;if(l){c();return}if(t||2===a||o){c(),h.call(null,t,...e);return}r<64&&(r*=2),1===a?(a=2,n=0):n=(r+Math.random())*1e3,u(n)}let d=!1;function p(t){!d&&(d=!0,c(),!l&&(null!==i?(t||(a=2),clearTimeout(i),u(0)):t||(a=1)))}return u(0),s=setTimeout(()=>{o=!0,p(!0)},n),p}((t,e)=>{if(e){t(!1,new x(!1,null,!0));return}let n=this.connectionFactory_();this.pendingConnection_=n;let r=t=>{let e=t.loaded,n=t.lengthComputable?t.total:-1;null!==this.progressCallback_&&this.progressCallback_(e,n)};null!==this.progressCallback_&&n.addUploadProgressListener(r),n.send(this.url_,this.method_,this.body_,this.headers_).then(()=>{null!==this.progressCallback_&&n.removeUploadProgressListener(r),this.pendingConnection_=null;let e=n.getErrorCode()===o.NO_ERROR,i=n.getStatus();if(!e||k(i,this.additionalRetryCodes_)&&this.retry){t(!1,new x(!1,null,n.getErrorCode()===o.ABORT));return}t(!0,new x(-1!==this.successCodes_.indexOf(i),n))})},t,this.timeout_)}getPromise(){return this.promise_}cancel(t){this.canceled_=!0,this.appDelete_=t||!1,null!==this.backoffId_&&(0,this.backoffId_)(!1),null!==this.pendingConnection_&&this.pendingConnection_.abort()}}class x{constructor(t,e,n){this.wasSuccessCode=t,this.connection=e,this.canceled=!!n}}function N(...t){let e="undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:void 0;if(void 0!==e){let n=new e;for(let e=0;e>6,128|63&r):(64512&r)==55296?n>18,128|r>>12&63,128|r>>6&63,128|63&r)):e.push(239,191,189):(64512&r)==56320?e.push(239,191,189):e.push(224|r>>12,128|r>>6&63,128|63&r)}return new Uint8Array(e)}function U(t,e){let n;switch(t){case D.BASE64:{let n=-1!==e.indexOf("-"),r=-1!==e.indexOf("_");if(n||r)throw _(t,"Invalid character '"+(n?"-":"_")+"' found: is it base64url encoded?");break}case D.BASE64URL:{let n=-1!==e.indexOf("+"),r=-1!==e.indexOf("/");if(n||r)throw _(t,"Invalid character '"+(n?"+":"/")+"' found: is it base64 encoded?");e=e.replace(/-/g,"+").replace(/_/g,"/")}}try{n=/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function(t){if("undefined"==typeof atob)throw new f(s.UNSUPPORTED_ENVIRONMENT,"base-64 is missing. Make sure to install the required polyfills. See https://firebase.google.com/docs/web/environments-js-sdk#polyfills for more information.");return atob(t)}(e)}catch(e){if(e.message.includes("polyfill"))throw e;throw _(t,"Invalid character found")}let r=new Uint8Array(n.length);for(let t=0;t][;base64],");let r=n[1]||null;null!=r&&(this.base64=(e=";base64",r.length>=e.length&&r.substring(r.length-e.length)===e),this.contentType=this.base64?r.substring(0,r.length-7):r),this.rest=t.substring(t.indexOf(",")+1)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class B{constructor(t,e){let n=0,r="";S(t)?(this.data_=t,n=t.size,r=t.type):t instanceof ArrayBuffer?(e?this.data_=new Uint8Array(t):(this.data_=new Uint8Array(t.byteLength),this.data_.set(new Uint8Array(t))),n=this.data_.length):t instanceof Uint8Array&&(e?this.data_=t:(this.data_=new Uint8Array(t.length),this.data_.set(t)),n=t.length),this.size_=n,this.type_=r}size(){return this.size_}type(){return this.type_}slice(t,e){if(!S(this.data_))return new B(new Uint8Array(this.data_.buffer,t,e-t),!0);{var n;let r=(n=this.data_).webkitSlice?n.webkitSlice(t,e):n.mozSlice?n.mozSlice(t,e):n.slice?n.slice(t,e):null;return null===r?null:new B(r)}}static getBlob(...t){if(O()){let e=t.map(t=>t instanceof B?t.data_:t);return new B(N.apply(null,e))}{let e=t.map(t=>R(t)?function(t,e){switch(t){case D.RAW:return new j(L(e));case D.BASE64:case D.BASE64URL:return new j(U(t,e));case D.DATA_URL:return new j(function(t){let e=new M(t);return e.base64?U(D.BASE64,e.rest):function(t){let e;try{e=decodeURIComponent(t)}catch(t){throw _(D.DATA_URL,"Malformed data URL.")}return L(e)}(e.rest)}(e),new M(e).contentType)}throw p()}(D.RAW,t).data:t.data_),n=0;e.forEach(t=>{n+=t.byteLength});let r=new Uint8Array(n),i=0;return e.forEach(t=>{for(let e=0;e{Promise.resolve().then(()=>t(...e))}}class tl{constructor(){this.sent_=!1,this.xhr_=new XMLHttpRequest,this.initXhr(),this.errorCode_=o.NO_ERROR,this.sendPromise_=new Promise(t=>{this.xhr_.addEventListener("abort",()=>{this.errorCode_=o.ABORT,t()}),this.xhr_.addEventListener("error",()=>{this.errorCode_=o.NETWORK_ERROR,t()}),this.xhr_.addEventListener("load",()=>{t()})})}send(t,e,n,r){if(this.sent_)throw w("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(e,t,!0),void 0!==r)for(let t in r)r.hasOwnProperty(t)&&this.xhr_.setRequestHeader(t,r[t].toString());return void 0!==n?this.xhr_.send(n):this.xhr_.send(),this.sendPromise_}getErrorCode(){if(!this.sent_)throw w("cannot .getErrorCode() before sending");return this.errorCode_}getStatus(){if(!this.sent_)throw w("cannot .getStatus() before sending");try{return this.xhr_.status}catch(t){return -1}}getResponse(){if(!this.sent_)throw w("cannot .getResponse() before sending");return this.xhr_.response}getErrorText(){if(!this.sent_)throw w("cannot .getErrorText() before sending");return this.xhr_.statusText}abort(){this.xhr_.abort()}getResponseHeader(t){return this.xhr_.getResponseHeader(t)}addUploadProgressListener(t){null!=this.xhr_.upload&&this.xhr_.upload.addEventListener("progress",t)}removeUploadProgressListener(t){null!=this.xhr_.upload&&this.xhr_.upload.removeEventListener("progress",t)}}class th extends tl{initXhr(){this.xhr_.responseType="text"}}function tu(){return new th}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class tc{constructor(t,e,n=null){this._transferred=0,this._needToFetchStatus=!1,this._needToFetchMetadata=!1,this._observers=[],this._error=void 0,this._uploadUrl=void 0,this._request=void 0,this._chunkMultiplier=1,this._resolve=void 0,this._reject=void 0,this._ref=t,this._blob=e,this._metadata=n,this._mappings=V(),this._resumable=this._shouldDoResumable(this._blob),this._state="running",this._errorHandler=t=>{if(this._request=void 0,this._chunkMultiplier=1,t._codeEquals(s.CANCELED))this._needToFetchStatus=!0,this.completeTransitions_();else{let e=this.isExponentialBackoffExpired();if(k(t.status,[])){if(e)t=g();else{this.sleepTime=Math.max(2*this.sleepTime,1e3),this._needToFetchStatus=!0,this.completeTransitions_();return}}this._error=t,this._transition("error")}},this._metadataErrorHandler=t=>{this._request=void 0,t._codeEquals(s.CANCELED)?this.completeTransitions_():(this._error=t,this._transition("error"))},this.sleepTime=0,this.maxSleepTime=this._ref.storage.maxUploadRetryTime,this._promise=new Promise((t,e)=>{this._resolve=t,this._reject=e,this._start()}),this._promise.then(null,()=>{})}isExponentialBackoffExpired(){return this.sleepTime>this.maxSleepTime}_makeProgressCallback(){let t=this._transferred;return e=>this._updateProgress(t+e)}_shouldDoResumable(t){return t.size()>262144}_start(){"running"===this._state&&void 0===this._request&&(this._resumable?void 0===this._uploadUrl?this._createResumable():this._needToFetchStatus?this._fetchStatus():this._needToFetchMetadata?this._fetchMetadata():this.pendingTimeout=setTimeout(()=>{this.pendingTimeout=void 0,this._continueUpload()},this.sleepTime):this._oneShotUpload())}_resolveToken(t){Promise.all([this._ref.storage._getAuthToken(),this._ref.storage._getAppCheckToken()]).then(([e,n])=>{switch(this._state){case"running":t(e,n);break;case"canceling":this._transition("canceled");break;case"pausing":this._transition("paused")}})}_createResumable(){this._resolveToken((t,e)=>{let n=function(t,e,n,r,i){let s=e.bucketOnlyServerUrl(),o=te(e,r,i),a={name:o.fullPath},l=I(s,t.host,t._protocol),h={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":`${r.size()}`,"X-Goog-Upload-Header-Content-Type":o.contentType,"Content-Type":"application/json; charset=utf-8"},u=X(o,n),c=new J(l,"POST",function(t){let e;tr(t);try{e=t.getResponseHeader("X-Goog-Upload-URL")}catch(t){Y(!1)}return Y(R(e)),e},t.maxUploadRetryTime);return c.urlParams=a,c.headers=h,c.body=u,c.errorHandler=Q(e),c}(this._ref.storage,this._ref._location,this._mappings,this._blob,this._metadata),r=this._ref.storage._makeRequest(n,tu,t,e);this._request=r,r.getPromise().then(t=>{this._request=void 0,this._uploadUrl=t,this._needToFetchStatus=!1,this.completeTransitions_()},this._errorHandler)})}_fetchStatus(){let t=this._uploadUrl;this._resolveToken((e,n)=>{let r=function(t,e,n,r){let i=new J(n,"POST",function(t){let e=tr(t,["active","final"]),n=null;try{n=t.getResponseHeader("X-Goog-Upload-Size-Received")}catch(t){Y(!1)}n||Y(!1);let i=Number(n);return Y(!isNaN(i)),new tn(i,r.size(),"final"===e)},t.maxUploadRetryTime);return i.headers={"X-Goog-Upload-Command":"query"},i.errorHandler=Q(e),i}(this._ref.storage,this._ref._location,t,this._blob),i=this._ref.storage._makeRequest(r,tu,e,n);this._request=i,i.getPromise().then(t=>{this._request=void 0,this._updateProgress(t.current),this._needToFetchStatus=!1,t.finalized&&(this._needToFetchMetadata=!0),this.completeTransitions_()},this._errorHandler)})}_continueUpload(){let t=262144*this._chunkMultiplier,e=new tn(this._transferred,this._blob.size()),n=this._uploadUrl;this._resolveToken((r,i)=>{let o;try{o=function(t,e,n,r,i,o,a,l){let h=new tn(0,0);if(a?(h.current=a.current,h.total=a.total):(h.current=0,h.total=r.size()),r.size()!==h.total)throw new f(s.SERVER_FILE_WRONG_SIZE,"Server recorded incorrect upload file size, please retry the upload.");let u=h.total-h.current,c=u;i>0&&(c=Math.min(c,i));let d=h.current,p=d+c,g={"X-Goog-Upload-Command":0===c?"finalize":u===c?"upload, finalize":"upload","X-Goog-Upload-Offset":`${h.current}`},m=r.slice(d,p);if(null===m)throw b();let y=new J(n,"POST",function(t,n){let i;let s=tr(t,["active","final"]),a=h.current+c,l=r.size();return i="final"===s?Z(e,o)(t,n):null,new tn(a,l,"final"===s,i)},e.maxUploadRetryTime);return y.headers=g,y.body=m.uploadData(),y.progressCallback=l||null,y.errorHandler=Q(t),y}(this._ref._location,this._ref.storage,n,this._blob,t,this._mappings,e,this._makeProgressCallback())}catch(t){this._error=t,this._transition("error");return}let a=this._ref.storage._makeRequest(o,tu,r,i,!1);this._request=a,a.getPromise().then(t=>{this._increaseMultiplier(),this._request=void 0,this._updateProgress(t.current),t.finalized?(this._metadata=t.metadata,this._transition("success")):this.completeTransitions_()},this._errorHandler)})}_increaseMultiplier(){262144*this._chunkMultiplier*2<33554432&&(this._chunkMultiplier*=2)}_fetchMetadata(){this._resolveToken((t,e)=>{let n=function(t,e,n){let r=I(e.fullServerUrl(),t.host,t._protocol),i=t.maxOperationRetryTime,s=new J(r,"GET",Z(t,n),i);return s.errorHandler=tt(e),s}(this._ref.storage,this._ref._location,this._mappings),r=this._ref.storage._makeRequest(n,tu,t,e);this._request=r,r.getPromise().then(t=>{this._request=void 0,this._metadata=t,this._transition("success")},this._metadataErrorHandler)})}_oneShotUpload(){this._resolveToken((t,e)=>{let n=function(t,e,n,r,i){let s=e.bucketOnlyServerUrl(),o={"X-Goog-Upload-Protocol":"multipart"},a=function(){let t="";for(let e=0;e<2;e++)t+=Math.random().toString().slice(2);return t}();o["Content-Type"]="multipart/related; boundary="+a;let l=te(e,r,i),h="--"+a+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+X(l,n)+"\r\n--"+a+"\r\nContent-Type: "+l.contentType+"\r\n\r\n",u=B.getBlob(h,r,"\r\n--"+a+"--");if(null===u)throw b();let c={name:l.fullPath},f=I(s,t.host,t._protocol),d=t.maxUploadRetryTime,p=new J(f,"POST",Z(t,n),d);return p.urlParams=c,p.headers=o,p.body=u.uploadData(),p.errorHandler=Q(e),p}(this._ref.storage,this._ref._location,this._mappings,this._blob,this._metadata),r=this._ref.storage._makeRequest(n,tu,t,e);this._request=r,r.getPromise().then(t=>{this._request=void 0,this._metadata=t,this._updateProgress(this._blob.size()),this._transition("success")},this._errorHandler)})}_updateProgress(t){let e=this._transferred;this._transferred=t,this._transferred!==e&&this._notifyObservers()}_transition(t){if(this._state!==t)switch(t){case"canceling":case"pausing":this._state=t,void 0!==this._request?this._request.cancel():this.pendingTimeout&&(clearTimeout(this.pendingTimeout),this.pendingTimeout=void 0,this.completeTransitions_());break;case"running":let e="paused"===this._state;this._state=t,e&&(this._notifyObservers(),this._start());break;case"paused":case"error":case"success":this._state=t,this._notifyObservers();break;case"canceled":this._error=m(),this._state=t,this._notifyObservers()}}completeTransitions_(){switch(this._state){case"pausing":this._transition("paused");break;case"canceling":this._transition("canceled");break;case"running":this._start()}}get snapshot(){let t=ts(this._state);return{bytesTransferred:this._transferred,totalBytes:this._blob.size(),state:t,metadata:this._metadata,task:this,ref:this._ref}}on(t,e,n,r){let i=new to(e||void 0,n||void 0,r||void 0);return this._addObserver(i),()=>{this._removeObserver(i)}}then(t,e){return this._promise.then(t,e)}catch(t){return this.then(null,t)}_addObserver(t){this._observers.push(t),this._notifyObserver(t)}_removeObserver(t){let e=this._observers.indexOf(t);-1!==e&&this._observers.splice(e,1)}_notifyObservers(){this._finishPromise(),this._observers.slice().forEach(t=>{this._notifyObserver(t)})}_finishPromise(){if(void 0!==this._resolve){let t=!0;switch(ts(this._state)){case ti.SUCCESS:ta(this._resolve.bind(null,this.snapshot))();break;case ti.CANCELED:case ti.ERROR:ta(this._reject.bind(null,this._error))();break;default:t=!1}t&&(this._resolve=void 0,this._reject=void 0)}}_notifyObserver(t){switch(ts(this._state)){case ti.RUNNING:case ti.PAUSED:t.next&&ta(t.next.bind(t,this.snapshot))();break;case ti.SUCCESS:t.complete&&ta(t.complete.bind(t))();break;case ti.CANCELED:case ti.ERROR:default:t.error&&ta(t.error.bind(t,this._error))()}}resume(){let t="paused"===this._state||"pausing"===this._state;return t&&this._transition("running"),t}pause(){let t="running"===this._state;return t&&this._transition("pausing"),t}cancel(){let t="running"===this._state||"pausing"===this._state;return t&&this._transition("canceling"),t}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class tf{constructor(t,e){this._service=t,e instanceof E?this._location=e:this._location=E.makeFromUrl(e,t.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(t,e){return new tf(t,e)}get root(){let t=new E(this._location.bucket,"");return this._newRef(this._service,t)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return F(this._location.path)}get storage(){return this._service}get parent(){let t=/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function(t){if(0===t.length)return null;let e=t.lastIndexOf("/");return -1===e?"":t.slice(0,e)}(this._location.path);if(null===t)return null;let e=new E(this._location.bucket,t);return new tf(this._service,e)}_throwIfRoot(t){if(""===this._location.path)throw new f(s.INVALID_ROOT_OPERATION,"The operation '"+t+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}}async function td(t,e,n){let r=await function(t,e){null!=e&&"number"==typeof e.maxResults&&C("options.maxResults",1,1e3,e.maxResults);let n=e||{},r=function(t,e,n,r,i){var s;let o={};e.isRoot?o.prefix="":o.prefix=e.path+"/",n&&n.length>0&&(o.delimiter=n),r&&(o.pageToken=r),i&&(o.maxResults=i);let a=I(e.bucketOnlyServerUrl(),t.host,t._protocol),l=t.maxOperationRetryTime,h=new J(a,"GET",(s=e.bucket,function(e,n){let r=function(t,e,n){let r=H(n);return null===r?null:function(t,e,n){let r={prefixes:[],items:[],nextPageToken:n.nextPageToken};if(n[K])for(let i of n[K]){let n=i.replace(/\/$/,""),s=t._makeStorageReference(new E(e,n));r.prefixes.push(s)}if(n[G])for(let i of n[G]){let n=t._makeStorageReference(new E(e,i.name));r.items.push(n)}return r}(t,e,r)}(t,s,n);return Y(null!==r),r}),l);return h.urlParams=o,h.errorHandler=Q(e),h}(t.storage,t._location,"/",n.pageToken,n.maxResults);return t.storage.makeRequestWithTokens(r,tu)}(t,{pageToken:n});e.prefixes.push(...r.prefixes),e.items.push(...r.items),null!=r.nextPageToken&&await td(t,e,r.nextPageToken)}function tp(t,e){let n=null==e?void 0:e[c];return null==n?null:E.makeFromBucketSpec(n,t)}class tg{constructor(t,e,n,r,i){this.app=t,this._authProvider=e,this._appCheckProvider=n,this._url=r,this._firebaseVersion=i,this._bucket=null,this._host=u,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=12e4,this._maxUploadRetryTime=6e5,this._requests=new Set,null!=r?this._bucket=E.makeFromBucketSpec(r,this._host):this._bucket=tp(this._host,this.app.options)}get host(){return this._host}set host(t){this._host=t,null!=this._url?this._bucket=E.makeFromBucketSpec(this._url,t):this._bucket=tp(t,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(t){C("time",0,Number.POSITIVE_INFINITY,t),this._maxUploadRetryTime=t}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(t){C("time",0,Number.POSITIVE_INFINITY,t),this._maxOperationRetryTime=t}async _getAuthToken(){if(this._overrideAuthToken)return this._overrideAuthToken;let t=this._authProvider.getImmediate({optional:!0});if(t){let e=await t.getToken();if(null!==e)return e.accessToken}return null}async _getAppCheckToken(){let t=this._appCheckProvider.getImmediate({optional:!0});return t?(await t.getToken()).token:null}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEach(t=>t.cancel()),this._requests.clear()),Promise.resolve()}_makeStorageReference(t){return new tf(this,t)}_makeRequest(t,e,n,r,i=!0){if(this._deleted)return new T(v());{let s=function(t,e,n,r,i,s,o=!0){let a=A(t.urlParams),l=t.url+a,h=Object.assign({},t.headers);return e&&(h["X-Firebase-GMPID"]=e),null!==n&&n.length>0&&(h.Authorization="Firebase "+n),h["X-Firebase-Storage-Version"]="webjs/"+(null!=s?s:"AppManager"),null!==r&&(h["X-Firebase-AppCheck"]=r),new P(l,t.method,h,t.body,t.successCodes,t.additionalRetryCodes,t.handler,t.errorHandler,t.timeout,t.progressCallback,i,o)}(t,this._appId,n,r,e,this._firebaseVersion,i);return this._requests.add(s),s.getPromise().then(()=>this._requests.delete(s),()=>this._requests.delete(s)),s}}async makeRequestWithTokens(t,e){let[n,r]=await Promise.all([this._getAuthToken(),this._getAppCheckToken()]);return this._makeRequest(t,e,n,r).getPromise()}}let tm="@firebase/storage",tb="0.12.1",ty="storage";function tv(t,e,n){var r;return(r=t=(0,l.m9)(t))._throwIfRoot("uploadBytesResumable"),new tc(r,new B(e),n)}function t_(t){return function(t){let e={prefixes:[],items:[]};return td(t,e).then(()=>e)}(t=(0,l.m9)(t))}function tw(t){return function(t){t._throwIfRoot("getDownloadURL");let e=function(t,e,n){let r=new J(I(e.fullServerUrl(),t.host,t._protocol),"GET",function(e,r){let i=q(t,r,n);return Y(null!==i),function(t,e,n,r){let i=H(e);if(null===i||!R(i.downloadTokens))return null;let s=i.downloadTokens;if(0===s.length)return null;let o=encodeURIComponent;return s.split(",").map(e=>{let i=t.bucket,s=t.fullPath;return I("/b/"+o(i)+"/o/"+o(s),n,r)+A({alt:"media",token:e})})[0]}(i,r,t.host,t._protocol)},t.maxOperationRetryTime);return r.errorHandler=tt(e),r}(t.storage,t._location,V());return t.storage.makeRequestWithTokens(e,tu).then(t=>{if(null===t)throw new f(s.NO_DOWNLOAD_URL,"The given file does not have any download URLs.");return t})}(t=(0,l.m9)(t))}function tE(t){return function(t){t._throwIfRoot("deleteObject");let e=function(t,e){let n=new J(I(e.fullServerUrl(),t.host,t._protocol),"DELETE",function(t,e){},t.maxOperationRetryTime);return n.successCodes=[200,204],n.errorHandler=tt(e),n}(t.storage,t._location);return t.storage.makeRequestWithTokens(e,tu)}(t=(0,l.m9)(t))}function tT(t,e){return function(t,e){if(!(e&&/^[A-Za-z]+:\/\//.test(e)))return function t(e,n){if(e instanceof tg){if(null==e._bucket)throw new f(s.NO_DEFAULT_BUCKET,"No default bucket found. Did you set the '"+c+"' property when initializing the app?");let r=new tf(e,e._bucket);return null!=n?t(r,n):r}return void 0!==n?function(t,e){let n=function(t,e){let n=e.split("/").filter(t=>t.length>0).join("/");return 0===t.length?n:t+"/"+n}(t._location.path,e),r=new E(t._location.bucket,n);return new tf(t.storage,r)}(e,n):e}(t,e);if(t instanceof tg)return new tf(t,e);throw y("To use ref(service, url), the first argument must be a Storage instance.")}(t=(0,l.m9)(t),e)}function tR(t=(0,a.Mq)(),e){t=(0,l.m9)(t);let n=(0,a.qX)(t,ty).getImmediate({identifier:e}),r=(0,l.P0)("storage");return r&&function(t,e,n,r={}){!function(t,e,n,r={}){t.host=`${e}:${n}`,t._protocol="http";let{mockUserToken:i}=r;i&&(t._overrideAuthToken="string"==typeof i?i:(0,l.Sg)(i,t.app.options.projectId))}(t,e,n,r)}(n,...r),n}(0,a.Xd)(new h.wA(ty,function(t,{instanceIdentifier:e}){return new tg(t.getProvider("app").getImmediate(),t.getProvider("auth-internal"),t.getProvider("app-check-internal"),e,a.Jn)},"PUBLIC").setMultipleInstances(!0)),(0,a.KN)(tm,tb,""),(0,a.KN)(tm,tb,"esm2017")},9703:function(t,e,n){"use strict";function r(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);ie.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}n.d(e,{_T:function(){return r}}),"function"==typeof SuppressedError&&SuppressedError}}]); \ No newline at end of file diff --git a/out/_next/static/chunks/518-2b899c8b54bd7cfa.js b/out/_next/static/chunks/518-2b899c8b54bd7cfa.js new file mode 100644 index 0000000..98f3026 --- /dev/null +++ b/out/_next/static/chunks/518-2b899c8b54bd7cfa.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[518],{3194:function(e,t,i){"use strict";i.d(t,{I8:function(){return d},tO:function(){return c}});var n=i(3977),a=i(1259),s=i(6650),r=i(9828);let o=(0,n.ZF)({apiKey:"AIzaSyBWui1W0CBRAzvrMqHCOBUc3hMkmo3KkXw",authDomain:"tdt4140-prosjekt.firebaseapp.com",databaseURL:"https://tdt4140-prosjekt-default-rtdb.europe-west1.firebasedatabase.app",projectId:"tdt4140-prosjekt",storageBucket:"tdt4140-prosjekt.appspot.com",messagingSenderId:"807771308285",appId:"1:807771308285:web:43ebb655b020317c987e94"}),l=(0,r.ad)(o),c=(0,s.cF)(o),d=(0,a.v0)(o);class u{static getAuth(){return d}static getStorage(){return c}async getDestinations(){let e=(0,r.hJ)(l,"destinations");return(await (0,r.PL)(e)).docs.map(e=>({id:e.id,...e.data()}))}async getDestination(e){let t=(0,r.JU)(l,"destinations",e);return(await (0,r.QT)(t)).data()}async getReviewForDestinationUser(e,t){let i=(0,r.hJ)(l,"destinations",t,"reviews");return(await (0,r.PL)(i)).docs.map(e=>({reviewID:e.id,...e.data()})).filter(t=>t.userID===e)}async getReviewsForDestination(e){let t=(0,r.hJ)(l,"destinations",e,"reviews");return(await (0,r.PL)(t)).docs.map(e=>({reviewID:e.id,...e.data()}))}async addDestination(e,t,i,n,a){let s=(0,r.hJ)(l,"destinations");try{let o=await (0,r.ET)(s,{city:e,country:t,imgUrl:i,category:n,description:a||"",RatingCount:0,TotalRating:0}),l=(0,r.hJ)(o,"reviews");await (0,r.ET)(l,{})}catch(e){console.error(e)}}async getDestinationIDsForUser(e){let t=(0,r.hJ)(l,"user_destinations"),i=(0,r.IO)(t,(0,r.ar)("userID","==",e));return(await (0,r.PL)(i)).docs.map(e=>e.data().destinationID)}async getVisitedDestinations(e){let t=await e;if(0==t.length||null==t||void 0==t)return[];let i=(0,r.hJ)(l,"destinations"),n=(0,r.IO)(i,(0,r.ar)((0,r.Jm)(),"in",t));return(await (0,r.PL)(n)).docs.map(e=>({id:e.id,...e.data()}))}async editDestination(e,t,i,n){let a=(0,r.JU)(l,"destinations",e);try{await (0,r.r7)(a,{imgUrl:t,category:i,description:n})}catch(e){console.error(e)}}async deleteDestination(e){try{await (0,r.oe)((0,r.JU)(l,"destinations",e)),this.deleteAllReviews(e)}catch(e){console.log(e)}}async addReview(e,t,i,n,a){let s=(0,r.hJ)(l,"destinations",e,"reviews"),o=(0,r.JU)(l,"destinations",e),c=(await (0,r.QT)(o)).data();try{await (0,r.r7)(o,{TotalRating:(null==c?void 0:c.TotalRating)+t,RatingCount:(null==c?void 0:c.RatingCount)+1}),await (0,r.ET)(s,{rating:t,comment:i,email:n,userID:a})}catch(e){console.error(e)}}async updateReview(e,t,i,n){let a=(0,r.JU)(l,"destinations",e,"reviews",t),s=(0,r.JU)(l,"destinations",e,"reviews",t),o=(await (0,r.QT)(s)).data(),c=(0,r.JU)(l,"destinations",e),d=(await (0,r.QT)(c)).data();try{await (0,r.r7)(c,{TotalRating:(null==d?void 0:d.TotalRating)+i-(null==o?void 0:o.rating)}),await (0,r.r7)(a,{rating:i,comment:n})}catch(e){console.error(e)}}async deleteReview(e,t){let i=(0,r.JU)(l,"destinations",e,"reviews",t),n=(await (0,r.QT)(i)).data(),a=(0,r.JU)(l,"destinations",e),s=(await (0,r.QT)(a)).data();try{await (0,r.r7)(a,{TotalRating:(null==s?void 0:s.TotalRating)-(null==n?void 0:n.rating),RatingCount:(null==s?void 0:s.RatingCount)-1}),await (0,r.oe)((0,r.JU)(l,"destinations",e,"reviews",t))}catch(e){console.error(e)}}getAuthInstance(){return d}async setUserDestination(e,t){let i=(0,r.hJ)(l,"user_destinations");try{await (0,r.ET)(i,{destinationID:t,userID:e})}catch(e){console.error("Error creating user document:",e)}}async removeUserDestination(e,t){(await (0,r.PL)((0,r.IO)((0,r.hJ)(l,"user_destinations"),(0,r.ar)("userID","==",e),(0,r.ar)("destinationID","==",t)))).forEach(async e=>{await (0,r.oe)(e.ref)})}async checkIfVisited(e,t){if("string"!=typeof e)return!1;try{return!(await (0,r.PL)((0,r.IO)((0,r.hJ)(l,"user_destinations"),(0,r.ar)("userID","==",e),(0,r.ar)("destinationID","==",t)))).empty}catch(e){return console.error("Error checking if destination is visited:",e),!1}}async deleteAllReviews(e){let t=(0,r.hJ)(l,"destinations",e,"reviews");try{(await (0,r.PL)(t)).forEach(async e=>{await (0,r.oe)(e.ref)})}catch(e){console.error(e)}}async getDestinationsWithVisited(e){let t=(0,r.hJ)(l,"destinations"),i=await (0,r.PL)(t);if(void 0!==e){let t=[];for(let n of i.docs)await this.checkIfVisited(null==e?void 0:e.uid,n.id).then(e=>{t.push({id:n.id,visited:e,...n.data()})});return t}return i.docs.map(e=>({id:e.id,visited:!1,...e.data()}))}}t.ZP=u},6424:function(e,t,i){"use strict";var n=i(5893),a=i(7294),s=i(3194);i(376),t.Z=e=>{let{onClose:t,checkDuplicates:i,destinationList:r}=e,o=new s.ZP,[l,c]=(0,a.useState)(""),[d,u]=(0,a.useState)(""),[h,v]=(0,a.useState)(""),[m,g]=(0,a.useState)(""),[w,p]=(0,a.useState)(""),[x,j]=(0,a.useState)(""),[f,b]=(0,a.useState)(""),[y,N]=(0,a.useState)([]),D={Activities:["Hiking","Skiing","Sightseeing"],"Destination type":["City","Beach","Culture","Safari","Historical","Active"]},C=async()=>{let e=[];i(m,h,r)?b("This destination already exists"):""!==h&&""!==m&&""!==w&&""!==d&&""!==l?(e.push(l),e.push(d),y.map(t=>e.push(t)),await o.addDestination(h,m,w,e,x),null==t||t()):b("Fill inn all fields")};return(0,n.jsxs)("div",{id:"addDestination",className:"not-blur",children:[(0,n.jsx)("button",{id:"x-button",onClick:t,className:"not-blur",children:"X"}),(0,n.jsxs)("div",{id:"addDestination-inner",className:"not-blur",children:[(0,n.jsx)("h1",{className:"not-blur",children:"New travel destination"}),(0,n.jsx)("h5",{id:"statusMessage",className:"not-blur",children:f}),(0,n.jsxs)("form",{className:"not-blur",children:[(0,n.jsxs)("label",{className:"not-blur",children:["City:",(0,n.jsx)("input",{name:"city",className:"not-blur",onChange:e=>v(e.target.value)})]}),(0,n.jsxs)("label",{className:"not-blur",children:["Country:",(0,n.jsx)("input",{name:"country",className:"not-blur",onChange:e=>g(e.target.value)})]}),(0,n.jsxs)("label",{className:"not-blur",children:["Image url:",(0,n.jsx)("input",{name:"imgURL",className:"not-blur",onChange:e=>p(e.target.value)})]}),(0,n.jsx)("h3",{className:"not-blur",children:"Apply tags"}),(0,n.jsxs)("select",{className:"not-blur",defaultValue:"",onChange:e=>c(e.target.value),children:[(0,n.jsx)("option",{value:"",disabled:!0,children:"continent"}),(0,n.jsx)("option",{value:"africa",children:"Africa"}),(0,n.jsx)("option",{value:"asia",children:"Asia"}),(0,n.jsx)("option",{value:"europe",children:"Europe"}),(0,n.jsx)("option",{value:"northAmerica",children:"North-America"}),(0,n.jsx)("option",{value:"southAmerica",children:"South-America"}),(0,n.jsx)("option",{value:"oceania",children:"Oceania"})]}),(0,n.jsxs)("select",{className:"not-blur",defaultValue:"",onChange:e=>u(e.target.value),children:[(0,n.jsx)("option",{value:"",disabled:!0,children:"climate"}),(0,n.jsx)("option",{value:"continental",children:"Continental"}),(0,n.jsx)("option",{value:"dry",children:"Dry"}),(0,n.jsx)("option",{value:"polar",children:"Polar"}),(0,n.jsx)("option",{value:"temperate",children:"Temperate"}),(0,n.jsx)("option",{value:"tropical",children:"Tropical"})]}),(0,n.jsx)("div",{className:"not-blur",id:"checkbox-container",children:(()=>{let e=e=>{let t=e.target.value;e.target.checked?N(e=>[...e,t]):N(e=>e.filter(e=>e!==t))};return(0,n.jsx)(n.Fragment,{children:Object.entries(D).map(t=>{let[i,a]=t;return(0,n.jsxs)("div",{className:"not-blur",children:[(0,n.jsx)("h4",{className:"not-blur",children:i}),(0,n.jsx)("div",{className:"not-blur",id:"category-checkbox-container",children:a.map(t=>(0,n.jsxs)("label",{className:"not-blur",children:[(0,n.jsx)("input",{type:"checkbox",className:"not-blur",value:t,onChange:e}),t]},t))})]},i)})})})()})]}),(0,n.jsx)("h4",{className:"not-blur",children:"Description"}),(0,n.jsx)("textarea",{className:"not-blur",rows:12,cols:60,style:{resize:"none"},onChange:e=>j(e.target.value)}),(0,n.jsx)("button",{id:"addButton",className:"not-blur",onClick:C,children:" Add new destination "})]})]})}},343:function(e,t,i){"use strict";var n=i(5893),a=i(7294);i(8698);var s=i(3194),r=i(7576),o=i(6156),l=i(8429),c=i(9603),d=i(9417);t.Z=e=>{let{id:t,country:i,city:u,rating:h,tags:v,description:m,imgURL:g,admin:w,onClose:p,user:x,visited:j,onEdit:f,onDelete:b}=e,[y,N]=(0,a.useState)([]),[D,C]=(0,a.useState)(2.5),[I,k]=(0,a.useState)(""),[R,S]=(0,a.useState)(""),J=new s.ZP,[P,E]=(0,a.useState)(!1),[U,O]=(0,a.useState)(!1),[T,A]=(0,a.useState)(h),[Z,F]=(0,a.useState)(!1);(0,a.useEffect)(()=>{J.getReviewsForDestination(t).then(e=>{N(JSON.parse(JSON.stringify(e)))}),E(j)},[]),(0,a.useEffect)(()=>{J.getDestination(t).then(e=>{A((null==e?void 0:e.RatingCount)==0?0:(null==e?void 0:e.TotalRating)/(null==e?void 0:e.RatingCount)),F(!1)})},[Z]),(0,a.useEffect)(()=>{if(x){let e=y.filter(e=>e.userID===x.uid);0!==e.length&&(S(e[0].reviewID),k(e[0].comment),C(e[0].rating))}},[y]);let V=e=>{k(e.target.value)},_=()=>{J.updateReview(t,R,D,I).then(()=>{J.getReviewsForDestination(t).then(e=>{N(JSON.parse(JSON.stringify(e)))}),F(!0),O(!1)})},L=()=>{J.deleteReview(t,R).then(()=>{G()})},G=()=>{J.getReviewsForDestination(t).then(e=>{N(JSON.parse(JSON.stringify(e)))}),F(!0),O(!1),S(""),k(""),C(2.5)},B=()=>{confirm("Are you sure you want to delete this review?\nClick either OK or Cancel.")&&L()};return(0,n.jsxs)("div",{id:"modal-container",className:"not-blur",children:[(0,n.jsx)("button",{id:"x-button",onClick:p,className:"not-blur",children:"X"}),(0,n.jsx)("img",{src:g,alt:"Error",className:"not-blur"}),(0,n.jsxs)("div",{id:"admin-buttons",className:"not-blur",children:[w&&(0,n.jsxs)("button",{id:"edit-button",onClick:f,className:"not-blur",children:["Edit ",(0,n.jsx)(c.G,{id:"icon",className:"not-blur",icon:d.Yai})]}),w&&(0,n.jsxs)("button",{id:"delete-button",className:"not-blur",onClick:function(){confirm("Are you sure you want to delete this destination?\nClick either OK or Cancel.")&&b&&b()},children:["Delete",(0,n.jsx)(c.G,{id:"icon",className:"not-blur",icon:d.Vui})]})]}),(0,n.jsxs)("div",{id:"info-container",className:"not-blur",children:[(0,n.jsx)("div",{id:"title-container",className:"not-blur",children:(0,n.jsxs)("h1",{className:"not-blur",children:[u,", ",i]})}),(0,n.jsx)("div",{id:"visited-container",className:"addPadding not-blur",children:(0,n.jsx)(o.Z,{id:t,user:x,extraHandling:()=>G()})}),(0,n.jsx)("div",{id:"weather-display-container",className:"addPadding not-blur",children:(0,n.jsx)(l.Z,{country:i,city:u})}),(0,n.jsx)("div",{id:"rating-container",className:"addPadding not-blur",children:(0,n.jsx)(r.Z,{name:"average-rating",precision:.25,value:T,readOnly:!0})}),(0,n.jsx)("div",{id:"tag-container",className:"addPadding not-blur",children:v.length?"Tags: "+(null==v?void 0:v.join(", ")):"There are no tags for this destination"}),(0,n.jsx)("div",{id:"description-container",className:"addPadding not-blur",children:m||"No description for this destiantion"}),R?U?(0,n.jsx)("div",{children:y.filter(e=>e.reviewID===R).map(e=>(0,n.jsxs)("div",{id:"myrating-container",className:"addPadding not-blur",children:["Edit your review:",(0,n.jsx)("div",{id:"starRating",className:"not-blur",children:(0,n.jsx)(r.Z,{name:"half-rating",defaultValue:e.rating,precision:.5,onChange:(e,t)=>C(t)})}),(0,n.jsx)("textarea",{id:"review-destinations",rows:1,onChange:V,defaultValue:e.comment}),(0,n.jsxs)("div",{children:[(0,n.jsx)(c.G,{id:"back-review",className:"not-blur",icon:d.a0w,onClick:()=>O(!1)}),(0,n.jsx)(c.G,{id:"update-review",className:"not-blur",icon:d.fV7,onClick:_}),(0,n.jsx)(c.G,{id:"delete-review",className:"not-blur",icon:d.Vui,onClick:B})]})]},e.reviewID))}):(0,n.jsxs)("div",{id:"reviewfeed-container",className:"addPadding not-blur",children:[(0,n.jsx)("h3",{children:"My Review"}),(0,n.jsx)("hr",{}),y.filter(e=>e.reviewID===R).map(e=>(0,n.jsxs)("div",{style:{justifyContent:"space-between"},children:[(0,n.jsxs)("div",{id:"top-of-review",children:[(0,n.jsx)("div",{style:{opacity:.5},children:e.email}),(0,n.jsx)(c.G,{id:"edit-button",className:"not-blur",icon:d.Yai,onClick:()=>O(!0)})]}),(0,n.jsx)(r.Z,{style:{opacity:.5},name:"half-rating",value:e.rating,precision:.5,readOnly:!0}),(0,n.jsx)("div",{style:{opacity:.5},children:e.comment})]},e.reviewID))]}):(0,n.jsxs)("div",{id:"myrating-container",className:"addPadding not-blur",children:["Add review:",(0,n.jsx)("div",{id:"starRating",className:"not-blur",children:(0,n.jsx)(r.Z,{name:"half-rating",defaultValue:2.5,precision:.5,onChange:(e,t)=>C(t)})}),(0,n.jsx)("textarea",{id:"review-destinations",rows:1,value:I,onChange:V,placeholder:"Optional comment"}),(0,n.jsx)("button",{id:"submit-review",className:"addPadding not-blur",onClick:()=>{x&&!R&&J.checkIfVisited(x.uid,t).then(e=>{e?J.addReview(t,D,I,x.email,x.uid).then(()=>{F(!0)}).then(()=>{J.getReviewsForDestination(t).then(e=>{N(JSON.parse(JSON.stringify(e)))})}):alert("You can not give a review on a destination you have not visited.")})},children:"Submit"})]}),0!=y.filter(e=>""!==e.comment&&e.comment&&e.reviewID!==R).length&&(0,n.jsxs)("div",{id:"reviewfeed-container",className:"addPadding not-blur",children:[(0,n.jsx)("h3",{children:"All Reviews"}),y.filter(e=>""!==e.comment&&e.comment&&e.reviewID!==R).map(e=>(0,n.jsxs)("div",{children:[(0,n.jsx)("hr",{}),(0,n.jsxs)("div",{id:"singlereview-container",children:[(0,n.jsx)("div",{id:"top-of-review",children:e.email}),(0,n.jsx)(r.Z,{name:"half-rating",value:e.rating,precision:.5,readOnly:!0}),(0,n.jsx)("div",{children:e.comment})]})]},e.reviewID))]})]})]})}},8350:function(e,t,i){"use strict";var n=i(5893),a=i(7294);i(2098),t.Z=e=>{let{categories:t,onFilterChange:i}=e,[s,r]=(0,a.useState)([]),o=e=>{let t=s.includes(e)?s.filter(t=>t!==e):[...s,e];r(t),i(t)};return(0,n.jsx)("div",{id:"filterPanel-container",children:Object.entries(t).map(e=>{let[t,i]=e;return(0,n.jsxs)("div",{id:"menu-container",children:[(0,n.jsx)("h4",{children:t}),(0,n.jsx)("div",{id:"checkbox-container",children:i.map((e,t)=>(0,n.jsxs)("label",{children:[(0,n.jsx)("input",{type:"checkbox",value:e,checked:s.includes(e),onChange:()=>o(e)}),e]},t))})]},t)})})}},6156:function(e,t,i){"use strict";var n=i(5893),a=i(7294),s=i(3194);i(7834);var r=i(9603),o=i(9417);t.Z=e=>{let{user:t,id:i,extraHandling:l}=e,[c,d]=(0,a.useState)(!1),u=()=>{(async()=>{try{let e=new s.ZP,n=await e.checkIfVisited(null==t?void 0:t.uid,i);d(n)}catch(e){console.error("Error checking if visited:",e)}})()};u(),(0,a.useEffect)(()=>{u()},[]);let h=()=>{new s.ZP().removeUserDestination(null==t?void 0:t.uid,i).then(()=>{console.log("User removed from destination's list:",i),l()})},v=async e=>{e.stopPropagation();try{let e=new s.ZP;c?e.getReviewForDestinationUser(null==t?void 0:t.uid,i).then(t=>{t.length?!confirm("You have written a review for this destination, and can not have a review for a destination you have not visited.\n If you continue, the review will be deleted.")||e.deleteReview(i,t[0].reviewID).then(()=>{h()}):h()}):(await e.setUserDestination(null==t?void 0:t.uid,i),console.log("User added to destination's list:",i)),d(!c)}catch(e){console.error("Error handling checkbox change:",e)}};return(0,n.jsx)(n.Fragment,{children:c?(0,n.jsx)(r.G,{className:"visitedIcon",icon:o.wJh,onClick:v,style:{color:"#63E6BE"}}):(0,n.jsx)(r.G,{className:"visitedIcon",icon:o.wJh,onClick:v,style:{color:"#c0c0c0"}})})}},8429:function(e,t,i){"use strict";var n=i(5893),a=i(7294);i(8085);var s=i(5675),r=i.n(s);t.Z=e=>{let{country:t,city:i}=e,[s,o]=(0,a.useState)(0),[l,c]=(0,a.useState)([]);return(0,a.useEffect)(()=>{fetch("https://restcountries.com/v3.1/name/".concat(t)).then(e=>e.json()).then(e=>{let t=e[0].cca2,n="http://api.openweathermap.org/geo/1.0/direct?q=".concat(i,",").concat(t,"&limit=1&appid=971ff3c555137597d9b8ceea73588668");fetch(n).then(e=>e.json()).then(e=>{let t="https://api.met.no/weatherapi/locationforecast/2.0/compact?lat=".concat(e[0].lat,"&lon=").concat(e[0].lon);fetch(t).then(e=>e.json()).then(e=>{o(e.properties.timeseries[0].data.instant.details.air_temperature),c(e.properties.timeseries[0].data.next_1_hours.summary.symbol_code)}).catch(()=>console.log("Error fetching weather data"))}).catch(()=>console.log("Error fetching geolocation"))}).catch(()=>console.log("Error fetching country code"))}),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"temperatureContainer",children:[s,"\xb0C"]}),(0,n.jsx)("div",{className:"weatherIconContainer",children:0!=l.length?(0,n.jsx)(r(),{src:"/weatherIcons/".concat(l,".png"),alt:"".concat(l),width:200,height:200,style:{width:"auto",height:"100%"}}):(0,n.jsx)(n.Fragment,{})})]})}},376:function(){},8698:function(){},2098:function(){},7834:function(){},5428:function(){},8085:function(){}}]); \ No newline at end of file diff --git a/out/_next/static/chunks/660-fb0ebb274a947821.js b/out/_next/static/chunks/660-fb0ebb274a947821.js new file mode 100644 index 0000000..9c10054 --- /dev/null +++ b/out/_next/static/chunks/660-fb0ebb274a947821.js @@ -0,0 +1,22 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[660],{6937:function(e,t,n){"use strict";n.d(t,{Z:function(){return W}});var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t;this._insertTag(((t=document.createElement("style")).setAttribute("data-emotion",this.key),void 0!==this.nonce&&t.setAttribute("nonce",this.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t))}var n=this.tags[this.tags.length-1];if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t0?g[k]+" "+w:s(w,/&\f/g,g[k])).trim())&&(f[x++]=S);return v(e,t,n,0===i?_:c,f,d,m)}function T(e,t,n,r){return v(e,t,n,M,u(e,0,r),u(e,r+1,-1),r)}var $=function(e,t,n){for(var r=0,a=0;r=a,a=w(),38===r&&12===a&&(t[n]=1),!S(a);)k();return u(b,e,h)},Z=function(e,t){var n=-1,r=44;do switch(S(r)){case 0:38===r&&12===w()&&(t[n]=1),e[n]+=$(h-1,t,n);break;case 2:e[n]+=A(r);break;case 4:if(44===r){e[++n]=58===w()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=i(r)}while(r=k());return e},L=function(e,t){var n;return n=Z(O(e),t),b="",n},F=new WeakMap,D=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||F.get(n))&&!r){F.set(e,!0);for(var a=[],i=L(t,a),o=n.props,s=0,l=0;s-1&&!e.return)switch(e.type){case M:e.return=function e(t,n){switch(45^c(t,0)?(((n<<2^c(t,0))<<2^c(t,1))<<2^c(t,2))<<2^c(t,3):0){case 5103:return j+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return j+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return j+t+C+t+P+t+t;case 6828:case 4268:return j+t+P+t+t;case 6165:return j+t+P+"flex-"+t+t;case 5187:return j+t+s(t,/(\w+).+(:[^]+)/,j+"box-$1$2"+P+"flex-$1$2")+t;case 5443:return j+t+P+"flex-item-"+s(t,/flex-|-self/,"")+t;case 4675:return j+t+P+"flex-line-pack"+s(t,/align-content|flex-|-self/,"")+t;case 5548:return j+t+P+s(t,"shrink","negative")+t;case 5292:return j+t+P+s(t,"basis","preferred-size")+t;case 6060:return j+"box-"+s(t,"-grow","")+j+t+P+s(t,"grow","positive")+t;case 4554:return j+s(t,/([^-])(transform)/g,"$1"+j+"$2")+t;case 6187:return s(s(s(t,/(zoom-|grab)/,j+"$1"),/(image-set)/,j+"$1"),t,"")+t;case 5495:case 3959:return s(t,/(image-set\([^]*)/,j+"$1$`$1");case 4968:return s(s(t,/(.+:)(flex-)?(.*)/,j+"box-pack:$3"+P+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+j+t+t;case 4095:case 3583:case 4068:case 2532:return s(t,/(.+)-inline(.+)/,j+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(f(t)-1-n>6)switch(c(t,n+1)){case 109:if(45!==c(t,n+4))break;case 102:return s(t,/(.+:)(.+)-([^]+)/,"$1"+j+"$2-$3$1"+C+(108==c(t,n+3)?"$3":"$2-$3"))+t;case 115:return~l(t,"stretch")?e(s(t,"stretch","fill-available"),n)+t:t}break;case 4949:if(115!==c(t,n+1))break;case 6444:switch(c(t,f(t)-3-(~l(t,"!important")&&10))){case 107:return s(t,":",":"+j)+t;case 101:return s(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+j+(45===c(t,14)?"inline-":"")+"box$3$1"+j+"$2$3$1"+P+"$2box$3")+t}break;case 5936:switch(c(t,n+11)){case 114:return j+t+P+s(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return j+t+P+s(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return j+t+P+s(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return j+t+P+t+t}return t}(e.value,e.length);break;case R:return z([x(e,{value:s(e.value,"@","@"+j)})],r);case _:if(e.length)return e.props.map(function(t){var n;switch(n=t,(n=/(::plac\w+|:read-\w+)/.exec(n))?n[0]:n){case":read-only":case":read-write":return z([x(e,{props:[s(t,/:(read-\w+)/,":"+C+"$1")]})],r);case"::placeholder":return z([x(e,{props:[s(t,/:(plac\w+)/,":"+j+"input-$1")]}),x(e,{props:[s(t,/:(plac\w+)/,":"+C+"$1")]}),x(e,{props:[s(t,/:(plac\w+)/,P+"input-$1")]})],r)}return""}).join("")}}],W=function(e){var t,n,a,o,g,x=e.key;if("css"===x){var P=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(P,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var C=e.stylisPlugins||H,j={},_=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+x+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n2||S(y)>3?"":" "}(N);break;case 92:Y+=function(e,t){for(var n;--t&&k()&&!(y<48)&&!(y>102)&&(!(y>57)||!(y<65))&&(!(y>70)||!(y<97)););return n=h+(t<6&&32==w()&&32==k()),u(b,e,n)}(h-1,7);continue;case 47:switch(w()){case 42:case 47:d(v(C=function(e,t){for(;k();)if(e+y===57)break;else if(e+y===84&&47===w())break;return"/*"+u(b,t,h-1)+"*"+i(47===e?e:k())}(k(),h),n,r,E,i(y),u(C,2,-2),0),P);break;default:Y+="/"}break;case 123*$:O[j++]=f(Y)*L;case 125*$:case 59:case 0:switch(F){case 0:case 125:Z=0;case 59+_:-1==L&&(Y=s(Y,/\f/g,"")),z>0&&f(Y)-M&&d(z>32?T(Y+";",a,r,M-1):T(s(Y," ","")+";",a,r,M-2),P);break;case 59:Y+=";";default:if(d(W=I(Y,n,r,j,_,o,O,D,B=[],H=[],M),g),123===F){if(0===_)e(Y,n,W,W,B,g,M,O,H);else switch(99===R&&110===c(Y,3)?100:R){case 100:case 108:case 109:case 115:e(t,W,W,a&&d(I(t,W,W,0,0,o,O,D,o,B=[],M),H),o,H,M,O,a?B:H);break;default:e(Y,W,W,W,[""],H,0,O,H)}}}j=_=z=0,$=L=1,D=Y="",M=x;break;case 58:M=1+f(Y),z=N;default:if($<1){if(123==F)--$;else if(125==F&&0==$++&&125==(y=h>0?c(b,--h):0,p--,10===y&&(p=1,m--),y))continue}switch(Y+=i(F),F*$){case 38:L=_>0?1:(Y+="\f",-1);break;case 44:O[j++]=(f(Y)-1)*L,L=1;break;case 64:45===w()&&(Y+=A(k())),R=w(),_=M=f(D=Y+=function(e){for(;!S(w());)k();return u(b,e,h)}(h)),F++;break;case 45:45===N&&2==f(Y)&&($=0)}}return g}("",null,null,null,[""],t=O(t=e),0,[0],t),b="",n),M)},$={key:x,sheet:new r({key:x,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:j,registered:{},insert:function(e,t,n,r){g=n,R(e?e+"{"+t.styles+"}":t.styles),r&&($.inserted[t.name]=!0)}};return $.sheet.hydrate(_),$}},3487:function(e,t,n){"use strict";function r(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}n.d(t,{Z:function(){return r}})},2050:function(e,t,n){"use strict";n.d(t,{C:function(){return s},T:function(){return c},i:function(){return i},w:function(){return l}});var r=n(2265),a=n(6937);n(2892),n(8006);var i=!0,o=r.createContext("undefined"!=typeof HTMLElement?(0,a.Z)({key:"css"}):null),s=o.Provider,l=function(e){return(0,r.forwardRef)(function(t,n){return e(t,(0,r.useContext)(o),n)})};i||(l=function(e){return function(t){var n=(0,r.useContext)(o);return null===n?(n=(0,a.Z)({key:"css"}),r.createElement(o.Provider,{value:n},e(t,n))):e(t,n)}});var c=r.createContext({})},2892:function(e,t,n){"use strict";n.d(t,{O:function(){return p}});var r,a={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},i=n(3487),o=/[A-Z]|^ms/g,s=/_EMO_([^_]+?)_([^]*?)_EMO_/g,l=function(e){return 45===e.charCodeAt(1)},c=function(e){return null!=e&&"boolean"!=typeof e},u=(0,i.Z)(function(e){return l(e)?e:e.replace(o,"-$&").toLowerCase()}),f=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(s,function(e,t,n){return r={name:t,styles:n,next:r},t})}return 1===a[e]||l(e)||"number"!=typeof t||0===t?t:t+"px"};function d(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return r={name:n.name,styles:n.styles,next:r},n.name;if(void 0!==n.styles){var a=n.next;if(void 0!==a)for(;void 0!==a;)r={name:a.name,styles:a.styles,next:r},a=a.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var a=0;a=4;++r,a-=4)t=(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))*1540483477+((t>>>16)*59797<<16),t^=t>>>24,n=(65535&t)*1540483477+((t>>>16)*59797<<16)^(65535&n)*1540483477+((n>>>16)*59797<<16);switch(a){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n^=255&e.charCodeAt(r),n=(65535&n)*1540483477+((n>>>16)*59797<<16)}return n^=n>>>13,(((n=(65535&n)*1540483477+((n>>>16)*59797<<16))^n>>>15)>>>0).toString(36)}(o)+c,styles:o,next:r}}},8006:function(e,t,n){"use strict";n.d(t,{L:function(){return o},j:function(){return s}});var r,a=n(2265),i=!!(r||(r=n.t(a,2))).useInsertionEffect&&(r||(r=n.t(a,2))).useInsertionEffect,o=i||function(e){return e()},s=i||a.useLayoutEffect},8024:function(e,t,n){"use strict";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 a(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n0;)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[62*Math.random()|0];return t}function em(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function ep(e){return e.classList?em(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(e){return e})}function eg(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function eh(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function ey(e){return e.size!==ef.size||e.x!==ef.x||e.y!==ef.y||e.rotate!==ef.rotate||e.flipX||e.flipY}function eb(){var e=ec.cssPrefix,t=ec.replacementClass,n=':root, :host {\n --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Solid";\n --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Regular";\n --fa-font-light: normal 300 1em/1 "Font Awesome 6 Light";\n --fa-font-thin: normal 100 1em/1 "Font Awesome 6 Thin";\n --fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone";\n --fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-light: normal 300 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-thin: normal 100 1em/1 "Font Awesome 6 Sharp";\n --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands";\n}\n\nsvg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {\n overflow: visible;\n box-sizing: content-box;\n}\n\n.svg-inline--fa {\n display: var(--fa-display, inline-block);\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n}\n.svg-inline--fa.fa-2xs {\n vertical-align: 0.1em;\n}\n.svg-inline--fa.fa-xs {\n vertical-align: 0em;\n}\n.svg-inline--fa.fa-sm {\n vertical-align: -0.0714285705em;\n}\n.svg-inline--fa.fa-lg {\n vertical-align: -0.2em;\n}\n.svg-inline--fa.fa-xl {\n vertical-align: -0.25em;\n}\n.svg-inline--fa.fa-2xl {\n vertical-align: -0.3125em;\n}\n.svg-inline--fa.fa-pull-left {\n margin-right: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-pull-right {\n margin-left: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-li {\n width: var(--fa-li-width, 2em);\n top: 0.25em;\n}\n.svg-inline--fa.fa-fw {\n width: var(--fa-fw-width, 1.25em);\n}\n\n.fa-layers svg.svg-inline--fa {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.fa-layers-counter, .fa-layers-text {\n display: inline-block;\n position: absolute;\n text-align: center;\n}\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -0.125em;\n width: 1em;\n}\n.fa-layers svg.svg-inline--fa {\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-counter {\n background-color: var(--fa-counter-background-color, #ff253a);\n border-radius: var(--fa-counter-border-radius, 1em);\n box-sizing: border-box;\n color: var(--fa-inverse, #fff);\n line-height: var(--fa-counter-line-height, 1);\n max-width: var(--fa-counter-max-width, 5em);\n min-width: var(--fa-counter-min-width, 1.5em);\n overflow: hidden;\n padding: var(--fa-counter-padding, 0.25em 0.5em);\n right: var(--fa-right, 0);\n text-overflow: ellipsis;\n top: var(--fa-top, 0);\n -webkit-transform: scale(var(--fa-counter-scale, 0.25));\n transform: scale(var(--fa-counter-scale, 0.25));\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n bottom: var(--fa-bottom, 0);\n right: var(--fa-right, 0);\n top: auto;\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: bottom right;\n transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n bottom: var(--fa-bottom, 0);\n left: var(--fa-left, 0);\n right: auto;\n top: auto;\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: bottom left;\n transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n top: var(--fa-top, 0);\n right: var(--fa-right, 0);\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-top-left {\n left: var(--fa-left, 0);\n right: auto;\n top: var(--fa-top, 0);\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: top left;\n transform-origin: top left;\n}\n\n.fa-1x {\n font-size: 1em;\n}\n\n.fa-2x {\n font-size: 2em;\n}\n\n.fa-3x {\n font-size: 3em;\n}\n\n.fa-4x {\n font-size: 4em;\n}\n\n.fa-5x {\n font-size: 5em;\n}\n\n.fa-6x {\n font-size: 6em;\n}\n\n.fa-7x {\n font-size: 7em;\n}\n\n.fa-8x {\n font-size: 8em;\n}\n\n.fa-9x {\n font-size: 9em;\n}\n\n.fa-10x {\n font-size: 10em;\n}\n\n.fa-2xs {\n font-size: 0.625em;\n line-height: 0.1em;\n vertical-align: 0.225em;\n}\n\n.fa-xs {\n font-size: 0.75em;\n line-height: 0.0833333337em;\n vertical-align: 0.125em;\n}\n\n.fa-sm {\n font-size: 0.875em;\n line-height: 0.0714285718em;\n vertical-align: 0.0535714295em;\n}\n\n.fa-lg {\n font-size: 1.25em;\n line-height: 0.05em;\n vertical-align: -0.075em;\n}\n\n.fa-xl {\n font-size: 1.5em;\n line-height: 0.0416666682em;\n vertical-align: -0.125em;\n}\n\n.fa-2xl {\n font-size: 2em;\n line-height: 0.03125em;\n vertical-align: -0.1875em;\n}\n\n.fa-fw {\n text-align: center;\n width: 1.25em;\n}\n\n.fa-ul {\n list-style-type: none;\n margin-left: var(--fa-li-margin, 2.5em);\n padding-left: 0;\n}\n.fa-ul > li {\n position: relative;\n}\n\n.fa-li {\n left: calc(var(--fa-li-width, 2em) * -1);\n position: absolute;\n text-align: center;\n width: var(--fa-li-width, 2em);\n line-height: inherit;\n}\n\n.fa-border {\n border-color: var(--fa-border-color, #eee);\n border-radius: var(--fa-border-radius, 0.1em);\n border-style: var(--fa-border-style, solid);\n border-width: var(--fa-border-width, 0.08em);\n padding: var(--fa-border-padding, 0.2em 0.25em 0.15em);\n}\n\n.fa-pull-left {\n float: left;\n margin-right: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-pull-right {\n float: right;\n margin-left: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-beat {\n -webkit-animation-name: fa-beat;\n animation-name: fa-beat;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-bounce {\n -webkit-animation-name: fa-bounce;\n animation-name: fa-bounce;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n}\n\n.fa-fade {\n -webkit-animation-name: fa-fade;\n animation-name: fa-fade;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-beat-fade {\n -webkit-animation-name: fa-beat-fade;\n animation-name: fa-beat-fade;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-flip {\n -webkit-animation-name: fa-flip;\n animation-name: fa-flip;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-shake {\n -webkit-animation-name: fa-shake;\n animation-name: fa-shake;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, linear);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin {\n -webkit-animation-name: fa-spin;\n animation-name: fa-spin;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 2s);\n animation-duration: var(--fa-animation-duration, 2s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, linear);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin-reverse {\n --fa-animation-direction: reverse;\n}\n\n.fa-pulse,\n.fa-spin-pulse {\n -webkit-animation-name: fa-spin;\n animation-name: fa-spin;\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, steps(8));\n animation-timing-function: var(--fa-animation-timing, steps(8));\n}\n\n@media (prefers-reduced-motion: reduce) {\n .fa-beat,\n.fa-bounce,\n.fa-fade,\n.fa-beat-fade,\n.fa-flip,\n.fa-pulse,\n.fa-shake,\n.fa-spin,\n.fa-spin-pulse {\n -webkit-animation-delay: -1ms;\n animation-delay: -1ms;\n -webkit-animation-duration: 1ms;\n animation-duration: 1ms;\n -webkit-animation-iteration-count: 1;\n animation-iteration-count: 1;\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n}\n@-webkit-keyframes fa-beat {\n 0%, 90% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 45% {\n -webkit-transform: scale(var(--fa-beat-scale, 1.25));\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@keyframes fa-beat {\n 0%, 90% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 45% {\n -webkit-transform: scale(var(--fa-beat-scale, 1.25));\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@-webkit-keyframes fa-bounce {\n 0% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n}\n@keyframes fa-bounce {\n 0% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n}\n@-webkit-keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@-webkit-keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@-webkit-keyframes fa-flip {\n 50% {\n -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@keyframes fa-flip {\n 50% {\n -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@-webkit-keyframes fa-shake {\n 0% {\n -webkit-transform: rotate(-15deg);\n transform: rotate(-15deg);\n }\n 4% {\n -webkit-transform: rotate(15deg);\n transform: rotate(15deg);\n }\n 8%, 24% {\n -webkit-transform: rotate(-18deg);\n transform: rotate(-18deg);\n }\n 12%, 28% {\n -webkit-transform: rotate(18deg);\n transform: rotate(18deg);\n }\n 16% {\n -webkit-transform: rotate(-22deg);\n transform: rotate(-22deg);\n }\n 20% {\n -webkit-transform: rotate(22deg);\n transform: rotate(22deg);\n }\n 32% {\n -webkit-transform: rotate(-12deg);\n transform: rotate(-12deg);\n }\n 36% {\n -webkit-transform: rotate(12deg);\n transform: rotate(12deg);\n }\n 40%, 100% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n}\n@keyframes fa-shake {\n 0% {\n -webkit-transform: rotate(-15deg);\n transform: rotate(-15deg);\n }\n 4% {\n -webkit-transform: rotate(15deg);\n transform: rotate(15deg);\n }\n 8%, 24% {\n -webkit-transform: rotate(-18deg);\n transform: rotate(-18deg);\n }\n 12%, 28% {\n -webkit-transform: rotate(18deg);\n transform: rotate(18deg);\n }\n 16% {\n -webkit-transform: rotate(-22deg);\n transform: rotate(-22deg);\n }\n 20% {\n -webkit-transform: rotate(22deg);\n transform: rotate(22deg);\n }\n 32% {\n -webkit-transform: rotate(-12deg);\n transform: rotate(-12deg);\n }\n 36% {\n -webkit-transform: rotate(12deg);\n transform: rotate(12deg);\n }\n 40%, 100% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n}\n@-webkit-keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n@keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n.fa-rotate-90 {\n -webkit-transform: rotate(90deg);\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n -webkit-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n -webkit-transform: rotate(270deg);\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n -webkit-transform: scale(-1, 1);\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n -webkit-transform: scale(1, -1);\n transform: scale(1, -1);\n}\n\n.fa-flip-both,\n.fa-flip-horizontal.fa-flip-vertical {\n -webkit-transform: scale(-1, -1);\n transform: scale(-1, -1);\n}\n\n.fa-rotate-by {\n -webkit-transform: rotate(var(--fa-rotate-angle, none));\n transform: rotate(var(--fa-rotate-angle, none));\n}\n\n.fa-stack {\n display: inline-block;\n vertical-align: middle;\n height: 2em;\n position: relative;\n width: 2.5em;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n z-index: var(--fa-stack-z-index, auto);\n}\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1.25em;\n}\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2.5em;\n}\n\n.fa-inverse {\n color: var(--fa-inverse, #fff);\n}\n\n.sr-only,\n.fa-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.sr-only-focusable:not(:focus),\n.fa-sr-only-focusable:not(:focus) {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.svg-inline--fa .fa-primary {\n fill: var(--fa-primary-color, currentColor);\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n fill: var(--fa-secondary-color, currentColor);\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n fill: black;\n}\n\n.fad.fa-inverse,\n.fa-duotone.fa-inverse {\n color: var(--fa-inverse, #fff);\n}';if("fa"!==e||t!==N){var r=RegExp("\\.".concat("fa","\\-"),"g"),a=RegExp("\\--".concat("fa","\\-"),"g"),i=RegExp("\\.".concat(N),"g");n=n.replace(r,".".concat(e,"-")).replace(a,"--".concat(e,"-")).replace(i,".".concat(t))}return n}var ev=!1;function ex(){ec.autoAddCss&&!ev&&(!function(e){if(e&&M){var t=j.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;for(var n=j.head.childNodes,r=null,a=n.length-1;a>-1;a--){var i=n[a];["STYLE","LINK"].indexOf((i.tagName||"").toUpperCase())>-1&&(r=i)}j.head.insertBefore(t,r)}}(eb()),ev=!0)}var ek=C||{};ek[z]||(ek[z]={}),ek[z].styles||(ek[z].styles={}),ek[z].hooks||(ek[z].hooks={}),ek[z].shims||(ek[z].shims=[]);var ew=ek[z],eS=[],eO=!1;function eA(e){var t,n=e.tag,r=e.attributes,a=e.children;return"string"==typeof e?eg(e):"<".concat(n," ").concat(Object.keys((t=void 0===r?{}:r)||{}).reduce(function(e,n){return e+"".concat(n,'="').concat(eg(t[n]),'" ')},"").trim(),">").concat((void 0===a?[]:a).map(eA).join(""),"")}function eP(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}!M||(eO=(j.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(j.readyState))||j.addEventListener("DOMContentLoaded",function e(){j.removeEventListener("DOMContentLoaded",e),eO=1,eS.map(function(e){return e()})});var eC=function(e,t,n,r){var a,i,o,s=Object.keys(e),l=s.length,c=void 0!==r?function(e,n,a,i){return t.call(r,e,n,a,i)}:t;for(void 0===n?(a=1,o=e[s[0]]):(a=0,o=n);a=55296&&a<=56319&&n2&&void 0!==arguments[2]?arguments[2]:{},r=n.skipHooks,i=eE(t);"function"!=typeof ew.hooks.addPack||void 0!==r&&r?ew.styles[e]=a(a({},ew.styles[e]||{}),i):ew.hooks.addPack(e,eE(t)),"fas"===e&&e_("fa",t)}var eM=ew.styles,eR=ew.shims,ez=(s(y={},B,Object.values(U[B])),s(y,H,Object.values(U[H])),y),eN=null,eI={},eT={},e$={},eZ={},eL={},eF=(s(b={},B,Object.keys(V[B])),s(b,H,Object.keys(V[H])),b),eD=function(){var e=function(e){return eC(eM,function(t,n,r){return t[r]=eC(n,e,{}),t},{})};eI=e(function(e,t,n){return t[3]&&(e[t[3]]=n),t[2]&&t[2].filter(function(e){return"number"==typeof e}).forEach(function(t){e[t.toString(16)]=n}),e}),eT=e(function(e,t,n){return e[n]=n,t[2]&&t[2].filter(function(e){return"string"==typeof e}).forEach(function(t){e[t]=n}),e}),eL=e(function(e,t,n){var r=t[2];return e[n]=n,r.forEach(function(t){e[t]=n}),e});var t="far"in eM||ec.autoFetchSvg,n=eC(eR,function(e,n){var r=n[0],a=n[1],i=n[2];return"far"!==a||t||(a="fas"),"string"==typeof r&&(e.names[r]={prefix:a,iconName:i}),"number"==typeof r&&(e.unicodes[r.toString(16)]={prefix:a,iconName:i}),e},{names:{},unicodes:{}});e$=n.names,eZ=n.unicodes,eN=eV(ec.styleDefault,{family:ec.familyDefault})};function eB(e,t){return(eI[e]||{})[t]}function eH(e,t){return(eL[e]||{})[t]}function eW(e){return e$[e]||{prefix:null,iconName:null}}eu.push(function(e){eN=eV(e.styleDefault,{family:ec.familyDefault})}),eD();var eY=function(){return{prefix:null,iconName:null,rest:[]}};function eV(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.family,r=void 0===n?B:n,a=V[r][e],i=G[r][e]||G[r][a],o=e in ew.styles?e:null;return i||o||null}var eG=(s(v={},B,Object.keys(U[B])),s(v,H,Object.keys(U[H])),v);function eU(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.skipLookups,a=void 0!==r&&r,i=(s(t={},B,"".concat(ec.cssPrefix,"-").concat(B)),s(t,H,"".concat(ec.cssPrefix,"-").concat(H)),t),o=null,l=B;(e.includes(i[B])||e.some(function(e){return eG[B].includes(e)}))&&(l=B),(e.includes(i[H])||e.some(function(e){return eG[H].includes(e)}))&&(l=H);var c=e.reduce(function(e,t){var n,r,s,c,u=(n=ec.cssPrefix,s=(r=t.split("-"))[0],c=r.slice(1).join("-"),s!==n||""===c||~ei.indexOf(c)?null:c);if(eM[t]?(o=t=ez[l].includes(t)?K[l][t]:t,e.prefix=t):eF[l].indexOf(t)>-1?(o=t,e.prefix=eV(t,{family:l})):u?e.iconName=u:t!==ec.replacementClass&&t!==i[B]&&t!==i[H]&&e.rest.push(t),!a&&e.prefix&&e.iconName){var f="fa"===o?eW(e.iconName):{},d=eH(e.prefix,e.iconName);f.prefix&&(o=null),e.iconName=f.iconName||d||e.iconName,e.prefix=f.prefix||e.prefix,"far"!==e.prefix||eM.far||!eM.fas||ec.autoFetchSvg||(e.prefix="fas")}return e},eY());return(e.includes("fa-brands")||e.includes("fab"))&&(c.prefix="fab"),(e.includes("fa-duotone")||e.includes("fad"))&&(c.prefix="fad"),!c.prefix&&l===H&&(eM.fass||ec.autoFetchSvg)&&(c.prefix="fass",c.iconName=eH(c.prefix,c.iconName)||c.iconName),("fa"===c.prefix||"fa"===o)&&(c.prefix=eN||"fas"),c}var eK=function(){var e,t;function n(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),this.definitions={}}return e=[{key:"add",value:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r0&&s.forEach(function(t){"string"==typeof t&&(e[a][t]=o)}),e[a][i]=o}),e}}],o(n.prototype,e),t&&o(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}(),eq=[],eX={},eJ={},eQ=Object.keys(eJ);function e0(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),a=2;a1?t-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:{};return M?(e1("beforeI2svg",e),e2("pseudoElements2svg",e),e2("i2svg",e)):Promise.reject("Operation requires a DOM of some kind.")},watch:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.autoReplaceSvgRoot;!1===ec.autoReplaceSvg&&(ec.autoReplaceSvg=!0),ec.observeMutations=!0,e=function(){e6({autoReplaceSvgRoot:n}),e1("watch",t)},M&&(eO?setTimeout(e,0):eS.push(e))}},parse:{icon:function(e){if(null===e)return null;if("object"===i(e)&&e.prefix&&e.iconName)return{prefix:e.prefix,iconName:eH(e.prefix,e.iconName)||e.iconName};if(Array.isArray(e)&&2===e.length){var t=0===e[1].indexOf("fa-")?e[1].slice(3):e[1],n=eV(e[0]);return{prefix:n,iconName:eH(n,t)||t}}if("string"==typeof e&&(e.indexOf("".concat(ec.cssPrefix,"-"))>-1||e.match(q))){var r=eU(e.split(" "),{skipLookups:!0});return{prefix:r.prefix||eN,iconName:eH(r.prefix,r.iconName)||r.iconName}}if("string"==typeof e){var a=eN;return{prefix:a,iconName:eH(a,e)||e}}}},library:e4,findIconDefinition:e5,toHtml:eA},e6=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.autoReplaceSvgRoot,n=void 0===t?j:t;(Object.keys(ew.styles).length>0||ec.autoFetchSvg)&&M&&ec.autoReplaceSvg&&e3.dom.i2svg({node:n})};function e9(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(e){return eA(e)})}}),Object.defineProperty(e,"node",{get:function(){if(M){var t=j.createElement("div");return t.innerHTML=e.html,t.children}}}),e}function e7(e){var t,n,r,i,o,s,l=e.icons,c=l.main,u=l.mask,f=e.prefix,d=e.iconName,m=e.transform,p=e.symbol,g=e.title,h=e.maskId,y=e.titleId,b=e.extra,v=e.watchable,x=u.found?u:c,k=x.width,w=x.height,S="fak"===f,O=[ec.replacementClass,d?"".concat(ec.cssPrefix,"-").concat(d):""].filter(function(e){return -1===b.classes.indexOf(e)}).filter(function(e){return""!==e||!!e}).concat(b.classes).join(" "),A={children:[],attributes:a(a({},b.attributes),{},{"data-prefix":f,"data-icon":d,class:O,role:b.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(k," ").concat(w)})},P=S&&!~b.classes.indexOf("fa-fw")?{width:"".concat(k/w*1,"em")}:{};void 0!==v&&v&&(A.attributes[I]=""),g&&(A.children.push({tag:"title",attributes:{id:A.attributes["aria-labelledby"]||"title-".concat(y||ed())},children:[g]}),delete A.attributes.title);var C=a(a({},A),{},{prefix:f,iconName:d,main:c,mask:u,maskId:h,transform:m,symbol:p,styles:a(a({},P),b.styles)}),j=u.found&&c.found?e2("generateAbstractMask",C)||{children:[],attributes:{}}:e2("generateAbstractIcon",C)||{children:[],attributes:{}},E=j.children,_=j.attributes;return(C.children=E,C.attributes=_,p)?(t=C.prefix,n=C.iconName,r=C.children,i=C.attributes,s=!0===(o=C.symbol)?"".concat(t,"-").concat(ec.cssPrefix,"-").concat(n):o,[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:a(a({},i),{},{id:s}),children:r}]}]):function(e){var t=e.children,n=e.main,r=e.mask,i=e.attributes,o=e.styles,s=e.transform;if(ey(s)&&n.found&&!r.found){var l={x:n.width/n.height/2,y:.5};i.style=eh(a(a({},o),{},{"transform-origin":"".concat(l.x+s.x/16,"em ").concat(l.y+s.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}(C)}function e8(e){var t,n,r,i,o,s,l,c=e.content,u=e.width,f=e.height,d=e.transform,m=e.title,p=e.extra,g=e.watchable,h=a(a(a({},p.attributes),m?{title:m}:{}),{},{class:p.classes.join(" ")});void 0!==g&&g&&(h[I]="");var y=a({},p.styles);ey(d)&&(y.transform=(n=(t={transform:d,startCentered:!0,width:u,height:f}).transform,r=t.width,i=t.height,s=void 0!==(o=t.startCentered)&&o,l="",s&&R?l+="translate(".concat(n.x/16-(void 0===r?16:r)/2,"em, ").concat(n.y/16-(void 0===i?16:i)/2,"em) "):s?l+="translate(calc(-50% + ".concat(n.x/16,"em), calc(-50% + ").concat(n.y/16,"em)) "):l+="translate(".concat(n.x/16,"em, ").concat(n.y/16,"em) "),l+="scale(".concat(n.size/16*(n.flipX?-1:1),", ").concat(n.size/16*(n.flipY?-1:1),") ")+"rotate(".concat(n.rotate,"deg) ")),y["-webkit-transform"]=y.transform);var b=eh(y);b.length>0&&(h.style=b);var v=[];return v.push({tag:"span",attributes:h,children:[c]}),m&&v.push({tag:"span",attributes:{class:"sr-only"},children:[m]}),v}var te=ew.styles;function tt(e){var t=e[0],n=e[1],r=l(e.slice(4),1)[0];return{found:!0,width:t,height:n,icon:Array.isArray(r)?{tag:"g",attributes:{class:"".concat(ec.cssPrefix,"-").concat(er.GROUP)},children:[{tag:"path",attributes:{class:"".concat(ec.cssPrefix,"-").concat(er.SECONDARY),fill:"currentColor",d:r[0]}},{tag:"path",attributes:{class:"".concat(ec.cssPrefix,"-").concat(er.PRIMARY),fill:"currentColor",d:r[1]}}]}:{tag:"path",attributes:{fill:"currentColor",d:r}}}}var tn={found:!1,width:512,height:512};function tr(e,t){var n=t;return"fa"===t&&null!==ec.styleDefault&&(t=eN),new Promise(function(r,i){if(e2("missingIconAbstract"),"fa"===n){var o,s,l=eW(e)||{};e=l.iconName||e,t=l.prefix||t}if(e&&t&&te[t]&&te[t][e])return r(tt(te[t][e]));o=e,s=t,D||ec.showMissingIcons||!o||console.error('Icon with name "'.concat(o,'" and prefix "').concat(s,'" is missing.')),r(a(a({},tn),{},{icon:ec.showMissingIcons&&e&&e2("missingIconAbstract")||{}}))})}var ta=function(){},ti=ec.measurePerformance&&_&&_.mark&&_.measure?_:{mark:ta,measure:ta},to='FA "6.5.1"',ts=function(e){ti.mark("".concat(to," ").concat(e," ends")),ti.measure("".concat(to," ").concat(e),"".concat(to," ").concat(e," begins"),"".concat(to," ").concat(e," ends"))},tl={begin:function(e){return ti.mark("".concat(to," ").concat(e," begins")),function(){return ts(e)}},end:ts},tc=function(){};function tu(e){return"string"==typeof(e.getAttribute?e.getAttribute(I):null)}function tf(e){return j.createElementNS("http://www.w3.org/2000/svg",e)}function td(e){return j.createElement(e)}var tm={replace:function(e){var t=e[0];if(t.parentNode){if(e[1].forEach(function(e){t.parentNode.insertBefore(function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.ceFn,a=void 0===r?"svg"===t.tag?tf:td:r;if("string"==typeof t)return j.createTextNode(t);var i=a(t.tag);return Object.keys(t.attributes||[]).forEach(function(e){i.setAttribute(e,t.attributes[e])}),(t.children||[]).forEach(function(t){i.appendChild(e(t,{ceFn:a}))}),i}(e),t)}),null===t.getAttribute(I)&&ec.keepOriginalSource){var n,r=j.createComment((n=" ".concat(t.outerHTML," "),n="".concat(n,"Font Awesome fontawesome.com ")));t.parentNode.replaceChild(r,t)}else t.remove()}},nest:function(e){var t=e[0],n=e[1];if(~ep(t).indexOf(ec.replacementClass))return tm.replace(e);var r=new RegExp("".concat(ec.cssPrefix,"-.*"));if(delete n[0].attributes.id,n[0].attributes.class){var a=n[0].attributes.class.split(" ").reduce(function(e,t){return t===ec.replacementClass||t.match(r)?e.toSvg.push(t):e.toNode.push(t),e},{toNode:[],toSvg:[]});n[0].attributes.class=a.toSvg.join(" "),0===a.toNode.length?t.removeAttribute("class"):t.setAttribute("class",a.toNode.join(" "))}var i=n.map(function(e){return eA(e)}).join("\n");t.setAttribute(I,""),t.innerHTML=i}};function tp(e){e()}function tg(e,t){var n="function"==typeof t?t:tc;if(0===e.length)n();else{var r=tp;"async"===ec.mutateApproach&&(r=C.requestAnimationFrame||tp),r(function(){var t=!0===ec.autoReplaceSvg?tm.replace:tm[ec.autoReplaceSvg]||tm.replace,r=tl.begin("mutate");e.map(t),r(),n()})}}var th=!1,ty=null;function tb(e){if(E&&ec.observeMutations){var t=e.treeCallback,n=void 0===t?tc:t,r=e.nodeCallback,a=void 0===r?tc:r,i=e.pseudoElementsCallback,o=void 0===i?tc:i,s=e.observeMutationsRoot,l=void 0===s?j:s;ty=new E(function(e){if(!th){var t=eN;em(e).forEach(function(e){if("childList"===e.type&&e.addedNodes.length>0&&!tu(e.addedNodes[0])&&(ec.searchPseudoElements&&o(e.target),n(e.target)),"attributes"===e.type&&e.target.parentNode&&ec.searchPseudoElements&&o(e.target.parentNode),"attributes"===e.type&&tu(e.target)&&~en.indexOf(e.attributeName)){if("class"===e.attributeName&&(i=(r=e.target).getAttribute?r.getAttribute($):null,s=r.getAttribute?r.getAttribute(Z):null,i&&s)){var r,i,s,l,c=eU(ep(e.target)),u=c.prefix,f=c.iconName;e.target.setAttribute($,u||t),f&&e.target.setAttribute(Z,f)}else(l=e.target)&&l.classList&&l.classList.contains&&l.classList.contains(ec.replacementClass)&&a(e.target)}})}}),M&&ty.observe(l,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function tv(e){var t,n,r,i,o,s,l,c,u,f,d,m=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{styleParser:!0},p=(r=e.getAttribute("data-prefix"),i=e.getAttribute("data-icon"),o=void 0!==e.innerText?e.innerText.trim():"",(s=eU(ep(e))).prefix||(s.prefix=eN),r&&i&&(s.prefix=r,s.iconName=i),s.iconName&&s.prefix||(s.prefix&&o.length>0&&(s.iconName=(t=s.prefix,n=e.innerText,(eT[t]||{})[n]||eB(s.prefix,ej(e.innerText)))),!s.iconName&&ec.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(s.iconName=e.firstChild.data)),s),g=p.iconName,h=p.prefix,y=p.rest,b=(l=em(e.attributes).reduce(function(e,t){return"class"!==e.name&&"style"!==e.name&&(e[t.name]=t.value),e},{}),c=e.getAttribute("title"),u=e.getAttribute("data-fa-title-id"),ec.autoA11y&&(c?l["aria-labelledby"]="".concat(ec.replacementClass,"-title-").concat(u||ed()):(l["aria-hidden"]="true",l.focusable="false")),l),v=e0("parseNodeAttributes",{},e),x=m.styleParser?(f=e.getAttribute("style"),d=[],f&&(d=f.split(";").reduce(function(e,t){var n=t.split(":"),r=n[0],a=n.slice(1);return r&&a.length>0&&(e[r]=a.join(":").trim()),e},{})),d):[];return a({iconName:g,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:h,transform:ef,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:y,styles:x,attributes:b}},v)}var tx=ew.styles;function tk(e){var t="nest"===ec.autoReplaceSvg?tv(e,{styleParser:!1}):tv(e);return~t.extra.classes.indexOf(X)?e2("generateLayersText",e,t):e2("generateSvgReplacementMutation",e,t)}var tw=new Set;function tS(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!M)return Promise.resolve();var n=j.documentElement.classList,r=function(e){return n.add("".concat(L,"-").concat(e))},a=function(e){return n.remove("".concat(L,"-").concat(e))},i=ec.autoFetchSvg?tw:W.map(function(e){return"fa-".concat(e)}).concat(Object.keys(tx));i.includes("fa")||i.push("fa");var o=[".".concat(X,":not([").concat(I,"])")].concat(i.map(function(e){return".".concat(e,":not([").concat(I,"])")})).join(", ");if(0===o.length)return Promise.resolve();var s=[];try{s=em(e.querySelectorAll(o))}catch(e){}if(!(s.length>0))return Promise.resolve();r("pending"),a("complete");var l=tl.begin("onTree"),c=s.reduce(function(e,t){try{var n=tk(t);n&&e.push(n)}catch(e){D||"MissingIcon"!==e.name||console.error(e)}return e},[]);return new Promise(function(e,n){Promise.all(c).then(function(n){tg(n,function(){r("active"),r("complete"),a("pending"),"function"==typeof t&&t(),l(),e()})}).catch(function(e){l(),n(e)})})}function tO(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;tk(e).then(function(e){e&&tg([e],t)})}W.map(function(e){tw.add("fa-".concat(e))}),Object.keys(V[B]).map(tw.add.bind(tw)),Object.keys(V[H]).map(tw.add.bind(tw)),tw=c(tw);var tA=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.transform,r=void 0===n?ef:n,i=t.symbol,o=void 0!==i&&i,s=t.mask,l=void 0===s?null:s,c=t.maskId,u=void 0===c?null:c,f=t.title,d=void 0===f?null:f,m=t.titleId,p=void 0===m?null:m,g=t.classes,h=void 0===g?[]:g,y=t.attributes,b=void 0===y?{}:y,v=t.styles,x=void 0===v?{}:v;if(e){var k=e.prefix,w=e.iconName,S=e.icon;return e9(a({type:"icon"},e),function(){return e1("beforeDOMElementCreation",{iconDefinition:e,params:t}),ec.autoA11y&&(d?b["aria-labelledby"]="".concat(ec.replacementClass,"-title-").concat(p||ed()):(b["aria-hidden"]="true",b.focusable="false")),e7({icons:{main:tt(S),mask:l?tt(l.icon):{found:!1,width:null,height:null,icon:{}}},prefix:k,iconName:w,transform:a(a({},ef),r),symbol:o,title:d,maskId:u,titleId:p,extra:{attributes:b,styles:x,classes:h}})})}},tP=RegExp('"',"ug");function tC(e,t){var n="".concat("data-fa-pseudo-element-pending").concat(t.replace(":","-"));return new Promise(function(r,i){if(null!==e.getAttribute(n))return r();var o=em(e.children).filter(function(e){return e.getAttribute(T)===t})[0],s=C.getComputedStyle(e,t),l=s.getPropertyValue("font-family").match(J),c=s.getPropertyValue("font-weight"),u=s.getPropertyValue("content");if(o&&!l)return e.removeChild(o),r();if(l&&"none"!==u&&""!==u){var f=s.getPropertyValue("content"),d=~["Sharp"].indexOf(l[2])?H:B,m=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(l[2])?G[d][l[2].toLowerCase()]:Q[d][c],p=(S=(k=x=f.replace(tP,"")).length,A=(O=k.charCodeAt(0))>=55296&&O<=56319&&S>1&&(w=k.charCodeAt(1))>=56320&&w<=57343?(O-55296)*1024+w-56320+65536:O,{value:(P=2===x.length&&x[0]===x[1])?ej(x[0]):ej(x),isSecondary:A>=1105920&&A<=1112319||P}),g=p.value,h=p.isSecondary,y=l[0].startsWith("FontAwesome"),b=eB(m,g),v=b;if(y){var x,k,w,S,O,A,P,E,_,M=(E=eZ[g],_=eB("fas",g),E||(_?{prefix:"fas",iconName:_}:null)||{prefix:null,iconName:null});M.iconName&&M.prefix&&(b=M.iconName,m=M.prefix)}if(!b||h||o&&o.getAttribute($)===m&&o.getAttribute(Z)===v)r();else{e.setAttribute(n,v),o&&e.removeChild(o);var R={iconName:null,title:null,titleId:null,prefix:null,transform:ef,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}},z=R.extra;z.attributes[T]=t,tr(b,m).then(function(i){var o=e7(a(a({},R),{},{icons:{main:i,mask:eY()},prefix:m,iconName:v,extra:z,watchable:!0})),s=j.createElementNS("http://www.w3.org/2000/svg","svg");"::before"===t?e.insertBefore(s,e.firstChild):e.appendChild(s),s.outerHTML=o.map(function(e){return eA(e)}).join("\n"),e.removeAttribute(n),r()}).catch(i)}}else r()})}function tj(e){return Promise.all([tC(e,"::before"),tC(e,"::after")])}function tE(e){return e.parentNode!==document.head&&!~F.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(T)&&(!e.parentNode||"svg"!==e.parentNode.tagName)}function t_(e){if(M)return new Promise(function(t,n){var r=em(e.querySelectorAll("*")).filter(tE).map(tj),a=tl.begin("searchPseudoElements");th=!0,Promise.all(r).then(function(){a(),th=!1,t()}).catch(function(){a(),th=!1,n()})})}var tM=!1,tR=function(e){return e.toLowerCase().split(" ").reduce(function(e,t){var n=t.toLowerCase().split("-"),r=n[0],a=n.slice(1).join("-");if(r&&"h"===a)return e.flipX=!0,e;if(r&&"v"===a)return e.flipY=!0,e;if(isNaN(a=parseFloat(a)))return e;switch(r){case"grow":e.size=e.size+a;break;case"shrink":e.size=e.size-a;break;case"left":e.x=e.x-a;break;case"right":e.x=e.x+a;break;case"up":e.y=e.y-a;break;case"down":e.y=e.y+a;break;case"rotate":e.rotate=e.rotate+a}return e},{size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0})},tz={x:0,y:0,width:"100%",height:"100%"};function tN(e){var t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}eq=[{mixout:function(){return{dom:{css:eb,insertCss:ex}}},hooks:function(){return{beforeDOMElementCreation:function(){ex()},beforeI2svg:function(){ex()}}}},{mixout:function(){return{icon:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(e||{}).icon?e:e5(e||{}),r=t.mask;return r&&(r=(r||{}).icon?r:e5(r||{})),tA(n,a(a({},t),{},{mask:r}))}}},hooks:function(){return{mutationObserverCallbacks:function(e){return e.treeCallback=tS,e.nodeCallback=tO,e}}},provides:function(e){e.i2svg=function(e){var t=e.node,n=void 0===t?j:t,r=e.callback;return tS(n,void 0===r?function(){}:r)},e.generateSvgReplacementMutation=function(e,t){var n=t.iconName,r=t.title,a=t.titleId,i=t.prefix,o=t.transform,s=t.symbol,c=t.mask,u=t.maskId,f=t.extra;return new Promise(function(t,d){Promise.all([tr(n,i),c.iconName?tr(c.iconName,c.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(c){var d=l(c,2);t([e,e7({icons:{main:d[0],mask:d[1]},prefix:i,iconName:n,transform:o,symbol:s,maskId:u,title:r,titleId:a,extra:f,watchable:!0})])}).catch(d)})},e.generateAbstractIcon=function(e){var t,n=e.children,r=e.attributes,a=e.main,i=e.transform,o=eh(e.styles);return o.length>0&&(r.style=o),ey(i)&&(t=e2("generateAbstractTransformGrouping",{main:a,transform:i,containerWidth:a.width,iconWidth:a.width})),n.push(t||a.icon),{children:n,attributes:r}}}},{mixout:function(){return{layer:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.classes,r=void 0===n?[]:n;return e9({type:"layer"},function(){e1("beforeDOMElementCreation",{assembler:e,params:t});var n=[];return e(function(e){Array.isArray(e)?e.map(function(e){n=n.concat(e.abstract)}):n=n.concat(e.abstract)}),[{tag:"span",attributes:{class:["".concat(ec.cssPrefix,"-layers")].concat(c(r)).join(" ")},children:n}]})}}}},{mixout:function(){return{counter:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.title,r=void 0===n?null:n,i=t.classes,o=void 0===i?[]:i,s=t.attributes,l=void 0===s?{}:s,u=t.styles,f=void 0===u?{}:u;return e9({type:"counter",content:e},function(){var n,i,s,u,d,m,p;return e1("beforeDOMElementCreation",{content:e,params:t}),i=(n={content:e.toString(),title:r,extra:{attributes:l,styles:f,classes:["".concat(ec.cssPrefix,"-layers-counter")].concat(c(o))}}).content,s=n.title,d=a(a(a({},(u=n.extra).attributes),s?{title:s}:{}),{},{class:u.classes.join(" ")}),(m=eh(u.styles)).length>0&&(d.style=m),(p=[]).push({tag:"span",attributes:d,children:[i]}),s&&p.push({tag:"span",attributes:{class:"sr-only"},children:[s]}),p})}}}},{mixout:function(){return{text:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.transform,r=void 0===n?ef:n,i=t.title,o=void 0===i?null:i,s=t.classes,l=void 0===s?[]:s,u=t.attributes,f=void 0===u?{}:u,d=t.styles,m=void 0===d?{}:d;return e9({type:"text",content:e},function(){return e1("beforeDOMElementCreation",{content:e,params:t}),e8({content:e,transform:a(a({},ef),r),title:o,extra:{attributes:f,styles:m,classes:["".concat(ec.cssPrefix,"-layers-text")].concat(c(l))}})})}}},provides:function(e){e.generateLayersText=function(e,t){var n=t.title,r=t.transform,a=t.extra,i=null,o=null;if(R){var s=parseInt(getComputedStyle(e).fontSize,10),l=e.getBoundingClientRect();i=l.width/s,o=l.height/s}return ec.autoA11y&&!n&&(a.attributes["aria-hidden"]="true"),Promise.resolve([e,e8({content:e.innerHTML,width:i,height:o,transform:r,title:n,extra:a,watchable:!0})])}}},{hooks:function(){return{mutationObserverCallbacks:function(e){return e.pseudoElementsCallback=t_,e}}},provides:function(e){e.pseudoElements2svg=function(e){var t=e.node,n=void 0===t?j:t;ec.searchPseudoElements&&t_(n)}}},{mixout:function(){return{dom:{unwatch:function(){th=!0,tM=!0}}}},hooks:function(){return{bootstrap:function(){tb(e0("mutationObserverCallbacks",{}))},noAuto:function(){ty&&ty.disconnect()},watch:function(e){var t=e.observeMutationsRoot;tM?th=!1:tb(e0("mutationObserverCallbacks",{observeMutationsRoot:t}))}}}},{mixout:function(){return{parse:{transform:function(e){return tR(e)}}}},hooks:function(){return{parseNodeAttributes:function(e,t){var n=t.getAttribute("data-fa-transform");return n&&(e.transform=tR(n)),e}}},provides:function(e){e.generateAbstractTransformGrouping=function(e){var t=e.main,n=e.transform,r=e.containerWidth,i=e.iconWidth,o="translate(".concat(32*n.x,", ").concat(32*n.y,") "),s="scale(".concat(n.size/16*(n.flipX?-1:1),", ").concat(n.size/16*(n.flipY?-1:1),") "),l="rotate(".concat(n.rotate," 0 0)"),c={transform:"".concat(o," ").concat(s," ").concat(l)},u={outer:{transform:"translate(".concat(r/2," 256)")},inner:c,path:{transform:"translate(".concat(-(i/2*1)," -256)")}};return{tag:"g",attributes:a({},u.outer),children:[{tag:"g",attributes:a({},u.inner),children:[{tag:t.icon.tag,children:t.icon.children,attributes:a(a({},t.icon.attributes),u.path)}]}]}}}},{hooks:function(){return{parseNodeAttributes:function(e,t){var n=t.getAttribute("data-fa-mask"),r=n?eU(n.split(" ").map(function(e){return e.trim()})):eY();return r.prefix||(r.prefix=eN),e.mask=r,e.maskId=t.getAttribute("data-fa-mask-id"),e}}},provides:function(e){e.generateAbstractMask=function(e){var t,n,r,i,o,s,l,c,u=e.children,f=e.attributes,d=e.main,m=e.mask,p=e.maskId,g=e.transform,h=d.width,y=d.icon,b=m.width,v=m.icon,x=(n=(t={transform:g,containerWidth:b,iconWidth:h}).transform,r=t.containerWidth,i=t.iconWidth,o="translate(".concat(32*n.x,", ").concat(32*n.y,") "),s="scale(".concat(n.size/16*(n.flipX?-1:1),", ").concat(n.size/16*(n.flipY?-1:1),") "),l="rotate(".concat(n.rotate," 0 0)"),c={transform:"".concat(o," ").concat(s," ").concat(l)},{outer:{transform:"translate(".concat(r/2," 256)")},inner:c,path:{transform:"translate(".concat(-(i/2*1)," -256)")}}),k={tag:"rect",attributes:a(a({},tz),{},{fill:"white"})},w=y.children?{children:y.children.map(tN)}:{},S={tag:"g",attributes:a({},x.inner),children:[tN(a({tag:y.tag,attributes:a(a({},y.attributes),x.path)},w))]},O={tag:"g",attributes:a({},x.outer),children:[S]},A="mask-".concat(p||ed()),P="clip-".concat(p||ed()),C={tag:"mask",attributes:a(a({},tz),{},{id:A,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[k,O]},j={tag:"defs",children:[{tag:"clipPath",attributes:{id:P},children:"g"===v.tag?v.children:[v]},C]};return u.push(j,{tag:"rect",attributes:a({fill:"currentColor","clip-path":"url(#".concat(P,")"),mask:"url(#".concat(A,")")},tz)}),{children:u,attributes:f}}}},{provides:function(e){var t=!1;C.matchMedia&&(t=C.matchMedia("(prefers-reduced-motion: reduce)").matches),e.missingIconAbstract=function(){var e=[],n={fill:"currentColor"},r={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};e.push({tag:"path",attributes:a(a({},n),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var i=a(a({},r),{},{attributeName:"opacity"}),o={tag:"circle",attributes:a(a({},n),{},{cx:"256",cy:"364",r:"28"}),children:[]};return t||o.children.push({tag:"animate",attributes:a(a({},r),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:a(a({},i),{},{values:"1;0;1;1;0;1;"})}),e.push(o),e.push({tag:"path",attributes:a(a({},n),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:t?[]:[{tag:"animate",attributes:a(a({},i),{},{values:"1;0;0;0;0;1;"})}]}),t||e.push({tag:"path",attributes:a(a({},n),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:a(a({},i),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:e}}}},{hooks:function(){return{parseNodeAttributes:function(e,t){var n=t.getAttribute("data-fa-symbol");return e.symbol=null!==n&&(""===n||n),e}}}}],eX={},Object.keys(eJ).forEach(function(e){-1===eQ.indexOf(e)&&delete eJ[e]}),eq.forEach(function(e){var t=e.mixout?e.mixout():{};if(Object.keys(t).forEach(function(e){"function"==typeof t[e]&&(e3[e]=t[e]),"object"===i(t[e])&&Object.keys(t[e]).forEach(function(n){e3[e]||(e3[e]={}),e3[e][n]=t[e][n]})}),e.hooks){var n=e.hooks();Object.keys(n).forEach(function(e){eX[e]||(eX[e]=[]),eX[e].push(n[e])})}e.provides&&e.provides(eJ)}),e3.noAuto,e3.config,e3.library,e3.dom;var tI=e3.parse;e3.findIconDefinition,e3.toHtml;var tT=e3.icon;e3.layer,e3.text,e3.counter;var t$=n(4404),tZ=n.n(t$),tL=n(2265);function tF(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 tD(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n0||!Array.isArray(t)&&t?tH({},e,t):{}}var tX=tL.forwardRef(function(e,t){var n,r,a,i,o,s,l,c,u,f,d,m,p,g,h,y,b,v,x,k=e.icon,w=e.mask,S=e.symbol,O=e.className,A=e.title,P=e.titleId,C=e.maskId,j=tK(k),E=tq("classes",[].concat(tW((r=e.beat,a=e.fade,i=e.beatFade,o=e.bounce,s=e.shake,l=e.flash,c=e.spin,u=e.spinPulse,f=e.spinReverse,d=e.pulse,m=e.fixedWidth,p=e.inverse,g=e.border,h=e.listItem,y=e.flip,b=e.size,v=e.rotation,x=e.pull,Object.keys((tH(n={"fa-beat":r,"fa-fade":a,"fa-beat-fade":i,"fa-bounce":o,"fa-shake":s,"fa-flash":l,"fa-spin":c,"fa-spin-reverse":f,"fa-spin-pulse":u,"fa-pulse":d,"fa-fw":m,"fa-inverse":p,"fa-border":g,"fa-li":h,"fa-flip":!0===y,"fa-flip-horizontal":"horizontal"===y||"both"===y,"fa-flip-vertical":"vertical"===y||"both"===y},"fa-".concat(b),null!=b),tH(n,"fa-rotate-".concat(v),null!=v&&0!==v),tH(n,"fa-pull-".concat(x),null!=x),tH(n,"fa-swap-opacity",e.swapOpacity),n)).map(function(e){return n[e]?e:null}).filter(function(e){return e}))),tW(O.split(" ")))),_=tq("transform","string"==typeof e.transform?tI.transform(e.transform):e.transform),M=tq("mask",tK(w)),R=tT(j,tD(tD(tD(tD({},E),_),M),{},{symbol:S,title:A,titleId:P,maskId:C}));if(!R)return!function(){if(!tU&&console&&"function"==typeof console.error){var e;(e=console).error.apply(e,arguments)}}("Could not find icon",j),null;var z=R.abstract,N={ref:t};return Object.keys(e).forEach(function(t){tX.defaultProps.hasOwnProperty(t)||(N[t]=e[t])}),tJ(z[0],N)});tX.displayName="FontAwesomeIcon",tX.propTypes={beat:tZ().bool,border:tZ().bool,beatFade:tZ().bool,bounce:tZ().bool,className:tZ().string,fade:tZ().bool,flash:tZ().bool,mask:tZ().oneOfType([tZ().object,tZ().array,tZ().string]),maskId:tZ().string,fixedWidth:tZ().bool,inverse:tZ().bool,flip:tZ().oneOf([!0,!1,"horizontal","vertical","both"]),icon:tZ().oneOfType([tZ().object,tZ().array,tZ().string]),listItem:tZ().bool,pull:tZ().oneOf(["right","left"]),pulse:tZ().bool,rotation:tZ().oneOf([0,90,180,270]),shake:tZ().bool,size:tZ().oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:tZ().bool,spinPulse:tZ().bool,spinReverse:tZ().bool,symbol:tZ().oneOfType([tZ().bool,tZ().string]),title:tZ().string,titleId:tZ().string,transform:tZ().oneOfType([tZ().string,tZ().object]),swapOpacity:tZ().bool},tX.defaultProps={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:!1,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1};var tJ=(function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof n)return n;var a=(n.children||[]).map(function(n){return e(t,n)}),i=Object.keys(n.attributes||{}).reduce(function(e,t){var r=n.attributes[t];switch(t){case"class":e.attrs.className=r,delete n.attributes.class;break;case"style":e.attrs.style=r.split(";").map(function(e){return e.trim()}).filter(function(e){return e}).reduce(function(e,t){var n=t.indexOf(":"),r=tV(t.slice(0,n)),a=t.slice(n+1).trim();return r.startsWith("webkit")?e[r.charAt(0).toUpperCase()+r.slice(1)]=a:e[r]=a,e},{});break;default:0===t.indexOf("aria-")||0===t.indexOf("data-")?e.attrs[t.toLowerCase()]=r:e.attrs[tV(t)]=r}return e},{attrs:{}}),o=r.style,s=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(r,tG);return i.attrs.style=tD(tD({},i.attrs.style),void 0===o?{}:o),t.apply(void 0,[n.tag,tD(tD({},i.attrs),s)].concat(tW(a)))}).bind(null,tL.createElement)},685:function(e,t,n){"use strict";let r;n.d(t,{Z:function(){return eB}});var a=n(444),i=n(2110),o=n(2265),s=n.t(o,2),l=function(){for(var e,t,n=0,r="",a=arguments.length;n{r[a]=e[a].reduce((e,r)=>{if(r){let a=t(r);""!==a&&e.push(a),n&&n[r]&&e.push(n[r])}return e},[]).join(" ")}),r}var d=n(1989),m=n(2050),p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=o.useContext(m.T);return t&&0!==Object.keys(t).length?t:e};let g=(0,d.Z)();var h=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g;return p(e)},y=n(6064),b=n(439),v=n(1870),x=n(9811),k=n(1869),w={black:"#000",white:"#fff"},S={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},O={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},A={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"},P={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"},C={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"},j={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},E={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"};let _=["mode","contrastThreshold","tonalOffset"],M={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:w.white,default:w.white},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}},R={text:{primary:w.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:w.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function z(e,t,n,r){let a=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,k.$n)(e.main,a):"dark"===t&&(e.dark=(0,k._j)(e.main,i)))}let N=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"],I={textTransform:"uppercase"},T='"Roboto", "Helvetica", "Arial", sans-serif';function $(...e){return`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2),${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14),${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`}let Z=["none",$(0,2,1,-1,0,1,1,0,0,1,3,0),$(0,3,1,-2,0,2,2,0,0,1,5,0),$(0,3,3,-2,0,3,4,0,0,1,8,0),$(0,2,4,-1,0,4,5,0,0,1,10,0),$(0,3,5,-1,0,5,8,0,0,1,14,0),$(0,3,5,-1,0,6,10,0,0,1,18,0),$(0,4,5,-2,0,7,10,1,0,2,16,1),$(0,5,5,-3,0,8,10,1,0,3,14,2),$(0,5,6,-3,0,9,12,1,0,3,16,2),$(0,6,6,-3,0,10,14,1,0,4,18,3),$(0,6,7,-4,0,11,15,1,0,4,20,3),$(0,7,8,-4,0,12,17,2,0,5,22,4),$(0,7,8,-4,0,13,19,2,0,5,24,4),$(0,7,9,-4,0,14,21,2,0,5,26,4),$(0,8,9,-5,0,15,22,2,0,6,28,5),$(0,8,10,-5,0,16,24,2,0,6,30,5),$(0,8,11,-5,0,17,26,2,0,6,32,5),$(0,9,11,-5,0,18,28,2,0,7,34,6),$(0,9,12,-6,0,19,29,2,0,7,36,6),$(0,10,13,-6,0,20,31,3,0,8,38,7),$(0,10,13,-6,0,21,33,3,0,8,40,7),$(0,10,14,-6,0,22,35,3,0,8,42,7),$(0,11,14,-7,0,23,36,3,0,9,44,8),$(0,11,15,-7,0,24,38,3,0,9,46,8)],L=["duration","easing","delay"],F={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)"},D={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function B(e){return`${Math.round(e)}ms`}function H(e){if(!e)return 0;let t=e/36;return Math.round((4+15*t**.25+t/5)*10)}var W={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};let Y=["breakpoints","mixins","spacing","palette","transitions","typography","shape"],V=function(e={}){var t;let{mixins:n={},palette:r={},transitions:o={},typography:s={}}=e,l=(0,a.Z)(e,Y);if(e.vars)throw Error((0,y.Z)(18));let c=function(e){let{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,o=(0,a.Z)(e,_),s=e.primary||function(e="light"){return"dark"===e?{main:C[200],light:C[50],dark:C[400]}:{main:C[700],light:C[400],dark:C[800]}}(t),l=e.secondary||function(e="light"){return"dark"===e?{main:O[200],light:O[50],dark:O[400]}:{main:O[500],light:O[300],dark:O[700]}}(t),c=e.error||function(e="light"){return"dark"===e?{main:A[500],light:A[300],dark:A[700]}:{main:A[700],light:A[400],dark:A[800]}}(t),u=e.info||function(e="light"){return"dark"===e?{main:j[400],light:j[300],dark:j[700]}:{main:j[700],light:j[500],dark:j[900]}}(t),f=e.success||function(e="light"){return"dark"===e?{main:E[400],light:E[300],dark:E[700]}:{main:E[800],light:E[500],dark:E[900]}}(t),d=e.warning||function(e="light"){return"dark"===e?{main:P[400],light:P[300],dark:P[700]}:{main:"#ed6c02",light:P[500],dark:P[900]}}(t);function m(e){return(0,k.mi)(e,R.text.primary)>=n?R.text.primary:M.text.primary}let p=({color:e,name:t,mainShade:n=500,lightShade:a=300,darkShade:o=700})=>{if(!(e=(0,i.Z)({},e)).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw Error((0,y.Z)(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw Error((0,y.Z)(12,t?` (${t})`:"",JSON.stringify(e.main)));return z(e,"light",a,r),z(e,"dark",o,r),e.contrastText||(e.contrastText=m(e.main)),e};return(0,b.Z)((0,i.Z)({common:(0,i.Z)({},w),mode:t,primary:p({color:s,name:"primary"}),secondary:p({color:l,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:c,name:"error"}),warning:p({color:d,name:"warning"}),info:p({color:u,name:"info"}),success:p({color:f,name:"success"}),grey:S,contrastThreshold:n,getContrastText:m,augmentColor:p,tonalOffset:r},{dark:R,light:M}[t]),o)}(r),u=(0,d.Z)(e),f=(0,b.Z)(u,{mixins:(t=u.breakpoints,(0,i.Z)({toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}}},n)),palette:c,shadows:Z.slice(),typography:function(e,t){let n="function"==typeof t?t(e):t,{fontFamily:r=T,fontSize:o=14,fontWeightLight:s=300,fontWeightRegular:l=400,fontWeightMedium:c=500,fontWeightBold:u=700,htmlFontSize:f=16,allVariants:d,pxToRem:m}=n,p=(0,a.Z)(n,N),g=o/14,h=m||(e=>`${e/f*g}rem`),y=(e,t,n,a,o)=>(0,i.Z)({fontFamily:r,fontWeight:e,fontSize:h(t),lineHeight:n},r===T?{letterSpacing:`${Math.round(a/t*1e5)/1e5}em`}:{},o,d),v={h1:y(s,96,1.167,-1.5),h2:y(s,60,1.2,-.5),h3:y(l,48,1.167,0),h4:y(l,34,1.235,.25),h5:y(l,24,1.334,0),h6:y(c,20,1.6,.15),subtitle1:y(l,16,1.75,.15),subtitle2:y(c,14,1.57,.1),body1:y(l,16,1.5,.15),body2:y(l,14,1.43,.15),button:y(c,14,1.75,.4,I),caption:y(l,12,1.66,.4),overline:y(l,12,2.66,1,I),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,b.Z)((0,i.Z)({htmlFontSize:f,pxToRem:h,fontFamily:r,fontSize:o,fontWeightLight:s,fontWeightRegular:l,fontWeightMedium:c,fontWeightBold:u},v),p,{clone:!1})}(c,s),transitions:function(e){let t=(0,i.Z)({},F,e.easing),n=(0,i.Z)({},D,e.duration);return(0,i.Z)({getAutoHeightDuration:H,create:(e=["all"],r={})=>{let{duration:i=n.standard,easing:o=t.easeInOut,delay:s=0}=r;return(0,a.Z)(r,L),(Array.isArray(e)?e:[e]).map(e=>`${e} ${"string"==typeof i?i:B(i)} ${o} ${"string"==typeof s?s:B(s)}`).join(",")}},e,{easing:t,duration:n})}(o),zIndex:(0,i.Z)({},W)});return(f=[].reduce((e,t)=>(0,b.Z)(e,t),f=(0,b.Z)(f,l))).unstable_sxConfig=(0,i.Z)({},v.Z,null==l?void 0:l.unstable_sxConfig),f.unstable_sx=function(e){return(0,x.Z)({sx:e,theme:this})},f}();var G="$$material",U=n(2423).Z;let K=0,q=s["useId".toString()];var X=function(e){if(void 0!==q){let t=q();return null!=e?e:t}return function(e){let[t,n]=o.useState(e),r=e||t;return o.useEffect(()=>{null==t&&(K+=1,n("mui-".concat(K)))},[t]),r}(e)},J=function(e){let{controlled:t,default:n,name:r,state:a="value"}=e,{current:i}=o.useRef(void 0!==t),[s,l]=o.useState(n),c=o.useCallback(e=>{i||l(e)},[]);return[i?t:s,c]};class Q{static create(){return new Q}start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}}let ee=!0,et=!1,en=new Q,er={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 ea(e){e.metaKey||e.altKey||e.ctrlKey||(ee=!0)}function ei(){ee=!1}function eo(){"hidden"===this.visibilityState&&et&&(ee=!0)}var es=function(){let e=o.useCallback(e=>{if(null!=e){var t;(t=e.ownerDocument).addEventListener("keydown",ea,!0),t.addEventListener("mousedown",ei,!0),t.addEventListener("pointerdown",ei,!0),t.addEventListener("touchstart",ei,!0),t.addEventListener("visibilitychange",eo,!0)}},[]),t=o.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!function(e){let{target:t}=e;try{return t.matches(":focus-visible")}catch(e){}return ee||function(e){let{type:t,tagName:n}=e;return"INPUT"===n&&!!er[t]&&!e.readOnly||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(et=!0,en.start(100,()=>{et=!1}),t.current=!1,!0)},ref:e}},el=function(){for(var e=arguments.length,t=Array(e),n=0;nt.every(e=>null==e)?null:e=>{t.forEach(t=>{"function"==typeof t?t(e):t&&(t.current=e)})},t)};function ec(e){let{props:t,name:n}=e;return function(e){let{props:t,name:n,defaultTheme:r,themeId:a}=e,o=h(r);return a&&(o=o[a]||o),function(e){let{theme:t,name:n,props:r}=e;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?function e(t,n){let r=(0,i.Z)({},n);return Object.keys(t).forEach(a=>{if(a.toString().match(/^(components|slots)$/))r[a]=(0,i.Z)({},t[a],r[a]);else if(a.toString().match(/^(componentsProps|slotProps)$/)){let o=t[a]||{},s=n[a];r[a]={},s&&Object.keys(s)?o&&Object.keys(o)?(r[a]=(0,i.Z)({},s),Object.keys(o).forEach(t=>{r[a][t]=e(o[t],s[t])})):r[a]=s:r[a]=o}else void 0===r[a]&&(r[a]=t[a])}),r}(t.components[n].defaultProps,r):r}({theme:o,name:n,props:t})}({props:t,name:n,defaultTheme:V,themeId:G})}var eu=n(1338);let ef=eu.x9,ed=(0,eu.ZP)({themeId:G,defaultTheme:V,rootShouldForwardProp:e=>(0,eu.x9)(e)&&"classes"!==e}),em=e=>e,ep=(r=em,{configure(e){r=e},generate:e=>r(e),reset(){r=em}}),eg={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function eh(e,t,n="Mui"){let r=eg[t];return r?`${n}-${r}`:`${ep.generate(e)}-${t}`}function ey(e,t,n="Mui"){let r={};return t.forEach(t=>{r[t]=eh(e,t,n)}),r}function eb(e){return eh("MuiSvgIcon",e)}ey("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var ev=n(7437);let ex=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],ek=e=>{let{color:t,fontSize:n,classes:r}=e;return f({root:["root","inherit"!==t&&"color".concat(U(t)),"fontSize".concat(U(n))]},eb,r)},ew=ed("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t["color".concat(U(n.color))],t["fontSize".concat(U(n.fontSize))]]}})(e=>{var t,n,r,a,i,o,s,l,c,u,f,d,m;let{theme:p,ownerState:g}=e;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:g.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(t=p.transitions)||null==(n=t.create)?void 0:n.call(t,"fill",{duration:null==(r=p.transitions)||null==(r=r.duration)?void 0:r.shorter}),fontSize:({inherit:"inherit",small:(null==(a=p.typography)||null==(i=a.pxToRem)?void 0:i.call(a,20))||"1.25rem",medium:(null==(o=p.typography)||null==(s=o.pxToRem)?void 0:s.call(o,24))||"1.5rem",large:(null==(l=p.typography)||null==(c=l.pxToRem)?void 0:c.call(l,35))||"2.1875rem"})[g.fontSize],color:null!=(u=null==(f=(p.vars||p).palette)||null==(f=f[g.color])?void 0:f.main)?u:({action:null==(d=(p.vars||p).palette)||null==(d=d.action)?void 0:d.active,disabled:null==(m=(p.vars||p).palette)||null==(m=m.action)?void 0:m.disabled,inherit:void 0})[g.color]}}),eS=o.forwardRef(function(e,t){let n=ec({props:e,name:"MuiSvgIcon"}),{children:r,className:s,color:c="inherit",component:u="svg",fontSize:f="medium",htmlColor:d,inheritViewBox:m=!1,titleAccess:p,viewBox:g="0 0 24 24"}=n,h=(0,a.Z)(n,ex),y=o.isValidElement(r)&&"svg"===r.type,b=(0,i.Z)({},n,{color:c,component:u,fontSize:f,instanceFontSize:e.fontSize,inheritViewBox:m,viewBox:g,hasSvgAsChild:y}),v={};m||(v.viewBox=g);let x=ek(b);return(0,ev.jsxs)(ew,(0,i.Z)({as:u,className:l(x.root,s),focusable:"false",color:d,"aria-hidden":!p||void 0,role:p?"img":void 0,ref:t},v,h,y&&r.props,{ownerState:b,children:[y?r.props.children:r,p?(0,ev.jsx)("title",{children:p}):null]}))});function eO(e,t){function n(n,r){return(0,ev.jsx)(eS,(0,i.Z)({"data-testid":"".concat(t,"Icon"),ref:r},n,{children:e}))}return n.muiName=eS.muiName,o.memo(o.forwardRef(n))}eS.muiName="SvgIcon";var eA=eO((0,ev.jsx)("path",{d:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}),"Star"),eP=eO((0,ev.jsx)("path",{d:"M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}),"StarBorder");function eC(e){return eh("MuiRating",e)}let ej=ey("MuiRating",["root","sizeSmall","sizeMedium","sizeLarge","readOnly","disabled","focusVisible","visuallyHidden","pristine","label","labelEmptyValueActive","icon","iconEmpty","iconFilled","iconHover","iconFocus","iconActive","decimal"]),eE=["value"],e_=["className","defaultValue","disabled","emptyIcon","emptyLabelText","getLabelText","highlightSelectedOnly","icon","IconContainerComponent","max","name","onChange","onChangeActive","onMouseLeave","onMouseMove","precision","readOnly","size","value"];function eM(e,t){return null==e?e:Number((Math.round(e/t)*t).toFixed(function(e){let t=e.toString().split(".")[1];return t?t.length:0}(t)))}let eR=e=>{let{classes:t,size:n,readOnly:r,disabled:a,emptyValueFocused:i,focusVisible:o}=e;return f({root:["root","size".concat(U(n)),a&&"disabled",o&&"focusVisible",r&&"readOnly"],label:["label","pristine"],labelEmptyValue:[i&&"labelEmptyValueActive"],icon:["icon"],iconEmpty:["iconEmpty"],iconFilled:["iconFilled"],iconHover:["iconHover"],iconFocus:["iconFocus"],iconActive:["iconActive"],decimal:["decimal"],visuallyHidden:["visuallyHidden"]},eC,t)},ez=ed("span",{name:"MuiRating",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{["& .".concat(ej.visuallyHidden)]:t.visuallyHidden},t.root,t["size".concat(U(n.size))],n.readOnly&&t.readOnly]}})(e=>{let{theme:t,ownerState:n}=e;return(0,i.Z)({display:"inline-flex",position:"relative",fontSize:t.typography.pxToRem(24),color:"#faaf00",cursor:"pointer",textAlign:"left",width:"min-content",WebkitTapHighlightColor:"transparent",["&.".concat(ej.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},["&.".concat(ej.focusVisible," .").concat(ej.iconActive)]:{outline:"1px solid #999"},["& .".concat(ej.visuallyHidden)]:u},"small"===n.size&&{fontSize:t.typography.pxToRem(18)},"large"===n.size&&{fontSize:t.typography.pxToRem(30)},n.readOnly&&{pointerEvents:"none"})}),eN=ed("label",{name:"MuiRating",slot:"Label",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.label,n.emptyValueFocused&&t.labelEmptyValueActive]}})(e=>{let{ownerState:t}=e;return(0,i.Z)({cursor:"inherit"},t.emptyValueFocused&&{top:0,bottom:0,position:"absolute",outline:"1px solid #999",width:"100%"})}),eI=ed("span",{name:"MuiRating",slot:"Icon",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.iconEmpty&&t.iconEmpty,n.iconFilled&&t.iconFilled,n.iconHover&&t.iconHover,n.iconFocus&&t.iconFocus,n.iconActive&&t.iconActive]}})(e=>{let{theme:t,ownerState:n}=e;return(0,i.Z)({display:"flex",transition:t.transitions.create("transform",{duration:t.transitions.duration.shortest}),pointerEvents:"none"},n.iconActive&&{transform:"scale(1.2)"},n.iconEmpty&&{color:(t.vars||t).palette.action.disabled})}),eT=ed("span",{name:"MuiRating",slot:"Decimal",shouldForwardProp:e=>ef(e)&&"iconActive"!==e,overridesResolver:(e,t)=>{let{iconActive:n}=e;return[t.decimal,n&&t.iconActive]}})(e=>{let{iconActive:t}=e;return(0,i.Z)({position:"relative"},t&&{transform:"scale(1.2)"})});function e$(e){let t=(0,a.Z)(e,eE);return(0,ev.jsx)("span",(0,i.Z)({},t))}function eZ(e){let{classes:t,disabled:n,emptyIcon:r,focus:a,getLabelText:s,highlightSelectedOnly:c,hover:u,icon:f,IconContainerComponent:d,isActive:m,itemValue:p,labelProps:g,name:h,onBlur:y,onChange:b,onClick:v,onFocus:x,readOnly:k,ownerState:w,ratingValue:S,ratingValueRounded:O}=e,A=c?p===S:p<=S,P=p<=u,C=p<=a,j=p===O,E=X(),_=(0,ev.jsx)(eI,{as:d,value:p,className:l(t.icon,A?t.iconFilled:t.iconEmpty,P&&t.iconHover,C&&t.iconFocus,m&&t.iconActive),ownerState:(0,i.Z)({},w,{iconEmpty:!A,iconFilled:A,iconHover:P,iconFocus:C,iconActive:m}),children:r&&!A?r:f});return k?(0,ev.jsx)("span",(0,i.Z)({},g,{children:_})):(0,ev.jsxs)(o.Fragment,{children:[(0,ev.jsxs)(eN,(0,i.Z)({ownerState:(0,i.Z)({},w,{emptyValueFocused:void 0}),htmlFor:E},g,{children:[_,(0,ev.jsx)("span",{className:t.visuallyHidden,children:s(p)})]})),(0,ev.jsx)("input",{className:t.visuallyHidden,onFocus:x,onBlur:y,onChange:b,onClick:v,disabled:n,value:p,id:E,type:"radio",name:h,checked:j})]})}let eL=(0,ev.jsx)(eA,{fontSize:"inherit"}),eF=(0,ev.jsx)(eP,{fontSize:"inherit"});function eD(e){return"".concat(e," Star").concat(1!==e?"s":"")}var eB=o.forwardRef(function(e,t){let n=ec({name:"MuiRating",props:e}),{className:r,defaultValue:s=null,disabled:u=!1,emptyIcon:f=eF,emptyLabelText:d="Empty",getLabelText:m=eD,highlightSelectedOnly:p=!1,icon:g=eL,IconContainerComponent:y=e$,max:b=5,name:v,onChange:x,onChangeActive:k,onMouseLeave:w,onMouseMove:S,precision:O=1,readOnly:A=!1,size:P="medium",value:C}=n,j=(0,a.Z)(n,e_),E=X(v),[_,M]=J({controlled:C,default:s,name:"Rating"}),R=eM(_,O),z=function(){let e=h(V);return e[G]||e}(),[{hover:N,focus:I},T]=o.useState({hover:-1,focus:-1}),$=R;-1!==N&&($=N),-1!==I&&($=I);let{isFocusVisibleRef:Z,onBlur:L,onFocus:F,ref:D}=es(),[B,H]=o.useState(!1),W=o.useRef(),Y=el(D,W,t),U=e=>{let t=""===e.target.value?null:parseFloat(e.target.value);-1!==N&&(t=N),M(t),x&&x(e,t)},K=e=>{(0!==e.clientX||0!==e.clientY)&&(T({hover:-1,focus:-1}),M(null),x&&parseFloat(e.target.value)===R&&x(e,null))},q=e=>{F(e),!0===Z.current&&H(!0);let t=parseFloat(e.target.value);T(e=>({hover:e.hover,focus:t}))},Q=e=>{-1===N&&(L(e),!1===Z.current&&H(!1),T(e=>({hover:e.hover,focus:-1})))},[ee,et]=o.useState(!1),en=(0,i.Z)({},n,{defaultValue:s,disabled:u,emptyIcon:f,emptyLabelText:d,emptyValueFocused:ee,focusVisible:B,getLabelText:m,icon:g,IconContainerComponent:y,max:b,precision:O,readOnly:A,size:P}),er=eR(en);return(0,ev.jsxs)(ez,(0,i.Z)({ref:Y,onMouseMove:e=>{S&&S(e);let{right:t,left:n,width:r}=W.current.getBoundingClientRect(),a=eM(b*("rtl"===z.direction?(t-e.clientX)/r:(e.clientX-n)/r)+O/2,O);a=(0,c.Z)(a,O,b),T(e=>e.hover===a&&e.focus===a?e:{hover:a,focus:a}),H(!1),k&&N!==a&&k(e,a)},onMouseLeave:e=>{w&&w(e),T({hover:-1,focus:-1}),k&&-1!==N&&k(e,-1)},className:l(er.root,r,A&&"MuiRating-readOnly"),ownerState:en,role:A?"img":null,"aria-label":A?m($):null},j,{children:[Array.from(Array(b)).map((e,t)=>{let n=t+1,r={classes:er,disabled:u,emptyIcon:f,focus:I,getLabelText:m,highlightSelectedOnly:p,hover:N,icon:g,IconContainerComponent:y,name:E,onBlur:Q,onChange:U,onClick:K,onFocus:q,ratingValue:$,ratingValueRounded:R,readOnly:A,ownerState:en},a=n===Math.ceil($)&&(-1!==N||-1!==I);if(O<1){let e=Array.from(Array(1/O));return(0,ev.jsx)(eT,{className:l(er.decimal,a&&er.iconActive),ownerState:en,iconActive:a,children:e.map((t,a)=>{let o=eM(n-1+(a+1)*O,O);return(0,ev.jsx)(eZ,(0,i.Z)({},r,{isActive:!1,itemValue:o,labelProps:{style:e.length-1===a?{}:{width:o===$?"".concat((a+1)*O*100,"%"):"0%",overflow:"hidden",position:"absolute"}}}),o)})},n)}return(0,ev.jsx)(eZ,(0,i.Z)({},r,{isActive:a,itemValue:n}),n)}),!A&&!u&&(0,ev.jsxs)(eN,{className:l(er.label,er.labelEmptyValue),ownerState:en,children:[(0,ev.jsx)("input",{className:er.visuallyHidden,value:"",id:"".concat(E,"-empty"),type:"radio",name:E,checked:null==R,onFocus:()=>et(!0),onBlur:()=>et(!1),onChange:U}),(0,ev.jsx)("span",{className:er.visuallyHidden,children:d})]})]}))})},7998:function(e,t,n){"use strict";let r;n.r(t),n.d(t,{GlobalStyles:function(){return A},StyledEngineProvider:function(){return O},ThemeContext:function(){return c.T},css:function(){return k},default:function(){return P},internal_processStyles:function(){return C},keyframes:function(){return w}});var a=n(2110),i=n(2265),o=n(3487),s=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,l=(0,o.Z)(function(e){return s.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&91>e.charCodeAt(2)}),c=n(2050),u=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},f=function(e,t,n){u(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var a=t;do e.insert(t===a?"."+r:"",a,e.sheet,!0),a=a.next;while(void 0!==a)}},d=n(2892),m=n(8006),p=function(e){return"theme"!==e},g=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?l:p},h=function(e,t,n){var r;if(t){var a=t.shouldForwardProp;r=e.__emotion_forwardProp&&a?function(t){return e.__emotion_forwardProp(t)&&a(t)}:a}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},y=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return u(t,n,r),(0,m.L)(function(){return f(t,n,r)}),null},b=(function e(t,n){var r,o,s=t.__emotion_real===t,l=s&&t.__emotion_base||t;void 0!==n&&(r=n.label,o=n.target);var u=h(t,n,s),f=u||g(l),m=!f("as");return function(){var p=arguments,b=s&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&b.push("label:"+r+";"),null==p[0]||void 0===p[0].raw)b.push.apply(b,p);else{b.push(p[0][0]);for(var v=p.length,x=1;xt(null==e||0===Object.keys(e).length?n:e):t;return(0,S.jsx)(x,{styles:r})}/** + * @mui/styled-engine v5.15.11 + * + * @license MIT + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */function P(e,t){return b(e,t)}"object"==typeof document&&(r=(0,v.Z)({key:"css",prepend:!0}));let C=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}},1869:function(e,t,n){"use strict";var r=n(891);t._j=function(e,t){if(e=s(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return l(e)},t.mi=function(e,t){let n=c(e),r=c(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},t.$n=function(e,t){if(e=s(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return l(e)};var a=r(n(4115)),i=r(n(800));function o(e,t=0,n=1){return(0,i.default)(e,t,n)}function s(e){let t;if(e.type)return e;if("#"===e.charAt(0))return s(function(e){e=e.slice(1);let t=RegExp(`.{1,${e.length>=6?2:1}}`,"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map(e=>e+e)),n?`rgb${4===n.length?"a":""}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", ")})`:""}(e));let n=e.indexOf("("),r=e.substring(0,n);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(r))throw Error((0,a.default)(9,e));let i=e.substring(n+1,e.length-1);if("color"===r){if(t=(i=i.split(" ")).shift(),4===i.length&&"/"===i[3].charAt(0)&&(i[3]=i[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(t))throw Error((0,a.default)(10,t))}else i=i.split(",");return{type:r,values:i=i.map(e=>parseFloat(e)),colorSpace:t}}function l(e){let{type:t,colorSpace:n}=e,{values:r}=e;return -1!==t.indexOf("rgb")?r=r.map((e,t)=>t<3?parseInt(e,10):e):-1!==t.indexOf("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=-1!==t.indexOf("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function c(e){let t="hsl"===(e=s(e)).type||"hsla"===e.type?s(function(e){let{values:t}=e=s(e),n=t[0],r=t[1]/100,a=t[2]/100,i=r*Math.min(a,1-a),o=(e,t=(e+n/30)%12)=>a-i*Math.max(Math.min(t-3,9-t,1),-1),c="rgb",u=[Math.round(255*o(0)),Math.round(255*o(8)),Math.round(255*o(4))];return"hsla"===e.type&&(c+="a",u.push(t[3])),l({type:c,values:u})}(e)).values:e.values;return Number((.2126*(t=t.map(t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)))[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}},1338:function(e,t,n){"use strict";var r=n(891);t.ZP=function(e={}){let{themeId:t,defaultTheme:n=g,rootShouldForwardProp:r=p,slotShouldForwardProp:l=p}=e,u=e=>(0,c.default)((0,a.default)({},e,{theme:y((0,a.default)({},e,{defaultTheme:n,themeId:t}))}));return u.__mui_systemSx=!0,(e,c={})=>{var f;let m;(0,o.internal_processStyles)(e,e=>e.filter(e=>!(null!=e&&e.__mui_systemSx)));let{name:g,slot:v,skipVariantsResolver:x,skipSx:k,overridesResolver:w=(f=h(v))?(e,t)=>t[f]:null}=c,S=(0,i.default)(c,d),O=void 0!==x?x:v&&"Root"!==v&&"root"!==v||!1,A=k||!1,P=p;"Root"===v||"root"===v?P=r:v?P=l:"string"==typeof e&&e.charCodeAt(0)>96&&(P=void 0);let C=(0,o.default)(e,(0,a.default)({shouldForwardProp:P,label:m},S)),j=e=>"function"==typeof e&&e.__emotion_real!==e||(0,s.isPlainObject)(e)?r=>b(e,(0,a.default)({},r,{theme:y({theme:r.theme,defaultTheme:n,themeId:t})})):e,E=(r,...i)=>{let o=j(r),s=i?i.map(j):[];g&&w&&s.push(e=>{let r=y((0,a.default)({},e,{defaultTheme:n,themeId:t}));if(!r.components||!r.components[g]||!r.components[g].styleOverrides)return null;let i=r.components[g].styleOverrides,o={};return Object.entries(i).forEach(([t,n])=>{o[t]=b(n,(0,a.default)({},e,{theme:r}))}),w(e,o)}),g&&!O&&s.push(e=>{var r;let i=y((0,a.default)({},e,{defaultTheme:n,themeId:t}));return b({variants:null==i||null==(r=i.components)||null==(r=r[g])?void 0:r.variants},(0,a.default)({},e,{theme:i}))}),A||s.push(u);let l=s.length-i.length;if(Array.isArray(r)&&l>0){let e=Array(l).fill("");(o=[...r,...e]).raw=[...r.raw,...e]}let c=C(o,...s);return e.muiName&&(c.muiName=e.muiName),c};return C.withConfig&&(E.withConfig=C.withConfig),E}},t.x9=p;var a=r(n(2498)),i=r(n(7210)),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=m(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=a?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(r,i,o):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(n(7998)),s=n(4257);r(n(326)),r(n(1287));var l=r(n(1435)),c=r(n(2123));let u=["ownerState"],f=["variants"],d=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(m=function(e){return e?n:t})(e)}function p(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}let g=(0,l.default)(),h=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function y({defaultTheme:e,theme:t,themeId:n}){return 0===Object.keys(t).length?e:t[n]||t}function b(e,t){let{ownerState:n}=t,r=(0,i.default)(t,u),o="function"==typeof e?e((0,a.default)({ownerState:n},r)):e;if(Array.isArray(o))return o.flatMap(e=>b(e,(0,a.default)({ownerState:n},r)));if(o&&"object"==typeof o&&Array.isArray(o.variants)){let{variants:e=[]}=o,t=(0,i.default)(o,f);return e.forEach(e=>{let i=!0;"function"==typeof e.props?i=e.props((0,a.default)({ownerState:n},r,n)):Object.keys(e.props).forEach(t=>{(null==n?void 0:n[t])!==e.props[t]&&r[t]!==e.props[t]&&(i=!1)}),i&&(Array.isArray(t)||(t=[t]),t.push("function"==typeof e.style?e.style((0,a.default)({ownerState:n},r,n)):e.style))}),t}return o}},2776:function(e,t,n){"use strict";n.d(t,{L7:function(){return s},VO:function(){return r},W8:function(){return o},k9:function(){return i}});let r={xs:0,sm:600,md:900,lg:1200,xl:1536},a={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${r[e]}px)`};function i(e,t,n){let i=e.theme||{};if(Array.isArray(t)){let e=i.breakpoints||a;return t.reduce((r,a,i)=>(r[e.up(e.keys[i])]=n(t[i]),r),{})}if("object"==typeof t){let e=i.breakpoints||a;return Object.keys(t).reduce((a,i)=>(-1!==Object.keys(e.values||r).indexOf(i)?a[e.up(i)]=n(t[i],i):a[i]=t[i],a),{})}return n(t)}function o(e={}){var t;return(null==(t=e.keys)?void 0:t.reduce((t,n)=>(t[e.up(n)]={},t),{}))||{}}function s(e,t){return e.reduce((e,t)=>{let n=e[t];return n&&0!==Object.keys(n).length||delete e[t],e},t)}},4161:function(e,t,n){"use strict";function r(e,t){return this.vars&&"function"==typeof this.getColorSchemeSelector?{[this.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:this.palette.mode===e?t:{}}n.d(t,{Z:function(){return r}})},22:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(444),a=n(2110);let i=["values","unit","step"],o=e=>{let t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>(0,a.Z)({},e,{[t.key]:t.val}),{})};function s(e){let{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:s=5}=e,l=(0,r.Z)(e,i),c=o(t),u=Object.keys(c);function f(e){let r="number"==typeof t[e]?t[e]:e;return`@media (min-width:${r}${n})`}function d(e){let r="number"==typeof t[e]?t[e]:e;return`@media (max-width:${r-s/100}${n})`}function m(e,r){let a=u.indexOf(r);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==a&&"number"==typeof t[u[a]]?t[u[a]]:r)-s/100}${n})`}return(0,a.Z)({keys:u,values:c,up:f,down:d,between:m,only:function(e){return u.indexOf(e)+1(0===e.length?[1]:e).map(e=>{let n=t(e);return"number"==typeof n?`${n}px`:n}).join(" ");return n.mui=!0,n}(p),v=(0,i.Z)({breakpoints:y,direction:"ltr",components:{},palette:(0,r.Z)({mode:"light"},m),spacing:b,shape:(0,r.Z)({},s,g)},h);return v.applyStyles=f.Z,(v=t.reduce((e,t)=>(0,i.Z)(e,t),v)).unstable_sxConfig=(0,r.Z)({},u.Z,null==h?void 0:h.unstable_sxConfig),v.unstable_sx=function(e){return(0,c.Z)({sx:e,theme:this})},v}},1435:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return r.Z},private_createBreakpoints:function(){return a.Z},unstable_applyStyles:function(){return i.Z}});var r=n(1989),a=n(22),i=n(4161)},9771:function(e,t,n){"use strict";var r=n(439);t.Z=function(e,t){return t?(0,r.Z)(e,t,{clone:!1}):e}},397:function(e,t,n){"use strict";n.d(t,{hB:function(){return p},eI:function(){return m},NA:function(){return g},e6:function(){return y},o3:function(){return b}});var r=n(2776),a=n(9957),i=n(9771);let o={m:"margin",p:"padding"},s={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},c=function(e){let t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}(e=>{if(e.length>2){if(!l[e])return[e];e=l[e]}let[t,n]=e.split(""),r=o[t],a=s[n]||"";return Array.isArray(a)?a.map(e=>r+e):[r+a]}),u=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],f=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],d=[...u,...f];function m(e,t,n,r){var i;let o=null!=(i=(0,a.DW)(e,t,!1))?i:n;return"number"==typeof o?e=>"string"==typeof e?e:o*e:Array.isArray(o)?e=>"string"==typeof e?e:o[e]:"function"==typeof o?o:()=>void 0}function p(e){return m(e,"spacing",8,"spacing")}function g(e,t){if("string"==typeof t||null==t)return t;let n=e(Math.abs(t));return t>=0?n:"number"==typeof n?-n:`-${n}`}function h(e,t){let n=p(e.theme);return Object.keys(e).map(a=>(function(e,t,n,a){var i;if(-1===t.indexOf(n))return null;let o=(i=c(n),e=>i.reduce((t,n)=>(t[n]=g(a,e),t),{})),s=e[n];return(0,r.k9)(e,s,o)})(e,t,a,n)).reduce(i.Z,{})}function y(e){return h(e,u)}function b(e){return h(e,f)}function v(e){return h(e,d)}y.propTypes={},y.filterProps=u,b.propTypes={},b.filterProps=f,v.propTypes={},v.filterProps=d},9957:function(e,t,n){"use strict";n.d(t,{DW:function(){return i},Jq:function(){return o}});var r=n(2423),a=n(2776);function i(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){let n=`vars.${t}`.split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=n)return n}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function o(e,t,n,r=n){let a;return a="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:i(e,n)||r,t&&(a=t(a,r,e)),a}t.ZP=function(e){let{prop:t,cssProperty:n=e.prop,themeKey:s,transform:l}=e,c=e=>{if(null==e[t])return null;let c=e[t],u=i(e.theme,s)||{};return(0,a.k9)(e,c,e=>{let a=o(u,l,e);return(e===a&&"string"==typeof e&&(a=o(u,l,`${t}${"default"===e?"":(0,r.Z)(e)}`,e)),!1===n)?a:{[n]:a}})};return c.propTypes={},c.filterProps=[t],c}},1870:function(e,t,n){"use strict";n.d(t,{Z:function(){return F}});var r=n(397),a=n(9957),i=n(9771),o=function(...e){let t=e.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),n=e=>Object.keys(e).reduce((n,r)=>t[r]?(0,i.Z)(n,t[r](e)):n,{});return n.propTypes={},n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n},s=n(2776);function l(e){return"number"!=typeof e?e:`${e}px solid`}function c(e,t){return(0,a.ZP)({prop:e,themeKey:"borders",transform:t})}let u=c("border",l),f=c("borderTop",l),d=c("borderRight",l),m=c("borderBottom",l),p=c("borderLeft",l),g=c("borderColor"),h=c("borderTopColor"),y=c("borderRightColor"),b=c("borderBottomColor"),v=c("borderLeftColor"),x=c("outline",l),k=c("outlineColor"),w=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){let t=(0,r.eI)(e.theme,"shape.borderRadius",4,"borderRadius");return(0,s.k9)(e,e.borderRadius,e=>({borderRadius:(0,r.NA)(t,e)}))}return null};w.propTypes={},w.filterProps=["borderRadius"],o(u,f,d,m,p,g,h,y,b,v,w,x,k);let S=e=>{if(void 0!==e.gap&&null!==e.gap){let t=(0,r.eI)(e.theme,"spacing",8,"gap");return(0,s.k9)(e,e.gap,e=>({gap:(0,r.NA)(t,e)}))}return null};S.propTypes={},S.filterProps=["gap"];let O=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){let t=(0,r.eI)(e.theme,"spacing",8,"columnGap");return(0,s.k9)(e,e.columnGap,e=>({columnGap:(0,r.NA)(t,e)}))}return null};O.propTypes={},O.filterProps=["columnGap"];let A=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){let t=(0,r.eI)(e.theme,"spacing",8,"rowGap");return(0,s.k9)(e,e.rowGap,e=>({rowGap:(0,r.NA)(t,e)}))}return null};A.propTypes={},A.filterProps=["rowGap"];let P=(0,a.ZP)({prop:"gridColumn"}),C=(0,a.ZP)({prop:"gridRow"}),j=(0,a.ZP)({prop:"gridAutoFlow"}),E=(0,a.ZP)({prop:"gridAutoColumns"}),_=(0,a.ZP)({prop:"gridAutoRows"}),M=(0,a.ZP)({prop:"gridTemplateColumns"});function R(e,t){return"grey"===t?t:e}function z(e){return e<=1&&0!==e?`${100*e}%`:e}o(S,O,A,P,C,j,E,_,M,(0,a.ZP)({prop:"gridTemplateRows"}),(0,a.ZP)({prop:"gridTemplateAreas"}),(0,a.ZP)({prop:"gridArea"})),o((0,a.ZP)({prop:"color",themeKey:"palette",transform:R}),(0,a.ZP)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:R}),(0,a.ZP)({prop:"backgroundColor",themeKey:"palette",transform:R}));let N=(0,a.ZP)({prop:"width",transform:z}),I=e=>void 0!==e.maxWidth&&null!==e.maxWidth?(0,s.k9)(e,e.maxWidth,t=>{var n,r;let a=(null==(n=e.theme)||null==(n=n.breakpoints)||null==(n=n.values)?void 0:n[t])||s.VO[t];return a?(null==(r=e.theme)||null==(r=r.breakpoints)?void 0:r.unit)!=="px"?{maxWidth:`${a}${e.theme.breakpoints.unit}`}:{maxWidth:a}:{maxWidth:z(t)}}):null;I.filterProps=["maxWidth"];let T=(0,a.ZP)({prop:"minWidth",transform:z}),$=(0,a.ZP)({prop:"height",transform:z}),Z=(0,a.ZP)({prop:"maxHeight",transform:z}),L=(0,a.ZP)({prop:"minHeight",transform:z});(0,a.ZP)({prop:"size",cssProperty:"width",transform:z}),(0,a.ZP)({prop:"size",cssProperty:"height",transform:z}),o(N,I,T,$,Z,L,(0,a.ZP)({prop:"boxSizing"}));var F={border:{themeKey:"borders",transform:l},borderTop:{themeKey:"borders",transform:l},borderRight:{themeKey:"borders",transform:l},borderBottom:{themeKey:"borders",transform:l},borderLeft:{themeKey:"borders",transform:l},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:l},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:w},color:{themeKey:"palette",transform:R},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:R},backgroundColor:{themeKey:"palette",transform:R},p:{style:r.o3},pt:{style:r.o3},pr:{style:r.o3},pb:{style:r.o3},pl:{style:r.o3},px:{style:r.o3},py:{style:r.o3},padding:{style:r.o3},paddingTop:{style:r.o3},paddingRight:{style:r.o3},paddingBottom:{style:r.o3},paddingLeft:{style:r.o3},paddingX:{style:r.o3},paddingY:{style:r.o3},paddingInline:{style:r.o3},paddingInlineStart:{style:r.o3},paddingInlineEnd:{style:r.o3},paddingBlock:{style:r.o3},paddingBlockStart:{style:r.o3},paddingBlockEnd:{style:r.o3},m:{style:r.e6},mt:{style:r.e6},mr:{style:r.e6},mb:{style:r.e6},ml:{style:r.e6},mx:{style:r.e6},my:{style:r.e6},margin:{style:r.e6},marginTop:{style:r.e6},marginRight:{style:r.e6},marginBottom:{style:r.e6},marginLeft:{style:r.e6},marginX:{style:r.e6},marginY:{style:r.e6},marginInline:{style:r.e6},marginInlineStart:{style:r.e6},marginInlineEnd:{style:r.e6},marginBlock:{style:r.e6},marginBlockStart:{style:r.e6},marginBlockEnd:{style:r.e6},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:S},rowGap:{style:A},columnGap:{style:O},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:z},maxWidth:{style:I},minWidth:{transform:z},height:{transform:z},maxHeight:{transform:z},minHeight:{transform:z},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}}},2123:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return r.Z},extendSxProp:function(){return u},unstable_createStyleFunctionSx:function(){return r.n},unstable_defaultSxConfig:function(){return s.Z}});var r=n(9811),a=n(2110),i=n(444),o=n(439),s=n(1870);let l=["sx"],c=e=>{var t,n;let r={systemProps:{},otherProps:{}},a=null!=(t=null==e||null==(n=e.theme)?void 0:n.unstable_sxConfig)?t:s.Z;return Object.keys(e).forEach(t=>{a[t]?r.systemProps[t]=e[t]:r.otherProps[t]=e[t]}),r};function u(e){let t;let{sx:n}=e,{systemProps:r,otherProps:s}=c((0,i.Z)(e,l));return t=Array.isArray(n)?[r,...n]:"function"==typeof n?(...e)=>{let t=n(...e);return(0,o.P)(t)?(0,a.Z)({},r,t):r}:(0,a.Z)({},r,n),(0,a.Z)({},s,{sx:t})}},9811:function(e,t,n){"use strict";n.d(t,{n:function(){return l}});var r=n(2423),a=n(9771),i=n(9957),o=n(2776),s=n(1870);function l(){function e(e,t,n,a){let s={[e]:t,theme:n},l=a[e];if(!l)return{[e]:t};let{cssProperty:c=e,themeKey:u,transform:f,style:d}=l;if(null==t)return null;if("typography"===u&&"inherit"===t)return{[e]:t};let m=(0,i.DW)(n,u)||{};return d?d(s):(0,o.k9)(s,t,t=>{let n=(0,i.Jq)(m,f,t);return(t===n&&"string"==typeof t&&(n=(0,i.Jq)(m,f,`${e}${"default"===t?"":(0,r.Z)(t)}`,t)),!1===c)?n:{[c]:n}})}return function t(n){var r;let{sx:i,theme:l={}}=n||{};if(!i)return null;let c=null!=(r=l.unstable_sxConfig)?r:s.Z;function u(n){let r=n;if("function"==typeof n)r=n(l);else if("object"!=typeof n)return n;if(!r)return null;let i=(0,o.W8)(l.breakpoints),s=Object.keys(i),u=i;return Object.keys(r).forEach(n=>{var i;let s="function"==typeof(i=r[n])?i(l):i;if(null!=s){if("object"==typeof s){if(c[n])u=(0,a.Z)(u,e(n,s,l,c));else{let e=(0,o.k9)({theme:l},s,e=>({[n]:e}));(function(...e){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),n=new Set(t);return e.every(e=>n.size===Object.keys(e).length)})(e,s)?u[n]=t({sx:s,theme:l}):u=(0,a.Z)(u,e)}}else u=(0,a.Z)(u,e(n,s,l,c))}}),(0,o.L7)(s,u)}return Array.isArray(i)?i.map(u):u(i)}}let c=l();c.filterProps=["sx"],t.Z=c},2423:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(6064);function a(e){if("string"!=typeof e)throw Error((0,r.Z)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},326:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return r.Z}});var r=n(2423)},3264:function(e,t){"use strict";t.Z=function(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}},800:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return r.Z}});var r=n(3264)},439:function(e,t,n){"use strict";n.d(t,{P:function(){return a},Z:function(){return function e(t,n,i={clone:!0}){let o=i.clone?(0,r.Z)({},t):t;return a(t)&&a(n)&&Object.keys(n).forEach(r=>{"__proto__"!==r&&(a(n[r])&&r in t&&a(t[r])?o[r]=e(t[r],n[r],i):i.clone?o[r]=a(n[r])?function e(t){if(!a(t))return t;let n={};return Object.keys(t).forEach(r=>{n[r]=e(t[r])}),n}(n[r]):n[r]:o[r]=n[r])}),o}}});var r=n(2110);function a(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}},4257:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return r.Z},isPlainObject:function(){return r.P}});var r=n(439)},6064:function(e,t,n){"use strict";function r(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&a(!0),null==n?void 0:n.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let r=!1,a=!1;n.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>r,isPropagationStopped:()=>a,persist:()=>{},preventDefault:()=>{r=!0,t.preventDefault()},stopPropagation:()=>{a=!0,t.stopPropagation()}})}(null==r?void 0:r.current)&&r.current(e)}}))}function h(e){let[t,n]=o.version.split(".",2),r=parseInt(t,10),a=parseInt(n,10);return r>18||18===r&&a>=3?{fetchPriority:e}:{fetchpriority:e}}"undefined"==typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let y=(0,o.forwardRef)((e,t)=>{let{src:n,srcSet:r,sizes:a,height:s,width:l,decoding:c,className:u,style:f,fetchPriority:d,placeholder:m,loading:p,unoptimized:y,fill:b,onLoadRef:v,onLoadingCompleteRef:x,setBlurComplete:k,setShowAltText:w,onLoad:S,onError:O,...A}=e;return(0,i.jsx)("img",{...A,...h(d),loading:p,width:l,height:s,decoding:c,"data-nimg":b?"fill":"1",className:u,style:f,sizes:a,srcSet:r,src:n,ref:(0,o.useCallback)(e=>{t&&("function"==typeof t?t(e):"object"==typeof t&&(t.current=e)),e&&(O&&(e.src=e.src),e.complete&&g(e,m,v,x,k,y))},[n,m,v,x,k,O,y,t]),onLoad:e=>{g(e.currentTarget,m,v,x,k,y)},onError:e=>{w(!0),"empty"!==m&&k(!0),O&&O(e)}})});function b(e){let{isAppRouter:t,imgAttributes:n}=e,r={as:"image",imageSrcSet:n.srcSet,imageSizes:n.sizes,crossOrigin:n.crossOrigin,referrerPolicy:n.referrerPolicy,...h(n.fetchPriority)};return t&&s.default.preload?(s.default.preload(n.src,r),null):(0,i.jsx)(l.default,{children:(0,i.jsx)("link",{rel:"preload",href:n.srcSet?void 0:n.src,...r},"__nimg-"+n.src+n.srcSet+n.sizes)})}let v=(0,o.forwardRef)((e,t)=>{let n=(0,o.useContext)(d.RouterContext),r=(0,o.useContext)(f.ImageConfigContext),a=(0,o.useMemo)(()=>{let e=p||r||u.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),n=e.deviceSizes.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:n}},[r]),{onLoad:s,onLoadingComplete:l}=e,g=(0,o.useRef)(s);(0,o.useEffect)(()=>{g.current=s},[s]);let h=(0,o.useRef)(l);(0,o.useEffect)(()=>{h.current=l},[l]);let[v,x]=(0,o.useState)(!1),[k,w]=(0,o.useState)(!1),{props:S,meta:O}=(0,c.getImgProps)(e,{defaultLoader:m.default,imgConf:a,blurComplete:v,showAltText:k});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(y,{...S,unoptimized:O.unoptimized,placeholder:O.placeholder,fill:O.fill,onLoadRef:g,onLoadingCompleteRef:h,setBlurComplete:x,setShowAltText:w,ref:t}),O.priority?(0,i.jsx)(b,{isAppRouter:!n,imgAttributes:S}):null]})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5827:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AmpStateContext",{enumerable:!0,get:function(){return r}});let r=n(6921)._(n(2265)).default.createContext({})},3044:function(e,t){"use strict";function n(e){let{ampFirst:t=!1,hybrid:n=!1,hasQuery:r=!1}=void 0===e?{}:e;return t||n&&r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isInAmpMode",{enumerable:!0,get:function(){return n}})},8630:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImgProps",{enumerable:!0,get:function(){return s}}),n(6184);let r=n(7160),a=n(6906);function i(e){return void 0!==e.default}function o(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function s(e,t){var n;let s,l,c,{src:u,sizes:f,unoptimized:d=!1,priority:m=!1,loading:p,className:g,quality:h,width:y,height:b,fill:v=!1,style:x,onLoad:k,onLoadingComplete:w,placeholder:S="empty",blurDataURL:O,fetchPriority:A,layout:P,objectFit:C,objectPosition:j,lazyBoundary:E,lazyRoot:_,...M}=e,{imgConf:R,showAltText:z,blurComplete:N,defaultLoader:I}=t,T=R||a.imageConfigDefault;if("allSizes"in T)s=T;else{let e=[...T.deviceSizes,...T.imageSizes].sort((e,t)=>e-t),t=T.deviceSizes.sort((e,t)=>e-t);s={...T,allSizes:e,deviceSizes:t}}let $=M.loader||I;delete M.loader,delete M.srcSet;let Z="__next_img_default"in $;if(Z){if("custom"===s.loader)throw Error('Image with src "'+u+'" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader')}else{let e=$;$=t=>{let{config:n,...r}=t;return e(r)}}if(P){"fill"===P&&(v=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[P];e&&(x={...x,...e});let t={responsive:"100vw",fill:"100vw"}[P];t&&!f&&(f=t)}let L="",F=o(y),D=o(b);if("object"==typeof(n=u)&&(i(n)||void 0!==n.src)){let e=i(u)?u.default:u;if(!e.src)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(e));if(!e.height||!e.width)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(e));if(l=e.blurWidth,c=e.blurHeight,O=O||e.blurDataURL,L=e.src,!v){if(F||D){if(F&&!D){let t=F/e.width;D=Math.round(e.height*t)}else if(!F&&D){let t=D/e.height;F=Math.round(e.width*t)}}else F=e.width,D=e.height}}let B=!m&&("lazy"===p||void 0===p);(!(u="string"==typeof u?u:L)||u.startsWith("data:")||u.startsWith("blob:"))&&(d=!0,B=!1),s.unoptimized&&(d=!0),Z&&u.endsWith(".svg")&&!s.dangerouslyAllowSVG&&(d=!0),m&&(A="high");let H=o(h),W=Object.assign(v?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:C,objectPosition:j}:{},z?{}:{color:"transparent"},x),Y=N||"empty"===S?null:"blur"===S?'url("data:image/svg+xml;charset=utf-8,'+(0,r.getImageBlurSvg)({widthInt:F,heightInt:D,blurWidth:l,blurHeight:c,blurDataURL:O||"",objectFit:W.objectFit})+'")':'url("'+S+'")',V=Y?{backgroundSize:W.objectFit||"cover",backgroundPosition:W.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:Y}:{},G=function(e){let{config:t,src:n,unoptimized:r,width:a,quality:i,sizes:o,loader:s}=e;if(r)return{src:n,srcSet:void 0,sizes:void 0};let{widths:l,kind:c}=function(e,t,n){let{deviceSizes:r,allSizes:a}=e;if(n){let e=/(^|\s)(1?\d?\d)vw/g,t=[];for(let r;r=e.exec(n);r)t.push(parseInt(r[2]));if(t.length){let e=.01*Math.min(...t);return{widths:a.filter(t=>t>=r[0]*e),kind:"w"}}return{widths:a,kind:"w"}}return"number"!=typeof t?{widths:r,kind:"w"}:{widths:[...new Set([t,2*t].map(e=>a.find(t=>t>=e)||a[a.length-1]))],kind:"x"}}(t,a,o),u=l.length-1;return{sizes:o||"w"!==c?o:"100vw",srcSet:l.map((e,r)=>s({config:t,src:n,quality:i,width:e})+" "+("w"===c?e:r+1)+c).join(", "),src:s({config:t,src:n,quality:i,width:l[u]})}}({config:s,src:u,unoptimized:d,width:F,quality:H,sizes:f,loader:$});return{props:{...M,loading:B?"lazy":p,fetchPriority:A,width:F,height:D,decoding:"async",className:g,style:{...W,...V},sizes:G.sizes,srcSet:G.srcSet,src:G.src},meta:{unoptimized:d,priority:m,placeholder:S,fill:v}}}},2251:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{defaultHead:function(){return f},default:function(){return g}});let r=n(6921),a=n(1884),i=n(7437),o=a._(n(2265)),s=r._(n(7392)),l=n(5827),c=n(7484),u=n(3044);function f(e){void 0===e&&(e=!1);let t=[(0,i.jsx)("meta",{charSet:"utf-8"})];return e||t.push((0,i.jsx)("meta",{name:"viewport",content:"width=device-width"})),t}function d(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===o.default.Fragment?e.concat(o.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}n(6184);let m=["name","httpEquiv","charSet","itemProp"];function p(e,t){let{inAmpMode:n}=t;return e.reduce(d,[]).reverse().concat(f(n).reverse()).filter(function(){let e=new Set,t=new Set,n=new Set,r={};return a=>{let i=!0,o=!1;if(a.key&&"number"!=typeof a.key&&a.key.indexOf("$")>0){o=!0;let t=a.key.slice(a.key.indexOf("$")+1);e.has(t)?i=!1:e.add(t)}switch(a.type){case"title":case"base":t.has(a.type)?i=!1:t.add(a.type);break;case"meta":for(let e=0,t=m.length;e{let r=e.key||t;if(!n&&"link"===e.type&&e.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some(t=>e.props.href.startsWith(t))){let t={...e.props||{}};return t["data-href"]=t.href,t.href=void 0,t["data-optimized-fonts"]=!0,o.default.cloneElement(e,t)}return o.default.cloneElement(e,{key:r})})}let g=function(e){let{children:t}=e,n=(0,o.useContext)(l.AmpStateContext),r=(0,o.useContext)(c.HeadManagerContext);return(0,i.jsx)(s.default,{reduceComponentsToState:p,headManager:r,inAmpMode:(0,u.isInAmpMode)(n),children:t})};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7160:function(e,t){"use strict";function n(e){let{widthInt:t,heightInt:n,blurWidth:r,blurHeight:a,blurDataURL:i,objectFit:o}=e,s=r?40*r:t,l=a?40*a:n,c=s&&l?"viewBox='0 0 "+s+" "+l+"'":"";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+c+"%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='"+(c?"none":"contain"===o?"xMidYMid":"cover"===o?"xMidYMid slice":"none")+"' style='filter: url(%23b);' href='"+i+"'/%3E%3C/svg%3E"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImageBlurSvg",{enumerable:!0,get:function(){return n}})},337:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ImageConfigContext",{enumerable:!0,get:function(){return i}});let r=n(6921)._(n(2265)),a=n(6906),i=r.default.createContext(a.imageConfigDefault)},6906:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{VALID_LOADERS:function(){return n},imageConfigDefault:function(){return r}});let n=["default","imgix","cloudinary","akamai","custom"],r={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:60,formats:["image/webp"],dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"inline",remotePatterns:[],unoptimized:!1}},7447:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getImageProps:function(){return s},default:function(){return l}});let r=n(6921),a=n(8630),i=n(1749),o=r._(n(536)),s=e=>{let{props:t}=(0,a.getImgProps)(e,{defaultLoader:o.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/travelBuddy/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,n]of Object.entries(t))void 0===n&&delete t[e];return{props:t}},l=i.Image},536:function(e,t){"use strict";function n(e){let{config:t,src:n,width:r,quality:a}=e;return t.path+"?url="+encodeURIComponent(n)+"&w="+r+"&q="+(a||75)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}}),n.__next_img_default=!0;let r=n},7392:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}});let r=n(2265),a="undefined"==typeof window,i=a?()=>{}:r.useLayoutEffect,o=a?()=>{}:r.useEffect;function s(e){let{headManager:t,reduceComponentsToState:n}=e;function s(){if(t&&t.mountedInstances){let a=r.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(n(a,e))}}if(a){var l;null==t||null==(l=t.mountedInstances)||l.add(e.children),s()}return i(()=>{var n;return null==t||null==(n=t.mountedInstances)||n.add(e.children),()=>{var n;null==t||null==(n=t.mountedInstances)||n.delete(e.children)}}),i(()=>(t&&(t._pendingUpdate=s),()=>{t&&(t._pendingUpdate=s)})),o(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},8314:function(e,t,n){"use strict";var r=n(1811);function a(){}function i(){}i.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,i,o){if(o!==r){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;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:i,resetWarningCache:a};return n.PropTypes=n,n}},4404:function(e,t,n){e.exports=n(8314)()},1811:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},2498:function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[n]=e[n]);return a},e.exports.__esModule=!0,e.exports.default=e.exports},2110:function(e,t,n){"use strict";function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[n]=e[n]);return a}n.d(t,{Z:function(){return r}})}}]); \ No newline at end of file diff --git a/out/_next/static/chunks/664-ac01f0104386d934.js b/out/_next/static/chunks/664-ac01f0104386d934.js new file mode 100644 index 0000000..04595e3 --- /dev/null +++ b/out/_next/static/chunks/664-ac01f0104386d934.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[664],{5634:function(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{PrefetchKind:function(){return n},ACTION_REFRESH:function(){return o},ACTION_NAVIGATE:function(){return u},ACTION_RESTORE:function(){return l},ACTION_SERVER_PATCH:function(){return f},ACTION_PREFETCH:function(){return i},ACTION_FAST_REFRESH:function(){return a},ACTION_SERVER_ACTION:function(){return c},isThenable:function(){return s}});let o="refresh",u="navigate",l="restore",f="server-patch",i="prefetch",a="fast-refresh",c="server-action";function s(e){return e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}(r=n||(n={})).AUTO="auto",r.FULL="full",r.TEMPORARY="temporary",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7149:function(e,t,n){"use strict";function r(e,t,n,r){return!1}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return r}}),n(4648),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5494:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return g}});let r=n(8754),o=n(5893),u=r._(n(7294)),l=n(5203),f=n(298),i=n(1024),a=n(5522),c=n(2208),s=n(5832),d=n(2497),p=n(7283),y=n(7149),b=n(9290),h=n(5634),v=new Set;function _(e,t,n,r,o,u){if(u||(0,f.isLocalURL)(t)){if(!r.bypassPrefetchedCheck){let o=t+"%"+n+"%"+(void 0!==r.locale?r.locale:"locale"in e?e.locale:void 0);if(v.has(o))return;v.add(o)}Promise.resolve(u?e.prefetch(t,o):e.prefetch(t,n,r)).catch(e=>{})}}function O(e){return"string"==typeof e?e:(0,i.formatUrl)(e)}let g=u.default.forwardRef(function(e,t){let n,r;let{href:i,as:v,children:g,prefetch:C=null,passHref:E,replace:j,shallow:P,scroll:T,locale:M,onClick:R,onMouseEnter:m,onTouchStart:A,legacyBehavior:k=!1,...I}=e;n=g,k&&("string"==typeof n||"number"==typeof n)&&(n=(0,o.jsx)("a",{children:n}));let L=u.default.useContext(s.RouterContext),x=u.default.useContext(d.AppRouterContext),S=null!=L?L:x,N=!L,U=!1!==C,w=null===C?h.PrefetchKind.AUTO:h.PrefetchKind.FULL,{href:K,as:F}=u.default.useMemo(()=>{if(!L){let e=O(i);return{href:e,as:v?O(v):e}}let[e,t]=(0,l.resolveHref)(L,i,!0);return{href:e,as:v?(0,l.resolveHref)(L,v):t||e}},[L,i,v]),H=u.default.useRef(K),D=u.default.useRef(F);k&&(r=u.default.Children.only(n));let V=k?r&&"object"==typeof r&&r.ref:t,[q,z,B]=(0,p.useIntersection)({rootMargin:"200px"}),G=u.default.useCallback(e=>{(D.current!==F||H.current!==K)&&(B(),D.current=F,H.current=K),q(e),V&&("function"==typeof V?V(e):"object"==typeof V&&(V.current=e))},[F,V,K,B,q]);u.default.useEffect(()=>{S&&z&&U&&_(S,K,F,{locale:M},{kind:w},N)},[F,K,z,M,U,null==L?void 0:L.locale,S,N,w]);let Y={ref:G,onClick(e){k||"function"!=typeof R||R(e),k&&r.props&&"function"==typeof r.props.onClick&&r.props.onClick(e),S&&!e.defaultPrevented&&function(e,t,n,r,o,l,i,a,c){let{nodeName:s}=e.currentTarget;if("A"===s.toUpperCase()&&(function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!c&&!(0,f.isLocalURL)(n)))return;e.preventDefault();let d=()=>{let e=null==i||i;"beforePopState"in t?t[o?"replace":"push"](n,r,{shallow:l,locale:a,scroll:e}):t[o?"replace":"push"](r||n,{scroll:e})};c?u.default.startTransition(d):d()}(e,S,K,F,j,P,T,M,N)},onMouseEnter(e){k||"function"!=typeof m||m(e),k&&r.props&&"function"==typeof r.props.onMouseEnter&&r.props.onMouseEnter(e),S&&(U||!N)&&_(S,K,F,{locale:M,priority:!0,bypassPrefetchedCheck:!0},{kind:w},N)},onTouchStart(e){k||"function"!=typeof A||A(e),k&&r.props&&"function"==typeof r.props.onTouchStart&&r.props.onTouchStart(e),S&&(U||!N)&&_(S,K,F,{locale:M,priority:!0,bypassPrefetchedCheck:!0},{kind:w},N)}};if((0,a.isAbsoluteUrl)(F))Y.href=F;else if(!k||E||"a"===r.type&&!("href"in r.props)){let e=void 0!==M?M:null==L?void 0:L.locale,t=(null==L?void 0:L.isLocaleDomain)&&(0,y.getDomainLocale)(F,e,null==L?void 0:L.locales,null==L?void 0:L.domainLocales);Y.href=t||(0,b.addBasePath)((0,c.addLocale)(F,e,null==L?void 0:L.defaultLocale))}return k?u.default.cloneElement(r,Y):(0,o.jsx)("a",{...I,...Y,children:n})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7283:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return i}});let r=n(7294),o=n(9833),u="function"==typeof IntersectionObserver,l=new Map,f=[];function i(e){let{rootRef:t,rootMargin:n,disabled:i}=e,a=i||!u,[c,s]=(0,r.useState)(!1),d=(0,r.useRef)(null),p=(0,r.useCallback)(e=>{d.current=e},[]);return(0,r.useEffect)(()=>{if(u){if(a||c)return;let e=d.current;if(e&&e.tagName)return function(e,t,n){let{id:r,observer:o,elements:u}=function(e){let t;let n={root:e.root||null,margin:e.rootMargin||""},r=f.find(e=>e.root===n.root&&e.margin===n.margin);if(r&&(t=l.get(r)))return t;let o=new Map;return t={id:n,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=o.get(e.target),n=e.isIntersecting||e.intersectionRatio>0;t&&n&&t(n)})},e),elements:o},f.push(n),l.set(n,t),t}(n);return u.set(e,t),o.observe(e),function(){if(u.delete(e),o.unobserve(e),0===u.size){o.disconnect(),l.delete(r);let e=f.findIndex(e=>e.root===r.root&&e.margin===r.margin);e>-1&&f.splice(e,1)}}}(e,e=>e&&s(e),{root:null==t?void 0:t.current,rootMargin:n})}else if(!c){let e=(0,o.requestIdleCallback)(()=>s(!0));return()=>(0,o.cancelIdleCallback)(e)}},[a,n,t,c,d.current]),[p,c,(0,r.useCallback)(()=>{s(!1)},[])]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1664:function(e,t,n){e.exports=n(5494)}}]); \ No newline at end of file diff --git a/out/_next/static/chunks/69-6f9b973c29822e43.js b/out/_next/static/chunks/69-6f9b973c29822e43.js new file mode 100644 index 0000000..3376b73 --- /dev/null +++ b/out/_next/static/chunks/69-6f9b973c29822e43.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[69],{269:function(e,t){"use strict";function r(){return""}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDeploymentIdQueryOrEmptyString",{enumerable:!0,get:function(){return r}})},9338:function(){"trimStart"in String.prototype||(String.prototype.trimStart=String.prototype.trimLeft),"trimEnd"in String.prototype||(String.prototype.trimEnd=String.prototype.trimRight),"description"in Symbol.prototype||Object.defineProperty(Symbol.prototype,"description",{configurable:!0,get:function(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}}),Array.prototype.flat||(Array.prototype.flat=function(e,t){return t=this.concat.apply([],this),e>1&&t.some(Array.isArray)?t.flat(e-1):t},Array.prototype.flatMap=function(e,t){return this.map(e,t).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(e){if("function"!=typeof e)return this.then(e,e);var t=this.constructor||Promise;return this.then(function(r){return t.resolve(e()).then(function(){return r})},function(r){return t.resolve(e()).then(function(){throw r})})}),Object.fromEntries||(Object.fromEntries=function(e){return Array.from(e).reduce(function(e,t){return e[t[0]]=t[1],e},{})}),Array.prototype.at||(Array.prototype.at=function(e){var t=Math.trunc(e)||0;if(t<0&&(t+=this.length),!(t<0||t>=this.length))return this[t]})},5786:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return u}});let n=r(1312),o=r(2139);function u(e,t){return(0,o.normalizePathTrailingSlash)((0,n.addPathPrefix)(e,"/travelBuddy"))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6159:function(e,t){"use strict";function r(e){var t,r;t=self.__next_s,r=()=>{e()},t&&t.length?t.reduce((e,t)=>{let[r,n]=t;return e.then(()=>new Promise((e,t)=>{let o=document.createElement("script");if(n)for(let e in n)"children"!==e&&o.setAttribute(e,n[e]);r?(o.src=r,o.onload=()=>e(),o.onerror=t):n&&(o.innerHTML=n.children,setTimeout(e)),document.head.appendChild(o)}))},Promise.resolve()).catch(e=>{console.error(e)}).then(()=>{r()}):r()}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"appBootstrap",{enumerable:!0,get:function(){return r}}),window.next={version:"14.1.4",appDir:!0},("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5355:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"callServer",{enumerable:!0,get:function(){return o}});let n=r(7690);async function o(e,t){let r=(0,n.getServerActionDispatcher)();if(!r)throw Error("Invariant: missing action dispatcher.");return new Promise((n,o)=>{r({actionId:e,actionArgs:t,resolve:n,reject:o})})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},945:function(e,t,r){"use strict";let n,o;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hydrate",{enumerable:!0,get:function(){return C}});let u=r(6921),l=r(1884),a=r(7437);r(9338);let i=u._(r(4040)),c=l._(r(2265)),s=r(6671),f=r(7484);r(8599);let d=u._(r(4101)),p=r(5355),h=r(4950),y=r(5367),_=window.console.error;window.console.error=function(){for(var e=arguments.length,t=Array(e),r=0;r{if((0,h.isNextRouterError)(e.error)){e.preventDefault();return}});let v=document,b=()=>{let{pathname:e,search:t}=location;return e+t},g=new TextEncoder,m=!1,P=!1,j=null;function O(e){if(0===e[0])n=[];else if(1===e[0]){if(!n)throw Error("Unexpected server data: missing bootstrap script.");o?o.enqueue(g.encode(e[1])):n.push(e[1])}else 2===e[0]&&(j=e[1])}let R=function(){o&&!P&&(o.close(),P=!0,n=void 0),m=!0};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",R,!1):R();let S=self.__next_f=self.__next_f||[];S.forEach(O),S.push=O;let E=new Map;function w(e){let{cacheKey:t}=e;c.default.useEffect(()=>{E.delete(t)});let r=function(e){let t=E.get(e);if(t)return t;let r=new ReadableStream({start(e){n&&(n.forEach(t=>{e.enqueue(g.encode(t))}),m&&!P&&(e.close(),P=!0,n=void 0)),o=e}}),u=(0,s.createFromReadableStream)(r,{callServer:p.callServer});return E.set(e,u),u}(t);return(0,c.use)(r)}let M=c.default.StrictMode;function T(e){let{children:t}=e;return t}function x(e){return(0,a.jsx)(w,{...e,cacheKey:b()})}function C(){let e=(0,y.createMutableActionQueue)(),t=(0,a.jsx)(M,{children:(0,a.jsx)(f.HeadManagerContext.Provider,{value:{appDir:!0},children:(0,a.jsx)(y.ActionQueueContext.Provider,{value:e,children:(0,a.jsx)(T,{children:(0,a.jsx)(x,{})})})})}),r={onRecoverableError:d.default};"__next_error__"===document.documentElement.id?i.default.createRoot(v,r).render(t):c.default.startTransition(()=>i.default.hydrateRoot(v,t,{...r,formState:j}))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5317:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9590),(0,r(6159).appBootstrap)(()=>{let{hydrate:e}=r(945);r(7690),r(5613),e()}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9590:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(269);{let e=r.u;r.u=function(){for(var t=arguments.length,r=Array(t),n=0;n(l(function(){var e;let t=document.getElementsByName(u)[0];if(null==t?void 0:null==(e=t.shadowRoot)?void 0:e.childNodes[0])return t.shadowRoot.childNodes[0];{let e=document.createElement(u);e.style.cssText="position:absolute";let t=document.createElement("div");return t.ariaLive="assertive",t.id="__next-route-announcer__",t.role="alert",t.style.cssText="position:absolute;border:0;height:1px;margin:-1px;padding:0;width:1px;clip:rect(0 0 0 0);overflow:hidden;white-space:nowrap;word-wrap:normal",e.attachShadow({mode:"open"}).appendChild(t),document.body.appendChild(e),t}}()),()=>{let e=document.getElementsByTagName(u)[0];(null==e?void 0:e.isConnected)&&document.body.removeChild(e)}),[]);let[a,i]=(0,n.useState)(""),c=(0,n.useRef)();return(0,n.useEffect)(()=>{let e="";if(document.title)e=document.title;else{let t=document.querySelector("h1");t&&(e=t.innerText||t.textContent||"")}void 0!==c.current&&c.current!==e&&i(e),c.current=e},[t]),r?(0,o.createPortal)(a,r):null}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2275:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{RSC_HEADER:function(){return r},ACTION:function(){return n},NEXT_ROUTER_STATE_TREE:function(){return o},NEXT_ROUTER_PREFETCH_HEADER:function(){return u},NEXT_URL:function(){return l},RSC_CONTENT_TYPE_HEADER:function(){return a},RSC_VARY_HEADER:function(){return i},FLIGHT_PARAMETERS:function(){return c},NEXT_RSC_UNION_QUERY:function(){return s},NEXT_DID_POSTPONE_HEADER:function(){return f}});let r="RSC",n="Next-Action",o="Next-Router-State-Tree",u="Next-Router-Prefetch",l="Next-Url",a="text/x-component",i=r+", "+o+", "+u+", "+l,c=[[r],[o],[u]],s="_rsc",f="x-nextjs-postponed";("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7690:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getServerActionDispatcher:function(){return S},urlToUrlWithoutFlightMarker:function(){return w},createEmptyCacheNode:function(){return x},default:function(){return I}});let n=r(1884),o=r(7437),u=n._(r(2265)),l=r(8599),a=r(1414),i=r(8419),c=r(4758),s=r(1276),f=r(8955),d=r(4492),p=r(6407),h=r(5786),y=r(2054),_=r(5737),v=r(671),b=r(4399),g=r(2275),m=r(8895),P=r(7379),j="undefined"==typeof window,O=j?null:new Map,R=null;function S(){return R}let E={};function w(e){let t=new URL(e,location.origin);if(t.searchParams.delete(g.NEXT_RSC_UNION_QUERY),t.pathname.endsWith(".txt")){let{pathname:e}=t,r=e.endsWith("/index.txt")?10:4;t.pathname=e.slice(0,-r)}return t}function M(e){return e.origin!==window.location.origin}function T(e){let{appRouterState:t,sync:r}=e;return(0,u.useInsertionEffect)(()=>{let{tree:e,pushRef:n,canonicalUrl:o}=t,u={...n.preserveCustomHistoryState?window.history.state:{},__NA:!0,__PRIVATE_NEXTJS_INTERNALS_TREE:e};n.pendingPush&&(0,i.createHrefFromUrl)(new URL(window.location.href))!==o?(n.pendingPush=!1,window.history.pushState(u,"",o)):window.history.replaceState(u,"",o),r(t)},[t,r]),null}function x(){return{lazyData:null,rsc:null,prefetchRsc:null,parallelRoutes:new Map,lazyDataResolved:!1}}function C(e){null==e&&(e={});let t=window.history.state,r=null==t?void 0:t.__NA;r&&(e.__NA=r);let n=null==t?void 0:t.__PRIVATE_NEXTJS_INTERNALS_TREE;return n&&(e.__PRIVATE_NEXTJS_INTERNALS_TREE=n),e}function N(e){let{headCacheNode:t}=e,r=null!==t?t.head:null,n=null!==t?t.prefetchHead:null,o=null!==n?n:r;return(0,u.useDeferredValue)(r,o)}function A(e){let t,{buildId:r,initialHead:n,initialTree:i,initialCanonicalUrl:f,initialSeedData:g,assetPrefix:S,missingSlots:w}=e,x=(0,u.useMemo)(()=>(0,d.createInitialRouterState)({buildId:r,initialSeedData:g,initialCanonicalUrl:f,initialTree:i,initialParallelRoutes:O,isServer:j,location:j?null:window.location,initialHead:n}),[r,g,f,i,n]),[A,I,k]=(0,s.useReducerWithReduxDevtools)(x);(0,u.useEffect)(()=>{O=null},[]);let{canonicalUrl:D}=(0,s.useUnwrapState)(A),{searchParams:U,pathname:F}=(0,u.useMemo)(()=>{let e=new URL(D,"undefined"==typeof window?"http://n":window.location.href);return{searchParams:e.searchParams,pathname:(0,P.hasBasePath)(e.pathname)?(0,m.removeBasePath)(e.pathname):e.pathname}},[D]),L=(0,u.useCallback)((e,t,r)=>{(0,u.startTransition)(()=>{I({type:a.ACTION_SERVER_PATCH,flightData:t,previousTree:e,overrideCanonicalUrl:r})})},[I]),H=(0,u.useCallback)((e,t,r)=>{let n=new URL((0,h.addBasePath)(e),location.href);return I({type:a.ACTION_NAVIGATE,url:n,isExternalUrl:M(n),locationSearch:location.search,shouldScroll:null==r||r,navigateType:t})},[I]);R=(0,u.useCallback)(e=>{(0,u.startTransition)(()=>{I({...e,type:a.ACTION_SERVER_ACTION})})},[I]);let $=(0,u.useMemo)(()=>({back:()=>window.history.back(),forward:()=>window.history.forward(),prefetch:(e,t)=>{if((0,p.isBot)(window.navigator.userAgent))return;let r=new URL((0,h.addBasePath)(e),window.location.href);M(r)||(0,u.startTransition)(()=>{var e;I({type:a.ACTION_PREFETCH,url:r,kind:null!=(e=null==t?void 0:t.kind)?e:a.PrefetchKind.FULL})})},replace:(e,t)=>{void 0===t&&(t={}),(0,u.startTransition)(()=>{var r;H(e,"replace",null==(r=t.scroll)||r)})},push:(e,t)=>{void 0===t&&(t={}),(0,u.startTransition)(()=>{var r;H(e,"push",null==(r=t.scroll)||r)})},refresh:()=>{(0,u.startTransition)(()=>{I({type:a.ACTION_REFRESH,origin:window.location.origin})})},fastRefresh:()=>{throw Error("fastRefresh can only be used in development mode. Please use refresh instead.")}}),[I,H]);(0,u.useEffect)(()=>{window.next&&(window.next.router=$)},[$]),(0,u.useEffect)(()=>{function e(e){var t;e.persisted&&(null==(t=window.history.state)?void 0:t.__PRIVATE_NEXTJS_INTERNALS_TREE)&&(E.pendingMpaPath=void 0,I({type:a.ACTION_RESTORE,url:new URL(window.location.href),tree:window.history.state.__PRIVATE_NEXTJS_INTERNALS_TREE}))}return window.addEventListener("pageshow",e),()=>{window.removeEventListener("pageshow",e)}},[I]);let{pushRef:B}=(0,s.useUnwrapState)(A);if(B.mpaNavigation){if(E.pendingMpaPath!==D){let e=window.location;B.pendingPush?e.assign(D):e.replace(D),E.pendingMpaPath=D}(0,u.use)((0,b.createInfinitePromise)())}(0,u.useEffect)(()=>{let e=window.history.pushState.bind(window.history),t=window.history.replaceState.bind(window.history),r=e=>{var t;let r=window.location.href,n=null==(t=window.history.state)?void 0:t.__PRIVATE_NEXTJS_INTERNALS_TREE;(0,u.startTransition)(()=>{I({type:a.ACTION_RESTORE,url:new URL(null!=e?e:r,r),tree:n})})};window.history.pushState=function(t,n,o){return(null==t?void 0:t.__NA)||(null==t?void 0:t._N)||(t=C(t),o&&r(o)),e(t,n,o)},window.history.replaceState=function(e,n,o){return(null==e?void 0:e.__NA)||(null==e?void 0:e._N)||(e=C(e),o&&r(o)),t(e,n,o)};let n=e=>{let{state:t}=e;if(t){if(!t.__NA){window.location.reload();return}(0,u.startTransition)(()=>{I({type:a.ACTION_RESTORE,url:new URL(window.location.href),tree:t.__PRIVATE_NEXTJS_INTERNALS_TREE})})}};return window.addEventListener("popstate",n),()=>{window.history.pushState=e,window.history.replaceState=t,window.removeEventListener("popstate",n)}},[I]);let{cache:G,tree:W,nextUrl:z,focusAndScrollRef:K}=(0,s.useUnwrapState)(A),V=(0,u.useMemo)(()=>(0,v.findHeadInCache)(G,W[1]),[G,W]);if(null!==V){let[e,r]=V;t=(0,o.jsx)(N,{headCacheNode:e},r)}else t=null;let Y=(0,o.jsxs)(_.RedirectBoundary,{children:[t,G.rsc,(0,o.jsx)(y.AppRouterAnnouncer,{tree:W})]});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(T,{appRouterState:(0,s.useUnwrapState)(A),sync:k}),(0,o.jsx)(c.PathnameContext.Provider,{value:F,children:(0,o.jsx)(c.SearchParamsContext.Provider,{value:U,children:(0,o.jsx)(l.GlobalLayoutRouterContext.Provider,{value:{buildId:r,changeByServerResponse:L,tree:W,focusAndScrollRef:K,nextUrl:z},children:(0,o.jsx)(l.AppRouterContext.Provider,{value:$,children:(0,o.jsx)(l.LayoutRouterContext.Provider,{value:{childNodes:G.parallelRoutes,tree:W,url:D},children:Y})})})})})]})}function I(e){let{globalErrorComponent:t,...r}=e;return(0,o.jsx)(f.ErrorBoundary,{errorComponent:t,children:(0,o.jsx)(A,{...r})})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9408:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"bailoutToClientRendering",{enumerable:!0,get:function(){return u}});let n=r(9775),o=r(2);function u(e){let t=o.staticGenerationAsyncStorage.getStore();if((null==t||!t.forceStatic)&&(null==t?void 0:t.isStaticGeneration))throw new n.BailoutToCSRError(e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3706:function(e,t,r){"use strict";function n(e){}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"clientHookInServerComponentError",{enumerable:!0,get:function(){return n}}),r(6921),r(2265),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8955:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ErrorBoundaryHandler:function(){return s},GlobalError:function(){return f},default:function(){return d},ErrorBoundary:function(){return p}});let n=r(6921),o=r(7437),u=n._(r(2265)),l=r(5313),a=r(4950),i={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},text:{fontSize:"14px",fontWeight:400,lineHeight:"28px",margin:"0 8px"}};function c(e){let{error:t}=e;if("function"==typeof fetch.__nextGetStaticStore){var r;let e=null==(r=fetch.__nextGetStaticStore())?void 0:r.getStore();if((null==e?void 0:e.isRevalidate)||(null==e?void 0:e.isStaticGeneration))throw console.error(t),t}return null}class s extends u.default.Component{static getDerivedStateFromError(e){if((0,a.isNextRouterError)(e))throw e;return{error:e}}static getDerivedStateFromProps(e,t){return e.pathname!==t.previousPathname&&t.error?{error:null,previousPathname:e.pathname}:{error:t.error,previousPathname:e.pathname}}render(){return this.state.error?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c,{error:this.state.error}),this.props.errorStyles,this.props.errorScripts,(0,o.jsx)(this.props.errorComponent,{error:this.state.error,reset:this.reset})]}):this.props.children}constructor(e){super(e),this.reset=()=>{this.setState({error:null})},this.state={error:null,previousPathname:this.props.pathname}}}function f(e){let{error:t}=e,r=null==t?void 0:t.digest;return(0,o.jsxs)("html",{id:"__next_error__",children:[(0,o.jsx)("head",{}),(0,o.jsxs)("body",{children:[(0,o.jsx)(c,{error:t}),(0,o.jsx)("div",{style:i.error,children:(0,o.jsxs)("div",{children:[(0,o.jsx)("h2",{style:i.text,children:"Application error: a "+(r?"server":"client")+"-side exception has occurred (see the "+(r?"server logs":"browser console")+" for more information)."}),r?(0,o.jsx)("p",{style:i.text,children:"Digest: "+r}):null]})})]})]})}let d=f;function p(e){let{errorComponent:t,errorStyles:r,errorScripts:n,children:u}=e,a=(0,l.usePathname)();return t?(0,o.jsx)(s,{pathname:a,errorComponent:t,errorStyles:r,errorScripts:n,children:u}):(0,o.jsx)(o.Fragment,{children:u})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7127:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DynamicServerError:function(){return n},isDynamicServerError:function(){return o}});let r="DYNAMIC_SERVER_USAGE";class n extends Error{constructor(e){super("Dynamic server usage: "+e),this.description=e,this.digest=r}}function o(e){return"object"==typeof e&&null!==e&&"digest"in e&&"string"==typeof e.digest&&e.digest===r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4399:function(e,t){"use strict";let r;function n(){return r||(r=new Promise(()=>{})),r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createInfinitePromise",{enumerable:!0,get:function(){return n}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4950:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isNextRouterError",{enumerable:!0,get:function(){return u}});let n=r(2322),o=r(6155);function u(e){return e&&e.digest&&((0,o.isRedirectError)(e)||(0,n.isNotFoundError)(e))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5613:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return R}});let n=r(6921),o=r(1884),u=r(7437),l=o._(r(2265)),a=n._(r(4887)),i=r(8599),c=r(3546),s=r(4399),f=r(8955),d=r(2295),p=r(3011),h=r(5737),y=r(1902),_=r(6793),v=r(555),b=["bottom","height","left","right","top","width","x","y"];function g(e,t){let r=e.getBoundingClientRect();return r.top>=0&&r.top<=t}class m extends l.default.Component{componentDidMount(){this.handlePotentialScroll()}componentDidUpdate(){this.props.focusAndScrollRef.apply&&this.handlePotentialScroll()}render(){return this.props.children}constructor(...e){super(...e),this.handlePotentialScroll=()=>{let{focusAndScrollRef:e,segmentPath:t}=this.props;if(e.apply){var r;if(0!==e.segmentPaths.length&&!e.segmentPaths.some(e=>t.every((t,r)=>(0,d.matchSegment)(t,e[r]))))return;let n=null,o=e.hashFragment;if(o&&(n="top"===o?document.body:null!=(r=document.getElementById(o))?r:document.getElementsByName(o)[0]),n||(n="undefined"==typeof window?null:a.default.findDOMNode(this)),!(n instanceof Element))return;for(;!(n instanceof HTMLElement)||function(e){if(["sticky","fixed"].includes(getComputedStyle(e).position))return!0;let t=e.getBoundingClientRect();return b.every(e=>0===t[e])}(n);){if(null===n.nextElementSibling)return;n=n.nextElementSibling}e.apply=!1,e.hashFragment=null,e.segmentPaths=[],(0,p.handleSmoothScroll)(()=>{if(o){n.scrollIntoView();return}let e=document.documentElement,t=e.clientHeight;!g(n,t)&&(e.scrollTop=0,g(n,t)||n.scrollIntoView())},{dontForceLayout:!0,onlyHashChange:e.onlyHashChange}),e.onlyHashChange=!1,n.focus()}}}}function P(e){let{segmentPath:t,children:r}=e,n=(0,l.useContext)(i.GlobalLayoutRouterContext);if(!n)throw Error("invariant global layout router not mounted");return(0,u.jsx)(m,{segmentPath:t,focusAndScrollRef:n.focusAndScrollRef,children:r})}function j(e){let{parallelRouterKey:t,url:r,childNodes:n,segmentPath:o,tree:a,cacheKey:f}=e,p=(0,l.useContext)(i.GlobalLayoutRouterContext);if(!p)throw Error("invariant global layout router not mounted");let{buildId:h,changeByServerResponse:y,tree:_}=p,v=n.get(f);if(void 0===v){let e={lazyData:null,rsc:null,prefetchRsc:null,head:null,parallelRoutes:new Map,lazyDataResolved:!1};v=e,n.set(f,e)}let b=null!==v.prefetchRsc?v.prefetchRsc:v.rsc,g=(0,l.useDeferredValue)(v.rsc,b),m="object"==typeof g&&null!==g&&"function"==typeof g.then?(0,l.use)(g):g;if(!m){let e=v.lazyData;if(null===e){let t=function e(t,r){if(t){let[n,o]=t,u=2===t.length;if((0,d.matchSegment)(r[0],n)&&r[1].hasOwnProperty(o)){if(u){let t=e(void 0,r[1][o]);return[r[0],{...r[1],[o]:[t[0],t[1],t[2],"refetch"]}]}return[r[0],{...r[1],[o]:e(t.slice(2),r[1][o])}]}}return r}(["",...o],_);v.lazyData=e=(0,c.fetchServerResponse)(new URL(r,location.origin),t,p.nextUrl,h),v.lazyDataResolved=!1}let[t,n]=(0,l.use)(e);v.lazyDataResolved||(setTimeout(()=>{(0,l.startTransition)(()=>{y(_,t,n)})}),v.lazyDataResolved=!0),(0,l.use)((0,s.createInfinitePromise)())}return(0,u.jsx)(i.LayoutRouterContext.Provider,{value:{tree:a[1][t],childNodes:v.parallelRoutes,url:r},children:m})}function O(e){let{children:t,loading:r,loadingStyles:n,loadingScripts:o,hasLoading:a}=e;return a?(0,u.jsx)(l.Suspense,{fallback:(0,u.jsxs)(u.Fragment,{children:[n,o,r]}),children:t}):(0,u.jsx)(u.Fragment,{children:t})}function R(e){let{parallelRouterKey:t,segmentPath:r,error:n,errorStyles:o,errorScripts:a,templateStyles:c,templateScripts:s,loading:d,loadingStyles:p,loadingScripts:b,hasLoading:g,template:m,notFound:R,notFoundStyles:S,styles:E}=e,w=(0,l.useContext)(i.LayoutRouterContext);if(!w)throw Error("invariant expected layout router to be mounted");let{childNodes:M,tree:T,url:x}=w,C=M.get(t);C||(C=new Map,M.set(t,C));let N=T[1][t][0],A=(0,_.getSegmentValue)(N),I=[N];return(0,u.jsxs)(u.Fragment,{children:[E,I.map(e=>{let l=(0,_.getSegmentValue)(e),E=(0,v.createRouterCacheKey)(e);return(0,u.jsxs)(i.TemplateContext.Provider,{value:(0,u.jsx)(P,{segmentPath:r,children:(0,u.jsx)(f.ErrorBoundary,{errorComponent:n,errorStyles:o,errorScripts:a,children:(0,u.jsx)(O,{hasLoading:g,loading:d,loadingStyles:p,loadingScripts:b,children:(0,u.jsx)(y.NotFoundBoundary,{notFound:R,notFoundStyles:S,children:(0,u.jsx)(h.RedirectBoundary,{children:(0,u.jsx)(j,{parallelRouterKey:t,url:x,tree:T,childNodes:C,segmentPath:r,cacheKey:E,isActive:A===l})})})})})}),children:[c,s,m]},(0,v.createRouterCacheKey)(e,!0))})]})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2295:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{matchSegment:function(){return o},canSegmentBeOverridden:function(){return u}});let n=r(2883),o=(e,t)=>"string"==typeof e?"string"==typeof t&&e===t:"string"!=typeof t&&e[0]===t[0]&&e[1]===t[1],u=(e,t)=>{var r;return!Array.isArray(e)&&!!Array.isArray(t)&&(null==(r=(0,n.getSegmentParam)(e))?void 0:r.param)===t[0]};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5313:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ReadonlyURLSearchParams:function(){return h},useSearchParams:function(){return y},usePathname:function(){return _},ServerInsertedHTMLContext:function(){return c.ServerInsertedHTMLContext},useServerInsertedHTML:function(){return c.useServerInsertedHTML},useRouter:function(){return v},useParams:function(){return b},useSelectedLayoutSegments:function(){return g},useSelectedLayoutSegment:function(){return m},redirect:function(){return s.redirect},permanentRedirect:function(){return s.permanentRedirect},RedirectType:function(){return s.RedirectType},notFound:function(){return f.notFound}});let n=r(2265),o=r(8599),u=r(4758),l=r(3706),a=r(6793),i=r(3266),c=r(2472),s=r(6155),f=r(2322),d=Symbol("internal for urlsearchparams readonly");function p(){return Error("ReadonlyURLSearchParams cannot be modified")}class h{[Symbol.iterator](){return this[d][Symbol.iterator]()}append(){throw p()}delete(){throw p()}set(){throw p()}sort(){throw p()}constructor(e){this[d]=e,this.entries=e.entries.bind(e),this.forEach=e.forEach.bind(e),this.get=e.get.bind(e),this.getAll=e.getAll.bind(e),this.has=e.has.bind(e),this.keys=e.keys.bind(e),this.values=e.values.bind(e),this.toString=e.toString.bind(e),this.size=e.size}}function y(){(0,l.clientHookInServerComponentError)("useSearchParams");let e=(0,n.useContext)(u.SearchParamsContext),t=(0,n.useMemo)(()=>e?new h(e):null,[e]);if("undefined"==typeof window){let{bailoutToClientRendering:e}=r(9408);e("useSearchParams()")}return t}function _(){return(0,l.clientHookInServerComponentError)("usePathname"),(0,n.useContext)(u.PathnameContext)}function v(){(0,l.clientHookInServerComponentError)("useRouter");let e=(0,n.useContext)(o.AppRouterContext);if(null===e)throw Error("invariant expected app router to be mounted");return e}function b(){(0,l.clientHookInServerComponentError)("useParams");let e=(0,n.useContext)(o.GlobalLayoutRouterContext),t=(0,n.useContext)(u.PathParamsContext);return(0,n.useMemo)(()=>(null==e?void 0:e.tree)?function e(t,r){for(let n of(void 0===r&&(r={}),Object.values(t[1]))){let t=n[0],o=Array.isArray(t),u=o?t[1]:t;!u||u.startsWith(i.PAGE_SEGMENT_KEY)||(o&&("c"===t[2]||"oc"===t[2])?r[t[0]]=t[1].split("/"):o&&(r[t[0]]=t[1]),r=e(n,r))}return r}(e.tree):t,[null==e?void 0:e.tree,t])}function g(e){void 0===e&&(e="children"),(0,l.clientHookInServerComponentError)("useSelectedLayoutSegments");let{tree:t}=(0,n.useContext)(o.LayoutRouterContext);return function e(t,r,n,o){let u;if(void 0===n&&(n=!0),void 0===o&&(o=[]),n)u=t[1][r];else{var l;let e=t[1];u=null!=(l=e.children)?l:Object.values(e)[0]}if(!u)return o;let c=u[0],s=(0,a.getSegmentValue)(c);return!s||s.startsWith(i.PAGE_SEGMENT_KEY)?o:(o.push(s),e(u,r,!1,o))}(t,e)}function m(e){void 0===e&&(e="children"),(0,l.clientHookInServerComponentError)("useSelectedLayoutSegment");let t=g(e);return 0===t.length?null:t[0]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1902:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NotFoundBoundary",{enumerable:!0,get:function(){return s}});let n=r(1884),o=r(7437),u=n._(r(2265)),l=r(5313),a=r(2322);r(6184);let i=r(8599);class c extends u.default.Component{componentDidCatch(){}static getDerivedStateFromError(e){if((0,a.isNotFoundError)(e))return{notFoundTriggered:!0};throw e}static getDerivedStateFromProps(e,t){return e.pathname!==t.previousPathname&&t.notFoundTriggered?{notFoundTriggered:!1,previousPathname:e.pathname}:{notFoundTriggered:t.notFoundTriggered,previousPathname:e.pathname}}render(){return this.state.notFoundTriggered?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("meta",{name:"robots",content:"noindex"}),!1,this.props.notFoundStyles,this.props.notFound]}):this.props.children}constructor(e){super(e),this.state={notFoundTriggered:!!e.asNotFound,previousPathname:e.pathname}}}function s(e){let{notFound:t,notFoundStyles:r,asNotFound:n,children:a}=e,s=(0,l.usePathname)(),f=(0,u.useContext)(i.MissingSlotContext);return t?(0,o.jsx)(c,{pathname:s,notFound:t,notFoundStyles:r,asNotFound:n,missingSlots:f,children:a}):(0,o.jsx)(o.Fragment,{children:a})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2322:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{notFound:function(){return n},isNotFoundError:function(){return o}});let r="NEXT_NOT_FOUND";function n(){let e=Error(r);throw e.digest=r,e}function o(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2418:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PromiseQueue",{enumerable:!0,get:function(){return c}});let n=r(2299),o=r(3603);var u=o._("_maxConcurrency"),l=o._("_runningCount"),a=o._("_queue"),i=o._("_processNext");class c{enqueue(e){let t,r;let o=new Promise((e,n)=>{t=e,r=n}),u=async()=>{try{n._(this,l)[l]++;let r=await e();t(r)}catch(e){r(e)}finally{n._(this,l)[l]--,n._(this,i)[i]()}};return n._(this,a)[a].push({promiseFn:o,task:u}),n._(this,i)[i](),o}bump(e){let t=n._(this,a)[a].findIndex(t=>t.promiseFn===e);if(t>-1){let e=n._(this,a)[a].splice(t,1)[0];n._(this,a)[a].unshift(e),n._(this,i)[i](!0)}}constructor(e=5){Object.defineProperty(this,i,{value:s}),Object.defineProperty(this,u,{writable:!0,value:void 0}),Object.defineProperty(this,l,{writable:!0,value:void 0}),Object.defineProperty(this,a,{writable:!0,value:void 0}),n._(this,u)[u]=e,n._(this,l)[l]=0,n._(this,a)[a]=[]}}function s(e){if(void 0===e&&(e=!1),(n._(this,l)[l]0){var t;null==(t=n._(this,a)[a].shift())||t.task()}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5737:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{RedirectErrorBoundary:function(){return c},RedirectBoundary:function(){return s}});let n=r(1884),o=r(7437),u=n._(r(2265)),l=r(5313),a=r(6155);function i(e){let{redirect:t,reset:r,redirectType:n}=e,o=(0,l.useRouter)();return(0,u.useEffect)(()=>{u.default.startTransition(()=>{n===a.RedirectType.push?o.push(t,{}):o.replace(t,{}),r()})},[t,n,r,o]),null}class c extends u.default.Component{static getDerivedStateFromError(e){if((0,a.isRedirectError)(e))return{redirect:(0,a.getURLFromRedirectError)(e),redirectType:(0,a.getRedirectTypeFromError)(e)};throw e}render(){let{redirect:e,redirectType:t}=this.state;return null!==e&&null!==t?(0,o.jsx)(i,{redirect:e,redirectType:t,reset:()=>this.setState({redirect:null})}):this.props.children}constructor(e){super(e),this.state={redirect:null,redirectType:null}}}function s(e){let{children:t}=e,r=(0,l.useRouter)();return(0,o.jsx)(c,{router:r,children:t})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9510:function(e,t){"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RedirectStatusCode",{enumerable:!0,get:function(){return r}}),(n=r||(r={}))[n.SeeOther=303]="SeeOther",n[n.TemporaryRedirect=307]="TemporaryRedirect",n[n.PermanentRedirect=308]="PermanentRedirect",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6155:function(e,t,r){"use strict";var n,o;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{RedirectType:function(){return n},getRedirectError:function(){return c},redirect:function(){return s},permanentRedirect:function(){return f},isRedirectError:function(){return d},getURLFromRedirectError:function(){return p},getRedirectTypeFromError:function(){return h},getRedirectStatusCodeFromError:function(){return y}});let u=r(6668),l=r(1264),a=r(9510),i="NEXT_REDIRECT";function c(e,t,r){void 0===r&&(r=a.RedirectStatusCode.TemporaryRedirect);let n=Error(i);n.digest=i+";"+t+";"+e+";"+r+";";let o=u.requestAsyncStorage.getStore();return o&&(n.mutableCookies=o.mutableCookies),n}function s(e,t){void 0===t&&(t="replace");let r=l.actionAsyncStorage.getStore();throw c(e,t,(null==r?void 0:r.isAction)?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.TemporaryRedirect)}function f(e,t){void 0===t&&(t="replace");let r=l.actionAsyncStorage.getStore();throw c(e,t,(null==r?void 0:r.isAction)?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.PermanentRedirect)}function d(e){if("object"!=typeof e||null===e||!("digest"in e)||"string"!=typeof e.digest)return!1;let[t,r,n,o]=e.digest.split(";",4),u=Number(o);return t===i&&("replace"===r||"push"===r)&&"string"==typeof n&&!isNaN(u)&&u in a.RedirectStatusCode}function p(e){return d(e)?e.digest.split(";",3)[2]:null}function h(e){if(!d(e))throw Error("Not a redirect error");return e.digest.split(";",2)[1]}function y(e){if(!d(e))throw Error("Not a redirect error");return Number(e.digest.split(";",4)[3])}(o=n||(n={})).push="push",o.replace="replace",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1778:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let n=r(1884),o=r(7437),u=n._(r(2265)),l=r(8599);function a(){let e=(0,u.useContext)(l.TemplateContext);return(0,o.jsx)(o.Fragment,{children:e})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6668:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return n}});let n=(0,r(693).createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9671:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"applyFlightData",{enumerable:!0,get:function(){return u}});let n=r(4765),o=r(0);function u(e,t,r,u){void 0===u&&(u=!1);let[l,a,i]=r.slice(-3);if(null===a)return!1;if(3===r.length){let r=a[2];t.rsc=r,t.prefetchRsc=null,(0,n.fillLazyItemsTillLeafWithHead)(t,e,l,a,i,u)}else t.rsc=e.rsc,t.prefetchRsc=e.prefetchRsc,t.parallelRoutes=new Map(e.parallelRoutes),(0,o.fillCacheWithNewSubTreeData)(t,e,r,u);return!0}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7098:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{applyRouterStatePatchToFullTree:function(){return a},applyRouterStatePatchToTreeSkipDefault:function(){return i}});let n=r(3266),o=r(2295);function u(e,t,r){void 0===r&&(r=!1);let[l,a]=e,[i,c]=t;if(!r&&i===n.DEFAULT_SEGMENT_KEY&&l!==n.DEFAULT_SEGMENT_KEY)return e;if((0,o.matchSegment)(l,i)){let t={};for(let e in a)void 0!==c[e]?t[e]=u(a[e],c[e],r):t[e]=a[e];for(let e in c)t[e]||(t[e]=c[e]);let n=[l,t];return e[2]&&(n[2]=e[2]),e[3]&&(n[3]=e[3]),e[4]&&(n[4]=e[4]),n}return t}function l(e,t,r,n){let a;void 0===n&&(n=!1);let[i,c,,,s]=t;if(1===e.length)return u(t,r,n);let[f,d]=e;if(!(0,o.matchSegment)(f,i))return null;if(2===e.length)a=u(c[d],r,n);else if(null===(a=l(e.slice(2),c[d],r,n)))return null;let p=[e[0],{...c,[d]:a}];return s&&(p[4]=!0),p}function a(e,t,r){return l(e,t,r,!0)}function i(e,t,r){return l(e,t,r,!1)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4038:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{extractPathFromFlightRouterState:function(){return c},computeChangedPath:function(){return s}});let n=r(4749),o=r(3266),u=r(2295),l=e=>"/"===e[0]?e.slice(1):e,a=e=>"string"==typeof e?e:e[1];function i(e){return e.reduce((e,t)=>""===(t=l(t))||(0,o.isGroupSegment)(t)?e:e+"/"+t,"")||"/"}function c(e){var t;let r=Array.isArray(e[0])?e[0][1]:e[0];if(r===o.DEFAULT_SEGMENT_KEY||n.INTERCEPTION_ROUTE_MARKERS.some(e=>r.startsWith(e)))return;if(r.startsWith(o.PAGE_SEGMENT_KEY))return"";let u=[r],l=null!=(t=e[1])?t:{},a=l.children?c(l.children):void 0;if(void 0!==a)u.push(a);else for(let[e,t]of Object.entries(l)){if("children"===e)continue;let r=c(t);void 0!==r&&u.push(r)}return i(u)}function s(e,t){let r=function e(t,r){let[o,l]=t,[i,s]=r,f=a(o),d=a(i);if(n.INTERCEPTION_ROUTE_MARKERS.some(e=>f.startsWith(e)||d.startsWith(e)))return"";if(!(0,u.matchSegment)(o,i)){var p;return null!=(p=c(r))?p:""}for(let t in l)if(s[t]){let r=e(l[t],s[t]);if(null!==r)return a(i)+"/"+r}return null}(e,t);return null==r||"/"===r?r:i(r.split("/"))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8419:function(e,t){"use strict";function r(e,t){return void 0===t&&(t=!0),e.pathname+e.search+(t?e.hash:"")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createHrefFromUrl",{enumerable:!0,get:function(){return r}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4492:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createInitialRouterState",{enumerable:!0,get:function(){return l}});let n=r(8419),o=r(4765),u=r(4038);function l(e){var t;let{buildId:r,initialTree:l,initialSeedData:a,initialCanonicalUrl:i,initialParallelRoutes:c,isServer:s,location:f,initialHead:d}=e,p={lazyData:null,rsc:a[2],prefetchRsc:null,parallelRoutes:s?new Map:c};return(null===c||0===c.size)&&(0,o.fillLazyItemsTillLeafWithHead)(p,void 0,l,a,d),{buildId:r,tree:l,cache:p,prefetchCache:new Map,pushRef:{pendingPush:!1,mpaNavigation:!1,preserveCustomHistoryState:!0},focusAndScrollRef:{apply:!1,onlyHashChange:!1,hashFragment:null,segmentPaths:[]},canonicalUrl:f?(0,n.createHrefFromUrl)(f):i,nextUrl:null!=(t=(0,u.extractPathFromFlightRouterState)(l)||(null==f?void 0:f.pathname))?t:null}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},555:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createRouterCacheKey",{enumerable:!0,get:function(){return o}});let n=r(3266);function o(e,t){return(void 0===t&&(t=!1),Array.isArray(e))?(e[0]+"|"+e[1]+"|"+e[2]).toLowerCase():t&&e.startsWith(n.PAGE_SEGMENT_KEY)?n.PAGE_SEGMENT_KEY:e}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3546:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fetchServerResponse",{enumerable:!0,get:function(){return s}});let n=r(2275),o=r(7690),u=r(5355),l=r(1414),a=r(1),{createFromFetch:i}=r(6671);function c(e){return[(0,o.urlToUrlWithoutFlightMarker)(e).toString(),void 0]}async function s(e,t,r,s,f){let d={[n.RSC_HEADER]:"1",[n.NEXT_ROUTER_STATE_TREE]:encodeURIComponent(JSON.stringify(t))};f===l.PrefetchKind.AUTO&&(d[n.NEXT_ROUTER_PREFETCH_HEADER]="1"),r&&(d[n.NEXT_URL]=r);let p=(0,a.hexHash)([d[n.NEXT_ROUTER_PREFETCH_HEADER]||"0",d[n.NEXT_ROUTER_STATE_TREE],d[n.NEXT_URL]].join(","));try{let t=new URL(e);t.pathname.endsWith("/")?t.pathname+="index.txt":t.pathname+=".txt",t.searchParams.set(n.NEXT_RSC_UNION_QUERY,p);let r=await fetch(t,{credentials:"same-origin",headers:d}),l=(0,o.urlToUrlWithoutFlightMarker)(r.url),a=r.redirected?l:void 0,f=r.headers.get("content-type")||"",h=!!r.headers.get(n.NEXT_DID_POSTPONE_HEADER),y=f===n.RSC_CONTENT_TYPE_HEADER;if(y||(y=f.startsWith("text/plain")),!y||!r.ok)return e.hash&&(l.hash=e.hash),c(l.toString());let[_,v]=await i(Promise.resolve(r),{callServer:u.callServer});if(s!==_)return c(r.url);return[v,a,h]}catch(t){return console.error("Failed to fetch RSC payload for "+e+". Falling back to browser navigation.",t),[e.toString(),void 0]}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2950:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fillCacheWithDataProperty",{enumerable:!0,get:function(){return function e(t,r,o,u){let l=o.length<=2,[a,i]=o,c=(0,n.createRouterCacheKey)(i),s=r.parallelRoutes.get(a),f=t.parallelRoutes.get(a);f&&f!==s||(f=new Map(s),t.parallelRoutes.set(a,f));let d=null==s?void 0:s.get(c),p=f.get(c);if(l){p&&p.lazyData&&p!==d||f.set(c,{lazyData:u(),rsc:null,prefetchRsc:null,parallelRoutes:new Map});return}if(!p||!d){p||f.set(c,{lazyData:u(),rsc:null,prefetchRsc:null,parallelRoutes:new Map});return}return p===d&&(p={lazyData:p.lazyData,rsc:p.rsc,prefetchRsc:p.prefetchRsc,parallelRoutes:new Map(p.parallelRoutes)},f.set(c,p)),e(p,d,o.slice(2),u)}}});let n=r(555);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},0:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fillCacheWithNewSubTreeData",{enumerable:!0,get:function(){return function e(t,r,l,a){let i=l.length<=5,[c,s]=l,f=(0,u.createRouterCacheKey)(s),d=r.parallelRoutes.get(c);if(!d)return;let p=t.parallelRoutes.get(c);p&&p!==d||(p=new Map(d),t.parallelRoutes.set(c,p));let h=d.get(f),y=p.get(f);if(i){if(!y||!y.lazyData||y===h){let e=l[3];y={lazyData:null,rsc:e[2],prefetchRsc:null,parallelRoutes:h?new Map(h.parallelRoutes):new Map},h&&(0,n.invalidateCacheByRouterState)(y,h,l[2]),(0,o.fillLazyItemsTillLeafWithHead)(y,h,l[2],e,l[4],a),p.set(f,y)}return}y&&h&&(y===h&&(y={lazyData:y.lazyData,rsc:y.rsc,prefetchRsc:y.prefetchRsc,parallelRoutes:new Map(y.parallelRoutes)},p.set(f,y)),e(y,h,l.slice(2),a))}}});let n=r(6152),o=r(4765),u=r(555);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4765:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fillLazyItemsTillLeafWithHead",{enumerable:!0,get:function(){return function e(t,r,o,u,l,a){if(0===Object.keys(o[1]).length){t.head=l;return}for(let i in o[1]){let c;let s=o[1][i],f=s[0],d=(0,n.createRouterCacheKey)(f),p=null!==u&&void 0!==u[1][i]?u[1][i]:null;if(r){let n=r.parallelRoutes.get(i);if(n){let r,o=new Map(n),u=o.get(d);r=null!==p?{lazyData:null,rsc:p[2],prefetchRsc:null,parallelRoutes:new Map(null==u?void 0:u.parallelRoutes)}:a&&u?{lazyData:u.lazyData,rsc:u.rsc,prefetchRsc:u.prefetchRsc,parallelRoutes:new Map(u.parallelRoutes)}:{lazyData:null,rsc:null,prefetchRsc:null,parallelRoutes:new Map(null==u?void 0:u.parallelRoutes)},o.set(d,r),e(r,u,s,p||null,l,a),t.parallelRoutes.set(i,o);continue}}c=null!==p?{lazyData:null,rsc:p[2],prefetchRsc:null,parallelRoutes:new Map}:{lazyData:null,rsc:null,prefetchRsc:null,parallelRoutes:new Map};let h=t.parallelRoutes.get(i);h?h.set(d,c):t.parallelRoutes.set(i,new Map([[d,c]])),e(c,void 0,s,p,l,a)}}}});let n=r(555);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1486:function(e,t){"use strict";var r,n;function o(e){let{kind:t,prefetchTime:r,lastUsedTime:n}=e;return Date.now()<(null!=n?n:r)+3e4?n?"reusable":"fresh":"auto"===t&&Date.now(){for(let r of t[0]){let t=r.slice(0,-3),n=r[r.length-3],l=r[r.length-2],a=r[r.length-1];"string"!=typeof t&&function(e,t,r,n,l){let a=e;for(let e=0;e{c(e,t)})}function i(e,t,r,n){let o=e[1],l=null!==t?t[1]:null,a=new Map;for(let e in o){let t=o[e],c=null!==l?l[e]:null,s=t[0],f=(0,u.createRouterCacheKey)(s),d=i(t,void 0===c?null:c,r,n),p=new Map;p.set(f,d),a.set(e,p)}let c=0===a.size,s=null!==t?t[2]:null;return{lazyData:null,parallelRoutes:a,prefetchRsc:n||void 0===s?null:s,prefetchHead:!n&&c?r:null,rsc:p(),head:c?p():null}}function c(e,t){let r=e.node;if(null===r)return;let n=e.children;if(null===n)s(e.route,r,t);else for(let e of n.values())c(e,t);e.node=null}function s(e,t,r){let n=e[1],o=t.parallelRoutes;for(let e in n){let t=n[e],l=o.get(e);if(void 0===l)continue;let a=t[0],i=(0,u.createRouterCacheKey)(a),c=l.get(i);void 0!==c&&s(t,c,r)}let l=t.rsc;d(l)&&(null===r?l.resolve(null):l.reject(r));let a=t.head;d(a)&&a.resolve(null)}let f=Symbol();function d(e){return e&&e.tag===f}function p(){let e,t;let r=new Promise((r,n)=>{e=r,t=n});return r.status="pending",r.resolve=t=>{"pending"===r.status&&(r.status="fulfilled",r.value=t,e(t))},r.reject=e=>{"pending"===r.status&&(r.status="rejected",r.reason=e,t(e))},r.tag=f,r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5606:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createPrefetchCacheKey",{enumerable:!0,get:function(){return l}});let n=r(1312),o=r(7027),u=r(8419);function l(e,t){let r=(0,u.createHrefFromUrl)(e,!1);return t&&!(0,o.pathHasPrefix)(r,t)?(0,n.addPathPrefix)(r,""+t+"%"):r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6503:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fastRefreshReducer",{enumerable:!0,get:function(){return n}}),r(3546),r(8419),r(7098),r(1956),r(5596),r(8875),r(9671),r(7690),r(2224);let n=function(e,t){return e};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},671:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"findHeadInCache",{enumerable:!0,get:function(){return o}});let n=r(555);function o(e,t){return function e(t,r,o){if(0===Object.keys(r).length)return[t,o];for(let u in r){let[l,a]=r[u],i=t.parallelRoutes.get(u);if(!i)continue;let c=(0,n.createRouterCacheKey)(l),s=i.get(c);if(!s)continue;let f=e(s,a,o+"/"+c);if(f)return f}return null}(e,t,"")}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6793:function(e,t){"use strict";function r(e){return Array.isArray(e)?e[1]:e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentValue",{enumerable:!0,get:function(){return r}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5596:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{handleExternalUrl:function(){return g},navigateReducer:function(){return P}});let n=r(3546),o=r(8419),u=r(3074),l=r(2950),a=r(7098),i=r(3556),c=r(1956),s=r(1414),f=r(8875),d=r(9671),p=r(1486),h=r(7052),y=r(5678),_=r(7690),v=r(3266);r(6384);let b=r(5606);function g(e,t,r,n){return t.mpaNavigation=!0,t.canonicalUrl=r,t.pendingPush=n,t.scrollableSegments=void 0,(0,f.handleMutable)(e,t)}function m(e){let t=[],[r,n]=e;if(0===Object.keys(n).length)return[[r]];for(let[e,o]of Object.entries(n))for(let n of m(o))""===r?t.push([e,...n]):t.push([r,e,...n]);return t}let P=function(e,t){let{url:r,isExternalUrl:P,navigateType:j,shouldScroll:O}=t,R={},{hash:S}=r,E=(0,o.createHrefFromUrl)(r),w="push"===j;if((0,h.prunePrefetchCache)(e.prefetchCache),R.preserveCustomHistoryState=!1,P)return g(e,R,r.toString(),w);let M=(0,b.createPrefetchCacheKey)(r,e.nextUrl),T=e.prefetchCache.get(M);if(!T){let t={data:(0,n.fetchServerResponse)(r,e.tree,e.nextUrl,e.buildId,void 0),kind:s.PrefetchKind.TEMPORARY,prefetchTime:Date.now(),treeAtTimeOfPrefetch:e.tree,lastUsedTime:null};e.prefetchCache.set(M,t),T=t}let x=(0,p.getPrefetchEntryCacheStatus)(T),{treeAtTimeOfPrefetch:C,data:N}=T;return y.prefetchQueue.bump(N),N.then(t=>{let[s,h,y]=t;if(T&&!T.lastUsedTime&&(T.lastUsedTime=Date.now()),"string"==typeof s)return g(e,R,s,w);let b=e.tree,P=e.cache,j=[];for(let t of s){let o=t.slice(0,-4),s=t.slice(-3)[0],f=["",...o],h=(0,a.applyRouterStatePatchToTreeSkipDefault)(f,b,s);if(null===h&&(h=(0,a.applyRouterStatePatchToTreeSkipDefault)(f,C,s)),null!==h){if((0,c.isNavigatingToNewRootLayout)(b,h))return g(e,R,E,w);let a=(0,_.createEmptyCacheNode)(),O=(0,d.applyFlightData)(P,a,t,(null==T?void 0:T.kind)==="auto"&&x===p.PrefetchCacheEntryStatus.reusable);for(let t of((!O&&x===p.PrefetchCacheEntryStatus.stale||y)&&(O=function(e,t,r,n,o){let u=!1;for(let a of(e.rsc=t.rsc,e.prefetchRsc=t.prefetchRsc,e.parallelRoutes=new Map(t.parallelRoutes),m(n).map(e=>[...r,...e])))(0,l.fillCacheWithDataProperty)(e,t,a,o),u=!0;return u}(a,P,o,s,()=>(0,n.fetchServerResponse)(r,b,e.nextUrl,e.buildId))),(0,i.shouldHardNavigate)(f,b)?(a.rsc=P.rsc,a.prefetchRsc=P.prefetchRsc,(0,u.invalidateCacheBelowFlightSegmentPath)(a,P,o),R.cache=a):O&&(R.cache=a),P=a,b=h,m(s))){let e=[...o,...t];e[e.length-1]!==v.DEFAULT_SEGMENT_KEY&&j.push(e)}}}return R.patchedTree=b,R.canonicalUrl=h?(0,o.createHrefFromUrl)(h):E,R.pendingPush=w,R.scrollableSegments=j,R.hashFragment=S,R.shouldScroll=O,(0,f.handleMutable)(e,R)},()=>e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5678:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{prefetchQueue:function(){return c},prefetchReducer:function(){return s}});let n=r(3546),o=r(1414),u=r(7052),l=r(2275),a=r(2418),i=r(5606),c=new a.PromiseQueue(5);function s(e,t){(0,u.prunePrefetchCache)(e.prefetchCache);let{url:r}=t;r.searchParams.delete(l.NEXT_RSC_UNION_QUERY);let a=(0,i.createPrefetchCacheKey)(r,e.nextUrl),s=e.prefetchCache.get(a);if(s&&(s.kind===o.PrefetchKind.TEMPORARY&&e.prefetchCache.set(a,{...s,kind:t.kind}),!(s.kind===o.PrefetchKind.AUTO&&t.kind===o.PrefetchKind.FULL)))return e;let f=c.enqueue(()=>(0,n.fetchServerResponse)(r,e.tree,e.nextUrl,e.buildId,t.kind));return e.prefetchCache.set(a,{treeAtTimeOfPrefetch:e.tree,data:f,kind:t.kind,prefetchTime:Date.now(),lastUsedTime:null}),e}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7052:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"prunePrefetchCache",{enumerable:!0,get:function(){return o}});let n=r(1486);function o(e){for(let[t,r]of e)(0,n.getPrefetchEntryCacheStatus)(r)===n.PrefetchCacheEntryStatus.expired&&e.delete(t)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7491:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"refreshReducer",{enumerable:!0,get:function(){return d}});let n=r(3546),o=r(8419),u=r(7098),l=r(1956),a=r(5596),i=r(8875),c=r(4765),s=r(7690),f=r(2224);function d(e,t){let{origin:r}=t,d={},p=e.canonicalUrl,h=e.tree;d.preserveCustomHistoryState=!1;let y=(0,s.createEmptyCacheNode)();return y.lazyData=(0,n.fetchServerResponse)(new URL(p,r),[h[0],h[1],h[2],"refetch"],e.nextUrl,e.buildId),y.lazyData.then(r=>{let[n,s]=r;if("string"==typeof n)return(0,a.handleExternalUrl)(e,d,n,e.pushRef.pendingPush);for(let r of(y.lazyData=null,n)){if(3!==r.length)return console.log("REFRESH FAILED"),e;let[n]=r,i=(0,u.applyRouterStatePatchToFullTree)([""],h,n);if(null===i)return(0,f.handleSegmentMismatch)(e,t,n);if((0,l.isNavigatingToNewRootLayout)(h,i))return(0,a.handleExternalUrl)(e,d,p,e.pushRef.pendingPush);let _=s?(0,o.createHrefFromUrl)(s):void 0;s&&(d.canonicalUrl=_);let[v,b]=r.slice(-2);if(null!==v){let e=v[2];y.rsc=e,y.prefetchRsc=null,(0,c.fillLazyItemsTillLeafWithHead)(y,void 0,n,v,b),d.cache=y,d.prefetchCache=new Map}d.patchedTree=i,d.canonicalUrl=p,h=i}return(0,i.handleMutable)(e,d)},()=>e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7222:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"restoreReducer",{enumerable:!0,get:function(){return u}});let n=r(8419),o=r(4038);function u(e,t){var r;let{url:u,tree:l}=t,a=(0,n.createHrefFromUrl)(u),i=l||e.tree,c=e.cache;return{buildId:e.buildId,canonicalUrl:a,pushRef:{pendingPush:!1,mpaNavigation:!1,preserveCustomHistoryState:!0},focusAndScrollRef:e.focusAndScrollRef,cache:c,prefetchCache:e.prefetchCache,tree:i,nextUrl:null!=(r=(0,o.extractPathFromFlightRouterState)(i))?r:u.pathname}}r(6384),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},899:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"serverActionReducer",{enumerable:!0,get:function(){return b}});let n=r(5355),o=r(2275),u=r(5786),l=r(8419),a=r(5596),i=r(7098),c=r(1956),s=r(8875),f=r(4765),d=r(7690),p=r(4038),h=r(2224),{createFromFetch:y,encodeReply:_}=r(6671);async function v(e,t){let r,{actionId:l,actionArgs:a}=t,i=await _(a),c=(0,p.extractPathFromFlightRouterState)(e.tree),s=e.nextUrl&&e.nextUrl!==c,f=await fetch("",{method:"POST",headers:{Accept:o.RSC_CONTENT_TYPE_HEADER,[o.ACTION]:l,[o.NEXT_ROUTER_STATE_TREE]:encodeURIComponent(JSON.stringify(e.tree)),...s?{[o.NEXT_URL]:e.nextUrl}:{}},body:i}),d=f.headers.get("x-action-redirect");try{let e=JSON.parse(f.headers.get("x-action-revalidated")||"[[],0,0]");r={paths:e[0]||[],tag:!!e[1],cookie:e[2]}}catch(e){r={paths:[],tag:!1,cookie:!1}}let h=d?new URL((0,u.addBasePath)(d),new URL(e.canonicalUrl,window.location.href)):void 0;if(f.headers.get("content-type")===o.RSC_CONTENT_TYPE_HEADER){let e=await y(Promise.resolve(f),{callServer:n.callServer});if(d){let[,t]=null!=e?e:[];return{actionFlightData:t,redirectLocation:h,revalidatedParts:r}}let[t,[,o]]=null!=e?e:[];return{actionResult:t,actionFlightData:o,redirectLocation:h,revalidatedParts:r}}return{redirectLocation:h,revalidatedParts:r}}function b(e,t){let{resolve:r,reject:n}=t,o={},u=e.canonicalUrl,p=e.tree;return o.preserveCustomHistoryState=!1,o.inFlightServerAction=v(e,t),o.inFlightServerAction.then(n=>{let{actionResult:y,actionFlightData:_,redirectLocation:v}=n;if(v&&(e.pushRef.pendingPush=!0,o.pendingPush=!0),!_)return(r(y),v)?(0,a.handleExternalUrl)(e,o,v.href,e.pushRef.pendingPush):e;if("string"==typeof _)return(0,a.handleExternalUrl)(e,o,_,e.pushRef.pendingPush);for(let r of(o.inFlightServerAction=null,_)){if(3!==r.length)return console.log("SERVER ACTION APPLY FAILED"),e;let[n]=r,l=(0,i.applyRouterStatePatchToFullTree)([""],p,n);if(null===l)return(0,h.handleSegmentMismatch)(e,t,n);if((0,c.isNavigatingToNewRootLayout)(p,l))return(0,a.handleExternalUrl)(e,o,u,e.pushRef.pendingPush);let[s,y]=r.slice(-2),_=null!==s?s[2]:null;if(null!==_){let e=(0,d.createEmptyCacheNode)();e.rsc=_,e.prefetchRsc=null,(0,f.fillLazyItemsTillLeafWithHead)(e,void 0,n,s,y),o.cache=e,o.prefetchCache=new Map}o.patchedTree=l,o.canonicalUrl=u,p=l}if(v){let e=(0,l.createHrefFromUrl)(v,!1);o.canonicalUrl=e}return r(y),(0,s.handleMutable)(e,o)},t=>(n(t.reason),e))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4173:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"serverPatchReducer",{enumerable:!0,get:function(){return f}});let n=r(8419),o=r(7098),u=r(1956),l=r(5596),a=r(9671),i=r(8875),c=r(7690),s=r(2224);function f(e,t){let{flightData:r,overrideCanonicalUrl:f}=t,d={};if(d.preserveCustomHistoryState=!1,"string"==typeof r)return(0,l.handleExternalUrl)(e,d,r,e.pushRef.pendingPush);let p=e.tree,h=e.cache;for(let i of r){let r=i.slice(0,-4),[y]=i.slice(-3,-2),_=(0,o.applyRouterStatePatchToTreeSkipDefault)(["",...r],p,y);if(null===_)return(0,s.handleSegmentMismatch)(e,t,y);if((0,u.isNavigatingToNewRootLayout)(p,_))return(0,l.handleExternalUrl)(e,d,e.canonicalUrl,e.pushRef.pendingPush);let v=f?(0,n.createHrefFromUrl)(f):void 0;v&&(d.canonicalUrl=v);let b=(0,c.createEmptyCacheNode)();(0,a.applyFlightData)(h,b,i),d.patchedTree=_,d.cache=b,h=b,p=_}return(0,i.handleMutable)(e,d)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1414:function(e,t){"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{PrefetchKind:function(){return r},ACTION_REFRESH:function(){return o},ACTION_NAVIGATE:function(){return u},ACTION_RESTORE:function(){return l},ACTION_SERVER_PATCH:function(){return a},ACTION_PREFETCH:function(){return i},ACTION_FAST_REFRESH:function(){return c},ACTION_SERVER_ACTION:function(){return s},isThenable:function(){return f}});let o="refresh",u="navigate",l="restore",a="server-patch",i="prefetch",c="fast-refresh",s="server-action";function f(e){return e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}(n=r||(r={})).AUTO="auto",n.FULL="full",n.TEMPORARY="temporary",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6878:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"reducer",{enumerable:!0,get:function(){return f}});let n=r(1414),o=r(5596),u=r(4173),l=r(7222),a=r(7491),i=r(5678),c=r(6503),s=r(899),f="undefined"==typeof window?function(e,t){return e}:function(e,t){switch(t.type){case n.ACTION_NAVIGATE:return(0,o.navigateReducer)(e,t);case n.ACTION_SERVER_PATCH:return(0,u.serverPatchReducer)(e,t);case n.ACTION_RESTORE:return(0,l.restoreReducer)(e,t);case n.ACTION_REFRESH:return(0,a.refreshReducer)(e,t);case n.ACTION_FAST_REFRESH:return(0,c.fastRefreshReducer)(e,t);case n.ACTION_PREFETCH:return(0,i.prefetchReducer)(e,t);case n.ACTION_SERVER_ACTION:return(0,s.serverActionReducer)(e,t);default:throw Error("Unknown action")}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3556:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"shouldHardNavigate",{enumerable:!0,get:function(){return function e(t,r){let[o,u]=r,[l,a]=t;return(0,n.matchSegment)(l,o)?!(t.length<=2)&&e(t.slice(2),u[a]):!!Array.isArray(l)}}});let n=r(2295);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5797:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createSearchParamsBailoutProxy",{enumerable:!0,get:function(){return o}});let n=r(8181);function o(){return new Proxy({},{get(e,t){"string"==typeof t&&(0,n.staticGenerationBailout)("searchParams."+t)}})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return n}});let n=(0,r(693).createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8181:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{isStaticGenBailoutError:function(){return a},staticGenerationBailout:function(){return c}});let n=r(7127),o=r(2),u="NEXT_STATIC_GEN_BAILOUT";class l extends Error{constructor(...e){super(...e),this.code=u}}function a(e){return"object"==typeof e&&null!==e&&"code"in e&&e.code===u}function i(e,t){let{dynamic:r,link:n}=t||{};return"Page"+(r?' with `dynamic = "'+r+'"`':"")+" couldn't be rendered statically because it used `"+e+"`."+(n?" See more info here: "+n:"")}let c=(e,t)=>{let{dynamic:r,link:u}=void 0===t?{}:t,a=o.staticGenerationAsyncStorage.getStore();if(!a)return!1;if(a.forceStatic)return!0;if(a.dynamicShouldError)throw new l(i(e,{link:u,dynamic:null!=r?r:"error"}));let c=i(e,{dynamic:r,link:"https://nextjs.org/docs/messages/dynamic-server-error"});if(null==a.postpone||a.postpone.call(a,e),a.revalidate=0,a.isStaticGeneration){let t=new n.DynamicServerError(c);throw a.dynamicUsageDescription=e,a.dynamicUsageStack=t.stack,t}return!1};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7831:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return u}}),r(6921);let n=r(7437);r(2265);let o=r(5797);function u(e){let{Component:t,propsForComponent:r,isStaticGeneration:u}=e;if(u){let e=(0,o.createSearchParamsBailoutProxy)();return(0,n.jsx)(t,{searchParams:e,...r})}return(0,n.jsx)(t,{...r})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1276:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{useUnwrapState:function(){return a},useReducerWithReduxDevtools:function(){return i}});let n=r(1884)._(r(2265)),o=r(1414),u=r(5367);function l(e){if(e instanceof Map){let t={};for(let[r,n]of e.entries()){if("function"==typeof n){t[r]="fn()";continue}if("object"==typeof n&&null!==n){if(n.$$typeof){t[r]=n.$$typeof.toString();continue}if(n._bundlerConfig){t[r]="FlightData";continue}}t[r]=l(n)}return t}if("object"==typeof e&&null!==e){let t={};for(let r in e){let n=e[r];if("function"==typeof n){t[r]="fn()";continue}if("object"==typeof n&&null!==n){if(n.$$typeof){t[r]=n.$$typeof.toString();continue}if(n.hasOwnProperty("_bundlerConfig")){t[r]="FlightData";continue}}t[r]=l(n)}return t}return Array.isArray(e)?e.map(l):e}function a(e){return(0,o.isThenable)(e)?(0,n.use)(e):e}let i="undefined"!=typeof window?function(e){let[t,r]=n.default.useState(e),o=(0,n.useContext)(u.ActionQueueContext);if(!o)throw Error("Invariant: Missing ActionQueueContext");let a=(0,n.useRef)(),i=(0,n.useRef)();return(0,n.useEffect)(()=>{if(!a.current&&!1!==i.current){if(void 0===i.current&&void 0===window.__REDUX_DEVTOOLS_EXTENSION__){i.current=!1;return}return a.current=window.__REDUX_DEVTOOLS_EXTENSION__.connect({instanceId:8e3,name:"next-router"}),a.current&&(a.current.init(l(e)),o&&(o.devToolsInstance=a.current)),()=>{a.current=void 0}}},[e,o]),[t,(0,n.useCallback)(t=>{o.state||(o.state=e),o.dispatch(t,r)},[o,e]),(0,n.useCallback)(e=>{a.current&&a.current.send({type:"RENDER_SYNC"},l(e))},[])]}:function(e){return[e,()=>{},()=>{}]};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7379:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return o}});let n=r(7027);function o(e){return(0,n.pathHasPrefix)(e,"/travelBuddy")}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2139:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return u}});let n=r(5868),o=r(6506),u=e=>{if(!e.startsWith("/"))return e;let{pathname:t,query:r,hash:u}=(0,o.parsePath)(e);return""+(0,n.removeTrailingSlash)(t)+r+u};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4101:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let n=r(9775);function o(e){let t="function"==typeof reportError?reportError:e=>{window.console.error(e)};(0,n.isBailoutToCSRError)(e)||t(e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8895:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeBasePath",{enumerable:!0,get:function(){return o}}),r(7379);let n="/travelBuddy";function o(e){return 0===n.length||(e=e.slice(n.length)).startsWith("/")||(e="/"+e),e}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2531:function(e,t){"use strict";function r(e,t){var r=e.length;for(e.push(t);0>>1,o=e[n];if(0>>1;nu(i,r))cu(s,i)?(e[n]=s,e[c]=r,n=c):(e[n]=i,e[a]=r,n=a);else if(cu(s,r))e[n]=s,e[c]=r,n=c;else break}}return t}function u(e,t){var r=e.sortIndex-t.sortIndex;return 0!==r?r:e.id-t.id}if(t.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var l,a=performance;t.unstable_now=function(){return a.now()}}else{var i=Date,c=i.now();t.unstable_now=function(){return i.now()-c}}var s=[],f=[],d=1,p=null,h=3,y=!1,_=!1,v=!1,b="function"==typeof setTimeout?setTimeout:null,g="function"==typeof clearTimeout?clearTimeout:null,m="undefined"!=typeof setImmediate?setImmediate:null;function P(e){for(var t=n(f);null!==t;){if(null===t.callback)o(f);else if(t.startTime<=e)o(f),t.sortIndex=t.expirationTime,r(s,t);else break;t=n(f)}}function j(e){if(v=!1,P(e),!_){if(null!==n(s))_=!0,C();else{var t=n(f);null!==t&&N(j,t.startTime-e)}}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var O=!1,R=-1,S=5,E=-1;function w(){return!(t.unstable_now()-Ee&&w());){var a=p.callback;if("function"==typeof a){p.callback=null,h=p.priorityLevel;var i=a(p.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof i){p.callback=i,P(e),r=!0;break t}p===n(s)&&o(s),P(e)}else o(s);p=n(s)}if(null!==p)r=!0;else{var c=n(f);null!==c&&N(j,c.startTime-e),r=!1}}break e}finally{p=null,h=u,y=!1}r=void 0}}finally{r?l():O=!1}}}if("function"==typeof m)l=function(){m(M)};else if("undefined"!=typeof MessageChannel){var T=new MessageChannel,x=T.port2;T.port1.onmessage=M,l=function(){x.postMessage(null)}}else l=function(){b(M,0)};function C(){O||(O=!0,l())}function N(e,r){R=b(function(){e(t.unstable_now())},r)}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(){_||y||(_=!0,C())},t.unstable_forceFrameRate=function(e){0>e||125l?(e.sortIndex=u,r(f,e),null===n(s)&&e===n(f)&&(v?(g(R),R=-1):v=!0,N(j,u-l))):(e.sortIndex=a,r(s,e),_||y||(_=!0,C())),e},t.unstable_shouldYield=w,t.unstable_wrapCallback=function(e){var t=h;return function(){var r=h;h=t;try{return e.apply(this,arguments)}finally{h=r}}}},8172:function(e,t,r){"use strict";e.exports=r(2531)},2883:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentParam",{enumerable:!0,get:function(){return o}});let n=r(4749);function o(e){let t=n.INTERCEPTION_ROUTE_MARKERS.find(t=>e.startsWith(t));return(t&&(e=e.slice(t.length)),e.startsWith("[[...")&&e.endsWith("]]"))?{type:"optional-catchall",param:e.slice(5,-2)}:e.startsWith("[...")&&e.endsWith("]")?{type:"catchall",param:e.slice(4,-1)}:e.startsWith("[")&&e.endsWith("]")?{type:"dynamic",param:e.slice(1,-1)}:null}},4749:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{INTERCEPTION_ROUTE_MARKERS:function(){return o},isInterceptionRouteAppPath:function(){return u},extractInterceptionRouteInformation:function(){return l}});let n=r(7178),o=["(..)(..)","(.)","(..)","(...)"];function u(e){return void 0!==e.split("/").find(e=>o.find(t=>e.startsWith(t)))}function l(e){let t,r,u;for(let n of e.split("/"))if(r=o.find(e=>n.startsWith(e))){[t,u]=e.split(r,2);break}if(!t||!r||!u)throw Error(`Invalid interception route: ${e}. Must be in the format //(..|...|..)(..)/`);switch(t=(0,n.normalizeAppPath)(t),r){case"(.)":u="/"===t?`/${u}`:t+"/"+u;break;case"(..)":if("/"===t)throw Error(`Invalid interception route: ${e}. Cannot use (..) marker at the root level, use (.) instead.`);u=t.split("/").slice(0,-1).concat(u).join("/");break;case"(...)":u="/"+u;break;case"(..)(..)":let l=t.split("/");if(l.length<=2)throw Error(`Invalid interception route: ${e}. Cannot use (..)(..) marker at the root level or one level up.`);u=l.slice(0,-2).concat(u).join("/");break;default:throw Error("Invariant: unexpected marker")}return{interceptingRoute:t,interceptedRoute:u}}},8599:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{AppRouterContext:function(){return o},LayoutRouterContext:function(){return u},GlobalLayoutRouterContext:function(){return l},TemplateContext:function(){return a},MissingSlotContext:function(){return i}});let n=r(6921)._(r(2265)),o=n.default.createContext(null),u=n.default.createContext(null),l=n.default.createContext(null),a=n.default.createContext(null),i=n.default.createContext(new Set)},1:function(e,t){"use strict";function r(e){let t=5381;for(let r=0;r>>0}function n(e){return r(e).toString(36).slice(0,5)}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{djb2Hash:function(){return r},hexHash:function(){return n}})},7484:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HeadManagerContext",{enumerable:!0,get:function(){return n}});let n=r(6921)._(r(2265)).default.createContext({})},4758:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{SearchParamsContext:function(){return o},PathnameContext:function(){return u},PathParamsContext:function(){return l}});let n=r(2265),o=(0,n.createContext)(null),u=(0,n.createContext)(null),l=(0,n.createContext)(null)},9775:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{BailoutToCSRError:function(){return n},isBailoutToCSRError:function(){return o}});let r="BAILOUT_TO_CLIENT_SIDE_RENDERING";class n extends Error{constructor(e){super("Bail out to client-side rendering: "+e),this.reason=e,this.digest=r}}function o(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===r}},9798:function(e,t){"use strict";function r(e){return e.startsWith("/")?e:"/"+e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ensureLeadingSlash",{enumerable:!0,get:function(){return r}})},5367:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ActionQueueContext:function(){return a},createMutableActionQueue:function(){return s}});let n=r(1884),o=r(1414),u=r(6878),l=n._(r(2265)),a=l.default.createContext(null);function i(e,t){null!==e.pending&&(e.pending=e.pending.next,null!==e.pending&&c({actionQueue:e,action:e.pending,setState:t}))}async function c(e){let{actionQueue:t,action:r,setState:n}=e,u=t.state;if(!u)throw Error("Invariant: Router state not initialized");t.pending=r;let l=r.payload,a=t.action(u,l);function c(e){if(r.discarded){t.needsRefresh&&null===t.pending&&(t.needsRefresh=!1,t.dispatch({type:o.ACTION_REFRESH,origin:window.location.origin},n));return}t.state=e,t.devToolsInstance&&t.devToolsInstance.send(l,e),i(t,n),r.resolve(e)}(0,o.isThenable)(a)?a.then(c,e=>{i(t,n),r.reject(e)}):c(a)}function s(){let e={state:null,dispatch:(t,r)=>(function(e,t,r){let n={resolve:r,reject:()=>{}};if(t.type!==o.ACTION_RESTORE){let e=new Promise((e,t)=>{n={resolve:e,reject:t}});(0,l.startTransition)(()=>{r(e)})}let u={payload:t,next:null,resolve:n.resolve,reject:n.reject};null===e.pending?(e.last=u,c({actionQueue:e,action:u,setState:r})):t.type===o.ACTION_NAVIGATE?(e.pending.discarded=!0,e.last=u,e.pending.payload.type===o.ACTION_SERVER_ACTION&&(e.needsRefresh=!0),c({actionQueue:e,action:u,setState:r})):(null!==e.last&&(e.last.next=u),e.last=u)})(e,t,r),action:async(e,t)=>{if(null===e)throw Error("Invariant: Router state not initialized");return(0,u.reducer)(e,t)},pending:null,last:null};return e}},1312:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addPathPrefix",{enumerable:!0,get:function(){return o}});let n=r(6506);function o(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:o,hash:u}=(0,n.parsePath)(e);return""+t+r+o+u}},7178:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{normalizeAppPath:function(){return u},normalizeRscURL:function(){return l}});let n=r(9798),o=r(3266);function u(e){return(0,n.ensureLeadingSlash)(e.split("/").reduce((e,t,r,n)=>!t||(0,o.isGroupSegment)(t)||"@"===t[0]||("page"===t||"route"===t)&&r===n.length-1?e:e+"/"+t,""))}function l(e){return e.replace(/\.rsc($|\?)/,"$1")}},3011:function(e,t){"use strict";function r(e,t){if(void 0===t&&(t={}),t.onlyHashChange){e();return}let r=document.documentElement,n=r.style.scrollBehavior;r.style.scrollBehavior="auto",t.dontForceLayout||r.getClientRects(),e(),r.style.scrollBehavior=n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"handleSmoothScroll",{enumerable:!0,get:function(){return r}})},6407:function(e,t){"use strict";function r(e){return/Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isBot",{enumerable:!0,get:function(){return r}})},6506:function(e,t){"use strict";function r(e){let t=e.indexOf("#"),r=e.indexOf("?"),n=r>-1&&(t<0||r-1?{pathname:e.substring(0,n?r:t),query:n?e.substring(r,t>-1?t:void 0):"",hash:t>-1?e.slice(t):""}:{pathname:e,query:"",hash:""}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"parsePath",{enumerable:!0,get:function(){return r}})},7027:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"pathHasPrefix",{enumerable:!0,get:function(){return o}});let n=r(6506);function o(e,t){if("string"!=typeof e)return!1;let{pathname:r}=(0,n.parsePath)(e);return r===t||r.startsWith(t+"/")}},5868:function(e,t){"use strict";function r(e){return e.replace(/\/$/,"")||"/"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeTrailingSlash",{enumerable:!0,get:function(){return r}})},3266:function(e,t){"use strict";function r(e){return"("===e[0]&&e.endsWith(")")}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{isGroupSegment:function(){return r},PAGE_SEGMENT_KEY:function(){return n},DEFAULT_SEGMENT_KEY:function(){return o}});let n="__PAGE__",o="__DEFAULT__"},2472:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ServerInsertedHTMLContext:function(){return o},useServerInsertedHTML:function(){return u}});let n=r(1884)._(r(2265)),o=n.default.createContext(null);function u(e){let t=(0,n.useContext)(o);t&&t(e)}},6184:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"warnOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},693:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createAsyncLocalStorage",{enumerable:!0,get:function(){return u}});let r=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class n{disable(){throw r}getStore(){}run(){throw r}exit(){throw r}enterWith(){throw r}}let o=globalThis.AsyncLocalStorage;function u(){return o?new o:new n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4040:function(e,t,r){"use strict";var n=r(4887);t.createRoot=n.createRoot,t.hydrateRoot=n.hydrateRoot},4887:function(e,t,r){"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(e){console.error(e)}}(),e.exports=r(4417)},7950:function(e,t,r){"use strict";var n=r(4887),o=r(2265),u={stream:!0},l=new Map;function a(e){var t=r(e);return"function"!=typeof t.then||"fulfilled"===t.status?null:(t.then(function(e){t.status="fulfilled",t.value=e},function(e){t.status="rejected",t.reason=e}),t)}function i(){}var c=new Map,s=r.u;r.u=function(e){var t=c.get(e);return void 0!==t?t:s(e)};var f=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Dispatcher,d=Symbol.for("react.element"),p=Symbol.for("react.provider"),h=Symbol.for("react.server_context"),y=Symbol.for("react.lazy"),_=Symbol.for("react.default_value"),v=Symbol.iterator,b=Array.isArray,g=Object.getPrototypeOf,m=Object.prototype,P=new WeakMap,j=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ContextRegistry;function O(e,t,r,n){this.status=e,this.value=t,this.reason=r,this._response=n}function R(e){switch(e.status){case"resolved_model":C(e);break;case"resolved_module":N(e)}switch(e.status){case"fulfilled":return e.value;case"pending":case"blocked":case"cyclic":throw e;default:throw e.reason}}function S(e,t){for(var r=0;rh?(_=h,h=3,p++):(_=0,h=3);continue;case 2:44===(g=d[p++])?h=4:v=v<<4|(96d.length&&(g=-1)}var m=d.byteOffset+p;if(-1`${this.name}: [code=${this.code}]: ${this.message}`}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class I{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class S{constructor(e,t){this.user=t,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class C{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,t){e.enqueueRetryable(()=>t(d.UNAUTHENTICATED))}shutdown(){}}class A{constructor(e){this.token=e,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(e,t){this.changeListener=t,e.enqueueRetryable(()=>t(this.token.user))}shutdown(){this.changeListener=null}}class b{constructor(e){this.t=e,this.currentUser=d.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,t){let r=this.i,n=e=>this.i!==r?(r=this.i,t(e)):Promise.resolve(),i=new I;this.o=()=>{this.i++,this.currentUser=this.u(),i.resolve(),i=new I,e.enqueueRetryable(()=>n(this.currentUser))};let s=()=>{let t=i;e.enqueueRetryable(async()=>{await t.promise,await n(this.currentUser)})},a=e=>{g("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=e,this.auth.addAuthTokenListener(this.o),s()};this.t.onInit(e=>a(e)),setTimeout(()=>{if(!this.auth){let e=this.t.getImmediate({optional:!0});e?a(e):(g("FirebaseAuthCredentialsProvider","Auth not yet detected"),i.resolve(),i=new I)}},0),s()}getToken(){let e=this.i,t=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(t).then(t=>this.i!==e?(g("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):t?("string"==typeof t.accessToken||_(),new S(t.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.auth.removeAuthTokenListener(this.o)}u(){let e=this.auth&&this.auth.getUid();return null===e||"string"==typeof e||_(),new d(e)}}class D{constructor(e,t,r){this.l=e,this.h=t,this.P=r,this.type="FirstParty",this.user=d.FIRST_PARTY,this.I=new Map}T(){return this.P?this.P():null}get headers(){this.I.set("X-Goog-AuthUser",this.l);let e=this.T();return e&&this.I.set("Authorization",e),this.h&&this.I.set("X-Goog-Iam-Authorization-Token",this.h),this.I}}class N{constructor(e,t,r){this.l=e,this.h=t,this.P=r}getToken(){return Promise.resolve(new D(this.l,this.h,this.P))}start(e,t){e.enqueueRetryable(()=>t(d.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class k{constructor(e){this.value=e,this.type="AppCheck",this.headers=new Map,e&&e.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class x{constructor(e){this.A=e,this.forceRefresh=!1,this.appCheck=null,this.R=null}start(e,t){let r=e=>{null!=e.error&&g("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${e.error.message}`);let r=e.token!==this.R;return this.R=e.token,g("FirebaseAppCheckTokenProvider",`Received ${r?"new":"existing"} token.`),r?t(e.token):Promise.resolve()};this.o=t=>{e.enqueueRetryable(()=>r(t))};let n=e=>{g("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=e,this.appCheck.addTokenListener(this.o)};this.A.onInit(e=>n(e)),setTimeout(()=>{if(!this.appCheck){let e=this.A.getImmediate({optional:!0});e?n(e):g("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){let e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then(e=>e?("string"==typeof e.token||_(),this.R=e.token,new k(e.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class R{static newId(){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=Math.floor(256/e.length)*e.length,r="";for(;r.length<20;){let n=/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function(e){let t="undefined"!=typeof self&&(self.crypto||self.msCrypto),r=new Uint8Array(e);if(t&&"function"==typeof t.getRandomValues)t.getRandomValues(r);else for(let t=0;tt?1:0}function V(e,t,r){return e.length===t.length&&e.every((e,n)=>r(e,t[n]))}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class O{constructor(e,t){if(this.seconds=e,this.nanoseconds=t,t<0||t>=1e9)throw new T(E.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(e<-62135596800||e>=253402300800)throw new T(E.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}static now(){return O.fromMillis(Date.now())}static fromDate(e){return O.fromMillis(e.getTime())}static fromMillis(e){let t=Math.floor(e/1e3);return new O(t,Math.floor(1e6*(e-1e3*t)))}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(e){return this.seconds===e.seconds?L(this.nanoseconds,e.nanoseconds):L(this.seconds,e.seconds)}isEqual(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){return String(this.seconds- -62135596800).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class M{constructor(e){this.timestamp=e}static fromTimestamp(e){return new M(e)}static min(){return new M(new O(0,0))}static max(){return new M(new O(253402300799,999999999))}compareTo(e){return this.timestamp._compareTo(e.timestamp)}isEqual(e){return this.timestamp.isEqual(e.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class F{constructor(e,t,r){void 0===t?t=0:t>e.length&&_(),void 0===r?r=e.length-t:r>e.length-t&&_(),this.segments=e,this.offset=t,this.len=r}get length(){return this.len}isEqual(e){return 0===F.comparator(this,e)}child(e){let t=this.segments.slice(this.offset,this.limit());return e instanceof F?e.forEach(e=>{t.push(e)}):t.push(e),this.construct(t)}limit(){return this.offset+this.length}popFirst(e){return e=void 0===e?1:e,this.construct(this.segments,this.offset+e,this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return 0===this.length}isPrefixOf(e){if(e.lengthi)return 1}return e.lengtht.length?1:0}}class P extends F{construct(e,t,r){return new P(e,t,r)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...e){let t=[];for(let r of e){if(r.indexOf("//")>=0)throw new T(E.INVALID_ARGUMENT,`Invalid segment (${r}). Paths must not contain // in them.`);t.push(...r.split("/").filter(e=>e.length>0))}return new P(t)}static emptyPath(){return new P([])}}let U=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class q extends F{construct(e,t,r){return new q(e,t,r)}static isValidIdentifier(e){return U.test(e)}canonicalString(){return this.toArray().map(e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),q.isValidIdentifier(e)||(e="`"+e+"`"),e)).join(".")}toString(){return this.canonicalString()}isKeyField(){return 1===this.length&&"__name__"===this.get(0)}static keyField(){return new q(["__name__"])}static fromServerFormat(e){let t=[],r="",n=0,i=()=>{if(0===r.length)throw new T(E.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);t.push(r),r=""},s=!1;for(;n=2&&this.path.get(this.path.length-2)===e}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(e){return null!==e&&0===P.comparator(this.path,e.path)}toString(){return this.path.toString()}static comparator(e,t){return P.comparator(e.path,t.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new B(new P(e.slice()))}}/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ${constructor(e,t,r,n){this.indexId=e,this.collectionGroup=t,this.fields=r,this.indexState=n}}$.UNKNOWN_ID=-1;class z{constructor(e,t,r){this.readTime=e,this.documentKey=t,this.largestBatchId=r}static min(){return new z(M.min(),B.empty(),-1)}static max(){return new z(M.max(),B.empty(),-1)}}class K{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(e=>e())}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function Q(e){if(e.code!==E.FAILED_PRECONDITION||"The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab."!==e.message)throw e;g("LocalStore","Unexpectedly lost primary lease")}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class j{constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e(e=>{this.isDone=!0,this.result=e,this.nextCallback&&this.nextCallback(e)},e=>{this.isDone=!0,this.error=e,this.catchCallback&&this.catchCallback(e)})}catch(e){return this.next(void 0,e)}next(e,t){return this.callbackAttached&&_(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(t,this.error):this.wrapSuccess(e,this.result):new j((r,n)=>{this.nextCallback=t=>{this.wrapSuccess(e,t).next(r,n)},this.catchCallback=e=>{this.wrapFailure(t,e).next(r,n)}})}toPromise(){return new Promise((e,t)=>{this.next(e,t)})}wrapUserFunction(e){try{let t=e();return t instanceof j?t:j.resolve(t)}catch(e){return j.reject(e)}}wrapSuccess(e,t){return e?this.wrapUserFunction(()=>e(t)):j.resolve(t)}wrapFailure(e,t){return e?this.wrapUserFunction(()=>e(t)):j.reject(t)}static resolve(e){return new j((t,r)=>{t(e)})}static reject(e){return new j((t,r)=>{r(e)})}static waitFor(e){return new j((t,r)=>{let n=0,i=0,s=!1;e.forEach(e=>{++n,e.next(()=>{++i,s&&i===n&&t()},e=>r(e))}),s=!0,i===n&&t()})}static or(e){let t=j.resolve(!1);for(let r of e)t=t.next(e=>e?j.resolve(e):r());return t}static forEach(e,t){let r=[];return e.forEach((e,n)=>{r.push(t.call(this,e,n))}),this.waitFor(r)}static mapArray(e,t){return new j((r,n)=>{let i=e.length,s=Array(i),a=0;for(let o=0;o{s[l]=e,++a===i&&r(s)},e=>n(e))}})}static doWhile(e,t){return new j((r,n)=>{let i=()=>{!0===e()?t().next(()=>{i()},n):r()};i()})}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class G{constructor(e,t){this.action=e,this.transaction=t,this.aborted=!1,this.V=new I,this.transaction.oncomplete=()=>{this.V.resolve()},this.transaction.onabort=()=>{t.error?this.V.reject(new Y(e,t.error)):this.V.resolve()},this.transaction.onerror=t=>{let r=et(t.target.error);this.V.reject(new Y(e,r))}}static open(e,t,r,n){try{return new G(t,e.transaction(n,r))}catch(e){throw new Y(t,e)}}get m(){return this.V.promise}abort(e){e&&this.V.reject(e),this.aborted||(g("SimpleDb","Aborting transaction:",e?e.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())}g(){let e=this.transaction;this.aborted||"function"!=typeof e.commit||e.commit()}store(e){return new X(this.transaction.objectStore(e))}}class W{constructor(e,t,r){this.name=e,this.version=t,this.p=r,12.2===W.S((0,l.z$)())&&y("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.")}static delete(e){return g("SimpleDb","Removing database:",e),Z(window.indexedDB.deleteDatabase(e)).toPromise()}static D(){if(!(0,l.hl)())return!1;if(W.C())return!0;let e=(0,l.z$)(),t=W.S(e),r=W.v(e);return!(e.indexOf("MSIE ")>0||e.indexOf("Trident/")>0||e.indexOf("Edge/")>0||0{let n=indexedDB.open(this.name,this.version);n.onsuccess=e=>{t(e.target.result)},n.onblocked=()=>{r(new Y(e,"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},n.onerror=t=>{let n=t.target.error;"VersionError"===n.name?r(new T(E.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 T(E.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 Y(e,n))},n.onupgradeneeded=e=>{g("SimpleDb",'Database "'+this.name+'" requires upgrade from version:',e.oldVersion);let t=e.target.result;this.p.N(t,n.transaction,e.oldVersion,this.version).next(()=>{g("SimpleDb","Database upgrade to version "+this.version+" complete")})}})),this.B&&(this.db.onversionchange=e=>this.B(e)),this.db}L(e){this.B=e,this.db&&(this.db.onversionchange=t=>e(t))}async runTransaction(e,t,r,n){let i="readonly"===t,s=0;for(;;){++s;try{this.db=await this.O(e);let t=G.open(this.db,e,i?"readonly":"readwrite",r),s=n(t).next(e=>(t.g(),e)).catch(e=>(t.abort(e),j.reject(e))).toPromise();return s.catch(()=>{}),await t.m,s}catch(t){let e="FirebaseError"!==t.name&&s<3;if(g("SimpleDb","Transaction failed with error:",t.message,"Retrying:",e),this.close(),!e)return Promise.reject(t)}}}close(){this.db&&this.db.close(),this.db=void 0}}class H{constructor(e){this.k=e,this.q=!1,this.K=null}get isDone(){return this.q}get $(){return this.K}set cursor(e){this.k=e}done(){this.q=!0}U(e){this.K=e}delete(){return Z(this.k.delete())}}class Y extends T{constructor(e,t){super(E.UNAVAILABLE,`IndexedDB transaction '${e}' failed: ${t}`),this.name="IndexedDbTransactionError"}}function J(e){return"IndexedDbTransactionError"===e.name}class X{constructor(e){this.store=e}put(e,t){let r;return void 0!==t?(g("SimpleDb","PUT",this.store.name,e,t),r=this.store.put(t,e)):(g("SimpleDb","PUT",this.store.name,"",e),r=this.store.put(e)),Z(r)}add(e){return g("SimpleDb","ADD",this.store.name,e,e),Z(this.store.add(e))}get(e){return Z(this.store.get(e)).next(t=>(void 0===t&&(t=null),g("SimpleDb","GET",this.store.name,e,t),t))}delete(e){return g("SimpleDb","DELETE",this.store.name,e),Z(this.store.delete(e))}count(){return g("SimpleDb","COUNT",this.store.name),Z(this.store.count())}W(e,t){let r=this.options(e,t),n=r.index?this.store.index(r.index):this.store;if("function"==typeof n.getAll){let e=n.getAll(r.range);return new j((t,r)=>{e.onerror=e=>{r(e.target.error)},e.onsuccess=e=>{t(e.target.result)}})}{let e=this.cursor(r),t=[];return this.G(e,(e,r)=>{t.push(r)}).next(()=>t)}}j(e,t){let r=this.store.getAll(e,null===t?void 0:t);return new j((e,t)=>{r.onerror=e=>{t(e.target.error)},r.onsuccess=t=>{e(t.target.result)}})}H(e,t){g("SimpleDb","DELETE ALL",this.store.name);let r=this.options(e,t);r.J=!1;let n=this.cursor(r);return this.G(n,(e,t,r)=>r.delete())}Y(e,t){let r;t?r=e:(r={},t=e);let n=this.cursor(r);return this.G(n,t)}Z(e){let t=this.cursor({});return new j((r,n)=>{t.onerror=e=>{n(et(e.target.error))},t.onsuccess=t=>{let n=t.target.result;n?e(n.primaryKey,n.value).next(e=>{e?n.continue():r()}):r()}})}G(e,t){let r=[];return new j((n,i)=>{e.onerror=e=>{i(e.target.error)},e.onsuccess=e=>{let i=e.target.result;if(!i)return void n();let s=new H(i),a=t(i.primaryKey,i.value,s);if(a instanceof j){let e=a.catch(e=>(s.done(),j.reject(e)));r.push(e)}s.isDone?n():null===s.$?i.continue():i.continue(s.$)}}).next(()=>j.waitFor(r))}options(e,t){let r;return void 0!==e&&("string"==typeof e?r=e:t=e),{index:r,range:t}}cursor(e){let t="next";if(e.reverse&&(t="prev"),e.index){let r=this.store.index(e.index);return e.J?r.openKeyCursor(e.range,t):r.openCursor(e.range,t)}return this.store.openCursor(e.range,t)}}function Z(e){return new j((t,r)=>{e.onsuccess=e=>{t(e.target.result)},e.onerror=e=>{r(et(e.target.error))}})}let ee=!1;function et(e){let t=W.S((0,l.z$)());if(t>=12.2&&t<13){let t="An internal error was encountered in the Indexed Database server";if(e.message.indexOf(t)>=0){let e=new T("internal",`IOS_INDEXEDDB_BUG1: IndexedDb has thrown '${t}'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.`);return ee||(ee=!0,setTimeout(()=>{throw e},0)),e}}return e}/** + * @license + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class er{constructor(e,t){this.previousValue=e,t&&(t.sequenceNumberHandler=e=>this.se(e),this.oe=e=>t.writeSequenceNumber(e))}se(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){let e=++this.previousValue;return this.oe&&this.oe(e),e}}function en(e){return 0===e&&1/e==-1/0}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function ei(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}function es(e,t){for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t(r,e[r])}function ea(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}er._e=-1;/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class eo{constructor(e,t){this.comparator=e,this.root=t||eu.EMPTY}insert(e,t){return new eo(this.comparator,this.root.insert(e,t,this.comparator).copy(null,null,eu.BLACK,null,null))}remove(e){return new eo(this.comparator,this.root.remove(e,this.comparator).copy(null,null,eu.BLACK,null,null))}get(e){let t=this.root;for(;!t.isEmpty();){let r=this.comparator(e,t.key);if(0===r)return t.value;r<0?t=t.left:r>0&&(t=t.right)}return null}indexOf(e){let t=0,r=this.root;for(;!r.isEmpty();){let n=this.comparator(e,r.key);if(0===n)return t+r.left.size;n<0?r=r.left:(t+=r.left.size+1,r=r.right)}return -1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(e){return this.root.inorderTraversal(e)}forEach(e){this.inorderTraversal((t,r)=>(e(t,r),!1))}toString(){let e=[];return this.inorderTraversal((t,r)=>(e.push(`${t}:${r}`),!1)),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new el(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new el(this.root,e,this.comparator,!1)}getReverseIterator(){return new el(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new el(this.root,e,this.comparator,!0)}}class el{constructor(e,t,r,n){this.isReverse=n,this.nodeStack=[];let i=1;for(;!e.isEmpty();)if(i=t?r(e.key,t):1,t&&n&&(i*=-1),i<0)e=this.isReverse?e.left:e.right;else{if(0===i){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let 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}hasNext(){return this.nodeStack.length>0}peek(){if(0===this.nodeStack.length)return null;let e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}class eu{constructor(e,t,r,n,i){this.key=e,this.value=t,this.color=null!=r?r:eu.RED,this.left=null!=n?n:eu.EMPTY,this.right=null!=i?i:eu.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,t,r,n,i){return new eu(null!=e?e:this.key,null!=t?t:this.value,null!=r?r:this.color,null!=n?n:this.left,null!=i?i:this.right)}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,t,r){let n=this,i=r(e,n.key);return(n=i<0?n.copy(null,null,null,n.left.insert(e,t,r),null):0===i?n.copy(null,t,null,null,null):n.copy(null,null,null,null,n.right.insert(e,t,r))).fixUp()}removeMin(){if(this.left.isEmpty())return eu.EMPTY;let e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),(e=e.copy(null,null,null,e.left.removeMin(),null)).fixUp()}remove(e,t){let r,n=this;if(0>t(e,n.key))n.left.isEmpty()||n.left.isRed()||n.left.left.isRed()||(n=n.moveRedLeft()),n=n.copy(null,null,null,n.left.remove(e,t),null);else{if(n.left.isRed()&&(n=n.rotateRight()),n.right.isEmpty()||n.right.isRed()||n.right.left.isRed()||(n=n.moveRedRight()),0===t(e,n.key)){if(n.right.isEmpty())return eu.EMPTY;r=n.right.min(),n=n.copy(r.key,r.value,null,null,n.right.removeMin())}n=n.copy(null,null,null,null,n.right.remove(e,t))}return n.fixUp()}isRed(){return this.color}fixUp(){let 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}moveRedLeft(){let e=this.colorFlip();return e.right.left.isRed()&&(e=(e=(e=e.copy(null,null,null,null,e.right.rotateRight())).rotateLeft()).colorFlip()),e}moveRedRight(){let e=this.colorFlip();return e.left.left.isRed()&&(e=(e=e.rotateRight()).colorFlip()),e}rotateLeft(){let e=this.copy(null,null,eu.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){let e=this.copy(null,null,eu.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip(){let 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)}checkMaxDepth(){return Math.pow(2,this.check())<=this.size+1}check(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw _();let e=this.left.check();if(e!==this.right.check())throw _();return e+(this.isRed()?0:1)}}eu.EMPTY=null,eu.RED=!0,eu.BLACK=!1,eu.EMPTY=new class{constructor(){this.size=0}get key(){throw _()}get value(){throw _()}get color(){throw _()}get left(){throw _()}get right(){throw _()}copy(e,t,r,n,i){return this}insert(e,t,r){return new eu(e,t)}remove(e,t){return this}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class eh{constructor(e){this.comparator=e,this.data=new eo(this.comparator)}has(e){return null!==this.data.get(e)}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(e){return this.data.indexOf(e)}forEach(e){this.data.inorderTraversal((t,r)=>(e(t),!1))}forEachInRange(e,t){let r=this.data.getIteratorFrom(e[0]);for(;r.hasNext();){let n=r.getNext();if(this.comparator(n.key,e[1])>=0)return;t(n.key)}}forEachWhile(e,t){let r;for(r=void 0!==t?this.data.getIteratorFrom(t):this.data.getIterator();r.hasNext();)if(!e(r.getNext().key))return}firstAfterOrEqual(e){let t=this.data.getIteratorFrom(e);return t.hasNext()?t.getNext().key:null}getIterator(){return new ec(this.data.getIterator())}getIteratorFrom(e){return new ec(this.data.getIteratorFrom(e))}add(e){return this.copy(this.data.remove(e).insert(e,!0))}delete(e){return this.has(e)?this.copy(this.data.remove(e)):this}isEmpty(){return this.data.isEmpty()}unionWith(e){let t=this;return t.size{t=t.add(e)}),t}isEqual(e){if(!(e instanceof eh)||this.size!==e.size)return!1;let t=this.data.getIterator(),r=e.data.getIterator();for(;t.hasNext();){let e=t.getNext().key,n=r.getNext().key;if(0!==this.comparator(e,n))return!1}return!0}toArray(){let e=[];return this.forEach(t=>{e.push(t)}),e}toString(){let e=[];return this.forEach(t=>e.push(t)),"SortedSet("+e.toString()+")"}copy(e){let t=new eh(this.comparator);return t.data=e,t}}class ec{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ed{constructor(e){this.fields=e,e.sort(q.comparator)}static empty(){return new ed([])}unionWith(e){let t=new eh(q.comparator);for(let e of this.fields)t=t.add(e);for(let r of e)t=t.add(r);return new ed(t.toArray())}covers(e){for(let t of this.fields)if(t.isPrefixOf(e))return!0;return!1}isEqual(e){return V(this.fields,e.fields,(e,t)=>e.isEqual(t))}}/** + * @license + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ef extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class em{constructor(e){this.binaryString=e}static fromBase64String(e){return new em(function(e){try{return atob(e)}catch(e){throw"undefined"!=typeof DOMException&&e instanceof DOMException?new ef("Invalid base64 string: "+e):e}}(e))}static fromUint8Array(e){return new em(function(e){let t="";for(let r=0;reeA(e,t))}function eD(e,t){if(e===t)return 0;let r=eC(e),n=eC(t);if(r!==n)return L(r,n);switch(r){case 0:case 9007199254740991:return 0;case 1:return L(e.booleanValue,t.booleanValue);case 2:return function(e,t){let r=ey(e.integerValue||e.doubleValue),n=ey(t.integerValue||t.doubleValue);return rn?1:r===n?0:isNaN(r)?isNaN(n)?0:-1:1}(e,t);case 3:return eN(e.timestampValue,t.timestampValue);case 4:return eN(eE(e),eE(t));case 5:return L(e.stringValue,t.stringValue);case 6:return function(e,t){let r=ew(e),n=ew(t);return r.compareTo(n)}(e.bytesValue,t.bytesValue);case 7:return function(e,t){let r=e.split("/"),n=t.split("/");for(let e=0;et.mapValue.fields[e]=eF(r)),t}if(e.arrayValue){let t={arrayValue:{values:[]}};for(let r=0;r<(e.arrayValue.values||[]).length;++r)t.arrayValue.values[r]=eF(e.arrayValue.values[r]);return t}return Object.assign({},e)}function eP(e){return"__max__"===(((e.mapValue||{}).fields||{}).__type__||{}).stringValue}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class eU{constructor(e){this.value=e}static empty(){return new eU({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let t=this.value;for(let r=0;r{if(!t.isImmediateParentOf(i)){let e=this.getFieldsMap(t);this.applyChanges(e,r,n),r={},n=[],t=i.popLast()}e?r[i.lastSegment()]=eF(e):n.push(i.lastSegment())});let i=this.getFieldsMap(t);this.applyChanges(i,r,n)}delete(e){let t=this.field(e.popLast());eM(t)&&t.mapValue.fields&&delete t.mapValue.fields[e.lastSegment()]}isEqual(e){return eA(this.value,e.value)}getFieldsMap(e){let t=this.value;t.mapValue.fields||(t.mapValue={fields:{}});for(let r=0;re[t]=r),r))delete e[n]}clone(){return new eU(eF(this.value))}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class eq{constructor(e,t,r,n,i,s,a){this.key=e,this.documentType=t,this.version=r,this.readTime=n,this.createTime=i,this.data=s,this.documentState=a}static newInvalidDocument(e){return new eq(e,0,M.min(),M.min(),M.min(),eU.empty(),0)}static newFoundDocument(e,t,r,n){return new eq(e,1,t,M.min(),r,n,0)}static newNoDocument(e,t){return new eq(e,2,t,M.min(),M.min(),eU.empty(),0)}static newUnknownDocument(e,t){return new eq(e,3,t,M.min(),M.min(),eU.empty(),2)}convertToFoundDocument(e,t){return this.createTime.isEqual(M.min())&&(2===this.documentType||0===this.documentType)&&(this.createTime=e),this.version=e,this.documentType=1,this.data=t,this.documentState=0,this}convertToNoDocument(e){return this.version=e,this.documentType=2,this.data=eU.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=eU.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=M.min(),this}setReadTime(e){return this.readTime=e,this}get hasLocalMutations(){return 1===this.documentState}get hasCommittedMutations(){return 2===this.documentState}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return 0!==this.documentType}isFoundDocument(){return 1===this.documentType}isNoDocument(){return 2===this.documentType}isUnknownDocument(){return 3===this.documentType}isEqual(e){return e instanceof eq&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.documentType===e.documentType&&this.documentState===e.documentState&&this.data.isEqual(e.data)}mutableCopy(){return new eq(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}}/** + * @license + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class eB{constructor(e,t){this.position=e,this.inclusive=t}}function e$(e,t,r){let n=0;for(let i=0;i":return e>0;case">=":return e>=0;default:return _()}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}}class eG extends eQ{constructor(e,t){super(),this.filters=e,this.op=t,this.ue=null}static create(e,t){return new eG(e,t)}matches(e){return eW(this)?void 0===this.filters.find(t=>!t.matches(e)):void 0!==this.filters.find(t=>t.matches(e))}getFlattenedFilters(){return null!==this.ue||(this.ue=this.filters.reduce((e,t)=>e.concat(t.getFlattenedFilters()),[])),this.ue}getFilters(){return Object.assign([],this.filters)}}function eW(e){return"and"===e.op}function eH(e){for(let t of e.filters)if(t instanceof eG)return!1;return!0}class eY extends ej{constructor(e,t,r){super(e,t,r),this.key=B.fromName(r.referenceValue)}matches(e){let t=B.comparator(e.key,this.key);return this.matchesComparison(t)}}class eJ extends ej{constructor(e,t){super(e,"in",t),this.keys=eZ("in",t)}matches(e){return this.keys.some(t=>t.isEqual(e.key))}}class eX extends ej{constructor(e,t){super(e,"not-in",t),this.keys=eZ("not-in",t)}matches(e){return!this.keys.some(t=>t.isEqual(e.key))}}function eZ(e,t){var r;return((null===(r=t.arrayValue)||void 0===r?void 0:r.values)||[]).map(e=>B.fromName(e.referenceValue))}class e0 extends ej{constructor(e,t){super(e,"array-contains",t)}matches(e){let t=e.data.field(this.field);return eL(t)&&eb(t.arrayValue,this.value)}}class e1 extends ej{constructor(e,t){super(e,"in",t)}matches(e){let t=e.data.field(this.field);return null!==t&&eb(this.value.arrayValue,t)}}class e2 extends ej{constructor(e,t){super(e,"not-in",t)}matches(e){if(eb(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;let t=e.data.field(this.field);return null!==t&&!eb(this.value.arrayValue,t)}}class e4 extends ej{constructor(e,t){super(e,"array-contains-any",t)}matches(e){let t=e.data.field(this.field);return!(!eL(t)||!t.arrayValue.values)&&t.arrayValue.values.some(e=>eb(this.value.arrayValue,e))}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class e3{constructor(e,t=null,r=[],n=[],i=null,s=null,a=null){this.path=e,this.collectionGroup=t,this.orderBy=r,this.filters=n,this.limit=i,this.startAt=s,this.endAt=a,this.ce=null}}function e9(e,t=null,r=[],n=[],i=null,s=null,a=null){return new e3(e,t,r,n,i,s,a)}function e8(e){if(null===e.ce){let t=e.path.canonicalString();null!==e.collectionGroup&&(t+="|cg:"+e.collectionGroup),t+="|f:"+e.filters.map(e=>(function e(t){if(t instanceof ej)return t.field.canonicalString()+t.op.toString()+ek(t.value);if(eH(t)&&eW(t))return t.filters.map(t=>e(t)).join(",");{let r=t.filters.map(t=>e(t)).join(",");return`${t.op}(${r})`}})(e)).join(",")+"|ob:"+e.orderBy.map(e=>e.field.canonicalString()+e.dir).join(","),null==e.limit||(t+="|l:"+e.limit),e.startAt&&(t+="|lb:"+(e.startAt.inclusive?"b:":"a:")+e.startAt.position.map(e=>ek(e)).join(",")),e.endAt&&(t+="|ub:"+(e.endAt.inclusive?"a:":"b:")+e.endAt.position.map(e=>ek(e)).join(",")),e.ce=t}return e.ce}function e6(e,t){if(e.limit!==t.limit||e.orderBy.length!==t.orderBy.length)return!1;for(let i=0;it&&e(n,r.filters[i]),!0):void _()}(e.filters[r],t.filters[r]))return!1;return e.collectionGroup===t.collectionGroup&&!!e.path.isEqual(t.path)&&!!ez(e.startAt,t.startAt)&&ez(e.endAt,t.endAt)}function e5(e){return B.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class e7{constructor(e,t=null,r=[],n=[],i=null,s="F",a=null,o=null){this.path=e,this.collectionGroup=t,this.explicitOrderBy=r,this.filters=n,this.limit=i,this.limitType=s,this.startAt=a,this.endAt=o,this.le=null,this.he=null,this.Pe=null,this.startAt,this.endAt}}function te(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())}function tt(e){return null!==e.collectionGroup}function tr(e){if(null===e.le){let t;e.le=[];let r=new Set;for(let t of e.explicitOrderBy)e.le.push(t),r.add(t.field.canonicalString());let n=e.explicitOrderBy.length>0?e.explicitOrderBy[e.explicitOrderBy.length-1].dir:"asc";(t=new eh(q.comparator),e.filters.forEach(e=>{e.getFlattenedFilters().forEach(e=>{e.isInequality()&&(t=t.add(e.field))})}),t).forEach(t=>{r.has(t.canonicalString())||t.isKeyField()||e.le.push(new eK(t,n))}),r.has(q.keyField().canonicalString())||e.le.push(new eK(q.keyField(),n))}return e.le}function tn(e){return e.he||(e.he=function(e,t){if("F"===e.limitType)return e9(e.path,e.collectionGroup,t,e.filters,e.limit,e.startAt,e.endAt);{t=t.map(e=>{let t="desc"===e.dir?"asc":"desc";return new eK(e.field,t)});let r=e.endAt?new eB(e.endAt.position,e.endAt.inclusive):null,n=e.startAt?new eB(e.startAt.position,e.startAt.inclusive):null;return e9(e.path,e.collectionGroup,t,e.filters,e.limit,r,n)}}(e,tr(e))),e.he}function ti(e,t){let r=e.filters.concat([t]);return new e7(e.path,e.collectionGroup,e.explicitOrderBy.slice(),r,e.limit,e.limitType,e.startAt,e.endAt)}function ts(e,t,r){return new e7(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),t,r,e.startAt,e.endAt)}function ta(e,t){return e6(tn(e),tn(t))&&e.limitType===t.limitType}function to(e){return`${e8(tn(e))}|lt:${e.limitType}`}function tl(e){var t;let r;return`Query(target=${r=(t=tn(e)).path.canonicalString(),null!==t.collectionGroup&&(r+=" collectionGroup="+t.collectionGroup),t.filters.length>0&&(r+=`, filters: [${t.filters.map(e=>(function e(t){return t instanceof ej?`${t.field.canonicalString()} ${t.op} ${ek(t.value)}`:t instanceof eG?t.op.toString()+" {"+t.getFilters().map(e).join(" ,")+"}":"Filter"})(e)).join(", ")}]`),null==t.limit||(r+=", limit: "+t.limit),t.orderBy.length>0&&(r+=`, orderBy: [${t.orderBy.map(e=>`${e.field.canonicalString()} (${e.dir})`).join(", ")}]`),t.startAt&&(r+=", startAt: "+(t.startAt.inclusive?"b:":"a:")+t.startAt.position.map(e=>ek(e)).join(",")),t.endAt&&(r+=", endAt: "+(t.endAt.inclusive?"a:":"b:")+t.endAt.position.map(e=>ek(e)).join(",")),`Target(${r})`}; limitType=${e.limitType})`}function tu(e,t){return t.isFoundDocument()&&function(e,t){let r=t.key.path;return null!==e.collectionGroup?t.key.hasCollectionId(e.collectionGroup)&&e.path.isPrefixOf(r):B.isDocumentKey(e.path)?e.path.isEqual(r):e.path.isImmediateParentOf(r)}(e,t)&&function(e,t){for(let r of tr(e))if(!r.field.isKeyField()&&null===t.data.field(r.field))return!1;return!0}(e,t)&&function(e,t){for(let r of e.filters)if(!r.matches(t))return!1;return!0}(e,t)&&(!e.startAt||!!function(e,t,r){let n=e$(e,t,r);return e.inclusive?n<=0:n<0}(e.startAt,tr(e),t))&&(!e.endAt||!!function(e,t,r){let n=e$(e,t,r);return e.inclusive?n>=0:n>0}(e.endAt,tr(e),t))}function th(e){return(t,r)=>{let n=!1;for(let i of tr(e)){let e=function(e,t,r){let n=e.field.isKeyField()?B.comparator(t.key,r.key):function(e,t,r){let n=t.data.field(e),i=r.data.field(e);return null!==n&&null!==i?eD(n,i):_()}(e.field,t,r);switch(e.dir){case"asc":return n;case"desc":return -1*n;default:return _()}}(i,t,r);if(0!==e)return e;n=n||i.field.isKeyField()}return 0}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class tc{constructor(e,t){this.mapKeyFn=e,this.equalsFn=t,this.inner={},this.innerSize=0}get(e){let t=this.mapKeyFn(e),r=this.inner[t];if(void 0!==r){for(let[t,n]of r)if(this.equalsFn(t,e))return n}}has(e){return void 0!==this.get(e)}set(e,t){let r=this.mapKeyFn(e),n=this.inner[r];if(void 0===n)return this.inner[r]=[[e,t]],void this.innerSize++;for(let r=0;r{for(let[t,n]of r)e(t,n)})}isEmpty(){return ea(this.inner)}size(){return this.innerSize}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let td=new eo(B.comparator),tf=new eo(B.comparator);function tm(...e){let t=tf;for(let r of e)t=t.insert(r.key,r);return t}function tp(e){let t=tf;return e.forEach((e,r)=>t=t.insert(e,r.overlayedDocument)),t}function tg(){return new tc(e=>e.toString(),(e,t)=>e.isEqual(t))}let ty=new eo(B.comparator),tw=new eh(B.comparator);function tv(...e){let t=tw;for(let r of e)t=t.add(r);return t}let t_=new eh(L);/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function tE(e,t){if(e.useProto3Json){if(isNaN(t))return{doubleValue:"NaN"};if(t===1/0)return{doubleValue:"Infinity"};if(t===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:en(t)?"-0":t}}function tT(e){return{integerValue:""+e}}/** + * @license + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class tI{constructor(){this._=void 0}}function tS(e,t){return e instanceof tk?eR(t)||t&&"doubleValue"in t?t:{integerValue:0}:null}class tC extends tI{}class tA extends tI{constructor(e){super(),this.elements=e}}function tb(e,t){let r=tR(t);for(let t of e.elements)r.some(e=>eA(e,t))||r.push(t);return{arrayValue:{values:r}}}class tD extends tI{constructor(e){super(),this.elements=e}}function tN(e,t){let r=tR(t);for(let t of e.elements)r=r.filter(e=>!eA(e,t));return{arrayValue:{values:r}}}class tk extends tI{constructor(e,t){super(),this.serializer=e,this.Ie=t}}function tx(e){return ey(e.integerValue||e.doubleValue)}function tR(e){return eL(e)&&e.arrayValue.values?e.arrayValue.values.slice():[]}class tL{constructor(e,t){this.version=e,this.transformResults=t}}class tV{constructor(e,t){this.updateTime=e,this.exists=t}static none(){return new tV}static exists(e){return new tV(void 0,e)}static updateTime(e){return new tV(e)}get isNone(){return void 0===this.updateTime&&void 0===this.exists}isEqual(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}}function tO(e,t){return void 0!==e.updateTime?t.isFoundDocument()&&t.version.isEqual(e.updateTime):void 0===e.exists||e.exists===t.isFoundDocument()}class tM{}function tF(e,t){if(!e.hasLocalMutations||t&&0===t.fields.length)return null;if(null===t)return e.isNoDocument()?new tQ(e.key,tV.none()):new tq(e.key,e.data,tV.none());{let r=e.data,n=eU.empty(),i=new eh(q.comparator);for(let e of t.fields)if(!i.has(e)){let t=r.field(e);null===t&&e.length>1&&(e=e.popLast(),t=r.field(e)),null===t?n.delete(e):n.set(e,t),i=i.add(e)}return new tB(e.key,n,new ed(i.toArray()),tV.none())}}function tP(e,t,r,n){return e instanceof tq?function(e,t,r,n){if(!tO(e.precondition,t))return r;let i=e.value.clone(),s=tK(e.fieldTransforms,n,t);return i.setAll(s),t.convertToFoundDocument(t.version,i).setHasLocalMutations(),null}(e,t,r,n):e instanceof tB?function(e,t,r,n){if(!tO(e.precondition,t))return r;let i=tK(e.fieldTransforms,n,t),s=t.data;return(s.setAll(t$(e)),s.setAll(i),t.convertToFoundDocument(t.version,s).setHasLocalMutations(),null===r)?null:r.unionWith(e.fieldMask.fields).unionWith(e.fieldTransforms.map(e=>e.field))}(e,t,r,n):tO(e.precondition,t)?(t.convertToNoDocument(t.version).setHasLocalMutations(),null):r}function tU(e,t){var r,n;return e.type===t.type&&!!e.key.isEqual(t.key)&&!!e.precondition.isEqual(t.precondition)&&(r=e.fieldTransforms,n=t.fieldTransforms,!!(void 0===r&&void 0===n||!(!r||!n)&&V(r,n,(e,t)=>{var r,n;return e.field.isEqual(t.field)&&(r=e.transform,n=t.transform,r instanceof tA&&n instanceof tA||r instanceof tD&&n instanceof tD?V(r.elements,n.elements,eA):r instanceof tk&&n instanceof tk?eA(r.Ie,n.Ie):r instanceof tC&&n instanceof tC)})))&&(0===e.type?e.value.isEqual(t.value):1!==e.type||e.data.isEqual(t.data)&&e.fieldMask.isEqual(t.fieldMask))}class tq extends tM{constructor(e,t,r,n=[]){super(),this.key=e,this.value=t,this.precondition=r,this.fieldTransforms=n,this.type=0}getFieldMask(){return null}}class tB extends tM{constructor(e,t,r,n,i=[]){super(),this.key=e,this.data=t,this.fieldMask=r,this.precondition=n,this.fieldTransforms=i,this.type=1}getFieldMask(){return this.fieldMask}}function t$(e){let t=new Map;return e.fieldMask.fields.forEach(r=>{if(!r.isEmpty()){let n=e.data.field(r);t.set(r,n)}}),t}function tz(e,t,r){var n;let i=new Map;e.length===r.length||_();for(let s=0;s{let i=e.get(n.key),s=i.overlayedDocument,a=this.applyToLocalView(s,i.mutatedFields),o=tF(s,a=t.has(n.key)?null:a);null!==o&&r.set(n.key,o),s.isValidDocument()||s.convertToNoDocument(M.min())}),r}keys(){return this.mutations.reduce((e,t)=>e.add(t.key),tv())}isEqual(e){return this.batchId===e.batchId&&V(this.mutations,e.mutations,(e,t)=>tU(e,t))&&V(this.baseMutations,e.baseMutations,(e,t)=>tU(e,t))}}class tW{constructor(e,t,r,n){this.batch=e,this.commitVersion=t,this.mutationResults=r,this.docVersions=n}static from(e,t,r){e.mutations.length===r.length||_();let n=ty,i=e.mutations;for(let e=0;e=8)throw new t2(`Invalid padding: ${t}`);if(r<0||e.length>0&&0===this.hashCount)throw new t2(`Invalid hash count: ${r}`);if(0===e.length&&0!==t)throw new t2(`Invalid padding when bitmap length is 0: ${t}`);this.Te=8*e.length-t,this.Ee=u.z8.fromNumber(this.Te)}de(e,t,r){let n=e.add(t.multiply(u.z8.fromNumber(r)));return 1===n.compare(tX)&&(n=new u.z8([n.getBits(0),n.getBits(1)],0)),n.modulo(this.Ee).toNumber()}Ae(e){return 0!=(this.bitmap[Math.floor(e/8)]&1<n.insert(e)),n}insert(e){if(0===this.Te)return;let[t,r]=t0(tZ(e));for(let e=0;e0&&(this.Se=!0,this.ye=e)}ve(){let e=tv(),t=tv(),r=tv();return this.pe.forEach((n,i)=>{switch(i){case 0:e=e.add(n);break;case 2:t=t.add(n);break;case 1:r=r.add(n);break;default:_()}}),new t3(this.ye,this.we,e,t,r)}Fe(){this.Se=!1,this.pe=rt()}Me(e,t){this.Se=!0,this.pe=this.pe.insert(e,t)}xe(e){this.Se=!0,this.pe=this.pe.remove(e)}Oe(){this.ge+=1}Ne(){this.ge-=1,this.ge>=0||_()}Be(){this.Se=!0,this.we=!0}}class t7{constructor(e){this.Le=e,this.ke=new Map,this.qe=td,this.Qe=re(),this.Ke=new eo(L)}$e(e){for(let t of e.Ve)e.me&&e.me.isFoundDocument()?this.Ue(t,e.me):this.We(t,e.key,e.me);for(let t of e.removedTargetIds)this.We(t,e.key,e.me)}Ge(e){this.forEachTarget(e,t=>{let r=this.ze(t);switch(e.state){case 0:this.je(t)&&r.Ce(e.resumeToken);break;case 1:r.Ne(),r.be||r.Fe(),r.Ce(e.resumeToken);break;case 2:r.Ne(),r.be||this.removeTarget(t);break;case 3:this.je(t)&&(r.Be(),r.Ce(e.resumeToken));break;case 4:this.je(t)&&(this.He(t),r.Ce(e.resumeToken));break;default:_()}})}forEachTarget(e,t){e.targetIds.length>0?e.targetIds.forEach(t):this.ke.forEach((e,r)=>{this.je(r)&&t(r)})}Je(e){let t=e.targetId,r=e.fe.count,n=this.Ye(t);if(n){let i=n.target;if(e5(i)){if(0===r){let e=new B(i.path);this.We(t,e,eq.newNoDocument(e,M.min()))}else 1===r||_()}else{let n=this.Ze(t);if(n!==r){let r=this.Xe(e),i=r?this.et(r,e,n):1;0!==i&&(this.He(t),this.Ke=this.Ke.insert(t,2===i?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch"))}}}}Xe(e){let t,r;let n=e.fe.unchangedNames;if(!n||!n.bits)return null;let{bits:{bitmap:i="",padding:s=0},hashCount:a=0}=n;try{t=ew(i).toUint8Array()}catch(e){if(e instanceof ef)return w("Decoding the base64 bloom filter in existence filter failed ("+e.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw e}try{r=new t1(t,s,a)}catch(e){return w(e instanceof t2?"BloomFilter error: ":"Applying bloom filter failed: ",e),null}return 0===r.Te?null:r}et(e,t,r){return t.fe.count===r-this.rt(e,t.targetId)?0:2}rt(e,t){let r=this.Le.getRemoteKeysForTarget(t),n=0;return r.forEach(r=>{let i=this.Le.nt(),s=`projects/${i.projectId}/databases/${i.database}/documents/${r.path.canonicalString()}`;e.mightContain(s)||(this.We(t,r,null),n++)}),n}it(e){let t=new Map;this.ke.forEach((r,n)=>{let i=this.Ye(n);if(i){if(r.current&&e5(i.target)){let t=new B(i.target.path);null!==this.qe.get(t)||this.st(n,t)||this.We(n,t,eq.newNoDocument(t,e))}r.De&&(t.set(n,r.ve()),r.Fe())}});let r=tv();this.Qe.forEach((e,t)=>{let n=!0;t.forEachWhile(e=>{let t=this.Ye(e);return!t||"TargetPurposeLimboResolution"===t.purpose||(n=!1,!1)}),n&&(r=r.add(e))}),this.qe.forEach((t,r)=>r.setReadTime(e));let n=new t4(e,t,this.Ke,this.qe,r);return this.qe=td,this.Qe=re(),this.Ke=new eo(L),n}Ue(e,t){if(!this.je(e))return;let r=this.st(e,t.key)?2:0;this.ze(e).Me(t.key,r),this.qe=this.qe.insert(t.key,t),this.Qe=this.Qe.insert(t.key,this.ot(t.key).add(e))}We(e,t,r){if(!this.je(e))return;let n=this.ze(e);this.st(e,t)?n.Me(t,1):n.xe(t),this.Qe=this.Qe.insert(t,this.ot(t).delete(e)),r&&(this.qe=this.qe.insert(t,r))}removeTarget(e){this.ke.delete(e)}Ze(e){let t=this.ze(e).ve();return this.Le.getRemoteKeysForTarget(e).size+t.addedDocuments.size-t.removedDocuments.size}Oe(e){this.ze(e).Oe()}ze(e){let t=this.ke.get(e);return t||(t=new t5,this.ke.set(e,t)),t}ot(e){let t=this.Qe.get(e);return t||(t=new eh(L),this.Qe=this.Qe.insert(e,t)),t}je(e){let t=null!==this.Ye(e);return t||g("WatchChangeAggregator","Detected inactive target",e),t}Ye(e){let t=this.ke.get(e);return t&&t.be?null:this.Le._t(e)}He(e){this.ke.set(e,new t5),this.Le.getRemoteKeysForTarget(e).forEach(t=>{this.We(e,t,null)})}st(e,t){return this.Le.getRemoteKeysForTarget(e).has(t)}}function re(){return new eo(B.comparator)}function rt(){return new eo(B.comparator)}let rr={asc:"ASCENDING",desc:"DESCENDING"},rn={"<":"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"},ri={and:"AND",or:"OR"};class rs{constructor(e,t){this.databaseId=e,this.useProto3Json=t}}function ra(e,t){return e.useProto3Json||null==t?t:{value:t}}function ro(e,t){return e.useProto3Json?`${new Date(1e3*t.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+t.nanoseconds).slice(-9)}Z`:{seconds:""+t.seconds,nanos:t.nanoseconds}}function rl(e,t){return e.useProto3Json?t.toBase64():t.toUint8Array()}function ru(e){return e||_(),M.fromTimestamp(function(e){let t=eg(e);return new O(t.seconds,t.nanos)}(e))}function rh(e,t){return rc(e,t).canonicalString()}function rc(e,t){let r=new P(["projects",e.projectId,"databases",e.database]).child("documents");return void 0===t?r:r.child(t)}function rd(e){let t=P.fromString(e);return rE(t)||_(),t}function rf(e,t){return rh(e.databaseId,t.path)}function rm(e,t){let r=rd(t);if(r.get(1)!==e.databaseId.projectId)throw new T(E.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+r.get(1)+" vs "+e.databaseId.projectId);if(r.get(3)!==e.databaseId.database)throw new T(E.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+r.get(3)+" vs "+e.databaseId.database);return new B(ry(r))}function rp(e,t){return rh(e.databaseId,t)}function rg(e){return new P(["projects",e.databaseId.projectId,"databases",e.databaseId.database]).canonicalString()}function ry(e){return e.length>4&&"documents"===e.get(4)||_(),e.popFirst(5)}function rw(e,t,r){return{name:rf(e,t),fields:r.value.mapValue.fields}}function rv(e){return{fieldPath:e.canonicalString()}}function r_(e){return q.fromServerFormat(e.fieldPath)}function rE(e){return e.length>=4&&"projects"===e.get(0)&&"databases"===e.get(2)}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rT{constructor(e,t,r,n,i=M.min(),s=M.min(),a=em.EMPTY_BYTE_STRING,o=null){this.target=e,this.targetId=t,this.purpose=r,this.sequenceNumber=n,this.snapshotVersion=i,this.lastLimboFreeSnapshotVersion=s,this.resumeToken=a,this.expectedCount=o}withSequenceNumber(e){return new rT(this.target,this.targetId,this.purpose,e,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(e,t){return new rT(this.target,this.targetId,this.purpose,this.sequenceNumber,t,this.lastLimboFreeSnapshotVersion,e,null)}withExpectedCount(e){return new rT(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,e)}withLastLimboFreeSnapshotVersion(e){return new rT(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,e,this.resumeToken,this.expectedCount)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rI{constructor(e){this.ct=e}}/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rS{constructor(){}Pt(e,t){this.It(e,t),t.Tt()}It(e,t){if("nullValue"in e)this.Et(t,5);else if("booleanValue"in e)this.Et(t,10),t.dt(e.booleanValue?1:0);else if("integerValue"in e)this.Et(t,15),t.dt(ey(e.integerValue));else if("doubleValue"in e){let r=ey(e.doubleValue);isNaN(r)?this.Et(t,13):(this.Et(t,15),en(r)?t.dt(0):t.dt(r))}else if("timestampValue"in e){let r=e.timestampValue;this.Et(t,20),"string"==typeof r?t.At(r):(t.At(`${r.seconds||""}`),t.dt(r.nanos||0))}else if("stringValue"in e)this.Rt(e.stringValue,t),this.Vt(t);else if("bytesValue"in e)this.Et(t,30),t.ft(ew(e.bytesValue)),this.Vt(t);else if("referenceValue"in e)this.gt(e.referenceValue,t);else if("geoPointValue"in e){let r=e.geoPointValue;this.Et(t,45),t.dt(r.latitude||0),t.dt(r.longitude||0)}else"mapValue"in e?eP(e)?this.Et(t,Number.MAX_SAFE_INTEGER):(this.yt(e.mapValue,t),this.Vt(t)):"arrayValue"in e?(this.wt(e.arrayValue,t),this.Vt(t)):_()}Rt(e,t){this.Et(t,25),this.St(e,t)}St(e,t){t.At(e)}yt(e,t){let r=e.fields||{};for(let e of(this.Et(t,55),Object.keys(r)))this.Rt(e,t),this.It(r[e],t)}wt(e,t){let r=e.values||[];for(let e of(this.Et(t,50),r))this.It(e,t)}gt(e,t){this.Et(t,37),B.fromName(e).path.forEach(e=>{this.Et(t,60),this.St(e,t)})}Et(e,t){e.dt(t)}Vt(e){e.dt(2)}}rS.bt=new rS;/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rC{constructor(){this._n=new rA}addToCollectionParentIndex(e,t){return this._n.add(t),j.resolve()}getCollectionParents(e,t){return j.resolve(this._n.getEntries(t))}addFieldIndex(e,t){return j.resolve()}deleteFieldIndex(e,t){return j.resolve()}deleteAllFieldIndexes(e){return j.resolve()}createTargetIndexes(e,t){return j.resolve()}getDocumentsMatchingTarget(e,t){return j.resolve(null)}getIndexType(e,t){return j.resolve(0)}getFieldIndexes(e,t){return j.resolve([])}getNextCollectionGroupToUpdate(e){return j.resolve(null)}getMinOffset(e,t){return j.resolve(z.min())}getMinOffsetFromCollectionGroup(e,t){return j.resolve(z.min())}updateCollectionGroup(e,t,r){return j.resolve()}updateIndexEntries(e,t){return j.resolve()}}class rA{constructor(){this.index={}}add(e){let t=e.lastSegment(),r=e.popLast(),n=this.index[t]||new eh(P.comparator),i=!n.has(r);return this.index[t]=n.add(r),i}has(e){let t=e.lastSegment(),r=e.popLast(),n=this.index[t];return n&&n.has(r)}getEntries(e){return(this.index[e]||new eh(P.comparator)).toArray()}}new Uint8Array(0);class rb{constructor(e,t,r){this.cacheSizeCollectionThreshold=e,this.percentileToCollect=t,this.maximumSequenceNumbersToCollect=r}static withCacheSize(e){return new rb(e,rb.DEFAULT_COLLECTION_PERCENTILE,rb.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */rb.DEFAULT_COLLECTION_PERCENTILE=10,rb.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,rb.DEFAULT=new rb(41943040,rb.DEFAULT_COLLECTION_PERCENTILE,rb.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),rb.DISABLED=new rb(-1,0,0);/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rD{constructor(e){this.On=e}next(){return this.On+=2,this.On}static Nn(){return new rD(0)}static Bn(){return new rD(-1)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rN{constructor(){this.changes=new tc(e=>e.toString(),(e,t)=>e.isEqual(t)),this.changesApplied=!1}addEntry(e){this.assertNotApplied(),this.changes.set(e.key,e)}removeEntry(e,t){this.assertNotApplied(),this.changes.set(e,eq.newInvalidDocument(e).setReadTime(t))}getEntry(e,t){this.assertNotApplied();let r=this.changes.get(t);return void 0!==r?j.resolve(r):this.getFromCache(e,t)}getEntries(e,t){return this.getAllFromCache(e,t)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}assertNotApplied(){}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *//** + * @license + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rk{constructor(e,t){this.overlayedDocument=e,this.mutatedFields=t}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rx{constructor(e,t,r,n){this.remoteDocumentCache=e,this.mutationQueue=t,this.documentOverlayCache=r,this.indexManager=n}getDocument(e,t){let r=null;return this.documentOverlayCache.getOverlay(e,t).next(n=>(r=n,this.remoteDocumentCache.getEntry(e,t))).next(e=>(null!==r&&tP(r.mutation,e,ed.empty(),O.now()),e))}getDocuments(e,t){return this.remoteDocumentCache.getEntries(e,t).next(t=>this.getLocalViewOfDocuments(e,t,tv()).next(()=>t))}getLocalViewOfDocuments(e,t,r=tv()){let n=tg();return this.populateOverlays(e,n,t).next(()=>this.computeViews(e,t,n,r).next(e=>{let t=tm();return e.forEach((e,r)=>{t=t.insert(e,r.overlayedDocument)}),t}))}getOverlayedDocuments(e,t){let r=tg();return this.populateOverlays(e,r,t).next(()=>this.computeViews(e,t,r,tv()))}populateOverlays(e,t,r){let n=[];return r.forEach(e=>{t.has(e)||n.push(e)}),this.documentOverlayCache.getOverlays(e,n).next(e=>{e.forEach((e,r)=>{t.set(e,r)})})}computeViews(e,t,r,n){let i=td,s=tg(),a=tg();return t.forEach((e,t)=>{let a=r.get(t.key);n.has(t.key)&&(void 0===a||a.mutation instanceof tB)?i=i.insert(t.key,t):void 0!==a?(s.set(t.key,a.mutation.getFieldMask()),tP(a.mutation,t,a.mutation.getFieldMask(),O.now())):s.set(t.key,ed.empty())}),this.recalculateAndSaveOverlays(e,i).next(e=>(e.forEach((e,t)=>s.set(e,t)),t.forEach((e,t)=>{var r;return a.set(e,new rk(t,null!==(r=s.get(e))&&void 0!==r?r:null))}),a))}recalculateAndSaveOverlays(e,t){let r=tg(),n=new eo((e,t)=>e-t),i=tv();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,t).next(e=>{for(let i of e)i.keys().forEach(e=>{let s=t.get(e);if(null===s)return;let a=r.get(e)||ed.empty();a=i.applyToLocalView(s,a),r.set(e,a);let o=(n.get(i.batchId)||tv()).add(e);n=n.insert(i.batchId,o)})}).next(()=>{let s=[],a=n.getReverseIterator();for(;a.hasNext();){let n=a.getNext(),o=n.key,l=n.value,u=tg();l.forEach(e=>{if(!i.has(e)){let n=tF(t.get(e),r.get(e));null!==n&&u.set(e,n),i=i.add(e)}}),s.push(this.documentOverlayCache.saveOverlays(e,o,u))}return j.waitFor(s)}).next(()=>r)}recalculateAndSaveOverlaysForDocumentKeys(e,t){return this.remoteDocumentCache.getEntries(e,t).next(t=>this.recalculateAndSaveOverlays(e,t))}getDocumentsMatchingQuery(e,t,r,n){return B.isDocumentKey(t.path)&&null===t.collectionGroup&&0===t.filters.length?this.getDocumentsMatchingDocumentQuery(e,t.path):tt(t)?this.getDocumentsMatchingCollectionGroupQuery(e,t,r,n):this.getDocumentsMatchingCollectionQuery(e,t,r,n)}getNextDocuments(e,t,r,n){return this.remoteDocumentCache.getAllFromCollectionGroup(e,t,r,n).next(i=>{let s=n-i.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,t,r.largestBatchId,n-i.size):j.resolve(tg()),a=-1,o=i;return s.next(t=>j.forEach(t,(t,r)=>(a{o=o.insert(t,e)}))).next(()=>this.populateOverlays(e,t,i)).next(()=>this.computeViews(e,o,t,tv())).next(e=>({batchId:a,changes:tp(e)})))})}getDocumentsMatchingDocumentQuery(e,t){return this.getDocument(e,new B(t)).next(e=>{let t=tm();return e.isFoundDocument()&&(t=t.insert(e.key,e)),t})}getDocumentsMatchingCollectionGroupQuery(e,t,r,n){let i=t.collectionGroup,s=tm();return this.indexManager.getCollectionParents(e,i).next(a=>j.forEach(a,a=>{let o=new e7(a.child(i),null,t.explicitOrderBy.slice(),t.filters.slice(),t.limit,t.limitType,t.startAt,t.endAt);return this.getDocumentsMatchingCollectionQuery(e,o,r,n).next(e=>{e.forEach((e,t)=>{s=s.insert(e,t)})})}).next(()=>s))}getDocumentsMatchingCollectionQuery(e,t,r,n){let i;return this.documentOverlayCache.getOverlaysForCollection(e,t.path,r.largestBatchId).next(s=>(i=s,this.remoteDocumentCache.getDocumentsMatchingQuery(e,t,r,i,n))).next(e=>{i.forEach((t,r)=>{let n=r.getKey();null===e.get(n)&&(e=e.insert(n,eq.newInvalidDocument(n)))});let r=tm();return e.forEach((e,n)=>{let s=i.get(e);void 0!==s&&tP(s.mutation,n,ed.empty(),O.now()),tu(t,n)&&(r=r.insert(e,n))}),r})}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rR{constructor(e){this.serializer=e,this.cr=new Map,this.lr=new Map}getBundleMetadata(e,t){return j.resolve(this.cr.get(t))}saveBundleMetadata(e,t){return this.cr.set(t.id,{id:t.id,version:t.version,createTime:ru(t.createTime)}),j.resolve()}getNamedQuery(e,t){return j.resolve(this.lr.get(t))}saveNamedQuery(e,t){return this.lr.set(t.name,{name:t.name,query:function(e){let t=function(e){var t;let r,n=function(e){let t=rd(e);return 4===t.length?P.emptyPath():ry(t)}(e.parent),i=e.structuredQuery,s=i.from?i.from.length:0,a=null;if(s>0){1===s||_();let e=i.from[0];e.allDescendants?a=e.collectionId:n=n.child(e.collectionId)}let o=[];i.where&&(o=function(e){var t;let r=function e(t){return void 0!==t.unaryFilter?function(e){switch(e.unaryFilter.op){case"IS_NAN":let t=r_(e.unaryFilter.field);return ej.create(t,"==",{doubleValue:NaN});case"IS_NULL":let r=r_(e.unaryFilter.field);return ej.create(r,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":let n=r_(e.unaryFilter.field);return ej.create(n,"!=",{doubleValue:NaN});case"IS_NOT_NULL":let i=r_(e.unaryFilter.field);return ej.create(i,"!=",{nullValue:"NULL_VALUE"});default:return _()}}(t):void 0!==t.fieldFilter?ej.create(r_(t.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 _()}}(t.fieldFilter.op),t.fieldFilter.value):void 0!==t.compositeFilter?eG.create(t.compositeFilter.filters.map(t=>e(t)),function(e){switch(e){case"AND":return"and";case"OR":return"or";default:return _()}}(t.compositeFilter.op)):_()}(e);return r instanceof eG&&eH(t=r)&&eW(t)?r.getFilters():[r]}(i.where));let l=[];i.orderBy&&(l=i.orderBy.map(e=>new eK(r_(e.field),function(e){switch(e){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(e.direction))));let u=null;i.limit&&(u=null==(r="object"==typeof(t=i.limit)?t.value:t)?null:r);let h=null;i.startAt&&(h=function(e){let t=!!e.before;return new eB(e.values||[],t)}(i.startAt));let c=null;return i.endAt&&(c=function(e){let t=!e.before;return new eB(e.values||[],t)}(i.endAt)),new e7(n,a,l,o,u,"F",h,c)}({parent:e.parent,structuredQuery:e.structuredQuery});return"LAST"===e.limitType?ts(t,t.limit,"L"):t}(t.bundledQuery),readTime:ru(t.readTime)}),j.resolve()}}/** + * @license + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rL{constructor(){this.overlays=new eo(B.comparator),this.hr=new Map}getOverlay(e,t){return j.resolve(this.overlays.get(t))}getOverlays(e,t){let r=tg();return j.forEach(t,t=>this.getOverlay(e,t).next(e=>{null!==e&&r.set(t,e)})).next(()=>r)}saveOverlays(e,t,r){return r.forEach((r,n)=>{this.ht(e,t,n)}),j.resolve()}removeOverlaysForBatchId(e,t,r){let n=this.hr.get(r);return void 0!==n&&(n.forEach(e=>this.overlays=this.overlays.remove(e)),this.hr.delete(r)),j.resolve()}getOverlaysForCollection(e,t,r){let n=tg(),i=t.length+1,s=new B(t.child("")),a=this.overlays.getIteratorFrom(s);for(;a.hasNext();){let e=a.getNext().value,s=e.getKey();if(!t.isPrefixOf(s.path))break;s.path.length===i&&e.largestBatchId>r&&n.set(e.getKey(),e)}return j.resolve(n)}getOverlaysForCollectionGroup(e,t,r,n){let i=new eo((e,t)=>e-t),s=this.overlays.getIterator();for(;s.hasNext();){let e=s.getNext().value;if(e.getKey().getCollectionGroup()===t&&e.largestBatchId>r){let t=i.get(e.largestBatchId);null===t&&(t=tg(),i=i.insert(e.largestBatchId,t)),t.set(e.getKey(),e)}}let a=tg(),o=i.getIterator();for(;o.hasNext()&&(o.getNext().value.forEach((e,t)=>a.set(e,t)),!(a.size()>=n)););return j.resolve(a)}ht(e,t,r){let n=this.overlays.get(r.key);if(null!==n){let e=this.hr.get(n.largestBatchId).delete(r.key);this.hr.set(n.largestBatchId,e)}this.overlays=this.overlays.insert(r.key,new tH(t,r));let i=this.hr.get(t);void 0===i&&(i=tv(),this.hr.set(t,i)),this.hr.set(t,i.add(r.key))}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rV{constructor(){this.Pr=new eh(rO.Ir),this.Tr=new eh(rO.Er)}isEmpty(){return this.Pr.isEmpty()}addReference(e,t){let r=new rO(e,t);this.Pr=this.Pr.add(r),this.Tr=this.Tr.add(r)}dr(e,t){e.forEach(e=>this.addReference(e,t))}removeReference(e,t){this.Ar(new rO(e,t))}Rr(e,t){e.forEach(e=>this.removeReference(e,t))}Vr(e){let t=new B(new P([])),r=new rO(t,e),n=new rO(t,e+1),i=[];return this.Tr.forEachInRange([r,n],e=>{this.Ar(e),i.push(e.key)}),i}mr(){this.Pr.forEach(e=>this.Ar(e))}Ar(e){this.Pr=this.Pr.delete(e),this.Tr=this.Tr.delete(e)}gr(e){let t=new B(new P([])),r=new rO(t,e),n=new rO(t,e+1),i=tv();return this.Tr.forEachInRange([r,n],e=>{i=i.add(e.key)}),i}containsKey(e){let t=new rO(e,0),r=this.Pr.firstAfterOrEqual(t);return null!==r&&e.isEqual(r.key)}}class rO{constructor(e,t){this.key=e,this.pr=t}static Ir(e,t){return B.comparator(e.key,t.key)||L(e.pr,t.pr)}static Er(e,t){return L(e.pr,t.pr)||B.comparator(e.key,t.key)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rM{constructor(e,t){this.indexManager=e,this.referenceDelegate=t,this.mutationQueue=[],this.yr=1,this.wr=new eh(rO.Ir)}checkEmpty(e){return j.resolve(0===this.mutationQueue.length)}addMutationBatch(e,t,r,n){let i=this.yr;this.yr++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];let s=new tG(i,t,r,n);for(let t of(this.mutationQueue.push(s),n))this.wr=this.wr.add(new rO(t.key,i)),this.indexManager.addToCollectionParentIndex(e,t.key.path.popLast());return j.resolve(s)}lookupMutationBatch(e,t){return j.resolve(this.Sr(t))}getNextMutationBatchAfterBatchId(e,t){let r=this.br(t+1),n=r<0?0:r;return j.resolve(this.mutationQueue.length>n?this.mutationQueue[n]:null)}getHighestUnacknowledgedBatchId(){return j.resolve(0===this.mutationQueue.length?-1:this.yr-1)}getAllMutationBatches(e){return j.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,t){let r=new rO(t,0),n=new rO(t,Number.POSITIVE_INFINITY),i=[];return this.wr.forEachInRange([r,n],e=>{let t=this.Sr(e.pr);i.push(t)}),j.resolve(i)}getAllMutationBatchesAffectingDocumentKeys(e,t){let r=new eh(L);return t.forEach(e=>{let t=new rO(e,0),n=new rO(e,Number.POSITIVE_INFINITY);this.wr.forEachInRange([t,n],e=>{r=r.add(e.pr)})}),j.resolve(this.Dr(r))}getAllMutationBatchesAffectingQuery(e,t){let r=t.path,n=r.length+1,i=r;B.isDocumentKey(i)||(i=i.child(""));let s=new rO(new B(i),0),a=new eh(L);return this.wr.forEachWhile(e=>{let t=e.key.path;return!!r.isPrefixOf(t)&&(t.length===n&&(a=a.add(e.pr)),!0)},s),j.resolve(this.Dr(a))}Dr(e){let t=[];return e.forEach(e=>{let r=this.Sr(e);null!==r&&t.push(r)}),t}removeMutationBatch(e,t){0===this.Cr(t.batchId,"removed")||_(),this.mutationQueue.shift();let r=this.wr;return j.forEach(t.mutations,n=>{let i=new rO(n.key,t.batchId);return r=r.delete(i),this.referenceDelegate.markPotentiallyOrphaned(e,n.key)}).next(()=>{this.wr=r})}Mn(e){}containsKey(e,t){let r=new rO(t,0),n=this.wr.firstAfterOrEqual(r);return j.resolve(t.isEqual(n&&n.key))}performConsistencyCheck(e){return this.mutationQueue.length,j.resolve()}Cr(e,t){return this.br(e)}br(e){return 0===this.mutationQueue.length?0:e-this.mutationQueue[0].batchId}Sr(e){let t=this.br(e);return t<0||t>=this.mutationQueue.length?null:this.mutationQueue[t]}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rF{constructor(e){this.vr=e,this.docs=new eo(B.comparator),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,t){let r=t.key,n=this.docs.get(r),i=n?n.size:0,s=this.vr(t);return this.docs=this.docs.insert(r,{document:t.mutableCopy(),size:s}),this.size+=s-i,this.indexManager.addToCollectionParentIndex(e,r.path.popLast())}removeEntry(e){let t=this.docs.get(e);t&&(this.docs=this.docs.remove(e),this.size-=t.size)}getEntry(e,t){let r=this.docs.get(t);return j.resolve(r?r.document.mutableCopy():eq.newInvalidDocument(t))}getEntries(e,t){let r=td;return t.forEach(e=>{let t=this.docs.get(e);r=r.insert(e,t?t.document.mutableCopy():eq.newInvalidDocument(e))}),j.resolve(r)}getDocumentsMatchingQuery(e,t,r,n){let i=td,s=t.path,a=new B(s.child("")),o=this.docs.getIteratorFrom(a);for(;o.hasNext();){let{key:e,value:{document:a}}=o.getNext();if(!s.isPrefixOf(e.path))break;e.path.length>s.length+1||0>=function(e,t){let r=e.readTime.compareTo(t.readTime);return 0!==r?r:0!==(r=B.comparator(e.documentKey,t.documentKey))?r:L(e.largestBatchId,t.largestBatchId)}(new z(a.readTime,a.key,-1),r)||(n.has(a.key)||tu(t,a))&&(i=i.insert(a.key,a.mutableCopy()))}return j.resolve(i)}getAllFromCollectionGroup(e,t,r,n){_()}Fr(e,t){return j.forEach(this.docs,e=>t(e))}newChangeBuffer(e){return new rP(this)}getSize(e){return j.resolve(this.size)}}class rP extends rN{constructor(e){super(),this.ar=e}applyChanges(e){let t=[];return this.changes.forEach((r,n)=>{n.isValidDocument()?t.push(this.ar.addEntry(e,n)):this.ar.removeEntry(r)}),j.waitFor(t)}getFromCache(e,t){return this.ar.getEntry(e,t)}getAllFromCache(e,t){return this.ar.getEntries(e,t)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rU{constructor(e){this.persistence=e,this.Mr=new tc(e=>e8(e),e6),this.lastRemoteSnapshotVersion=M.min(),this.highestTargetId=0,this.Or=0,this.Nr=new rV,this.targetCount=0,this.Br=rD.Nn()}forEachTarget(e,t){return this.Mr.forEach((e,r)=>t(r)),j.resolve()}getLastRemoteSnapshotVersion(e){return j.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return j.resolve(this.Or)}allocateTargetId(e){return this.highestTargetId=this.Br.next(),j.resolve(this.highestTargetId)}setTargetsMetadata(e,t,r){return r&&(this.lastRemoteSnapshotVersion=r),t>this.Or&&(this.Or=t),j.resolve()}qn(e){this.Mr.set(e.target,e);let t=e.targetId;t>this.highestTargetId&&(this.Br=new rD(t),this.highestTargetId=t),e.sequenceNumber>this.Or&&(this.Or=e.sequenceNumber)}addTargetData(e,t){return this.qn(t),this.targetCount+=1,j.resolve()}updateTargetData(e,t){return this.qn(t),j.resolve()}removeTargetData(e,t){return this.Mr.delete(t.target),this.Nr.Vr(t.targetId),this.targetCount-=1,j.resolve()}removeTargets(e,t,r){let n=0,i=[];return this.Mr.forEach((s,a)=>{a.sequenceNumber<=t&&null===r.get(a.targetId)&&(this.Mr.delete(s),i.push(this.removeMatchingKeysForTargetId(e,a.targetId)),n++)}),j.waitFor(i).next(()=>n)}getTargetCount(e){return j.resolve(this.targetCount)}getTargetData(e,t){let r=this.Mr.get(t)||null;return j.resolve(r)}addMatchingKeys(e,t,r){return this.Nr.dr(t,r),j.resolve()}removeMatchingKeys(e,t,r){this.Nr.Rr(t,r);let n=this.persistence.referenceDelegate,i=[];return n&&t.forEach(t=>{i.push(n.markPotentiallyOrphaned(e,t))}),j.waitFor(i)}removeMatchingKeysForTargetId(e,t){return this.Nr.Vr(t),j.resolve()}getMatchingKeysForTargetId(e,t){let r=this.Nr.gr(t);return j.resolve(r)}containsKey(e,t){return j.resolve(this.Nr.containsKey(t))}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rq{constructor(e,t){this.Lr={},this.overlays={},this.kr=new er(0),this.qr=!1,this.qr=!0,this.referenceDelegate=e(this),this.Qr=new rU(this),this.indexManager=new rC,this.remoteDocumentCache=new rF(e=>this.referenceDelegate.Kr(e)),this.serializer=new rI(t),this.$r=new rR(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.qr=!1,Promise.resolve()}get started(){return this.qr}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let t=this.overlays[e.toKey()];return t||(t=new rL,this.overlays[e.toKey()]=t),t}getMutationQueue(e,t){let r=this.Lr[e.toKey()];return r||(r=new rM(t,this.referenceDelegate),this.Lr[e.toKey()]=r),r}getTargetCache(){return this.Qr}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.$r}runTransaction(e,t,r){g("MemoryPersistence","Starting transaction:",e);let n=new rB(this.kr.next());return this.referenceDelegate.Ur(),r(n).next(e=>this.referenceDelegate.Wr(n).next(()=>e)).toPromise().then(e=>(n.raiseOnCommittedEvent(),e))}Gr(e,t){return j.or(Object.values(this.Lr).map(r=>()=>r.containsKey(e,t)))}}class rB extends K{constructor(e){super(),this.currentSequenceNumber=e}}class r${constructor(e){this.persistence=e,this.zr=new rV,this.jr=null}static Hr(e){return new r$(e)}get Jr(){if(this.jr)return this.jr;throw _()}addReference(e,t,r){return this.zr.addReference(r,t),this.Jr.delete(r.toString()),j.resolve()}removeReference(e,t,r){return this.zr.removeReference(r,t),this.Jr.add(r.toString()),j.resolve()}markPotentiallyOrphaned(e,t){return this.Jr.add(t.toString()),j.resolve()}removeTarget(e,t){this.zr.Vr(t.targetId).forEach(e=>this.Jr.add(e.toString()));let r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(e,t.targetId).next(e=>{e.forEach(e=>this.Jr.add(e.toString()))}).next(()=>r.removeTargetData(e,t))}Ur(){this.jr=new Set}Wr(e){let t=this.persistence.getRemoteDocumentCache().newChangeBuffer();return j.forEach(this.Jr,r=>{let n=B.fromPath(r);return this.Yr(e,n).next(e=>{e||t.removeEntry(n,M.min())})}).next(()=>(this.jr=null,t.apply(e)))}updateLimboDocument(e,t){return this.Yr(e,t).next(e=>{e?this.Jr.delete(t.toString()):this.Jr.add(t.toString())})}Kr(e){return 0}Yr(e,t){return j.or([()=>j.resolve(this.zr.containsKey(t)),()=>this.persistence.getTargetCache().containsKey(e,t),()=>this.persistence.Gr(e,t)])}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rz{constructor(e,t,r,n){this.targetId=e,this.fromCache=t,this.qi=r,this.Qi=n}static Ki(e,t){let r=tv(),n=tv();for(let e of t.docChanges)switch(e.type){case 0:r=r.add(e.doc.key);break;case 1:n=n.add(e.doc.key)}return new rz(e,t.fromCache,r,n)}}/** + * @license + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rK{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(e){this._documentReadCount+=e}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rQ{constructor(){this.$i=!1,this.Ui=!1,this.Wi=100,this.Gi=(0,l.G6)()?8:W.v((0,l.z$)())>0?6:4}initialize(e,t){this.zi=e,this.indexManager=t,this.$i=!0}getDocumentsMatchingQuery(e,t,r,n){let i={result:null};return this.ji(e,t).next(e=>{i.result=e}).next(()=>{if(!i.result)return this.Hi(e,t,n,r).next(e=>{i.result=e})}).next(()=>{if(i.result)return;let r=new rK;return this.Ji(e,t,r).next(n=>{if(i.result=n,this.Ui)return this.Yi(e,t,r,n.size)})}).next(()=>i.result)}Yi(e,t,r,n){return r.documentReadCountthis.Gi*n?(p()<=o.in.DEBUG&&g("QueryEngine","The SDK decides to create cache indexes for query:",tl(t),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(e,tn(t))):j.resolve())}ji(e,t){if(te(t))return j.resolve(null);let r=tn(t);return this.indexManager.getIndexType(e,r).next(n=>0===n?null:(null!==t.limit&&1===n&&(r=tn(t=ts(t,null,"F"))),this.indexManager.getDocumentsMatchingTarget(e,r).next(n=>{let i=tv(...n);return this.zi.getDocuments(e,i).next(n=>this.indexManager.getMinOffset(e,r).next(r=>{let s=this.Zi(t,n);return this.Xi(t,s,i,r.readTime)?this.ji(e,ts(t,null,"F")):this.es(e,s,t,r)}))})))}Hi(e,t,r,n){return te(t)||n.isEqual(M.min())?j.resolve(null):this.zi.getDocuments(e,r).next(i=>{let s=this.Zi(t,i);return this.Xi(t,s,r,n)?j.resolve(null):(p()<=o.in.DEBUG&&g("QueryEngine","Re-using previous result from %s to execute query: %s",n.toString(),tl(t)),this.es(e,s,t,function(e,t){let r=e.toTimestamp().seconds,n=e.toTimestamp().nanoseconds+1;return new z(M.fromTimestamp(1e9===n?new O(r+1,0):new O(r,n)),B.empty(),-1)}(n,0)).next(e=>e))})}Zi(e,t){let r=new eh(th(e));return t.forEach((t,n)=>{tu(e,n)&&(r=r.add(n))}),r}Xi(e,t,r,n){if(null===e.limit)return!1;if(r.size!==t.size)return!0;let i="F"===e.limitType?t.last():t.first();return!!i&&(i.hasPendingWrites||i.version.compareTo(n)>0)}Ji(e,t,r){return p()<=o.in.DEBUG&&g("QueryEngine","Using full collection scan to execute query:",tl(t)),this.zi.getDocumentsMatchingQuery(e,t,z.min(),r)}es(e,t,r,n){return this.zi.getDocumentsMatchingQuery(e,r,n).next(e=>(t.forEach(t=>{e=e.insert(t.key,t)}),e))}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rj{constructor(e,t,r,n){this.persistence=e,this.ts=t,this.serializer=n,this.ns=new eo(L),this.rs=new tc(e=>e8(e),e6),this.ss=new Map,this.os=e.getRemoteDocumentCache(),this.Qr=e.getTargetCache(),this.$r=e.getBundleCache(),this._s(r)}_s(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new rx(this.os,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.os.setIndexManager(this.indexManager),this.ts.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",t=>e.collect(t,this.ns))}}async function rG(e,t){return await e.persistence.runTransaction("Handle user change","readonly",r=>{let n;return e.mutationQueue.getAllMutationBatches(r).next(i=>(n=i,e._s(t),e.mutationQueue.getAllMutationBatches(r))).next(t=>{let i=[],s=[],a=tv();for(let e of n)for(let t of(i.push(e.batchId),e.mutations))a=a.add(t.key);for(let e of t)for(let t of(s.push(e.batchId),e.mutations))a=a.add(t.key);return e.localDocuments.getDocuments(r,a).next(e=>({us:e,removedBatchIds:i,addedBatchIds:s}))})})}function rW(e){return e.persistence.runTransaction("Get last remote snapshot version","readonly",t=>e.Qr.getLastRemoteSnapshotVersion(t))}async function rH(e,t,r){let n=e.ns.get(t);try{r||await e.persistence.runTransaction("Release target",r?"readwrite":"readwrite-primary",t=>e.persistence.referenceDelegate.removeTarget(t,n))}catch(e){if(!J(e))throw e;g("LocalStore",`Failed to update sequence numbers for target ${t}: ${e}`)}e.ns=e.ns.remove(t),e.rs.delete(n.target)}function rY(e,t,r){let n=M.min(),i=tv();return e.persistence.runTransaction("Execute query","readwrite",s=>(function(e,t,r){let n=e.rs.get(r);return void 0!==n?j.resolve(e.ns.get(n)):e.Qr.getTargetData(t,r)})(e,s,tn(t)).next(t=>{if(t)return n=t.lastLimboFreeSnapshotVersion,e.Qr.getMatchingKeysForTargetId(s,t.targetId).next(e=>{i=e})}).next(()=>e.ts.getDocumentsMatchingQuery(s,t,r?n:M.min(),r?i:tv())).next(r=>{var n;let s;return n=t.collectionGroup||(t.path.length%2==1?t.path.lastSegment():t.path.get(t.path.length-2)),s=e.ss.get(n)||M.min(),r.forEach((e,t)=>{t.readTime.compareTo(s)>0&&(s=t.readTime)}),e.ss.set(n,s),{documents:r,hs:i}}))}class rJ{constructor(){this.activeTargetIds=t_}As(e){this.activeTargetIds=this.activeTargetIds.add(e)}Rs(e){this.activeTargetIds=this.activeTargetIds.delete(e)}ds(){return JSON.stringify({activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()})}}class rX{constructor(){this.no=new rJ,this.ro={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,t,r){}addLocalQueryTarget(e){return this.no.As(e),this.ro[e]||"not-current"}updateQueryState(e,t,r){this.ro[e]=t}removeLocalQueryTarget(e){this.no.Rs(e)}isLocalQueryTarget(e){return this.no.activeTargetIds.has(e)}clearQueryState(e){delete this.ro[e]}getAllActiveQueryTargets(){return this.no.activeTargetIds}isActiveQueryTarget(e){return this.no.activeTargetIds.has(e)}start(){return this.no=new rJ,Promise.resolve()}handleUserChange(e,t,r){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rZ{io(e){}shutdown(){}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class r0{constructor(){this.so=()=>this.oo(),this._o=()=>this.ao(),this.uo=[],this.co()}io(e){this.uo.push(e)}shutdown(){window.removeEventListener("online",this.so),window.removeEventListener("offline",this._o)}co(){window.addEventListener("online",this.so),window.addEventListener("offline",this._o)}oo(){for(let e of(g("ConnectivityMonitor","Network connectivity changed: AVAILABLE"),this.uo))e(0)}ao(){for(let e of(g("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE"),this.uo))e(1)}static D(){return"undefined"!=typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener}}/** + * @license + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let r1=null;function r2(){return null===r1?r1=268435456+Math.round(2147483648*Math.random()):r1++,"0x"+r1.toString(16)}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let r4={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class r3{constructor(e){this.lo=e.lo,this.ho=e.ho}Po(e){this.Io=e}To(e){this.Eo=e}onMessage(e){this.Ao=e}close(){this.ho()}send(e){this.lo(e)}Ro(){this.Io()}Vo(e){this.Eo(e)}mo(e){this.Ao(e)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let r9="WebChannelConnection";class r8 extends class{constructor(e){this.databaseInfo=e,this.databaseId=e.databaseId;let t=e.ssl?"https":"http",r=encodeURIComponent(this.databaseId.projectId),n=encodeURIComponent(this.databaseId.database);this.fo=t+"://"+e.host,this.po=`projects/${r}/databases/${n}`,this.yo="(default)"===this.databaseId.database?`project_id=${r}`:`project_id=${r}&database_id=${n}`}get wo(){return!1}So(e,t,r,n,i){let s=r2(),a=this.bo(e,t.toUriEncodedString());g("RestConnection",`Sending RPC '${e}' ${s}:`,a,r);let o={"google-cloud-resource-prefix":this.po,"x-goog-request-params":this.yo};return this.Do(o,n,i),this.Co(e,a,o,r).then(t=>(g("RestConnection",`Received RPC '${e}' ${s}: `,t),t),t=>{throw w("RestConnection",`RPC '${e}' ${s} failed with error: `,t,"url: ",a,"request:",r),t})}vo(e,t,r,n,i,s){return this.So(e,t,r,n,i)}Do(e,t,r){e["X-Goog-Api-Client"]=function(){return"gl-js/ fire/"+f}(),e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),t&&t.headers.forEach((t,r)=>e[r]=t),r&&r.headers.forEach((t,r)=>e[r]=t)}bo(e,t){let r=r4[e];return`${this.fo}/v1/${t}:${r}`}terminate(){}}{constructor(e){super(e),this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams,this.longPollingOptions=e.longPollingOptions}Co(e,t,r,n){let i=r2();return new Promise((s,a)=>{let o=new u.JJ;o.setWithCredentials(!0),o.listenOnce(u.tw.COMPLETE,()=>{try{switch(o.getLastErrorCode()){case u.jK.NO_ERROR:let t=o.getResponseJson();g(r9,`XHR for RPC '${e}' ${i} received:`,JSON.stringify(t)),s(t);break;case u.jK.TIMEOUT:g(r9,`RPC '${e}' ${i} timed out`),a(new T(E.DEADLINE_EXCEEDED,"Request time out"));break;case u.jK.HTTP_ERROR:let r=o.getStatus();if(g(r9,`RPC '${e}' ${i} failed with status:`,r,"response text:",o.getResponseText()),r>0){let e=o.getResponseJson();Array.isArray(e)&&(e=e[0]);let t=null==e?void 0:e.error;if(t&&t.status&&t.message){let e=function(e){let t=e.toLowerCase().replace(/_/g,"-");return Object.values(E).indexOf(t)>=0?t:E.UNKNOWN}(t.status);a(new T(e,t.message))}else a(new T(E.UNKNOWN,"Server responded with status "+o.getStatus()))}else a(new T(E.UNAVAILABLE,"Connection failed."));break;default:_()}}finally{g(r9,`RPC '${e}' ${i} completed.`)}});let l=JSON.stringify(n);g(r9,`RPC '${e}' ${i} sending request:`,n),o.send(t,"POST",l,r,15)})}Fo(e,t,r){let i=r2(),s=[this.fo,"/","google.firestore.v1.Firestore","/",e,"/channel"],a=(0,u.UE)(),o=(0,u.FJ)(),l={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},h=this.longPollingOptions.timeoutSeconds;void 0!==h&&(l.longPollingTimeout=Math.round(1e3*h)),this.useFetchStreams&&(l.useFetchStreams=!0),this.Do(l.initMessageHeaders,t,r),l.encodeInitMessageHeaders=!0;let c=s.join("");g(r9,`Creating RPC '${e}' stream ${i}: ${c}`,l);let d=a.createWebChannel(c,l),f=!1,m=!1,p=new r3({lo:t=>{m?g(r9,`Not sending because RPC '${e}' stream ${i} is closed:`,t):(f||(g(r9,`Opening RPC '${e}' stream ${i} transport.`),d.open(),f=!0),g(r9,`RPC '${e}' stream ${i} sending:`,t),d.send(t))},ho:()=>d.close()}),y=(e,t,r)=>{e.listen(t,e=>{try{r(e)}catch(e){setTimeout(()=>{throw e},0)}})};return y(d,u.ii.EventType.OPEN,()=>{m||g(r9,`RPC '${e}' stream ${i} transport opened.`)}),y(d,u.ii.EventType.CLOSE,()=>{m||(m=!0,g(r9,`RPC '${e}' stream ${i} transport closed`),p.Vo())}),y(d,u.ii.EventType.ERROR,t=>{m||(m=!0,w(r9,`RPC '${e}' stream ${i} transport errored:`,t),p.Vo(new T(E.UNAVAILABLE,"The operation could not be completed")))}),y(d,u.ii.EventType.MESSAGE,t=>{var r;if(!m){let s=t.data[0];s||_();let a=s.error||(null===(r=s[0])||void 0===r?void 0:r.error);if(a){g(r9,`RPC '${e}' stream ${i} received error:`,a);let t=a.status,r=function(e){let t=n[e];if(void 0!==t)return tJ(t)}(t),s=a.message;void 0===r&&(r=E.INTERNAL,s="Unknown error status: "+t+" with message "+a.message),m=!0,p.Vo(new T(r,s)),d.close()}else g(r9,`RPC '${e}' stream ${i} received:`,s),p.mo(s)}}),y(o,u.ju.STAT_EVENT,t=>{t.stat===u.kN.PROXY?g(r9,`RPC '${e}' stream ${i} detected buffering proxy`):t.stat===u.kN.NOPROXY&&g(r9,`RPC '${e}' stream ${i} detected no buffering proxy`)}),setTimeout(()=>{p.Ro()},0),p}}function r6(){return"undefined"!=typeof document?document:null}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function r5(e){return new rs(e,!0)}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class r7{constructor(e,t,r=1e3,n=1.5,i=6e4){this.oi=e,this.timerId=t,this.Mo=r,this.xo=n,this.Oo=i,this.No=0,this.Bo=null,this.Lo=Date.now(),this.reset()}reset(){this.No=0}ko(){this.No=this.Oo}qo(e){this.cancel();let t=Math.floor(this.No+this.Qo()),r=Math.max(0,Date.now()-this.Lo),n=Math.max(0,t-r);n>0&&g("ExponentialBackoff",`Backing off for ${n} ms (base delay: ${this.No} ms, delay with jitter: ${t} ms, last attempt: ${r} ms ago)`),this.Bo=this.oi.enqueueAfterDelay(this.timerId,n,()=>(this.Lo=Date.now(),e())),this.No*=this.xo,this.Nothis.Oo&&(this.No=this.Oo)}Ko(){null!==this.Bo&&(this.Bo.skipDelay(),this.Bo=null)}cancel(){null!==this.Bo&&(this.Bo.cancel(),this.Bo=null)}Qo(){return(Math.random()-.5)*this.No}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ne{constructor(e,t,r,n,i,s,a,o){this.oi=e,this.$o=r,this.Uo=n,this.connection=i,this.authCredentialsProvider=s,this.appCheckCredentialsProvider=a,this.listener=o,this.state=0,this.Wo=0,this.Go=null,this.zo=null,this.stream=null,this.jo=new r7(e,t)}Ho(){return 1===this.state||5===this.state||this.Jo()}Jo(){return 2===this.state||3===this.state}start(){4!==this.state?this.auth():this.Yo()}async stop(){this.Ho()&&await this.close(0)}Zo(){this.state=0,this.jo.reset()}Xo(){this.Jo()&&null===this.Go&&(this.Go=this.oi.enqueueAfterDelay(this.$o,6e4,()=>this.e_()))}t_(e){this.n_(),this.stream.send(e)}async e_(){if(this.Jo())return this.close(0)}n_(){this.Go&&(this.Go.cancel(),this.Go=null)}r_(){this.zo&&(this.zo.cancel(),this.zo=null)}async close(e,t){this.n_(),this.r_(),this.jo.cancel(),this.Wo++,4!==e?this.jo.reset():t&&t.code===E.RESOURCE_EXHAUSTED?(y(t.toString()),y("Using maximum backoff delay to prevent overloading the backend."),this.jo.ko()):t&&t.code===E.UNAUTHENTICATED&&3!==this.state&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),null!==this.stream&&(this.i_(),this.stream.close(),this.stream=null),this.state=e,await this.listener.To(t)}i_(){}auth(){this.state=1;let e=this.s_(this.Wo),t=this.Wo;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([e,r])=>{this.Wo===t&&this.o_(e,r)},t=>{e(()=>{let e=new T(E.UNKNOWN,"Fetching auth token failed: "+t.message);return this.__(e)})})}o_(e,t){let r=this.s_(this.Wo);this.stream=this.a_(e,t),this.stream.Po(()=>{r(()=>(this.state=2,this.zo=this.oi.enqueueAfterDelay(this.Uo,1e4,()=>(this.Jo()&&(this.state=3),Promise.resolve())),this.listener.Po()))}),this.stream.To(e=>{r(()=>this.__(e))}),this.stream.onMessage(e=>{r(()=>this.onMessage(e))})}Yo(){this.state=5,this.jo.qo(async()=>{this.state=0,this.start()})}__(e){return g("PersistentStream",`close with error: ${e}`),this.stream=null,this.close(4,e)}s_(e){return t=>{this.oi.enqueueAndForget(()=>this.Wo===e?t():(g("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class nt extends ne{constructor(e,t,r,n,i,s){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",t,r,n,s),this.serializer=i}a_(e,t){return this.connection.Fo("Listen",e,t)}onMessage(e){this.jo.reset();let t=function(e,t){let r;if("targetChange"in t){var n,i;t.targetChange;let s="NO_CHANGE"===(n=t.targetChange.targetChangeType||"NO_CHANGE")?0:"ADD"===n?1:"REMOVE"===n?2:"CURRENT"===n?3:"RESET"===n?4:_(),a=t.targetChange.targetIds||[],o=(i=t.targetChange.resumeToken,e.useProto3Json?(void 0===i||"string"==typeof i||_(),em.fromBase64String(i||"")):(void 0===i||i instanceof Uint8Array||_(),em.fromUint8Array(i||new Uint8Array))),l=t.targetChange.cause;r=new t6(s,a,o,l&&new T(void 0===l.code?E.UNKNOWN:tJ(l.code),l.message||"")||null)}else if("documentChange"in t){t.documentChange;let n=t.documentChange;n.document,n.document.name,n.document.updateTime;let i=rm(e,n.document.name),s=ru(n.document.updateTime),a=n.document.createTime?ru(n.document.createTime):M.min(),o=new eU({mapValue:{fields:n.document.fields}}),l=eq.newFoundDocument(i,s,a,o);r=new t9(n.targetIds||[],n.removedTargetIds||[],l.key,l)}else if("documentDelete"in t){t.documentDelete;let n=t.documentDelete;n.document;let i=rm(e,n.document),s=n.readTime?ru(n.readTime):M.min(),a=eq.newNoDocument(i,s);r=new t9([],n.removedTargetIds||[],a.key,a)}else if("documentRemove"in t){t.documentRemove;let n=t.documentRemove;n.document;let i=rm(e,n.document);r=new t9([],n.removedTargetIds||[],i,null)}else{if(!("filter"in t))return _();{t.filter;let e=t.filter;e.targetId;let{count:n=0,unchangedNames:i}=e,s=new tY(n,i);r=new t8(e.targetId,s)}}return r}(this.serializer,e),r=function(e){if(!("targetChange"in e))return M.min();let t=e.targetChange;return t.targetIds&&t.targetIds.length?M.min():t.readTime?ru(t.readTime):M.min()}(e);return this.listener.u_(t,r)}c_(e){let t={};t.database=rg(this.serializer),t.addTarget=function(e,t){let r;let n=t.target;if((r=e5(n)?{documents:{documents:[rp(e,n.path)]}}:{query:function(e,t){var r,n;let i;let s={structuredQuery:{}},a=t.path;null!==t.collectionGroup?(i=a,s.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(i=a.popLast(),s.structuredQuery.from=[{collectionId:a.lastSegment()}]),s.parent=rp(e,i);let o=function(e){if(0!==e.length)return function e(t){return t instanceof ej?function(e){if("=="===e.op){if(eO(e.value))return{unaryFilter:{field:rv(e.field),op:"IS_NAN"}};if(eV(e.value))return{unaryFilter:{field:rv(e.field),op:"IS_NULL"}}}else if("!="===e.op){if(eO(e.value))return{unaryFilter:{field:rv(e.field),op:"IS_NOT_NAN"}};if(eV(e.value))return{unaryFilter:{field:rv(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:rv(e.field),op:rn[e.op],value:e.value}}}(t):t instanceof eG?function(t){let r=t.getFilters().map(t=>e(t));return 1===r.length?r[0]:{compositeFilter:{op:ri[t.op],filters:r}}}(t):_()}(eG.create(e,"and"))}(t.filters);o&&(s.structuredQuery.where=o);let l=function(e){if(0!==e.length)return e.map(e=>({field:rv(e.field),direction:rr[e.dir]}))}(t.orderBy);l&&(s.structuredQuery.orderBy=l);let u=ra(e,t.limit);return null!==u&&(s.structuredQuery.limit=u),t.startAt&&(s.structuredQuery.startAt={before:(r=t.startAt).inclusive,values:r.position}),t.endAt&&(s.structuredQuery.endAt={before:!(n=t.endAt).inclusive,values:n.position}),{ut:s,parent:i}}(e,n).ut}).targetId=t.targetId,t.resumeToken.approximateByteSize()>0){r.resumeToken=rl(e,t.resumeToken);let n=ra(e,t.expectedCount);null!==n&&(r.expectedCount=n)}else if(t.snapshotVersion.compareTo(M.min())>0){r.readTime=ro(e,t.snapshotVersion.toTimestamp());let n=ra(e,t.expectedCount);null!==n&&(r.expectedCount=n)}return r}(this.serializer,e);let r=function(e,t){let r=function(e){switch(e){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return _()}}(t.purpose);return null==r?null:{"goog-listen-tags":r}}(this.serializer,e);r&&(t.labels=r),this.t_(t)}l_(e){let t={};t.database=rg(this.serializer),t.removeTarget=e,this.t_(t)}}class nr extends ne{constructor(e,t,r,n,i,s){super(e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",t,r,n,s),this.serializer=i,this.h_=!1}get P_(){return this.h_}start(){this.h_=!1,this.lastStreamToken=void 0,super.start()}i_(){this.h_&&this.I_([])}a_(e,t){return this.connection.Fo("Write",e,t)}onMessage(e){var t,r;if(e.streamToken||_(),this.lastStreamToken=e.streamToken,this.h_){this.jo.reset();let n=(t=e.writeResults,r=e.commitTime,t&&t.length>0?(void 0!==r||_(),t.map(e=>{let t;return(t=e.updateTime?ru(e.updateTime):ru(r)).isEqual(M.min())&&(t=ru(r)),new tL(t,e.transformResults||[])})):[]),i=ru(e.commitTime);return this.listener.T_(i,n)}return e.writeResults&&0!==e.writeResults.length&&_(),this.h_=!0,this.listener.E_()}d_(){let e={};e.database=rg(this.serializer),this.t_(e)}I_(e){let t={streamToken:this.lastStreamToken,writes:e.map(e=>(function(e,t){var r;let n;if(t instanceof tq)n={update:rw(e,t.key,t.value)};else if(t instanceof tQ)n={delete:rf(e,t.key)};else if(t instanceof tB)n={update:rw(e,t.key,t.data),updateMask:function(e){let t=[];return e.fields.forEach(e=>t.push(e.canonicalString())),{fieldPaths:t}}(t.fieldMask)};else{if(!(t instanceof tj))return _();n={verify:rf(e,t.key)}}return t.fieldTransforms.length>0&&(n.updateTransforms=t.fieldTransforms.map(e=>(function(e,t){let r=t.transform;if(r instanceof tC)return{fieldPath:t.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(r instanceof tA)return{fieldPath:t.field.canonicalString(),appendMissingElements:{values:r.elements}};if(r instanceof tD)return{fieldPath:t.field.canonicalString(),removeAllFromArray:{values:r.elements}};if(r instanceof tk)return{fieldPath:t.field.canonicalString(),increment:r.Ie};throw _()})(0,e))),t.precondition.isNone||(n.currentDocument=void 0!==(r=t.precondition).updateTime?{updateTime:ro(e,r.updateTime.toTimestamp())}:void 0!==r.exists?{exists:r.exists}:_()),n})(this.serializer,e))};this.t_(t)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class nn extends class{}{constructor(e,t,r,n){super(),this.authCredentials=e,this.appCheckCredentials=t,this.connection=r,this.serializer=n,this.A_=!1}R_(){if(this.A_)throw new T(E.FAILED_PRECONDITION,"The client has already been terminated.")}So(e,t,r,n){return this.R_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([i,s])=>this.connection.So(e,rc(t,r),n,i,s)).catch(e=>{throw"FirebaseError"===e.name?(e.code===E.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),e):new T(E.UNKNOWN,e.toString())})}vo(e,t,r,n,i){return this.R_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([s,a])=>this.connection.vo(e,rc(t,r),n,s,a,i)).catch(e=>{throw"FirebaseError"===e.name?(e.code===E.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),e):new T(E.UNKNOWN,e.toString())})}terminate(){this.A_=!0,this.connection.terminate()}}class ni{constructor(e,t){this.asyncQueue=e,this.onlineStateHandler=t,this.state="Unknown",this.m_=0,this.f_=null,this.g_=!0}p_(){0===this.m_&&(this.y_("Unknown"),this.f_=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this.f_=null,this.w_("Backend didn't respond within 10 seconds."),this.y_("Offline"),Promise.resolve())))}S_(e){"Online"===this.state?this.y_("Unknown"):(this.m_++,this.m_>=1&&(this.b_(),this.w_(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.y_("Offline")))}set(e){this.b_(),this.m_=0,"Online"===e&&(this.g_=!1),this.y_(e)}y_(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}w_(e){let t=`Could not reach Cloud Firestore backend. ${e} +This 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.g_?(y(t),this.g_=!1):g("OnlineStateTracker",t)}b_(){null!==this.f_&&(this.f_.cancel(),this.f_=null)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ns{constructor(e,t,r,n,i){this.localStore=e,this.datastore=t,this.asyncQueue=r,this.remoteSyncer={},this.D_=[],this.C_=new Map,this.v_=new Set,this.F_=[],this.M_=i,this.M_.io(e=>{r.enqueueAndForget(async()=>{nm(this)&&(g("RemoteStore","Restarting streams for network reachability change."),await async function(e){e.v_.add(4),await no(e),e.x_.set("Unknown"),e.v_.delete(4),await na(e)}(this))})}),this.x_=new ni(r,n)}}async function na(e){if(nm(e))for(let t of e.F_)await t(!0)}async function no(e){for(let t of e.F_)await t(!1)}function nl(e,t){e.C_.has(t.targetId)||(e.C_.set(t.targetId,t),nf(e)?nd(e):nN(e).Jo()&&nh(e,t))}function nu(e,t){let r=nN(e);e.C_.delete(t),r.Jo()&&nc(e,t),0===e.C_.size&&(r.Jo()?r.Xo():nm(e)&&e.x_.set("Unknown"))}function nh(e,t){if(e.O_.Oe(t.targetId),t.resumeToken.approximateByteSize()>0||t.snapshotVersion.compareTo(M.min())>0){let r=e.remoteSyncer.getRemoteKeysForTarget(t.targetId).size;t=t.withExpectedCount(r)}nN(e).c_(t)}function nc(e,t){e.O_.Oe(t),nN(e).l_(t)}function nd(e){e.O_=new t7({getRemoteKeysForTarget:t=>e.remoteSyncer.getRemoteKeysForTarget(t),_t:t=>e.C_.get(t)||null,nt:()=>e.datastore.serializer.databaseId}),nN(e).start(),e.x_.p_()}function nf(e){return nm(e)&&!nN(e).Ho()&&e.C_.size>0}function nm(e){return 0===e.v_.size}async function np(e){e.C_.forEach((t,r)=>{nh(e,t)})}async function ng(e,t){e.O_=void 0,nf(e)?(e.x_.S_(t),nd(e)):e.x_.set("Unknown")}async function ny(e,t,r){if(e.x_.set("Online"),t instanceof t6&&2===t.state&&t.cause)try{await async function(e,t){let r=t.cause;for(let n of t.targetIds)e.C_.has(n)&&(await e.remoteSyncer.rejectListen(n,r),e.C_.delete(n),e.O_.removeTarget(n))}(e,t)}catch(r){g("RemoteStore","Failed to remove targets %s: %s ",t.targetIds.join(","),r),await nw(e,r)}else if(t instanceof t9?e.O_.$e(t):t instanceof t8?e.O_.Je(t):e.O_.Ge(t),!r.isEqual(M.min()))try{let t=await rW(e.localStore);r.compareTo(t)>=0&&await function(e,t){let r=e.O_.it(t);return r.targetChanges.forEach((r,n)=>{if(r.resumeToken.approximateByteSize()>0){let i=e.C_.get(n);i&&e.C_.set(n,i.withResumeToken(r.resumeToken,t))}}),r.targetMismatches.forEach((t,r)=>{let n=e.C_.get(t);if(!n)return;e.C_.set(t,n.withResumeToken(em.EMPTY_BYTE_STRING,n.snapshotVersion)),nc(e,t);let i=new rT(n.target,t,r,n.sequenceNumber);nh(e,i)}),e.remoteSyncer.applyRemoteEvent(r)}(e,r)}catch(t){g("RemoteStore","Failed to raise snapshot:",t),await nw(e,t)}}async function nw(e,t,r){if(!J(t))throw t;e.v_.add(1),await no(e),e.x_.set("Offline"),r||(r=()=>rW(e.localStore)),e.asyncQueue.enqueueRetryable(async()=>{g("RemoteStore","Retrying IndexedDB access"),await r(),e.v_.delete(1),await na(e)})}function nv(e,t){return t().catch(r=>nw(e,r,t))}async function n_(e){let t=nk(e),r=e.D_.length>0?e.D_[e.D_.length-1].batchId:-1;for(;nm(e)&&e.D_.length<10;)try{let n=await function(e,t){return e.persistence.runTransaction("Get next mutation batch","readonly",r=>(void 0===t&&(t=-1),e.mutationQueue.getNextMutationBatchAfterBatchId(r,t)))}(e.localStore,r);if(null===n){0===e.D_.length&&t.Xo();break}r=n.batchId,function(e,t){e.D_.push(t);let r=nk(e);r.Jo()&&r.P_&&r.I_(t.mutations)}(e,n)}catch(t){await nw(e,t)}nE(e)&&nT(e)}function nE(e){return nm(e)&&!nk(e).Ho()&&e.D_.length>0}function nT(e){nk(e).start()}async function nI(e){nk(e).d_()}async function nS(e){let t=nk(e);for(let r of e.D_)t.I_(r.mutations)}async function nC(e,t,r){let n=e.D_.shift(),i=tW.from(n,t,r);await nv(e,()=>e.remoteSyncer.applySuccessfulWrite(i)),await n_(e)}async function nA(e,t){t&&nk(e).P_&&await async function(e,t){var r;if(function(e){switch(e){default:return _();case E.CANCELLED:case E.UNKNOWN:case E.DEADLINE_EXCEEDED:case E.RESOURCE_EXHAUSTED:case E.INTERNAL:case E.UNAVAILABLE:case E.UNAUTHENTICATED:return!1;case E.INVALID_ARGUMENT:case E.NOT_FOUND:case E.ALREADY_EXISTS:case E.PERMISSION_DENIED:case E.FAILED_PRECONDITION:case E.ABORTED:case E.OUT_OF_RANGE:case E.UNIMPLEMENTED:case E.DATA_LOSS:return!0}}(r=t.code)&&r!==E.ABORTED){let r=e.D_.shift();nk(e).Zo(),await nv(e,()=>e.remoteSyncer.rejectFailedWrite(r.batchId,t)),await n_(e)}}(e,t),nE(e)&&nT(e)}async function nb(e,t){e.asyncQueue.verifyOperationInProgress(),g("RemoteStore","RemoteStore received new credentials");let r=nm(e);e.v_.add(3),await no(e),r&&e.x_.set("Unknown"),await e.remoteSyncer.handleCredentialChange(t),e.v_.delete(3),await na(e)}async function nD(e,t){t?(e.v_.delete(2),await na(e)):t||(e.v_.add(2),await no(e),e.x_.set("Unknown"))}function nN(e){var t,r,n;return e.N_||(e.N_=(t=e.datastore,r=e.asyncQueue,n={Po:np.bind(null,e),To:ng.bind(null,e),u_:ny.bind(null,e)},t.R_(),new nt(r,t.connection,t.authCredentials,t.appCheckCredentials,t.serializer,n)),e.F_.push(async t=>{t?(e.N_.Zo(),nf(e)?nd(e):e.x_.set("Unknown")):(await e.N_.stop(),e.O_=void 0)})),e.N_}function nk(e){var t,r,n;return e.B_||(e.B_=(t=e.datastore,r=e.asyncQueue,n={Po:nI.bind(null,e),To:nA.bind(null,e),E_:nS.bind(null,e),T_:nC.bind(null,e)},t.R_(),new nr(r,t.connection,t.authCredentials,t.appCheckCredentials,t.serializer,n)),e.F_.push(async t=>{t?(e.B_.Zo(),await n_(e)):(await e.B_.stop(),e.D_.length>0&&(g("RemoteStore",`Stopping write stream with ${e.D_.length} pending writes`),e.D_=[]))})),e.B_}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class nx{constructor(e,t,r,n,i){this.asyncQueue=e,this.timerId=t,this.targetTimeMs=r,this.op=n,this.removalCallback=i,this.deferred=new I,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(e=>{})}get promise(){return this.deferred.promise}static createAndSchedule(e,t,r,n,i){let s=new nx(e,t,Date.now()+r,n,i);return s.start(r),s}start(e){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new T(E.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>null!==this.timerHandle?(this.clearTimeout(),this.op().then(e=>this.deferred.resolve(e))):Promise.resolve())}clearTimeout(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function nR(e,t){if(y("AsyncQueue",`${t}: ${e}`),J(e))return new T(E.UNAVAILABLE,`${t}: ${e}`);throw e}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class nL{constructor(e){this.comparator=e?(t,r)=>e(t,r)||B.comparator(t.key,r.key):(e,t)=>B.comparator(e.key,t.key),this.keyedMap=tm(),this.sortedSet=new eo(this.comparator)}static emptySet(e){return new nL(e.comparator)}has(e){return null!=this.keyedMap.get(e)}get(e){return this.keyedMap.get(e)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(e){let t=this.keyedMap.get(e);return t?this.sortedSet.indexOf(t):-1}get size(){return this.sortedSet.size}forEach(e){this.sortedSet.inorderTraversal((t,r)=>(e(t),!1))}add(e){let t=this.delete(e.key);return t.copy(t.keyedMap.insert(e.key,e),t.sortedSet.insert(e,null))}delete(e){let t=this.get(e);return t?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(t)):this}isEqual(e){if(!(e instanceof nL)||this.size!==e.size)return!1;let t=this.sortedSet.getIterator(),r=e.sortedSet.getIterator();for(;t.hasNext();){let e=t.getNext().key,n=r.getNext().key;if(!e.isEqual(n))return!1}return!0}toString(){let e=[];return this.forEach(t=>{e.push(t.toString())}),0===e.length?"DocumentSet ()":"DocumentSet (\n "+e.join(" \n")+"\n)"}copy(e,t){let r=new nL;return r.comparator=this.comparator,r.keyedMap=e,r.sortedSet=t,r}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class nV{constructor(){this.L_=new eo(B.comparator)}track(e){let t=e.doc.key,r=this.L_.get(t);r?0!==e.type&&3===r.type?this.L_=this.L_.insert(t,e):3===e.type&&1!==r.type?this.L_=this.L_.insert(t,{type:r.type,doc:e.doc}):2===e.type&&2===r.type?this.L_=this.L_.insert(t,{type:2,doc:e.doc}):2===e.type&&0===r.type?this.L_=this.L_.insert(t,{type:0,doc:e.doc}):1===e.type&&0===r.type?this.L_=this.L_.remove(t):1===e.type&&2===r.type?this.L_=this.L_.insert(t,{type:1,doc:r.doc}):0===e.type&&1===r.type?this.L_=this.L_.insert(t,{type:2,doc:e.doc}):_():this.L_=this.L_.insert(t,e)}k_(){let e=[];return this.L_.inorderTraversal((t,r)=>{e.push(r)}),e}}class nO{constructor(e,t,r,n,i,s,a,o,l){this.query=e,this.docs=t,this.oldDocs=r,this.docChanges=n,this.mutatedKeys=i,this.fromCache=s,this.syncStateChanged=a,this.excludesMetadataChanges=o,this.hasCachedResults=l}static fromInitialDocuments(e,t,r,n,i){let s=[];return t.forEach(e=>{s.push({type:0,doc:e})}),new nO(e,t,nL.emptySet(t),s,r,n,!0,!1,i)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(e){if(!(this.fromCache===e.fromCache&&this.hasCachedResults===e.hasCachedResults&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&ta(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;let t=this.docChanges,r=e.docChanges;if(t.length!==r.length)return!1;for(let e=0;eto(e),ta),this.onlineState="Unknown",this.K_=new Set}}async function nP(e,t){let r=t.query,n=!1,i=e.queries.get(r);if(i||(n=!0,i=new nM),n)try{i.q_=await e.onListen(r)}catch(r){let e=nR(r,`Initialization of query '${tl(t.query)}' failed`);return void t.onError(e)}e.queries.set(r,i),i.Q_.push(t),t.U_(e.onlineState),i.q_&&t.W_(i.q_)&&n$(e)}async function nU(e,t){let r=t.query,n=!1,i=e.queries.get(r);if(i){let e=i.Q_.indexOf(t);e>=0&&(i.Q_.splice(e,1),n=0===i.Q_.length)}if(n)return e.queries.delete(r),e.onUnlisten(r)}function nq(e,t){let r=!1;for(let n of t){let t=n.query,i=e.queries.get(t);if(i){for(let e of i.Q_)e.W_(n)&&(r=!0);i.q_=n}}r&&n$(e)}function nB(e,t,r){let n=e.queries.get(t);if(n)for(let e of n.Q_)e.onError(r);e.queries.delete(t)}function n$(e){e.K_.forEach(e=>{e.next()})}class nz{constructor(e,t,r){this.query=e,this.G_=t,this.z_=!1,this.j_=null,this.onlineState="Unknown",this.options=r||{}}W_(e){if(!this.options.includeMetadataChanges){let t=[];for(let r of e.docChanges)3!==r.type&&t.push(r);e=new nO(e.query,e.docs,e.oldDocs,t,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}let t=!1;return this.z_?this.H_(e)&&(this.G_.next(e),t=!0):this.J_(e,this.onlineState)&&(this.Y_(e),t=!0),this.j_=e,t}onError(e){this.G_.error(e)}U_(e){this.onlineState=e;let t=!1;return this.j_&&!this.z_&&this.J_(this.j_,e)&&(this.Y_(this.j_),t=!0),t}J_(e,t){return!e.fromCache||(!this.options.Z_||!("Offline"!==t))&&(!e.docs.isEmpty()||e.hasCachedResults||"Offline"===t)}H_(e){if(e.docChanges.length>0)return!0;let t=this.j_&&this.j_.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!t)&&!0===this.options.includeMetadataChanges}Y_(e){e=nO.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.z_=!0,this.G_.next(e)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class nK{constructor(e){this.key=e}}class nQ{constructor(e){this.key=e}}class nj{constructor(e,t){this.query=e,this.oa=t,this._a=null,this.hasCachedResults=!1,this.current=!1,this.aa=tv(),this.mutatedKeys=tv(),this.ua=th(e),this.ca=new nL(this.ua)}get la(){return this.oa}ha(e,t){let r=t?t.Pa:new nV,n=t?t.ca:this.ca,i=t?t.mutatedKeys:this.mutatedKeys,s=n,a=!1,o="F"===this.query.limitType&&n.size===this.query.limit?n.last():null,l="L"===this.query.limitType&&n.size===this.query.limit?n.first():null;if(e.inorderTraversal((e,t)=>{let u=n.get(e),h=tu(this.query,t)?t:null,c=!!u&&this.mutatedKeys.has(u.key),d=!!h&&(h.hasLocalMutations||this.mutatedKeys.has(h.key)&&h.hasCommittedMutations),f=!1;u&&h?u.data.isEqual(h.data)?c!==d&&(r.track({type:3,doc:h}),f=!0):this.Ia(u,h)||(r.track({type:2,doc:h}),f=!0,(o&&this.ua(h,o)>0||l&&0>this.ua(h,l))&&(a=!0)):!u&&h?(r.track({type:0,doc:h}),f=!0):u&&!h&&(r.track({type:1,doc:u}),f=!0,(o||l)&&(a=!0)),f&&(h?(s=s.add(h),i=d?i.add(e):i.delete(e)):(s=s.delete(e),i=i.delete(e)))}),null!==this.query.limit)for(;s.size>this.query.limit;){let e="F"===this.query.limitType?s.last():s.first();s=s.delete(e.key),i=i.delete(e.key),r.track({type:1,doc:e})}return{ca:s,Pa:r,Xi:a,mutatedKeys:i}}Ia(e,t){return e.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations}applyChanges(e,t,r,n){let i=this.ca;this.ca=e.ca,this.mutatedKeys=e.mutatedKeys;let s=e.Pa.k_();s.sort((e,t)=>(function(e,t){let r=e=>{switch(e){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return _()}};return r(e)-r(t)})(e.type,t.type)||this.ua(e.doc,t.doc)),this.Ta(r),n=null!=n&&n;let a=t&&!n?this.Ea():[],o=0===this.aa.size&&this.current&&!n?1:0,l=o!==this._a;return(this._a=o,0!==s.length||l)?{snapshot:new nO(this.query,e.ca,i,s,e.mutatedKeys,0===o,l,!1,!!r&&r.resumeToken.approximateByteSize()>0),da:a}:{da:a}}U_(e){return this.current&&"Offline"===e?(this.current=!1,this.applyChanges({ca:this.ca,Pa:new nV,mutatedKeys:this.mutatedKeys,Xi:!1},!1)):{da:[]}}Aa(e){return!this.oa.has(e)&&!!this.ca.has(e)&&!this.ca.get(e).hasLocalMutations}Ta(e){e&&(e.addedDocuments.forEach(e=>this.oa=this.oa.add(e)),e.modifiedDocuments.forEach(e=>{}),e.removedDocuments.forEach(e=>this.oa=this.oa.delete(e)),this.current=e.current)}Ea(){if(!this.current)return[];let e=this.aa;this.aa=tv(),this.ca.forEach(e=>{this.Aa(e.key)&&(this.aa=this.aa.add(e.key))});let t=[];return e.forEach(e=>{this.aa.has(e)||t.push(new nQ(e))}),this.aa.forEach(r=>{e.has(r)||t.push(new nK(r))}),t}Ra(e){this.oa=e.hs,this.aa=tv();let t=this.ha(e.documents);return this.applyChanges(t,!0)}Va(){return nO.fromInitialDocuments(this.query,this.ca,this.mutatedKeys,0===this._a,this.hasCachedResults)}}class nG{constructor(e,t,r){this.query=e,this.targetId=t,this.view=r}}class nW{constructor(e){this.key=e,this.ma=!1}}class nH{constructor(e,t,r,n,i,s){this.localStore=e,this.remoteStore=t,this.eventManager=r,this.sharedClientState=n,this.currentUser=i,this.maxConcurrentLimboResolutions=s,this.fa={},this.ga=new tc(e=>to(e),ta),this.pa=new Map,this.ya=new Set,this.wa=new eo(B.comparator),this.Sa=new Map,this.ba=new rV,this.Da={},this.Ca=new Map,this.va=rD.Bn(),this.onlineState="Unknown",this.Fa=void 0}get isPrimaryClient(){return!0===this.Fa}}async function nY(e,t){var r,n;let i,s;let a=(e.remoteStore.remoteSyncer.applyRemoteEvent=n0.bind(null,e),e.remoteStore.remoteSyncer.getRemoteKeysForTarget=ii.bind(null,e),e.remoteStore.remoteSyncer.rejectListen=n2.bind(null,e),e.fa.u_=nq.bind(null,e.eventManager),e.fa.xa=nB.bind(null,e.eventManager),e),o=a.ga.get(t);if(o)i=o.targetId,a.sharedClientState.addLocalQueryTarget(i),s=o.view.Va();else{let e=await (r=a.localStore,n=tn(t),r.persistence.runTransaction("Allocate target","readwrite",e=>{let t;return r.Qr.getTargetData(e,n).next(i=>i?(t=i,j.resolve(t)):r.Qr.allocateTargetId(e).next(i=>(t=new rT(n,i,"TargetPurposeListen",e.currentSequenceNumber),r.Qr.addTargetData(e,t).next(()=>t))))}).then(e=>{let t=r.ns.get(e.targetId);return(null===t||e.snapshotVersion.compareTo(t.snapshotVersion)>0)&&(r.ns=r.ns.insert(e.targetId,e),r.rs.set(n,e.targetId)),e})),o=a.sharedClientState.addLocalQueryTarget(e.targetId);i=e.targetId,s=await nJ(a,t,i,"current"===o,e.resumeToken),a.isPrimaryClient&&nl(a.remoteStore,e)}return s}async function nJ(e,t,r,n,i){e.Ma=(t,r,n)=>(async function(e,t,r,n){let i=t.view.ha(r);i.Xi&&(i=await rY(e.localStore,t.query,!1).then(({documents:e})=>t.view.ha(e,i)));let s=n&&n.targetChanges.get(t.targetId),a=n&&null!=n.targetMismatches.get(t.targetId),o=t.view.applyChanges(i,e.isPrimaryClient,s,a);return n7(e,t.targetId,o.da),o.snapshot})(e,t,r,n);let s=await rY(e.localStore,t,!0),a=new nj(t,s.hs),o=a.ha(s.documents),l=t3.createSynthesizedTargetChangeForCurrentChange(r,n&&"Offline"!==e.onlineState,i),u=a.applyChanges(o,e.isPrimaryClient,l);n7(e,r,u.da);let h=new nG(t,r,a);return e.ga.set(t,h),e.pa.has(r)?e.pa.get(r).push(t):e.pa.set(r,[t]),u.snapshot}async function nX(e,t){let r=e.ga.get(t),n=e.pa.get(r.targetId);if(n.length>1)return e.pa.set(r.targetId,n.filter(e=>!ta(e,t))),void e.ga.delete(t);e.isPrimaryClient?(e.sharedClientState.removeLocalQueryTarget(r.targetId),e.sharedClientState.isActiveQueryTarget(r.targetId)||await rH(e.localStore,r.targetId,!1).then(()=>{e.sharedClientState.clearQueryState(r.targetId),nu(e.remoteStore,r.targetId),n6(e,r.targetId)}).catch(Q)):(n6(e,r.targetId),await rH(e.localStore,r.targetId,!0))}async function nZ(e,t,r){var n;let i=(e.remoteStore.remoteSyncer.applySuccessfulWrite=n4.bind(null,e),e.remoteStore.remoteSyncer.rejectFailedWrite=n3.bind(null,e),e);try{let e;let s=await function(e,t){let r,n;let i=O.now(),s=t.reduce((e,t)=>e.add(t.key),tv());return e.persistence.runTransaction("Locally write mutations","readwrite",a=>{let o=td,l=tv();return e.os.getEntries(a,s).next(e=>{(o=e).forEach((e,t)=>{t.isValidDocument()||(l=l.add(e))})}).next(()=>e.localDocuments.getOverlayedDocuments(a,o)).next(n=>{r=n;let s=[];for(let e of t){let t=function(e,t){let r=null;for(let n of e.fieldTransforms){let e=t.data.field(n.field),i=tS(n.transform,e||null);null!=i&&(null===r&&(r=eU.empty()),r.set(n.field,i))}return r||null}(e,r.get(e.key).overlayedDocument);null!=t&&s.push(new tB(e.key,t,function e(t){let r=[];return es(t.fields,(t,n)=>{let i=new q([t]);if(eM(n)){let t=e(n.mapValue).fields;if(0===t.length)r.push(i);else for(let e of t)r.push(i.child(e))}else r.push(i)}),new ed(r)}(t.value.mapValue),tV.exists(!0)))}return e.mutationQueue.addMutationBatch(a,i,s,t)}).next(t=>{n=t;let i=t.applyToLocalDocumentSet(r,l);return e.documentOverlayCache.saveOverlays(a,t.batchId,i)})}).then(()=>({batchId:n.batchId,changes:tp(r)}))}(i.localStore,t);i.sharedClientState.addPendingMutation(s.batchId),n=s.batchId,(e=i.Da[i.currentUser.toKey()])||(e=new eo(L)),e=e.insert(n,r),i.Da[i.currentUser.toKey()]=e,await it(i,s.changes),await n_(i.remoteStore)}catch(t){let e=nR(t,"Failed to persist write");r.reject(e)}}async function n0(e,t){try{let r=await function(e,t){let r=t.snapshotVersion,n=e.ns;return e.persistence.runTransaction("Apply remote event","readwrite-primary",i=>{var s;let a,o;let l=e.os.newChangeBuffer({trackRemovals:!0});n=e.ns;let u=[];t.targetChanges.forEach((s,a)=>{var o;let l=n.get(a);if(!l)return;u.push(e.Qr.removeMatchingKeys(i,s.removedDocuments,a).next(()=>e.Qr.addMatchingKeys(i,s.addedDocuments,a)));let h=l.withSequenceNumber(i.currentSequenceNumber);null!==t.targetMismatches.get(a)?h=h.withResumeToken(em.EMPTY_BYTE_STRING,M.min()).withLastLimboFreeSnapshotVersion(M.min()):s.resumeToken.approximateByteSize()>0&&(h=h.withResumeToken(s.resumeToken,r)),n=n.insert(a,h),o=h,(0===l.resumeToken.approximateByteSize()||o.snapshotVersion.toMicroseconds()-l.snapshotVersion.toMicroseconds()>=3e8||s.addedDocuments.size+s.modifiedDocuments.size+s.removedDocuments.size>0)&&u.push(e.Qr.updateTargetData(i,h))});let h=td,c=tv();if(t.documentUpdates.forEach(r=>{t.resolvedLimboDocuments.has(r)&&u.push(e.persistence.referenceDelegate.updateLimboDocument(i,r))}),u.push((s=t.documentUpdates,a=tv(),o=tv(),s.forEach(e=>a=a.add(e)),l.getEntries(i,a).next(e=>{let t=td;return s.forEach((r,n)=>{let i=e.get(r);n.isFoundDocument()!==i.isFoundDocument()&&(o=o.add(r)),n.isNoDocument()&&n.version.isEqual(M.min())?(l.removeEntry(r,n.readTime),t=t.insert(r,n)):!i.isValidDocument()||n.version.compareTo(i.version)>0||0===n.version.compareTo(i.version)&&i.hasPendingWrites?(l.addEntry(n),t=t.insert(r,n)):g("LocalStore","Ignoring outdated watch update for ",r,". Current version:",i.version," Watch version:",n.version)}),{cs:t,ls:o}})).next(e=>{h=e.cs,c=e.ls})),!r.isEqual(M.min())){let t=e.Qr.getLastRemoteSnapshotVersion(i).next(t=>e.Qr.setTargetsMetadata(i,i.currentSequenceNumber,r));u.push(t)}return j.waitFor(u).next(()=>l.apply(i)).next(()=>e.localDocuments.getLocalViewOfDocuments(i,h,c)).next(()=>h)}).then(t=>(e.ns=n,t))}(e.localStore,t);t.targetChanges.forEach((t,r)=>{let n=e.Sa.get(r);n&&(t.addedDocuments.size+t.modifiedDocuments.size+t.removedDocuments.size<=1||_(),t.addedDocuments.size>0?n.ma=!0:t.modifiedDocuments.size>0?n.ma||_():t.removedDocuments.size>0&&(n.ma||_(),n.ma=!1))}),await it(e,r,t)}catch(e){await Q(e)}}function n1(e,t,r){var n;if(e.isPrimaryClient&&0===r||!e.isPrimaryClient&&1===r){let r;let i=[];e.ga.forEach((e,r)=>{let n=r.view.U_(t);n.snapshot&&i.push(n.snapshot)}),(n=e.eventManager).onlineState=t,r=!1,n.queries.forEach((e,n)=>{for(let e of n.Q_)e.U_(t)&&(r=!0)}),r&&n$(n),i.length&&e.fa.u_(i),e.onlineState=t,e.isPrimaryClient&&e.sharedClientState.setOnlineState(t)}}async function n2(e,t,r){e.sharedClientState.updateQueryState(t,"rejected",r);let n=e.Sa.get(t),i=n&&n.key;if(i){let r=new eo(B.comparator);r=r.insert(i,eq.newNoDocument(i,M.min()));let n=tv().add(i),s=new t4(M.min(),new Map,new eo(L),r,n);await n0(e,s),e.wa=e.wa.remove(i),e.Sa.delete(t),ie(e)}else await rH(e.localStore,t,!1).then(()=>n6(e,t,r)).catch(Q)}async function n4(e,t){var r;let n=t.batch.batchId;try{let i=await (r=e.localStore).persistence.runTransaction("Acknowledge batch","readwrite-primary",e=>{let n=t.batch.keys(),i=r.os.newChangeBuffer({trackRemovals:!0});return(function(e,t,r,n){let i=r.batch,s=i.keys(),a=j.resolve();return s.forEach(e=>{a=a.next(()=>n.getEntry(t,e)).next(t=>{let s=r.docVersions.get(e);null!==s||_(),0>t.version.compareTo(s)&&(i.applyToRemoteDocument(t,r),t.isValidDocument()&&(t.setReadTime(r.commitVersion),n.addEntry(t)))})}),a.next(()=>e.mutationQueue.removeMutationBatch(t,i))})(r,e,t,i).next(()=>i.apply(e)).next(()=>r.mutationQueue.performConsistencyCheck(e)).next(()=>r.documentOverlayCache.removeOverlaysForBatchId(e,n,t.batch.batchId)).next(()=>r.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(e,function(e){let t=tv();for(let r=0;r0&&(t=t.add(e.batch.mutations[r].key));return t}(t))).next(()=>r.localDocuments.getDocuments(e,n))});n8(e,n,null),n9(e,n),e.sharedClientState.updateMutationState(n,"acknowledged"),await it(e,i)}catch(e){await Q(e)}}async function n3(e,t,r){var n;try{let i=await (n=e.localStore).persistence.runTransaction("Reject batch","readwrite-primary",e=>{let r;return n.mutationQueue.lookupMutationBatch(e,t).next(t=>(null!==t||_(),r=t.keys(),n.mutationQueue.removeMutationBatch(e,t))).next(()=>n.mutationQueue.performConsistencyCheck(e)).next(()=>n.documentOverlayCache.removeOverlaysForBatchId(e,r,t)).next(()=>n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(e,r)).next(()=>n.localDocuments.getDocuments(e,r))});n8(e,t,r),n9(e,t),e.sharedClientState.updateMutationState(t,"rejected",r),await it(e,i)}catch(e){await Q(e)}}function n9(e,t){(e.Ca.get(t)||[]).forEach(e=>{e.resolve()}),e.Ca.delete(t)}function n8(e,t,r){let n=e.Da[e.currentUser.toKey()];if(n){let i=n.get(t);i&&(r?i.reject(r):i.resolve(),n=n.remove(t)),e.Da[e.currentUser.toKey()]=n}}function n6(e,t,r=null){for(let n of(e.sharedClientState.removeLocalQueryTarget(t),e.pa.get(t)))e.ga.delete(n),r&&e.fa.xa(n,r);e.pa.delete(t),e.isPrimaryClient&&e.ba.Vr(t).forEach(t=>{e.ba.containsKey(t)||n5(e,t)})}function n5(e,t){e.ya.delete(t.path.canonicalString());let r=e.wa.get(t);null!==r&&(nu(e.remoteStore,r),e.wa=e.wa.remove(t),e.Sa.delete(r),ie(e))}function n7(e,t,r){for(let n of r)n instanceof nK?(e.ba.addReference(n.key,t),function(e,t){let r=t.key,n=r.path.canonicalString();e.wa.get(r)||e.ya.has(n)||(g("SyncEngine","New document in limbo: "+r),e.ya.add(n),ie(e))}(e,n)):n instanceof nQ?(g("SyncEngine","Document no longer in limbo: "+n.key),e.ba.removeReference(n.key,t),e.ba.containsKey(n.key)||n5(e,n.key)):_()}function ie(e){for(;e.ya.size>0&&e.wa.size{s.push(e.Ma(o,t,r).then(t=>{if((t||r)&&e.isPrimaryClient&&e.sharedClientState.updateQueryState(o.targetId,(null==t?void 0:t.fromCache)?"not-current":"current"),t){n.push(t);let e=rz.Ki(o.targetId,t);i.push(e)}}))}),await Promise.all(s),e.fa.u_(n),await async function(e,t){try{await e.persistence.runTransaction("notifyLocalViewChanges","readwrite",r=>j.forEach(t,t=>j.forEach(t.qi,n=>e.persistence.referenceDelegate.addReference(r,t.targetId,n)).next(()=>j.forEach(t.Qi,n=>e.persistence.referenceDelegate.removeReference(r,t.targetId,n)))))}catch(e){if(!J(e))throw e;g("LocalStore","Failed to update sequence numbers: "+e)}for(let r of t){let t=r.targetId;if(!r.fromCache){let r=e.ns.get(t),n=r.snapshotVersion,i=r.withLastLimboFreeSnapshotVersion(n);e.ns=e.ns.insert(t,i)}}}(e.localStore,i))}async function ir(e,t){if(!e.currentUser.isEqual(t)){g("SyncEngine","User change. New user:",t.toKey());let r=await rG(e.localStore,t);e.currentUser=t,e.Ca.forEach(e=>{e.forEach(e=>{e.reject(new T(E.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))})}),e.Ca.clear(),e.sharedClientState.handleUserChange(t,r.removedBatchIds,r.addedBatchIds),await it(e,r.us)}}function ii(e,t){let r=e.Sa.get(t);if(r&&r.ma)return tv().add(r.key);{let r=tv(),n=e.pa.get(t);if(!n)return r;for(let t of n){let n=e.ga.get(t);r=r.unionWith(n.view.la)}return r}}class is{constructor(){this.synchronizeTabs=!1}async initialize(e){this.serializer=r5(e.databaseInfo.databaseId),this.sharedClientState=this.createSharedClientState(e),this.persistence=this.createPersistence(e),await this.persistence.start(),this.localStore=this.createLocalStore(e),this.gcScheduler=this.createGarbageCollectionScheduler(e,this.localStore),this.indexBackfillerScheduler=this.createIndexBackfillerScheduler(e,this.localStore)}createGarbageCollectionScheduler(e,t){return null}createIndexBackfillerScheduler(e,t){return null}createLocalStore(e){var t;return t=this.persistence,new rj(t,new rQ,e.initialUser,this.serializer)}createPersistence(e){return new rq(r$.Hr,this.serializer)}createSharedClientState(e){return new rX}async terminate(){var e,t;null===(e=this.gcScheduler)||void 0===e||e.stop(),null===(t=this.indexBackfillerScheduler)||void 0===t||t.stop(),this.sharedClientState.shutdown(),await this.persistence.shutdown()}}class ia{async initialize(e,t){this.localStore||(this.localStore=e.localStore,this.sharedClientState=e.sharedClientState,this.datastore=this.createDatastore(t),this.remoteStore=this.createRemoteStore(t),this.eventManager=this.createEventManager(t),this.syncEngine=this.createSyncEngine(t,!e.synchronizeTabs),this.sharedClientState.onlineStateHandler=e=>n1(this.syncEngine,e,1),this.remoteStore.remoteSyncer.handleCredentialChange=ir.bind(null,this.syncEngine),await nD(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return new nF}createDatastore(e){let t=r5(e.databaseInfo.databaseId),r=new r8(e.databaseInfo);return new nn(e.authCredentials,e.appCheckCredentials,r,t)}createRemoteStore(e){var t;return t=this.localStore,new ns(t,this.datastore,e.asyncQueue,e=>n1(this.syncEngine,e,0),r0.D()?new r0:new rZ)}createSyncEngine(e,t){return function(e,t,r,n,i,s,a){let o=new nH(e,t,r,n,i,s);return a&&(o.Fa=!0),o}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,t)}async terminate(){var e;await async function(e){g("RemoteStore","RemoteStore shutting down."),e.v_.add(5),await no(e),e.M_.shutdown(),e.x_.set("Unknown")}(this.remoteStore),null===(e=this.datastore)||void 0===e||e.terminate()}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *//** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class io{constructor(e){this.observer=e,this.muted=!1}next(e){this.observer.next&&this.Ba(this.observer.next,e)}error(e){this.observer.error?this.Ba(this.observer.error,e):y("Uncaught Error in snapshot listener:",e.toString())}La(){this.muted=!0}Ba(e,t){this.muted||setTimeout(()=>{this.muted||e(t)},0)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class il{constructor(e,t,r,n){this.authCredentials=e,this.appCheckCredentials=t,this.asyncQueue=r,this.databaseInfo=n,this.user=d.UNAUTHENTICATED,this.clientId=R.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this.authCredentials.start(r,async e=>{g("FirestoreClient","Received user=",e.uid),await this.authCredentialListener(e),this.user=e}),this.appCheckCredentials.start(r,e=>(g("FirestoreClient","Received new app check token=",e),this.appCheckCredentialListener(e,this.user)))}get configuration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new T(E.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){this.asyncQueue.enterRestrictedMode();let e=new I;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(async()=>{try{this._onlineComponents&&await this._onlineComponents.terminate(),this._offlineComponents&&await this._offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),e.resolve()}catch(r){let t=nR(r,"Failed to shutdown persistence");e.reject(t)}}),e.promise}}async function iu(e,t){e.asyncQueue.verifyOperationInProgress(),g("FirestoreClient","Initializing OfflineComponentProvider");let r=e.configuration;await t.initialize(r);let n=r.initialUser;e.setCredentialChangeListener(async e=>{n.isEqual(e)||(await rG(t.localStore,e),n=e)}),t.persistence.setDatabaseDeletedListener(()=>e.terminate()),e._offlineComponents=t}async function ih(e,t){e.asyncQueue.verifyOperationInProgress();let r=await ic(e);g("FirestoreClient","Initializing OnlineComponentProvider"),await t.initialize(r,e.configuration),e.setCredentialChangeListener(e=>nb(t.remoteStore,e)),e.setAppCheckTokenChangeListener((e,r)=>nb(t.remoteStore,r)),e._onlineComponents=t}async function ic(e){if(!e._offlineComponents){if(e._uninitializedComponentsProvider){g("FirestoreClient","Using user provided OfflineComponentProvider");try{await iu(e,e._uninitializedComponentsProvider._offline)}catch(t){if(!("FirebaseError"===t.name?t.code===E.FAILED_PRECONDITION||t.code===E.UNIMPLEMENTED:!("undefined"!=typeof DOMException&&t instanceof DOMException)||22===t.code||20===t.code||11===t.code))throw t;w("Error using user provided cache. Falling back to memory cache: "+t),await iu(e,new is)}}else g("FirestoreClient","Using default OfflineComponentProvider"),await iu(e,new is)}return e._offlineComponents}async function id(e){return e._onlineComponents||(e._uninitializedComponentsProvider?(g("FirestoreClient","Using user provided OnlineComponentProvider"),await ih(e,e._uninitializedComponentsProvider._online)):(g("FirestoreClient","Using default OnlineComponentProvider"),await ih(e,new ia))),e._onlineComponents}async function im(e){let t=await id(e),r=t.eventManager;return r.onListen=nY.bind(null,t.syncEngine),r.onUnlisten=nX.bind(null,t.syncEngine),r}/** + * @license + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function ip(e){let t={};return void 0!==e.timeoutSeconds&&(t.timeoutSeconds=e.timeoutSeconds),t}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let ig=new Map;/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function iy(e,t,r){if(!r)throw new T(E.INVALID_ARGUMENT,`Function ${e}() cannot be called with an empty ${t}.`)}function iw(e){if(!B.isDocumentKey(e))throw new T(E.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${e} has ${e.length}.`)}function iv(e){if(B.isDocumentKey(e))throw new T(E.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${e} has ${e.length}.`)}function i_(e){if(void 0===e)return"undefined";if(null===e)return"null";if("string"==typeof e)return e.length>20&&(e=`${e.substring(0,20)}...`),JSON.stringify(e);if("number"==typeof e||"boolean"==typeof e)return""+e;if("object"==typeof e){if(e instanceof Array)return"an array";{var t;let r=(t=e).constructor?t.constructor.name:null;return r?`a custom ${r} object`:"an object"}}return"function"==typeof e?"a function":_()}function iE(e,t){if("_delegate"in e&&(e=e._delegate),!(e instanceof t)){if(t.name===e.constructor.name)throw new T(E.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{let r=i_(e);throw new T(E.INVALID_ARGUMENT,`Expected type '${t.name}', but it was: ${r}`)}}return e}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class iT{constructor(e){var t,r;if(void 0===e.host){if(void 0!==e.ssl)throw new T(E.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=e.host,this.ssl=null===(t=e.ssl)||void 0===t||t;if(this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,this.localCache=e.localCache,void 0===e.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==e.cacheSizeBytes&&e.cacheSizeBytes<1048576)throw new T(E.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}(function(e,t,r,n){if(!0===t&&!0===n)throw new T(E.INVALID_ARGUMENT,`${e} and ${r} cannot be used together.`)})("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalForceLongPolling?this.experimentalAutoDetectLongPolling=!1:void 0===e.experimentalAutoDetectLongPolling?this.experimentalAutoDetectLongPolling=!0:this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,this.experimentalLongPollingOptions=ip(null!==(r=e.experimentalLongPollingOptions)&&void 0!==r?r:{}),function(e){if(void 0!==e.timeoutSeconds){if(isNaN(e.timeoutSeconds))throw new T(E.INVALID_ARGUMENT,`invalid long polling timeout: ${e.timeoutSeconds} (must not be NaN)`);if(e.timeoutSeconds<5)throw new T(E.INVALID_ARGUMENT,`invalid long polling timeout: ${e.timeoutSeconds} (minimum allowed value is 5)`);if(e.timeoutSeconds>30)throw new T(E.INVALID_ARGUMENT,`invalid long polling timeout: ${e.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!e.useFetchStreams}isEqual(e){var t,r;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&&(t=this.experimentalLongPollingOptions,r=e.experimentalLongPollingOptions,t.timeoutSeconds===r.timeoutSeconds)&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}class iI{constructor(e,t,r,n){this._authCredentials=e,this._appCheckCredentials=t,this._databaseId=r,this._app=n,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new iT({}),this._settingsFrozen=!1}get app(){if(!this._app)throw new T(E.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return void 0!==this._terminateTask}_setSettings(e){if(this._settingsFrozen)throw new T(E.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 iT(e),void 0!==e.credentials&&(this._authCredentials=function(e){if(!e)return new C;switch(e.type){case"firstParty":return new N(e.sessionIndex||"0",e.iamToken||null,e.authTokenFactory||null);case"provider":return e.client;default:throw new T(E.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(e.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(e){let t=ig.get(e);t&&(g("ComponentProvider","Removing Datastore"),ig.delete(e),t.terminate())}(this),Promise.resolve()}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class iS{constructor(e,t,r){this.converter=t,this._query=r,this.type="query",this.firestore=e}withConverter(e){return new iS(this.firestore,e,this._query)}}class iC{constructor(e,t,r){this.converter=t,this._key=r,this.type="document",this.firestore=e}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new iA(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new iC(this.firestore,e,this._key)}}class iA extends iS{constructor(e,t,r){super(e,t,new e7(r)),this._path=r,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){let e=this._path.popLast();return e.isEmpty()?null:new iC(this.firestore,null,new B(e))}withConverter(e){return new iA(this.firestore,e,this._path)}}function ib(e,t,...r){if(e=(0,l.m9)(e),iy("collection","path",t),e instanceof iI){let n=P.fromString(t,...r);return iv(n),new iA(e,null,n)}{if(!(e instanceof iC||e instanceof iA))throw new T(E.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");let n=e._path.child(P.fromString(t,...r));return iv(n),new iA(e.firestore,null,n)}}function iD(e,t,...r){if(e=(0,l.m9)(e),1==arguments.length&&(t=R.newId()),iy("doc","path",t),e instanceof iI){let n=P.fromString(t,...r);return iw(n),new iC(e,null,new B(n))}{if(!(e instanceof iC||e instanceof iA))throw new T(E.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");let n=e._path.child(P.fromString(t,...r));return iw(n),new iC(e.firestore,e instanceof iA?e.converter:null,new B(n))}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class iN{constructor(){this.Xa=Promise.resolve(),this.eu=[],this.tu=!1,this.nu=[],this.ru=null,this.iu=!1,this.su=!1,this.ou=[],this.jo=new r7(this,"async_queue_retry"),this._u=()=>{let e=r6();e&&g("AsyncQueue","Visibility state changed to "+e.visibilityState),this.jo.Ko()};let e=r6();e&&"function"==typeof e.addEventListener&&e.addEventListener("visibilitychange",this._u)}get isShuttingDown(){return this.tu}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.au(),this.uu(e)}enterRestrictedMode(e){if(!this.tu){this.tu=!0,this.su=e||!1;let t=r6();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this._u)}}enqueue(e){if(this.au(),this.tu)return new Promise(()=>{});let t=new I;return this.uu(()=>this.tu&&this.su?Promise.resolve():(e().then(t.resolve,t.reject),t.promise)).then(()=>t.promise)}enqueueRetryable(e){this.enqueueAndForget(()=>(this.eu.push(e),this.cu()))}async cu(){if(0!==this.eu.length){try{await this.eu[0](),this.eu.shift(),this.jo.reset()}catch(e){if(!J(e))throw e;g("AsyncQueue","Operation failed with retryable error: "+e)}this.eu.length>0&&this.jo.qo(()=>this.cu())}}uu(e){let t=this.Xa.then(()=>(this.iu=!0,e().catch(e=>{let t;throw this.ru=e,this.iu=!1,y("INTERNAL UNHANDLED ERROR: ",(t=e.message||"",e.stack&&(t=e.stack.includes(e.message)?e.stack:e.message+"\n"+e.stack),t)),e}).then(e=>(this.iu=!1,e))));return this.Xa=t,t}enqueueAfterDelay(e,t,r){this.au(),this.ou.indexOf(e)>-1&&(t=0);let n=nx.createAndSchedule(this,e,t,r,e=>this.lu(e));return this.nu.push(n),n}au(){this.ru&&_()}verifyOperationInProgress(){}async hu(){let e;do e=this.Xa,await e;while(e!==this.Xa)}Pu(e){for(let t of this.nu)if(t.timerId===e)return!0;return!1}Iu(e){return this.hu().then(()=>{for(let t of(this.nu.sort((e,t)=>e.targetTimeMs-t.targetTimeMs),this.nu))if(t.skipDelay(),"all"!==e&&t.timerId===e)break;return this.hu()})}Tu(e){this.ou.push(e)}lu(e){let t=this.nu.indexOf(e);this.nu.splice(t,1)}}class ik extends iI{constructor(e,t,r,n){super(e,t,r,n),this.type="firestore",this._queue=new iN,this._persistenceKey=(null==n?void 0:n.name)||"[DEFAULT]"}_terminate(){return this._firestoreClient||iL(this),this._firestoreClient.terminate()}}function ix(e,t){let r="object"==typeof e?e:(0,s.Mq)(),n=(0,s.qX)(r,"firestore").getImmediate({identifier:"string"==typeof e?e:t||"(default)"});if(!n._initialized){let e=(0,l.P0)("firestore");e&&function(e,t,r,n={}){var i;let s=(e=iE(e,iI))._getSettings(),a=`${t}:${r}`;if("firestore.googleapis.com"!==s.host&&s.host!==a&&w("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used."),e._setSettings(Object.assign(Object.assign({},s),{host:a,ssl:!1})),n.mockUserToken){let t,r;if("string"==typeof n.mockUserToken)t=n.mockUserToken,r=d.MOCK_USER;else{t=(0,l.Sg)(n.mockUserToken,null===(i=e._app)||void 0===i?void 0:i.options.projectId);let s=n.mockUserToken.sub||n.mockUserToken.user_id;if(!s)throw new T(E.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");r=new d(s)}e._authCredentials=new A(new S(t,r))}}(n,...e)}return n}function iR(e){return e._firestoreClient||iL(e),e._firestoreClient.verifyNotTerminated(),e._firestoreClient}function iL(e){var t,r,n,i;let s=e._freezeSettings(),a=(i=e._databaseId,new eT(i,(null===(t=e._app)||void 0===t?void 0:t.options.appId)||"",e._persistenceKey,s.host,s.ssl,s.experimentalForceLongPolling,s.experimentalAutoDetectLongPolling,ip(s.experimentalLongPollingOptions),s.useFetchStreams));e._firestoreClient=new il(e._authCredentials,e._appCheckCredentials,e._queue,a),(null===(r=s.localCache)||void 0===r?void 0:r._offlineComponentProvider)&&(null===(n=s.localCache)||void 0===n?void 0:n._onlineComponentProvider)&&(e._firestoreClient._uninitializedComponentsProvider={_offlineKind:s.localCache.kind,_offline:s.localCache._offlineComponentProvider,_online:s.localCache._onlineComponentProvider})}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class iV{constructor(e){this._byteString=e}static fromBase64String(e){try{return new iV(em.fromBase64String(e))}catch(e){throw new T(E.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+e)}}static fromUint8Array(e){return new iV(em.fromUint8Array(e))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(e){return this._byteString.isEqual(e._byteString)}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class iO{constructor(...e){for(let t=0;t90)throw new T(E.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(t)||t<-180||t>180)throw new T(E.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+t);this._lat=e,this._long=t}get latitude(){return this._lat}get longitude(){return this._long}isEqual(e){return this._lat===e._lat&&this._long===e._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(e){return L(this._lat,e._lat)||L(this._long,e._long)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let iU=/^__.*__$/;class iq{constructor(e,t,r){this.data=e,this.fieldMask=t,this.fieldTransforms=r}toMutation(e,t){return null!==this.fieldMask?new tB(e,this.data,this.fieldMask,t,this.fieldTransforms):new tq(e,this.data,t,this.fieldTransforms)}}class iB{constructor(e,t,r){this.data=e,this.fieldMask=t,this.fieldTransforms=r}toMutation(e,t){return new tB(e,this.data,this.fieldMask,t,this.fieldTransforms)}}function i$(e){switch(e){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw _()}}class iz{constructor(e,t,r,n,i,s){this.settings=e,this.databaseId=t,this.serializer=r,this.ignoreUndefinedProperties=n,void 0===i&&this.Eu(),this.fieldTransforms=i||[],this.fieldMask=s||[]}get path(){return this.settings.path}get du(){return this.settings.du}Au(e){return new iz(Object.assign(Object.assign({},this.settings),e),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}Ru(e){var t;let r=null===(t=this.path)||void 0===t?void 0:t.child(e),n=this.Au({path:r,Vu:!1});return n.mu(e),n}fu(e){var t;let r=null===(t=this.path)||void 0===t?void 0:t.child(e),n=this.Au({path:r,Vu:!1});return n.Eu(),n}gu(e){return this.Au({path:void 0,Vu:!0})}pu(e){return i0(e,this.settings.methodName,this.settings.yu||!1,this.path,this.settings.wu)}contains(e){return void 0!==this.fieldMask.find(t=>e.isPrefixOf(t))||void 0!==this.fieldTransforms.find(t=>e.isPrefixOf(t.field))}Eu(){if(this.path)for(let e=0;e=Number.MIN_SAFE_INTEGER?tT(n):tE(r,n)}if("boolean"==typeof e)return{booleanValue:e};if("string"==typeof e)return{stringValue:e};if(e instanceof Date){let r=O.fromDate(e);return{timestampValue:ro(t.serializer,r)}}if(e instanceof O){let r=new O(e.seconds,1e3*Math.floor(e.nanoseconds/1e3));return{timestampValue:ro(t.serializer,r)}}if(e instanceof iP)return{geoPointValue:{latitude:e.latitude,longitude:e.longitude}};if(e instanceof iV)return{bytesValue:rl(t.serializer,e._byteString)};if(e instanceof iC){let r=t.databaseId,n=e.firestore._databaseId;if(!n.isEqual(r))throw t.pu(`Document reference is for database ${n.projectId}/${n.database} but should be for database ${r.projectId}/${r.database}`);return{referenceValue:rh(e.firestore._databaseId||t.databaseId,e._key.path)}}throw t.pu(`Unsupported field value: ${i_(e)}`)}(e,t)}function iW(e,t){let r={};return ea(e)?t.path&&t.path.length>0&&t.fieldMask.push(t.path):es(e,(e,n)=>{let i=iG(n,t.Ru(e));null!=i&&(r[e]=i)}),{mapValue:{fields:r}}}function iH(e){return!("object"!=typeof e||null===e||e instanceof Array||e instanceof Date||e instanceof O||e instanceof iP||e instanceof iV||e instanceof iC||e instanceof iF)}function iY(e,t,r){if(!iH(r)||!("object"==typeof r&&null!==r&&(Object.getPrototypeOf(r)===Object.prototype||null===Object.getPrototypeOf(r)))){let n=i_(r);throw"an object"===n?t.pu(e+" a custom object"):t.pu(e+" "+n)}}function iJ(e,t,r){if((t=(0,l.m9)(t))instanceof iO)return t._internalPath;if("string"==typeof t)return iZ(e,t);throw i0("Field path arguments must be of type string or ",e,!1,void 0,r)}let iX=RegExp("[~\\*/\\[\\]]");function iZ(e,t,r){if(t.search(iX)>=0)throw i0(`Invalid field path (${t}). Paths must not contain '~', '*', '/', '[', or ']'`,e,!1,void 0,r);try{return new iO(...t.split("."))._internalPath}catch(n){throw i0(`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,e,!1,void 0,r)}}function i0(e,t,r,n,i){let s=n&&!n.isEmpty(),a=void 0!==i,o=`Function ${t}() called with invalid data`;r&&(o+=" (via `toFirestore()`)"),o+=". ";let l="";return(s||a)&&(l+=" (found",s&&(l+=` in field ${n}`),a&&(l+=` in document ${i}`),l+=")"),new T(E.INVALID_ARGUMENT,o+e+l)}function i1(e,t){return e.some(e=>e.isEqual(t))}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class i2{constructor(e,t,r,n,i){this._firestore=e,this._userDataWriter=t,this._key=r,this._document=n,this._converter=i}get id(){return this._key.path.lastSegment()}get ref(){return new iC(this._firestore,this._converter,this._key)}exists(){return null!==this._document}data(){if(this._document){if(this._converter){let e=new i4(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}get(e){if(this._document){let t=this._document.data.field(i3("DocumentSnapshot.get",e));if(null!==t)return this._userDataWriter.convertValue(t)}}}class i4 extends i2{data(){return super.data()}}function i3(e,t){return"string"==typeof t?iZ(e,t):t instanceof iO?t._internalPath:t._delegate._internalPath}class i9{}class i8 extends i9{}function i6(e,t,...r){let n=[];for(let i of(t instanceof i9&&n.push(t),function(e){let t=e.filter(e=>e instanceof se).length,r=e.filter(e=>e instanceof i5).length;if(t>1||t>0&&r>0)throw new T(E.INVALID_ARGUMENT,"InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.")}(n=n.concat(r)),n))e=i._apply(e);return e}class i5 extends i8{constructor(e,t,r){super(),this._field=e,this._op=t,this._value=r,this.type="where"}static _create(e,t,r){return new i5(e,t,r)}_apply(e){let t=this._parse(e);return sn(e._query,t),new iS(e.firestore,e.converter,ti(e._query,t))}_parse(e){let t=iQ(e.firestore);return function(e,t,r,n,i,s,a){let o;if(i.isKeyField()){if("array-contains"===s||"array-contains-any"===s)throw new T(E.INVALID_ARGUMENT,`Invalid Query. You can't perform '${s}' queries on documentId().`);if("in"===s||"not-in"===s){sr(a,s);let t=[];for(let r of a)t.push(st(n,e,r));o={arrayValue:{values:t}}}else o=st(n,e,a)}else"in"!==s&&"not-in"!==s&&"array-contains-any"!==s||sr(a,s),o=function(e,t,r,n=!1){return iG(r,e.Su(n?4:3,t))}(r,t,a,"in"===s||"not-in"===s);return ej.create(i,s,o)}(e._query,"where",t,e.firestore._databaseId,this._field,this._op,this._value)}}function i7(e,t,r){let n=i3("where",e);return i5._create(n,t,r)}class se extends i9{constructor(e,t){super(),this.type=e,this._queryConstraints=t}static _create(e,t){return new se(e,t)}_parse(e){let t=this._queryConstraints.map(t=>t._parse(e)).filter(e=>e.getFilters().length>0);return 1===t.length?t[0]:eG.create(t,this._getOperator())}_apply(e){let t=this._parse(e);return 0===t.getFilters().length?e:(function(e,t){let r=e;for(let e of t.getFlattenedFilters())sn(r,e),r=ti(r,e)}(e._query,t),new iS(e.firestore,e.converter,ti(e._query,t)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return"and"===this.type?"and":"or"}}function st(e,t,r){if("string"==typeof(r=(0,l.m9)(r))){if(""===r)throw new T(E.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!tt(t)&&-1!==r.indexOf("/"))throw new T(E.INVALID_ARGUMENT,`Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${r}' contains a '/' character.`);let n=t.path.child(P.fromString(r));if(!B.isDocumentKey(n))throw new T(E.INVALID_ARGUMENT,`Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${n}' is not because it has an odd number of segments (${n.length}).`);return ex(e,new B(n))}if(r instanceof iC)return ex(e,r._key);throw new T(E.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${i_(r)}.`)}function sr(e,t){if(!Array.isArray(e)||0===e.length)throw new T(E.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${t.toString()}' filters.`)}function sn(e,t){let r=function(e,t){for(let r of e)for(let e of r.getFlattenedFilters())if(t.indexOf(e.op)>=0)return e.op;return null}(e.filters,function(e){switch(e){case"!=":return["!=","not-in"];case"array-contains-any":case"in":return["not-in"];case"not-in":return["array-contains-any","in","not-in","!="];default:return[]}}(t.op));if(null!==r)throw r===t.op?new T(E.INVALID_ARGUMENT,`Invalid query. You cannot use more than one '${t.op.toString()}' filter.`):new T(E.INVALID_ARGUMENT,`Invalid query. You cannot use '${t.op.toString()}' filters with '${r.toString()}' filters.`)}class si{convertValue(e,t="none"){switch(eC(e)){case 0:return null;case 1:return e.booleanValue;case 2:return ey(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(ew(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 _()}}convertObject(e,t){return this.convertObjectMap(e.fields,t)}convertObjectMap(e,t="none"){let r={};return es(e,(e,n)=>{r[e]=this.convertValue(n,t)}),r}convertGeoPoint(e){return new iP(ey(e.latitude),ey(e.longitude))}convertArray(e,t){return(e.values||[]).map(e=>this.convertValue(e,t))}convertServerTimestamp(e,t){switch(t){case"previous":let r=e_(e);return null==r?null:this.convertValue(r,t);case"estimate":return this.convertTimestamp(eE(e));default:return null}}convertTimestamp(e){let t=eg(e);return new O(t.seconds,t.nanos)}convertDocumentKey(e,t){let r=P.fromString(e);rE(r)||_();let n=new eI(r.get(1),r.get(3)),i=new B(r.popFirst(5));return n.isEqual(t)||y(`Document ${i} contains a document reference within a different database (${n.projectId}/${n.database}) which is not supported. It will be treated as a reference in the current database (${t.projectId}/${t.database}) instead.`),i}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ss{constructor(e,t){this.hasPendingWrites=e,this.fromCache=t}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class sa extends i2{constructor(e,t,r,n,i,s){super(e,t,r,n,s),this._firestore=e,this._firestoreImpl=e,this.metadata=i}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){let t=new so(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)}}get(e,t={}){if(this._document){let r=this._document.data.field(i3("DocumentSnapshot.get",e));if(null!==r)return this._userDataWriter.convertValue(r,t.serverTimestamps)}}}class so extends sa{data(e={}){return super.data(e)}}class sl{constructor(e,t,r,n){this._firestore=e,this._userDataWriter=t,this._snapshot=n,this.metadata=new ss(n.hasPendingWrites,n.fromCache),this.query=r}get docs(){let e=[];return this.forEach(t=>e.push(t)),e}get size(){return this._snapshot.docs.size}get empty(){return 0===this.size}forEach(e,t){this._snapshot.docs.forEach(r=>{e.call(t,new so(this._firestore,this._userDataWriter,r.key,r,new ss(this._snapshot.mutatedKeys.has(r.key),this._snapshot.fromCache),this.query.converter))})}docChanges(e={}){let t=!!e.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new T(E.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()){let t=0;return e._snapshot.docChanges.map(r=>{let n=new so(e._firestore,e._userDataWriter,r.doc.key,r.doc,new ss(e._snapshot.mutatedKeys.has(r.doc.key),e._snapshot.fromCache),e.query.converter);return r.doc,{type:"added",doc:n,oldIndex:-1,newIndex:t++}})}{let r=e._snapshot.oldDocs;return e._snapshot.docChanges.filter(e=>t||3!==e.type).map(t=>{let n=new so(e._firestore,e._userDataWriter,t.doc.key,t.doc,new ss(e._snapshot.mutatedKeys.has(t.doc.key),e._snapshot.fromCache),e.query.converter),i=-1,s=-1;return 0!==t.type&&(i=r.indexOf(t.doc.key),r=r.delete(t.doc.key)),1!==t.type&&(s=(r=r.add(t.doc)).indexOf(t.doc.key)),{type:function(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return _()}}(t.type),doc:n,oldIndex:i,newIndex:s}})}}(this,t),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function su(e){e=iE(e,iC);let t=iE(e.firestore,ik);return(function(e,t,r={}){let n=new I;return e.asyncQueue.enqueueAndForget(async()=>(function(e,t,r,n,i){let s=new io({next:s=>{t.enqueueAndForget(()=>nU(e,a));let o=s.docs.has(r);!o&&s.fromCache?i.reject(new T(E.UNAVAILABLE,"Failed to get document because the client is offline.")):o&&s.fromCache&&n&&"server"===n.source?i.reject(new T(E.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(s)},error:e=>i.reject(e)}),a=new nz(new e7(r.path),s,{includeMetadataChanges:!0,Z_:!0});return nP(e,a)})(await im(e),e.asyncQueue,t,r,n)),n.promise})(iR(t),e._key).then(r=>(function(e,t,r){let n=r.docs.get(t._key),i=new sh(e);return new sa(e,i,t._key,n,new ss(r.hasPendingWrites,r.fromCache),t.converter)})(t,e,r))}class sh extends si{constructor(e){super(),this.firestore=e}convertBytes(e){return new iV(e)}convertReference(e){let t=this.convertDocumentKey(e,this.firestore._databaseId);return new iC(this.firestore,null,t)}}function sc(e){e=iE(e,iS);let t=iE(e.firestore,ik),r=iR(t),n=new sh(t);return(/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function(e){if("L"===e.limitType&&0===e.explicitOrderBy.length)throw new T(E.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}(e._query),(function(e,t,r={}){let n=new I;return e.asyncQueue.enqueueAndForget(async()=>(function(e,t,r,n,i){let s=new nz(r,new io({next:r=>{t.enqueueAndForget(()=>nU(e,s)),r.fromCache&&"server"===n.source?i.reject(new T(E.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(r)},error:e=>i.reject(e)}),{includeMetadataChanges:!0,Z_:!0});return nP(e,s)})(await im(e),e.asyncQueue,t,r,n)),n.promise})(r,e._query).then(r=>new sl(t,n,e,r)))}function sd(e,t,r,...n){e=iE(e,iC);let i=iE(e.firestore,ik),s=iQ(i);return sp(i,[("string"==typeof(t=(0,l.m9)(t))||t instanceof iO?function(e,t,r,n,i,s){let a=e.Su(1,t,r),o=[iJ(t,n,r)],u=[i];if(s.length%2!=0)throw new T(E.INVALID_ARGUMENT,`Function ${t}() needs to be called with an even number of arguments that alternate between field names and values.`);for(let e=0;e=0;--e)if(!i1(h,o[e])){let t=o[e],r=u[e];r=(0,l.m9)(r);let n=a.fu(t);if(r instanceof ij)h.push(t);else{let e=iG(r,n);null!=e&&(h.push(t),c.set(t,e))}}return new iB(c,new ed(h),a.fieldTransforms)}(s,"updateDoc",e._key,t,r,n):function(e,t,r,n){let i=e.Su(1,t,r);iY("Data must be an object, but it was:",i,n);let s=[],a=eU.empty();return es(n,(e,n)=>{let o=iZ(t,e,r);n=(0,l.m9)(n);let u=i.fu(o);if(n instanceof ij)s.push(o);else{let e=iG(n,u);null!=e&&(s.push(o),a.set(o,e))}}),new iB(a,new ed(s),i.fieldTransforms)}(s,"updateDoc",e._key,t)).toMutation(e._key,tV.exists(!0))])}function sf(e){return sp(iE(e.firestore,ik),[new tQ(e._key,tV.none())])}function sm(e,t){var r,n;let i=iE(e.firestore,ik),s=iD(e),a=(r=e.converter)?n&&(n.merge||n.mergeFields)?r.toFirestore(t,n):r.toFirestore(t):t;return sp(i,[(function(e,t,r,n,i,s={}){let a,o;let l=e.Su(s.merge||s.mergeFields?2:0,t,r,i);iY("Data must be an object, but it was:",l,n);let u=iW(n,l);if(s.merge)a=new ed(l.fieldMask),o=l.fieldTransforms;else if(s.mergeFields){let e=[];for(let n of s.mergeFields){let i=iJ(t,n,r);if(!l.contains(i))throw new T(E.INVALID_ARGUMENT,`Field '${i}' is specified in your field mask but missing from your input data.`);i1(e,i)||e.push(i)}a=new ed(e),o=l.fieldTransforms.filter(e=>a.covers(e.field))}else a=null,o=l.fieldTransforms;return new iq(new eU(u),a,o)})(iQ(e.firestore),"addDoc",s._key,a,null!==e.converter,{}).toMutation(s._key,tV.exists(!1))]).then(()=>s)}function sp(e,t){return function(e,t){let r=new I;return e.asyncQueue.enqueueAndForget(async()=>nZ(await id(e).then(e=>e.syncEngine),t,r)),r.promise}(iR(e),t)}new WeakMap,function(e=!0){f=s.Jn,(0,s.Xd)(new a.wA("firestore",(t,{instanceIdentifier:r,options:n})=>{let i=t.getProvider("app").getImmediate(),s=new ik(new b(t.getProvider("auth-internal")),new x(t.getProvider("app-check-internal")),function(e,t){if(!Object.prototype.hasOwnProperty.apply(e.options,["projectId"]))throw new T(E.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new eI(e.options.projectId,t)}(i,r),i);return n=Object.assign({useFetchStreams:e},n),s._setSettings(n),s},"PUBLIC").setMultipleInstances(!0)),(0,s.KN)(c,"4.4.2",void 0),(0,s.KN)(c,"4.4.2","esm2017")}()}}]); \ No newline at end of file diff --git a/out/_next/static/chunks/746-c0558fbaf6b4ebbd.js b/out/_next/static/chunks/746-c0558fbaf6b4ebbd.js new file mode 100644 index 0000000..d6f0ae2 --- /dev/null +++ b/out/_next/static/chunks/746-c0558fbaf6b4ebbd.js @@ -0,0 +1,16 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[746],{8417:function(e,t,n){"use strict";n.d(t,{Z:function(){return W}});var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t;this._insertTag(((t=document.createElement("style")).setAttribute("data-emotion",this.key),void 0!==this.nonce&&t.setAttribute("nonce",this.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t))}var n=this.tags[this.tags.length-1];if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t0?g[k]+" "+w:s(w,/&\f/g,g[k])).trim())&&(f[x++]=S);return v(e,t,n,0===i?E:c,f,d,m)}function z(e,t,n,r){return v(e,t,n,M,u(e,0,r),u(e,r+1,-1),r)}var $=function(e,t,n){for(var r=0,a=0;r=a,a=w(),38===r&&12===a&&(t[n]=1),!S(a);)k();return u(b,e,h)},Z=function(e,t){var n=-1,r=44;do switch(S(r)){case 0:38===r&&12===w()&&(t[n]=1),e[n]+=$(h-1,t,n);break;case 2:e[n]+=A(r);break;case 4:if(44===r){e[++n]=58===w()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=i(r)}while(r=k());return e},L=function(e,t){var n;return n=Z(O(e),t),b="",n},F=new WeakMap,D=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||F.get(n))&&!r){F.set(e,!0);for(var a=[],i=L(t,a),o=n.props,s=0,l=0;s-1&&!e.return)switch(e.type){case M:e.return=function e(t,n){switch(45^c(t,0)?(((n<<2^c(t,0))<<2^c(t,1))<<2^c(t,2))<<2^c(t,3):0){case 5103:return C+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return C+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return C+t+j+t+P+t+t;case 6828:case 4268:return C+t+P+t+t;case 6165:return C+t+P+"flex-"+t+t;case 5187:return C+t+s(t,/(\w+).+(:[^]+)/,C+"box-$1$2"+P+"flex-$1$2")+t;case 5443:return C+t+P+"flex-item-"+s(t,/flex-|-self/,"")+t;case 4675:return C+t+P+"flex-line-pack"+s(t,/align-content|flex-|-self/,"")+t;case 5548:return C+t+P+s(t,"shrink","negative")+t;case 5292:return C+t+P+s(t,"basis","preferred-size")+t;case 6060:return C+"box-"+s(t,"-grow","")+C+t+P+s(t,"grow","positive")+t;case 4554:return C+s(t,/([^-])(transform)/g,"$1"+C+"$2")+t;case 6187:return s(s(s(t,/(zoom-|grab)/,C+"$1"),/(image-set)/,C+"$1"),t,"")+t;case 5495:case 3959:return s(t,/(image-set\([^]*)/,C+"$1$`$1");case 4968:return s(s(t,/(.+:)(flex-)?(.*)/,C+"box-pack:$3"+P+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+C+t+t;case 4095:case 3583:case 4068:case 2532:return s(t,/(.+)-inline(.+)/,C+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(f(t)-1-n>6)switch(c(t,n+1)){case 109:if(45!==c(t,n+4))break;case 102:return s(t,/(.+:)(.+)-([^]+)/,"$1"+C+"$2-$3$1"+j+(108==c(t,n+3)?"$3":"$2-$3"))+t;case 115:return~l(t,"stretch")?e(s(t,"stretch","fill-available"),n)+t:t}break;case 4949:if(115!==c(t,n+1))break;case 6444:switch(c(t,f(t)-3-(~l(t,"!important")&&10))){case 107:return s(t,":",":"+C)+t;case 101:return s(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+C+(45===c(t,14)?"inline-":"")+"box$3$1"+C+"$2$3$1"+P+"$2box$3")+t}break;case 5936:switch(c(t,n+11)){case 114:return C+t+P+s(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return C+t+P+s(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return C+t+P+s(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return C+t+P+t+t}return t}(e.value,e.length);break;case R:return N([x(e,{value:s(e.value,"@","@"+C)})],r);case E:if(e.length)return e.props.map(function(t){var n;switch(n=t,(n=/(::plac\w+|:read-\w+)/.exec(n))?n[0]:n){case":read-only":case":read-write":return N([x(e,{props:[s(t,/:(read-\w+)/,":"+j+"$1")]})],r);case"::placeholder":return N([x(e,{props:[s(t,/:(plac\w+)/,":"+C+"input-$1")]}),x(e,{props:[s(t,/:(plac\w+)/,":"+j+"$1")]}),x(e,{props:[s(t,/:(plac\w+)/,P+"input-$1")]})],r)}return""}).join("")}}],W=function(e){var t,n,a,o,g,x=e.key;if("css"===x){var P=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(P,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var j=e.stylisPlugins||B,C={},E=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+x+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n2||S(y)>3?"":" "}(I);break;case 92:Y+=function(e,t){for(var n;--t&&k()&&!(y<48)&&!(y>102)&&(!(y>57)||!(y<65))&&(!(y>70)||!(y<97)););return n=h+(t<6&&32==w()&&32==k()),u(b,e,n)}(h-1,7);continue;case 47:switch(w()){case 42:case 47:d(v(j=function(e,t){for(;k();)if(e+y===57)break;else if(e+y===84&&47===w())break;return"/*"+u(b,t,h-1)+"*"+i(47===e?e:k())}(k(),h),n,r,_,i(y),u(j,2,-2),0),P);break;default:Y+="/"}break;case 123*$:O[C++]=f(Y)*L;case 125*$:case 59:case 0:switch(F){case 0:case 125:Z=0;case 59+E:-1==L&&(Y=s(Y,/\f/g,"")),N>0&&f(Y)-M&&d(N>32?z(Y+";",a,r,M-1):z(s(Y," ","")+";",a,r,M-2),P);break;case 59:Y+=";";default:if(d(W=T(Y,n,r,C,E,o,O,D,H=[],B=[],M),g),123===F){if(0===E)e(Y,n,W,W,H,g,M,O,B);else switch(99===R&&110===c(Y,3)?100:R){case 100:case 108:case 109:case 115:e(t,W,W,a&&d(T(t,W,W,0,0,o,O,D,o,H=[],M),B),o,B,M,O,a?H:B);break;default:e(Y,W,W,W,[""],B,0,O,B)}}}C=E=N=0,$=L=1,D=Y="",M=x;break;case 58:M=1+f(Y),N=I;default:if($<1){if(123==F)--$;else if(125==F&&0==$++&&125==(y=h>0?c(b,--h):0,p--,10===y&&(p=1,m--),y))continue}switch(Y+=i(F),F*$){case 38:L=E>0?1:(Y+="\f",-1);break;case 44:O[C++]=(f(Y)-1)*L,L=1;break;case 64:45===w()&&(Y+=A(k())),R=w(),E=M=f(D=Y+=function(e){for(;!S(w());)k();return u(b,e,h)}(h)),F++;break;case 45:45===I&&2==f(Y)&&($=0)}}return g}("",null,null,null,[""],t=O(t=e),0,[0],t),b="",n),M)},$={key:x,sheet:new r({key:x,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:C,registered:{},insert:function(e,t,n,r){g=n,R(e?e+"{"+t.styles+"}":t.styles),r&&($.inserted[t.name]=!0)}};return $.sheet.hydrate(E),$}},5042:function(e,t,n){"use strict";function r(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}n.d(t,{Z:function(){return r}})},6498:function(e,t,n){"use strict";n.d(t,{C:function(){return s},T:function(){return c},i:function(){return i},w:function(){return l}});var r=n(7294),a=n(8417);n(8137),n(7278);var i=!0,o=r.createContext("undefined"!=typeof HTMLElement?(0,a.Z)({key:"css"}):null),s=o.Provider,l=function(e){return(0,r.forwardRef)(function(t,n){return e(t,(0,r.useContext)(o),n)})};i||(l=function(e){return function(t){var n=(0,r.useContext)(o);return null===n?(n=(0,a.Z)({key:"css"}),r.createElement(o.Provider,{value:n},e(t,n))):e(t,n)}});var c=r.createContext({})},8137:function(e,t,n){"use strict";n.d(t,{O:function(){return p}});var r,a={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},i=n(5042),o=/[A-Z]|^ms/g,s=/_EMO_([^_]+?)_([^]*?)_EMO_/g,l=function(e){return 45===e.charCodeAt(1)},c=function(e){return null!=e&&"boolean"!=typeof e},u=(0,i.Z)(function(e){return l(e)?e:e.replace(o,"-$&").toLowerCase()}),f=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(s,function(e,t,n){return r={name:t,styles:n,next:r},t})}return 1===a[e]||l(e)||"number"!=typeof t||0===t?t:t+"px"};function d(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return r={name:n.name,styles:n.styles,next:r},n.name;if(void 0!==n.styles){var a=n.next;if(void 0!==a)for(;void 0!==a;)r={name:a.name,styles:a.styles,next:r},a=a.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var a=0;a=4;++r,a-=4)t=(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))*1540483477+((t>>>16)*59797<<16),t^=t>>>24,n=(65535&t)*1540483477+((t>>>16)*59797<<16)^(65535&n)*1540483477+((n>>>16)*59797<<16);switch(a){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n^=255&e.charCodeAt(r),n=(65535&n)*1540483477+((n>>>16)*59797<<16)}return n^=n>>>13,(((n=(65535&n)*1540483477+((n>>>16)*59797<<16))^n>>>15)>>>0).toString(36)}(o)+c,styles:o,next:r}}},7278:function(e,t,n){"use strict";n.d(t,{L:function(){return o},j:function(){return s}});var r,a=n(7294),i=!!(r||(r=n.t(a,2))).useInsertionEffect&&(r||(r=n.t(a,2))).useInsertionEffect,o=i||function(e){return e()},s=i||a.useLayoutEffect},9603:function(e,t,n){"use strict";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 a(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n0;)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[62*Math.random()|0];return t}function em(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function ep(e){return e.classList?em(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(e){return e})}function eg(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function eh(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function ey(e){return e.size!==ef.size||e.x!==ef.x||e.y!==ef.y||e.rotate!==ef.rotate||e.flipX||e.flipY}function eb(){var e=ec.cssPrefix,t=ec.replacementClass,n=':root, :host {\n --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Solid";\n --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Regular";\n --fa-font-light: normal 300 1em/1 "Font Awesome 6 Light";\n --fa-font-thin: normal 100 1em/1 "Font Awesome 6 Thin";\n --fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone";\n --fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-light: normal 300 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-thin: normal 100 1em/1 "Font Awesome 6 Sharp";\n --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands";\n}\n\nsvg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {\n overflow: visible;\n box-sizing: content-box;\n}\n\n.svg-inline--fa {\n display: var(--fa-display, inline-block);\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n}\n.svg-inline--fa.fa-2xs {\n vertical-align: 0.1em;\n}\n.svg-inline--fa.fa-xs {\n vertical-align: 0em;\n}\n.svg-inline--fa.fa-sm {\n vertical-align: -0.0714285705em;\n}\n.svg-inline--fa.fa-lg {\n vertical-align: -0.2em;\n}\n.svg-inline--fa.fa-xl {\n vertical-align: -0.25em;\n}\n.svg-inline--fa.fa-2xl {\n vertical-align: -0.3125em;\n}\n.svg-inline--fa.fa-pull-left {\n margin-right: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-pull-right {\n margin-left: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-li {\n width: var(--fa-li-width, 2em);\n top: 0.25em;\n}\n.svg-inline--fa.fa-fw {\n width: var(--fa-fw-width, 1.25em);\n}\n\n.fa-layers svg.svg-inline--fa {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.fa-layers-counter, .fa-layers-text {\n display: inline-block;\n position: absolute;\n text-align: center;\n}\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -0.125em;\n width: 1em;\n}\n.fa-layers svg.svg-inline--fa {\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-counter {\n background-color: var(--fa-counter-background-color, #ff253a);\n border-radius: var(--fa-counter-border-radius, 1em);\n box-sizing: border-box;\n color: var(--fa-inverse, #fff);\n line-height: var(--fa-counter-line-height, 1);\n max-width: var(--fa-counter-max-width, 5em);\n min-width: var(--fa-counter-min-width, 1.5em);\n overflow: hidden;\n padding: var(--fa-counter-padding, 0.25em 0.5em);\n right: var(--fa-right, 0);\n text-overflow: ellipsis;\n top: var(--fa-top, 0);\n -webkit-transform: scale(var(--fa-counter-scale, 0.25));\n transform: scale(var(--fa-counter-scale, 0.25));\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n bottom: var(--fa-bottom, 0);\n right: var(--fa-right, 0);\n top: auto;\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: bottom right;\n transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n bottom: var(--fa-bottom, 0);\n left: var(--fa-left, 0);\n right: auto;\n top: auto;\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: bottom left;\n transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n top: var(--fa-top, 0);\n right: var(--fa-right, 0);\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-top-left {\n left: var(--fa-left, 0);\n right: auto;\n top: var(--fa-top, 0);\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: top left;\n transform-origin: top left;\n}\n\n.fa-1x {\n font-size: 1em;\n}\n\n.fa-2x {\n font-size: 2em;\n}\n\n.fa-3x {\n font-size: 3em;\n}\n\n.fa-4x {\n font-size: 4em;\n}\n\n.fa-5x {\n font-size: 5em;\n}\n\n.fa-6x {\n font-size: 6em;\n}\n\n.fa-7x {\n font-size: 7em;\n}\n\n.fa-8x {\n font-size: 8em;\n}\n\n.fa-9x {\n font-size: 9em;\n}\n\n.fa-10x {\n font-size: 10em;\n}\n\n.fa-2xs {\n font-size: 0.625em;\n line-height: 0.1em;\n vertical-align: 0.225em;\n}\n\n.fa-xs {\n font-size: 0.75em;\n line-height: 0.0833333337em;\n vertical-align: 0.125em;\n}\n\n.fa-sm {\n font-size: 0.875em;\n line-height: 0.0714285718em;\n vertical-align: 0.0535714295em;\n}\n\n.fa-lg {\n font-size: 1.25em;\n line-height: 0.05em;\n vertical-align: -0.075em;\n}\n\n.fa-xl {\n font-size: 1.5em;\n line-height: 0.0416666682em;\n vertical-align: -0.125em;\n}\n\n.fa-2xl {\n font-size: 2em;\n line-height: 0.03125em;\n vertical-align: -0.1875em;\n}\n\n.fa-fw {\n text-align: center;\n width: 1.25em;\n}\n\n.fa-ul {\n list-style-type: none;\n margin-left: var(--fa-li-margin, 2.5em);\n padding-left: 0;\n}\n.fa-ul > li {\n position: relative;\n}\n\n.fa-li {\n left: calc(var(--fa-li-width, 2em) * -1);\n position: absolute;\n text-align: center;\n width: var(--fa-li-width, 2em);\n line-height: inherit;\n}\n\n.fa-border {\n border-color: var(--fa-border-color, #eee);\n border-radius: var(--fa-border-radius, 0.1em);\n border-style: var(--fa-border-style, solid);\n border-width: var(--fa-border-width, 0.08em);\n padding: var(--fa-border-padding, 0.2em 0.25em 0.15em);\n}\n\n.fa-pull-left {\n float: left;\n margin-right: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-pull-right {\n float: right;\n margin-left: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-beat {\n -webkit-animation-name: fa-beat;\n animation-name: fa-beat;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-bounce {\n -webkit-animation-name: fa-bounce;\n animation-name: fa-bounce;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n}\n\n.fa-fade {\n -webkit-animation-name: fa-fade;\n animation-name: fa-fade;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-beat-fade {\n -webkit-animation-name: fa-beat-fade;\n animation-name: fa-beat-fade;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-flip {\n -webkit-animation-name: fa-flip;\n animation-name: fa-flip;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-shake {\n -webkit-animation-name: fa-shake;\n animation-name: fa-shake;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, linear);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin {\n -webkit-animation-name: fa-spin;\n animation-name: fa-spin;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 2s);\n animation-duration: var(--fa-animation-duration, 2s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, linear);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin-reverse {\n --fa-animation-direction: reverse;\n}\n\n.fa-pulse,\n.fa-spin-pulse {\n -webkit-animation-name: fa-spin;\n animation-name: fa-spin;\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, steps(8));\n animation-timing-function: var(--fa-animation-timing, steps(8));\n}\n\n@media (prefers-reduced-motion: reduce) {\n .fa-beat,\n.fa-bounce,\n.fa-fade,\n.fa-beat-fade,\n.fa-flip,\n.fa-pulse,\n.fa-shake,\n.fa-spin,\n.fa-spin-pulse {\n -webkit-animation-delay: -1ms;\n animation-delay: -1ms;\n -webkit-animation-duration: 1ms;\n animation-duration: 1ms;\n -webkit-animation-iteration-count: 1;\n animation-iteration-count: 1;\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n}\n@-webkit-keyframes fa-beat {\n 0%, 90% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 45% {\n -webkit-transform: scale(var(--fa-beat-scale, 1.25));\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@keyframes fa-beat {\n 0%, 90% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 45% {\n -webkit-transform: scale(var(--fa-beat-scale, 1.25));\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@-webkit-keyframes fa-bounce {\n 0% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n}\n@keyframes fa-bounce {\n 0% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n}\n@-webkit-keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@-webkit-keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@-webkit-keyframes fa-flip {\n 50% {\n -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@keyframes fa-flip {\n 50% {\n -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@-webkit-keyframes fa-shake {\n 0% {\n -webkit-transform: rotate(-15deg);\n transform: rotate(-15deg);\n }\n 4% {\n -webkit-transform: rotate(15deg);\n transform: rotate(15deg);\n }\n 8%, 24% {\n -webkit-transform: rotate(-18deg);\n transform: rotate(-18deg);\n }\n 12%, 28% {\n -webkit-transform: rotate(18deg);\n transform: rotate(18deg);\n }\n 16% {\n -webkit-transform: rotate(-22deg);\n transform: rotate(-22deg);\n }\n 20% {\n -webkit-transform: rotate(22deg);\n transform: rotate(22deg);\n }\n 32% {\n -webkit-transform: rotate(-12deg);\n transform: rotate(-12deg);\n }\n 36% {\n -webkit-transform: rotate(12deg);\n transform: rotate(12deg);\n }\n 40%, 100% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n}\n@keyframes fa-shake {\n 0% {\n -webkit-transform: rotate(-15deg);\n transform: rotate(-15deg);\n }\n 4% {\n -webkit-transform: rotate(15deg);\n transform: rotate(15deg);\n }\n 8%, 24% {\n -webkit-transform: rotate(-18deg);\n transform: rotate(-18deg);\n }\n 12%, 28% {\n -webkit-transform: rotate(18deg);\n transform: rotate(18deg);\n }\n 16% {\n -webkit-transform: rotate(-22deg);\n transform: rotate(-22deg);\n }\n 20% {\n -webkit-transform: rotate(22deg);\n transform: rotate(22deg);\n }\n 32% {\n -webkit-transform: rotate(-12deg);\n transform: rotate(-12deg);\n }\n 36% {\n -webkit-transform: rotate(12deg);\n transform: rotate(12deg);\n }\n 40%, 100% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n}\n@-webkit-keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n@keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n.fa-rotate-90 {\n -webkit-transform: rotate(90deg);\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n -webkit-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n -webkit-transform: rotate(270deg);\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n -webkit-transform: scale(-1, 1);\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n -webkit-transform: scale(1, -1);\n transform: scale(1, -1);\n}\n\n.fa-flip-both,\n.fa-flip-horizontal.fa-flip-vertical {\n -webkit-transform: scale(-1, -1);\n transform: scale(-1, -1);\n}\n\n.fa-rotate-by {\n -webkit-transform: rotate(var(--fa-rotate-angle, none));\n transform: rotate(var(--fa-rotate-angle, none));\n}\n\n.fa-stack {\n display: inline-block;\n vertical-align: middle;\n height: 2em;\n position: relative;\n width: 2.5em;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n z-index: var(--fa-stack-z-index, auto);\n}\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1.25em;\n}\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2.5em;\n}\n\n.fa-inverse {\n color: var(--fa-inverse, #fff);\n}\n\n.sr-only,\n.fa-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.sr-only-focusable:not(:focus),\n.fa-sr-only-focusable:not(:focus) {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.svg-inline--fa .fa-primary {\n fill: var(--fa-primary-color, currentColor);\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n fill: var(--fa-secondary-color, currentColor);\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n fill: black;\n}\n\n.fad.fa-inverse,\n.fa-duotone.fa-inverse {\n color: var(--fa-inverse, #fff);\n}';if("fa"!==e||t!==I){var r=RegExp("\\.".concat("fa","\\-"),"g"),a=RegExp("\\--".concat("fa","\\-"),"g"),i=RegExp("\\.".concat(I),"g");n=n.replace(r,".".concat(e,"-")).replace(a,"--".concat(e,"-")).replace(i,".".concat(t))}return n}var ev=!1;function ex(){ec.autoAddCss&&!ev&&(!function(e){if(e&&M){var t=C.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;for(var n=C.head.childNodes,r=null,a=n.length-1;a>-1;a--){var i=n[a];["STYLE","LINK"].indexOf((i.tagName||"").toUpperCase())>-1&&(r=i)}C.head.insertBefore(t,r)}}(eb()),ev=!0)}var ek=j||{};ek[N]||(ek[N]={}),ek[N].styles||(ek[N].styles={}),ek[N].hooks||(ek[N].hooks={}),ek[N].shims||(ek[N].shims=[]);var ew=ek[N],eS=[],eO=!1;function eA(e){var t,n=e.tag,r=e.attributes,a=e.children;return"string"==typeof e?eg(e):"<".concat(n," ").concat(Object.keys((t=void 0===r?{}:r)||{}).reduce(function(e,n){return e+"".concat(n,'="').concat(eg(t[n]),'" ')},"").trim(),">").concat((void 0===a?[]:a).map(eA).join(""),"")}function eP(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}!M||(eO=(C.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(C.readyState))||C.addEventListener("DOMContentLoaded",function e(){C.removeEventListener("DOMContentLoaded",e),eO=1,eS.map(function(e){return e()})});var ej=function(e,t,n,r){var a,i,o,s=Object.keys(e),l=s.length,c=void 0!==r?function(e,n,a,i){return t.call(r,e,n,a,i)}:t;for(void 0===n?(a=1,o=e[s[0]]):(a=0,o=n);a=55296&&a<=56319&&n2&&void 0!==arguments[2]?arguments[2]:{},r=n.skipHooks,i=e_(t);"function"!=typeof ew.hooks.addPack||void 0!==r&&r?ew.styles[e]=a(a({},ew.styles[e]||{}),i):ew.hooks.addPack(e,e_(t)),"fas"===e&&eE("fa",t)}var eM=ew.styles,eR=ew.shims,eN=(s(y={},H,Object.values(K[H])),s(y,B,Object.values(K[B])),y),eI=null,eT={},ez={},e$={},eZ={},eL={},eF=(s(b={},H,Object.keys(G[H])),s(b,B,Object.keys(G[B])),b),eD=function(){var e=function(e){return ej(eM,function(t,n,r){return t[r]=ej(n,e,{}),t},{})};eT=e(function(e,t,n){return t[3]&&(e[t[3]]=n),t[2]&&t[2].filter(function(e){return"number"==typeof e}).forEach(function(t){e[t.toString(16)]=n}),e}),ez=e(function(e,t,n){return e[n]=n,t[2]&&t[2].filter(function(e){return"string"==typeof e}).forEach(function(t){e[t]=n}),e}),eL=e(function(e,t,n){var r=t[2];return e[n]=n,r.forEach(function(t){e[t]=n}),e});var t="far"in eM||ec.autoFetchSvg,n=ej(eR,function(e,n){var r=n[0],a=n[1],i=n[2];return"far"!==a||t||(a="fas"),"string"==typeof r&&(e.names[r]={prefix:a,iconName:i}),"number"==typeof r&&(e.unicodes[r.toString(16)]={prefix:a,iconName:i}),e},{names:{},unicodes:{}});e$=n.names,eZ=n.unicodes,eI=eG(ec.styleDefault,{family:ec.familyDefault})};function eH(e,t){return(eT[e]||{})[t]}function eB(e,t){return(eL[e]||{})[t]}function eW(e){return e$[e]||{prefix:null,iconName:null}}eu.push(function(e){eI=eG(e.styleDefault,{family:ec.familyDefault})}),eD();var eY=function(){return{prefix:null,iconName:null,rest:[]}};function eG(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.family,r=void 0===n?H:n,a=G[r][e],i=V[r][e]||V[r][a],o=e in ew.styles?e:null;return i||o||null}var eV=(s(v={},H,Object.keys(K[H])),s(v,B,Object.keys(K[B])),v);function eK(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.skipLookups,a=void 0!==r&&r,i=(s(t={},H,"".concat(ec.cssPrefix,"-").concat(H)),s(t,B,"".concat(ec.cssPrefix,"-").concat(B)),t),o=null,l=H;(e.includes(i[H])||e.some(function(e){return eV[H].includes(e)}))&&(l=H),(e.includes(i[B])||e.some(function(e){return eV[B].includes(e)}))&&(l=B);var c=e.reduce(function(e,t){var n,r,s,c,u=(n=ec.cssPrefix,s=(r=t.split("-"))[0],c=r.slice(1).join("-"),s!==n||""===c||~ei.indexOf(c)?null:c);if(eM[t]?(o=t=eN[l].includes(t)?U[l][t]:t,e.prefix=t):eF[l].indexOf(t)>-1?(o=t,e.prefix=eG(t,{family:l})):u?e.iconName=u:t!==ec.replacementClass&&t!==i[H]&&t!==i[B]&&e.rest.push(t),!a&&e.prefix&&e.iconName){var f="fa"===o?eW(e.iconName):{},d=eB(e.prefix,e.iconName);f.prefix&&(o=null),e.iconName=f.iconName||d||e.iconName,e.prefix=f.prefix||e.prefix,"far"!==e.prefix||eM.far||!eM.fas||ec.autoFetchSvg||(e.prefix="fas")}return e},eY());return(e.includes("fa-brands")||e.includes("fab"))&&(c.prefix="fab"),(e.includes("fa-duotone")||e.includes("fad"))&&(c.prefix="fad"),!c.prefix&&l===B&&(eM.fass||ec.autoFetchSvg)&&(c.prefix="fass",c.iconName=eB(c.prefix,c.iconName)||c.iconName),("fa"===c.prefix||"fa"===o)&&(c.prefix=eI||"fas"),c}var eU=function(){var e,t;function n(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),this.definitions={}}return e=[{key:"add",value:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r0&&s.forEach(function(t){"string"==typeof t&&(e[a][t]=o)}),e[a][i]=o}),e}}],o(n.prototype,e),t&&o(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}(),eq=[],eX={},eJ={},eQ=Object.keys(eJ);function e0(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),a=2;a1?t-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:{};return M?(e1("beforeI2svg",e),e2("pseudoElements2svg",e),e2("i2svg",e)):Promise.reject("Operation requires a DOM of some kind.")},watch:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.autoReplaceSvgRoot;!1===ec.autoReplaceSvg&&(ec.autoReplaceSvg=!0),ec.observeMutations=!0,e=function(){e6({autoReplaceSvgRoot:n}),e1("watch",t)},M&&(eO?setTimeout(e,0):eS.push(e))}},parse:{icon:function(e){if(null===e)return null;if("object"===i(e)&&e.prefix&&e.iconName)return{prefix:e.prefix,iconName:eB(e.prefix,e.iconName)||e.iconName};if(Array.isArray(e)&&2===e.length){var t=0===e[1].indexOf("fa-")?e[1].slice(3):e[1],n=eG(e[0]);return{prefix:n,iconName:eB(n,t)||t}}if("string"==typeof e&&(e.indexOf("".concat(ec.cssPrefix,"-"))>-1||e.match(q))){var r=eK(e.split(" "),{skipLookups:!0});return{prefix:r.prefix||eI,iconName:eB(r.prefix,r.iconName)||r.iconName}}if("string"==typeof e){var a=eI;return{prefix:a,iconName:eB(a,e)||e}}}},library:e4,findIconDefinition:e5,toHtml:eA},e6=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.autoReplaceSvgRoot,n=void 0===t?C:t;(Object.keys(ew.styles).length>0||ec.autoFetchSvg)&&M&&ec.autoReplaceSvg&&e3.dom.i2svg({node:n})};function e7(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(e){return eA(e)})}}),Object.defineProperty(e,"node",{get:function(){if(M){var t=C.createElement("div");return t.innerHTML=e.html,t.children}}}),e}function e8(e){var t,n,r,i,o,s,l=e.icons,c=l.main,u=l.mask,f=e.prefix,d=e.iconName,m=e.transform,p=e.symbol,g=e.title,h=e.maskId,y=e.titleId,b=e.extra,v=e.watchable,x=u.found?u:c,k=x.width,w=x.height,S="fak"===f,O=[ec.replacementClass,d?"".concat(ec.cssPrefix,"-").concat(d):""].filter(function(e){return -1===b.classes.indexOf(e)}).filter(function(e){return""!==e||!!e}).concat(b.classes).join(" "),A={children:[],attributes:a(a({},b.attributes),{},{"data-prefix":f,"data-icon":d,class:O,role:b.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(k," ").concat(w)})},P=S&&!~b.classes.indexOf("fa-fw")?{width:"".concat(k/w*1,"em")}:{};void 0!==v&&v&&(A.attributes[T]=""),g&&(A.children.push({tag:"title",attributes:{id:A.attributes["aria-labelledby"]||"title-".concat(y||ed())},children:[g]}),delete A.attributes.title);var j=a(a({},A),{},{prefix:f,iconName:d,main:c,mask:u,maskId:h,transform:m,symbol:p,styles:a(a({},P),b.styles)}),C=u.found&&c.found?e2("generateAbstractMask",j)||{children:[],attributes:{}}:e2("generateAbstractIcon",j)||{children:[],attributes:{}},_=C.children,E=C.attributes;return(j.children=_,j.attributes=E,p)?(t=j.prefix,n=j.iconName,r=j.children,i=j.attributes,s=!0===(o=j.symbol)?"".concat(t,"-").concat(ec.cssPrefix,"-").concat(n):o,[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:a(a({},i),{},{id:s}),children:r}]}]):function(e){var t=e.children,n=e.main,r=e.mask,i=e.attributes,o=e.styles,s=e.transform;if(ey(s)&&n.found&&!r.found){var l={x:n.width/n.height/2,y:.5};i.style=eh(a(a({},o),{},{"transform-origin":"".concat(l.x+s.x/16,"em ").concat(l.y+s.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}(j)}function e9(e){var t,n,r,i,o,s,l,c=e.content,u=e.width,f=e.height,d=e.transform,m=e.title,p=e.extra,g=e.watchable,h=a(a(a({},p.attributes),m?{title:m}:{}),{},{class:p.classes.join(" ")});void 0!==g&&g&&(h[T]="");var y=a({},p.styles);ey(d)&&(y.transform=(n=(t={transform:d,startCentered:!0,width:u,height:f}).transform,r=t.width,i=t.height,s=void 0!==(o=t.startCentered)&&o,l="",s&&R?l+="translate(".concat(n.x/16-(void 0===r?16:r)/2,"em, ").concat(n.y/16-(void 0===i?16:i)/2,"em) "):s?l+="translate(calc(-50% + ".concat(n.x/16,"em), calc(-50% + ").concat(n.y/16,"em)) "):l+="translate(".concat(n.x/16,"em, ").concat(n.y/16,"em) "),l+="scale(".concat(n.size/16*(n.flipX?-1:1),", ").concat(n.size/16*(n.flipY?-1:1),") ")+"rotate(".concat(n.rotate,"deg) ")),y["-webkit-transform"]=y.transform);var b=eh(y);b.length>0&&(h.style=b);var v=[];return v.push({tag:"span",attributes:h,children:[c]}),m&&v.push({tag:"span",attributes:{class:"sr-only"},children:[m]}),v}var te=ew.styles;function tt(e){var t=e[0],n=e[1],r=l(e.slice(4),1)[0];return{found:!0,width:t,height:n,icon:Array.isArray(r)?{tag:"g",attributes:{class:"".concat(ec.cssPrefix,"-").concat(er.GROUP)},children:[{tag:"path",attributes:{class:"".concat(ec.cssPrefix,"-").concat(er.SECONDARY),fill:"currentColor",d:r[0]}},{tag:"path",attributes:{class:"".concat(ec.cssPrefix,"-").concat(er.PRIMARY),fill:"currentColor",d:r[1]}}]}:{tag:"path",attributes:{fill:"currentColor",d:r}}}}var tn={found:!1,width:512,height:512};function tr(e,t){var n=t;return"fa"===t&&null!==ec.styleDefault&&(t=eI),new Promise(function(r,i){if(e2("missingIconAbstract"),"fa"===n){var o,s,l=eW(e)||{};e=l.iconName||e,t=l.prefix||t}if(e&&t&&te[t]&&te[t][e])return r(tt(te[t][e]));o=e,s=t,D||ec.showMissingIcons||!o||console.error('Icon with name "'.concat(o,'" and prefix "').concat(s,'" is missing.')),r(a(a({},tn),{},{icon:ec.showMissingIcons&&e&&e2("missingIconAbstract")||{}}))})}var ta=function(){},ti=ec.measurePerformance&&E&&E.mark&&E.measure?E:{mark:ta,measure:ta},to='FA "6.5.1"',ts=function(e){ti.mark("".concat(to," ").concat(e," ends")),ti.measure("".concat(to," ").concat(e),"".concat(to," ").concat(e," begins"),"".concat(to," ").concat(e," ends"))},tl={begin:function(e){return ti.mark("".concat(to," ").concat(e," begins")),function(){return ts(e)}},end:ts},tc=function(){};function tu(e){return"string"==typeof(e.getAttribute?e.getAttribute(T):null)}function tf(e){return C.createElementNS("http://www.w3.org/2000/svg",e)}function td(e){return C.createElement(e)}var tm={replace:function(e){var t=e[0];if(t.parentNode){if(e[1].forEach(function(e){t.parentNode.insertBefore(function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.ceFn,a=void 0===r?"svg"===t.tag?tf:td:r;if("string"==typeof t)return C.createTextNode(t);var i=a(t.tag);return Object.keys(t.attributes||[]).forEach(function(e){i.setAttribute(e,t.attributes[e])}),(t.children||[]).forEach(function(t){i.appendChild(e(t,{ceFn:a}))}),i}(e),t)}),null===t.getAttribute(T)&&ec.keepOriginalSource){var n,r=C.createComment((n=" ".concat(t.outerHTML," "),n="".concat(n,"Font Awesome fontawesome.com ")));t.parentNode.replaceChild(r,t)}else t.remove()}},nest:function(e){var t=e[0],n=e[1];if(~ep(t).indexOf(ec.replacementClass))return tm.replace(e);var r=new RegExp("".concat(ec.cssPrefix,"-.*"));if(delete n[0].attributes.id,n[0].attributes.class){var a=n[0].attributes.class.split(" ").reduce(function(e,t){return t===ec.replacementClass||t.match(r)?e.toSvg.push(t):e.toNode.push(t),e},{toNode:[],toSvg:[]});n[0].attributes.class=a.toSvg.join(" "),0===a.toNode.length?t.removeAttribute("class"):t.setAttribute("class",a.toNode.join(" "))}var i=n.map(function(e){return eA(e)}).join("\n");t.setAttribute(T,""),t.innerHTML=i}};function tp(e){e()}function tg(e,t){var n="function"==typeof t?t:tc;if(0===e.length)n();else{var r=tp;"async"===ec.mutateApproach&&(r=j.requestAnimationFrame||tp),r(function(){var t=!0===ec.autoReplaceSvg?tm.replace:tm[ec.autoReplaceSvg]||tm.replace,r=tl.begin("mutate");e.map(t),r(),n()})}}var th=!1,ty=null;function tb(e){if(_&&ec.observeMutations){var t=e.treeCallback,n=void 0===t?tc:t,r=e.nodeCallback,a=void 0===r?tc:r,i=e.pseudoElementsCallback,o=void 0===i?tc:i,s=e.observeMutationsRoot,l=void 0===s?C:s;ty=new _(function(e){if(!th){var t=eI;em(e).forEach(function(e){if("childList"===e.type&&e.addedNodes.length>0&&!tu(e.addedNodes[0])&&(ec.searchPseudoElements&&o(e.target),n(e.target)),"attributes"===e.type&&e.target.parentNode&&ec.searchPseudoElements&&o(e.target.parentNode),"attributes"===e.type&&tu(e.target)&&~en.indexOf(e.attributeName)){if("class"===e.attributeName&&(i=(r=e.target).getAttribute?r.getAttribute($):null,s=r.getAttribute?r.getAttribute(Z):null,i&&s)){var r,i,s,l,c=eK(ep(e.target)),u=c.prefix,f=c.iconName;e.target.setAttribute($,u||t),f&&e.target.setAttribute(Z,f)}else(l=e.target)&&l.classList&&l.classList.contains&&l.classList.contains(ec.replacementClass)&&a(e.target)}})}}),M&&ty.observe(l,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function tv(e){var t,n,r,i,o,s,l,c,u,f,d,m=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{styleParser:!0},p=(r=e.getAttribute("data-prefix"),i=e.getAttribute("data-icon"),o=void 0!==e.innerText?e.innerText.trim():"",(s=eK(ep(e))).prefix||(s.prefix=eI),r&&i&&(s.prefix=r,s.iconName=i),s.iconName&&s.prefix||(s.prefix&&o.length>0&&(s.iconName=(t=s.prefix,n=e.innerText,(ez[t]||{})[n]||eH(s.prefix,eC(e.innerText)))),!s.iconName&&ec.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(s.iconName=e.firstChild.data)),s),g=p.iconName,h=p.prefix,y=p.rest,b=(l=em(e.attributes).reduce(function(e,t){return"class"!==e.name&&"style"!==e.name&&(e[t.name]=t.value),e},{}),c=e.getAttribute("title"),u=e.getAttribute("data-fa-title-id"),ec.autoA11y&&(c?l["aria-labelledby"]="".concat(ec.replacementClass,"-title-").concat(u||ed()):(l["aria-hidden"]="true",l.focusable="false")),l),v=e0("parseNodeAttributes",{},e),x=m.styleParser?(f=e.getAttribute("style"),d=[],f&&(d=f.split(";").reduce(function(e,t){var n=t.split(":"),r=n[0],a=n.slice(1);return r&&a.length>0&&(e[r]=a.join(":").trim()),e},{})),d):[];return a({iconName:g,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:h,transform:ef,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:y,styles:x,attributes:b}},v)}var tx=ew.styles;function tk(e){var t="nest"===ec.autoReplaceSvg?tv(e,{styleParser:!1}):tv(e);return~t.extra.classes.indexOf(X)?e2("generateLayersText",e,t):e2("generateSvgReplacementMutation",e,t)}var tw=new Set;function tS(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!M)return Promise.resolve();var n=C.documentElement.classList,r=function(e){return n.add("".concat(L,"-").concat(e))},a=function(e){return n.remove("".concat(L,"-").concat(e))},i=ec.autoFetchSvg?tw:W.map(function(e){return"fa-".concat(e)}).concat(Object.keys(tx));i.includes("fa")||i.push("fa");var o=[".".concat(X,":not([").concat(T,"])")].concat(i.map(function(e){return".".concat(e,":not([").concat(T,"])")})).join(", ");if(0===o.length)return Promise.resolve();var s=[];try{s=em(e.querySelectorAll(o))}catch(e){}if(!(s.length>0))return Promise.resolve();r("pending"),a("complete");var l=tl.begin("onTree"),c=s.reduce(function(e,t){try{var n=tk(t);n&&e.push(n)}catch(e){D||"MissingIcon"!==e.name||console.error(e)}return e},[]);return new Promise(function(e,n){Promise.all(c).then(function(n){tg(n,function(){r("active"),r("complete"),a("pending"),"function"==typeof t&&t(),l(),e()})}).catch(function(e){l(),n(e)})})}function tO(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;tk(e).then(function(e){e&&tg([e],t)})}W.map(function(e){tw.add("fa-".concat(e))}),Object.keys(G[H]).map(tw.add.bind(tw)),Object.keys(G[B]).map(tw.add.bind(tw)),tw=c(tw);var tA=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.transform,r=void 0===n?ef:n,i=t.symbol,o=void 0!==i&&i,s=t.mask,l=void 0===s?null:s,c=t.maskId,u=void 0===c?null:c,f=t.title,d=void 0===f?null:f,m=t.titleId,p=void 0===m?null:m,g=t.classes,h=void 0===g?[]:g,y=t.attributes,b=void 0===y?{}:y,v=t.styles,x=void 0===v?{}:v;if(e){var k=e.prefix,w=e.iconName,S=e.icon;return e7(a({type:"icon"},e),function(){return e1("beforeDOMElementCreation",{iconDefinition:e,params:t}),ec.autoA11y&&(d?b["aria-labelledby"]="".concat(ec.replacementClass,"-title-").concat(p||ed()):(b["aria-hidden"]="true",b.focusable="false")),e8({icons:{main:tt(S),mask:l?tt(l.icon):{found:!1,width:null,height:null,icon:{}}},prefix:k,iconName:w,transform:a(a({},ef),r),symbol:o,title:d,maskId:u,titleId:p,extra:{attributes:b,styles:x,classes:h}})})}},tP=RegExp('"',"ug");function tj(e,t){var n="".concat("data-fa-pseudo-element-pending").concat(t.replace(":","-"));return new Promise(function(r,i){if(null!==e.getAttribute(n))return r();var o=em(e.children).filter(function(e){return e.getAttribute(z)===t})[0],s=j.getComputedStyle(e,t),l=s.getPropertyValue("font-family").match(J),c=s.getPropertyValue("font-weight"),u=s.getPropertyValue("content");if(o&&!l)return e.removeChild(o),r();if(l&&"none"!==u&&""!==u){var f=s.getPropertyValue("content"),d=~["Sharp"].indexOf(l[2])?B:H,m=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(l[2])?V[d][l[2].toLowerCase()]:Q[d][c],p=(S=(k=x=f.replace(tP,"")).length,A=(O=k.charCodeAt(0))>=55296&&O<=56319&&S>1&&(w=k.charCodeAt(1))>=56320&&w<=57343?(O-55296)*1024+w-56320+65536:O,{value:(P=2===x.length&&x[0]===x[1])?eC(x[0]):eC(x),isSecondary:A>=1105920&&A<=1112319||P}),g=p.value,h=p.isSecondary,y=l[0].startsWith("FontAwesome"),b=eH(m,g),v=b;if(y){var x,k,w,S,O,A,P,_,E,M=(_=eZ[g],E=eH("fas",g),_||(E?{prefix:"fas",iconName:E}:null)||{prefix:null,iconName:null});M.iconName&&M.prefix&&(b=M.iconName,m=M.prefix)}if(!b||h||o&&o.getAttribute($)===m&&o.getAttribute(Z)===v)r();else{e.setAttribute(n,v),o&&e.removeChild(o);var R={iconName:null,title:null,titleId:null,prefix:null,transform:ef,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}},N=R.extra;N.attributes[z]=t,tr(b,m).then(function(i){var o=e8(a(a({},R),{},{icons:{main:i,mask:eY()},prefix:m,iconName:v,extra:N,watchable:!0})),s=C.createElementNS("http://www.w3.org/2000/svg","svg");"::before"===t?e.insertBefore(s,e.firstChild):e.appendChild(s),s.outerHTML=o.map(function(e){return eA(e)}).join("\n"),e.removeAttribute(n),r()}).catch(i)}}else r()})}function tC(e){return Promise.all([tj(e,"::before"),tj(e,"::after")])}function t_(e){return e.parentNode!==document.head&&!~F.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(z)&&(!e.parentNode||"svg"!==e.parentNode.tagName)}function tE(e){if(M)return new Promise(function(t,n){var r=em(e.querySelectorAll("*")).filter(t_).map(tC),a=tl.begin("searchPseudoElements");th=!0,Promise.all(r).then(function(){a(),th=!1,t()}).catch(function(){a(),th=!1,n()})})}var tM=!1,tR=function(e){return e.toLowerCase().split(" ").reduce(function(e,t){var n=t.toLowerCase().split("-"),r=n[0],a=n.slice(1).join("-");if(r&&"h"===a)return e.flipX=!0,e;if(r&&"v"===a)return e.flipY=!0,e;if(isNaN(a=parseFloat(a)))return e;switch(r){case"grow":e.size=e.size+a;break;case"shrink":e.size=e.size-a;break;case"left":e.x=e.x-a;break;case"right":e.x=e.x+a;break;case"up":e.y=e.y-a;break;case"down":e.y=e.y+a;break;case"rotate":e.rotate=e.rotate+a}return e},{size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0})},tN={x:0,y:0,width:"100%",height:"100%"};function tI(e){var t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}eq=[{mixout:function(){return{dom:{css:eb,insertCss:ex}}},hooks:function(){return{beforeDOMElementCreation:function(){ex()},beforeI2svg:function(){ex()}}}},{mixout:function(){return{icon:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(e||{}).icon?e:e5(e||{}),r=t.mask;return r&&(r=(r||{}).icon?r:e5(r||{})),tA(n,a(a({},t),{},{mask:r}))}}},hooks:function(){return{mutationObserverCallbacks:function(e){return e.treeCallback=tS,e.nodeCallback=tO,e}}},provides:function(e){e.i2svg=function(e){var t=e.node,n=void 0===t?C:t,r=e.callback;return tS(n,void 0===r?function(){}:r)},e.generateSvgReplacementMutation=function(e,t){var n=t.iconName,r=t.title,a=t.titleId,i=t.prefix,o=t.transform,s=t.symbol,c=t.mask,u=t.maskId,f=t.extra;return new Promise(function(t,d){Promise.all([tr(n,i),c.iconName?tr(c.iconName,c.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(c){var d=l(c,2);t([e,e8({icons:{main:d[0],mask:d[1]},prefix:i,iconName:n,transform:o,symbol:s,maskId:u,title:r,titleId:a,extra:f,watchable:!0})])}).catch(d)})},e.generateAbstractIcon=function(e){var t,n=e.children,r=e.attributes,a=e.main,i=e.transform,o=eh(e.styles);return o.length>0&&(r.style=o),ey(i)&&(t=e2("generateAbstractTransformGrouping",{main:a,transform:i,containerWidth:a.width,iconWidth:a.width})),n.push(t||a.icon),{children:n,attributes:r}}}},{mixout:function(){return{layer:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.classes,r=void 0===n?[]:n;return e7({type:"layer"},function(){e1("beforeDOMElementCreation",{assembler:e,params:t});var n=[];return e(function(e){Array.isArray(e)?e.map(function(e){n=n.concat(e.abstract)}):n=n.concat(e.abstract)}),[{tag:"span",attributes:{class:["".concat(ec.cssPrefix,"-layers")].concat(c(r)).join(" ")},children:n}]})}}}},{mixout:function(){return{counter:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.title,r=void 0===n?null:n,i=t.classes,o=void 0===i?[]:i,s=t.attributes,l=void 0===s?{}:s,u=t.styles,f=void 0===u?{}:u;return e7({type:"counter",content:e},function(){var n,i,s,u,d,m,p;return e1("beforeDOMElementCreation",{content:e,params:t}),i=(n={content:e.toString(),title:r,extra:{attributes:l,styles:f,classes:["".concat(ec.cssPrefix,"-layers-counter")].concat(c(o))}}).content,s=n.title,d=a(a(a({},(u=n.extra).attributes),s?{title:s}:{}),{},{class:u.classes.join(" ")}),(m=eh(u.styles)).length>0&&(d.style=m),(p=[]).push({tag:"span",attributes:d,children:[i]}),s&&p.push({tag:"span",attributes:{class:"sr-only"},children:[s]}),p})}}}},{mixout:function(){return{text:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.transform,r=void 0===n?ef:n,i=t.title,o=void 0===i?null:i,s=t.classes,l=void 0===s?[]:s,u=t.attributes,f=void 0===u?{}:u,d=t.styles,m=void 0===d?{}:d;return e7({type:"text",content:e},function(){return e1("beforeDOMElementCreation",{content:e,params:t}),e9({content:e,transform:a(a({},ef),r),title:o,extra:{attributes:f,styles:m,classes:["".concat(ec.cssPrefix,"-layers-text")].concat(c(l))}})})}}},provides:function(e){e.generateLayersText=function(e,t){var n=t.title,r=t.transform,a=t.extra,i=null,o=null;if(R){var s=parseInt(getComputedStyle(e).fontSize,10),l=e.getBoundingClientRect();i=l.width/s,o=l.height/s}return ec.autoA11y&&!n&&(a.attributes["aria-hidden"]="true"),Promise.resolve([e,e9({content:e.innerHTML,width:i,height:o,transform:r,title:n,extra:a,watchable:!0})])}}},{hooks:function(){return{mutationObserverCallbacks:function(e){return e.pseudoElementsCallback=tE,e}}},provides:function(e){e.pseudoElements2svg=function(e){var t=e.node,n=void 0===t?C:t;ec.searchPseudoElements&&tE(n)}}},{mixout:function(){return{dom:{unwatch:function(){th=!0,tM=!0}}}},hooks:function(){return{bootstrap:function(){tb(e0("mutationObserverCallbacks",{}))},noAuto:function(){ty&&ty.disconnect()},watch:function(e){var t=e.observeMutationsRoot;tM?th=!1:tb(e0("mutationObserverCallbacks",{observeMutationsRoot:t}))}}}},{mixout:function(){return{parse:{transform:function(e){return tR(e)}}}},hooks:function(){return{parseNodeAttributes:function(e,t){var n=t.getAttribute("data-fa-transform");return n&&(e.transform=tR(n)),e}}},provides:function(e){e.generateAbstractTransformGrouping=function(e){var t=e.main,n=e.transform,r=e.containerWidth,i=e.iconWidth,o="translate(".concat(32*n.x,", ").concat(32*n.y,") "),s="scale(".concat(n.size/16*(n.flipX?-1:1),", ").concat(n.size/16*(n.flipY?-1:1),") "),l="rotate(".concat(n.rotate," 0 0)"),c={transform:"".concat(o," ").concat(s," ").concat(l)},u={outer:{transform:"translate(".concat(r/2," 256)")},inner:c,path:{transform:"translate(".concat(-(i/2*1)," -256)")}};return{tag:"g",attributes:a({},u.outer),children:[{tag:"g",attributes:a({},u.inner),children:[{tag:t.icon.tag,children:t.icon.children,attributes:a(a({},t.icon.attributes),u.path)}]}]}}}},{hooks:function(){return{parseNodeAttributes:function(e,t){var n=t.getAttribute("data-fa-mask"),r=n?eK(n.split(" ").map(function(e){return e.trim()})):eY();return r.prefix||(r.prefix=eI),e.mask=r,e.maskId=t.getAttribute("data-fa-mask-id"),e}}},provides:function(e){e.generateAbstractMask=function(e){var t,n,r,i,o,s,l,c,u=e.children,f=e.attributes,d=e.main,m=e.mask,p=e.maskId,g=e.transform,h=d.width,y=d.icon,b=m.width,v=m.icon,x=(n=(t={transform:g,containerWidth:b,iconWidth:h}).transform,r=t.containerWidth,i=t.iconWidth,o="translate(".concat(32*n.x,", ").concat(32*n.y,") "),s="scale(".concat(n.size/16*(n.flipX?-1:1),", ").concat(n.size/16*(n.flipY?-1:1),") "),l="rotate(".concat(n.rotate," 0 0)"),c={transform:"".concat(o," ").concat(s," ").concat(l)},{outer:{transform:"translate(".concat(r/2," 256)")},inner:c,path:{transform:"translate(".concat(-(i/2*1)," -256)")}}),k={tag:"rect",attributes:a(a({},tN),{},{fill:"white"})},w=y.children?{children:y.children.map(tI)}:{},S={tag:"g",attributes:a({},x.inner),children:[tI(a({tag:y.tag,attributes:a(a({},y.attributes),x.path)},w))]},O={tag:"g",attributes:a({},x.outer),children:[S]},A="mask-".concat(p||ed()),P="clip-".concat(p||ed()),j={tag:"mask",attributes:a(a({},tN),{},{id:A,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[k,O]},C={tag:"defs",children:[{tag:"clipPath",attributes:{id:P},children:"g"===v.tag?v.children:[v]},j]};return u.push(C,{tag:"rect",attributes:a({fill:"currentColor","clip-path":"url(#".concat(P,")"),mask:"url(#".concat(A,")")},tN)}),{children:u,attributes:f}}}},{provides:function(e){var t=!1;j.matchMedia&&(t=j.matchMedia("(prefers-reduced-motion: reduce)").matches),e.missingIconAbstract=function(){var e=[],n={fill:"currentColor"},r={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};e.push({tag:"path",attributes:a(a({},n),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var i=a(a({},r),{},{attributeName:"opacity"}),o={tag:"circle",attributes:a(a({},n),{},{cx:"256",cy:"364",r:"28"}),children:[]};return t||o.children.push({tag:"animate",attributes:a(a({},r),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:a(a({},i),{},{values:"1;0;1;1;0;1;"})}),e.push(o),e.push({tag:"path",attributes:a(a({},n),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:t?[]:[{tag:"animate",attributes:a(a({},i),{},{values:"1;0;0;0;0;1;"})}]}),t||e.push({tag:"path",attributes:a(a({},n),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:a(a({},i),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:e}}}},{hooks:function(){return{parseNodeAttributes:function(e,t){var n=t.getAttribute("data-fa-symbol");return e.symbol=null!==n&&(""===n||n),e}}}}],eX={},Object.keys(eJ).forEach(function(e){-1===eQ.indexOf(e)&&delete eJ[e]}),eq.forEach(function(e){var t=e.mixout?e.mixout():{};if(Object.keys(t).forEach(function(e){"function"==typeof t[e]&&(e3[e]=t[e]),"object"===i(t[e])&&Object.keys(t[e]).forEach(function(n){e3[e]||(e3[e]={}),e3[e][n]=t[e][n]})}),e.hooks){var n=e.hooks();Object.keys(n).forEach(function(e){eX[e]||(eX[e]=[]),eX[e].push(n[e])})}e.provides&&e.provides(eJ)}),e3.noAuto,e3.config,e3.library,e3.dom;var tT=e3.parse;e3.findIconDefinition,e3.toHtml;var tz=e3.icon;e3.layer,e3.text,e3.counter;var t$=n(5697),tZ=n.n(t$),tL=n(7294);function tF(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 tD(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n0||!Array.isArray(t)&&t?tB({},e,t):{}}var tX=tL.forwardRef(function(e,t){var n,r,a,i,o,s,l,c,u,f,d,m,p,g,h,y,b,v,x,k=e.icon,w=e.mask,S=e.symbol,O=e.className,A=e.title,P=e.titleId,j=e.maskId,C=tU(k),_=tq("classes",[].concat(tW((r=e.beat,a=e.fade,i=e.beatFade,o=e.bounce,s=e.shake,l=e.flash,c=e.spin,u=e.spinPulse,f=e.spinReverse,d=e.pulse,m=e.fixedWidth,p=e.inverse,g=e.border,h=e.listItem,y=e.flip,b=e.size,v=e.rotation,x=e.pull,Object.keys((tB(n={"fa-beat":r,"fa-fade":a,"fa-beat-fade":i,"fa-bounce":o,"fa-shake":s,"fa-flash":l,"fa-spin":c,"fa-spin-reverse":f,"fa-spin-pulse":u,"fa-pulse":d,"fa-fw":m,"fa-inverse":p,"fa-border":g,"fa-li":h,"fa-flip":!0===y,"fa-flip-horizontal":"horizontal"===y||"both"===y,"fa-flip-vertical":"vertical"===y||"both"===y},"fa-".concat(b),null!=b),tB(n,"fa-rotate-".concat(v),null!=v&&0!==v),tB(n,"fa-pull-".concat(x),null!=x),tB(n,"fa-swap-opacity",e.swapOpacity),n)).map(function(e){return n[e]?e:null}).filter(function(e){return e}))),tW(O.split(" ")))),E=tq("transform","string"==typeof e.transform?tT.transform(e.transform):e.transform),M=tq("mask",tU(w)),R=tz(C,tD(tD(tD(tD({},_),E),M),{},{symbol:S,title:A,titleId:P,maskId:j}));if(!R)return!function(){if(!tK&&console&&"function"==typeof console.error){var e;(e=console).error.apply(e,arguments)}}("Could not find icon",C),null;var N=R.abstract,I={ref:t};return Object.keys(e).forEach(function(t){tX.defaultProps.hasOwnProperty(t)||(I[t]=e[t])}),tJ(N[0],I)});tX.displayName="FontAwesomeIcon",tX.propTypes={beat:tZ().bool,border:tZ().bool,beatFade:tZ().bool,bounce:tZ().bool,className:tZ().string,fade:tZ().bool,flash:tZ().bool,mask:tZ().oneOfType([tZ().object,tZ().array,tZ().string]),maskId:tZ().string,fixedWidth:tZ().bool,inverse:tZ().bool,flip:tZ().oneOf([!0,!1,"horizontal","vertical","both"]),icon:tZ().oneOfType([tZ().object,tZ().array,tZ().string]),listItem:tZ().bool,pull:tZ().oneOf(["right","left"]),pulse:tZ().bool,rotation:tZ().oneOf([0,90,180,270]),shake:tZ().bool,size:tZ().oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:tZ().bool,spinPulse:tZ().bool,spinReverse:tZ().bool,symbol:tZ().oneOfType([tZ().bool,tZ().string]),title:tZ().string,titleId:tZ().string,transform:tZ().oneOfType([tZ().string,tZ().object]),swapOpacity:tZ().bool},tX.defaultProps={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:!1,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1};var tJ=(function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof n)return n;var a=(n.children||[]).map(function(n){return e(t,n)}),i=Object.keys(n.attributes||{}).reduce(function(e,t){var r=n.attributes[t];switch(t){case"class":e.attrs.className=r,delete n.attributes.class;break;case"style":e.attrs.style=r.split(";").map(function(e){return e.trim()}).filter(function(e){return e}).reduce(function(e,t){var n=t.indexOf(":"),r=tG(t.slice(0,n)),a=t.slice(n+1).trim();return r.startsWith("webkit")?e[r.charAt(0).toUpperCase()+r.slice(1)]=a:e[r]=a,e},{});break;default:0===t.indexOf("aria-")||0===t.indexOf("data-")?e.attrs[t.toLowerCase()]=r:e.attrs[tG(t)]=r}return e},{attrs:{}}),o=r.style,s=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(r,tV);return i.attrs.style=tD(tD({},i.attrs.style),void 0===o?{}:o),t.apply(void 0,[n.tag,tD(tD({},i.attrs),s)].concat(tW(a)))}).bind(null,tL.createElement)},7576:function(e,t,n){"use strict";let r;n.d(t,{Z:function(){return eD}});var a=n(3366),i=n(7462),o=n(7294),s=n.t(o,2),l=function(){for(var e,t,n=0,r="",a=arguments.length;n{r[a]=e[a].reduce((e,r)=>{if(r){let a=t(r);""!==a&&e.push(a),n&&n[r]&&e.push(n[r])}return e},[]).join(" ")}),r}var d=n(7172),m=n(6498),p=function(e=null){let t=o.useContext(m.T);return t&&0!==Object.keys(t).length?t:e};let g=(0,d.Z)();var h=function(e=g){return p(e)},y=n(8758),b=n(8027),v=n(4920),x=n(6523),k=n(2101),w={black:"#000",white:"#fff"},S={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},O={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},A={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"},P={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"},j={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"},C={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},_={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"};let E=["mode","contrastThreshold","tonalOffset"],M={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:w.white,default:w.white},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}},R={text:{primary:w.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:w.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function N(e,t,n,r){let a=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,k.$n)(e.main,a):"dark"===t&&(e.dark=(0,k._j)(e.main,i)))}let I=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"],T={textTransform:"uppercase"},z='"Roboto", "Helvetica", "Arial", sans-serif';function $(...e){return`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2),${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14),${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`}let Z=["none",$(0,2,1,-1,0,1,1,0,0,1,3,0),$(0,3,1,-2,0,2,2,0,0,1,5,0),$(0,3,3,-2,0,3,4,0,0,1,8,0),$(0,2,4,-1,0,4,5,0,0,1,10,0),$(0,3,5,-1,0,5,8,0,0,1,14,0),$(0,3,5,-1,0,6,10,0,0,1,18,0),$(0,4,5,-2,0,7,10,1,0,2,16,1),$(0,5,5,-3,0,8,10,1,0,3,14,2),$(0,5,6,-3,0,9,12,1,0,3,16,2),$(0,6,6,-3,0,10,14,1,0,4,18,3),$(0,6,7,-4,0,11,15,1,0,4,20,3),$(0,7,8,-4,0,12,17,2,0,5,22,4),$(0,7,8,-4,0,13,19,2,0,5,24,4),$(0,7,9,-4,0,14,21,2,0,5,26,4),$(0,8,9,-5,0,15,22,2,0,6,28,5),$(0,8,10,-5,0,16,24,2,0,6,30,5),$(0,8,11,-5,0,17,26,2,0,6,32,5),$(0,9,11,-5,0,18,28,2,0,7,34,6),$(0,9,12,-6,0,19,29,2,0,7,36,6),$(0,10,13,-6,0,20,31,3,0,8,38,7),$(0,10,13,-6,0,21,33,3,0,8,40,7),$(0,10,14,-6,0,22,35,3,0,8,42,7),$(0,11,14,-7,0,23,36,3,0,9,44,8),$(0,11,15,-7,0,24,38,3,0,9,46,8)],L=["duration","easing","delay"],F={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)"},D={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function H(e){return`${Math.round(e)}ms`}function B(e){if(!e)return 0;let t=e/36;return Math.round((4+15*t**.25+t/5)*10)}var W={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};let Y=["breakpoints","mixins","spacing","palette","transitions","typography","shape"],G=function(e={}){var t;let{mixins:n={},palette:r={},transitions:o={},typography:s={}}=e,l=(0,a.Z)(e,Y);if(e.vars)throw Error((0,y.Z)(18));let c=function(e){let{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,o=(0,a.Z)(e,E),s=e.primary||function(e="light"){return"dark"===e?{main:j[200],light:j[50],dark:j[400]}:{main:j[700],light:j[400],dark:j[800]}}(t),l=e.secondary||function(e="light"){return"dark"===e?{main:O[200],light:O[50],dark:O[400]}:{main:O[500],light:O[300],dark:O[700]}}(t),c=e.error||function(e="light"){return"dark"===e?{main:A[500],light:A[300],dark:A[700]}:{main:A[700],light:A[400],dark:A[800]}}(t),u=e.info||function(e="light"){return"dark"===e?{main:C[400],light:C[300],dark:C[700]}:{main:C[700],light:C[500],dark:C[900]}}(t),f=e.success||function(e="light"){return"dark"===e?{main:_[400],light:_[300],dark:_[700]}:{main:_[800],light:_[500],dark:_[900]}}(t),d=e.warning||function(e="light"){return"dark"===e?{main:P[400],light:P[300],dark:P[700]}:{main:"#ed6c02",light:P[500],dark:P[900]}}(t);function m(e){return(0,k.mi)(e,R.text.primary)>=n?R.text.primary:M.text.primary}let p=({color:e,name:t,mainShade:n=500,lightShade:a=300,darkShade:o=700})=>{if(!(e=(0,i.Z)({},e)).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw Error((0,y.Z)(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw Error((0,y.Z)(12,t?` (${t})`:"",JSON.stringify(e.main)));return N(e,"light",a,r),N(e,"dark",o,r),e.contrastText||(e.contrastText=m(e.main)),e};return(0,b.Z)((0,i.Z)({common:(0,i.Z)({},w),mode:t,primary:p({color:s,name:"primary"}),secondary:p({color:l,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:c,name:"error"}),warning:p({color:d,name:"warning"}),info:p({color:u,name:"info"}),success:p({color:f,name:"success"}),grey:S,contrastThreshold:n,getContrastText:m,augmentColor:p,tonalOffset:r},{dark:R,light:M}[t]),o)}(r),u=(0,d.Z)(e),f=(0,b.Z)(u,{mixins:(t=u.breakpoints,(0,i.Z)({toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}}},n)),palette:c,shadows:Z.slice(),typography:function(e,t){let n="function"==typeof t?t(e):t,{fontFamily:r=z,fontSize:o=14,fontWeightLight:s=300,fontWeightRegular:l=400,fontWeightMedium:c=500,fontWeightBold:u=700,htmlFontSize:f=16,allVariants:d,pxToRem:m}=n,p=(0,a.Z)(n,I),g=o/14,h=m||(e=>`${e/f*g}rem`),y=(e,t,n,a,o)=>(0,i.Z)({fontFamily:r,fontWeight:e,fontSize:h(t),lineHeight:n},r===z?{letterSpacing:`${Math.round(a/t*1e5)/1e5}em`}:{},o,d),v={h1:y(s,96,1.167,-1.5),h2:y(s,60,1.2,-.5),h3:y(l,48,1.167,0),h4:y(l,34,1.235,.25),h5:y(l,24,1.334,0),h6:y(c,20,1.6,.15),subtitle1:y(l,16,1.75,.15),subtitle2:y(c,14,1.57,.1),body1:y(l,16,1.5,.15),body2:y(l,14,1.43,.15),button:y(c,14,1.75,.4,T),caption:y(l,12,1.66,.4),overline:y(l,12,2.66,1,T),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,b.Z)((0,i.Z)({htmlFontSize:f,pxToRem:h,fontFamily:r,fontSize:o,fontWeightLight:s,fontWeightRegular:l,fontWeightMedium:c,fontWeightBold:u},v),p,{clone:!1})}(c,s),transitions:function(e){let t=(0,i.Z)({},F,e.easing),n=(0,i.Z)({},D,e.duration);return(0,i.Z)({getAutoHeightDuration:B,create:(e=["all"],r={})=>{let{duration:i=n.standard,easing:o=t.easeInOut,delay:s=0}=r;return(0,a.Z)(r,L),(Array.isArray(e)?e:[e]).map(e=>`${e} ${"string"==typeof i?i:H(i)} ${o} ${"string"==typeof s?s:H(s)}`).join(",")}},e,{easing:t,duration:n})}(o),zIndex:(0,i.Z)({},W)});return(f=[].reduce((e,t)=>(0,b.Z)(e,t),f=(0,b.Z)(f,l))).unstable_sxConfig=(0,i.Z)({},v.Z,null==l?void 0:l.unstable_sxConfig),f.unstable_sx=function(e){return(0,x.Z)({sx:e,theme:this})},f}();var V="$$material",K=n(5200).Z;let U=0,q=s["useId".toString()];var X=function(e){if(void 0!==q){let t=q();return null!=e?e:t}return function(e){let[t,n]=o.useState(e),r=e||t;return o.useEffect(()=>{null==t&&(U+=1,n(`mui-${U}`))},[t]),r}(e)},J=function({controlled:e,default:t,name:n,state:r="value"}){let{current:a}=o.useRef(void 0!==e),[i,s]=o.useState(t),l=o.useCallback(e=>{a||s(e)},[]);return[a?e:i,l]};class Q{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Q}start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}}let ee=!0,et=!1,en=new Q,er={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 ea(e){e.metaKey||e.altKey||e.ctrlKey||(ee=!0)}function ei(){ee=!1}function eo(){"hidden"===this.visibilityState&&et&&(ee=!0)}var es=function(){let e=o.useCallback(e=>{if(null!=e){var t;(t=e.ownerDocument).addEventListener("keydown",ea,!0),t.addEventListener("mousedown",ei,!0),t.addEventListener("pointerdown",ei,!0),t.addEventListener("touchstart",ei,!0),t.addEventListener("visibilitychange",eo,!0)}},[]),t=o.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!function(e){let{target:t}=e;try{return t.matches(":focus-visible")}catch(e){}return ee||function(e){let{type:t,tagName:n}=e;return"INPUT"===n&&!!er[t]&&!e.readOnly||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(et=!0,en.start(100,()=>{et=!1}),t.current=!1,!0)},ref:e}};function el({props:e,name:t}){return function({props:e,name:t,defaultTheme:n,themeId:r}){let a=h(n);return r&&(a=a[r]||a),function(e){let{theme:t,name:n,props:r}=e;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?function e(t,n){let r=(0,i.Z)({},n);return Object.keys(t).forEach(a=>{if(a.toString().match(/^(components|slots)$/))r[a]=(0,i.Z)({},t[a],r[a]);else if(a.toString().match(/^(componentsProps|slotProps)$/)){let o=t[a]||{},s=n[a];r[a]={},s&&Object.keys(s)?o&&Object.keys(o)?(r[a]=(0,i.Z)({},s),Object.keys(o).forEach(t=>{r[a][t]=e(o[t],s[t])})):r[a]=s:r[a]=o}else void 0===r[a]&&(r[a]=t[a])}),r}(t.components[n].defaultProps,r):r}({theme:a,name:t,props:e})}({props:e,name:t,defaultTheme:G,themeId:V})}var ec=n(8128);let eu=ec.x9,ef=(0,ec.ZP)({themeId:V,defaultTheme:G,rootShouldForwardProp:e=>(0,ec.x9)(e)&&"classes"!==e}),ed=e=>e,em=(r=ed,{configure(e){r=e},generate:e=>r(e),reset(){r=ed}}),ep={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function eg(e,t,n="Mui"){let r=ep[t];return r?`${n}-${r}`:`${em.generate(e)}-${t}`}function eh(e,t,n="Mui"){let r={};return t.forEach(t=>{r[t]=eg(e,t,n)}),r}function ey(e){return eg("MuiSvgIcon",e)}eh("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var eb=n(5893);let ev=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],ex=e=>{let{color:t,fontSize:n,classes:r}=e;return f({root:["root","inherit"!==t&&`color${K(t)}`,`fontSize${K(n)}`]},ey,r)},ek=ef("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${K(n.color)}`],t[`fontSize${K(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,a,i,o,s,l,c,u,f,d,m,p;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(n=e.transitions)||null==(r=n.create)?void 0:r.call(n,"fill",{duration:null==(a=e.transitions)||null==(a=a.duration)?void 0:a.shorter}),fontSize:({inherit:"inherit",small:(null==(i=e.typography)||null==(o=i.pxToRem)?void 0:o.call(i,20))||"1.25rem",medium:(null==(s=e.typography)||null==(l=s.pxToRem)?void 0:l.call(s,24))||"1.5rem",large:(null==(c=e.typography)||null==(u=c.pxToRem)?void 0:u.call(c,35))||"2.1875rem"})[t.fontSize],color:null!=(f=null==(d=(e.vars||e).palette)||null==(d=d[t.color])?void 0:d.main)?f:({action:null==(m=(e.vars||e).palette)||null==(m=m.action)?void 0:m.active,disabled:null==(p=(e.vars||e).palette)||null==(p=p.action)?void 0:p.disabled,inherit:void 0})[t.color]}}),ew=o.forwardRef(function(e,t){let n=el({props:e,name:"MuiSvgIcon"}),{children:r,className:s,color:c="inherit",component:u="svg",fontSize:f="medium",htmlColor:d,inheritViewBox:m=!1,titleAccess:p,viewBox:g="0 0 24 24"}=n,h=(0,a.Z)(n,ev),y=o.isValidElement(r)&&"svg"===r.type,b=(0,i.Z)({},n,{color:c,component:u,fontSize:f,instanceFontSize:e.fontSize,inheritViewBox:m,viewBox:g,hasSvgAsChild:y}),v={};m||(v.viewBox=g);let x=ex(b);return(0,eb.jsxs)(ek,(0,i.Z)({as:u,className:l(x.root,s),focusable:"false",color:d,"aria-hidden":!p||void 0,role:p?"img":void 0,ref:t},v,h,y&&r.props,{ownerState:b,children:[y?r.props.children:r,p?(0,eb.jsx)("title",{children:p}):null]}))});function eS(e,t){function n(n,r){return(0,eb.jsx)(ew,(0,i.Z)({"data-testid":`${t}Icon`,ref:r},n,{children:e}))}return n.muiName=ew.muiName,o.memo(o.forwardRef(n))}ew.muiName="SvgIcon";var eO=eS((0,eb.jsx)("path",{d:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}),"Star"),eA=eS((0,eb.jsx)("path",{d:"M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}),"StarBorder");function eP(e){return eg("MuiRating",e)}let ej=eh("MuiRating",["root","sizeSmall","sizeMedium","sizeLarge","readOnly","disabled","focusVisible","visuallyHidden","pristine","label","labelEmptyValueActive","icon","iconEmpty","iconFilled","iconHover","iconFocus","iconActive","decimal"]),eC=["value"],e_=["className","defaultValue","disabled","emptyIcon","emptyLabelText","getLabelText","highlightSelectedOnly","icon","IconContainerComponent","max","name","onChange","onChangeActive","onMouseLeave","onMouseMove","precision","readOnly","size","value"];function eE(e,t){return null==e?e:Number((Math.round(e/t)*t).toFixed(function(e){let t=e.toString().split(".")[1];return t?t.length:0}(t)))}let eM=e=>{let{classes:t,size:n,readOnly:r,disabled:a,emptyValueFocused:i,focusVisible:o}=e;return f({root:["root",`size${K(n)}`,a&&"disabled",o&&"focusVisible",r&&"readOnly"],label:["label","pristine"],labelEmptyValue:[i&&"labelEmptyValueActive"],icon:["icon"],iconEmpty:["iconEmpty"],iconFilled:["iconFilled"],iconHover:["iconHover"],iconFocus:["iconFocus"],iconActive:["iconActive"],decimal:["decimal"],visuallyHidden:["visuallyHidden"]},eP,t)},eR=ef("span",{name:"MuiRating",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${ej.visuallyHidden}`]:t.visuallyHidden},t.root,t[`size${K(n.size)}`],n.readOnly&&t.readOnly]}})(({theme:e,ownerState:t})=>(0,i.Z)({display:"inline-flex",position:"relative",fontSize:e.typography.pxToRem(24),color:"#faaf00",cursor:"pointer",textAlign:"left",width:"min-content",WebkitTapHighlightColor:"transparent",[`&.${ej.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${ej.focusVisible} .${ej.iconActive}`]:{outline:"1px solid #999"},[`& .${ej.visuallyHidden}`]:u},"small"===t.size&&{fontSize:e.typography.pxToRem(18)},"large"===t.size&&{fontSize:e.typography.pxToRem(30)},t.readOnly&&{pointerEvents:"none"})),eN=ef("label",{name:"MuiRating",slot:"Label",overridesResolver:({ownerState:e},t)=>[t.label,e.emptyValueFocused&&t.labelEmptyValueActive]})(({ownerState:e})=>(0,i.Z)({cursor:"inherit"},e.emptyValueFocused&&{top:0,bottom:0,position:"absolute",outline:"1px solid #999",width:"100%"})),eI=ef("span",{name:"MuiRating",slot:"Icon",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.iconEmpty&&t.iconEmpty,n.iconFilled&&t.iconFilled,n.iconHover&&t.iconHover,n.iconFocus&&t.iconFocus,n.iconActive&&t.iconActive]}})(({theme:e,ownerState:t})=>(0,i.Z)({display:"flex",transition:e.transitions.create("transform",{duration:e.transitions.duration.shortest}),pointerEvents:"none"},t.iconActive&&{transform:"scale(1.2)"},t.iconEmpty&&{color:(e.vars||e).palette.action.disabled})),eT=ef("span",{name:"MuiRating",slot:"Decimal",shouldForwardProp:e=>eu(e)&&"iconActive"!==e,overridesResolver:(e,t)=>{let{iconActive:n}=e;return[t.decimal,n&&t.iconActive]}})(({iconActive:e})=>(0,i.Z)({position:"relative"},e&&{transform:"scale(1.2)"}));function ez(e){let t=(0,a.Z)(e,eC);return(0,eb.jsx)("span",(0,i.Z)({},t))}function e$(e){let{classes:t,disabled:n,emptyIcon:r,focus:a,getLabelText:s,highlightSelectedOnly:c,hover:u,icon:f,IconContainerComponent:d,isActive:m,itemValue:p,labelProps:g,name:h,onBlur:y,onChange:b,onClick:v,onFocus:x,readOnly:k,ownerState:w,ratingValue:S,ratingValueRounded:O}=e,A=c?p===S:p<=S,P=p<=u,j=p<=a,C=p===O,_=X(),E=(0,eb.jsx)(eI,{as:d,value:p,className:l(t.icon,A?t.iconFilled:t.iconEmpty,P&&t.iconHover,j&&t.iconFocus,m&&t.iconActive),ownerState:(0,i.Z)({},w,{iconEmpty:!A,iconFilled:A,iconHover:P,iconFocus:j,iconActive:m}),children:r&&!A?r:f});return k?(0,eb.jsx)("span",(0,i.Z)({},g,{children:E})):(0,eb.jsxs)(o.Fragment,{children:[(0,eb.jsxs)(eN,(0,i.Z)({ownerState:(0,i.Z)({},w,{emptyValueFocused:void 0}),htmlFor:_},g,{children:[E,(0,eb.jsx)("span",{className:t.visuallyHidden,children:s(p)})]})),(0,eb.jsx)("input",{className:t.visuallyHidden,onFocus:x,onBlur:y,onChange:b,onClick:v,disabled:n,value:p,id:_,type:"radio",name:h,checked:C})]})}let eZ=(0,eb.jsx)(eO,{fontSize:"inherit"}),eL=(0,eb.jsx)(eA,{fontSize:"inherit"});function eF(e){return`${e} Star${1!==e?"s":""}`}var eD=o.forwardRef(function(e,t){let n=el({name:"MuiRating",props:e}),{className:r,defaultValue:s=null,disabled:u=!1,emptyIcon:f=eL,emptyLabelText:d="Empty",getLabelText:m=eF,highlightSelectedOnly:p=!1,icon:g=eZ,IconContainerComponent:y=ez,max:b=5,name:v,onChange:x,onChangeActive:k,onMouseLeave:w,onMouseMove:S,precision:O=1,readOnly:A=!1,size:P="medium",value:j}=n,C=(0,a.Z)(n,e_),_=X(v),[E,M]=J({controlled:j,default:s,name:"Rating"}),R=eE(E,O),N=function(){let e=h(G);return e[V]||e}(),[{hover:I,focus:T},z]=o.useState({hover:-1,focus:-1}),$=R;-1!==I&&($=I),-1!==T&&($=T);let{isFocusVisibleRef:Z,onBlur:L,onFocus:F,ref:D}=es(),[H,B]=o.useState(!1),W=o.useRef(),Y=function(...e){return o.useMemo(()=>e.every(e=>null==e)?null:t=>{e.forEach(e=>{"function"==typeof e?e(t):e&&(e.current=t)})},e)}(D,W,t),K=e=>{let t=""===e.target.value?null:parseFloat(e.target.value);-1!==I&&(t=I),M(t),x&&x(e,t)},U=e=>{(0!==e.clientX||0!==e.clientY)&&(z({hover:-1,focus:-1}),M(null),x&&parseFloat(e.target.value)===R&&x(e,null))},q=e=>{F(e),!0===Z.current&&B(!0);let t=parseFloat(e.target.value);z(e=>({hover:e.hover,focus:t}))},Q=e=>{-1===I&&(L(e),!1===Z.current&&B(!1),z(e=>({hover:e.hover,focus:-1})))},[ee,et]=o.useState(!1),en=(0,i.Z)({},n,{defaultValue:s,disabled:u,emptyIcon:f,emptyLabelText:d,emptyValueFocused:ee,focusVisible:H,getLabelText:m,icon:g,IconContainerComponent:y,max:b,precision:O,readOnly:A,size:P}),er=eM(en);return(0,eb.jsxs)(eR,(0,i.Z)({ref:Y,onMouseMove:e=>{S&&S(e);let{right:t,left:n,width:r}=W.current.getBoundingClientRect(),a=eE(b*("rtl"===N.direction?(t-e.clientX)/r:(e.clientX-n)/r)+O/2,O);a=(0,c.Z)(a,O,b),z(e=>e.hover===a&&e.focus===a?e:{hover:a,focus:a}),B(!1),k&&I!==a&&k(e,a)},onMouseLeave:e=>{w&&w(e),z({hover:-1,focus:-1}),k&&-1!==I&&k(e,-1)},className:l(er.root,r,A&&"MuiRating-readOnly"),ownerState:en,role:A?"img":null,"aria-label":A?m($):null},C,{children:[Array.from(Array(b)).map((e,t)=>{let n=t+1,r={classes:er,disabled:u,emptyIcon:f,focus:T,getLabelText:m,highlightSelectedOnly:p,hover:I,icon:g,IconContainerComponent:y,name:_,onBlur:Q,onChange:K,onClick:U,onFocus:q,ratingValue:$,ratingValueRounded:R,readOnly:A,ownerState:en},a=n===Math.ceil($)&&(-1!==I||-1!==T);if(O<1){let e=Array.from(Array(1/O));return(0,eb.jsx)(eT,{className:l(er.decimal,a&&er.iconActive),ownerState:en,iconActive:a,children:e.map((t,a)=>{let o=eE(n-1+(a+1)*O,O);return(0,eb.jsx)(e$,(0,i.Z)({},r,{isActive:!1,itemValue:o,labelProps:{style:e.length-1===a?{}:{width:o===$?`${(a+1)*O*100}%`:"0%",overflow:"hidden",position:"absolute"}}}),o)})},n)}return(0,eb.jsx)(e$,(0,i.Z)({},r,{isActive:a,itemValue:n}),n)}),!A&&!u&&(0,eb.jsxs)(eN,{className:l(er.label,er.labelEmptyValue),ownerState:en,children:[(0,eb.jsx)("input",{className:er.visuallyHidden,value:"",id:`${_}-empty`,type:"radio",name:_,checked:null==R,onFocus:()=>et(!0),onBlur:()=>et(!1),onChange:K}),(0,eb.jsx)("span",{className:er.visuallyHidden,children:d})]})]}))})},2894:function(e,t,n){"use strict";let r;n.r(t),n.d(t,{GlobalStyles:function(){return A},StyledEngineProvider:function(){return O},ThemeContext:function(){return c.T},css:function(){return k},default:function(){return P},internal_processStyles:function(){return j},keyframes:function(){return w}});var a=n(7462),i=n(7294),o=n(5042),s=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,l=(0,o.Z)(function(e){return s.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&91>e.charCodeAt(2)}),c=n(6498),u=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},f=function(e,t,n){u(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var a=t;do e.insert(t===a?"."+r:"",a,e.sheet,!0),a=a.next;while(void 0!==a)}},d=n(8137),m=n(7278),p=function(e){return"theme"!==e},g=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?l:p},h=function(e,t,n){var r;if(t){var a=t.shouldForwardProp;r=e.__emotion_forwardProp&&a?function(t){return e.__emotion_forwardProp(t)&&a(t)}:a}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},y=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return u(t,n,r),(0,m.L)(function(){return f(t,n,r)}),null},b=(function e(t,n){var r,o,s=t.__emotion_real===t,l=s&&t.__emotion_base||t;void 0!==n&&(r=n.label,o=n.target);var u=h(t,n,s),f=u||g(l),m=!f("as");return function(){var p=arguments,b=s&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&b.push("label:"+r+";"),null==p[0]||void 0===p[0].raw)b.push.apply(b,p);else{b.push(p[0][0]);for(var v=p.length,x=1;xt(null==e||0===Object.keys(e).length?n:e):t;return(0,S.jsx)(x,{styles:r})}function P(e,t){return b(e,t)}"object"==typeof document&&(r=(0,v.Z)({key:"css",prepend:!0}));let j=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}},2101:function(e,t,n){"use strict";var r=n(4836);t._j=function(e,t){if(e=s(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return l(e)},t.mi=function(e,t){let n=c(e),r=c(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},t.$n=function(e,t){if(e=s(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return l(e)};var a=r(n(743)),i=r(n(7859));function o(e,t=0,n=1){return(0,i.default)(e,t,n)}function s(e){let t;if(e.type)return e;if("#"===e.charAt(0))return s(function(e){e=e.slice(1);let t=RegExp(`.{1,${e.length>=6?2:1}}`,"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map(e=>e+e)),n?`rgb${4===n.length?"a":""}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", ")})`:""}(e));let n=e.indexOf("("),r=e.substring(0,n);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(r))throw Error((0,a.default)(9,e));let i=e.substring(n+1,e.length-1);if("color"===r){if(t=(i=i.split(" ")).shift(),4===i.length&&"/"===i[3].charAt(0)&&(i[3]=i[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(t))throw Error((0,a.default)(10,t))}else i=i.split(",");return{type:r,values:i=i.map(e=>parseFloat(e)),colorSpace:t}}function l(e){let{type:t,colorSpace:n}=e,{values:r}=e;return -1!==t.indexOf("rgb")?r=r.map((e,t)=>t<3?parseInt(e,10):e):-1!==t.indexOf("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=-1!==t.indexOf("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function c(e){let t="hsl"===(e=s(e)).type||"hsla"===e.type?s(function(e){let{values:t}=e=s(e),n=t[0],r=t[1]/100,a=t[2]/100,i=r*Math.min(a,1-a),o=(e,t=(e+n/30)%12)=>a-i*Math.max(Math.min(t-3,9-t,1),-1),c="rgb",u=[Math.round(255*o(0)),Math.round(255*o(8)),Math.round(255*o(4))];return"hsla"===e.type&&(c+="a",u.push(t[3])),l({type:c,values:u})}(e)).values:e.values;return Number((.2126*(t=t.map(t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)))[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}},8128:function(e,t,n){"use strict";var r=n(4836);t.ZP=function(e={}){let{themeId:t,defaultTheme:n=g,rootShouldForwardProp:r=p,slotShouldForwardProp:l=p}=e,u=e=>(0,c.default)((0,a.default)({},e,{theme:y((0,a.default)({},e,{defaultTheme:n,themeId:t}))}));return u.__mui_systemSx=!0,(e,c={})=>{var f;let m;(0,o.internal_processStyles)(e,e=>e.filter(e=>!(null!=e&&e.__mui_systemSx)));let{name:g,slot:v,skipVariantsResolver:x,skipSx:k,overridesResolver:w=(f=h(v))?(e,t)=>t[f]:null}=c,S=(0,i.default)(c,d),O=void 0!==x?x:v&&"Root"!==v&&"root"!==v||!1,A=k||!1,P=p;"Root"===v||"root"===v?P=r:v?P=l:"string"==typeof e&&e.charCodeAt(0)>96&&(P=void 0);let j=(0,o.default)(e,(0,a.default)({shouldForwardProp:P,label:m},S)),C=e=>"function"==typeof e&&e.__emotion_real!==e||(0,s.isPlainObject)(e)?r=>b(e,(0,a.default)({},r,{theme:y({theme:r.theme,defaultTheme:n,themeId:t})})):e,_=(r,...i)=>{let o=C(r),s=i?i.map(C):[];g&&w&&s.push(e=>{let r=y((0,a.default)({},e,{defaultTheme:n,themeId:t}));if(!r.components||!r.components[g]||!r.components[g].styleOverrides)return null;let i=r.components[g].styleOverrides,o={};return Object.entries(i).forEach(([t,n])=>{o[t]=b(n,(0,a.default)({},e,{theme:r}))}),w(e,o)}),g&&!O&&s.push(e=>{var r;let i=y((0,a.default)({},e,{defaultTheme:n,themeId:t}));return b({variants:null==i||null==(r=i.components)||null==(r=r[g])?void 0:r.variants},(0,a.default)({},e,{theme:i}))}),A||s.push(u);let l=s.length-i.length;if(Array.isArray(r)&&l>0){let e=Array(l).fill("");(o=[...r,...e]).raw=[...r.raw,...e]}let c=j(o,...s);return e.muiName&&(c.muiName=e.muiName),c};return j.withConfig&&(_.withConfig=j.withConfig),_}},t.x9=p;var a=r(n(434)),i=r(n(7071)),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=m(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=a?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(r,i,o):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(n(2894)),s=n(211);r(n(9698)),r(n(7889));var l=r(n(9926)),c=r(n(9633));let u=["ownerState"],f=["variants"],d=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(m=function(e){return e?n:t})(e)}function p(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}let g=(0,l.default)(),h=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function y({defaultTheme:e,theme:t,themeId:n}){return 0===Object.keys(t).length?e:t[n]||t}function b(e,t){let{ownerState:n}=t,r=(0,i.default)(t,u),o="function"==typeof e?e((0,a.default)({ownerState:n},r)):e;if(Array.isArray(o))return o.flatMap(e=>b(e,(0,a.default)({ownerState:n},r)));if(o&&"object"==typeof o&&Array.isArray(o.variants)){let{variants:e=[]}=o,t=(0,i.default)(o,f);return e.forEach(e=>{let i=!0;"function"==typeof e.props?i=e.props((0,a.default)({ownerState:n},r,n)):Object.keys(e.props).forEach(t=>{(null==n?void 0:n[t])!==e.props[t]&&r[t]!==e.props[t]&&(i=!1)}),i&&(Array.isArray(t)||(t=[t]),t.push("function"==typeof e.style?e.style((0,a.default)({ownerState:n},r,n)):e.style))}),t}return o}},5408:function(e,t,n){"use strict";n.d(t,{L7:function(){return s},VO:function(){return r},W8:function(){return o},k9:function(){return i}});let r={xs:0,sm:600,md:900,lg:1200,xl:1536},a={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${r[e]}px)`};function i(e,t,n){let i=e.theme||{};if(Array.isArray(t)){let e=i.breakpoints||a;return t.reduce((r,a,i)=>(r[e.up(e.keys[i])]=n(t[i]),r),{})}if("object"==typeof t){let e=i.breakpoints||a;return Object.keys(t).reduce((a,i)=>(-1!==Object.keys(e.values||r).indexOf(i)?a[e.up(i)]=n(t[i],i):a[i]=t[i],a),{})}return n(t)}function o(e={}){var t;return(null==(t=e.keys)?void 0:t.reduce((t,n)=>(t[e.up(n)]={},t),{}))||{}}function s(e,t){return e.reduce((e,t)=>{let n=e[t];return n&&0!==Object.keys(n).length||delete e[t],e},t)}},7064:function(e,t,n){"use strict";function r(e,t){return this.vars&&"function"==typeof this.getColorSchemeSelector?{[this.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:this.palette.mode===e?t:{}}n.d(t,{Z:function(){return r}})},1512:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(3366),a=n(7462);let i=["values","unit","step"],o=e=>{let t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>(0,a.Z)({},e,{[t.key]:t.val}),{})};function s(e){let{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:s=5}=e,l=(0,r.Z)(e,i),c=o(t),u=Object.keys(c);function f(e){let r="number"==typeof t[e]?t[e]:e;return`@media (min-width:${r}${n})`}function d(e){let r="number"==typeof t[e]?t[e]:e;return`@media (max-width:${r-s/100}${n})`}function m(e,r){let a=u.indexOf(r);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==a&&"number"==typeof t[u[a]]?t[u[a]]:r)-s/100}${n})`}return(0,a.Z)({keys:u,values:c,up:f,down:d,between:m,only:function(e){return u.indexOf(e)+1(0===e.length?[1]:e).map(e=>{let n=t(e);return"number"==typeof n?`${n}px`:n}).join(" ");return n.mui=!0,n}(p),v=(0,i.Z)({breakpoints:y,direction:"ltr",components:{},palette:(0,r.Z)({mode:"light"},m),spacing:b,shape:(0,r.Z)({},s,g)},h);return v.applyStyles=f.Z,(v=t.reduce((e,t)=>(0,i.Z)(e,t),v)).unstable_sxConfig=(0,r.Z)({},u.Z,null==h?void 0:h.unstable_sxConfig),v.unstable_sx=function(e){return(0,c.Z)({sx:e,theme:this})},v}},9926:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return r.Z},private_createBreakpoints:function(){return a.Z},unstable_applyStyles:function(){return i.Z}});var r=n(7172),a=n(1512),i=n(7064)},7730:function(e,t,n){"use strict";var r=n(8027);t.Z=function(e,t){return t?(0,r.Z)(e,t,{clone:!1}):e}},8700:function(e,t,n){"use strict";n.d(t,{hB:function(){return p},eI:function(){return m},NA:function(){return g},e6:function(){return y},o3:function(){return b}});var r=n(5408),a=n(4844),i=n(7730);let o={m:"margin",p:"padding"},s={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},c=function(e){let t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}(e=>{if(e.length>2){if(!l[e])return[e];e=l[e]}let[t,n]=e.split(""),r=o[t],a=s[n]||"";return Array.isArray(a)?a.map(e=>r+e):[r+a]}),u=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],f=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],d=[...u,...f];function m(e,t,n,r){var i;let o=null!=(i=(0,a.DW)(e,t,!1))?i:n;return"number"==typeof o?e=>"string"==typeof e?e:o*e:Array.isArray(o)?e=>"string"==typeof e?e:o[e]:"function"==typeof o?o:()=>void 0}function p(e){return m(e,"spacing",8,"spacing")}function g(e,t){if("string"==typeof t||null==t)return t;let n=e(Math.abs(t));return t>=0?n:"number"==typeof n?-n:`-${n}`}function h(e,t){let n=p(e.theme);return Object.keys(e).map(a=>(function(e,t,n,a){var i;if(-1===t.indexOf(n))return null;let o=(i=c(n),e=>i.reduce((t,n)=>(t[n]=g(a,e),t),{})),s=e[n];return(0,r.k9)(e,s,o)})(e,t,a,n)).reduce(i.Z,{})}function y(e){return h(e,u)}function b(e){return h(e,f)}function v(e){return h(e,d)}y.propTypes={},y.filterProps=u,b.propTypes={},b.filterProps=f,v.propTypes={},v.filterProps=d},4844:function(e,t,n){"use strict";n.d(t,{DW:function(){return i},Jq:function(){return o}});var r=n(5200),a=n(5408);function i(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){let n=`vars.${t}`.split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=n)return n}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function o(e,t,n,r=n){let a;return a="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:i(e,n)||r,t&&(a=t(a,r,e)),a}t.ZP=function(e){let{prop:t,cssProperty:n=e.prop,themeKey:s,transform:l}=e,c=e=>{if(null==e[t])return null;let c=e[t],u=i(e.theme,s)||{};return(0,a.k9)(e,c,e=>{let a=o(u,l,e);return(e===a&&"string"==typeof e&&(a=o(u,l,`${t}${"default"===e?"":(0,r.Z)(e)}`,e)),!1===n)?a:{[n]:a}})};return c.propTypes={},c.filterProps=[t],c}},4920:function(e,t,n){"use strict";n.d(t,{Z:function(){return F}});var r=n(8700),a=n(4844),i=n(7730),o=function(...e){let t=e.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),n=e=>Object.keys(e).reduce((n,r)=>t[r]?(0,i.Z)(n,t[r](e)):n,{});return n.propTypes={},n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n},s=n(5408);function l(e){return"number"!=typeof e?e:`${e}px solid`}function c(e,t){return(0,a.ZP)({prop:e,themeKey:"borders",transform:t})}let u=c("border",l),f=c("borderTop",l),d=c("borderRight",l),m=c("borderBottom",l),p=c("borderLeft",l),g=c("borderColor"),h=c("borderTopColor"),y=c("borderRightColor"),b=c("borderBottomColor"),v=c("borderLeftColor"),x=c("outline",l),k=c("outlineColor"),w=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){let t=(0,r.eI)(e.theme,"shape.borderRadius",4,"borderRadius");return(0,s.k9)(e,e.borderRadius,e=>({borderRadius:(0,r.NA)(t,e)}))}return null};w.propTypes={},w.filterProps=["borderRadius"],o(u,f,d,m,p,g,h,y,b,v,w,x,k);let S=e=>{if(void 0!==e.gap&&null!==e.gap){let t=(0,r.eI)(e.theme,"spacing",8,"gap");return(0,s.k9)(e,e.gap,e=>({gap:(0,r.NA)(t,e)}))}return null};S.propTypes={},S.filterProps=["gap"];let O=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){let t=(0,r.eI)(e.theme,"spacing",8,"columnGap");return(0,s.k9)(e,e.columnGap,e=>({columnGap:(0,r.NA)(t,e)}))}return null};O.propTypes={},O.filterProps=["columnGap"];let A=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){let t=(0,r.eI)(e.theme,"spacing",8,"rowGap");return(0,s.k9)(e,e.rowGap,e=>({rowGap:(0,r.NA)(t,e)}))}return null};A.propTypes={},A.filterProps=["rowGap"];let P=(0,a.ZP)({prop:"gridColumn"}),j=(0,a.ZP)({prop:"gridRow"}),C=(0,a.ZP)({prop:"gridAutoFlow"}),_=(0,a.ZP)({prop:"gridAutoColumns"}),E=(0,a.ZP)({prop:"gridAutoRows"}),M=(0,a.ZP)({prop:"gridTemplateColumns"});function R(e,t){return"grey"===t?t:e}function N(e){return e<=1&&0!==e?`${100*e}%`:e}o(S,O,A,P,j,C,_,E,M,(0,a.ZP)({prop:"gridTemplateRows"}),(0,a.ZP)({prop:"gridTemplateAreas"}),(0,a.ZP)({prop:"gridArea"})),o((0,a.ZP)({prop:"color",themeKey:"palette",transform:R}),(0,a.ZP)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:R}),(0,a.ZP)({prop:"backgroundColor",themeKey:"palette",transform:R}));let I=(0,a.ZP)({prop:"width",transform:N}),T=e=>void 0!==e.maxWidth&&null!==e.maxWidth?(0,s.k9)(e,e.maxWidth,t=>{var n,r;let a=(null==(n=e.theme)||null==(n=n.breakpoints)||null==(n=n.values)?void 0:n[t])||s.VO[t];return a?(null==(r=e.theme)||null==(r=r.breakpoints)?void 0:r.unit)!=="px"?{maxWidth:`${a}${e.theme.breakpoints.unit}`}:{maxWidth:a}:{maxWidth:N(t)}}):null;T.filterProps=["maxWidth"];let z=(0,a.ZP)({prop:"minWidth",transform:N}),$=(0,a.ZP)({prop:"height",transform:N}),Z=(0,a.ZP)({prop:"maxHeight",transform:N}),L=(0,a.ZP)({prop:"minHeight",transform:N});(0,a.ZP)({prop:"size",cssProperty:"width",transform:N}),(0,a.ZP)({prop:"size",cssProperty:"height",transform:N}),o(I,T,z,$,Z,L,(0,a.ZP)({prop:"boxSizing"}));var F={border:{themeKey:"borders",transform:l},borderTop:{themeKey:"borders",transform:l},borderRight:{themeKey:"borders",transform:l},borderBottom:{themeKey:"borders",transform:l},borderLeft:{themeKey:"borders",transform:l},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:l},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:w},color:{themeKey:"palette",transform:R},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:R},backgroundColor:{themeKey:"palette",transform:R},p:{style:r.o3},pt:{style:r.o3},pr:{style:r.o3},pb:{style:r.o3},pl:{style:r.o3},px:{style:r.o3},py:{style:r.o3},padding:{style:r.o3},paddingTop:{style:r.o3},paddingRight:{style:r.o3},paddingBottom:{style:r.o3},paddingLeft:{style:r.o3},paddingX:{style:r.o3},paddingY:{style:r.o3},paddingInline:{style:r.o3},paddingInlineStart:{style:r.o3},paddingInlineEnd:{style:r.o3},paddingBlock:{style:r.o3},paddingBlockStart:{style:r.o3},paddingBlockEnd:{style:r.o3},m:{style:r.e6},mt:{style:r.e6},mr:{style:r.e6},mb:{style:r.e6},ml:{style:r.e6},mx:{style:r.e6},my:{style:r.e6},margin:{style:r.e6},marginTop:{style:r.e6},marginRight:{style:r.e6},marginBottom:{style:r.e6},marginLeft:{style:r.e6},marginX:{style:r.e6},marginY:{style:r.e6},marginInline:{style:r.e6},marginInlineStart:{style:r.e6},marginInlineEnd:{style:r.e6},marginBlock:{style:r.e6},marginBlockStart:{style:r.e6},marginBlockEnd:{style:r.e6},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:S},rowGap:{style:A},columnGap:{style:O},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:N},maxWidth:{style:T},minWidth:{transform:N},height:{transform:N},maxHeight:{transform:N},minHeight:{transform:N},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}}},9633:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return r.Z},extendSxProp:function(){return u},unstable_createStyleFunctionSx:function(){return r.n},unstable_defaultSxConfig:function(){return s.Z}});var r=n(6523),a=n(7462),i=n(3366),o=n(8027),s=n(4920);let l=["sx"],c=e=>{var t,n;let r={systemProps:{},otherProps:{}},a=null!=(t=null==e||null==(n=e.theme)?void 0:n.unstable_sxConfig)?t:s.Z;return Object.keys(e).forEach(t=>{a[t]?r.systemProps[t]=e[t]:r.otherProps[t]=e[t]}),r};function u(e){let t;let{sx:n}=e,{systemProps:r,otherProps:s}=c((0,i.Z)(e,l));return t=Array.isArray(n)?[r,...n]:"function"==typeof n?(...e)=>{let t=n(...e);return(0,o.P)(t)?(0,a.Z)({},r,t):r}:(0,a.Z)({},r,n),(0,a.Z)({},s,{sx:t})}},6523:function(e,t,n){"use strict";n.d(t,{n:function(){return l}});var r=n(5200),a=n(7730),i=n(4844),o=n(5408),s=n(4920);function l(){function e(e,t,n,a){let s={[e]:t,theme:n},l=a[e];if(!l)return{[e]:t};let{cssProperty:c=e,themeKey:u,transform:f,style:d}=l;if(null==t)return null;if("typography"===u&&"inherit"===t)return{[e]:t};let m=(0,i.DW)(n,u)||{};return d?d(s):(0,o.k9)(s,t,t=>{let n=(0,i.Jq)(m,f,t);return(t===n&&"string"==typeof t&&(n=(0,i.Jq)(m,f,`${e}${"default"===t?"":(0,r.Z)(t)}`,t)),!1===c)?n:{[c]:n}})}return function t(n){var r;let{sx:i,theme:l={}}=n||{};if(!i)return null;let c=null!=(r=l.unstable_sxConfig)?r:s.Z;function u(n){let r=n;if("function"==typeof n)r=n(l);else if("object"!=typeof n)return n;if(!r)return null;let i=(0,o.W8)(l.breakpoints),s=Object.keys(i),u=i;return Object.keys(r).forEach(n=>{var i;let s="function"==typeof(i=r[n])?i(l):i;if(null!=s){if("object"==typeof s){if(c[n])u=(0,a.Z)(u,e(n,s,l,c));else{let e=(0,o.k9)({theme:l},s,e=>({[n]:e}));(function(...e){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),n=new Set(t);return e.every(e=>n.size===Object.keys(e).length)})(e,s)?u[n]=t({sx:s,theme:l}):u=(0,a.Z)(u,e)}}else u=(0,a.Z)(u,e(n,s,l,c))}}),(0,o.L7)(s,u)}return Array.isArray(i)?i.map(u):u(i)}}let c=l();c.filterProps=["sx"],t.Z=c},5200:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(8758);function a(e){if("string"!=typeof e)throw Error((0,r.Z)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},9698:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return r.Z}});var r=n(5200)},2358:function(e,t){"use strict";t.Z=function(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}},7859:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return r.Z}});var r=n(2358)},8027:function(e,t,n){"use strict";n.d(t,{P:function(){return a},Z:function(){return function e(t,n,i={clone:!0}){let o=i.clone?(0,r.Z)({},t):t;return a(t)&&a(n)&&Object.keys(n).forEach(r=>{"__proto__"!==r&&(a(n[r])&&r in t&&a(t[r])?o[r]=e(t[r],n[r],i):i.clone?o[r]=a(n[r])?function e(t){if(!a(t))return t;let n={};return Object.keys(t).forEach(r=>{n[r]=e(t[r])}),n}(n[r]):n[r]:o[r]=n[r])}),o}}});var r=n(7462);function a(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}},211:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return r.Z},isPlainObject:function(){return r.P}});var r=n(8027)},8758:function(e,t,n){"use strict";function r(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;ee?new p(e):null,[e])}function h(){return(0,o.clientHookInServerComponentError)("usePathname"),(0,r.useContext)(i.PathnameContext)}function y(){(0,o.clientHookInServerComponentError)("useRouter");let e=(0,r.useContext)(a.AppRouterContext);if(null===e)throw Error("invariant expected app router to be mounted");return e}function b(){(0,o.clientHookInServerComponentError)("useParams");let e=(0,r.useContext)(a.GlobalLayoutRouterContext),t=(0,r.useContext)(i.PathParamsContext);return(0,r.useMemo)(()=>(null==e?void 0:e.tree)?function e(t,n){for(let r of(void 0===n&&(n={}),Object.values(t[1]))){let t=r[0],a=Array.isArray(t),i=a?t[1]:t;!i||i.startsWith(l.PAGE_SEGMENT_KEY)||(a&&("c"===t[2]||"oc"===t[2])?n[t[0]]=t[1].split("/"):a&&(n[t[0]]=t[1]),n=e(r,n))}return n}(e.tree):t,[null==e?void 0:e.tree,t])}function v(e){void 0===e&&(e="children"),(0,o.clientHookInServerComponentError)("useSelectedLayoutSegments");let{tree:t}=(0,r.useContext)(a.LayoutRouterContext);return function e(t,n,r,a){let i;if(void 0===r&&(r=!0),void 0===a&&(a=[]),r)i=t[1][n];else{var o;let e=t[1];i=null!=(o=e.children)?o:Object.values(e)[0]}if(!i)return a;let c=i[0],u=(0,s.getSegmentValue)(c);return!u||u.startsWith(l.PAGE_SEGMENT_KEY)?a:(a.push(u),e(i,n,!1,a))}(t,e)}function x(e){void 0===e&&(e="children"),(0,o.clientHookInServerComponentError)("useSelectedLayoutSegment");let t=v(e);return 0===t.length?null:t[0]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4265:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{notFound:function(){return r},isNotFoundError:function(){return a}});let n="NEXT_NOT_FOUND";function r(){let e=Error(n);throw e.digest=n,e}function a(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4341:function(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RedirectStatusCode",{enumerable:!0,get:function(){return n}}),(r=n||(n={}))[r.SeeOther=303]="SeeOther",r[r.TemporaryRedirect=307]="TemporaryRedirect",r[r.PermanentRedirect=308]="PermanentRedirect",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2061:function(e,t,n){"use strict";var r,a;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{RedirectType:function(){return r},getRedirectError:function(){return c},redirect:function(){return u},permanentRedirect:function(){return f},isRedirectError:function(){return d},getURLFromRedirectError:function(){return m},getRedirectTypeFromError:function(){return p},getRedirectStatusCodeFromError:function(){return g}});let i=n(8276),o=n(3241),s=n(4341),l="NEXT_REDIRECT";function c(e,t,n){void 0===n&&(n=s.RedirectStatusCode.TemporaryRedirect);let r=Error(l);r.digest=l+";"+t+";"+e+";"+n+";";let a=i.requestAsyncStorage.getStore();return a&&(r.mutableCookies=a.mutableCookies),r}function u(e,t){void 0===t&&(t="replace");let n=o.actionAsyncStorage.getStore();throw c(e,t,(null==n?void 0:n.isAction)?s.RedirectStatusCode.SeeOther:s.RedirectStatusCode.TemporaryRedirect)}function f(e,t){void 0===t&&(t="replace");let n=o.actionAsyncStorage.getStore();throw c(e,t,(null==n?void 0:n.isAction)?s.RedirectStatusCode.SeeOther:s.RedirectStatusCode.PermanentRedirect)}function d(e){if("object"!=typeof e||null===e||!("digest"in e)||"string"!=typeof e.digest)return!1;let[t,n,r,a]=e.digest.split(";",4),i=Number(a);return t===l&&("replace"===n||"push"===n)&&"string"==typeof r&&!isNaN(i)&&i in s.RedirectStatusCode}function m(e){return d(e)?e.digest.split(";",3)[2]:null}function p(e){if(!d(e))throw Error("Not a redirect error");return e.digest.split(";",2)[1]}function g(e){if(!d(e))throw Error("Not a redirect error");return Number(e.digest.split(";",4)[3])}(a=r||(r={})).push="push",a.replace="replace",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},83:function(e,t){"use strict";function n(e){return Array.isArray(e)?e[1]:e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentValue",{enumerable:!0,get:function(){return n}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},250:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return v}});let r=n(8754),a=n(1757),i=n(5893),o=a._(n(7294)),s=r._(n(3935)),l=r._(n(3709)),c=n(3943),u=n(6270),f=n(3334);n(6415);let d=n(5832),m=r._(n(5930)),p={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/travelBuddy/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1};function g(e,t,n,r,a,i){let o=null==e?void 0:e.src;e&&e["data-loaded-src"]!==o&&(e["data-loaded-src"]=o,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&a(!0),null==n?void 0:n.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let r=!1,a=!1;n.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>r,isPropagationStopped:()=>a,persist:()=>{},preventDefault:()=>{r=!0,t.preventDefault()},stopPropagation:()=>{a=!0,t.stopPropagation()}})}(null==r?void 0:r.current)&&r.current(e)}}))}function h(e){let[t,n]=o.version.split(".",2),r=parseInt(t,10),a=parseInt(n,10);return r>18||18===r&&a>=3?{fetchPriority:e}:{fetchpriority:e}}let y=(0,o.forwardRef)((e,t)=>{let{src:n,srcSet:r,sizes:a,height:s,width:l,decoding:c,className:u,style:f,fetchPriority:d,placeholder:m,loading:p,unoptimized:y,fill:b,onLoadRef:v,onLoadingCompleteRef:x,setBlurComplete:k,setShowAltText:w,onLoad:S,onError:O,...A}=e;return(0,i.jsx)("img",{...A,...h(d),loading:p,width:l,height:s,decoding:c,"data-nimg":b?"fill":"1",className:u,style:f,sizes:a,srcSet:r,src:n,ref:(0,o.useCallback)(e=>{t&&("function"==typeof t?t(e):"object"==typeof t&&(t.current=e)),e&&(O&&(e.src=e.src),e.complete&&g(e,m,v,x,k,y))},[n,m,v,x,k,O,y,t]),onLoad:e=>{g(e.currentTarget,m,v,x,k,y)},onError:e=>{w(!0),"empty"!==m&&k(!0),O&&O(e)}})});function b(e){let{isAppRouter:t,imgAttributes:n}=e,r={as:"image",imageSrcSet:n.srcSet,imageSizes:n.sizes,crossOrigin:n.crossOrigin,referrerPolicy:n.referrerPolicy,...h(n.fetchPriority)};return t&&s.default.preload?(s.default.preload(n.src,r),null):(0,i.jsx)(l.default,{children:(0,i.jsx)("link",{rel:"preload",href:n.srcSet?void 0:n.src,...r},"__nimg-"+n.src+n.srcSet+n.sizes)})}let v=(0,o.forwardRef)((e,t)=>{let n=(0,o.useContext)(d.RouterContext),r=(0,o.useContext)(f.ImageConfigContext),a=(0,o.useMemo)(()=>{let e=p||r||u.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),n=e.deviceSizes.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:n}},[r]),{onLoad:s,onLoadingComplete:l}=e,g=(0,o.useRef)(s);(0,o.useEffect)(()=>{g.current=s},[s]);let h=(0,o.useRef)(l);(0,o.useEffect)(()=>{h.current=l},[l]);let[v,x]=(0,o.useState)(!1),[k,w]=(0,o.useState)(!1),{props:S,meta:O}=(0,c.getImgProps)(e,{defaultLoader:m.default,imgConf:a,blurComplete:v,showAltText:k});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(y,{...S,unoptimized:O.unoptimized,placeholder:O.placeholder,fill:O.fill,onLoadRef:g,onLoadingCompleteRef:h,setBlurComplete:x,setShowAltText:w,ref:t}),O.priority?(0,i.jsx)(b,{isAppRouter:!n,imgAttributes:S}):null]})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3943:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImgProps",{enumerable:!0,get:function(){return s}}),n(6415);let r=n(4010),a=n(6270);function i(e){return void 0!==e.default}function o(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function s(e,t){var n;let s,l,c,{src:u,sizes:f,unoptimized:d=!1,priority:m=!1,loading:p,className:g,quality:h,width:y,height:b,fill:v=!1,style:x,onLoad:k,onLoadingComplete:w,placeholder:S="empty",blurDataURL:O,fetchPriority:A,layout:P,objectFit:j,objectPosition:C,lazyBoundary:_,lazyRoot:E,...M}=e,{imgConf:R,showAltText:N,blurComplete:I,defaultLoader:T}=t,z=R||a.imageConfigDefault;if("allSizes"in z)s=z;else{let e=[...z.deviceSizes,...z.imageSizes].sort((e,t)=>e-t),t=z.deviceSizes.sort((e,t)=>e-t);s={...z,allSizes:e,deviceSizes:t}}let $=M.loader||T;delete M.loader,delete M.srcSet;let Z="__next_img_default"in $;if(Z){if("custom"===s.loader)throw Error('Image with src "'+u+'" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader')}else{let e=$;$=t=>{let{config:n,...r}=t;return e(r)}}if(P){"fill"===P&&(v=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[P];e&&(x={...x,...e});let t={responsive:"100vw",fill:"100vw"}[P];t&&!f&&(f=t)}let L="",F=o(y),D=o(b);if("object"==typeof(n=u)&&(i(n)||void 0!==n.src)){let e=i(u)?u.default:u;if(!e.src)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(e));if(!e.height||!e.width)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(e));if(l=e.blurWidth,c=e.blurHeight,O=O||e.blurDataURL,L=e.src,!v){if(F||D){if(F&&!D){let t=F/e.width;D=Math.round(e.height*t)}else if(!F&&D){let t=D/e.height;F=Math.round(e.width*t)}}else F=e.width,D=e.height}}let H=!m&&("lazy"===p||void 0===p);(!(u="string"==typeof u?u:L)||u.startsWith("data:")||u.startsWith("blob:"))&&(d=!0,H=!1),s.unoptimized&&(d=!0),Z&&u.endsWith(".svg")&&!s.dangerouslyAllowSVG&&(d=!0),m&&(A="high");let B=o(h),W=Object.assign(v?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:j,objectPosition:C}:{},N?{}:{color:"transparent"},x),Y=I||"empty"===S?null:"blur"===S?'url("data:image/svg+xml;charset=utf-8,'+(0,r.getImageBlurSvg)({widthInt:F,heightInt:D,blurWidth:l,blurHeight:c,blurDataURL:O||"",objectFit:W.objectFit})+'")':'url("'+S+'")',G=Y?{backgroundSize:W.objectFit||"cover",backgroundPosition:W.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:Y}:{},V=function(e){let{config:t,src:n,unoptimized:r,width:a,quality:i,sizes:o,loader:s}=e;if(r)return{src:n,srcSet:void 0,sizes:void 0};let{widths:l,kind:c}=function(e,t,n){let{deviceSizes:r,allSizes:a}=e;if(n){let e=/(^|\s)(1?\d?\d)vw/g,t=[];for(let r;r=e.exec(n);r)t.push(parseInt(r[2]));if(t.length){let e=.01*Math.min(...t);return{widths:a.filter(t=>t>=r[0]*e),kind:"w"}}return{widths:a,kind:"w"}}return"number"!=typeof t?{widths:r,kind:"w"}:{widths:[...new Set([t,2*t].map(e=>a.find(t=>t>=e)||a[a.length-1]))],kind:"x"}}(t,a,o),u=l.length-1;return{sizes:o||"w"!==c?o:"100vw",srcSet:l.map((e,r)=>s({config:t,src:n,quality:i,width:e})+" "+("w"===c?e:r+1)+c).join(", "),src:s({config:t,src:n,quality:i,width:l[u]})}}({config:s,src:u,unoptimized:d,width:F,quality:B,sizes:f,loader:$});return{props:{...M,loading:H?"lazy":p,fetchPriority:A,width:F,height:D,decoding:"async",className:g,style:{...W,...G},sizes:V.sizes,srcSet:V.srcSet,src:V.src},meta:{unoptimized:d,priority:m,placeholder:S,fill:v}}}},4010:function(e,t){"use strict";function n(e){let{widthInt:t,heightInt:n,blurWidth:r,blurHeight:a,blurDataURL:i,objectFit:o}=e,s=r?40*r:t,l=a?40*a:n,c=s&&l?"viewBox='0 0 "+s+" "+l+"'":"";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+c+"%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='"+(c?"none":"contain"===o?"xMidYMid":"cover"===o?"xMidYMid slice":"none")+"' style='filter: url(%23b);' href='"+i+"'/%3E%3C/svg%3E"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImageBlurSvg",{enumerable:!0,get:function(){return n}})},7922:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getImageProps:function(){return s},default:function(){return l}});let r=n(8754),a=n(3943),i=n(250),o=r._(n(5930)),s=e=>{let{props:t}=(0,a.getImgProps)(e,{defaultLoader:o.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/travelBuddy/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,n]of Object.entries(t))void 0===n&&delete t[e];return{props:t}},l=i.Image},5930:function(e,t){"use strict";function n(e){let{config:t,src:n,width:r,quality:a}=e;return t.path+"?url="+encodeURIComponent(n)+"&w="+r+"&q="+(a||75)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}}),n.__next_img_default=!0;let r=n},3861:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ServerInsertedHTMLContext:function(){return a},useServerInsertedHTML:function(){return i}});let r=n(1757)._(n(7294)),a=r.default.createContext(null);function i(e){let t=(0,r.useContext)(a);t&&t(e)}},5675:function(e,t,n){e.exports=n(7922)},9332:function(e,t,n){e.exports=n(6522)},2703:function(e,t,n){"use strict";var r=n(414);function a(){}function i(){}i.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,i,o){if(o!==r){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;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:i,resetWarningCache:a};return n.PropTypes=n,n}},5697:function(e,t,n){e.exports=n(2703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},3241:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return r}});let r=(0,n(693).createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},693:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createAsyncLocalStorage",{enumerable:!0,get:function(){return i}});let n=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class r{disable(){throw n}getStore(){}run(){throw n}exit(){throw n}enterWith(){throw n}}let a=globalThis.AsyncLocalStorage;function i(){return a?new a:new r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8276:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return r}});let r=(0,n(693).createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},434:function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[n]=e[n]);return a},e.exports.__esModule=!0,e.exports.default=e.exports},7462:function(e,t,n){"use strict";function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[n]=e[n]);return a}n.d(t,{Z:function(){return r}})}}]); \ No newline at end of file diff --git a/out/_next/static/chunks/870-f591a4fa74f41ccf.js b/out/_next/static/chunks/870-f591a4fa74f41ccf.js new file mode 100644 index 0000000..f13d5cc --- /dev/null +++ b/out/_next/static/chunks/870-f591a4fa74f41ccf.js @@ -0,0 +1,512 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[870],{4444:function(t,e,n){"use strict";n.d(e,{BH:function(){return _},G6:function(){return R},L:function(){return l},LL:function(){return k},P0:function(){return m},Pz:function(){return b},Sg:function(){return y},ZR:function(){return A},aH:function(){return v},b$:function(){return S},eu:function(){return O},hl:function(){return I},m9:function(){return H},ne:function(){return M},pd:function(){return U},q4:function(){return g},ru:function(){return T},tV:function(){return u},uI:function(){return E},vZ:function(){return function t(e,n){if(e===n)return!0;let r=Object.keys(e),i=Object.keys(n);for(let s of r){if(!i.includes(s))return!1;let r=e[s],o=n[s];if(N(r)&&N(o)){if(!t(r,o))return!1}else if(r!==o)return!1}for(let t of i)if(!r.includes(t))return!1;return!0}},w1:function(){return C},xO:function(){return P},xb:function(){return x},z$:function(){return w},zd:function(){return L}});var r=n(3454);/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let i=function(t){let e=[],n=0;for(let r=0;r>6|192:((64512&i)==55296&&r+1>18|240,e[n++]=i>>12&63|128):e[n++]=i>>12|224,e[n++]=i>>6&63|128),e[n++]=63&i|128)}return e},s=function(t){let e=[],n=0,r=0;for(;n191&&i<224){let s=t[n++];e[r++]=String.fromCharCode((31&i)<<6|63&s)}else if(i>239&&i<365){let s=((7&i)<<18|(63&t[n++])<<12|(63&t[n++])<<6|63&t[n++])-65536;e[r++]=String.fromCharCode(55296+(s>>10)),e[r++]=String.fromCharCode(56320+(1023&s))}else{let s=t[n++],o=t[n++];e[r++]=String.fromCharCode((15&i)<<12|(63&s)<<6|63&o)}}return e.join("")},o={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(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();let n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let e=0;e>2,u=(3&i)<<4|o>>4,c=(15&o)<<2|h>>6,f=63&h;a||(f=64,s||(c=64)),r.push(n[l],n[u],n[c],n[f])}return r.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(i(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):s(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();let n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let e=0;e>4;if(r.push(l),64!==o){let t=s<<4&240|o>>2;if(r.push(t),64!==h){let t=o<<6&192|h;r.push(t)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}};class a extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}let h=function(t){let e=i(t);return o.encodeByteArray(e,!0)},l=function(t){return h(t).replace(/\./g,"")},u=function(t){try{return o.decodeString(t,!0)}catch(t){console.error("base64Decode failed: ",t)}return null},c=()=>/** + * @license + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */(function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw Error("Unable to locate global object.")})().__FIREBASE_DEFAULTS__,f=()=>{if(void 0===r||void 0===r.env)return;let t=r.env.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},p=()=>{let t;if("undefined"==typeof document)return;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(t){return}let e=t&&u(t[1]);return e&&JSON.parse(e)},d=()=>{try{return c()||f()||p()}catch(t){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);return}},g=t=>{var e,n;return null===(n=null===(e=d())||void 0===e?void 0:e.emulatorHosts)||void 0===n?void 0:n[t]},m=t=>{let e=g(t);if(!e)return;let n=e.lastIndexOf(":");if(n<=0||n+1===e.length)throw Error(`Invalid host ${e} with no separate hostname and port!`);let r=parseInt(e.substring(n+1),10);return"["===e[0]?[e.substring(1,n-1),r]:[e.substring(0,n),r]},v=()=>{var t;return null===(t=d())||void 0===t?void 0:t.config},b=t=>{var e;return null===(e=d())||void 0===e?void 0:e[`_${t}`]};/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class _{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}wrapCallback(t){return(e,n)=>{e?this.reject(e):this.resolve(n),"function"==typeof t&&(this.promise.catch(()=>{}),1===t.length?t(e):t(e,n))}}}/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function y(t,e){if(t.uid)throw Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');let n=e||"demo-project",r=t.iat||0,i=t.sub||t.user_id;if(!i)throw Error("mockUserToken must contain 'sub' or 'user_id' field!");let s=Object.assign({iss:`https://securetoken.google.com/${n}`,aud:n,iat:r,exp:r+3600,auth_time:r,sub:i,user_id:i,firebase:{sign_in_provider:"custom",identities:{}}},t);return[l(JSON.stringify({alg:"none",type:"JWT"})),l(JSON.stringify(s)),""].join(".")}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function w(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function E(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(w())}function T(){let t="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof t&&void 0!==t.id}function S(){return"object"==typeof navigator&&"ReactNative"===navigator.product}function C(){let t=w();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0}function R(){return!function(){var t;let e=null===(t=d())||void 0===t?void 0:t.forceEnvironment;if("node"===e)return!0;if("browser"===e)return!1;try{return"[object process]"===Object.prototype.toString.call(n.g.process)}catch(t){return!1}}()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function I(){try{return"object"==typeof indexedDB}catch(t){return!1}}function O(){return new Promise((t,e)=>{try{let n=!0,r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),t(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var t;e((null===(t=i.error)||void 0===t?void 0:t.message)||"")}}catch(t){e(t)}})}class A extends Error{constructor(t,e,n){super(e),this.code=t,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,A.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,k.prototype.create)}}class k{constructor(t,e,n){this.service=t,this.serviceName=e,this.errors=n}create(t,...e){let n=e[0]||{},r=`${this.service}/${t}`,i=this.errors[t],s=i?i.replace(D,(t,e)=>{let r=n[e];return null!=r?String(r):`<${e}?>`}):"Error",o=`${this.serviceName}: ${s} (${r}).`;return new A(r,o,n)}}let D=/\{\$([^}]+)}/g;function x(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function N(t){return null!==t&&"object"==typeof t}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function P(t){let e=[];for(let[n,r]of Object.entries(t))Array.isArray(r)?r.forEach(t=>{e.push(encodeURIComponent(n)+"="+encodeURIComponent(t))}):e.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return e.length?"&"+e.join("&"):""}function L(t){let e={};return t.replace(/^\?/,"").split("&").forEach(t=>{if(t){let[n,r]=t.split("=");e[decodeURIComponent(n)]=decodeURIComponent(r)}}),e}function U(t){let e=t.indexOf("?");if(!e)return"";let n=t.indexOf("#",e);return t.substring(e,n>0?n:void 0)}function M(t,e){let n=new j(t,e);return n.subscribe.bind(n)}class j{constructor(t,e){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=e,this.task.then(()=>{t(this)}).catch(t=>{this.error(t)})}next(t){this.forEachObserver(e=>{e.next(t)})}error(t){this.forEachObserver(e=>{e.error(t)}),this.close(t)}complete(){this.forEachObserver(t=>{t.complete()}),this.close()}subscribe(t,e,n){let r;if(void 0===t&&void 0===e&&void 0===n)throw Error("Missing Observer.");void 0===(r=!function(t,e){if("object"!=typeof t||null===t)return!1;for(let n of e)if(n in t&&"function"==typeof t[n])return!0;return!1}(t,["next","error","complete"])?{next:t,error:e,complete:n}:t).next&&(r.next=B),void 0===r.error&&(r.error=B),void 0===r.complete&&(r.complete=B);let i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch(t){}}),this.observers.push(r),i}unsubscribeOne(t){void 0!==this.observers&&void 0!==this.observers[t]&&(delete this.observers[t],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver(t){if(!this.finalized)for(let e=0;e{if(void 0!==this.observers&&void 0!==this.observers[t])try{e(this.observers[t])}catch(t){"undefined"!=typeof console&&console.error&&console.error(t)}})}close(t){this.finalized||(this.finalized=!0,void 0!==t&&(this.finalError=t),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function B(){}/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function H(t){return t&&t._delegate?t._delegate:t}},3454:function(t,e,n){"use strict";var r,i;t.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(i=n.g.process)?void 0:i.env)?n.g.process:n(7663)},7663:function(t){!function(){var e={229:function(t){var e,n,r,i=t.exports={};function s(){throw Error("setTimeout has not been defined")}function o(){throw Error("clearTimeout has not been defined")}function a(t){if(e===setTimeout)return setTimeout(t,0);if((e===s||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(n){try{return e.call(null,t,0)}catch(n){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:s}catch(t){e=s}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(t){n=o}}();var h=[],l=!1,u=-1;function c(){l&&r&&(l=!1,r.length?h=r.concat(h):u=-1,h.length&&f())}function f(){if(!l){var t=a(c);l=!0;for(var e=h.length;e;){for(r=h,h=[];++u1)for(var n=1;ne.some(e=>t instanceof e),u=new WeakMap,c=new WeakMap,f=new WeakMap,p=new WeakMap,d=new WeakMap,g={get(t,e,n){if(t instanceof IDBTransaction){if("done"===e)return c.get(t);if("objectStoreNames"===e)return t.objectStoreNames||f.get(t);if("store"===e)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return m(t[e])},set:(t,e,n)=>(t[e]=n,!0),has:(t,e)=>t instanceof IDBTransaction&&("done"===e||"store"===e)||e in t};function m(t){var e;if(t instanceof IDBRequest)return function(t){let e=new Promise((e,n)=>{let r=()=>{t.removeEventListener("success",i),t.removeEventListener("error",s)},i=()=>{e(m(t.result)),r()},s=()=>{n(t.error),r()};t.addEventListener("success",i),t.addEventListener("error",s)});return e.then(e=>{e instanceof IDBCursor&&u.set(e,t)}).catch(()=>{}),d.set(e,t),e}(t);if(p.has(t))return p.get(t);let n="function"==typeof(e=t)?e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(i||(i=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(v(this),t),m(u.get(this))}:function(...t){return m(e.apply(v(this),t))}:function(t,...n){let r=e.call(v(this),t,...n);return f.set(r,t.sort?t.sort():[t]),m(r)}:(e instanceof IDBTransaction&&function(t){if(c.has(t))return;let e=new Promise((e,n)=>{let r=()=>{t.removeEventListener("complete",i),t.removeEventListener("error",s),t.removeEventListener("abort",s)},i=()=>{e(),r()},s=()=>{n(t.error||new DOMException("AbortError","AbortError")),r()};t.addEventListener("complete",i),t.addEventListener("error",s),t.addEventListener("abort",s)});c.set(t,e)}(e),l(e,r||(r=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])))?new Proxy(e,g):e;return n!==t&&(p.set(t,n),d.set(n,t)),n}let v=t=>d.get(t),b=["get","getKey","getAll","getAllKeys","count"],_=["put","add","delete","clear"],y=new Map;function w(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&"string"==typeof e))return;if(y.get(e))return y.get(e);let n=e.replace(/FromIndex$/,""),r=e!==n,i=_.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||b.includes(n)))return;let s=async function(t,...e){let s=this.transaction(t,i?"readwrite":"readonly"),o=s.store;return r&&(o=o.index(e.shift())),(await Promise.all([o[n](...e),i&&s.done]))[0]};return y.set(e,s),s}g={...s=g,get:(t,e,n)=>w(t,e)||s.get(t,e,n),has:(t,e)=>!!w(t,e)||s.has(t,e)};/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class E{constructor(t){this.container=t}getPlatformInfoString(){return this.container.getProviders().map(t=>{if(!function(t){let e=t.getComponent();return(null==e?void 0:e.type)==="VERSION"}(t))return null;{let e=t.getImmediate();return`${e.library}/${e.version}`}}).filter(t=>t).join(" ")}}let T="@firebase/app",S="0.9.27",C=new a.Yd("@firebase/app"),R="[DEFAULT]",I={[T]:"fire-core","@firebase/app-compat":"fire-core-compat","@firebase/analytics":"fire-analytics","@firebase/analytics-compat":"fire-analytics-compat","@firebase/app-check":"fire-app-check","@firebase/app-check-compat":"fire-app-check-compat","@firebase/auth":"fire-auth","@firebase/auth-compat":"fire-auth-compat","@firebase/database":"fire-rtdb","@firebase/database-compat":"fire-rtdb-compat","@firebase/functions":"fire-fn","@firebase/functions-compat":"fire-fn-compat","@firebase/installations":"fire-iid","@firebase/installations-compat":"fire-iid-compat","@firebase/messaging":"fire-fcm","@firebase/messaging-compat":"fire-fcm-compat","@firebase/performance":"fire-perf","@firebase/performance-compat":"fire-perf-compat","@firebase/remote-config":"fire-rc","@firebase/remote-config-compat":"fire-rc-compat","@firebase/storage":"fire-gcs","@firebase/storage-compat":"fire-gcs-compat","@firebase/firestore":"fire-fst","@firebase/firestore-compat":"fire-fst-compat","fire-js":"fire-js",firebase:"fire-js-all"},O=new Map,A=new Map;function k(t){let e=t.name;if(A.has(e))return C.debug(`There were multiple attempts to register component ${e}.`),!1;for(let n of(A.set(e,t),O.values()))!function(t,e){try{t.container.addComponent(e)}catch(n){C.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,n)}}(n,t);return!0}function D(t,e){let n=t.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),t.container.getProvider(e)}let x=new h.LL("app","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."});/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class N{constructor(t,e,n){this._isDeleted=!1,this._options=Object.assign({},t),this._config=Object.assign({},e),this._name=e.name,this._automaticDataCollectionEnabled=e.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new o.wA("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(t){this.checkDestroyed(),this._automaticDataCollectionEnabled=t}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(t){this._isDeleted=t}checkDestroyed(){if(this.isDeleted)throw x.create("app-deleted",{appName:this._name})}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let P="10.8.0";function L(t,e={}){let n=t;"object"!=typeof e&&(e={name:e});let r=Object.assign({name:R,automaticDataCollectionEnabled:!1},e),i=r.name;if("string"!=typeof i||!i)throw x.create("bad-app-name",{appName:String(i)});if(n||(n=(0,h.aH)()),!n)throw x.create("no-options");let s=O.get(i);if(s){if((0,h.vZ)(n,s.options)&&(0,h.vZ)(r,s.config))return s;throw x.create("duplicate-app",{appName:i})}let a=new o.H0(i);for(let t of A.values())a.addComponent(t);let l=new N(n,r,a);return O.set(i,l),l}function U(t=R){let e=O.get(t);if(!e&&t===R&&(0,h.aH)())return L();if(!e)throw x.create("no-app",{appName:t});return e}function M(t,e,n){var r;let i=null!==(r=I[t])&&void 0!==r?r:t;n&&(i+=`-${n}`);let s=i.match(/\s|\//),a=e.match(/\s|\//);if(s||a){let t=[`Unable to register library "${i}" with version "${e}":`];s&&t.push(`library name "${i}" contains illegal characters (whitespace or "/")`),s&&a&&t.push("and"),a&&t.push(`version name "${e}" contains illegal characters (whitespace or "/")`),C.warn(t.join(" "));return}k(new o.wA(`${i}-version`,()=>({library:i,version:e}),"VERSION"))}let j="firebase-heartbeat-store",B=null;function H(){return B||(B=(function(t,e,{blocked:n,upgrade:r,blocking:i,terminated:s}={}){let o=indexedDB.open(t,1),a=m(o);return r&&o.addEventListener("upgradeneeded",t=>{r(m(o.result),t.oldVersion,t.newVersion,m(o.transaction),t)}),n&&o.addEventListener("blocked",t=>n(t.oldVersion,t.newVersion,t)),a.then(t=>{s&&t.addEventListener("close",()=>s()),i&&t.addEventListener("versionchange",t=>i(t.oldVersion,t.newVersion,t))}).catch(()=>{}),a})("firebase-heartbeat-database",0,{upgrade:(t,e)=>{if(0===e)try{t.createObjectStore(j)}catch(t){console.warn(t)}}}).catch(t=>{throw x.create("idb-open",{originalErrorMessage:t.message})})),B}async function F(t){try{let e=(await H()).transaction(j),n=await e.objectStore(j).get(z(t));return await e.done,n}catch(t){if(t instanceof h.ZR)C.warn(t.message);else{let e=x.create("idb-get",{originalErrorMessage:null==t?void 0:t.message});C.warn(e.message)}}}async function $(t,e){try{let n=(await H()).transaction(j,"readwrite"),r=n.objectStore(j);await r.put(e,z(t)),await n.done}catch(t){if(t instanceof h.ZR)C.warn(t.message);else{let e=x.create("idb-set",{originalErrorMessage:null==t?void 0:t.message});C.warn(e.message)}}}function z(t){return`${t.name}!${t.options.appId}`}class V{constructor(t){this.container=t,this._heartbeatsCache=null;let e=this.container.getProvider("app").getImmediate();this._storage=new q(e),this._heartbeatsCachePromise=this._storage.read().then(t=>(this._heartbeatsCache=t,t))}async triggerHeartbeat(){var t,e;let n=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),r=X();return(null===(t=this._heartbeatsCache)||void 0===t?void 0:t.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,(null===(e=this._heartbeatsCache)||void 0===e?void 0:e.heartbeats)==null)?void 0:this._heartbeatsCache.lastSentHeartbeatDate===r||this._heartbeatsCache.heartbeats.some(t=>t.date===r)?void 0:(this._heartbeatsCache.heartbeats.push({date:r,agent:n}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(t=>{let e=new Date(t.date).valueOf();return Date.now()-e<=2592e6}),this._storage.overwrite(this._heartbeatsCache))}async getHeartbeatsHeader(){var t;if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,(null===(t=this._heartbeatsCache)||void 0===t?void 0:t.heartbeats)==null||0===this._heartbeatsCache.heartbeats.length)return"";let e=X(),{heartbeatsToSend:n,unsentEntries:r}=function(t,e=1024){let n=[],r=t.slice();for(let i of t){let t=n.find(t=>t.agent===i.agent);if(t){if(t.dates.push(i.date),W(n)>e){t.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),W(n)>e){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}(this._heartbeatsCache.heartbeats),i=(0,h.L)(JSON.stringify({version:2,heartbeats:n}));return this._heartbeatsCache.lastSentHeartbeatDate=e,r.length>0?(this._heartbeatsCache.heartbeats=r,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),i}}function X(){return new Date().toISOString().substring(0,10)}class q{constructor(t){this.app=t,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!(0,h.hl)()&&(0,h.eu)().then(()=>!0).catch(()=>!1)}async read(){if(!await this._canUseIndexedDBPromise)return{heartbeats:[]};{let t=await F(this.app);return(null==t?void 0:t.heartbeats)?t:{heartbeats:[]}}}async overwrite(t){var e;if(await this._canUseIndexedDBPromise){let n=await this.read();return $(this.app,{lastSentHeartbeatDate:null!==(e=t.lastSentHeartbeatDate)&&void 0!==e?e:n.lastSentHeartbeatDate,heartbeats:t.heartbeats})}}async add(t){var e;if(await this._canUseIndexedDBPromise){let n=await this.read();return $(this.app,{lastSentHeartbeatDate:null!==(e=t.lastSentHeartbeatDate)&&void 0!==e?e:n.lastSentHeartbeatDate,heartbeats:[...n.heartbeats,...t.heartbeats]})}}}function W(t){return(0,h.L)(JSON.stringify({version:2,heartbeats:t})).length}k(new o.wA("platform-logger",t=>new E(t),"PRIVATE")),k(new o.wA("heartbeat",t=>new V(t),"PRIVATE")),M(T,S,""),M(T,S,"esm2017"),M("fire-js","")},8463:function(t,e,n){"use strict";n.d(e,{H0:function(){return a},wA:function(){return i}});var r=n(4444);class i{constructor(t,e,n){this.name=t,this.instanceFactory=e,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(t){return this.instantiationMode=t,this}setMultipleInstances(t){return this.multipleInstances=t,this}setServiceProps(t){return this.serviceProps=t,this}setInstanceCreatedCallback(t){return this.onInstanceCreated=t,this}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let s="[DEFAULT]";/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class o{constructor(t,e){this.name=t,this.container=e,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(t){let e=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(e)){let t=new r.BH;if(this.instancesDeferred.set(e,t),this.isInitialized(e)||this.shouldAutoInitialize())try{let n=this.getOrInitializeService({instanceIdentifier:e});n&&t.resolve(n)}catch(t){}}return this.instancesDeferred.get(e).promise}getImmediate(t){var e;let n=this.normalizeInstanceIdentifier(null==t?void 0:t.identifier),r=null!==(e=null==t?void 0:t.optional)&&void 0!==e&&e;if(this.isInitialized(n)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:n})}catch(t){if(r)return null;throw t}else{if(r)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(t){if(t.name!==this.name)throw Error(`Mismatching Component ${t.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=t,this.shouldAutoInitialize()){if("EAGER"===t.instantiationMode)try{this.getOrInitializeService({instanceIdentifier:s})}catch(t){}for(let[t,e]of this.instancesDeferred.entries()){let n=this.normalizeInstanceIdentifier(t);try{let t=this.getOrInitializeService({instanceIdentifier:n});e.resolve(t)}catch(t){}}}}clearInstance(t=s){this.instancesDeferred.delete(t),this.instancesOptions.delete(t),this.instances.delete(t)}async delete(){let t=Array.from(this.instances.values());await Promise.all([...t.filter(t=>"INTERNAL"in t).map(t=>t.INTERNAL.delete()),...t.filter(t=>"_delete"in t).map(t=>t._delete())])}isComponentSet(){return null!=this.component}isInitialized(t=s){return this.instances.has(t)}getOptions(t=s){return this.instancesOptions.get(t)||{}}initialize(t={}){let{options:e={}}=t,n=this.normalizeInstanceIdentifier(t.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);let r=this.getOrInitializeService({instanceIdentifier:n,options:e});for(let[t,e]of this.instancesDeferred.entries())n===this.normalizeInstanceIdentifier(t)&&e.resolve(r);return r}onInit(t,e){var n;let r=this.normalizeInstanceIdentifier(e),i=null!==(n=this.onInitCallbacks.get(r))&&void 0!==n?n:new Set;i.add(t),this.onInitCallbacks.set(r,i);let s=this.instances.get(r);return s&&t(s,r),()=>{i.delete(t)}}invokeOnInitCallbacks(t,e){let n=this.onInitCallbacks.get(e);if(n)for(let r of n)try{r(t,e)}catch(t){}}getOrInitializeService({instanceIdentifier:t,options:e={}}){let n=this.instances.get(t);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:t===s?void 0:t,options:e}),this.instances.set(t,n),this.instancesOptions.set(t,e),this.invokeOnInitCallbacks(n,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,n)}catch(t){}return n||null}normalizeInstanceIdentifier(t=s){return this.component?this.component.multipleInstances?t:s:t}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class a{constructor(t){this.name=t,this.providers=new Map}addComponent(t){let e=this.getProvider(t.name);if(e.isComponentSet())throw Error(`Component ${t.name} has already been registered with ${this.name}`);e.setComponent(t)}addOrOverwriteComponent(t){this.getProvider(t.name).isComponentSet()&&this.providers.delete(t.name),this.addComponent(t)}getProvider(t){if(this.providers.has(t))return this.providers.get(t);let e=new o(t,this);return this.providers.set(t,e),e}getProviders(){return Array.from(this.providers.values())}}},3333:function(t,e,n){"use strict";var r,i;n.d(e,{Yd:function(){return u},in:function(){return r}});/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let s=[];(i=r||(r={}))[i.DEBUG=0]="DEBUG",i[i.VERBOSE=1]="VERBOSE",i[i.INFO=2]="INFO",i[i.WARN=3]="WARN",i[i.ERROR=4]="ERROR",i[i.SILENT=5]="SILENT";let o={debug:r.DEBUG,verbose:r.VERBOSE,info:r.INFO,warn:r.WARN,error:r.ERROR,silent:r.SILENT},a=r.INFO,h={[r.DEBUG]:"log",[r.VERBOSE]:"log",[r.INFO]:"info",[r.WARN]:"warn",[r.ERROR]:"error"},l=(t,e,...n)=>{if(e{};c.addEventListener("test",t,e),c.removeEventListener("test",t,e)}catch(t){}return t}();function C(t){return/^[\s\xa0]*$/.test(t)}function R(){var t=c.navigator;return t&&(t=t.userAgent)?t:""}function I(t){return -1!=R().indexOf(t)}function O(t){return O[" "](t),t}O[" "]=function(){};var A=I("Opera"),k=I("Trident")||I("MSIE"),D=I("Edge"),x=D||k,N=I("Gecko")&&!(-1!=R().toLowerCase().indexOf("webkit")&&!I("Edge"))&&!(I("Trident")||I("MSIE"))&&!I("Edge"),P=-1!=R().toLowerCase().indexOf("webkit")&&!I("Edge");function L(){var t=c.document;return t?t.documentMode:void 0}t:{var U,M="",j=(U=R(),N?/rv:([^\);]+)(\)|;)/.exec(U):D?/Edge\/([\d\.]+)/.exec(U):k?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(U):P?/WebKit\/(\S+)/.exec(U):A?/(?:Version)[ \/]?(\S+)/.exec(U):void 0);if(j&&(M=j?j[1]:""),k){var B=L();if(null!=B&&B>parseFloat(M)){i=String(B);break t}}i=M}var H=c.document&&k&&(L()||parseInt(i,10))||void 0;function F(t,e){if(T.call(this,t?t.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,t){var n=this.type=t.type,r=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:null;if(this.target=t.target||t.srcElement,this.g=e,e=t.relatedTarget){if(N){t:{try{O(e.nodeName);var i=!0;break t}catch(t){}i=!1}i||(e=null)}}else"mouseover"==n?e=t.fromElement:"mouseout"==n&&(e=t.toElement);this.relatedTarget=e,r?(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=void 0!==t.clientX?t.clientX:t.pageX,this.clientY=void 0!==t.clientY?t.clientY:t.pageY,this.screenX=t.screenX||0,this.screenY=t.screenY||0),this.button=t.button,this.key=t.key||"",this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.pointerId=t.pointerId||0,this.pointerType="string"==typeof t.pointerType?t.pointerType:$[t.pointerType]||"",this.state=t.state,this.i=t,t.defaultPrevented&&F.$.h.call(this)}}b(F,T);var $={2:"touch",3:"pen",4:"mouse"};F.prototype.h=function(){F.$.h.call(this);var t=this.i;t.preventDefault?t.preventDefault():t.returnValue=!1};var z="closure_listenable_"+(1e6*Math.random()|0),V=0;function X(t,e,n,r,i){this.listener=t,this.proxy=null,this.src=e,this.type=n,this.capture=!!r,this.la=i,this.key=++V,this.fa=this.ia=!1}function q(t){t.fa=!0,t.listener=null,t.proxy=null,t.src=null,t.la=null}function W(t,e,n){for(let r in t)e.call(n,t[r],r,t)}function G(t){let e={};for(let n in t)e[n]=t[n];return e}let K="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function J(t,e){let n,r;for(let e=1;e>>0);function th(t){return"function"==typeof t?t:(t[ta]||(t[ta]=function(e){return t.handleEvent(e)}),t[ta])}function tl(){_.call(this),this.i=new Y(this),this.S=this,this.J=null}function tu(t,e){var n,r=t.J;if(r)for(n=[];r;r=r.J)n.push(r);if(t=t.S,r=e.type||e,"string"==typeof e)e=new T(e,t);else if(e instanceof T)e.target=e.target||t;else{var i=e;J(e=new T(r,t),i)}if(i=!0,n)for(var s=n.length-1;0<=s;s--){var o=e.g=n[s];i=tc(o,r,!0,e)&&i}if(i=tc(o=e.g=t,r,!0,e)&&i,i=tc(o,r,!1,e)&&i,n)for(s=0;snew tm,t=>t.reset());class tm{constructor(){this.next=this.g=this.h=null}set(t,e){this.h=t,this.g=e,this.next=null}reset(){this.next=this.g=this.h=null}}let tv,tb=!1,t_=new td,ty=()=>{let t=c.Promise.resolve(void 0);tv=()=>{t.then(tw)}};var tw=()=>{let t;for(var e;t=null,t_.g&&(t=t_.g,t_.g=t_.g.next,t_.g||(t_.h=null),t.next=null),e=t;){try{e.h.call(e.g)}catch(t){!function(t){c.setTimeout(()=>{throw t},0)}(t)}tg.j(e),100>tg.h&&(tg.h++,e.next=tg.g,tg.g=e)}tb=!1};function tE(t,e){tl.call(this),this.h=t||1,this.g=e||c,this.j=m(this.qb,this),this.l=Date.now()}function tT(t){t.ga=!1,t.T&&(t.g.clearTimeout(t.T),t.T=null)}function tS(t,e,n){if("function"==typeof t)n&&(t=m(t,n));else if(t&&"function"==typeof t.handleEvent)t=m(t.handleEvent,t);else throw Error("Invalid listener argument");return 2147483647{e.g=null,e.i&&(e.i=!1,t(e))},e.j);let n=e.h;e.h=null,e.m.apply(null,n)}(this)}N(){super.N(),this.g&&(c.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function tR(t){_.call(this),this.h=t,this.g={}}b(tR,_);var tI=[];function tO(t,e,n,r){Array.isArray(n)||(n&&(tI[0]=n.toString()),n=tI);for(var i=0;ir.length)){var i=r[1];if(Array.isArray(i)&&!(1>i.length)){var s=i[0];if("noop"!=s&&"stop"!=s&&"close"!=s)for(var o=1;oe.length?t0:(e=e.slice(r,r+n),t.o=r+n,e)}(t,n))==t0){4==e&&(t.s=4,tj(14),r=!1),tD(t.j,t.m,null,"[Incomplete Response]");break}else if(i==tQ){t.s=4,tj(15),tD(t.j,t.m,n,"[Invalid Chunk]"),r=!1;break}else tD(t.j,t.m,i,null),et(t,i);t9(t)&&0!=t.o&&(t.h.g=t.h.g.slice(t.o),t.o=0),4!=e||0!=n.length||t.h.h||(t.s=1,tj(16),r=!1),t.i=t.i&&r,r?0i[2]&&n.G&&0==n.A&&!n.v&&(n.v=tH(m(n.ib,n),6e3));if(1>=eO(n.i)&&n.oa){try{n.oa()}catch(t){}n.oa=void 0}}else nh(n,11)}else if((t.K||n.g==t)&&ns(n),!C(e))for(i=n.Ja.g.parse(e),e=0;eu)&&(3!=u||x||this.g&&(this.h.h||this.g.ja()||eQ(this.g)))){this.J||4!=u||7==e||(8==e||0>=f?tU(3):tU(2)),t3(this);var n=this.g.da();this.ca=n;e:if(t9(this)){var r=eQ(this.g);t="";var i=r.length,s=4==eZ(this.g);if(!this.h.i){if("undefined"==typeof TextDecoder){t8(this),t7(this);var o="";break e}this.h.i=new c.TextDecoder}for(e=0;ee)throw Error("Bad port number "+e);t.m=e}else t.m=null}function ea(t,e,n){var r,i;e instanceof eb?(t.i=e,r=t.i,(i=t.h)&&!r.j&&(e_(r),r.i=null,r.g.forEach(function(t,e){var n=e.toLowerCase();e!=n&&(ey(this,e),eE(this,n,t))},r)),r.j=i):(n||(e=ec(e,em)),t.i=new eb(e,t.h))}function eh(t,e,n){t.i.set(e,n)}function el(t){return eh(t,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),t}function eu(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function ec(t,e,n){return"string"==typeof t?(t=encodeURI(t).replace(e,ef),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function ef(t){return"%"+((t=t.charCodeAt(0))>>4&15).toString(16)+(15&t).toString(16)}er.prototype.toString=function(){var t=[],e=this.j;e&&t.push(ec(e,ep,!0),":");var n=this.g;return(n||"file"==e)&&(t.push("//"),(e=this.s)&&t.push(ec(e,ep,!0),"@"),t.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.m)&&t.push(":",String(n))),(n=this.l)&&(this.g&&"/"!=n.charAt(0)&&t.push("/"),t.push(ec(n,"/"==n.charAt(0)?eg:ed,!0))),(n=this.i.toString())&&t.push("?",n),(n=this.o)&&t.push("#",ec(n,ev)),t.join("")};var ep=/[#\/\?@]/g,ed=/[#\?:]/g,eg=/[#\?]/g,em=/[#\?@]/g,ev=/#/g;function eb(t,e){this.h=this.g=null,this.i=t||null,this.j=!!e}function e_(t){t.g||(t.g=new Map,t.h=0,t.i&&function(t,e){if(t){t=t.split("&");for(var n=0;n=t.j}function eO(t){return t.h?1:t.g?t.g.size:0}function eA(t,e){return t.h?t.h==e:!!t.g&&t.g.has(e)}function ek(t,e){t.g?t.g.add(e):t.h=e}function eD(t,e){t.h&&t.h==e?t.h=null:t.g&&t.g.has(e)&&t.g.delete(e)}function ex(t){if(null!=t.h)return t.i.concat(t.h.F);if(null!=t.g&&0!==t.g.size){let e=t.i;for(let n of t.g.values())e=e.concat(n.F);return e}return w(t.i)}eC.prototype.cancel=function(){if(this.i=ex(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){for(let t of this.g.values())t.cancel();this.g.clear()}};var eN=class{stringify(t){return c.JSON.stringify(t,void 0)}parse(t){return c.JSON.parse(t,void 0)}};function eP(){this.g=new eN}function eL(t,e,n,r,i){try{e.onload=null,e.onerror=null,e.onabort=null,e.ontimeout=null,i(r)}catch(t){}}function eU(t){this.l=t.ec||null,this.j=t.ob||!1}function eM(t,e){tl.call(this),this.F=t,this.u=e,this.m=void 0,this.readyState=ej,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}b(eU,tz),eU.prototype.g=function(){return new eM(this.l,this.j)},eU.prototype.i=(r={},function(){return r}),b(eM,tl);var ej=0;function eB(t){t.j.read().then(t.Xa.bind(t)).catch(t.ka.bind(t))}function eH(t){t.readyState=4,t.l=null,t.j=null,t.A=null,eF(t)}function eF(t){t.onreadystatechange&&t.onreadystatechange.call(t)}(a=eM.prototype).open=function(t,e){if(this.readyState!=ej)throw this.abort(),Error("Error reopening a connection");this.C=t,this.B=e,this.readyState=1,eF(this)},a.send=function(t){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.g=!0;let e={headers:this.v,method:this.C,credentials:this.m,cache:void 0};t&&(e.body=t),(this.F||c).fetch(new Request(this.B,e)).then(this.$a.bind(this),this.ka.bind(this))},a.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),1<=this.readyState&&this.g&&4!=this.readyState&&(this.g=!1,eH(this)),this.readyState=ej},a.$a=function(t){if(this.g&&(this.l=t,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=t.headers,this.readyState=2,eF(this)),this.g&&(this.readyState=3,eF(this),this.g))){if("arraybuffer"===this.responseType)t.arrayBuffer().then(this.Ya.bind(this),this.ka.bind(this));else if(void 0!==c.ReadableStream&&"body"in t){if(this.j=t.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;eB(this)}else t.text().then(this.Za.bind(this),this.ka.bind(this))}},a.Xa=function(t){if(this.g){if(this.u&&t.value)this.response.push(t.value);else if(!this.u){var e=t.value?t.value:new Uint8Array(0);(e=this.A.decode(e,{stream:!t.done}))&&(this.response=this.responseText+=e)}t.done?eH(this):eF(this),3==this.readyState&&eB(this)}},a.Za=function(t){this.g&&(this.response=this.responseText=t,eH(this))},a.Ya=function(t){this.g&&(this.response=t,eH(this))},a.ka=function(){this.g&&eH(this)},a.setRequestHeader=function(t,e){this.v.append(t,e)},a.getResponseHeader=function(t){return this.h&&this.h.get(t.toLowerCase())||""},a.getAllResponseHeaders=function(){if(!this.h)return"";let t=[],e=this.h.entries();for(var n=e.next();!n.done;)t.push((n=n.value)[0]+": "+n[1]),n=e.next();return t.join("\r\n")},Object.defineProperty(eM.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(t){this.m=t?"include":"same-origin"}});var e$=c.JSON.parse;function ez(t){tl.call(this),this.headers=new Map,this.u=t||null,this.h=!1,this.C=this.g=null,this.I="",this.m=0,this.j="",this.l=this.G=this.v=this.F=!1,this.B=0,this.A=null,this.K=eV,this.L=this.M=!1}b(ez,tl);var eV="",eX=/^https?$/i,eq=["POST","PUT"];function eW(t,e){t.h=!1,t.g&&(t.l=!0,t.g.abort(),t.l=!1),t.j=e,t.m=5,eG(t),eJ(t)}function eG(t){t.F||(t.F=!0,tu(t,"complete"),tu(t,"error"))}function eK(t){if(t.h&&void 0!==u&&(!t.C[1]||4!=eZ(t)||2!=t.da())){if(t.v&&4==eZ(t))tS(t.La,0,t);else if(tu(t,"readystatechange"),4==eZ(t)){t.h=!1;try{let o=t.da();switch(o){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var e,n,r=!0;break;default:r=!1}if(!(e=r)){if(n=0===o){var i=String(t.I).match(en)[1]||null;!i&&c.self&&c.self.location&&(i=c.self.location.protocol.slice(0,-1)),n=!eX.test(i?i.toLowerCase():"")}e=n}if(e)tu(t,"complete"),tu(t,"success");else{t.m=6;try{var s=2{}:null;t.g=null,t.C=null,e||tu(t,"ready");try{n.onreadystatechange=r}catch(t){}}}function eY(t){t.g&&t.L&&(t.g.ontimeout=null),t.A&&(c.clearTimeout(t.A),t.A=null)}function eZ(t){return t.g?t.g.readyState:0}function eQ(t){try{if(!t.g)return null;if("response"in t.g)return t.g.response;switch(t.K){case eV:case"text":return t.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in t.g)return t.g.mozResponseArrayBuffer}return null}catch(t){return null}}function e0(t){let e="";return W(t,function(t,n){e+=n+":"+t+"\r\n"}),e}function e2(t,e,n){t:{for(r in n){var r=!1;break t}r=!0}r||(n=e0(n),"string"==typeof t?null!=n&&encodeURIComponent(String(n)):eh(t,e,n))}function e1(t,e,n){return n&&n.internalChannelParams&&n.internalChannelParams[t]||e}function e9(t){this.Ga=0,this.j=[],this.l=new tk,this.pa=this.wa=this.I=this.Y=this.g=this.Da=this.F=this.na=this.o=this.U=this.s=null,this.fb=this.W=0,this.cb=e1("failFast",!1,t),this.G=this.v=this.u=this.m=this.h=null,this.aa=!0,this.Fa=this.V=-1,this.ba=this.A=this.C=0,this.ab=e1("baseRetryDelayMs",5e3,t),this.hb=e1("retryDelaySeedMs",1e4,t),this.eb=e1("forwardChannelMaxRetries",2,t),this.xa=e1("forwardChannelRequestTimeoutMs",2e4,t),this.va=t&&t.xmlHttpFactory||void 0,this.Ha=t&&t.useFetchStreams||!1,this.L=void 0,this.J=t&&t.supportsCrossDomainXhr||!1,this.K="",this.i=new eC(t&&t.concurrentRequestLimit),this.Ja=new eP,this.P=t&&t.fastHandshake||!1,this.O=t&&t.encodeInitMessageHeaders||!1,this.P&&this.O&&(this.O=!1),this.bb=t&&t.bc||!1,t&&t.Ea&&this.l.Ea(),t&&t.forceLongPolling&&(this.aa=!1),this.ca=!this.P&&this.aa&&t&&t.detectBufferingProxy||!1,this.qa=void 0,t&&t.longPollingTimeout&&0(n-=e))e=Math.max(0,i[o].g-100),s=!1;else try{!function(t,e,n){let r=n||"";try{ee(t,function(t,n){let i=t;p(t)&&(i=tf(t)),e.push(r+n+"="+encodeURIComponent(i))})}catch(t){throw e.push(r+"type="+encodeURIComponent("_badmap")),t}}(a,t,"req"+n+"_")}catch(t){r&&r(a)}}if(s){r=t.join("&");break t}}}return t=t.j.splice(0,n),e.F=t,r}function ne(t){if(!t.g&&!t.u){t.ba=1;var e=t.Ma;tv||ty(),tb||(tv(),tb=!0),t_.add(e,t),t.A=0}}function nn(t){return!t.g&&!t.u&&!(3<=t.A)&&(t.ba++,t.u=tH(m(t.Ma,t),na(t,t.A)),t.A++,!0)}function nr(t){null!=t.B&&(c.clearTimeout(t.B),t.B=null)}function ni(t){t.g=new tJ(t,t.l,"rpc",t.ba),null===t.o&&(t.g.I=t.s),t.g.O=0;var e=ei(t.wa);eh(e,"RID","rpc"),eh(e,"SID",t.K),eh(e,"AID",t.V),eh(e,"CI",t.G?"0":"1"),!t.G&&t.qa&&eh(e,"TO",t.qa),eh(e,"TYPE","xmlhttp"),e8(t,e),t.o&&t.s&&e2(e,t.o,t.s),t.L&&t.g.setTimeout(t.L);var n=t.g;t=t.pa,n.L=1,n.A=el(ei(e)),n.u=null,n.S=!0,t1(n,t)}function ns(t){null!=t.v&&(c.clearTimeout(t.v),t.v=null)}function no(t,e){var n=null;if(t.g==e){ns(t),nr(t),t.g=null;var r=2}else{if(!eA(t.i,e))return;n=e.F,eD(t.i,e),r=1}if(0!=t.H){if(e.i){if(1==r){n=e.u?e.u.length:0,e=Date.now()-e.G;var i,s=t.C;tu(r=tP(),new tB(r,n)),e3(t)}else ne(t)}else if(3==(s=e.s)||0==s&&0=t.i.j-(t.m?1:0))&&(t.m?(t.j=i.F.concat(t.j),!0):1!=t.H&&2!=t.H&&!(t.C>=(t.cb?0:t.eb))&&(t.m=tH(m(t.Na,t,i),na(t,t.C)),t.C++,!0)))||2==r&&nn(t)))switch(n&&0i;++i)r[i]=e.charCodeAt(n++)|e.charCodeAt(n++)<<8|e.charCodeAt(n++)<<16|e.charCodeAt(n++)<<24;else for(i=0;16>i;++i)r[i]=e[n++]|e[n++]<<8|e[n++]<<16|e[n++]<<24;e=t.g[0],n=t.g[1],i=t.g[2];var s=t.g[3],o=e+(s^n&(i^s))+r[0]+3614090360&4294967295;o=s+(i^(e=n+(o<<7&4294967295|o>>>25))&(n^i))+r[1]+3905402710&4294967295,o=i+(n^(s=e+(o<<12&4294967295|o>>>20))&(e^n))+r[2]+606105819&4294967295,o=n+(e^(i=s+(o<<17&4294967295|o>>>15))&(s^e))+r[3]+3250441966&4294967295,o=e+(s^(n=i+(o<<22&4294967295|o>>>10))&(i^s))+r[4]+4118548399&4294967295,o=s+(i^(e=n+(o<<7&4294967295|o>>>25))&(n^i))+r[5]+1200080426&4294967295,o=i+(n^(s=e+(o<<12&4294967295|o>>>20))&(e^n))+r[6]+2821735955&4294967295,o=n+(e^(i=s+(o<<17&4294967295|o>>>15))&(s^e))+r[7]+4249261313&4294967295,o=e+(s^(n=i+(o<<22&4294967295|o>>>10))&(i^s))+r[8]+1770035416&4294967295,o=s+(i^(e=n+(o<<7&4294967295|o>>>25))&(n^i))+r[9]+2336552879&4294967295,o=i+(n^(s=e+(o<<12&4294967295|o>>>20))&(e^n))+r[10]+4294925233&4294967295,o=n+(e^(i=s+(o<<17&4294967295|o>>>15))&(s^e))+r[11]+2304563134&4294967295,o=e+(s^(n=i+(o<<22&4294967295|o>>>10))&(i^s))+r[12]+1804603682&4294967295,o=s+(i^(e=n+(o<<7&4294967295|o>>>25))&(n^i))+r[13]+4254626195&4294967295,o=i+(n^(s=e+(o<<12&4294967295|o>>>20))&(e^n))+r[14]+2792965006&4294967295,o=n+(e^(i=s+(o<<17&4294967295|o>>>15))&(s^e))+r[15]+1236535329&4294967295,n=i+(o<<22&4294967295|o>>>10),o=e+(i^s&(n^i))+r[1]+4129170786&4294967295,e=n+(o<<5&4294967295|o>>>27),o=s+(n^i&(e^n))+r[6]+3225465664&4294967295,s=e+(o<<9&4294967295|o>>>23),o=i+(e^n&(s^e))+r[11]+643717713&4294967295,i=s+(o<<14&4294967295|o>>>18),o=n+(s^e&(i^s))+r[0]+3921069994&4294967295,n=i+(o<<20&4294967295|o>>>12),o=e+(i^s&(n^i))+r[5]+3593408605&4294967295,e=n+(o<<5&4294967295|o>>>27),o=s+(n^i&(e^n))+r[10]+38016083&4294967295,s=e+(o<<9&4294967295|o>>>23),o=i+(e^n&(s^e))+r[15]+3634488961&4294967295,i=s+(o<<14&4294967295|o>>>18),o=n+(s^e&(i^s))+r[4]+3889429448&4294967295,n=i+(o<<20&4294967295|o>>>12),o=e+(i^s&(n^i))+r[9]+568446438&4294967295,e=n+(o<<5&4294967295|o>>>27),o=s+(n^i&(e^n))+r[14]+3275163606&4294967295,s=e+(o<<9&4294967295|o>>>23),o=i+(e^n&(s^e))+r[3]+4107603335&4294967295,i=s+(o<<14&4294967295|o>>>18),o=n+(s^e&(i^s))+r[8]+1163531501&4294967295,n=i+(o<<20&4294967295|o>>>12),o=e+(i^s&(n^i))+r[13]+2850285829&4294967295,e=n+(o<<5&4294967295|o>>>27),o=s+(n^i&(e^n))+r[2]+4243563512&4294967295,s=e+(o<<9&4294967295|o>>>23),o=i+(e^n&(s^e))+r[7]+1735328473&4294967295,i=s+(o<<14&4294967295|o>>>18),o=n+(s^e&(i^s))+r[12]+2368359562&4294967295,o=e+((n=i+(o<<20&4294967295|o>>>12))^i^s)+r[5]+4294588738&4294967295,o=s+((e=n+(o<<4&4294967295|o>>>28))^n^i)+r[8]+2272392833&4294967295,o=i+((s=e+(o<<11&4294967295|o>>>21))^e^n)+r[11]+1839030562&4294967295,o=n+((i=s+(o<<16&4294967295|o>>>16))^s^e)+r[14]+4259657740&4294967295,o=e+((n=i+(o<<23&4294967295|o>>>9))^i^s)+r[1]+2763975236&4294967295,o=s+((e=n+(o<<4&4294967295|o>>>28))^n^i)+r[4]+1272893353&4294967295,o=i+((s=e+(o<<11&4294967295|o>>>21))^e^n)+r[7]+4139469664&4294967295,o=n+((i=s+(o<<16&4294967295|o>>>16))^s^e)+r[10]+3200236656&4294967295,o=e+((n=i+(o<<23&4294967295|o>>>9))^i^s)+r[13]+681279174&4294967295,o=s+((e=n+(o<<4&4294967295|o>>>28))^n^i)+r[0]+3936430074&4294967295,o=i+((s=e+(o<<11&4294967295|o>>>21))^e^n)+r[3]+3572445317&4294967295,o=n+((i=s+(o<<16&4294967295|o>>>16))^s^e)+r[6]+76029189&4294967295,o=e+((n=i+(o<<23&4294967295|o>>>9))^i^s)+r[9]+3654602809&4294967295,o=s+((e=n+(o<<4&4294967295|o>>>28))^n^i)+r[12]+3873151461&4294967295,o=i+((s=e+(o<<11&4294967295|o>>>21))^e^n)+r[15]+530742520&4294967295,o=n+((i=s+(o<<16&4294967295|o>>>16))^s^e)+r[2]+3299628645&4294967295,n=i+(o<<23&4294967295|o>>>9),o=e+(i^(n|~s))+r[0]+4096336452&4294967295,e=n+(o<<6&4294967295|o>>>26),o=s+(n^(e|~i))+r[7]+1126891415&4294967295,s=e+(o<<10&4294967295|o>>>22),o=i+(e^(s|~n))+r[14]+2878612391&4294967295,i=s+(o<<15&4294967295|o>>>17),o=n+(s^(i|~e))+r[5]+4237533241&4294967295,n=i+(o<<21&4294967295|o>>>11),o=e+(i^(n|~s))+r[12]+1700485571&4294967295,e=n+(o<<6&4294967295|o>>>26),o=s+(n^(e|~i))+r[3]+2399980690&4294967295,s=e+(o<<10&4294967295|o>>>22),o=i+(e^(s|~n))+r[10]+4293915773&4294967295,i=s+(o<<15&4294967295|o>>>17),o=n+(s^(i|~e))+r[1]+2240044497&4294967295,n=i+(o<<21&4294967295|o>>>11),o=e+(i^(n|~s))+r[8]+1873313359&4294967295,e=n+(o<<6&4294967295|o>>>26),o=s+(n^(e|~i))+r[15]+4264355552&4294967295,s=e+(o<<10&4294967295|o>>>22),o=i+(e^(s|~n))+r[6]+2734768916&4294967295,i=s+(o<<15&4294967295|o>>>17),o=n+(s^(i|~e))+r[13]+1309151649&4294967295,n=i+(o<<21&4294967295|o>>>11),o=e+(i^(n|~s))+r[4]+4149444226&4294967295,e=n+(o<<6&4294967295|o>>>26),o=s+(n^(e|~i))+r[11]+3174756917&4294967295,s=e+(o<<10&4294967295|o>>>22),o=i+(e^(s|~n))+r[2]+718787259&4294967295,i=s+(o<<15&4294967295|o>>>17),o=n+(s^(i|~e))+r[9]+3951481745&4294967295,t.g[0]=t.g[0]+e&4294967295,t.g[1]=t.g[1]+(i+(o<<21&4294967295|o>>>11))&4294967295,t.g[2]=t.g[2]+i&4294967295,t.g[3]=t.g[3]+s&4294967295}function ny(t,e){this.h=e;for(var n=[],r=!0,i=t.length-1;0<=i;i--){var s=0|t[i];r&&s==e||(n[i]=s,r=!1)}this.g=n}(a=ez.prototype).Oa=function(t){this.M=t},a.ha=function(t,e,n,r){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.I+"; newUri="+t);e=e?e.toUpperCase():"GET",this.I=t,this.j="",this.m=0,this.F=!1,this.h=!0,this.g=this.u?this.u.g():o.g(),this.C=this.u?tV(this.u):tV(o),this.g.onreadystatechange=m(this.La,this);try{this.G=!0,this.g.open(e,String(t),!0),this.G=!1}catch(t){eW(this,t);return}if(t=n||"",n=new Map(this.headers),r){if(Object.getPrototypeOf(r)===Object.prototype)for(var i in r)n.set(i,r[i]);else if("function"==typeof r.keys&&"function"==typeof r.get)for(let t of r.keys())n.set(t,r.get(t));else throw Error("Unknown input type for opt_headers: "+String(r))}for(let[s,o]of(r=Array.from(n.keys()).find(t=>"content-type"==t.toLowerCase()),i=c.FormData&&t instanceof c.FormData,!(0<=y(eq,e))||r||i||n.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),n))this.g.setRequestHeader(s,o);this.K&&(this.g.responseType=this.K),"withCredentials"in this.g&&this.g.withCredentials!==this.M&&(this.g.withCredentials=this.M);try{var s;eY(this),0=this.S)){var t=2*this.S;this.l.info("BP detection timer enabled: "+t),this.B=tH(m(this.jb,this),t)}},a.jb=function(){this.B&&(this.B=null,this.l.info("BP detection timeout reached."),this.l.info("Buffering proxy detected and switch to long-polling!"),this.G=!1,this.M=!0,tj(10),e6(this),ni(this))},a.ib=function(){null!=this.v&&(this.v=null,e6(this),nn(this),tj(19))},a.pb=function(t){t?(this.l.info("Successfully pinged google.com"),tj(2)):(this.l.info("Failed to ping google.com"),tj(1))},a.isActive=function(){return!!this.h&&this.h.isActive(this)},(a=nf.prototype).Ba=function(){},a.Aa=function(){},a.za=function(){},a.ya=function(){},a.isActive=function(){return!0},a.Va=function(){},np.prototype.g=function(t,e){return new nd(t,e)},b(nd,tl),nd.prototype.m=function(){this.g.h=this.j,this.A&&(this.g.J=!0);var t=this.g,e=this.l,n=this.h||void 0;tj(0),t.Y=e,t.na=n||{},t.G=t.aa,t.I=nu(t,null,t.Y),e3(t)},nd.prototype.close=function(){e4(this.g)},nd.prototype.u=function(t){var e=this.g;if("string"==typeof t){var n={};n.__data__=t,t=n}else this.v&&((n={}).__data__=tf(t),t=n);e.j.push(new eS(e.fb++,t)),3==e.H&&e3(e)},nd.prototype.N=function(){this.g.h=null,delete this.j,e4(this.g),delete this.g,nd.$.N.call(this)},b(ng,tW),b(nm,tG),b(nv,nf),nv.prototype.Ba=function(){tu(this.g,"a")},nv.prototype.Aa=function(t){tu(this.g,new ng(t))},nv.prototype.za=function(t){tu(this.g,new nm)},nv.prototype.ya=function(){tu(this.g,"b")},b(nb,function(){this.blockSize=-1}),nb.prototype.reset=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.i=this.h=0},nb.prototype.j=function(t,e){void 0===e&&(e=t.length);for(var n=e-this.blockSize,r=this.m,i=this.h,s=0;sthis.h?this.blockSize:2*this.blockSize)-this.h);t[0]=128;for(var e=1;ee;++e)for(var r=0;32>r;r+=8)t[n++]=this.g[e]>>>r&255;return t};var nw={};function nE(t){return -128<=t&&128>t?Object.prototype.hasOwnProperty.call(nw,t)?nw[t]:nw[t]=new ny([0|t],0>t?-1:0):new ny([0|t],0>t?-1:0)}function nT(t){if(isNaN(t)||!isFinite(t))return nC;if(0>t)return nk(nT(-t));for(var e=[],n=1,r=0;t>=n;r++)e[r]=t/n|0,n*=nS;return new ny(e,0)}var nS=4294967296,nC=nE(0),nR=nE(1),nI=nE(16777216);function nO(t){if(0!=t.h)return!1;for(var e=0;e>>16,t[e]&=65535,e++}function nN(t,e){this.g=t,this.h=e}function nP(t,e){if(nO(e))throw Error("division by zero");if(nO(t))return new nN(nC,nC);if(nA(t))return e=nP(nk(t),e),new nN(nk(e.g),nk(e.h));if(nA(e))return e=nP(t,nk(e)),new nN(nk(e.g),e.h);if(30=r.X(t);)n=nL(n),r=nL(r);var i=nU(n,1),s=nU(r,1);for(r=nU(r,2),n=nU(n,2);!nO(r);){var o=s.add(r);0>=o.X(t)&&(i=i.add(n),s=o),r=nU(r,1),n=nU(n,1)}return e=nD(t,i.R(e)),new nN(i,e)}for(i=nC;0<=t.X(e);){for(r=48>=(r=Math.ceil(Math.log(n=Math.max(1,Math.floor(t.ea()/e.ea())))/Math.LN2))?1:Math.pow(2,r-48),o=(s=nT(n)).R(e);nA(o)||0>>31;return new ny(n,t.h)}function nU(t,e){var n=e>>5;e%=32;for(var r=t.g.length-n,i=[],s=0;s>>e|t.D(s+n+1)<<32-e:t.D(s+n);return new ny(i,t.h)}(a=ny.prototype).ea=function(){if(nA(this))return-nk(this).ea();for(var t=0,e=1,n=0;n(t=t||10)||36>>0).toString(t);if(nO(n=i))return s+r;for(;6>s.length;)s="0"+s;r=s+r}},a.D=function(t){return 0>t?0:t>>16)+(this.D(i)>>>16)+(t.D(i)>>>16);r=o>>>16,s&=65535,o&=65535,n[i]=o<<16|s}return new ny(n,-2147483648&n[n.length-1]?-1:0)},a.R=function(t){if(nO(this)||nO(t))return nC;if(nA(this))return nA(t)?nk(this).R(nk(t)):nk(nk(this).R(t));if(nA(t))return nk(this.R(nk(t)));if(0>this.X(nI)&&0>t.X(nI))return nT(this.ea()*t.ea());for(var e=this.g.length+t.g.length,n=[],r=0;r<2*e;r++)n[r]=0;for(r=0;r>>16,o=65535&this.D(r),a=t.D(i)>>>16,h=65535&t.D(i);n[2*r+2*i]+=o*h,nx(n,2*r+2*i),n[2*r+2*i+1]+=s*h,nx(n,2*r+2*i+1),n[2*r+2*i+1]+=o*a,nx(n,2*r+2*i+1),n[2*r+2*i+2]+=s*a,nx(n,2*r+2*i+2)}for(r=0;r(n=n||10)||36o?(o=nT(Math.pow(n,o)),i=i.R(o).add(nT(a))):i=(i=i.R(r)).add(nT(a))}return i};var nM=l.createWebChannelTransport=function(){return new np},nj=l.getStatEventTarget=function(){return tP()},nB=l.ErrorCode=tF,nH=l.EventType=t$,nF=l.Event=tx,n$=l.Stat={xb:0,Ab:1,Bb:2,Ub:3,Zb:4,Wb:5,Xb:6,Vb:7,Tb:8,Yb:9,PROXY:10,NOPROXY:11,Rb:12,Nb:13,Ob:14,Mb:15,Pb:16,Qb:17,tb:18,sb:19,ub:20};l.FetchXmlHttpFactory=eU;var nz=l.WebChannel=tX,nV=l.XhrIo=ez,nX=l.Md5=nb,nq=l.Integer=ny},3977:function(t,e,n){"use strict";n.d(e,{ZF:function(){return r.ZF}});var r=n(5816);/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */(0,r.KN)("firebase","10.8.0","app")},1259:function(t,e,n){"use strict";n.d(e,{hJ:function(){return r.X},v0:function(){return r.o},rh:function(){return r.c},w7:function(){return r.C}});var r=n(8591);n(4444),n(5816),n(3333),n(8463)},9828:function(t,e,n){"use strict";n.d(e,{ET:function(){return r.ET},IO:function(){return r.IO},JU:function(){return r.JU},Jm:function(){return r.Jm},PL:function(){return r.PL},QT:function(){return r.QT},ad:function(){return r.ad},ar:function(){return r.ar},hJ:function(){return r.hJ},oe:function(){return r.oe},r7:function(){return r.r7}});var r=n(19)},6650:function(t,e,n){"use strict";n.d(e,{oq:function(){return tE},Jt:function(){return tw},cF:function(){return tS},aF:function(){return ty},iH:function(){return tT},B0:function(){return t_}});var r,i,s,o,a=n(5816),h=n(4444),l=n(8463);/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let u="firebasestorage.googleapis.com",c="storageBucket";/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class f extends h.ZR{constructor(t,e,n=0){super(p(t),`Firebase Storage: ${e} (${p(t)})`),this.status_=n,this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,f.prototype)}get status(){return this.status_}set status(t){this.status_=t}_codeEquals(t){return p(t)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(t){this.customData.serverResponse=t,this.customData.serverResponse?this.message=`${this._baseMessage} +${this.customData.serverResponse}`:this.message=this._baseMessage}}function p(t){return"storage/"+t}function d(){return new f(s.UNKNOWN,"An unknown error occurred, please check the error payload for server response.")}function g(){return new f(s.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function m(){return new f(s.CANCELED,"User canceled the upload/download.")}function v(){return new f(s.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.")}function b(t){return new f(s.INVALID_ARGUMENT,t)}function _(){return new f(s.APP_DELETED,"The Firebase app was deleted.")}function y(t,e){return new f(s.INVALID_FORMAT,"String does not match format '"+t+"': "+e)}function w(t){throw new f(s.INTERNAL_ERROR,"Internal error: "+t)}(r=s||(s={})).UNKNOWN="unknown",r.OBJECT_NOT_FOUND="object-not-found",r.BUCKET_NOT_FOUND="bucket-not-found",r.PROJECT_NOT_FOUND="project-not-found",r.QUOTA_EXCEEDED="quota-exceeded",r.UNAUTHENTICATED="unauthenticated",r.UNAUTHORIZED="unauthorized",r.UNAUTHORIZED_APP="unauthorized-app",r.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",r.INVALID_CHECKSUM="invalid-checksum",r.CANCELED="canceled",r.INVALID_EVENT_NAME="invalid-event-name",r.INVALID_URL="invalid-url",r.INVALID_DEFAULT_BUCKET="invalid-default-bucket",r.NO_DEFAULT_BUCKET="no-default-bucket",r.CANNOT_SLICE_BLOB="cannot-slice-blob",r.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",r.NO_DOWNLOAD_URL="no-download-url",r.INVALID_ARGUMENT="invalid-argument",r.INVALID_ARGUMENT_COUNT="invalid-argument-count",r.APP_DELETED="app-deleted",r.INVALID_ROOT_OPERATION="invalid-root-operation",r.INVALID_FORMAT="invalid-format",r.INTERNAL_ERROR="internal-error",r.UNSUPPORTED_ENVIRONMENT="unsupported-environment";/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class E{constructor(t,e){this.bucket=t,this.path_=e}get path(){return this.path_}get isRoot(){return 0===this.path.length}fullServerUrl(){let t=encodeURIComponent;return"/b/"+t(this.bucket)+"/o/"+t(this.path)}bucketOnlyServerUrl(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}static makeFromBucketSpec(t,e){let n;try{n=E.makeFromUrl(t,e)}catch(e){return new E(t,"")}if(""===n.path)return n;throw new f(s.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+t+"'.")}static makeFromUrl(t,e){let n=null,r="([A-Za-z0-9.\\-_]+)",i=RegExp("^gs://"+r+"(/(.*))?$","i");function o(t){t.path_=decodeURIComponent(t.path)}let a=e.replace(/[.]/g,"\\."),h=[{regex:i,indices:{bucket:1,path:3},postModify:function(t){"/"===t.path.charAt(t.path.length-1)&&(t.path_=t.path_.slice(0,-1))}},{regex:RegExp(`^https?://${a}/v[A-Za-z0-9_]+/b/${r}/o(/([^?#]*).*)?$`,"i"),indices:{bucket:1,path:3},postModify:o},{regex:RegExp(`^https?://${e===u?"(?:storage.googleapis.com|storage.cloud.google.com)":e}/${r}/([^?#]*)`,"i"),indices:{bucket:1,path:2},postModify:o}];for(let e=0;en)throw b(`Invalid value for '${t}'. Expected ${n} or less.`)}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function O(t,e,n){let r=e;return null==n&&(r=`https://${e}`),`${n}://${r}/v0${t}`}function A(t){let e=encodeURIComponent,n="?";for(let r in t)t.hasOwnProperty(r)&&(n=n+(e(r)+"=")+e(t[r])+"&");return n.slice(0,-1)}/** + * @license + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function k(t,e){let n=t>=500&&t<600,r=-1!==[408,429].indexOf(t),i=-1!==e.indexOf(t);return n||r||i}(i=o||(o={}))[i.NO_ERROR=0]="NO_ERROR",i[i.NETWORK_ERROR=1]="NETWORK_ERROR",i[i.ABORT=2]="ABORT";/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class D{constructor(t,e,n,r,i,s,o,a,h,l,u,c=!0){this.url_=t,this.method_=e,this.headers_=n,this.body_=r,this.successCodes_=i,this.additionalRetryCodes_=s,this.callback_=o,this.errorCallback_=a,this.timeout_=h,this.progressCallback_=l,this.connectionFactory_=u,this.retry=c,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((t,e)=>{this.resolve_=t,this.reject_=e,this.start_()})}start_(){let t=(t,e)=>{let n=this.resolve_,r=this.reject_,i=e.connection;if(e.wasSuccessCode)try{let t=this.callback_(i,i.getResponse());void 0!==t?n(t):n()}catch(t){r(t)}else if(null!==i){let t=d();t.serverResponse=i.getErrorText(),r(this.errorCallback_?this.errorCallback_(i,t):t)}else r(e.canceled?this.appDelete_?_():m():g())};this.canceled_?t(!1,new x(!1,null,!0)):this.backoffId_=/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function(t,e,n){let r=1,i=null,s=null,o=!1,a=0,h=!1;function l(...t){h||(h=!0,e.apply(null,t))}function u(e){i=setTimeout(()=>{i=null,t(f,2===a)},e)}function c(){s&&clearTimeout(s)}function f(t,...e){let n;if(h){c();return}if(t||2===a||o){c(),l.call(null,t,...e);return}r<64&&(r*=2),1===a?(a=2,n=0):n=(r+Math.random())*1e3,u(n)}let p=!1;function d(t){!p&&(p=!0,c(),!h&&(null!==i?(t||(a=2),clearTimeout(i),u(0)):t||(a=1)))}return u(0),s=setTimeout(()=>{o=!0,d(!0)},n),d}((t,e)=>{if(e){t(!1,new x(!1,null,!0));return}let n=this.connectionFactory_();this.pendingConnection_=n;let r=t=>{let e=t.loaded,n=t.lengthComputable?t.total:-1;null!==this.progressCallback_&&this.progressCallback_(e,n)};null!==this.progressCallback_&&n.addUploadProgressListener(r),n.send(this.url_,this.method_,this.body_,this.headers_).then(()=>{null!==this.progressCallback_&&n.removeUploadProgressListener(r),this.pendingConnection_=null;let e=n.getErrorCode()===o.NO_ERROR,i=n.getStatus();if(!e||k(i,this.additionalRetryCodes_)&&this.retry){t(!1,new x(!1,null,n.getErrorCode()===o.ABORT));return}t(!0,new x(-1!==this.successCodes_.indexOf(i),n))})},t,this.timeout_)}getPromise(){return this.promise_}cancel(t){this.canceled_=!0,this.appDelete_=t||!1,null!==this.backoffId_&&(0,this.backoffId_)(!1),null!==this.pendingConnection_&&this.pendingConnection_.abort()}}class x{constructor(t,e,n){this.wasSuccessCode=t,this.connection=e,this.canceled=!!n}}function N(...t){let e="undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:void 0;if(void 0!==e){let n=new e;for(let e=0;e>6,128|63&r):(64512&r)==55296?n>18,128|r>>12&63,128|r>>6&63,128|63&r)):e.push(239,191,189):(64512&r)==56320?e.push(239,191,189):e.push(224|r>>12,128|r>>6&63,128|63&r)}return new Uint8Array(e)}function M(t,e){let n;switch(t){case P.BASE64:{let n=-1!==e.indexOf("-"),r=-1!==e.indexOf("_");if(n||r)throw y(t,"Invalid character '"+(n?"-":"_")+"' found: is it base64url encoded?");break}case P.BASE64URL:{let n=-1!==e.indexOf("+"),r=-1!==e.indexOf("/");if(n||r)throw y(t,"Invalid character '"+(n?"+":"/")+"' found: is it base64 encoded?");e=e.replace(/-/g,"+").replace(/_/g,"/")}}try{n=/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function(t){if("undefined"==typeof atob)throw new f(s.UNSUPPORTED_ENVIRONMENT,"base-64 is missing. Make sure to install the required polyfills. See https://firebase.google.com/docs/web/environments-js-sdk#polyfills for more information.");return atob(t)}(e)}catch(e){if(e.message.includes("polyfill"))throw e;throw y(t,"Invalid character found")}let r=new Uint8Array(n.length);for(let t=0;t][;base64],");let r=n[1]||null;null!=r&&(this.base64=(e=";base64",r.length>=e.length&&r.substring(r.length-e.length)===e),this.contentType=this.base64?r.substring(0,r.length-7):r),this.rest=t.substring(t.indexOf(",")+1)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class B{constructor(t,e){let n=0,r="";C(t)?(this.data_=t,n=t.size,r=t.type):t instanceof ArrayBuffer?(e?this.data_=new Uint8Array(t):(this.data_=new Uint8Array(t.byteLength),this.data_.set(new Uint8Array(t))),n=this.data_.length):t instanceof Uint8Array&&(e?this.data_=t:(this.data_=new Uint8Array(t.length),this.data_.set(t)),n=t.length),this.size_=n,this.type_=r}size(){return this.size_}type(){return this.type_}slice(t,e){if(!C(this.data_))return new B(new Uint8Array(this.data_.buffer,t,e-t),!0);{var n;let r=(n=this.data_).webkitSlice?n.webkitSlice(t,e):n.mozSlice?n.mozSlice(t,e):n.slice?n.slice(t,e):null;return null===r?null:new B(r)}}static getBlob(...t){if(R()){let e=t.map(t=>t instanceof B?t.data_:t);return new B(N.apply(null,e))}{let e=t.map(t=>S(t)?function(t,e){switch(t){case P.RAW:return new L(U(e));case P.BASE64:case P.BASE64URL:return new L(M(t,e));case P.DATA_URL:return new L(function(t){let e=new j(t);return e.base64?M(P.BASE64,e.rest):function(t){let e;try{e=decodeURIComponent(t)}catch(t){throw y(P.DATA_URL,"Malformed data URL.")}return U(e)}(e.rest)}(e),new j(e).contentType)}throw d()}(P.RAW,t).data:t.data_),n=0;e.forEach(t=>{n+=t.byteLength});let r=new Uint8Array(n),i=0;return e.forEach(t=>{for(let e=0;e{Promise.resolve().then(()=>t(...e))}}class th{constructor(){this.sent_=!1,this.xhr_=new XMLHttpRequest,this.initXhr(),this.errorCode_=o.NO_ERROR,this.sendPromise_=new Promise(t=>{this.xhr_.addEventListener("abort",()=>{this.errorCode_=o.ABORT,t()}),this.xhr_.addEventListener("error",()=>{this.errorCode_=o.NETWORK_ERROR,t()}),this.xhr_.addEventListener("load",()=>{t()})})}send(t,e,n,r){if(this.sent_)throw w("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(e,t,!0),void 0!==r)for(let t in r)r.hasOwnProperty(t)&&this.xhr_.setRequestHeader(t,r[t].toString());return void 0!==n?this.xhr_.send(n):this.xhr_.send(),this.sendPromise_}getErrorCode(){if(!this.sent_)throw w("cannot .getErrorCode() before sending");return this.errorCode_}getStatus(){if(!this.sent_)throw w("cannot .getStatus() before sending");try{return this.xhr_.status}catch(t){return -1}}getResponse(){if(!this.sent_)throw w("cannot .getResponse() before sending");return this.xhr_.response}getErrorText(){if(!this.sent_)throw w("cannot .getErrorText() before sending");return this.xhr_.statusText}abort(){this.xhr_.abort()}getResponseHeader(t){return this.xhr_.getResponseHeader(t)}addUploadProgressListener(t){null!=this.xhr_.upload&&this.xhr_.upload.addEventListener("progress",t)}removeUploadProgressListener(t){null!=this.xhr_.upload&&this.xhr_.upload.removeEventListener("progress",t)}}class tl extends th{initXhr(){this.xhr_.responseType="text"}}function tu(){return new tl}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class tc{constructor(t,e,n=null){this._transferred=0,this._needToFetchStatus=!1,this._needToFetchMetadata=!1,this._observers=[],this._error=void 0,this._uploadUrl=void 0,this._request=void 0,this._chunkMultiplier=1,this._resolve=void 0,this._reject=void 0,this._ref=t,this._blob=e,this._metadata=n,this._mappings=X(),this._resumable=this._shouldDoResumable(this._blob),this._state="running",this._errorHandler=t=>{if(this._request=void 0,this._chunkMultiplier=1,t._codeEquals(s.CANCELED))this._needToFetchStatus=!0,this.completeTransitions_();else{let e=this.isExponentialBackoffExpired();if(k(t.status,[])){if(e)t=g();else{this.sleepTime=Math.max(2*this.sleepTime,1e3),this._needToFetchStatus=!0,this.completeTransitions_();return}}this._error=t,this._transition("error")}},this._metadataErrorHandler=t=>{this._request=void 0,t._codeEquals(s.CANCELED)?this.completeTransitions_():(this._error=t,this._transition("error"))},this.sleepTime=0,this.maxSleepTime=this._ref.storage.maxUploadRetryTime,this._promise=new Promise((t,e)=>{this._resolve=t,this._reject=e,this._start()}),this._promise.then(null,()=>{})}isExponentialBackoffExpired(){return this.sleepTime>this.maxSleepTime}_makeProgressCallback(){let t=this._transferred;return e=>this._updateProgress(t+e)}_shouldDoResumable(t){return t.size()>262144}_start(){"running"===this._state&&void 0===this._request&&(this._resumable?void 0===this._uploadUrl?this._createResumable():this._needToFetchStatus?this._fetchStatus():this._needToFetchMetadata?this._fetchMetadata():this.pendingTimeout=setTimeout(()=>{this.pendingTimeout=void 0,this._continueUpload()},this.sleepTime):this._oneShotUpload())}_resolveToken(t){Promise.all([this._ref.storage._getAuthToken(),this._ref.storage._getAppCheckToken()]).then(([e,n])=>{switch(this._state){case"running":t(e,n);break;case"canceling":this._transition("canceled");break;case"pausing":this._transition("paused")}})}_createResumable(){this._resolveToken((t,e)=>{let n=function(t,e,n,r,i){let s=e.bucketOnlyServerUrl(),o=te(e,r,i),a={name:o.fullPath},h=O(s,t.host,t._protocol),l={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":`${r.size()}`,"X-Goog-Upload-Header-Content-Type":o.contentType,"Content-Type":"application/json; charset=utf-8"},u=W(o,n),c=new J(h,"POST",function(t){let e;tr(t);try{e=t.getResponseHeader("X-Goog-Upload-URL")}catch(t){Y(!1)}return Y(S(e)),e},t.maxUploadRetryTime);return c.urlParams=a,c.headers=l,c.body=u,c.errorHandler=Q(e),c}(this._ref.storage,this._ref._location,this._mappings,this._blob,this._metadata),r=this._ref.storage._makeRequest(n,tu,t,e);this._request=r,r.getPromise().then(t=>{this._request=void 0,this._uploadUrl=t,this._needToFetchStatus=!1,this.completeTransitions_()},this._errorHandler)})}_fetchStatus(){let t=this._uploadUrl;this._resolveToken((e,n)=>{let r=function(t,e,n,r){let i=new J(n,"POST",function(t){let e=tr(t,["active","final"]),n=null;try{n=t.getResponseHeader("X-Goog-Upload-Size-Received")}catch(t){Y(!1)}n||Y(!1);let i=Number(n);return Y(!isNaN(i)),new tn(i,r.size(),"final"===e)},t.maxUploadRetryTime);return i.headers={"X-Goog-Upload-Command":"query"},i.errorHandler=Q(e),i}(this._ref.storage,this._ref._location,t,this._blob),i=this._ref.storage._makeRequest(r,tu,e,n);this._request=i,i.getPromise().then(t=>{this._request=void 0,this._updateProgress(t.current),this._needToFetchStatus=!1,t.finalized&&(this._needToFetchMetadata=!0),this.completeTransitions_()},this._errorHandler)})}_continueUpload(){let t=262144*this._chunkMultiplier,e=new tn(this._transferred,this._blob.size()),n=this._uploadUrl;this._resolveToken((r,i)=>{let o;try{o=function(t,e,n,r,i,o,a,h){let l=new tn(0,0);if(a?(l.current=a.current,l.total=a.total):(l.current=0,l.total=r.size()),r.size()!==l.total)throw new f(s.SERVER_FILE_WRONG_SIZE,"Server recorded incorrect upload file size, please retry the upload.");let u=l.total-l.current,c=u;i>0&&(c=Math.min(c,i));let p=l.current,d=p+c,g={"X-Goog-Upload-Command":0===c?"finalize":u===c?"upload, finalize":"upload","X-Goog-Upload-Offset":`${l.current}`},m=r.slice(p,d);if(null===m)throw v();let b=new J(n,"POST",function(t,n){let i;let s=tr(t,["active","final"]),a=l.current+c,h=r.size();return i="final"===s?Z(e,o)(t,n):null,new tn(a,h,"final"===s,i)},e.maxUploadRetryTime);return b.headers=g,b.body=m.uploadData(),b.progressCallback=h||null,b.errorHandler=Q(t),b}(this._ref._location,this._ref.storage,n,this._blob,t,this._mappings,e,this._makeProgressCallback())}catch(t){this._error=t,this._transition("error");return}let a=this._ref.storage._makeRequest(o,tu,r,i,!1);this._request=a,a.getPromise().then(t=>{this._increaseMultiplier(),this._request=void 0,this._updateProgress(t.current),t.finalized?(this._metadata=t.metadata,this._transition("success")):this.completeTransitions_()},this._errorHandler)})}_increaseMultiplier(){262144*this._chunkMultiplier*2<33554432&&(this._chunkMultiplier*=2)}_fetchMetadata(){this._resolveToken((t,e)=>{let n=function(t,e,n){let r=O(e.fullServerUrl(),t.host,t._protocol),i=t.maxOperationRetryTime,s=new J(r,"GET",Z(t,n),i);return s.errorHandler=tt(e),s}(this._ref.storage,this._ref._location,this._mappings),r=this._ref.storage._makeRequest(n,tu,t,e);this._request=r,r.getPromise().then(t=>{this._request=void 0,this._metadata=t,this._transition("success")},this._metadataErrorHandler)})}_oneShotUpload(){this._resolveToken((t,e)=>{let n=function(t,e,n,r,i){let s=e.bucketOnlyServerUrl(),o={"X-Goog-Upload-Protocol":"multipart"},a=function(){let t="";for(let e=0;e<2;e++)t+=Math.random().toString().slice(2);return t}();o["Content-Type"]="multipart/related; boundary="+a;let h=te(e,r,i),l="--"+a+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+W(h,n)+"\r\n--"+a+"\r\nContent-Type: "+h.contentType+"\r\n\r\n",u=B.getBlob(l,r,"\r\n--"+a+"--");if(null===u)throw v();let c={name:h.fullPath},f=O(s,t.host,t._protocol),p=t.maxUploadRetryTime,d=new J(f,"POST",Z(t,n),p);return d.urlParams=c,d.headers=o,d.body=u.uploadData(),d.errorHandler=Q(e),d}(this._ref.storage,this._ref._location,this._mappings,this._blob,this._metadata),r=this._ref.storage._makeRequest(n,tu,t,e);this._request=r,r.getPromise().then(t=>{this._request=void 0,this._metadata=t,this._updateProgress(this._blob.size()),this._transition("success")},this._errorHandler)})}_updateProgress(t){let e=this._transferred;this._transferred=t,this._transferred!==e&&this._notifyObservers()}_transition(t){if(this._state!==t)switch(t){case"canceling":case"pausing":this._state=t,void 0!==this._request?this._request.cancel():this.pendingTimeout&&(clearTimeout(this.pendingTimeout),this.pendingTimeout=void 0,this.completeTransitions_());break;case"running":let e="paused"===this._state;this._state=t,e&&(this._notifyObservers(),this._start());break;case"paused":case"error":case"success":this._state=t,this._notifyObservers();break;case"canceled":this._error=m(),this._state=t,this._notifyObservers()}}completeTransitions_(){switch(this._state){case"pausing":this._transition("paused");break;case"canceling":this._transition("canceled");break;case"running":this._start()}}get snapshot(){let t=ts(this._state);return{bytesTransferred:this._transferred,totalBytes:this._blob.size(),state:t,metadata:this._metadata,task:this,ref:this._ref}}on(t,e,n,r){let i=new to(e||void 0,n||void 0,r||void 0);return this._addObserver(i),()=>{this._removeObserver(i)}}then(t,e){return this._promise.then(t,e)}catch(t){return this.then(null,t)}_addObserver(t){this._observers.push(t),this._notifyObserver(t)}_removeObserver(t){let e=this._observers.indexOf(t);-1!==e&&this._observers.splice(e,1)}_notifyObservers(){this._finishPromise(),this._observers.slice().forEach(t=>{this._notifyObserver(t)})}_finishPromise(){if(void 0!==this._resolve){let t=!0;switch(ts(this._state)){case ti.SUCCESS:ta(this._resolve.bind(null,this.snapshot))();break;case ti.CANCELED:case ti.ERROR:ta(this._reject.bind(null,this._error))();break;default:t=!1}t&&(this._resolve=void 0,this._reject=void 0)}}_notifyObserver(t){switch(ts(this._state)){case ti.RUNNING:case ti.PAUSED:t.next&&ta(t.next.bind(t,this.snapshot))();break;case ti.SUCCESS:t.complete&&ta(t.complete.bind(t))();break;case ti.CANCELED:case ti.ERROR:default:t.error&&ta(t.error.bind(t,this._error))()}}resume(){let t="paused"===this._state||"pausing"===this._state;return t&&this._transition("running"),t}pause(){let t="running"===this._state;return t&&this._transition("pausing"),t}cancel(){let t="running"===this._state||"pausing"===this._state;return t&&this._transition("canceling"),t}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class tf{constructor(t,e){this._service=t,e instanceof E?this._location=e:this._location=E.makeFromUrl(e,t.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(t,e){return new tf(t,e)}get root(){let t=new E(this._location.bucket,"");return this._newRef(this._service,t)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return F(this._location.path)}get storage(){return this._service}get parent(){let t=/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function(t){if(0===t.length)return null;let e=t.lastIndexOf("/");return -1===e?"":t.slice(0,e)}(this._location.path);if(null===t)return null;let e=new E(this._location.bucket,t);return new tf(this._service,e)}_throwIfRoot(t){if(""===this._location.path)throw new f(s.INVALID_ROOT_OPERATION,"The operation '"+t+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}}async function tp(t,e,n){let r=await function(t,e){null!=e&&"number"==typeof e.maxResults&&I("options.maxResults",1,1e3,e.maxResults);let n=e||{},r=function(t,e,n,r,i){var s;let o={};e.isRoot?o.prefix="":o.prefix=e.path+"/",n&&n.length>0&&(o.delimiter=n),r&&(o.pageToken=r),i&&(o.maxResults=i);let a=O(e.bucketOnlyServerUrl(),t.host,t._protocol),h=t.maxOperationRetryTime,l=new J(a,"GET",(s=e.bucket,function(e,n){let r=function(t,e,n){let r=H(n);return null===r?null:function(t,e,n){let r={prefixes:[],items:[],nextPageToken:n.nextPageToken};if(n[G])for(let i of n[G]){let n=i.replace(/\/$/,""),s=t._makeStorageReference(new E(e,n));r.prefixes.push(s)}if(n[K])for(let i of n[K]){let n=t._makeStorageReference(new E(e,i.name));r.items.push(n)}return r}(t,e,r)}(t,s,n);return Y(null!==r),r}),h);return l.urlParams=o,l.errorHandler=Q(e),l}(t.storage,t._location,"/",n.pageToken,n.maxResults);return t.storage.makeRequestWithTokens(r,tu)}(t,{pageToken:n});e.prefixes.push(...r.prefixes),e.items.push(...r.items),null!=r.nextPageToken&&await tp(t,e,r.nextPageToken)}function td(t,e){let n=null==e?void 0:e[c];return null==n?null:E.makeFromBucketSpec(n,t)}class tg{constructor(t,e,n,r,i){this.app=t,this._authProvider=e,this._appCheckProvider=n,this._url=r,this._firebaseVersion=i,this._bucket=null,this._host=u,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=12e4,this._maxUploadRetryTime=6e5,this._requests=new Set,null!=r?this._bucket=E.makeFromBucketSpec(r,this._host):this._bucket=td(this._host,this.app.options)}get host(){return this._host}set host(t){this._host=t,null!=this._url?this._bucket=E.makeFromBucketSpec(this._url,t):this._bucket=td(t,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(t){I("time",0,Number.POSITIVE_INFINITY,t),this._maxUploadRetryTime=t}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(t){I("time",0,Number.POSITIVE_INFINITY,t),this._maxOperationRetryTime=t}async _getAuthToken(){if(this._overrideAuthToken)return this._overrideAuthToken;let t=this._authProvider.getImmediate({optional:!0});if(t){let e=await t.getToken();if(null!==e)return e.accessToken}return null}async _getAppCheckToken(){let t=this._appCheckProvider.getImmediate({optional:!0});return t?(await t.getToken()).token:null}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEach(t=>t.cancel()),this._requests.clear()),Promise.resolve()}_makeStorageReference(t){return new tf(this,t)}_makeRequest(t,e,n,r,i=!0){if(this._deleted)return new T(_());{let s=function(t,e,n,r,i,s,o=!0){let a=A(t.urlParams),h=t.url+a,l=Object.assign({},t.headers);return e&&(l["X-Firebase-GMPID"]=e),null!==n&&n.length>0&&(l.Authorization="Firebase "+n),l["X-Firebase-Storage-Version"]="webjs/"+(null!=s?s:"AppManager"),null!==r&&(l["X-Firebase-AppCheck"]=r),new D(h,t.method,l,t.body,t.successCodes,t.additionalRetryCodes,t.handler,t.errorHandler,t.timeout,t.progressCallback,i,o)}(t,this._appId,n,r,e,this._firebaseVersion,i);return this._requests.add(s),s.getPromise().then(()=>this._requests.delete(s),()=>this._requests.delete(s)),s}}async makeRequestWithTokens(t,e){let[n,r]=await Promise.all([this._getAuthToken(),this._getAppCheckToken()]);return this._makeRequest(t,e,n,r).getPromise()}}let tm="@firebase/storage",tv="0.12.1",tb="storage";function t_(t,e,n){var r;return(r=t=(0,h.m9)(t))._throwIfRoot("uploadBytesResumable"),new tc(r,new B(e),n)}function ty(t){return function(t){let e={prefixes:[],items:[]};return tp(t,e).then(()=>e)}(t=(0,h.m9)(t))}function tw(t){return function(t){t._throwIfRoot("getDownloadURL");let e=function(t,e,n){let r=new J(O(e.fullServerUrl(),t.host,t._protocol),"GET",function(e,r){let i=q(t,r,n);return Y(null!==i),function(t,e,n,r){let i=H(e);if(null===i||!S(i.downloadTokens))return null;let s=i.downloadTokens;if(0===s.length)return null;let o=encodeURIComponent;return s.split(",").map(e=>{let i=t.bucket,s=t.fullPath;return O("/b/"+o(i)+"/o/"+o(s),n,r)+A({alt:"media",token:e})})[0]}(i,r,t.host,t._protocol)},t.maxOperationRetryTime);return r.errorHandler=tt(e),r}(t.storage,t._location,X());return t.storage.makeRequestWithTokens(e,tu).then(t=>{if(null===t)throw new f(s.NO_DOWNLOAD_URL,"The given file does not have any download URLs.");return t})}(t=(0,h.m9)(t))}function tE(t){return function(t){t._throwIfRoot("deleteObject");let e=function(t,e){let n=new J(O(e.fullServerUrl(),t.host,t._protocol),"DELETE",function(t,e){},t.maxOperationRetryTime);return n.successCodes=[200,204],n.errorHandler=tt(e),n}(t.storage,t._location);return t.storage.makeRequestWithTokens(e,tu)}(t=(0,h.m9)(t))}function tT(t,e){return function(t,e){if(!(e&&/^[A-Za-z]+:\/\//.test(e)))return function t(e,n){if(e instanceof tg){if(null==e._bucket)throw new f(s.NO_DEFAULT_BUCKET,"No default bucket found. Did you set the '"+c+"' property when initializing the app?");let r=new tf(e,e._bucket);return null!=n?t(r,n):r}return void 0!==n?function(t,e){let n=function(t,e){let n=e.split("/").filter(t=>t.length>0).join("/");return 0===t.length?n:t+"/"+n}(t._location.path,e),r=new E(t._location.bucket,n);return new tf(t.storage,r)}(e,n):e}(t,e);if(t instanceof tg)return new tf(t,e);throw b("To use ref(service, url), the first argument must be a Storage instance.")}(t=(0,h.m9)(t),e)}function tS(t=(0,a.Mq)(),e){t=(0,h.m9)(t);let n=(0,a.qX)(t,tb).getImmediate({identifier:e}),r=(0,h.P0)("storage");return r&&function(t,e,n,r={}){!function(t,e,n,r={}){t.host=`${e}:${n}`,t._protocol="http";let{mockUserToken:i}=r;i&&(t._overrideAuthToken="string"==typeof i?i:(0,h.Sg)(i,t.app.options.projectId))}(t,e,n,r)}(n,...r),n}(0,a.Xd)(new l.wA(tb,function(t,{instanceIdentifier:e}){return new tg(t.getProvider("app").getImmediate(),t.getProvider("auth-internal"),t.getProvider("app-check-internal"),e,a.Jn)},"PUBLIC").setMultipleInstances(!0)),(0,a.KN)(tm,tv,""),(0,a.KN)(tm,tv,"esm2017")},7582:function(t,e,n){"use strict";function r(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);ie.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}n.d(e,{_T:function(){return r}}),"function"==typeof SuppressedError&&SuppressedError}}]); \ No newline at end of file diff --git a/out/_next/static/chunks/870fdd6f-5d4c1fb29c612b91.js b/out/_next/static/chunks/870fdd6f-5d4c1fb29c612b91.js new file mode 100644 index 0000000..b871dfe --- /dev/null +++ b/out/_next/static/chunks/870fdd6f-5d4c1fb29c612b91.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[676],{7535:function(c,e,n){n.d(e,{Vui:function(){return i},Yai:function(){return s},a0w:function(){return a},fV7:function(){return r},wJh:function(){return f}});var i={prefix:"fas",iconName:"trash-can",icon:[448,512,[61460,"trash-alt"],"f2ed","M135.2 17.7C140.6 6.8 151.7 0 163.8 0H284.2c12.1 0 23.2 6.8 28.6 17.7L320 32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 96 0 81.7 0 64S14.3 32 32 32h96l7.2-14.3zM32 128H416V448c0 35.3-28.7 64-64 64H96c-35.3 0-64-28.7-64-64V128zm96 64c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16z"]},s={prefix:"fas",iconName:"pen-to-square",icon:[512,512,["edit"],"f044","M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160V416c0 53 43 96 96 96H352c53 0 96-43 96-96V320c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H96z"]},r={prefix:"fas",iconName:"circle-check",icon:[512,512,[61533,"check-circle"],"f058","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"]},a={prefix:"fas",iconName:"circle-arrow-left",icon:[512,512,["arrow-circle-left"],"f0a8","M512 256A256 256 0 1 0 0 256a256 256 0 1 0 512 0zM231 127c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-71 71L376 232c13.3 0 24 10.7 24 24s-10.7 24-24 24l-182.1 0 71 71c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L119 273c-9.4-9.4-9.4-24.6 0-33.9L231 127z"]},f={prefix:"fas",iconName:"map-pin",icon:[320,512,[128205],"f276","M16 144a144 144 0 1 1 288 0A144 144 0 1 1 16 144zM160 80c8.8 0 16-7.2 16-16s-7.2-16-16-16c-53 0-96 43-96 96c0 8.8 7.2 16 16 16s16-7.2 16-16c0-35.3 28.7-64 64-64zM128 480V317.1c10.4 1.9 21.1 2.9 32 2.9s21.6-1 32-2.9V480c0 17.7-14.3 32-32 32s-32-14.3-32-32z"]}}}]); \ No newline at end of file diff --git a/out/_next/static/chunks/9f5cd2ed-d01a892385009708.js b/out/_next/static/chunks/9f5cd2ed-d01a892385009708.js new file mode 100644 index 0000000..29c6640 --- /dev/null +++ b/out/_next/static/chunks/9f5cd2ed-d01a892385009708.js @@ -0,0 +1,976 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[211],{8591:function(e,t,i){i.d(t,{C:function(){return e3},X:function(){return eq},c:function(){return tT},o:function(){return t8}});var r,n=i(4444),s=i(5816),a=i(3333),o=i(7582),l=i(8463);function c(){return{"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."}}let u=new n.LL("auth","Firebase",c()),h=new a.Yd("@firebase/auth");function d(e,...t){h.logLevel<=a.in.ERROR&&h.error(`Auth (${s.Jn}): ${e}`,...t)}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function p(e,...t){throw g(e,...t)}function f(e,...t){return g(e,...t)}function m(e,t,i){let r=Object.assign(Object.assign({},c()),{[t]:i});return new n.LL("auth","Firebase",r).create(t,{appName:e.name})}function g(e,...t){if("string"!=typeof e){let i=t[0],r=[...t.slice(1)];return r[0]&&(r[0].appName=e.name),e._errorFactory.create(i,...r)}return u.create(e,...t)}function v(e,t,...i){if(!e)throw g(t,...i)}function _(e){let t="INTERNAL ASSERTION FAILED: "+e;throw d(t),Error(t)}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function I(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.href)||""}function w(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.protocol)||null}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class y{constructor(e,t){this.shortDelay=e,this.longDelay=t,t>e||_("Short delay should be less than long delay!"),this.isMobile=(0,n.uI)()||(0,n.b$)()}get(){return!("undefined"!=typeof navigator&&navigator&&"onLine"in navigator&&"boolean"==typeof navigator.onLine&&("http:"===w()||"https:"===w()||(0,n.ru)()||"connection"in navigator))||navigator.onLine?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function T(e,t){e.emulator||_("Emulator should always be set here");let{url:i}=e.emulator;return t?`${i}${t.startsWith("/")?t.slice(1):t}`:i}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class E{static initialize(e,t,i){this.fetchImpl=e,t&&(this.headersImpl=t),i&&(this.responseImpl=i)}static fetch(){return this.fetchImpl?this.fetchImpl:"undefined"!=typeof self&&"fetch"in self?self.fetch:"undefined"!=typeof globalThis&&globalThis.fetch?globalThis.fetch:"undefined"!=typeof fetch?fetch:void _("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){return this.headersImpl?this.headersImpl:"undefined"!=typeof self&&"Headers"in self?self.Headers:"undefined"!=typeof globalThis&&globalThis.Headers?globalThis.Headers:"undefined"!=typeof Headers?Headers:void _("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){return this.responseImpl?this.responseImpl:"undefined"!=typeof self&&"Response"in self?self.Response:"undefined"!=typeof globalThis&&globalThis.Response?globalThis.Response:"undefined"!=typeof Response?Response:void _("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let k={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"},S=new y(3e4,6e4);function R(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}async function P(e,t,i,r,s={}){return O(e,s,async()=>{let s={},a={};r&&("GET"===t?a=r:s={body:JSON.stringify(r)});let o=(0,n.xO)(Object.assign({key:e.config.apiKey},a)).slice(1),l=await e._getAdditionalHeaders();return l["Content-Type"]="application/json",e.languageCode&&(l["X-Firebase-Locale"]=e.languageCode),E.fetch()(b(e,e.config.apiHost,i,o),Object.assign({method:t,headers:l,referrerPolicy:"no-referrer"},s))})}async function O(e,t,i){e._canInitEmulator=!1;let r=Object.assign(Object.assign({},k),t);try{let t=new N(e),n=await Promise.race([i(),t.promise]);t.clearNetworkTimeout();let s=await n.json();if("needConfirmation"in s)throw A(e,"account-exists-with-different-credential",s);if(n.ok&&!("errorMessage"in s))return s;{let[t,i]=(n.ok?s.errorMessage:s.error.message).split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===t)throw A(e,"credential-already-in-use",s);if("EMAIL_EXISTS"===t)throw A(e,"email-already-in-use",s);if("USER_DISABLED"===t)throw A(e,"user-disabled",s);let a=r[t]||t.toLowerCase().replace(/[_\s]+/g,"-");if(i)throw m(e,a,i);p(e,a)}}catch(t){if(t instanceof n.ZR)throw t;p(e,"network-request-failed",{message:String(t)})}}async function C(e,t,i,r,n={}){let s=await P(e,t,i,r,n);return"mfaPendingCredential"in s&&p(e,"multi-factor-auth-required",{_serverResponse:s}),s}function b(e,t,i,r){let n=`${t}${i}?${r}`;return e.config.emulator?T(e.config,n):`${e.config.apiScheme}://${n}`}class N{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((e,t)=>{this.timer=setTimeout(()=>t(f(this.auth,"network-request-failed")),S.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function A(e,t,i){let r={appName:e.name};i.email&&(r.email=i.email),i.phoneNumber&&(r.phoneNumber=i.phoneNumber);let n=f(e,t,r);return n.customData._tokenResponse=i,n}function L(e){return void 0!==e&&void 0!==e.enterprise}class D{constructor(e){if(this.siteKey="",this.recaptchaEnforcementState=[],void 0===e.recaptchaKey)throw Error("recaptchaKey undefined");this.siteKey=e.recaptchaKey.split("/")[3],this.recaptchaEnforcementState=e.recaptchaEnforcementState}getProviderEnforcementState(e){if(!this.recaptchaEnforcementState||0===this.recaptchaEnforcementState.length)return null;for(let t of this.recaptchaEnforcementState)if(t.provider&&t.provider===e)return function(e){switch(e){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}(t.enforcementState);return null}isProviderEnabled(e){return"ENFORCE"===this.getProviderEnforcementState(e)||"AUDIT"===this.getProviderEnforcementState(e)}}async function M(e,t){return P(e,"GET","/v2/recaptchaConfig",R(e,t))}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function U(e,t){return P(e,"POST","/v1/accounts:delete",t)}async function x(e,t){return P(e,"POST","/v1/accounts:lookup",t)}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function V(e){if(e)try{let t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(e){}}async function F(e,t=!1){let i=(0,n.m9)(e),r=await i.getIdToken(t),s=z(r);v(s&&s.exp&&s.auth_time&&s.iat,i.auth,"internal-error");let a="object"==typeof s.firebase?s.firebase:void 0,o=null==a?void 0:a.sign_in_provider;return{claims:s,token:r,authTime:V(j(s.auth_time)),issuedAtTime:V(j(s.iat)),expirationTime:V(j(s.exp)),signInProvider:o||null,signInSecondFactor:(null==a?void 0:a.sign_in_second_factor)||null}}function j(e){return 1e3*Number(e)}function z(e){let[t,i,r]=e.split(".");if(void 0===t||void 0===i||void 0===r)return d("JWT malformed, contained fewer than 3 sections"),null;try{let e=(0,n.tV)(i);if(!e)return d("Failed to decode base64 JWT payload"),null;return JSON.parse(e)}catch(e){return d("Caught error parsing JWT payload as JSON",null==e?void 0:e.toString()),null}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function H(e,t,i=!1){if(i)return t;try{return await t}catch(t){throw t instanceof n.ZR&&function({code:e}){return"auth/user-disabled"===e||"auth/user-token-expired"===e}(t)&&e.auth.currentUser===e&&await e.auth.signOut(),t}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class W{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,null!==this.timerId&&clearTimeout(this.timerId))}getInterval(e){var t;if(!e)return this.errorBackoff=3e4,Math.max(0,(null!==(t=this.user.stsTokenManager.expirationTime)&&void 0!==t?t:0)-Date.now()-3e5);{let e=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),e}}schedule(e=!1){if(!this.isRunning)return;let t=this.getInterval(e);this.timerId=setTimeout(async()=>{await this.iteration()},t)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){(null==e?void 0:e.code)==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ${constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=V(this.lastLoginAt),this.creationTime=V(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function K(e){var t;let i=e.auth,r=await e.getIdToken(),n=await H(e,x(i,{idToken:r}));v(null==n?void 0:n.users.length,i,"internal-error");let s=n.users[0];e._notifyReloadListener(s);let a=(null===(t=s.providerUserInfo)||void 0===t?void 0:t.length)?s.providerUserInfo.map(e=>{var{providerId:t}=e,i=(0,o._T)(e,["providerId"]);return{providerId:t,uid:i.rawId||"",displayName:i.displayName||null,email:i.email||null,phoneNumber:i.phoneNumber||null,photoURL:i.photoUrl||null}}):[],l=[...e.providerData.filter(e=>!a.some(t=>t.providerId===e.providerId)),...a],c=e.isAnonymous,u=!(e.email&&s.passwordHash)&&!(null==l?void 0:l.length);Object.assign(e,{uid:s.localId,displayName:s.displayName||null,photoURL:s.photoUrl||null,email:s.email||null,emailVerified:s.emailVerified||!1,phoneNumber:s.phoneNumber||null,tenantId:s.tenantId||null,providerData:l,metadata:new $(s.createdAt,s.lastLoginAt),isAnonymous:!!c&&u})}async function q(e){let t=(0,n.m9)(e);await K(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function G(e,t){let i=await O(e,{},async()=>{let i=(0,n.xO)({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:r,apiKey:s}=e.config,a=b(e,r,"/v1/token",`key=${s}`),o=await e._getAdditionalHeaders();return o["Content-Type"]="application/x-www-form-urlencoded",E.fetch()(a,{method:"POST",headers:o,body:i})});return{accessToken:i.access_token,expiresIn:i.expires_in,refreshToken:i.refresh_token}}async function J(e,t){return P(e,"POST","/v2/accounts:revokeToken",R(e,t))}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class B{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){v(e.idToken,"internal-error"),v(void 0!==e.idToken,"internal-error"),v(void 0!==e.refreshToken,"internal-error");let t="expiresIn"in e&&void 0!==e.expiresIn?Number(e.expiresIn):function(e){let t=z(e);return v(t,"internal-error"),v(void 0!==t.exp,"internal-error"),v(void 0!==t.iat,"internal-error"),Number(t.exp)-Number(t.iat)}(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}async getToken(e,t=!1){return(v(!this.accessToken||this.refreshToken,e,"user-token-expired"),t||!this.accessToken||this.isExpired)?this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null:this.accessToken}clearRefreshToken(){this.refreshToken=null}async refresh(e,t){let{accessToken:i,refreshToken:r,expiresIn:n}=await G(e,t);this.updateTokensAndExpiration(i,r,Number(n))}updateTokensAndExpiration(e,t,i){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*i}static fromJSON(e,t){let{refreshToken:i,accessToken:r,expirationTime:n}=t,s=new B;return i&&(v("string"==typeof i,"internal-error",{appName:e}),s.refreshToken=i),r&&(v("string"==typeof r,"internal-error",{appName:e}),s.accessToken=r),n&&(v("number"==typeof n,"internal-error",{appName:e}),s.expirationTime=n),s}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new B,this.toJSON())}_performRefresh(){return _("not implemented")}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function X(e,t){v("string"==typeof e||void 0===e,"internal-error",{appName:t})}class Y{constructor(e){var{uid:t,auth:i,stsTokenManager:r}=e,n=(0,o._T)(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new W(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=t,this.auth=i,this.stsTokenManager=r,this.accessToken=r.accessToken,this.displayName=n.displayName||null,this.email=n.email||null,this.emailVerified=n.emailVerified||!1,this.phoneNumber=n.phoneNumber||null,this.photoURL=n.photoURL||null,this.isAnonymous=n.isAnonymous||!1,this.tenantId=n.tenantId||null,this.providerData=n.providerData?[...n.providerData]:[],this.metadata=new $(n.createdAt||void 0,n.lastLoginAt||void 0)}async getIdToken(e){let t=await H(this,this.stsTokenManager.getToken(this.auth,e));return v(t,this.auth,"internal-error"),this.accessToken!==t&&(this.accessToken=t,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),t}getIdTokenResult(e){return F(this,e)}reload(){return q(this)}_assign(e){this!==e&&(v(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,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(e=>Object.assign({},e)),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){let t=new Y(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return t.metadata._copy(this.metadata),t}_onReload(e){v(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e,t=!1){let i=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),i=!0),t&&await K(this),await this.auth._persistUserIfCurrent(this),i&&this.auth._notifyListenersIfCurrent(this)}async delete(){let e=await this.getIdToken();return await H(this,U(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){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(e=>Object.assign({},e)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,t){var i,r,n,s,a,o,l,c;let u=null!==(i=t.displayName)&&void 0!==i?i:void 0,h=null!==(r=t.email)&&void 0!==r?r:void 0,d=null!==(n=t.phoneNumber)&&void 0!==n?n:void 0,p=null!==(s=t.photoURL)&&void 0!==s?s:void 0,f=null!==(a=t.tenantId)&&void 0!==a?a:void 0,m=null!==(o=t._redirectEventId)&&void 0!==o?o:void 0,g=null!==(l=t.createdAt)&&void 0!==l?l:void 0,_=null!==(c=t.lastLoginAt)&&void 0!==c?c:void 0,{uid:I,emailVerified:w,isAnonymous:y,providerData:T,stsTokenManager:E}=t;v(I&&E,e,"internal-error");let k=B.fromJSON(this.name,E);v("string"==typeof I,e,"internal-error"),X(u,e.name),X(h,e.name),v("boolean"==typeof w,e,"internal-error"),v("boolean"==typeof y,e,"internal-error"),X(d,e.name),X(p,e.name),X(f,e.name),X(m,e.name),X(g,e.name),X(_,e.name);let S=new Y({uid:I,auth:e,email:h,emailVerified:w,displayName:u,isAnonymous:y,photoURL:p,phoneNumber:d,tenantId:f,stsTokenManager:k,createdAt:g,lastLoginAt:_});return T&&Array.isArray(T)&&(S.providerData=T.map(e=>Object.assign({},e))),m&&(S._redirectEventId=m),S}static async _fromIdTokenResponse(e,t,i=!1){let r=new B;r.updateFromServerResponse(t);let n=new Y({uid:t.localId,auth:e,stsTokenManager:r,isAnonymous:i});return await K(n),n}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let Q=new Map;function Z(e){e instanceof Function||_("Expected a class definition");let t=Q.get(e);return t?t instanceof e||_("Instance stored in cache mismatched with class"):(t=new e,Q.set(e,t)),t}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ee{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,t){this.storage[e]=t}async _get(e){let t=this.storage[e];return void 0===t?null:t}async _remove(e){delete this.storage[e]}_addListener(e,t){}_removeListener(e,t){}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function et(e,t,i){return`firebase:${e}:${t}:${i}`}ee.type="NONE";class ei{constructor(e,t,i){this.persistence=e,this.auth=t,this.userKey=i;let{config:r,name:n}=this.auth;this.fullUserKey=et(this.userKey,r.apiKey,n),this.fullPersistenceKey=et("persistence",r.apiKey,n),this.boundEventHandler=t._onStorageEvent.bind(t),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){let e=await this.persistence._get(this.fullUserKey);return e?Y._fromJSON(this.auth,e):null}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;let t=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=e,t)return this.setCurrentUser(t)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,t,i="authUser"){if(!t.length)return new ei(Z(ee),e,i);let r=(await Promise.all(t.map(async e=>{if(await e._isAvailable())return e}))).filter(e=>e),n=r[0]||Z(ee),s=et(i,e.config.apiKey,e.name),a=null;for(let i of t)try{let t=await i._get(s);if(t){let r=Y._fromJSON(e,t);i!==n&&(a=r),n=i;break}}catch(e){}let o=r.filter(e=>e._shouldAllowMigration);return n._shouldAllowMigration&&o.length&&(n=o[0],a&&await n._set(s,a.toJSON()),await Promise.all(t.map(async e=>{if(e!==n)try{await e._remove(s)}catch(e){}}))),new ei(n,e,i)}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function er(e){let t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(eo(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";{if(t.includes("edge/"))return"Edge";if(en(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(ec(t))return"Blackberry";if(eu(t))return"Webos";if(es(t))return"Safari";if((t.includes("chrome/")||ea(t))&&!t.includes("edge/"))return"Chrome";if(el(t))return"Android";let i=e.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/);if((null==i?void 0:i.length)===2)return i[1]}return"Other"}function en(e=(0,n.z$)()){return/firefox\//i.test(e)}function es(e=(0,n.z$)()){let t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function ea(e=(0,n.z$)()){return/crios\//i.test(e)}function eo(e=(0,n.z$)()){return/iemobile/i.test(e)}function el(e=(0,n.z$)()){return/android/i.test(e)}function ec(e=(0,n.z$)()){return/blackberry/i.test(e)}function eu(e=(0,n.z$)()){return/webos/i.test(e)}function eh(e=(0,n.z$)()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function ed(e=(0,n.z$)()){return eh(e)||el(e)||eu(e)||ec(e)||/windows phone/i.test(e)||eo(e)}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function ep(e,t=[]){let i;switch(e){case"Browser":i=er((0,n.z$)());break;case"Worker":i=`${er((0,n.z$)())}-${e}`;break;default:i=e}let r=t.length?t.join(","):"FirebaseCore-web";return`${i}/JsCore/${s.Jn}/${r}`}/** + * @license + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ef{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){let i=t=>new Promise((i,r)=>{try{let r=e(t);i(r)}catch(e){r(e)}});i.onAbort=t,this.queue.push(i);let r=this.queue.length-1;return()=>{this.queue[r]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;let t=[];try{for(let i of this.queue)await i(e),i.onAbort&&t.push(i.onAbort)}catch(e){for(let e of(t.reverse(),t))try{e()}catch(e){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:null==e?void 0:e.message})}}}/** + * @license + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function em(e,t={}){return P(e,"GET","/v2/passwordPolicy",R(e,t))}class eg{constructor(e){var t,i,r,n;let s=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=null!==(t=s.minPasswordLength)&&void 0!==t?t:6,s.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=s.maxPasswordLength),void 0!==s.containsLowercaseCharacter&&(this.customStrengthOptions.containsLowercaseLetter=s.containsLowercaseCharacter),void 0!==s.containsUppercaseCharacter&&(this.customStrengthOptions.containsUppercaseLetter=s.containsUppercaseCharacter),void 0!==s.containsNumericCharacter&&(this.customStrengthOptions.containsNumericCharacter=s.containsNumericCharacter),void 0!==s.containsNonAlphanumericCharacter&&(this.customStrengthOptions.containsNonAlphanumericCharacter=s.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,"ENFORCEMENT_STATE_UNSPECIFIED"===this.enforcementState&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=null!==(r=null===(i=e.allowedNonAlphanumericCharacters)||void 0===i?void 0:i.join(""))&&void 0!==r?r:"",this.forceUpgradeOnSignin=null!==(n=e.forceUpgradeOnSignin)&&void 0!==n&&n,this.schemaVersion=e.schemaVersion}validatePassword(e){var t,i,r,n,s,a;let o={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,o),this.validatePasswordCharacterOptions(e,o),o.isValid&&(o.isValid=null===(t=o.meetsMinPasswordLength)||void 0===t||t),o.isValid&&(o.isValid=null===(i=o.meetsMaxPasswordLength)||void 0===i||i),o.isValid&&(o.isValid=null===(r=o.containsLowercaseLetter)||void 0===r||r),o.isValid&&(o.isValid=null===(n=o.containsUppercaseLetter)||void 0===n||n),o.isValid&&(o.isValid=null===(s=o.containsNumericCharacter)||void 0===s||s),o.isValid&&(o.isValid=null===(a=o.containsNonAlphanumericCharacter)||void 0===a||a),o}validatePasswordLengthOptions(e,t){let i=this.customStrengthOptions.minPasswordLength,r=this.customStrengthOptions.maxPasswordLength;i&&(t.meetsMinPasswordLength=e.length>=i),r&&(t.meetsMaxPasswordLength=e.length<=r)}validatePasswordCharacterOptions(e,t){let i;this.updatePasswordCharacterOptionsStatuses(t,!1,!1,!1,!1);for(let r=0;r="a"&&i<="z",i>="A"&&i<="Z",i>="0"&&i<="9",this.allowedNonAlphanumericCharacters.includes(i))}updatePasswordCharacterOptionsStatuses(e,t,i,r,n){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=t)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=i)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=r)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=n))}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ev{constructor(e,t,i,r){this.app=e,this.heartbeatServiceProvider=t,this.appCheckServiceProvider=i,this.config=r,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new eI(this),this.idTokenSubscription=new eI(this),this.beforeStateQueue=new ef(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=u,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=r.sdkClientVersion}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=Z(t)),this._initializationPromise=this.queue(async()=>{var i,r;if(!this._deleted&&(this.persistenceManager=await ei.create(this,e),!this._deleted)){if(null===(i=this._popupRedirectResolver)||void 0===i?void 0:i._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch(e){}await this.initializeCurrentUser(t),this.lastNotifiedUid=(null===(r=this.currentUser)||void 0===r?void 0:r.uid)||null,this._deleted||(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;let e=await this.assertedPersistence.getCurrentUser();if(this.currentUser||e){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),await this.currentUser.getIdToken();return}await this._updateCurrentUser(e,!0)}}async initializeCurrentUser(e){var t;let i=await this.assertedPersistence.getCurrentUser(),r=i,n=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();let i=null===(t=this.redirectUser)||void 0===t?void 0:t._redirectEventId,s=null==r?void 0:r._redirectEventId,a=await this.tryRedirectSignIn(e);(!i||i===s)&&(null==a?void 0:a.user)&&(r=a.user,n=!0)}if(!r)return this.directlySetCurrentUser(null);if(!r._redirectEventId){if(n)try{await this.beforeStateQueue.runMiddleware(r)}catch(e){r=i,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(e))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return(v(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===r._redirectEventId)?this.directlySetCurrentUser(r):this.reloadAndSetCurrentUserOrClear(r)}async tryRedirectSignIn(e){let t=null;try{t=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch(e){await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){try{await K(e)}catch(e){if((null==e?void 0:e.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=function(){if("undefined"==typeof navigator)return null;let e=navigator;return e.languages&&e.languages[0]||e.language||null}()}async _delete(){this._deleted=!0}async updateCurrentUser(e){let t=e?(0,n.m9)(e):null;return t&&v(t.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(t&&t._clone(this))}async _updateCurrentUser(e,t=!1){if(!this._deleted)return e&&v(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),t||await this.beforeStateQueue.runMiddleware(e),this.queue(async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()})}async signOut(){return await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0)}setPersistence(e){return this.queue(async()=>{await this.assertedPersistence.setPersistence(Z(e))})}_getRecaptchaConfig(){return null==this.tenantId?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(e){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();let t=this._getPasswordPolicyInternal();return t.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):t.validatePassword(e)}_getPasswordPolicyInternal(){return null===this.tenantId?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){let e=new eg(await em(this));null===this.tenantId?this._projectPasswordPolicy=e:this._tenantPasswordPolicies[this.tenantId]=e}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new n.LL("auth","Firebase",e())}onAuthStateChanged(e,t,i){return this.registerStateListener(this.authStateSubscription,e,t,i)}beforeAuthStateChanged(e,t){return this.beforeStateQueue.pushCallback(e,t)}onIdTokenChanged(e,t,i){return this.registerStateListener(this.idTokenSubscription,e,t,i)}authStateReady(){return new Promise((e,t)=>{if(this.currentUser)e();else{let i=this.onAuthStateChanged(()=>{i(),e()},t)}})}async revokeAccessToken(e){if(this.currentUser){let t={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:e,idToken:await this.currentUser.getIdToken()};null!=this.tenantId&&(t.tenantId=this.tenantId),await J(this,t)}}toJSON(){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()}}async _setRedirectUser(e,t){let i=await this.getOrInitRedirectPersistenceManager(t);return null===e?i.removeCurrentUser():i.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){let t=e&&Z(e)||this._popupRedirectResolver;v(t,this,"argument-error"),this.redirectPersistenceManager=await ei.create(this,[Z(t._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var t,i;return(this._isInitialized&&await this.queue(async()=>{}),(null===(t=this._currentUser)||void 0===t?void 0:t._redirectEventId)===e)?this._currentUser:(null===(i=this.redirectUser)||void 0===i?void 0:i._redirectEventId)===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(e))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var e,t;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);let i=null!==(t=null===(e=this.currentUser)||void 0===e?void 0:e.uid)&&void 0!==t?t:null;this.lastNotifiedUid!==i&&(this.lastNotifiedUid=i,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,i,r){if(this._deleted)return()=>{};let n="function"==typeof t?t:t.next.bind(t),s=!1,a=this._isInitialized?Promise.resolve():this._initializationPromise;if(v(a,this,"internal-error"),a.then(()=>{s||n(this.currentUser)}),"function"==typeof t){let n=e.addObserver(t,i,r);return()=>{s=!0,n()}}{let i=e.addObserver(t);return()=>{s=!0,i()}}}async directlySetCurrentUser(e){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?await this.assertedPersistence.setCurrentUser(e):await this.assertedPersistence.removeCurrentUser()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return v(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=ep(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var e;let t={"X-Client-Version":this.clientVersion};this.app.options.appId&&(t["X-Firebase-gmpid"]=this.app.options.appId);let i=await (null===(e=this.heartbeatServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getHeartbeatsHeader());i&&(t["X-Firebase-Client"]=i);let r=await this._getAppCheckToken();return r&&(t["X-Firebase-AppCheck"]=r),t}async _getAppCheckToken(){var e;let t=await (null===(e=this.appCheckServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getToken());return(null==t?void 0:t.error)&&function(e,...t){h.logLevel<=a.in.WARN&&h.warn(`Auth (${s.Jn}): ${e}`,...t)}(`Error while retrieving App Check token: ${t.error}`),null==t?void 0:t.token}}function e_(e){return(0,n.m9)(e)}class eI{constructor(e){this.auth=e,this.observer=null,this.addObserver=(0,n.ne)(e=>this.observer=e)}get next(){return v(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let ew={async loadJS(){throw Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function ey(e){return`__${e}${Math.floor(1e6*Math.random())}`}class eT{constructor(e){this.type="recaptcha-enterprise",this.auth=e_(e)}async verify(e="verify",t=!1){async function i(e){if(!t){if(null==e.tenantId&&null!=e._agentRecaptchaConfig)return e._agentRecaptchaConfig.siteKey;if(null!=e.tenantId&&void 0!==e._tenantRecaptchaConfigs[e.tenantId])return e._tenantRecaptchaConfigs[e.tenantId].siteKey}return new Promise(async(t,i)=>{M(e,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(r=>{if(void 0===r.recaptchaKey)i(Error("recaptcha Enterprise site key undefined"));else{let i=new D(r);return null==e.tenantId?e._agentRecaptchaConfig=i:e._tenantRecaptchaConfigs[e.tenantId]=i,t(i.siteKey)}}).catch(e=>{i(e)})})}function r(t,i,r){let n=window.grecaptcha;L(n)?n.enterprise.ready(()=>{n.enterprise.execute(t,{action:e}).then(e=>{i(e)}).catch(()=>{i("NO_RECAPTCHA")})}):r(Error("No reCAPTCHA enterprise script loaded."))}return new Promise((e,n)=>{i(this.auth).then(i=>{if(!t&&L(window.grecaptcha))r(i,e,n);else{var s;if("undefined"==typeof window){n(Error("RecaptchaVerifier is only supported in browser"));return}let t=ew.recaptchaEnterpriseScript;0!==t.length&&(t+=i),(s=t,ew.loadJS(s)).then(()=>{r(i,e,n)}).catch(e=>{n(e)})}}).catch(e=>{n(e)})})}}async function eE(e,t,i,r=!1){let n;let s=new eT(e);try{n=await s.verify(i)}catch(e){n=await s.verify(i,!0)}let a=Object.assign({},t);return r?Object.assign(a,{captchaResp:n}):Object.assign(a,{captchaResponse:n}),Object.assign(a,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(a,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),a}async function ek(e,t,i,r){var n;if(null===(n=e._getRecaptchaConfig())||void 0===n||!n.isProviderEnabled("EMAIL_PASSWORD_PROVIDER"))return r(e,t).catch(async n=>{if("auth/missing-recaptcha-token"!==n.code)return Promise.reject(n);{console.log(`${i} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);let n=await eE(e,t,i,"getOobCode"===i);return r(e,n)}});{let n=await eE(e,t,i,"getOobCode"===i);return r(e,n)}}function eS(e){let t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function eR(e){if(!e)return null;let t=Number(e);return isNaN(t)?null:t}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class eP{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return _("not implemented")}_getIdTokenResponse(e){return _("not implemented")}_linkToIdToken(e,t){return _("not implemented")}_getReauthenticationResolver(e){return _("not implemented")}}async function eO(e,t){return P(e,"POST","/v1/accounts:signUp",t)}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function eC(e,t){return C(e,"POST","/v1/accounts:signInWithPassword",R(e,t))}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function eb(e,t){return C(e,"POST","/v1/accounts:signInWithEmailLink",R(e,t))}async function eN(e,t){return C(e,"POST","/v1/accounts:signInWithEmailLink",R(e,t))}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class eA extends eP{constructor(e,t,i,r=null){super("password",i),this._email=e,this._password=t,this._tenantId=r}static _fromEmailAndPassword(e,t){return new eA(e,t,"password")}static _fromEmailAndCode(e,t,i=null){return new eA(e,t,"emailLink",i)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){let t="string"==typeof e?JSON.parse(e):e;if((null==t?void 0:t.email)&&(null==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}async _getIdTokenResponse(e){switch(this.signInMethod){case"password":return ek(e,{returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signInWithPassword",eC);case"emailLink":return eb(e,{email:this._email,oobCode:this._password});default:p(e,"internal-error")}}async _linkToIdToken(e,t){switch(this.signInMethod){case"password":return ek(e,{idToken:t,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",eO);case"emailLink":return eN(e,{idToken:t,email:this._email,oobCode:this._password});default:p(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function eL(e,t){return C(e,"POST","/v1/accounts:signInWithIdp",R(e,t))}class eD extends eP{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){let t=new eD(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):p("argument-error"),t}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){let t="string"==typeof e?JSON.parse(e):e,{providerId:i,signInMethod:r}=t,n=(0,o._T)(t,["providerId","signInMethod"]);if(!i||!r)return null;let s=new eD(i,r);return s.idToken=n.idToken||void 0,s.accessToken=n.accessToken||void 0,s.secret=n.secret,s.nonce=n.nonce,s.pendingToken=n.pendingToken||null,s}_getIdTokenResponse(e){return eL(e,this.buildRequest())}_linkToIdToken(e,t){let i=this.buildRequest();return i.idToken=t,eL(e,i)}_getReauthenticationResolver(e){let t=this.buildRequest();return t.autoCreate=!1,eL(e,t)}buildRequest(){let e={requestUri:"http://localhost",returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{let 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=(0,n.xO)(t)}return e}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function eM(e,t){return P(e,"POST","/v1/accounts:sendVerificationCode",R(e,t))}async function eU(e,t){return C(e,"POST","/v1/accounts:signInWithPhoneNumber",R(e,t))}async function ex(e,t){let i=await C(e,"POST","/v1/accounts:signInWithPhoneNumber",R(e,t));if(i.temporaryProof)throw A(e,"account-exists-with-different-credential",i);return i}let eV={USER_NOT_FOUND:"user-not-found"};async function eF(e,t){return C(e,"POST","/v1/accounts:signInWithPhoneNumber",R(e,Object.assign(Object.assign({},t),{operation:"REAUTH"})),eV)}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ej extends eP{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,t){return new ej({verificationId:e,verificationCode:t})}static _fromTokenResponse(e,t){return new ej({phoneNumber:e,temporaryProof:t})}_getIdTokenResponse(e){return eU(e,this._makeVerificationRequest())}_linkToIdToken(e,t){return ex(e,Object.assign({idToken:t},this._makeVerificationRequest()))}_getReauthenticationResolver(e){return eF(e,this._makeVerificationRequest())}_makeVerificationRequest(){let{temporaryProof:e,phoneNumber:t,verificationId:i,verificationCode:r}=this.params;return e&&t?{temporaryProof:e,phoneNumber:t}:{sessionInfo:i,code:r}}toJSON(){let 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}static fromJSON(e){"string"==typeof e&&(e=JSON.parse(e));let{verificationId:t,verificationCode:i,phoneNumber:r,temporaryProof:n}=e;return i||t||r||n?new ej({verificationId:t,verificationCode:i,phoneNumber:r,temporaryProof:n}):null}}class ez{constructor(e){var t,i,r,s,a,o;let l=(0,n.zd)((0,n.pd)(e)),c=null!==(t=l.apiKey)&&void 0!==t?t:null,u=null!==(i=l.oobCode)&&void 0!==i?i:null,h=/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function(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!==(r=l.mode)&&void 0!==r?r:null);v(c&&u&&h,"argument-error"),this.apiKey=c,this.operation=h,this.code=u,this.continueUrl=null!==(s=l.continueUrl)&&void 0!==s?s:null,this.languageCode=null!==(a=l.languageCode)&&void 0!==a?a:null,this.tenantId=null!==(o=l.tenantId)&&void 0!==o?o:null}static parseLink(e){let t=function(e){let t=(0,n.zd)((0,n.pd)(e)).link,i=t?(0,n.zd)((0,n.pd)(t)).deep_link_id:null,r=(0,n.zd)((0,n.pd)(e)).deep_link_id;return(r?(0,n.zd)((0,n.pd)(r)).link:null)||r||i||t||e}(e);try{return new ez(t)}catch(e){return null}}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class eH{constructor(){this.providerId=eH.PROVIDER_ID}static credential(e,t){return eA._fromEmailAndPassword(e,t)}static credentialWithLink(e,t){let i=ez.parseLink(t);return v(i,"argument-error"),eA._fromEmailAndCode(e,i.code,i.tenantId)}}eH.PROVIDER_ID="password",eH.EMAIL_PASSWORD_SIGN_IN_METHOD="password",eH.EMAIL_LINK_SIGN_IN_METHOD="emailLink";/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class eW{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class e$ extends eW{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class eK extends e${constructor(){super("facebook.com")}static credential(e){return eD._fromParams({providerId:eK.PROVIDER_ID,signInMethod:eK.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return eK.credentialFromTaggedObject(e)}static credentialFromError(e){return eK.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return eK.credential(e.oauthAccessToken)}catch(e){return null}}}eK.FACEBOOK_SIGN_IN_METHOD="facebook.com",eK.PROVIDER_ID="facebook.com";/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class eq extends e${constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return eD._fromParams({providerId:eq.PROVIDER_ID,signInMethod:eq.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return eq.credentialFromTaggedObject(e)}static credentialFromError(e){return eq.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthIdToken:t,oauthAccessToken:i}=e;if(!t&&!i)return null;try{return eq.credential(t,i)}catch(e){return null}}}eq.GOOGLE_SIGN_IN_METHOD="google.com",eq.PROVIDER_ID="google.com";/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class eG extends e${constructor(){super("github.com")}static credential(e){return eD._fromParams({providerId:eG.PROVIDER_ID,signInMethod:eG.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return eG.credentialFromTaggedObject(e)}static credentialFromError(e){return eG.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return eG.credential(e.oauthAccessToken)}catch(e){return null}}}eG.GITHUB_SIGN_IN_METHOD="github.com",eG.PROVIDER_ID="github.com";/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class eJ extends e${constructor(){super("twitter.com")}static credential(e,t){return eD._fromParams({providerId:eJ.PROVIDER_ID,signInMethod:eJ.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return eJ.credentialFromTaggedObject(e)}static credentialFromError(e){return eJ.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthAccessToken:t,oauthTokenSecret:i}=e;if(!t||!i)return null;try{return eJ.credential(t,i)}catch(e){return null}}}eJ.TWITTER_SIGN_IN_METHOD="twitter.com",eJ.PROVIDER_ID="twitter.com";/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class eB{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,t,i,r=!1){return new eB({user:await Y._fromIdTokenResponse(e,i,r),providerId:eX(i),_tokenResponse:i,operationType:t})}static async _forOperation(e,t,i){return await e._updateTokensIfNecessary(i,!0),new eB({user:e,providerId:eX(i),_tokenResponse:i,operationType:t})}}function eX(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class eY extends n.ZR{constructor(e,t,i,r){var n;super(t.code,t.message),this.operationType=i,this.user=r,Object.setPrototypeOf(this,eY.prototype),this.customData={appName:e.name,tenantId:null!==(n=e.tenantId)&&void 0!==n?n:void 0,_serverResponse:t.customData._serverResponse,operationType:i}}static _fromErrorAndOperation(e,t,i,r){return new eY(e,t,i,r)}}function eQ(e,t,i,r){return("reauthenticate"===t?i._getReauthenticationResolver(e):i._getIdTokenResponse(e)).catch(i=>{if("auth/multi-factor-auth-required"===i.code)throw eY._fromErrorAndOperation(e,i,t,r);throw i})}async function eZ(e,t,i=!1){let r=await H(e,t._linkToIdToken(e.auth,await e.getIdToken()),i);return eB._forOperation(e,"link",r)}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function e0(e,t,i=!1){let{auth:r}=e,n="reauthenticate";try{let s=await H(e,eQ(r,n,t,e),i);v(s.idToken,r,"internal-error");let a=z(s.idToken);v(a,r,"internal-error");let{sub:o}=a;return v(e.uid===o,r,"user-mismatch"),eB._forOperation(e,n,s)}catch(e){throw(null==e?void 0:e.code)==="auth/user-not-found"&&p(r,"user-mismatch"),e}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function e1(e,t,i=!1){let r="signIn",n=await eQ(e,r,t),s=await eB._fromIdTokenResponse(e,r,n);return i||await e._updateCurrentUser(s.user),s}function e3(e){return(0,n.m9)(e).signOut()}new WeakMap;let e2="__sak";/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class e4{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{if(!this.storage)return Promise.resolve(!1);return this.storage.setItem(e2,"1"),this.storage.removeItem(e2),Promise.resolve(!0)}catch(e){return Promise.resolve(!1)}}_set(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}_get(e){let t=this.storage.getItem(e);return Promise.resolve(t?JSON.parse(t):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}class e5 extends e4{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function(){let e=(0,n.z$)();return es(e)||eh(e)}()&&function(){try{return!!(window&&window!==window.top)}catch(e){return!1}}(),this.fallbackToPolling=ed(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(let t of Object.keys(this.listeners)){let i=this.storage.getItem(t),r=this.localCache[t];i!==r&&e(t,r,i)}}onStorageEvent(e,t=!1){if(!e.key){this.forAllChangedKeys((e,t,i)=>{this.notifyListeners(e,i)});return}let i=e.key;if(t?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){let r=this.storage.getItem(i);if(e.newValue!==r)null!==e.newValue?this.storage.setItem(i,e.newValue):this.storage.removeItem(i);else if(this.localCache[i]===e.newValue&&!t)return}let r=()=>{let e=this.storage.getItem(i);(t||this.localCache[i]!==e)&&this.notifyListeners(i,e)},s=this.storage.getItem(i);(0,n.w1)()&&10===document.documentMode&&s!==e.newValue&&e.newValue!==e.oldValue?setTimeout(r,10):r()}notifyListeners(e,t){this.localCache[e]=t;let i=this.listeners[e];if(i)for(let e of Array.from(i))e(t?JSON.parse(t):t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,t,i)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:t,newValue:i}),!0)})},1e3)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(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)}_removeListener(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())}async _set(e,t){await super._set(e,t),this.localCache[e]=JSON.stringify(t)}async _get(e){let t=await super._get(e);return this.localCache[e]=JSON.stringify(t),t}async _remove(e){await super._remove(e),delete this.localCache[e]}}e5.type="LOCAL";/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class e6 extends e4{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,t){}_removeListener(e,t){}}e6.type="SESSION";/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class e9{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){let t=this.receivers.find(t=>t.isListeningto(e));if(t)return t;let i=new e9(e);return this.receivers.push(i),i}isListeningto(e){return this.eventTarget===e}async handleEvent(e){let{eventId:t,eventType:i,data:r}=e.data,n=this.handlersMap[i];if(!(null==n?void 0:n.size))return;e.ports[0].postMessage({status:"ack",eventId:t,eventType:i});let s=Array.from(n).map(async t=>t(e.origin,r)),a=await Promise.all(s.map(async e=>{try{let t=await e;return{fulfilled:!0,value:t}}catch(e){return{fulfilled:!1,reason:e}}}));e.ports[0].postMessage({status:"done",eventId:t,eventType:i,response:a})}_subscribe(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)}_unsubscribe(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)}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function e8(e="",t=10){let i="";for(let e=0;e{let l=e8("",20);s.port1.start();let c=setTimeout(()=>{o(Error("unsupported_event"))},i);n={messageChannel:s,onMessage(e){if(e.data.eventId===l)switch(e.data.status){case"ack":clearTimeout(c),r=setTimeout(()=>{o(Error("timeout"))},3e3);break;case"done":clearTimeout(r),a(e.data.response);break;default:clearTimeout(c),clearTimeout(r),o(Error("invalid_response"))}}},this.handlers.add(n),s.port1.addEventListener("message",n.onMessage),this.target.postMessage({eventType:e,eventId:l,data:t},[s.port2])}).finally(()=>{n&&this.removeMessageHandler(n)})}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function te(){return window}/** + * @license + * Copyright 2020 Google LLC. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function tt(){return void 0!==te().WorkerGlobalScope&&"function"==typeof te().importScripts}async function ti(){if(!(null==navigator?void 0:navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch(e){return null}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let tr="firebaseLocalStorageDb",tn="firebaseLocalStorage",ts="fbase_key";class ta{constructor(e){this.request=e}toPromise(){return new Promise((e,t)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{t(this.request.error)})})}}function to(e,t){return e.transaction([tn],t?"readwrite":"readonly").objectStore(tn)}function tl(){let e=indexedDB.open(tr,1);return new Promise((t,i)=>{e.addEventListener("error",()=>{i(e.error)}),e.addEventListener("upgradeneeded",()=>{let t=e.result;try{t.createObjectStore(tn,{keyPath:ts})}catch(e){i(e)}}),e.addEventListener("success",async()=>{let i=e.result;i.objectStoreNames.contains(tn)?t(i):(i.close(),await new ta(indexedDB.deleteDatabase(tr)).toPromise(),t(await tl()))})})}async function tc(e,t,i){return new ta(to(e,!0).put({[ts]:t,value:i})).toPromise()}async function tu(e,t){let i=to(e,!1).get(t),r=await new ta(i).toPromise();return void 0===r?null:r.value}function th(e,t){return new ta(to(e,!0).delete(t)).toPromise()}class td{constructor(){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(()=>{},()=>{})}async _openDb(){return this.db||(this.db=await tl()),this.db}async _withRetries(e){let t=0;for(;;)try{let t=await this._openDb();return await e(t)}catch(e){if(t++>3)throw e;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return tt()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=e9._getInstance(tt()?self:null),this.receiver._subscribe("keyChanged",async(e,t)=>({keyProcessed:(await this._poll()).includes(t.key)})),this.receiver._subscribe("ping",async(e,t)=>["keyChanged"])}async initializeSender(){var e,t;if(this.activeServiceWorker=await ti(),!this.activeServiceWorker)return;this.sender=new e7(this.activeServiceWorker);let i=await this.sender._send("ping",{},800);i&&(null===(e=i[0])||void 0===e?void 0:e.fulfilled)&&(null===(t=i[0])||void 0===t?void 0:t.value.includes("keyChanged"))&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){var t;if(this.sender&&this.activeServiceWorker&&((null===(t=null==navigator?void 0:navigator.serviceWorker)||void 0===t?void 0:t.controller)||null)===this.activeServiceWorker)try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch(e){}}async _isAvailable(){try{if(!indexedDB)return!1;let e=await tl();return await tc(e,e2,"1"),await th(e,e2),!0}catch(e){}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite(async()=>(await this._withRetries(i=>tc(i,e,t)),this.localCache[e]=t,this.notifyServiceWorker(e)))}async _get(e){let t=await this._withRetries(t=>tu(t,e));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(t=>th(t,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){let e=await this._withRetries(e=>new ta(to(e,!1).getAll()).toPromise());if(!e||0!==this.pendingWrites)return[];let t=[],i=new Set;if(0!==e.length)for(let{fbase_key:r,value:n}of e)i.add(r),JSON.stringify(this.localCache[r])!==JSON.stringify(n)&&(this.notifyListeners(r,n),t.push(r));for(let e of Object.keys(this.localCache))this.localCache[e]&&!i.has(e)&&(this.notifyListeners(e,null),t.push(e));return t}notifyListeners(e,t){this.localCache[e]=t;let i=this.listeners[e];if(i)for(let e of Array.from(i))e(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),800)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(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)}_removeListener(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()}}async function tp(e,t,i){var r,n,s;let a=await i.verify();try{let o;if(v("string"==typeof a,e,"argument-error"),v("recaptcha"===i.type,e,"argument-error"),o="string"==typeof t?{phoneNumber:t}:t,"session"in o){let t=o.session;if("phoneNumber"in o)return v("enroll"===t.type,e,"internal-error"),(await (n={idToken:t.credential,phoneEnrollmentInfo:{phoneNumber:o.phoneNumber,recaptchaToken:a}},P(e,"POST","/v2/accounts/mfaEnrollment:start",R(e,n)))).phoneSessionInfo.sessionInfo;{v("signin"===t.type,e,"internal-error");let i=(null===(r=o.multiFactorHint)||void 0===r?void 0:r.uid)||o.multiFactorUid;return v(i,e,"missing-multi-factor-info"),(await (s={mfaPendingCredential:t.credential,mfaEnrollmentId:i,phoneSignInInfo:{recaptchaToken:a}},P(e,"POST","/v2/accounts/mfaSignIn:start",R(e,s)))).phoneResponseInfo.sessionInfo}}{let{sessionInfo:t}=await eM(e,{phoneNumber:o.phoneNumber,recaptchaToken:a});return t}}finally{i._reset()}}td.type="LOCAL",ey("rcb"),new y(3e4,6e4);/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class tf{constructor(e){this.providerId=tf.PROVIDER_ID,this.auth=e_(e)}verifyPhoneNumber(e,t){return tp(this.auth,e,(0,n.m9)(t))}static credential(e,t){return ej._fromVerification(e,t)}static credentialFromResult(e){return tf.credentialFromTaggedObject(e)}static credentialFromError(e){return tf.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{phoneNumber:t,temporaryProof:i}=e;return t&&i?ej._fromTokenResponse(t,i):null}}/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function tm(e,t){return t?Z(t):(v(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}tf.PROVIDER_ID="phone",tf.PHONE_SIGN_IN_METHOD="phone";/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class tg extends eP{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return eL(e,this._buildIdpRequest())}_linkToIdToken(e,t){return eL(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return eL(e,this._buildIdpRequest())}_buildIdpRequest(e){let 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}}function tv(e){return e1(e.auth,new tg(e),e.bypassAuthState)}function t_(e){let{auth:t,user:i}=e;return v(i,t,"internal-error"),e0(i,new tg(e),e.bypassAuthState)}async function tI(e){let{auth:t,user:i}=e;return v(i,t,"internal-error"),eZ(i,new tg(e),e.bypassAuthState)}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class tw{constructor(e,t,i,r,n=!1){this.auth=e,this.resolver=i,this.user=r,this.bypassAuthState=n,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(t)?t:[t]}execute(){return new Promise(async(e,t)=>{this.pendingPromise={resolve:e,reject:t};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(e){this.reject(e)}})}async onAuthEvent(e){let{urlResponse:t,sessionId:i,postBody:r,tenantId:n,error:s,type:a}=e;if(s){this.reject(s);return}let o={auth:this.auth,requestUri:t,sessionId:i,tenantId:n||void 0,postBody:r||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(a)(o))}catch(e){this.reject(e)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return tv;case"linkViaPopup":case"linkViaRedirect":return tI;case"reauthViaPopup":case"reauthViaRedirect":return t_;default:p(this.auth,"internal-error")}}resolve(e){this.pendingPromise||_("Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){this.pendingPromise||_("Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let ty=new y(2e3,1e4);async function tT(e,t,i){let r=e_(e);!function(e,t,i){if(!(t instanceof i))throw i.name!==t.constructor.name&&p(e,"argument-error"),m(e,"argument-error",`Type of ${t.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}(e,t,eW);let n=tm(r,i);return new tE(r,"signInViaPopup",t,n).executeNotNull()}class tE extends tw{constructor(e,t,i,r,n){super(e,t,r,n),this.provider=i,this.authWindow=null,this.pollId=null,tE.currentPopupAction&&tE.currentPopupAction.cancel(),tE.currentPopupAction=this}async executeNotNull(){let e=await this.execute();return v(e,this.auth,"internal-error"),e}async onExecution(){1===this.filter.length||_("Popup operations only handle one event");let e=e8();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch(e=>{this.reject(e)}),this.resolver._isIframeWebStorageSupported(this.auth,e=>{e||this.reject(f(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){var e;return(null===(e=this.authWindow)||void 0===e?void 0:e.associatedEvent)||null}cancel(){this.reject(f(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,tE.currentPopupAction=null}pollUserCancellation(){let e=()=>{var t,i;if(null===(i=null===(t=this.authWindow)||void 0===t?void 0:t.window)||void 0===i?void 0:i.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(f(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(e,ty.get())};e()}}tE.currentPopupAction=null;let tk=new Map;class tS extends tw{constructor(e,t,i=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,i),this.eventId=null}async execute(){let e=tk.get(this.auth._key());if(!e){try{let t=await tR(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(t)}catch(t){e=()=>Promise.reject(t)}tk.set(this.auth._key(),e)}return this.bypassAuthState||tk.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if("signInViaRedirect"===e.type)return super.onAuthEvent(e);if("unknown"===e.type){this.resolve(null);return}if(e.eventId){let t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function tR(e,t){let i=et("pendingRedirect",t.config.apiKey,t.name),r=Z(e._redirectPersistence);if(!await r._isAvailable())return!1;let n=await r._get(i)==="true";return await r._remove(i),n}function tP(e,t){tk.set(e._key(),t)}async function tO(e,t,i=!1){let r=e_(e),n=tm(r,t),s=new tS(r,n,i),a=await s.execute();return a&&!i&&(delete a.user._redirectEventId,await r._persistUserIfCurrent(a.user),await r._setRedirectUser(null,t)),a}class tC{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let t=!1;return this.consumers.forEach(i=>{this.isEventForConsumer(e,i)&&(t=!0,this.sendToConsumer(e,i),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!function(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return tN(e);default:return!1}}(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){var i;if(e.error&&!tN(e)){let r=(null===(i=e.error.code)||void 0===i?void 0:i.split("auth/")[1])||"internal-error";t.onError(f(this.auth,r))}else t.onAuthEvent(e)}isEventForConsumer(e,t){let i=null===t.eventId||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&i}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(tb(e))}saveEventToCache(e){this.cachedEventUids.add(tb(e)),this.lastProcessedEventTime=Date.now()}}function tb(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter(e=>e).join("-")}function tN({type:e,error:t}){return"unknown"===e&&(null==t?void 0:t.code)==="auth/no-auth-event"}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function tA(e,t={}){return P(e,"GET","/v1/projects",t)}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let tL=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,tD=/^https?/;async function tM(e){if(e.config.emulator)return;let{authorizedDomains:t}=await tA(e);for(let e of t)try{if(function(e){let t=I(),{protocol:i,hostname:r}=new URL(t);if(e.startsWith("chrome-extension://")){let n=new URL(e);return""===n.hostname&&""===r?"chrome-extension:"===i&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):"chrome-extension:"===i&&n.hostname===r}if(!tD.test(i))return!1;if(tL.test(e))return r===e;let n=e.replace(/\./g,"\\.");return RegExp("^(.+\\."+n+"|"+n+")$","i").test(r)}(e))return}catch(e){}p(e,"unauthorized-domain")}/** + * @license + * Copyright 2020 Google LLC. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let tU=new y(3e4,6e4);function tx(){let e=te().___jsl;if(null==e?void 0:e.H){for(let t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let t=0;t{var r,n,s,a;function o(){tx(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{tx(),i(f(e,"network-request-failed"))},timeout:tU.get()})}if(null===(n=null===(r=te().gapi)||void 0===r?void 0:r.iframes)||void 0===n?void 0:n.Iframe)t(gapi.iframes.getContext());else if(null===(s=te().gapi)||void 0===s?void 0:s.load)o();else{let t=ey("iframefcb");return te()[t]=()=>{gapi.load?o():i(f(e,"network-request-failed"))},(a=`${ew.gapiScript}?onload=${t}`,ew.loadJS(a)).catch(e=>i(e))}}).catch(e=>{throw tV=null,e})),i=te().gapi;return v(i,e,"internal-error"),t.open({where:document.body,url:function(e){let t=e.config;v(t.authDomain,e,"auth-domain-config-required");let i=t.emulator?T(t,"emulator/auth/iframe"):`https://${e.config.authDomain}/__/auth/iframe`,r={apiKey:t.apiKey,appName:e.name,v:s.Jn},a=tz.get(e.config.apiHost);a&&(r.eid=a);let o=e._getFrameworks();return o.length&&(r.fw=o.join(",")),`${i}?${(0,n.xO)(r).slice(1)}`}(e),messageHandlersFilter:i.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:tj,dontclear:!0},t=>new Promise(async(i,r)=>{await t.restyle({setHideOnLeave:!1});let n=f(e,"network-request-failed"),s=te().setTimeout(()=>{r(n)},tF.get());function a(){te().clearTimeout(s),i(t)}t.ping(a).then(a,()=>{r(n)})}))}/** + * @license + * Copyright 2020 Google LLC. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let tW={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class t${constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(e){}}}let tK=encodeURIComponent("fac");async function tq(e,t,i,r,a,o){v(e.config.authDomain,e,"auth-domain-config-required"),v(e.config.apiKey,e,"invalid-api-key");let l={apiKey:e.config.apiKey,appName:e.name,authType:i,redirectUrl:r,v:s.Jn,eventId:a};if(t instanceof eW)for(let[i,r]of(t.setDefaultLanguage(e.languageCode),l.providerId=t.providerId||"",(0,n.xb)(t.getCustomParameters())||(l.customParameters=JSON.stringify(t.getCustomParameters())),Object.entries(o||{})))l[i]=r;if(t instanceof e$){let e=t.getScopes().filter(e=>""!==e);e.length>0&&(l.scopes=e.join(","))}for(let t of(e.tenantId&&(l.tid=e.tenantId),Object.keys(l)))void 0===l[t]&&delete l[t];let c=await e._getAppCheckToken(),u=c?`#${tK}=${encodeURIComponent(c)}`:"";return`${function({config:e}){return e.emulator?T(e,"emulator/auth/handler"):`https://${e.authDomain}/__/auth/handler`}(e)}?${(0,n.xO)(l).slice(1)}${u}`}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let tG="webStorageSupport";class tJ{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=e6,this._completeRedirectFn=tO,this._overrideRedirectResult=tP}async _openPopup(e,t,i,r){var s;(null===(s=this.eventManagers[e._key()])||void 0===s?void 0:s.manager)||_("_initialize() not called before _openPopup()");let a=await tq(e,t,i,I(),r);return function(e,t,i,r=500,s=600){let a=Math.max((window.screen.availHeight-s)/2,0).toString(),o=Math.max((window.screen.availWidth-r)/2,0).toString(),l="",c=Object.assign(Object.assign({},tW),{width:r.toString(),height:s.toString(),top:a,left:o}),u=(0,n.z$)().toLowerCase();i&&(l=ea(u)?"_blank":i),en(u)&&(t=t||"http://localhost",c.scrollbars="yes");let h=Object.entries(c).reduce((e,[t,i])=>`${e}${t}=${i},`,"");if(function(e=(0,n.z$)()){var t;return eh(e)&&!!(null===(t=window.navigator)||void 0===t?void 0:t.standalone)}(u)&&"_self"!==l)return function(e,t){let i=document.createElement("a");i.href=e,i.target=t;let r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),i.dispatchEvent(r)}(t||"",l),new t$(null);let d=window.open(t||"",l,h);v(d,e,"popup-blocked");try{d.focus()}catch(e){}return new t$(d)}(e,a,e8())}async _openRedirect(e,t,i,r){var n;return await this._originValidation(e),n=await tq(e,t,i,I(),r),te().location.href=n,new Promise(()=>{})}_initialize(e){let t=e._key();if(this.eventManagers[t]){let{manager:e,promise:i}=this.eventManagers[t];return e?Promise.resolve(e):(i||_("If manager is not set, promise should be"),i)}let i=this.initAndGetManager(e);return this.eventManagers[t]={promise:i},i.catch(()=>{delete this.eventManagers[t]}),i}async initAndGetManager(e){let t=await tH(e),i=new tC(e);return t.register("authEvent",t=>(v(null==t?void 0:t.authEvent,e,"invalid-auth-event"),{status:i.onEvent(t.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:i},this.iframes[e._key()]=t,i}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(tG,{type:tG},i=>{var r;let n=null===(r=null==i?void 0:i[0])||void 0===r?void 0:r[tG];void 0!==n&&t(!!n),p(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){let t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=tM(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return ed()||es()||eh()}}class tB{constructor(e){this.factorId=e}_process(e,t,i){switch(t.type){case"enroll":return this._finalizeEnroll(e,t.credential,i);case"signin":return this._finalizeSignIn(e,t.credential);default:return _("unexpected MultiFactorSessionType")}}}class tX extends tB{constructor(e){super("phone"),this.credential=e}static _fromCredential(e){return new tX(e)}_finalizeEnroll(e,t,i){return P(e,"POST","/v2/accounts/mfaEnrollment:finalize",R(e,{idToken:t,displayName:i,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}_finalizeSignIn(e,t){return P(e,"POST","/v2/accounts/mfaSignIn:finalize",R(e,{mfaPendingCredential:t,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}}class tY{constructor(){}static assertion(e){return tX._fromCredential(e)}}tY.FACTOR_ID="phone";class tQ{static assertionForEnrollment(e,t){return tZ._fromSecret(e,t)}static assertionForSignIn(e,t){return tZ._fromEnrollmentId(e,t)}static async generateSecret(e){var t,i;v(void 0!==(null===(t=e.user)||void 0===t?void 0:t.auth),"internal-error");let r=await P(i=e.user.auth,"POST","/v2/accounts/mfaEnrollment:start",R(i,{idToken:e.credential,totpEnrollmentInfo:{}}));return t0._fromStartTotpMfaEnrollmentResponse(r,e.user.auth)}}tQ.FACTOR_ID="totp";class tZ extends tB{constructor(e,t,i){super("totp"),this.otp=e,this.enrollmentId=t,this.secret=i}static _fromSecret(e,t){return new tZ(t,void 0,e)}static _fromEnrollmentId(e,t){return new tZ(t,e)}async _finalizeEnroll(e,t,i){return v(void 0!==this.secret,e,"argument-error"),P(e,"POST","/v2/accounts/mfaEnrollment:finalize",R(e,{idToken:t,displayName:i,totpVerificationInfo:this.secret._makeTotpVerificationInfo(this.otp)}))}async _finalizeSignIn(e,t){v(void 0!==this.enrollmentId&&void 0!==this.otp,e,"argument-error");let i={verificationCode:this.otp};return P(e,"POST","/v2/accounts/mfaSignIn:finalize",R(e,{mfaPendingCredential:t,mfaEnrollmentId:this.enrollmentId,totpVerificationInfo:i}))}}class t0{constructor(e,t,i,r,n,s,a){this.sessionInfo=s,this.auth=a,this.secretKey=e,this.hashingAlgorithm=t,this.codeLength=i,this.codeIntervalSeconds=r,this.enrollmentCompletionDeadline=n}static _fromStartTotpMfaEnrollmentResponse(e,t){return new t0(e.totpSessionInfo.sharedSecretKey,e.totpSessionInfo.hashingAlgorithm,e.totpSessionInfo.verificationCodeLength,e.totpSessionInfo.periodSec,new Date(e.totpSessionInfo.finalizeEnrollmentTime).toUTCString(),e.totpSessionInfo.sessionInfo,t)}_makeTotpVerificationInfo(e){return{sessionInfo:this.sessionInfo,verificationCode:e}}generateQrCodeUrl(e,t){var i;let r=!1;return(t1(e)||t1(t))&&(r=!0),r&&(t1(e)&&(e=(null===(i=this.auth.currentUser)||void 0===i?void 0:i.email)||"unknownuser"),t1(t)&&(t=this.auth.name)),`otpauth://totp/${t}:${e}?secret=${this.secretKey}&issuer=${t}&algorithm=${this.hashingAlgorithm}&digits=${this.codeLength}`}}function t1(e){return void 0===e||(null==e?void 0:e.length)===0}var t3="@firebase/auth",t2="1.6.0";/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class t4{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),(null===(e=this.auth.currentUser)||void 0===e?void 0:e.uid)||null}async getToken(e){return(this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser)?{accessToken:await this.auth.currentUser.getIdToken(e)}:null}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;let t=this.auth.onIdTokenChanged(t=>{e((null==t?void 0:t.stsTokenManager.accessToken)||null)});this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();let t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){v(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}let t5=(0,n.Pz)("authIdTokenMaxAge")||300,t6=null,t9=e=>async t=>{let i=t&&await t.getIdTokenResult(),r=i&&(new Date().getTime()-Date.parse(i.issuedAtTime))/1e3;if(r&&r>t5)return;let n=null==i?void 0:i.token;t6!==n&&(t6=n,await fetch(e,{method:n?"POST":"DELETE",headers:n?{Authorization:`Bearer ${n}`}:{}}))};function t8(e=(0,s.Mq)()){let t=(0,s.qX)(e,"auth");if(t.isInitialized())return t.getImmediate();let i=/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function(e,t){let i=(0,s.qX)(e,"auth");if(i.isInitialized()){let e=i.getImmediate(),r=i.getOptions();if((0,n.vZ)(r,null!=t?t:{}))return e;p(e,"already-initialized")}return i.initialize({options:t})}(e,{popupRedirectResolver:tJ,persistence:[td,e5,e6]}),r=(0,n.Pz)("authTokenSyncURL");if(r){let e=t9(r);(0,n.m9)(i).beforeAuthStateChanged(e,()=>e(i.currentUser)),(0,n.m9)(i).onIdTokenChanged(t=>e(t),void 0,void 0)}let a=(0,n.q4)("auth");return a&&function(e,t,i){let r=e_(e);v(r._canInitEmulator,r,"emulator-config-failed"),v(/^https?:\/\//.test(t),r,"invalid-emulator-scheme");let n=!!(null==i?void 0:i.disableWarnings),s=eS(t),{host:a,port:o}=function(e){let t=eS(e),i=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!i)return{host:"",port:null};let r=i[2].split("@").pop()||"",n=/^(\[[^\]]+\])(:|$)/.exec(r);if(n){let e=n[1];return{host:e,port:eR(r.substr(e.length+1))}}{let[e,t]=r.split(":");return{host:e,port:eR(t)}}}(t),l=null===o?"":`:${o}`;r.config.emulator={url:`${s}//${a}${l}/`},r.settings.appVerificationDisabledForTesting=!0,r.emulatorConfig=Object.freeze({host:a,port:o,protocol:s.replace(":",""),options:Object.freeze({disableWarnings:n})}),n||function(){function e(){let 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())}()}(i,`http://${a}`),i}ew={loadJS:e=>new Promise((t,i)=>{var r,n;let s=document.createElement("script");s.setAttribute("src",e),s.onload=t,s.onerror=e=>{let t=f("internal-error");t.customData=e,i(t)},s.type="text/javascript",s.charset="UTF-8",(null!==(n=null===(r=document.getElementsByTagName("head"))||void 0===r?void 0:r[0])&&void 0!==n?n:document).appendChild(s)}),gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="},r="Browser",(0,s.Xd)(new l.wA("auth",(e,{options:t})=>{let i=e.getProvider("app").getImmediate(),n=e.getProvider("heartbeat"),s=e.getProvider("app-check-internal"),{apiKey:a,authDomain:o}=i.options;v(a&&!a.includes(":"),"invalid-api-key",{appName:i.name});let l=new ev(i,n,s,{apiKey:a,authDomain:o,clientPlatform:r,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:ep(r)});return function(e,t){let i=(null==t?void 0:t.persistence)||[],r=(Array.isArray(i)?i:[i]).map(Z);(null==t?void 0:t.errorMap)&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,null==t?void 0:t.popupRedirectResolver)}(l,t),l},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,i)=>{e.getProvider("auth-internal").initialize()})),(0,s.Xd)(new l.wA("auth-internal",e=>new t4(e_(e.getProvider("auth").getImmediate())),"PRIVATE").setInstantiationMode("EXPLICIT")),(0,s.KN)(t3,t2,/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}(r)),(0,s.KN)(t3,t2,"esm2017")}}]); \ No newline at end of file diff --git a/out/_next/static/chunks/app/_not-found-77830b1c74e9bde2.js b/out/_next/static/chunks/app/_not-found-77830b1c74e9bde2.js new file mode 100644 index 0000000..3eeeb86 --- /dev/null +++ b/out/_next/static/chunks/app/_not-found-77830b1c74e9bde2.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[165],{3155:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_not-found",function(){return n(4032)}])},4032:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}}),n(6921);let o=n(7437);n(2265);let r={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{display:"inline-block"},h1:{display:"inline-block",margin:"0 20px 0 0",padding:"0 23px 0 0",fontSize:24,fontWeight:500,verticalAlign:"top",lineHeight:"49px"},h2:{fontSize:14,fontWeight:400,lineHeight:"49px",margin:0}};function i(){return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("title",{children:"404: This page could not be found."}),(0,o.jsx)("div",{style:r.error,children:(0,o.jsxs)("div",{children:[(0,o.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}),(0,o.jsx)("h1",{className:"next-error-h1",style:r.h1,children:"404"}),(0,o.jsx)("div",{style:r.desc,children:(0,o.jsx)("h2",{style:r.h2,children:"This page could not be found."})})]})})]})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},function(e){e.O(0,[971,69,744],function(){return e(e.s=3155)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/out/_next/static/chunks/app/layout-f04efcb08586937c.js b/out/_next/static/chunks/app/layout-f04efcb08586937c.js new file mode 100644 index 0000000..e4c835b --- /dev/null +++ b/out/_next/static/chunks/app/layout-f04efcb08586937c.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[185],{1699:function(t,e,a){Promise.resolve().then(a.t.bind(a,3385,23)),Promise.resolve().then(a.t.bind(a,3649,23)),Promise.resolve().then(a.bind(a,4720))},2619:function(t,e,a){"use strict";a.d(e,{I8:function(){return c},tO:function(){return l}});var i=a(6142),n=a(2730),s=a(4905),r=a(8121);let o=(0,i.ZF)({apiKey:"AIzaSyBWui1W0CBRAzvrMqHCOBUc3hMkmo3KkXw",authDomain:"tdt4140-prosjekt.firebaseapp.com",databaseURL:"https://tdt4140-prosjekt-default-rtdb.europe-west1.firebasedatabase.app",projectId:"tdt4140-prosjekt",storageBucket:"tdt4140-prosjekt.appspot.com",messagingSenderId:"807771308285",appId:"1:807771308285:web:43ebb655b020317c987e94"}),d=(0,r.ad)(o),l=(0,s.cF)(o),c=(0,n.v0)(o);class u{static getAuth(){return c}static getStorage(){return l}async getDestinations(){let t=(0,r.hJ)(d,"destinations");return(await (0,r.PL)(t)).docs.map(t=>({id:t.id,...t.data()}))}async getDestination(t){let e=(0,r.JU)(d,"destinations",t);return(await (0,r.QT)(e)).data()}async getReviewForDestinationUser(t,e){let a=(0,r.hJ)(d,"destinations",e,"reviews");return(await (0,r.PL)(a)).docs.map(t=>({reviewID:t.id,...t.data()})).filter(e=>e.userID===t)}async getReviewsForDestination(t){let e=(0,r.hJ)(d,"destinations",t,"reviews");return(await (0,r.PL)(e)).docs.map(t=>({reviewID:t.id,...t.data()}))}async addDestination(t,e,a,i,n){let s=(0,r.hJ)(d,"destinations");try{let o=await (0,r.ET)(s,{city:t,country:e,imgUrl:a,category:i,description:n||"",RatingCount:0,TotalRating:0}),d=(0,r.hJ)(o,"reviews");await (0,r.ET)(d,{})}catch(t){console.error(t)}}async getDestinationIDsForUser(t){let e=(0,r.hJ)(d,"user_destinations"),a=(0,r.IO)(e,(0,r.ar)("userID","==",t));return(await (0,r.PL)(a)).docs.map(t=>t.data().destinationID)}async getVisitedDestinations(t){let e=await t;if(0==e.length||null==e||void 0==e)return[];let a=(0,r.hJ)(d,"destinations"),i=(0,r.IO)(a,(0,r.ar)((0,r.Jm)(),"in",e));return(await (0,r.PL)(i)).docs.map(t=>({id:t.id,...t.data()}))}async editDestination(t,e,a,i){let n=(0,r.JU)(d,"destinations",t);try{await (0,r.r7)(n,{imgUrl:e,category:a,description:i})}catch(t){console.error(t)}}async deleteDestination(t){try{await (0,r.oe)((0,r.JU)(d,"destinations",t)),this.deleteAllReviews(t)}catch(t){console.log(t)}}async addReview(t,e,a,i,n){let s=(0,r.hJ)(d,"destinations",t,"reviews"),o=(0,r.JU)(d,"destinations",t),l=(await (0,r.QT)(o)).data();try{await (0,r.r7)(o,{TotalRating:(null==l?void 0:l.TotalRating)+e,RatingCount:(null==l?void 0:l.RatingCount)+1}),await (0,r.ET)(s,{rating:e,comment:a,email:i,userID:n})}catch(t){console.error(t)}}async updateReview(t,e,a,i){let n=(0,r.JU)(d,"destinations",t,"reviews",e),s=(0,r.JU)(d,"destinations",t,"reviews",e),o=(await (0,r.QT)(s)).data(),l=(0,r.JU)(d,"destinations",t),c=(await (0,r.QT)(l)).data();try{await (0,r.r7)(l,{TotalRating:(null==c?void 0:c.TotalRating)+a-(null==o?void 0:o.rating)}),await (0,r.r7)(n,{rating:a,comment:i})}catch(t){console.error(t)}}async deleteReview(t,e){let a=(0,r.JU)(d,"destinations",t,"reviews",e),i=(await (0,r.QT)(a)).data(),n=(0,r.JU)(d,"destinations",t),s=(await (0,r.QT)(n)).data();try{await (0,r.r7)(n,{TotalRating:(null==s?void 0:s.TotalRating)-(null==i?void 0:i.rating),RatingCount:(null==s?void 0:s.RatingCount)-1}),await (0,r.oe)((0,r.JU)(d,"destinations",t,"reviews",e))}catch(t){console.error(t)}}getAuthInstance(){return c}async setUserDestination(t,e){let a=(0,r.hJ)(d,"user_destinations");try{await (0,r.ET)(a,{destinationID:e,userID:t})}catch(t){console.error("Error creating user document:",t)}}async removeUserDestination(t,e){(await (0,r.PL)((0,r.IO)((0,r.hJ)(d,"user_destinations"),(0,r.ar)("userID","==",t),(0,r.ar)("destinationID","==",e)))).forEach(async t=>{await (0,r.oe)(t.ref)})}async checkIfVisited(t,e){if("string"!=typeof t)return!1;try{return!(await (0,r.PL)((0,r.IO)((0,r.hJ)(d,"user_destinations"),(0,r.ar)("userID","==",t),(0,r.ar)("destinationID","==",e)))).empty}catch(t){return console.error("Error checking if destination is visited:",t),!1}}async deleteAllReviews(t){let e=(0,r.hJ)(d,"destinations",t,"reviews");try{(await (0,r.PL)(e)).forEach(async t=>{await (0,r.oe)(t.ref)})}catch(t){console.error(t)}}async getDestinationsWithVisited(t){let e=(0,r.hJ)(d,"destinations"),a=await (0,r.PL)(e);if(void 0!==t){let e=[];for(let i of a.docs)await this.checkIfVisited(null==t?void 0:t.uid,i.id).then(t=>{e.push({id:i.id,visited:t,...i.data()})});return e}return a.docs.map(t=>({id:t.id,visited:!1,...t.data()}))}}e.ZP=u},4720:function(t,e,a){"use strict";a.r(e),a.d(e,{Header:function(){return l},default:function(){return c}});var i=a(7437),n=a(2265),s=a(8792);a(2046);var r=a(2619),o=a(2730),d=()=>{let[t,e]=(0,n.useState)(!1);(0,n.useEffect)(()=>{let t=r.ZP.getAuth().onAuthStateChanged(t=>{t?e(!0):e(!1)});return()=>t()},[t]);let a=async()=>{let t=new o.hJ;t.setCustomParameters({prompt:"select_account"});try{let a=(await (0,o.rh)(r.ZP.getAuth(),t)).user;a&&(a.uid,e(!0),localStorage.setItem("user",JSON.stringify(a.email))),window.location.reload()}catch(t){console.error(t)}},s=async()=>{try{await (0,o.w7)(r.ZP.getAuth()),localStorage.setItem("user",""),e(!1),window.location.reload()}catch(t){console.error(t)}};return(0,i.jsx)("div",{children:t?(0,i.jsx)("button",{onClick:s,children:"Sign out"}):(0,i.jsx)("button",{onClick:a,children:"Sign in with Google"})})};a(9581),a(9847);let l=()=>{let[t,e]=(0,n.useState)(void 0);return((0,n.useEffect)(()=>{let t=localStorage.getItem("theme");var a=document.body;"dark"===t?(a.classList.add("dark-mode"),e(!0)):(a.classList.remove("dark-mode"),e(!1))},[]),void 0===t)?null:(0,i.jsxs)("header",{id:"navbar",children:[(0,i.jsx)(s.default,{href:"/",className:"link",children:(0,i.jsx)("div",{className:"navbar-start",style:{fontFamily:"Arial",fontSize:"18px"},children:"Travel Buddy"})}),(0,i.jsxs)("div",{className:"navbar-end",style:{display:"flex"},children:[(0,i.jsx)(s.default,{href:"/MyProfile",className:"link",children:(0,i.jsx)("div",{className:"navbar-start",style:{fontFamily:"Arial",fontSize:"18px",paddingRight:"20px",justifyContent:"space-between",paddingTop:"10px"},children:"My Destinations"})}),(0,i.jsxs)("label",{className:"switch",children:[(0,i.jsx)("input",{id:"darkmode-button",defaultChecked:t,onClick:()=>{var a=document.body;t?(a.classList.remove("dark-mode"),localStorage.setItem("theme","light")):(a.classList.add("dark-mode"),localStorage.setItem("theme","dark")),e(t=>!t)},type:"checkbox"}),(0,i.jsx)("span",{className:"slider round"})]}),(0,i.jsx)(d,{})]})]})};var c=l},3385:function(){},9847:function(){},2046:function(){},9581:function(){},3649:function(t){t.exports={style:{fontFamily:"'__Inter_0f0813', '__Inter_Fallback_0f0813'",fontStyle:"normal"},className:"__className_0f0813"}}},function(t){t.O(0,[358,380,228,971,69,744],function(){return t(t.s=1699)}),_N_E=t.O()}]); \ No newline at end of file diff --git a/out/_next/static/chunks/app/page-f5a6edc6b710fc56.js b/out/_next/static/chunks/app/page-f5a6edc6b710fc56.js new file mode 100644 index 0000000..0786abf --- /dev/null +++ b/out/_next/static/chunks/app/page-f5a6edc6b710fc56.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{2880:function(e,t,i){Promise.resolve().then(i.bind(i,3438))},2619:function(e,t,i){"use strict";i.d(t,{I8:function(){return d},tO:function(){return c}});var n=i(6142),a=i(2730),s=i(4905),r=i(8121);let l=(0,n.ZF)({apiKey:"AIzaSyBWui1W0CBRAzvrMqHCOBUc3hMkmo3KkXw",authDomain:"tdt4140-prosjekt.firebaseapp.com",databaseURL:"https://tdt4140-prosjekt-default-rtdb.europe-west1.firebasedatabase.app",projectId:"tdt4140-prosjekt",storageBucket:"tdt4140-prosjekt.appspot.com",messagingSenderId:"807771308285",appId:"1:807771308285:web:43ebb655b020317c987e94"}),o=(0,r.ad)(l),c=(0,s.cF)(l),d=(0,a.v0)(l);class u{static getAuth(){return d}static getStorage(){return c}async getDestinations(){let e=(0,r.hJ)(o,"destinations");return(await (0,r.PL)(e)).docs.map(e=>({id:e.id,...e.data()}))}async getDestination(e){let t=(0,r.JU)(o,"destinations",e);return(await (0,r.QT)(t)).data()}async getReviewForDestinationUser(e,t){let i=(0,r.hJ)(o,"destinations",t,"reviews");return(await (0,r.PL)(i)).docs.map(e=>({reviewID:e.id,...e.data()})).filter(t=>t.userID===e)}async getReviewsForDestination(e){let t=(0,r.hJ)(o,"destinations",e,"reviews");return(await (0,r.PL)(t)).docs.map(e=>({reviewID:e.id,...e.data()}))}async addDestination(e,t,i,n,a){let s=(0,r.hJ)(o,"destinations");try{let l=await (0,r.ET)(s,{city:e,country:t,imgUrl:i,category:n,description:a||"",RatingCount:0,TotalRating:0}),o=(0,r.hJ)(l,"reviews");await (0,r.ET)(o,{})}catch(e){console.error(e)}}async getDestinationIDsForUser(e){let t=(0,r.hJ)(o,"user_destinations"),i=(0,r.IO)(t,(0,r.ar)("userID","==",e));return(await (0,r.PL)(i)).docs.map(e=>e.data().destinationID)}async getVisitedDestinations(e){let t=await e;if(0==t.length||null==t||void 0==t)return[];let i=(0,r.hJ)(o,"destinations"),n=(0,r.IO)(i,(0,r.ar)((0,r.Jm)(),"in",t));return(await (0,r.PL)(n)).docs.map(e=>({id:e.id,...e.data()}))}async editDestination(e,t,i,n){let a=(0,r.JU)(o,"destinations",e);try{await (0,r.r7)(a,{imgUrl:t,category:i,description:n})}catch(e){console.error(e)}}async deleteDestination(e){try{await (0,r.oe)((0,r.JU)(o,"destinations",e)),this.deleteAllReviews(e)}catch(e){console.log(e)}}async addReview(e,t,i,n,a){let s=(0,r.hJ)(o,"destinations",e,"reviews"),l=(0,r.JU)(o,"destinations",e),c=(await (0,r.QT)(l)).data();try{await (0,r.r7)(l,{TotalRating:(null==c?void 0:c.TotalRating)+t,RatingCount:(null==c?void 0:c.RatingCount)+1}),await (0,r.ET)(s,{rating:t,comment:i,email:n,userID:a})}catch(e){console.error(e)}}async updateReview(e,t,i,n){let a=(0,r.JU)(o,"destinations",e,"reviews",t),s=(0,r.JU)(o,"destinations",e,"reviews",t),l=(await (0,r.QT)(s)).data(),c=(0,r.JU)(o,"destinations",e),d=(await (0,r.QT)(c)).data();try{await (0,r.r7)(c,{TotalRating:(null==d?void 0:d.TotalRating)+i-(null==l?void 0:l.rating)}),await (0,r.r7)(a,{rating:i,comment:n})}catch(e){console.error(e)}}async deleteReview(e,t){let i=(0,r.JU)(o,"destinations",e,"reviews",t),n=(await (0,r.QT)(i)).data(),a=(0,r.JU)(o,"destinations",e),s=(await (0,r.QT)(a)).data();try{await (0,r.r7)(a,{TotalRating:(null==s?void 0:s.TotalRating)-(null==n?void 0:n.rating),RatingCount:(null==s?void 0:s.RatingCount)-1}),await (0,r.oe)((0,r.JU)(o,"destinations",e,"reviews",t))}catch(e){console.error(e)}}getAuthInstance(){return d}async setUserDestination(e,t){let i=(0,r.hJ)(o,"user_destinations");try{await (0,r.ET)(i,{destinationID:t,userID:e})}catch(e){console.error("Error creating user document:",e)}}async removeUserDestination(e,t){(await (0,r.PL)((0,r.IO)((0,r.hJ)(o,"user_destinations"),(0,r.ar)("userID","==",e),(0,r.ar)("destinationID","==",t)))).forEach(async e=>{await (0,r.oe)(e.ref)})}async checkIfVisited(e,t){if("string"!=typeof e)return!1;try{return!(await (0,r.PL)((0,r.IO)((0,r.hJ)(o,"user_destinations"),(0,r.ar)("userID","==",e),(0,r.ar)("destinationID","==",t)))).empty}catch(e){return console.error("Error checking if destination is visited:",e),!1}}async deleteAllReviews(e){let t=(0,r.hJ)(o,"destinations",e,"reviews");try{(await (0,r.PL)(t)).forEach(async e=>{await (0,r.oe)(e.ref)})}catch(e){console.error(e)}}async getDestinationsWithVisited(e){let t=(0,r.hJ)(o,"destinations"),i=await (0,r.PL)(t);if(void 0!==e){let t=[];for(let n of i.docs)await this.checkIfVisited(null==e?void 0:e.uid,n.id).then(e=>{t.push({id:n.id,visited:e,...n.data()})});return t}return i.docs.map(e=>({id:e.id,visited:!1,...e.data()}))}}t.ZP=u},3438:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return y}});var n=i(7437),a=i(2265);i(950),i(6296);var s=i(703),r=e=>{let{country:t,city:i}=e,[r,l]=(0,a.useState)(0),[o,c]=(0,a.useState)([]);return(0,a.useEffect)(()=>{fetch("https://restcountries.com/v3.1/name/".concat(t)).then(e=>e.json()).then(e=>{let t=e[0].cca2,n="http://api.openweathermap.org/geo/1.0/direct?q=".concat(i,",").concat(t,"&limit=1&appid=971ff3c555137597d9b8ceea73588668");fetch(n).then(e=>e.json()).then(e=>{let t="https://api.met.no/weatherapi/locationforecast/2.0/compact?lat=".concat(e[0].lat,"&lon=").concat(e[0].lon);fetch(t).then(e=>e.json()).then(e=>{l(e.properties.timeseries[0].data.instant.details.air_temperature),c(e.properties.timeseries[0].data.next_1_hours.summary.symbol_code)}).catch(()=>console.log("Error fetching weather data"))}).catch(()=>console.log("Error fetching geolocation"))}).catch(()=>console.log("Error fetching country code"))}),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"temperatureContainer",children:[r,"\xb0C"]}),(0,n.jsx)("div",{className:"weatherIconContainer",children:0!=o.length?(0,n.jsx)(s.default,{src:"/weatherIcons/".concat(o,".png"),alt:"".concat(o),width:200,height:200,style:{width:"auto",height:"100%"}}):(0,n.jsx)(n.Fragment,{})})]})},l=i(685),o=i(2619);i(5739);var c=i(8024),d=i(7535),u=e=>{let{user:t,id:i,extraHandling:s}=e,[r,l]=(0,a.useState)(!1),u=()=>{(async()=>{try{let e=new o.ZP,n=await e.checkIfVisited(null==t?void 0:t.uid,i);l(n)}catch(e){console.error("Error checking if visited:",e)}})()};u(),(0,a.useEffect)(()=>{u()},[]);let h=()=>{new o.ZP().removeUserDestination(null==t?void 0:t.uid,i).then(()=>{console.log("User removed from destination's list:",i),s()})},m=async e=>{e.stopPropagation();try{let e=new o.ZP;r?e.getReviewForDestinationUser(null==t?void 0:t.uid,i).then(t=>{t.length?!confirm("You have written a review for this destination, and can not have a review for a destination you have not visited.\n If you continue, the review will be deleted.")||e.deleteReview(i,t[0].reviewID).then(()=>{h()}):h()}):(await e.setUserDestination(null==t?void 0:t.uid,i),console.log("User added to destination's list:",i)),l(!r)}catch(e){console.error("Error handling checkbox change:",e)}};return(0,n.jsx)(n.Fragment,{children:r?(0,n.jsx)(c.G,{className:"visitedIcon",icon:d.wJh,onClick:m,style:{color:"#63E6BE"}}):(0,n.jsx)(c.G,{className:"visitedIcon",icon:d.wJh,onClick:m,style:{color:"#c0c0c0"}})})},h=e=>{let{country:t,city:i,rating:s,imgURL:o,onReadMore:c,isLoggedIn:d,user:h,id:m}=e,[g,v]=(0,a.useState)({state:!1});return(0,n.jsxs)("div",{className:"box",id:"box",onClick:d?c:()=>alert("Please log in to read more"),children:[(0,n.jsx)("img",{src:o,alt:"Error loading image",className:"inner-div"}),(0,n.jsxs)("div",{className:"inner-div info-div",children:[(0,n.jsx)("h1",{children:i}),(0,n.jsx)("h2",{children:t})]}),(0,n.jsxs)("div",{className:"inner-div more-div",children:[(0,n.jsx)("div",{className:"rating-container",children:(0,n.jsx)(l.Z,{"data-testid":"rating",name:"average-rating",value:s,precision:.25,readOnly:!0})}),(0,n.jsx)("div",{className:"weather-container",children:(0,n.jsx)(r,{country:t,city:i})}),(0,n.jsxs)("div",{className:"button-container",children:[void 0!==h&&(0,n.jsx)(u,{user:h,id:m,extraHandling:()=>{}}),(0,n.jsx)("button",{onClick:d?c:()=>alert("Please log in to read more"),children:"Read More"})]})]})]})};i(4319);var m=e=>{let{categories:t,onFilterChange:i}=e,[s,r]=(0,a.useState)([]),l=e=>{let t=s.includes(e)?s.filter(t=>t!==e):[...s,e];r(t),i(t)};return(0,n.jsx)("div",{id:"filterPanel-container",children:Object.entries(t).map(e=>{let[t,i]=e;return(0,n.jsxs)("div",{id:"menu-container",children:[(0,n.jsx)("h4",{children:t}),(0,n.jsx)("div",{id:"checkbox-container",children:i.map((e,t)=>(0,n.jsxs)("label",{children:[(0,n.jsx)("input",{type:"checkbox",value:e,checked:s.includes(e),onChange:()=>l(e)}),e]},t))})]},t)})})};i(6561);var g=i(7907);i(9559);var v=e=>{let{id:t,country:i,city:s,rating:h,tags:m,description:g,imgURL:v,admin:x,onClose:j,user:p,visited:f,onEdit:w,onDelete:b}=e,[y,N]=(0,a.useState)([]),[C,S]=(0,a.useState)(2.5),[k,D]=(0,a.useState)(""),[I,R]=(0,a.useState)(""),P=new o.ZP,[E,J]=(0,a.useState)(!1),[A,T]=(0,a.useState)(!1),[U,O]=(0,a.useState)(h),[L,F]=(0,a.useState)(!1);(0,a.useEffect)(()=>{P.getReviewsForDestination(t).then(e=>{N(JSON.parse(JSON.stringify(e)))}),J(f)},[]),(0,a.useEffect)(()=>{P.getDestination(t).then(e=>{O((null==e?void 0:e.RatingCount)==0?0:(null==e?void 0:e.TotalRating)/(null==e?void 0:e.RatingCount)),F(!1)})},[L]),(0,a.useEffect)(()=>{if(p){let e=y.filter(e=>e.userID===p.uid);0!==e.length&&(R(e[0].reviewID),D(e[0].comment),S(e[0].rating))}},[y]);let Z=e=>{D(e.target.value)},V=()=>{P.updateReview(t,I,C,k).then(()=>{P.getReviewsForDestination(t).then(e=>{N(JSON.parse(JSON.stringify(e)))}),F(!0),T(!1)})},_=()=>{P.deleteReview(t,I).then(()=>{B()})},B=()=>{P.getReviewsForDestination(t).then(e=>{N(JSON.parse(JSON.stringify(e)))}),F(!0),T(!1),R(""),D(""),S(2.5)},H=()=>{confirm("Are you sure you want to delete this review?\nClick either OK or Cancel.")&&_()};return(0,n.jsxs)("div",{id:"modal-container",className:"not-blur",children:[(0,n.jsx)("button",{id:"x-button",onClick:j,className:"not-blur",children:"X"}),(0,n.jsx)("img",{src:v,alt:"Error",className:"not-blur"}),(0,n.jsxs)("div",{id:"admin-buttons",className:"not-blur",children:[x&&(0,n.jsxs)("button",{id:"edit-button",onClick:w,className:"not-blur",children:["Edit ",(0,n.jsx)(c.G,{id:"icon",className:"not-blur",icon:d.Yai})]}),x&&(0,n.jsxs)("button",{id:"delete-button",className:"not-blur",onClick:function(){confirm("Are you sure you want to delete this destination?\nClick either OK or Cancel.")&&b&&b()},children:["Delete",(0,n.jsx)(c.G,{id:"icon",className:"not-blur",icon:d.Vui})]})]}),(0,n.jsxs)("div",{id:"info-container",className:"not-blur",children:[(0,n.jsx)("div",{id:"title-container",className:"not-blur",children:(0,n.jsxs)("h1",{className:"not-blur",children:[s,", ",i]})}),(0,n.jsx)("div",{id:"visited-container",className:"addPadding not-blur",children:(0,n.jsx)(u,{id:t,user:p,extraHandling:()=>B()})}),(0,n.jsx)("div",{id:"weather-display-container",className:"addPadding not-blur",children:(0,n.jsx)(r,{country:i,city:s})}),(0,n.jsx)("div",{id:"rating-container",className:"addPadding not-blur",children:(0,n.jsx)(l.Z,{name:"average-rating",precision:.25,value:U,readOnly:!0})}),(0,n.jsx)("div",{id:"tag-container",className:"addPadding not-blur",children:m.length?"Tags: "+(null==m?void 0:m.join(", ")):"There are no tags for this destination"}),(0,n.jsx)("div",{id:"description-container",className:"addPadding not-blur",children:g||"No description for this destiantion"}),I?A?(0,n.jsx)("div",{children:y.filter(e=>e.reviewID===I).map(e=>(0,n.jsxs)("div",{id:"myrating-container",className:"addPadding not-blur",children:["Edit your review:",(0,n.jsx)("div",{id:"starRating",className:"not-blur",children:(0,n.jsx)(l.Z,{name:"half-rating",defaultValue:e.rating,precision:.5,onChange:(e,t)=>S(t)})}),(0,n.jsx)("textarea",{id:"review-destinations",rows:1,onChange:Z,defaultValue:e.comment}),(0,n.jsxs)("div",{children:[(0,n.jsx)(c.G,{id:"back-review",className:"not-blur",icon:d.a0w,onClick:()=>T(!1)}),(0,n.jsx)(c.G,{id:"update-review",className:"not-blur",icon:d.fV7,onClick:V}),(0,n.jsx)(c.G,{id:"delete-review",className:"not-blur",icon:d.Vui,onClick:H})]})]},e.reviewID))}):(0,n.jsxs)("div",{id:"reviewfeed-container",className:"addPadding not-blur",children:[(0,n.jsx)("h3",{children:"My Review"}),(0,n.jsx)("hr",{}),y.filter(e=>e.reviewID===I).map(e=>(0,n.jsxs)("div",{style:{justifyContent:"space-between"},children:[(0,n.jsxs)("div",{id:"top-of-review",children:[(0,n.jsx)("div",{style:{opacity:.5},children:e.email}),(0,n.jsx)(c.G,{id:"edit-button",className:"not-blur",icon:d.Yai,onClick:()=>T(!0)})]}),(0,n.jsx)(l.Z,{style:{opacity:.5},name:"half-rating",value:e.rating,precision:.5,readOnly:!0}),(0,n.jsx)("div",{style:{opacity:.5},children:e.comment})]},e.reviewID))]}):(0,n.jsxs)("div",{id:"myrating-container",className:"addPadding not-blur",children:["Add review:",(0,n.jsx)("div",{id:"starRating",className:"not-blur",children:(0,n.jsx)(l.Z,{name:"half-rating",defaultValue:2.5,precision:.5,onChange:(e,t)=>S(t)})}),(0,n.jsx)("textarea",{id:"review-destinations",rows:1,value:k,onChange:Z,placeholder:"Optional comment"}),(0,n.jsx)("button",{id:"submit-review",className:"addPadding not-blur",onClick:()=>{p&&!I&&P.checkIfVisited(p.uid,t).then(e=>{e?P.addReview(t,C,k,p.email,p.uid).then(()=>{F(!0)}).then(()=>{P.getReviewsForDestination(t).then(e=>{N(JSON.parse(JSON.stringify(e)))})}):alert("You can not give a review on a destination you have not visited.")})},children:"Submit"})]}),0!=y.filter(e=>""!==e.comment&&e.comment&&e.reviewID!==I).length&&(0,n.jsxs)("div",{id:"reviewfeed-container",className:"addPadding not-blur",children:[(0,n.jsx)("h3",{children:"All Reviews"}),y.filter(e=>""!==e.comment&&e.comment&&e.reviewID!==I).map(e=>(0,n.jsxs)("div",{children:[(0,n.jsx)("hr",{}),(0,n.jsxs)("div",{id:"singlereview-container",children:[(0,n.jsx)("div",{id:"top-of-review",children:e.email}),(0,n.jsx)(l.Z,{name:"half-rating",value:e.rating,precision:.5,readOnly:!0}),(0,n.jsx)("div",{children:e.comment})]})]},e.reviewID))]})]})]})};i(7126);var x=e=>{let{onClose:t,checkDuplicates:i,destinationList:s}=e,r=new o.ZP,[l,c]=(0,a.useState)(""),[d,u]=(0,a.useState)(""),[h,m]=(0,a.useState)(""),[g,v]=(0,a.useState)(""),[x,j]=(0,a.useState)(""),[p,f]=(0,a.useState)(""),[w,b]=(0,a.useState)(""),[y,N]=(0,a.useState)([]),C={Activities:["Hiking","Skiing","Sightseeing"],"Destination type":["City","Beach","Culture","Safari","Historical","Active"]},S=async()=>{let e=[];i(g,h,s)?b("This destination already exists"):""!==h&&""!==g&&""!==x&&""!==d&&""!==l?(e.push(l),e.push(d),y.map(t=>e.push(t)),await r.addDestination(h,g,x,e,p),null==t||t()):b("Fill inn all fields")};return(0,n.jsxs)("div",{id:"addDestination",className:"not-blur",children:[(0,n.jsx)("button",{id:"x-button",onClick:t,className:"not-blur",children:"X"}),(0,n.jsxs)("div",{id:"addDestination-inner",className:"not-blur",children:[(0,n.jsx)("h1",{className:"not-blur",children:"New travel destination"}),(0,n.jsx)("h5",{id:"statusMessage",className:"not-blur",children:w}),(0,n.jsxs)("form",{className:"not-blur",children:[(0,n.jsxs)("label",{className:"not-blur",children:["City:",(0,n.jsx)("input",{name:"city",className:"not-blur",onChange:e=>m(e.target.value)})]}),(0,n.jsxs)("label",{className:"not-blur",children:["Country:",(0,n.jsx)("input",{name:"country",className:"not-blur",onChange:e=>v(e.target.value)})]}),(0,n.jsxs)("label",{className:"not-blur",children:["Image url:",(0,n.jsx)("input",{name:"imgURL",className:"not-blur",onChange:e=>j(e.target.value)})]}),(0,n.jsx)("h3",{className:"not-blur",children:"Apply tags"}),(0,n.jsxs)("select",{className:"not-blur",defaultValue:"",onChange:e=>c(e.target.value),children:[(0,n.jsx)("option",{value:"",disabled:!0,children:"continent"}),(0,n.jsx)("option",{value:"africa",children:"Africa"}),(0,n.jsx)("option",{value:"asia",children:"Asia"}),(0,n.jsx)("option",{value:"europe",children:"Europe"}),(0,n.jsx)("option",{value:"northAmerica",children:"North-America"}),(0,n.jsx)("option",{value:"southAmerica",children:"South-America"}),(0,n.jsx)("option",{value:"oceania",children:"Oceania"})]}),(0,n.jsxs)("select",{className:"not-blur",defaultValue:"",onChange:e=>u(e.target.value),children:[(0,n.jsx)("option",{value:"",disabled:!0,children:"climate"}),(0,n.jsx)("option",{value:"continental",children:"Continental"}),(0,n.jsx)("option",{value:"dry",children:"Dry"}),(0,n.jsx)("option",{value:"polar",children:"Polar"}),(0,n.jsx)("option",{value:"temperate",children:"Temperate"}),(0,n.jsx)("option",{value:"tropical",children:"Tropical"})]}),(0,n.jsx)("div",{className:"not-blur",id:"checkbox-container",children:(()=>{let e=e=>{let t=e.target.value;e.target.checked?N(e=>[...e,t]):N(e=>e.filter(e=>e!==t))};return(0,n.jsx)(n.Fragment,{children:Object.entries(C).map(t=>{let[i,a]=t;return(0,n.jsxs)("div",{className:"not-blur",children:[(0,n.jsx)("h4",{className:"not-blur",children:i}),(0,n.jsx)("div",{className:"not-blur",id:"category-checkbox-container",children:a.map(t=>(0,n.jsxs)("label",{className:"not-blur",children:[(0,n.jsx)("input",{type:"checkbox",className:"not-blur",value:t,onChange:e}),t]},t))})]},i)})})})()})]}),(0,n.jsx)("h4",{className:"not-blur",children:"Description"}),(0,n.jsx)("textarea",{className:"not-blur",rows:12,cols:60,style:{resize:"none"},onChange:e=>f(e.target.value)}),(0,n.jsx)("button",{id:"addButton",className:"not-blur",onClick:S,children:" Add new destination "})]})]})};i(2780);var j=e=>{let{id:t,city:i,country:s,tags:r,currentDescription:l,currentImgUrl:c,onClose:d}=e,u=new o.ZP,[h,m]=(0,a.useState)(""),[g,v]=(0,a.useState)(c),[x,j]=(0,a.useState)(l),[p,f]=(0,a.useState)(""),[w,b]=(0,a.useState)(r),[y,N]=(0,a.useState)(!1),C={Activities:["Hiking","Skiing","Sightseeing"],"Destination type":["City","Beach","Culture","Safari","Historical","Active"]},S=["continental","dry","polar","temperate","tropical"],k=e=>{m(e),b(e=>e.filter(e=>!S.includes(e))),b(t=>[...t,e])},D=()=>{for(let e=0;e{D()?(await u.editDestination(t,g,w,x),null==d||d()):f("No changes were made")},R=e=>w.indexOf(e)>-1;return(0,n.jsxs)("div",{id:"editBox",className:"not-blur",children:[(0,n.jsx)("h1",{className:"not-blur",children:"Edit destination"}),(0,n.jsx)("h5",{id:"statusmessage",className:"not-blur",children:p}),(0,n.jsx)("button",{id:"x-button",onClick:d,className:"not-blur",children:"X"}),(0,n.jsxs)("div",{id:"editDestination",className:"not-blur",children:[(0,n.jsxs)("div",{id:"display-current-destination",className:"not-blur",children:[(0,n.jsx)("img",{src:g,alt:"Error",className:"not-blur"}),(0,n.jsxs)("h2",{className:"not-blur",children:[i,", ",s]})]}),(0,n.jsxs)("div",{id:"editDestination-inner",className:"not-blur",children:[(0,n.jsxs)("form",{className:"not-blur",children:[(0,n.jsxs)("label",{className:"not-blur",children:["Image url:",(0,n.jsx)("input",{name:"imgURL",id:"imgURL",className:"not-blur",onChange:e=>v(e.target.value)})]}),(0,n.jsxs)("select",{className:"not-blur",defaultValue:"",onChange:e=>k(e.target.value),children:[(0,n.jsx)("option",{value:"",disabled:!0,children:"climate"}),(0,n.jsx)("option",{value:"continental",children:"Continental"}),(0,n.jsx)("option",{value:"dry",children:"Dry"}),(0,n.jsx)("option",{value:"polar",children:"Polar"}),(0,n.jsx)("option",{value:"temperate",children:"Temperate"}),(0,n.jsx)("option",{value:"tropical",children:"Tropical"})]}),(0,n.jsx)("div",{className:"not-blur",id:"edit-checkboxes",children:(()=>{let e=e=>{let t=e.target.value;e.target.checked?w.includes(t)||b(e=>[...e,t]):b(e=>e.filter(e=>e!==t))};return(0,n.jsx)(n.Fragment,{children:Object.entries(C).map(t=>{let[i,a]=t;return(0,n.jsxs)("div",{className:"not-blur",children:[(0,n.jsx)("h4",{className:"not-blur",children:i}),(0,n.jsx)("div",{className:"not-blur",id:"category-checkbox-container",children:a.map(t=>(0,n.jsxs)("label",{className:"not-blur",children:[(0,n.jsx)("input",{type:"checkbox",className:"not-blur",defaultChecked:R(t),value:t,onChange:e}),t]},t))})]},i)})})})()})]}),(0,n.jsx)("h4",{className:"not-blur",children:"Description"}),(0,n.jsx)("textarea",{className:"not-blur",defaultValue:l,rows:12,cols:60,style:{resize:"none"},onChange:e=>j(e.target.value)}),(0,n.jsx)("button",{id:"editButton",className:"not-blur",onClick:I,children:"Update destination"})]})]})]})},p=i(4905);i(8467);var f=e=>{let{admin:t}=e,[i,s]=(0,a.useState)(void 0);return(0,n.jsxs)("div",{id:"fileUploader",children:[t&&(0,n.jsx)("input",{type:"file",onChange:e=>{e.target.files&&e.target.files.length>0&&s(e.target.files[0])},accept:".png, .jpg, .gif"}),t&&(0,n.jsx)("button",{onClick:()=>{if(!i){alert("Please choose a file first!");return}let e=new Date().getTime(),t="".concat(e,"_").concat(i.name),n=(0,p.iH)(o.tO,"/files/".concat(t)),a=new Blob([i]),s=(0,p.B0)(n,a);s.on("state_changed",e=>{e.bytesTransferred,e.totalBytes},e=>console.log(e),async()=>{await (0,p.Jt)(s.snapshot.ref),window.location.reload()})},children:"Upload ad"})]})};i(9962);var w=e=>{let{admin:t}=e,[i,s]=(0,a.useState)([]);(0,a.useEffect)(()=>{let e=(0,p.cF)(),t=(0,p.iH)(e,"files/");(0,p.aF)(t).then(e=>{Promise.all(e.items.map(e=>(0,p.Jt)(e).catch(e=>(console.log(e),"")))).then(e=>s(e.filter(e=>""!==e))).catch(e=>console.log(e))}).catch(e=>console.log(e))},[]);let r=e=>{let t=(0,p.cF)(),i=(0,p.iH)(t,e);(0,p.oq)(i).then(()=>{console.log("File deleted successfully"),s(t=>t.filter(t=>t!==e))}).catch(e=>{console.error("Error deleting file: ",e)})},l=i.slice().reverse();return(0,n.jsx)("div",{id:"adColumn",children:l.map((e,i)=>(0,n.jsxs)("div",{id:"delete",children:[(0,n.jsx)("img",{src:e,alt:"File ".concat(i+1)}),t&&(0,n.jsx)("button",{onClick:()=>r(e),children:(0,n.jsx)(c.G,{id:"icon",className:"not-blur",icon:d.Vui})})]},i))})},b=()=>{let[e,t]=(0,a.useState)([]),[i,s]=(0,a.useState)([]),[r,l]=(0,a.useState)(!1),[c,d]=(0,a.useState)(0),[u,p]=(0,a.useState)(0),[b,y]=(0,a.useState)(""),[N,C]=(0,a.useState)(!1),[S,k]=(0,a.useState)(!1),[D,I]=(0,a.useState)(!1);(0,g.useRouter)();let[R,P]=(0,a.useState)(),[E,J]=(0,a.useState)(!1),[A,T]=(0,a.useState)(!1),[U,O]=(0,a.useState)(""),[L,F]=(0,a.useState)(null);(0,a.useEffect)(()=>{var e;O(null===(e=localStorage.getItem("user"))||void 0===e?void 0:e.replace(/"/g,""))},[]),(0,a.useEffect)(()=>{o.I8.onAuthStateChanged(e=>{e?P(e):(P(void 0),l(!1),C(!1),I(!1))}),"theamariabruno@gmail.com"===U||"juliadai03@gmail.com"===U||"adrianhsolberg@gmail.com"===U||"hallvardfuttererwannebo@gmail.com"===U||"sand.rasmusw@gmail.com"===U?T(!0):T(!1)},[S,E,U]),(0,a.useEffect)(()=>{new o.ZP().getDestinations().then(e=>{s(e),k(!1)})},[S]);let Z=e=>{d(e),l(!0),p(window.scrollY),window.scrollTo(0,0)},V=(e,t)=>{if(void 0===t||null==t||t.length<=0)return e;let i=t.map(e=>e.toLowerCase());return e.filter(e=>{let t=e.category.map(e=>e.toLowerCase());return i.every(e=>t.includes(e))})},_=(e,t)=>e.filter(e=>{let i=t.toLowerCase(),n=e.city.toLowerCase(),a=e.country.toLowerCase();return!i||n.includes(i)||a.includes(i)}),B=(e,t,i)=>{let n=_(e,t),a=_(e,i);return n.length>0&&a.length>0},H=()=>{d(0),l(!1),window.scrollTo(0,u),p(0),k(!0)},G=()=>{C(!1),k(!0),window.scrollTo(0,u)},M=()=>{I(!0),l(!1)},z=()=>{I(!1),k(!0)},Q=e=>{(new o.ZP).deleteDestination(e),k(!0),H()},Y=_(V(i,e),b)[c];return(0,n.jsxs)("div",{id:"container",className:r||N||D?"blur-background":void 0,children:[(r||N||D)&&(0,n.jsx)("div",{className:"overlay"}),r&&R&&(0,n.jsx)(v,{id:Y.id,city:Y.city,country:Y.country,rating:0==Y.RatingCount?0:Y.TotalRating/Y.RatingCount,tags:Y.category,description:Y.description,imgURL:Y.imgUrl,user:R,admin:A,onEdit:()=>M(),onDelete:()=>Q(_(V(i,e),b)[c].id),onClose:()=>H()}),D&&(0,n.jsx)(j,{city:Y.city,country:Y.country,tags:Y.category,currentDescription:Y.description,currentImgUrl:Y.imgUrl,id:Y.id,onClose:()=>z(),visited:Y.visited}),!!R&&(0,n.jsx)("button",{id:"addDestinationButton",onClick:()=>C(!0),disabled:r||N,className:r||N?"disable-button":void 0,children:"Add new travel destination"}),(0,n.jsx)("div",{id:"search-container",children:(0,n.jsx)("input",{type:"text",value:b,onChange:e=>{y(e.target.value)},placeholder:"Search destinations"})}),(0,n.jsx)("div",{id:"filter-container",children:(0,n.jsx)(m,{categories:{Activities:["Hiking","Skiing","Sightseeing"],Climate:["Tropical","Dry","Continental","Polar","Temperate"],"Destination type":["City","Beach","Culture","Safari","Historical","Active"],Continent:["Europe","Asia","Africa","North America","South America","Oceania"]},onFilterChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t(e)}})}),(0,n.jsx)("div",{id:"fileUploader",children:(0,n.jsx)(f,{admin:A})}),(0,n.jsx)("div",{id:"ad-container",children:(0,n.jsx)("div",{id:"displayAds",children:(0,n.jsx)(w,{admin:A})})}),(0,n.jsx)("div",{id:"feed-container",children:(()=>{let t=_(V(i,e),b);return 0===t.length?(0,n.jsx)("h1",{children:"No destinations found"}):(0,n.jsx)(n.Fragment,{children:t.map((e,t)=>(0,n.jsx)(h,{city:e.city,country:e.country,rating:0==e.RatingCount?0:e.TotalRating/e.RatingCount,imgURL:e.imgUrl,onReadMore:()=>Z(t),isLoggedIn:!!R,user:R,id:e.id},t))})})()}),N&&(0,n.jsx)(x,{checkDuplicates:(e,t)=>B(i,e,t),destinationList:i,onClose:()=>G()})]})};function y(){return new o.ZP,(0,n.jsx)("div",{children:(0,n.jsx)(b,{})})}i(4720)},4720:function(e,t,i){"use strict";i.r(t),i.d(t,{Header:function(){return c},default:function(){return d}});var n=i(7437),a=i(2265),s=i(8792);i(2046);var r=i(2619),l=i(2730),o=()=>{let[e,t]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let e=r.ZP.getAuth().onAuthStateChanged(e=>{e?t(!0):t(!1)});return()=>e()},[e]);let i=async()=>{let e=new l.hJ;e.setCustomParameters({prompt:"select_account"});try{let i=(await (0,l.rh)(r.ZP.getAuth(),e)).user;i&&(i.uid,t(!0),localStorage.setItem("user",JSON.stringify(i.email))),window.location.reload()}catch(e){console.error(e)}},s=async()=>{try{await (0,l.w7)(r.ZP.getAuth()),localStorage.setItem("user",""),t(!1),window.location.reload()}catch(e){console.error(e)}};return(0,n.jsx)("div",{children:e?(0,n.jsx)("button",{onClick:s,children:"Sign out"}):(0,n.jsx)("button",{onClick:i,children:"Sign in with Google"})})};i(9581),i(9847);let c=()=>{let[e,t]=(0,a.useState)(void 0);return((0,a.useEffect)(()=>{let e=localStorage.getItem("theme");var i=document.body;"dark"===e?(i.classList.add("dark-mode"),t(!0)):(i.classList.remove("dark-mode"),t(!1))},[]),void 0===e)?null:(0,n.jsxs)("header",{id:"navbar",children:[(0,n.jsx)(s.default,{href:"/",className:"link",children:(0,n.jsx)("div",{className:"navbar-start",style:{fontFamily:"Arial",fontSize:"18px"},children:"Travel Buddy"})}),(0,n.jsxs)("div",{className:"navbar-end",style:{display:"flex"},children:[(0,n.jsx)(s.default,{href:"/MyProfile",className:"link",children:(0,n.jsx)("div",{className:"navbar-start",style:{fontFamily:"Arial",fontSize:"18px",paddingRight:"20px",justifyContent:"space-between",paddingTop:"10px"},children:"My Destinations"})}),(0,n.jsxs)("label",{className:"switch",children:[(0,n.jsx)("input",{id:"darkmode-button",defaultChecked:e,onClick:()=>{var i=document.body;e?(i.classList.remove("dark-mode"),localStorage.setItem("theme","light")):(i.classList.add("dark-mode"),localStorage.setItem("theme","dark")),t(e=>!e)},type:"checkbox"}),(0,n.jsx)("span",{className:"slider round"})]}),(0,n.jsx)(o,{})]})]})};var d=c},7126:function(){},9847:function(){},950:function(){},9559:function(){},2780:function(){},8467:function(){},4319:function(){},5739:function(){},2046:function(){},6561:function(){},6296:function(){},9962:function(){},9581:function(){}},function(e){e.O(0,[358,380,676,228,660,971,69,744],function(){return e(e.s=2880)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/out/_next/static/chunks/bc9e92e6-a738ef87299b532a.js b/out/_next/static/chunks/bc9e92e6-a738ef87299b532a.js new file mode 100644 index 0000000..77d7f94 --- /dev/null +++ b/out/_next/static/chunks/bc9e92e6-a738ef87299b532a.js @@ -0,0 +1,1490 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[358],{9009:function(e,t,r){r.d(t,{ET:function(){return sm},IO:function(){return i5},JU:function(){return iD},Jm:function(){return iM},PL:function(){return sc},QT:function(){return su},ad:function(){return ix},ar:function(){return i7},hJ:function(){return ib},oe:function(){return sf},r7:function(){return sd}});var n,i,s=r(5723),a=r(6574),o=r(9858),l=r(8954),u=r(1197),h=r(9079);let c="@firebase/firestore";/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class d{constructor(e){this.uid=e}isAuthenticated(){return null!=this.uid}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(e){return e.uid===this.uid}}d.UNAUTHENTICATED=new d(null),d.GOOGLE_CREDENTIALS=new d("google-credentials-uid"),d.FIRST_PARTY=new d("first-party-uid"),d.MOCK_USER=new d("mock-user");/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let f="10.8.0",m=new o.Yd("@firebase/firestore");function p(){return m.logLevel}function g(e,...t){if(m.logLevel<=o.in.DEBUG){let r=t.map(v);m.debug(`Firestore (${f}): ${e}`,...r)}}function y(e,...t){if(m.logLevel<=o.in.ERROR){let r=t.map(v);m.error(`Firestore (${f}): ${e}`,...r)}}function w(e,...t){if(m.logLevel<=o.in.WARN){let r=t.map(v);m.warn(`Firestore (${f}): ${e}`,...r)}}function v(e){if("string"==typeof e)return e;try{/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */return JSON.stringify(e)}catch(t){return e}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function _(e="Unexpected state"){let t=`FIRESTORE (${f}) INTERNAL ASSERTION FAILED: `+e;throw y(t),Error(t)}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let E={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"};class T extends l.ZR{constructor(e,t){super(e,t),this.code=e,this.message=t,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class I{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class S{constructor(e,t){this.user=t,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class C{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,t){e.enqueueRetryable(()=>t(d.UNAUTHENTICATED))}shutdown(){}}class A{constructor(e){this.token=e,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(e,t){this.changeListener=t,e.enqueueRetryable(()=>t(this.token.user))}shutdown(){this.changeListener=null}}class b{constructor(e){this.t=e,this.currentUser=d.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,t){let r=this.i,n=e=>this.i!==r?(r=this.i,t(e)):Promise.resolve(),i=new I;this.o=()=>{this.i++,this.currentUser=this.u(),i.resolve(),i=new I,e.enqueueRetryable(()=>n(this.currentUser))};let s=()=>{let t=i;e.enqueueRetryable(async()=>{await t.promise,await n(this.currentUser)})},a=e=>{g("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=e,this.auth.addAuthTokenListener(this.o),s()};this.t.onInit(e=>a(e)),setTimeout(()=>{if(!this.auth){let e=this.t.getImmediate({optional:!0});e?a(e):(g("FirebaseAuthCredentialsProvider","Auth not yet detected"),i.resolve(),i=new I)}},0),s()}getToken(){let e=this.i,t=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(t).then(t=>this.i!==e?(g("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):t?("string"==typeof t.accessToken||_(),new S(t.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.auth.removeAuthTokenListener(this.o)}u(){let e=this.auth&&this.auth.getUid();return null===e||"string"==typeof e||_(),new d(e)}}class D{constructor(e,t,r){this.l=e,this.h=t,this.P=r,this.type="FirstParty",this.user=d.FIRST_PARTY,this.I=new Map}T(){return this.P?this.P():null}get headers(){this.I.set("X-Goog-AuthUser",this.l);let e=this.T();return e&&this.I.set("Authorization",e),this.h&&this.I.set("X-Goog-Iam-Authorization-Token",this.h),this.I}}class N{constructor(e,t,r){this.l=e,this.h=t,this.P=r}getToken(){return Promise.resolve(new D(this.l,this.h,this.P))}start(e,t){e.enqueueRetryable(()=>t(d.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class k{constructor(e){this.value=e,this.type="AppCheck",this.headers=new Map,e&&e.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class x{constructor(e){this.A=e,this.forceRefresh=!1,this.appCheck=null,this.R=null}start(e,t){let r=e=>{null!=e.error&&g("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${e.error.message}`);let r=e.token!==this.R;return this.R=e.token,g("FirebaseAppCheckTokenProvider",`Received ${r?"new":"existing"} token.`),r?t(e.token):Promise.resolve()};this.o=t=>{e.enqueueRetryable(()=>r(t))};let n=e=>{g("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=e,this.appCheck.addTokenListener(this.o)};this.A.onInit(e=>n(e)),setTimeout(()=>{if(!this.appCheck){let e=this.A.getImmediate({optional:!0});e?n(e):g("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){let e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then(e=>e?("string"==typeof e.token||_(),this.R=e.token,new k(e.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class R{static newId(){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=Math.floor(256/e.length)*e.length,r="";for(;r.length<20;){let n=/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function(e){let t="undefined"!=typeof self&&(self.crypto||self.msCrypto),r=new Uint8Array(e);if(t&&"function"==typeof t.getRandomValues)t.getRandomValues(r);else for(let t=0;tt?1:0}function V(e,t,r){return e.length===t.length&&e.every((e,n)=>r(e,t[n]))}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class O{constructor(e,t){if(this.seconds=e,this.nanoseconds=t,t<0||t>=1e9)throw new T(E.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(e<-62135596800||e>=253402300800)throw new T(E.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}static now(){return O.fromMillis(Date.now())}static fromDate(e){return O.fromMillis(e.getTime())}static fromMillis(e){let t=Math.floor(e/1e3);return new O(t,Math.floor(1e6*(e-1e3*t)))}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(e){return this.seconds===e.seconds?L(this.nanoseconds,e.nanoseconds):L(this.seconds,e.seconds)}isEqual(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){return String(this.seconds- -62135596800).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class M{constructor(e){this.timestamp=e}static fromTimestamp(e){return new M(e)}static min(){return new M(new O(0,0))}static max(){return new M(new O(253402300799,999999999))}compareTo(e){return this.timestamp._compareTo(e.timestamp)}isEqual(e){return this.timestamp.isEqual(e.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class F{constructor(e,t,r){void 0===t?t=0:t>e.length&&_(),void 0===r?r=e.length-t:r>e.length-t&&_(),this.segments=e,this.offset=t,this.len=r}get length(){return this.len}isEqual(e){return 0===F.comparator(this,e)}child(e){let t=this.segments.slice(this.offset,this.limit());return e instanceof F?e.forEach(e=>{t.push(e)}):t.push(e),this.construct(t)}limit(){return this.offset+this.length}popFirst(e){return e=void 0===e?1:e,this.construct(this.segments,this.offset+e,this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return 0===this.length}isPrefixOf(e){if(e.lengthi)return 1}return e.lengtht.length?1:0}}class P extends F{construct(e,t,r){return new P(e,t,r)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...e){let t=[];for(let r of e){if(r.indexOf("//")>=0)throw new T(E.INVALID_ARGUMENT,`Invalid segment (${r}). Paths must not contain // in them.`);t.push(...r.split("/").filter(e=>e.length>0))}return new P(t)}static emptyPath(){return new P([])}}let U=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class q extends F{construct(e,t,r){return new q(e,t,r)}static isValidIdentifier(e){return U.test(e)}canonicalString(){return this.toArray().map(e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),q.isValidIdentifier(e)||(e="`"+e+"`"),e)).join(".")}toString(){return this.canonicalString()}isKeyField(){return 1===this.length&&"__name__"===this.get(0)}static keyField(){return new q(["__name__"])}static fromServerFormat(e){let t=[],r="",n=0,i=()=>{if(0===r.length)throw new T(E.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);t.push(r),r=""},s=!1;for(;n=2&&this.path.get(this.path.length-2)===e}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(e){return null!==e&&0===P.comparator(this.path,e.path)}toString(){return this.path.toString()}static comparator(e,t){return P.comparator(e.path,t.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new B(new P(e.slice()))}}/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ${constructor(e,t,r,n){this.indexId=e,this.collectionGroup=t,this.fields=r,this.indexState=n}}$.UNKNOWN_ID=-1;class z{constructor(e,t,r){this.readTime=e,this.documentKey=t,this.largestBatchId=r}static min(){return new z(M.min(),B.empty(),-1)}static max(){return new z(M.max(),B.empty(),-1)}}class K{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(e=>e())}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function Q(e){if(e.code!==E.FAILED_PRECONDITION||"The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab."!==e.message)throw e;g("LocalStore","Unexpectedly lost primary lease")}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class j{constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e(e=>{this.isDone=!0,this.result=e,this.nextCallback&&this.nextCallback(e)},e=>{this.isDone=!0,this.error=e,this.catchCallback&&this.catchCallback(e)})}catch(e){return this.next(void 0,e)}next(e,t){return this.callbackAttached&&_(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(t,this.error):this.wrapSuccess(e,this.result):new j((r,n)=>{this.nextCallback=t=>{this.wrapSuccess(e,t).next(r,n)},this.catchCallback=e=>{this.wrapFailure(t,e).next(r,n)}})}toPromise(){return new Promise((e,t)=>{this.next(e,t)})}wrapUserFunction(e){try{let t=e();return t instanceof j?t:j.resolve(t)}catch(e){return j.reject(e)}}wrapSuccess(e,t){return e?this.wrapUserFunction(()=>e(t)):j.resolve(t)}wrapFailure(e,t){return e?this.wrapUserFunction(()=>e(t)):j.reject(t)}static resolve(e){return new j((t,r)=>{t(e)})}static reject(e){return new j((t,r)=>{r(e)})}static waitFor(e){return new j((t,r)=>{let n=0,i=0,s=!1;e.forEach(e=>{++n,e.next(()=>{++i,s&&i===n&&t()},e=>r(e))}),s=!0,i===n&&t()})}static or(e){let t=j.resolve(!1);for(let r of e)t=t.next(e=>e?j.resolve(e):r());return t}static forEach(e,t){let r=[];return e.forEach((e,n)=>{r.push(t.call(this,e,n))}),this.waitFor(r)}static mapArray(e,t){return new j((r,n)=>{let i=e.length,s=Array(i),a=0;for(let o=0;o{s[l]=e,++a===i&&r(s)},e=>n(e))}})}static doWhile(e,t){return new j((r,n)=>{let i=()=>{!0===e()?t().next(()=>{i()},n):r()};i()})}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class G{constructor(e,t){this.action=e,this.transaction=t,this.aborted=!1,this.V=new I,this.transaction.oncomplete=()=>{this.V.resolve()},this.transaction.onabort=()=>{t.error?this.V.reject(new Y(e,t.error)):this.V.resolve()},this.transaction.onerror=t=>{let r=et(t.target.error);this.V.reject(new Y(e,r))}}static open(e,t,r,n){try{return new G(t,e.transaction(n,r))}catch(e){throw new Y(t,e)}}get m(){return this.V.promise}abort(e){e&&this.V.reject(e),this.aborted||(g("SimpleDb","Aborting transaction:",e?e.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())}g(){let e=this.transaction;this.aborted||"function"!=typeof e.commit||e.commit()}store(e){return new X(this.transaction.objectStore(e))}}class W{constructor(e,t,r){this.name=e,this.version=t,this.p=r,12.2===W.S((0,l.z$)())&&y("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.")}static delete(e){return g("SimpleDb","Removing database:",e),Z(window.indexedDB.deleteDatabase(e)).toPromise()}static D(){if(!(0,l.hl)())return!1;if(W.C())return!0;let e=(0,l.z$)(),t=W.S(e),r=W.v(e);return!(e.indexOf("MSIE ")>0||e.indexOf("Trident/")>0||e.indexOf("Edge/")>0||0{let n=indexedDB.open(this.name,this.version);n.onsuccess=e=>{t(e.target.result)},n.onblocked=()=>{r(new Y(e,"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},n.onerror=t=>{let n=t.target.error;"VersionError"===n.name?r(new T(E.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 T(E.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 Y(e,n))},n.onupgradeneeded=e=>{g("SimpleDb",'Database "'+this.name+'" requires upgrade from version:',e.oldVersion);let t=e.target.result;this.p.N(t,n.transaction,e.oldVersion,this.version).next(()=>{g("SimpleDb","Database upgrade to version "+this.version+" complete")})}})),this.B&&(this.db.onversionchange=e=>this.B(e)),this.db}L(e){this.B=e,this.db&&(this.db.onversionchange=t=>e(t))}async runTransaction(e,t,r,n){let i="readonly"===t,s=0;for(;;){++s;try{this.db=await this.O(e);let t=G.open(this.db,e,i?"readonly":"readwrite",r),s=n(t).next(e=>(t.g(),e)).catch(e=>(t.abort(e),j.reject(e))).toPromise();return s.catch(()=>{}),await t.m,s}catch(t){let e="FirebaseError"!==t.name&&s<3;if(g("SimpleDb","Transaction failed with error:",t.message,"Retrying:",e),this.close(),!e)return Promise.reject(t)}}}close(){this.db&&this.db.close(),this.db=void 0}}class H{constructor(e){this.k=e,this.q=!1,this.K=null}get isDone(){return this.q}get $(){return this.K}set cursor(e){this.k=e}done(){this.q=!0}U(e){this.K=e}delete(){return Z(this.k.delete())}}class Y extends T{constructor(e,t){super(E.UNAVAILABLE,`IndexedDB transaction '${e}' failed: ${t}`),this.name="IndexedDbTransactionError"}}function J(e){return"IndexedDbTransactionError"===e.name}class X{constructor(e){this.store=e}put(e,t){let r;return void 0!==t?(g("SimpleDb","PUT",this.store.name,e,t),r=this.store.put(t,e)):(g("SimpleDb","PUT",this.store.name,"",e),r=this.store.put(e)),Z(r)}add(e){return g("SimpleDb","ADD",this.store.name,e,e),Z(this.store.add(e))}get(e){return Z(this.store.get(e)).next(t=>(void 0===t&&(t=null),g("SimpleDb","GET",this.store.name,e,t),t))}delete(e){return g("SimpleDb","DELETE",this.store.name,e),Z(this.store.delete(e))}count(){return g("SimpleDb","COUNT",this.store.name),Z(this.store.count())}W(e,t){let r=this.options(e,t),n=r.index?this.store.index(r.index):this.store;if("function"==typeof n.getAll){let e=n.getAll(r.range);return new j((t,r)=>{e.onerror=e=>{r(e.target.error)},e.onsuccess=e=>{t(e.target.result)}})}{let e=this.cursor(r),t=[];return this.G(e,(e,r)=>{t.push(r)}).next(()=>t)}}j(e,t){let r=this.store.getAll(e,null===t?void 0:t);return new j((e,t)=>{r.onerror=e=>{t(e.target.error)},r.onsuccess=t=>{e(t.target.result)}})}H(e,t){g("SimpleDb","DELETE ALL",this.store.name);let r=this.options(e,t);r.J=!1;let n=this.cursor(r);return this.G(n,(e,t,r)=>r.delete())}Y(e,t){let r;t?r=e:(r={},t=e);let n=this.cursor(r);return this.G(n,t)}Z(e){let t=this.cursor({});return new j((r,n)=>{t.onerror=e=>{n(et(e.target.error))},t.onsuccess=t=>{let n=t.target.result;n?e(n.primaryKey,n.value).next(e=>{e?n.continue():r()}):r()}})}G(e,t){let r=[];return new j((n,i)=>{e.onerror=e=>{i(e.target.error)},e.onsuccess=e=>{let i=e.target.result;if(!i)return void n();let s=new H(i),a=t(i.primaryKey,i.value,s);if(a instanceof j){let e=a.catch(e=>(s.done(),j.reject(e)));r.push(e)}s.isDone?n():null===s.$?i.continue():i.continue(s.$)}}).next(()=>j.waitFor(r))}options(e,t){let r;return void 0!==e&&("string"==typeof e?r=e:t=e),{index:r,range:t}}cursor(e){let t="next";if(e.reverse&&(t="prev"),e.index){let r=this.store.index(e.index);return e.J?r.openKeyCursor(e.range,t):r.openCursor(e.range,t)}return this.store.openCursor(e.range,t)}}function Z(e){return new j((t,r)=>{e.onsuccess=e=>{t(e.target.result)},e.onerror=e=>{r(et(e.target.error))}})}let ee=!1;function et(e){let t=W.S((0,l.z$)());if(t>=12.2&&t<13){let t="An internal error was encountered in the Indexed Database server";if(e.message.indexOf(t)>=0){let e=new T("internal",`IOS_INDEXEDDB_BUG1: IndexedDb has thrown '${t}'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.`);return ee||(ee=!0,setTimeout(()=>{throw e},0)),e}}return e}/** + * @license + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class er{constructor(e,t){this.previousValue=e,t&&(t.sequenceNumberHandler=e=>this.se(e),this.oe=e=>t.writeSequenceNumber(e))}se(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){let e=++this.previousValue;return this.oe&&this.oe(e),e}}function en(e){return 0===e&&1/e==-1/0}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function ei(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}function es(e,t){for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t(r,e[r])}function ea(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}er._e=-1;/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class eo{constructor(e,t){this.comparator=e,this.root=t||eu.EMPTY}insert(e,t){return new eo(this.comparator,this.root.insert(e,t,this.comparator).copy(null,null,eu.BLACK,null,null))}remove(e){return new eo(this.comparator,this.root.remove(e,this.comparator).copy(null,null,eu.BLACK,null,null))}get(e){let t=this.root;for(;!t.isEmpty();){let r=this.comparator(e,t.key);if(0===r)return t.value;r<0?t=t.left:r>0&&(t=t.right)}return null}indexOf(e){let t=0,r=this.root;for(;!r.isEmpty();){let n=this.comparator(e,r.key);if(0===n)return t+r.left.size;n<0?r=r.left:(t+=r.left.size+1,r=r.right)}return -1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(e){return this.root.inorderTraversal(e)}forEach(e){this.inorderTraversal((t,r)=>(e(t,r),!1))}toString(){let e=[];return this.inorderTraversal((t,r)=>(e.push(`${t}:${r}`),!1)),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new el(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new el(this.root,e,this.comparator,!1)}getReverseIterator(){return new el(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new el(this.root,e,this.comparator,!0)}}class el{constructor(e,t,r,n){this.isReverse=n,this.nodeStack=[];let i=1;for(;!e.isEmpty();)if(i=t?r(e.key,t):1,t&&n&&(i*=-1),i<0)e=this.isReverse?e.left:e.right;else{if(0===i){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let 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}hasNext(){return this.nodeStack.length>0}peek(){if(0===this.nodeStack.length)return null;let e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}class eu{constructor(e,t,r,n,i){this.key=e,this.value=t,this.color=null!=r?r:eu.RED,this.left=null!=n?n:eu.EMPTY,this.right=null!=i?i:eu.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,t,r,n,i){return new eu(null!=e?e:this.key,null!=t?t:this.value,null!=r?r:this.color,null!=n?n:this.left,null!=i?i:this.right)}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,t,r){let n=this,i=r(e,n.key);return(n=i<0?n.copy(null,null,null,n.left.insert(e,t,r),null):0===i?n.copy(null,t,null,null,null):n.copy(null,null,null,null,n.right.insert(e,t,r))).fixUp()}removeMin(){if(this.left.isEmpty())return eu.EMPTY;let e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),(e=e.copy(null,null,null,e.left.removeMin(),null)).fixUp()}remove(e,t){let r,n=this;if(0>t(e,n.key))n.left.isEmpty()||n.left.isRed()||n.left.left.isRed()||(n=n.moveRedLeft()),n=n.copy(null,null,null,n.left.remove(e,t),null);else{if(n.left.isRed()&&(n=n.rotateRight()),n.right.isEmpty()||n.right.isRed()||n.right.left.isRed()||(n=n.moveRedRight()),0===t(e,n.key)){if(n.right.isEmpty())return eu.EMPTY;r=n.right.min(),n=n.copy(r.key,r.value,null,null,n.right.removeMin())}n=n.copy(null,null,null,null,n.right.remove(e,t))}return n.fixUp()}isRed(){return this.color}fixUp(){let 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}moveRedLeft(){let e=this.colorFlip();return e.right.left.isRed()&&(e=(e=(e=e.copy(null,null,null,null,e.right.rotateRight())).rotateLeft()).colorFlip()),e}moveRedRight(){let e=this.colorFlip();return e.left.left.isRed()&&(e=(e=e.rotateRight()).colorFlip()),e}rotateLeft(){let e=this.copy(null,null,eu.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){let e=this.copy(null,null,eu.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip(){let 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)}checkMaxDepth(){return Math.pow(2,this.check())<=this.size+1}check(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw _();let e=this.left.check();if(e!==this.right.check())throw _();return e+(this.isRed()?0:1)}}eu.EMPTY=null,eu.RED=!0,eu.BLACK=!1,eu.EMPTY=new class{constructor(){this.size=0}get key(){throw _()}get value(){throw _()}get color(){throw _()}get left(){throw _()}get right(){throw _()}copy(e,t,r,n,i){return this}insert(e,t,r){return new eu(e,t)}remove(e,t){return this}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class eh{constructor(e){this.comparator=e,this.data=new eo(this.comparator)}has(e){return null!==this.data.get(e)}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(e){return this.data.indexOf(e)}forEach(e){this.data.inorderTraversal((t,r)=>(e(t),!1))}forEachInRange(e,t){let r=this.data.getIteratorFrom(e[0]);for(;r.hasNext();){let n=r.getNext();if(this.comparator(n.key,e[1])>=0)return;t(n.key)}}forEachWhile(e,t){let r;for(r=void 0!==t?this.data.getIteratorFrom(t):this.data.getIterator();r.hasNext();)if(!e(r.getNext().key))return}firstAfterOrEqual(e){let t=this.data.getIteratorFrom(e);return t.hasNext()?t.getNext().key:null}getIterator(){return new ec(this.data.getIterator())}getIteratorFrom(e){return new ec(this.data.getIteratorFrom(e))}add(e){return this.copy(this.data.remove(e).insert(e,!0))}delete(e){return this.has(e)?this.copy(this.data.remove(e)):this}isEmpty(){return this.data.isEmpty()}unionWith(e){let t=this;return t.size{t=t.add(e)}),t}isEqual(e){if(!(e instanceof eh)||this.size!==e.size)return!1;let t=this.data.getIterator(),r=e.data.getIterator();for(;t.hasNext();){let e=t.getNext().key,n=r.getNext().key;if(0!==this.comparator(e,n))return!1}return!0}toArray(){let e=[];return this.forEach(t=>{e.push(t)}),e}toString(){let e=[];return this.forEach(t=>e.push(t)),"SortedSet("+e.toString()+")"}copy(e){let t=new eh(this.comparator);return t.data=e,t}}class ec{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ed{constructor(e){this.fields=e,e.sort(q.comparator)}static empty(){return new ed([])}unionWith(e){let t=new eh(q.comparator);for(let e of this.fields)t=t.add(e);for(let r of e)t=t.add(r);return new ed(t.toArray())}covers(e){for(let t of this.fields)if(t.isPrefixOf(e))return!0;return!1}isEqual(e){return V(this.fields,e.fields,(e,t)=>e.isEqual(t))}}/** + * @license + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ef extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class em{constructor(e){this.binaryString=e}static fromBase64String(e){return new em(function(e){try{return atob(e)}catch(e){throw"undefined"!=typeof DOMException&&e instanceof DOMException?new ef("Invalid base64 string: "+e):e}}(e))}static fromUint8Array(e){return new em(function(e){let t="";for(let r=0;reeA(e,t))}function eD(e,t){if(e===t)return 0;let r=eC(e),n=eC(t);if(r!==n)return L(r,n);switch(r){case 0:case 9007199254740991:return 0;case 1:return L(e.booleanValue,t.booleanValue);case 2:return function(e,t){let r=ey(e.integerValue||e.doubleValue),n=ey(t.integerValue||t.doubleValue);return rn?1:r===n?0:isNaN(r)?isNaN(n)?0:-1:1}(e,t);case 3:return eN(e.timestampValue,t.timestampValue);case 4:return eN(eE(e),eE(t));case 5:return L(e.stringValue,t.stringValue);case 6:return function(e,t){let r=ew(e),n=ew(t);return r.compareTo(n)}(e.bytesValue,t.bytesValue);case 7:return function(e,t){let r=e.split("/"),n=t.split("/");for(let e=0;et.mapValue.fields[e]=eF(r)),t}if(e.arrayValue){let t={arrayValue:{values:[]}};for(let r=0;r<(e.arrayValue.values||[]).length;++r)t.arrayValue.values[r]=eF(e.arrayValue.values[r]);return t}return Object.assign({},e)}function eP(e){return"__max__"===(((e.mapValue||{}).fields||{}).__type__||{}).stringValue}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class eU{constructor(e){this.value=e}static empty(){return new eU({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let t=this.value;for(let r=0;r{if(!t.isImmediateParentOf(i)){let e=this.getFieldsMap(t);this.applyChanges(e,r,n),r={},n=[],t=i.popLast()}e?r[i.lastSegment()]=eF(e):n.push(i.lastSegment())});let i=this.getFieldsMap(t);this.applyChanges(i,r,n)}delete(e){let t=this.field(e.popLast());eM(t)&&t.mapValue.fields&&delete t.mapValue.fields[e.lastSegment()]}isEqual(e){return eA(this.value,e.value)}getFieldsMap(e){let t=this.value;t.mapValue.fields||(t.mapValue={fields:{}});for(let r=0;re[t]=r),r))delete e[n]}clone(){return new eU(eF(this.value))}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class eq{constructor(e,t,r,n,i,s,a){this.key=e,this.documentType=t,this.version=r,this.readTime=n,this.createTime=i,this.data=s,this.documentState=a}static newInvalidDocument(e){return new eq(e,0,M.min(),M.min(),M.min(),eU.empty(),0)}static newFoundDocument(e,t,r,n){return new eq(e,1,t,M.min(),r,n,0)}static newNoDocument(e,t){return new eq(e,2,t,M.min(),M.min(),eU.empty(),0)}static newUnknownDocument(e,t){return new eq(e,3,t,M.min(),M.min(),eU.empty(),2)}convertToFoundDocument(e,t){return this.createTime.isEqual(M.min())&&(2===this.documentType||0===this.documentType)&&(this.createTime=e),this.version=e,this.documentType=1,this.data=t,this.documentState=0,this}convertToNoDocument(e){return this.version=e,this.documentType=2,this.data=eU.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=eU.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=M.min(),this}setReadTime(e){return this.readTime=e,this}get hasLocalMutations(){return 1===this.documentState}get hasCommittedMutations(){return 2===this.documentState}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return 0!==this.documentType}isFoundDocument(){return 1===this.documentType}isNoDocument(){return 2===this.documentType}isUnknownDocument(){return 3===this.documentType}isEqual(e){return e instanceof eq&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.documentType===e.documentType&&this.documentState===e.documentState&&this.data.isEqual(e.data)}mutableCopy(){return new eq(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}}/** + * @license + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class eB{constructor(e,t){this.position=e,this.inclusive=t}}function e$(e,t,r){let n=0;for(let i=0;i":return e>0;case">=":return e>=0;default:return _()}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}}class eG extends eQ{constructor(e,t){super(),this.filters=e,this.op=t,this.ue=null}static create(e,t){return new eG(e,t)}matches(e){return eW(this)?void 0===this.filters.find(t=>!t.matches(e)):void 0!==this.filters.find(t=>t.matches(e))}getFlattenedFilters(){return null!==this.ue||(this.ue=this.filters.reduce((e,t)=>e.concat(t.getFlattenedFilters()),[])),this.ue}getFilters(){return Object.assign([],this.filters)}}function eW(e){return"and"===e.op}function eH(e){for(let t of e.filters)if(t instanceof eG)return!1;return!0}class eY extends ej{constructor(e,t,r){super(e,t,r),this.key=B.fromName(r.referenceValue)}matches(e){let t=B.comparator(e.key,this.key);return this.matchesComparison(t)}}class eJ extends ej{constructor(e,t){super(e,"in",t),this.keys=eZ("in",t)}matches(e){return this.keys.some(t=>t.isEqual(e.key))}}class eX extends ej{constructor(e,t){super(e,"not-in",t),this.keys=eZ("not-in",t)}matches(e){return!this.keys.some(t=>t.isEqual(e.key))}}function eZ(e,t){var r;return((null===(r=t.arrayValue)||void 0===r?void 0:r.values)||[]).map(e=>B.fromName(e.referenceValue))}class e0 extends ej{constructor(e,t){super(e,"array-contains",t)}matches(e){let t=e.data.field(this.field);return eL(t)&&eb(t.arrayValue,this.value)}}class e1 extends ej{constructor(e,t){super(e,"in",t)}matches(e){let t=e.data.field(this.field);return null!==t&&eb(this.value.arrayValue,t)}}class e2 extends ej{constructor(e,t){super(e,"not-in",t)}matches(e){if(eb(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;let t=e.data.field(this.field);return null!==t&&!eb(this.value.arrayValue,t)}}class e4 extends ej{constructor(e,t){super(e,"array-contains-any",t)}matches(e){let t=e.data.field(this.field);return!(!eL(t)||!t.arrayValue.values)&&t.arrayValue.values.some(e=>eb(this.value.arrayValue,e))}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class e9{constructor(e,t=null,r=[],n=[],i=null,s=null,a=null){this.path=e,this.collectionGroup=t,this.orderBy=r,this.filters=n,this.limit=i,this.startAt=s,this.endAt=a,this.ce=null}}function e3(e,t=null,r=[],n=[],i=null,s=null,a=null){return new e9(e,t,r,n,i,s,a)}function e8(e){if(null===e.ce){let t=e.path.canonicalString();null!==e.collectionGroup&&(t+="|cg:"+e.collectionGroup),t+="|f:"+e.filters.map(e=>(function e(t){if(t instanceof ej)return t.field.canonicalString()+t.op.toString()+ek(t.value);if(eH(t)&&eW(t))return t.filters.map(t=>e(t)).join(",");{let r=t.filters.map(t=>e(t)).join(",");return`${t.op}(${r})`}})(e)).join(",")+"|ob:"+e.orderBy.map(e=>e.field.canonicalString()+e.dir).join(","),null==e.limit||(t+="|l:"+e.limit),e.startAt&&(t+="|lb:"+(e.startAt.inclusive?"b:":"a:")+e.startAt.position.map(e=>ek(e)).join(",")),e.endAt&&(t+="|ub:"+(e.endAt.inclusive?"a:":"b:")+e.endAt.position.map(e=>ek(e)).join(",")),e.ce=t}return e.ce}function e5(e,t){if(e.limit!==t.limit||e.orderBy.length!==t.orderBy.length)return!1;for(let i=0;it&&e(n,r.filters[i]),!0):void _()}(e.filters[r],t.filters[r]))return!1;return e.collectionGroup===t.collectionGroup&&!!e.path.isEqual(t.path)&&!!ez(e.startAt,t.startAt)&&ez(e.endAt,t.endAt)}function e6(e){return B.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class e7{constructor(e,t=null,r=[],n=[],i=null,s="F",a=null,o=null){this.path=e,this.collectionGroup=t,this.explicitOrderBy=r,this.filters=n,this.limit=i,this.limitType=s,this.startAt=a,this.endAt=o,this.le=null,this.he=null,this.Pe=null,this.startAt,this.endAt}}function te(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())}function tt(e){return null!==e.collectionGroup}function tr(e){if(null===e.le){let t;e.le=[];let r=new Set;for(let t of e.explicitOrderBy)e.le.push(t),r.add(t.field.canonicalString());let n=e.explicitOrderBy.length>0?e.explicitOrderBy[e.explicitOrderBy.length-1].dir:"asc";(t=new eh(q.comparator),e.filters.forEach(e=>{e.getFlattenedFilters().forEach(e=>{e.isInequality()&&(t=t.add(e.field))})}),t).forEach(t=>{r.has(t.canonicalString())||t.isKeyField()||e.le.push(new eK(t,n))}),r.has(q.keyField().canonicalString())||e.le.push(new eK(q.keyField(),n))}return e.le}function tn(e){return e.he||(e.he=function(e,t){if("F"===e.limitType)return e3(e.path,e.collectionGroup,t,e.filters,e.limit,e.startAt,e.endAt);{t=t.map(e=>{let t="desc"===e.dir?"asc":"desc";return new eK(e.field,t)});let r=e.endAt?new eB(e.endAt.position,e.endAt.inclusive):null,n=e.startAt?new eB(e.startAt.position,e.startAt.inclusive):null;return e3(e.path,e.collectionGroup,t,e.filters,e.limit,r,n)}}(e,tr(e))),e.he}function ti(e,t){let r=e.filters.concat([t]);return new e7(e.path,e.collectionGroup,e.explicitOrderBy.slice(),r,e.limit,e.limitType,e.startAt,e.endAt)}function ts(e,t,r){return new e7(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),t,r,e.startAt,e.endAt)}function ta(e,t){return e5(tn(e),tn(t))&&e.limitType===t.limitType}function to(e){return`${e8(tn(e))}|lt:${e.limitType}`}function tl(e){var t;let r;return`Query(target=${r=(t=tn(e)).path.canonicalString(),null!==t.collectionGroup&&(r+=" collectionGroup="+t.collectionGroup),t.filters.length>0&&(r+=`, filters: [${t.filters.map(e=>(function e(t){return t instanceof ej?`${t.field.canonicalString()} ${t.op} ${ek(t.value)}`:t instanceof eG?t.op.toString()+" {"+t.getFilters().map(e).join(" ,")+"}":"Filter"})(e)).join(", ")}]`),null==t.limit||(r+=", limit: "+t.limit),t.orderBy.length>0&&(r+=`, orderBy: [${t.orderBy.map(e=>`${e.field.canonicalString()} (${e.dir})`).join(", ")}]`),t.startAt&&(r+=", startAt: "+(t.startAt.inclusive?"b:":"a:")+t.startAt.position.map(e=>ek(e)).join(",")),t.endAt&&(r+=", endAt: "+(t.endAt.inclusive?"a:":"b:")+t.endAt.position.map(e=>ek(e)).join(",")),`Target(${r})`}; limitType=${e.limitType})`}function tu(e,t){return t.isFoundDocument()&&function(e,t){let r=t.key.path;return null!==e.collectionGroup?t.key.hasCollectionId(e.collectionGroup)&&e.path.isPrefixOf(r):B.isDocumentKey(e.path)?e.path.isEqual(r):e.path.isImmediateParentOf(r)}(e,t)&&function(e,t){for(let r of tr(e))if(!r.field.isKeyField()&&null===t.data.field(r.field))return!1;return!0}(e,t)&&function(e,t){for(let r of e.filters)if(!r.matches(t))return!1;return!0}(e,t)&&(!e.startAt||!!function(e,t,r){let n=e$(e,t,r);return e.inclusive?n<=0:n<0}(e.startAt,tr(e),t))&&(!e.endAt||!!function(e,t,r){let n=e$(e,t,r);return e.inclusive?n>=0:n>0}(e.endAt,tr(e),t))}function th(e){return(t,r)=>{let n=!1;for(let i of tr(e)){let e=function(e,t,r){let n=e.field.isKeyField()?B.comparator(t.key,r.key):function(e,t,r){let n=t.data.field(e),i=r.data.field(e);return null!==n&&null!==i?eD(n,i):_()}(e.field,t,r);switch(e.dir){case"asc":return n;case"desc":return -1*n;default:return _()}}(i,t,r);if(0!==e)return e;n=n||i.field.isKeyField()}return 0}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class tc{constructor(e,t){this.mapKeyFn=e,this.equalsFn=t,this.inner={},this.innerSize=0}get(e){let t=this.mapKeyFn(e),r=this.inner[t];if(void 0!==r){for(let[t,n]of r)if(this.equalsFn(t,e))return n}}has(e){return void 0!==this.get(e)}set(e,t){let r=this.mapKeyFn(e),n=this.inner[r];if(void 0===n)return this.inner[r]=[[e,t]],void this.innerSize++;for(let r=0;r{for(let[t,n]of r)e(t,n)})}isEmpty(){return ea(this.inner)}size(){return this.innerSize}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let td=new eo(B.comparator),tf=new eo(B.comparator);function tm(...e){let t=tf;for(let r of e)t=t.insert(r.key,r);return t}function tp(e){let t=tf;return e.forEach((e,r)=>t=t.insert(e,r.overlayedDocument)),t}function tg(){return new tc(e=>e.toString(),(e,t)=>e.isEqual(t))}let ty=new eo(B.comparator),tw=new eh(B.comparator);function tv(...e){let t=tw;for(let r of e)t=t.add(r);return t}let t_=new eh(L);/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function tE(e,t){if(e.useProto3Json){if(isNaN(t))return{doubleValue:"NaN"};if(t===1/0)return{doubleValue:"Infinity"};if(t===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:en(t)?"-0":t}}function tT(e){return{integerValue:""+e}}/** + * @license + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class tI{constructor(){this._=void 0}}function tS(e,t){return e instanceof tk?eR(t)||t&&"doubleValue"in t?t:{integerValue:0}:null}class tC extends tI{}class tA extends tI{constructor(e){super(),this.elements=e}}function tb(e,t){let r=tR(t);for(let t of e.elements)r.some(e=>eA(e,t))||r.push(t);return{arrayValue:{values:r}}}class tD extends tI{constructor(e){super(),this.elements=e}}function tN(e,t){let r=tR(t);for(let t of e.elements)r=r.filter(e=>!eA(e,t));return{arrayValue:{values:r}}}class tk extends tI{constructor(e,t){super(),this.serializer=e,this.Ie=t}}function tx(e){return ey(e.integerValue||e.doubleValue)}function tR(e){return eL(e)&&e.arrayValue.values?e.arrayValue.values.slice():[]}class tL{constructor(e,t){this.version=e,this.transformResults=t}}class tV{constructor(e,t){this.updateTime=e,this.exists=t}static none(){return new tV}static exists(e){return new tV(void 0,e)}static updateTime(e){return new tV(e)}get isNone(){return void 0===this.updateTime&&void 0===this.exists}isEqual(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}}function tO(e,t){return void 0!==e.updateTime?t.isFoundDocument()&&t.version.isEqual(e.updateTime):void 0===e.exists||e.exists===t.isFoundDocument()}class tM{}function tF(e,t){if(!e.hasLocalMutations||t&&0===t.fields.length)return null;if(null===t)return e.isNoDocument()?new tQ(e.key,tV.none()):new tq(e.key,e.data,tV.none());{let r=e.data,n=eU.empty(),i=new eh(q.comparator);for(let e of t.fields)if(!i.has(e)){let t=r.field(e);null===t&&e.length>1&&(e=e.popLast(),t=r.field(e)),null===t?n.delete(e):n.set(e,t),i=i.add(e)}return new tB(e.key,n,new ed(i.toArray()),tV.none())}}function tP(e,t,r,n){return e instanceof tq?function(e,t,r,n){if(!tO(e.precondition,t))return r;let i=e.value.clone(),s=tK(e.fieldTransforms,n,t);return i.setAll(s),t.convertToFoundDocument(t.version,i).setHasLocalMutations(),null}(e,t,r,n):e instanceof tB?function(e,t,r,n){if(!tO(e.precondition,t))return r;let i=tK(e.fieldTransforms,n,t),s=t.data;return(s.setAll(t$(e)),s.setAll(i),t.convertToFoundDocument(t.version,s).setHasLocalMutations(),null===r)?null:r.unionWith(e.fieldMask.fields).unionWith(e.fieldTransforms.map(e=>e.field))}(e,t,r,n):tO(e.precondition,t)?(t.convertToNoDocument(t.version).setHasLocalMutations(),null):r}function tU(e,t){var r,n;return e.type===t.type&&!!e.key.isEqual(t.key)&&!!e.precondition.isEqual(t.precondition)&&(r=e.fieldTransforms,n=t.fieldTransforms,!!(void 0===r&&void 0===n||!(!r||!n)&&V(r,n,(e,t)=>{var r,n;return e.field.isEqual(t.field)&&(r=e.transform,n=t.transform,r instanceof tA&&n instanceof tA||r instanceof tD&&n instanceof tD?V(r.elements,n.elements,eA):r instanceof tk&&n instanceof tk?eA(r.Ie,n.Ie):r instanceof tC&&n instanceof tC)})))&&(0===e.type?e.value.isEqual(t.value):1!==e.type||e.data.isEqual(t.data)&&e.fieldMask.isEqual(t.fieldMask))}class tq extends tM{constructor(e,t,r,n=[]){super(),this.key=e,this.value=t,this.precondition=r,this.fieldTransforms=n,this.type=0}getFieldMask(){return null}}class tB extends tM{constructor(e,t,r,n,i=[]){super(),this.key=e,this.data=t,this.fieldMask=r,this.precondition=n,this.fieldTransforms=i,this.type=1}getFieldMask(){return this.fieldMask}}function t$(e){let t=new Map;return e.fieldMask.fields.forEach(r=>{if(!r.isEmpty()){let n=e.data.field(r);t.set(r,n)}}),t}function tz(e,t,r){var n;let i=new Map;e.length===r.length||_();for(let s=0;s{let i=e.get(n.key),s=i.overlayedDocument,a=this.applyToLocalView(s,i.mutatedFields),o=tF(s,a=t.has(n.key)?null:a);null!==o&&r.set(n.key,o),s.isValidDocument()||s.convertToNoDocument(M.min())}),r}keys(){return this.mutations.reduce((e,t)=>e.add(t.key),tv())}isEqual(e){return this.batchId===e.batchId&&V(this.mutations,e.mutations,(e,t)=>tU(e,t))&&V(this.baseMutations,e.baseMutations,(e,t)=>tU(e,t))}}class tW{constructor(e,t,r,n){this.batch=e,this.commitVersion=t,this.mutationResults=r,this.docVersions=n}static from(e,t,r){e.mutations.length===r.length||_();let n=ty,i=e.mutations;for(let e=0;e=8)throw new t2(`Invalid padding: ${t}`);if(r<0||e.length>0&&0===this.hashCount)throw new t2(`Invalid hash count: ${r}`);if(0===e.length&&0!==t)throw new t2(`Invalid padding when bitmap length is 0: ${t}`);this.Te=8*e.length-t,this.Ee=u.z8.fromNumber(this.Te)}de(e,t,r){let n=e.add(t.multiply(u.z8.fromNumber(r)));return 1===n.compare(tX)&&(n=new u.z8([n.getBits(0),n.getBits(1)],0)),n.modulo(this.Ee).toNumber()}Ae(e){return 0!=(this.bitmap[Math.floor(e/8)]&1<n.insert(e)),n}insert(e){if(0===this.Te)return;let[t,r]=t0(tZ(e));for(let e=0;e0&&(this.Se=!0,this.ye=e)}ve(){let e=tv(),t=tv(),r=tv();return this.pe.forEach((n,i)=>{switch(i){case 0:e=e.add(n);break;case 2:t=t.add(n);break;case 1:r=r.add(n);break;default:_()}}),new t9(this.ye,this.we,e,t,r)}Fe(){this.Se=!1,this.pe=rt()}Me(e,t){this.Se=!0,this.pe=this.pe.insert(e,t)}xe(e){this.Se=!0,this.pe=this.pe.remove(e)}Oe(){this.ge+=1}Ne(){this.ge-=1,this.ge>=0||_()}Be(){this.Se=!0,this.we=!0}}class t7{constructor(e){this.Le=e,this.ke=new Map,this.qe=td,this.Qe=re(),this.Ke=new eo(L)}$e(e){for(let t of e.Ve)e.me&&e.me.isFoundDocument()?this.Ue(t,e.me):this.We(t,e.key,e.me);for(let t of e.removedTargetIds)this.We(t,e.key,e.me)}Ge(e){this.forEachTarget(e,t=>{let r=this.ze(t);switch(e.state){case 0:this.je(t)&&r.Ce(e.resumeToken);break;case 1:r.Ne(),r.be||r.Fe(),r.Ce(e.resumeToken);break;case 2:r.Ne(),r.be||this.removeTarget(t);break;case 3:this.je(t)&&(r.Be(),r.Ce(e.resumeToken));break;case 4:this.je(t)&&(this.He(t),r.Ce(e.resumeToken));break;default:_()}})}forEachTarget(e,t){e.targetIds.length>0?e.targetIds.forEach(t):this.ke.forEach((e,r)=>{this.je(r)&&t(r)})}Je(e){let t=e.targetId,r=e.fe.count,n=this.Ye(t);if(n){let i=n.target;if(e6(i)){if(0===r){let e=new B(i.path);this.We(t,e,eq.newNoDocument(e,M.min()))}else 1===r||_()}else{let n=this.Ze(t);if(n!==r){let r=this.Xe(e),i=r?this.et(r,e,n):1;0!==i&&(this.He(t),this.Ke=this.Ke.insert(t,2===i?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch"))}}}}Xe(e){let t,r;let n=e.fe.unchangedNames;if(!n||!n.bits)return null;let{bits:{bitmap:i="",padding:s=0},hashCount:a=0}=n;try{t=ew(i).toUint8Array()}catch(e){if(e instanceof ef)return w("Decoding the base64 bloom filter in existence filter failed ("+e.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw e}try{r=new t1(t,s,a)}catch(e){return w(e instanceof t2?"BloomFilter error: ":"Applying bloom filter failed: ",e),null}return 0===r.Te?null:r}et(e,t,r){return t.fe.count===r-this.rt(e,t.targetId)?0:2}rt(e,t){let r=this.Le.getRemoteKeysForTarget(t),n=0;return r.forEach(r=>{let i=this.Le.nt(),s=`projects/${i.projectId}/databases/${i.database}/documents/${r.path.canonicalString()}`;e.mightContain(s)||(this.We(t,r,null),n++)}),n}it(e){let t=new Map;this.ke.forEach((r,n)=>{let i=this.Ye(n);if(i){if(r.current&&e6(i.target)){let t=new B(i.target.path);null!==this.qe.get(t)||this.st(n,t)||this.We(n,t,eq.newNoDocument(t,e))}r.De&&(t.set(n,r.ve()),r.Fe())}});let r=tv();this.Qe.forEach((e,t)=>{let n=!0;t.forEachWhile(e=>{let t=this.Ye(e);return!t||"TargetPurposeLimboResolution"===t.purpose||(n=!1,!1)}),n&&(r=r.add(e))}),this.qe.forEach((t,r)=>r.setReadTime(e));let n=new t4(e,t,this.Ke,this.qe,r);return this.qe=td,this.Qe=re(),this.Ke=new eo(L),n}Ue(e,t){if(!this.je(e))return;let r=this.st(e,t.key)?2:0;this.ze(e).Me(t.key,r),this.qe=this.qe.insert(t.key,t),this.Qe=this.Qe.insert(t.key,this.ot(t.key).add(e))}We(e,t,r){if(!this.je(e))return;let n=this.ze(e);this.st(e,t)?n.Me(t,1):n.xe(t),this.Qe=this.Qe.insert(t,this.ot(t).delete(e)),r&&(this.qe=this.qe.insert(t,r))}removeTarget(e){this.ke.delete(e)}Ze(e){let t=this.ze(e).ve();return this.Le.getRemoteKeysForTarget(e).size+t.addedDocuments.size-t.removedDocuments.size}Oe(e){this.ze(e).Oe()}ze(e){let t=this.ke.get(e);return t||(t=new t6,this.ke.set(e,t)),t}ot(e){let t=this.Qe.get(e);return t||(t=new eh(L),this.Qe=this.Qe.insert(e,t)),t}je(e){let t=null!==this.Ye(e);return t||g("WatchChangeAggregator","Detected inactive target",e),t}Ye(e){let t=this.ke.get(e);return t&&t.be?null:this.Le._t(e)}He(e){this.ke.set(e,new t6),this.Le.getRemoteKeysForTarget(e).forEach(t=>{this.We(e,t,null)})}st(e,t){return this.Le.getRemoteKeysForTarget(e).has(t)}}function re(){return new eo(B.comparator)}function rt(){return new eo(B.comparator)}let rr={asc:"ASCENDING",desc:"DESCENDING"},rn={"<":"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"},ri={and:"AND",or:"OR"};class rs{constructor(e,t){this.databaseId=e,this.useProto3Json=t}}function ra(e,t){return e.useProto3Json||null==t?t:{value:t}}function ro(e,t){return e.useProto3Json?`${new Date(1e3*t.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+t.nanoseconds).slice(-9)}Z`:{seconds:""+t.seconds,nanos:t.nanoseconds}}function rl(e,t){return e.useProto3Json?t.toBase64():t.toUint8Array()}function ru(e){return e||_(),M.fromTimestamp(function(e){let t=eg(e);return new O(t.seconds,t.nanos)}(e))}function rh(e,t){return rc(e,t).canonicalString()}function rc(e,t){let r=new P(["projects",e.projectId,"databases",e.database]).child("documents");return void 0===t?r:r.child(t)}function rd(e){let t=P.fromString(e);return rE(t)||_(),t}function rf(e,t){return rh(e.databaseId,t.path)}function rm(e,t){let r=rd(t);if(r.get(1)!==e.databaseId.projectId)throw new T(E.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+r.get(1)+" vs "+e.databaseId.projectId);if(r.get(3)!==e.databaseId.database)throw new T(E.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+r.get(3)+" vs "+e.databaseId.database);return new B(ry(r))}function rp(e,t){return rh(e.databaseId,t)}function rg(e){return new P(["projects",e.databaseId.projectId,"databases",e.databaseId.database]).canonicalString()}function ry(e){return e.length>4&&"documents"===e.get(4)||_(),e.popFirst(5)}function rw(e,t,r){return{name:rf(e,t),fields:r.value.mapValue.fields}}function rv(e){return{fieldPath:e.canonicalString()}}function r_(e){return q.fromServerFormat(e.fieldPath)}function rE(e){return e.length>=4&&"projects"===e.get(0)&&"databases"===e.get(2)}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rT{constructor(e,t,r,n,i=M.min(),s=M.min(),a=em.EMPTY_BYTE_STRING,o=null){this.target=e,this.targetId=t,this.purpose=r,this.sequenceNumber=n,this.snapshotVersion=i,this.lastLimboFreeSnapshotVersion=s,this.resumeToken=a,this.expectedCount=o}withSequenceNumber(e){return new rT(this.target,this.targetId,this.purpose,e,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(e,t){return new rT(this.target,this.targetId,this.purpose,this.sequenceNumber,t,this.lastLimboFreeSnapshotVersion,e,null)}withExpectedCount(e){return new rT(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,e)}withLastLimboFreeSnapshotVersion(e){return new rT(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,e,this.resumeToken,this.expectedCount)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rI{constructor(e){this.ct=e}}/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rS{constructor(){}Pt(e,t){this.It(e,t),t.Tt()}It(e,t){if("nullValue"in e)this.Et(t,5);else if("booleanValue"in e)this.Et(t,10),t.dt(e.booleanValue?1:0);else if("integerValue"in e)this.Et(t,15),t.dt(ey(e.integerValue));else if("doubleValue"in e){let r=ey(e.doubleValue);isNaN(r)?this.Et(t,13):(this.Et(t,15),en(r)?t.dt(0):t.dt(r))}else if("timestampValue"in e){let r=e.timestampValue;this.Et(t,20),"string"==typeof r?t.At(r):(t.At(`${r.seconds||""}`),t.dt(r.nanos||0))}else if("stringValue"in e)this.Rt(e.stringValue,t),this.Vt(t);else if("bytesValue"in e)this.Et(t,30),t.ft(ew(e.bytesValue)),this.Vt(t);else if("referenceValue"in e)this.gt(e.referenceValue,t);else if("geoPointValue"in e){let r=e.geoPointValue;this.Et(t,45),t.dt(r.latitude||0),t.dt(r.longitude||0)}else"mapValue"in e?eP(e)?this.Et(t,Number.MAX_SAFE_INTEGER):(this.yt(e.mapValue,t),this.Vt(t)):"arrayValue"in e?(this.wt(e.arrayValue,t),this.Vt(t)):_()}Rt(e,t){this.Et(t,25),this.St(e,t)}St(e,t){t.At(e)}yt(e,t){let r=e.fields||{};for(let e of(this.Et(t,55),Object.keys(r)))this.Rt(e,t),this.It(r[e],t)}wt(e,t){let r=e.values||[];for(let e of(this.Et(t,50),r))this.It(e,t)}gt(e,t){this.Et(t,37),B.fromName(e).path.forEach(e=>{this.Et(t,60),this.St(e,t)})}Et(e,t){e.dt(t)}Vt(e){e.dt(2)}}rS.bt=new rS;/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rC{constructor(){this._n=new rA}addToCollectionParentIndex(e,t){return this._n.add(t),j.resolve()}getCollectionParents(e,t){return j.resolve(this._n.getEntries(t))}addFieldIndex(e,t){return j.resolve()}deleteFieldIndex(e,t){return j.resolve()}deleteAllFieldIndexes(e){return j.resolve()}createTargetIndexes(e,t){return j.resolve()}getDocumentsMatchingTarget(e,t){return j.resolve(null)}getIndexType(e,t){return j.resolve(0)}getFieldIndexes(e,t){return j.resolve([])}getNextCollectionGroupToUpdate(e){return j.resolve(null)}getMinOffset(e,t){return j.resolve(z.min())}getMinOffsetFromCollectionGroup(e,t){return j.resolve(z.min())}updateCollectionGroup(e,t,r){return j.resolve()}updateIndexEntries(e,t){return j.resolve()}}class rA{constructor(){this.index={}}add(e){let t=e.lastSegment(),r=e.popLast(),n=this.index[t]||new eh(P.comparator),i=!n.has(r);return this.index[t]=n.add(r),i}has(e){let t=e.lastSegment(),r=e.popLast(),n=this.index[t];return n&&n.has(r)}getEntries(e){return(this.index[e]||new eh(P.comparator)).toArray()}}new Uint8Array(0);class rb{constructor(e,t,r){this.cacheSizeCollectionThreshold=e,this.percentileToCollect=t,this.maximumSequenceNumbersToCollect=r}static withCacheSize(e){return new rb(e,rb.DEFAULT_COLLECTION_PERCENTILE,rb.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */rb.DEFAULT_COLLECTION_PERCENTILE=10,rb.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,rb.DEFAULT=new rb(41943040,rb.DEFAULT_COLLECTION_PERCENTILE,rb.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),rb.DISABLED=new rb(-1,0,0);/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rD{constructor(e){this.On=e}next(){return this.On+=2,this.On}static Nn(){return new rD(0)}static Bn(){return new rD(-1)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rN{constructor(){this.changes=new tc(e=>e.toString(),(e,t)=>e.isEqual(t)),this.changesApplied=!1}addEntry(e){this.assertNotApplied(),this.changes.set(e.key,e)}removeEntry(e,t){this.assertNotApplied(),this.changes.set(e,eq.newInvalidDocument(e).setReadTime(t))}getEntry(e,t){this.assertNotApplied();let r=this.changes.get(t);return void 0!==r?j.resolve(r):this.getFromCache(e,t)}getEntries(e,t){return this.getAllFromCache(e,t)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}assertNotApplied(){}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *//** + * @license + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rk{constructor(e,t){this.overlayedDocument=e,this.mutatedFields=t}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rx{constructor(e,t,r,n){this.remoteDocumentCache=e,this.mutationQueue=t,this.documentOverlayCache=r,this.indexManager=n}getDocument(e,t){let r=null;return this.documentOverlayCache.getOverlay(e,t).next(n=>(r=n,this.remoteDocumentCache.getEntry(e,t))).next(e=>(null!==r&&tP(r.mutation,e,ed.empty(),O.now()),e))}getDocuments(e,t){return this.remoteDocumentCache.getEntries(e,t).next(t=>this.getLocalViewOfDocuments(e,t,tv()).next(()=>t))}getLocalViewOfDocuments(e,t,r=tv()){let n=tg();return this.populateOverlays(e,n,t).next(()=>this.computeViews(e,t,n,r).next(e=>{let t=tm();return e.forEach((e,r)=>{t=t.insert(e,r.overlayedDocument)}),t}))}getOverlayedDocuments(e,t){let r=tg();return this.populateOverlays(e,r,t).next(()=>this.computeViews(e,t,r,tv()))}populateOverlays(e,t,r){let n=[];return r.forEach(e=>{t.has(e)||n.push(e)}),this.documentOverlayCache.getOverlays(e,n).next(e=>{e.forEach((e,r)=>{t.set(e,r)})})}computeViews(e,t,r,n){let i=td,s=tg(),a=tg();return t.forEach((e,t)=>{let a=r.get(t.key);n.has(t.key)&&(void 0===a||a.mutation instanceof tB)?i=i.insert(t.key,t):void 0!==a?(s.set(t.key,a.mutation.getFieldMask()),tP(a.mutation,t,a.mutation.getFieldMask(),O.now())):s.set(t.key,ed.empty())}),this.recalculateAndSaveOverlays(e,i).next(e=>(e.forEach((e,t)=>s.set(e,t)),t.forEach((e,t)=>{var r;return a.set(e,new rk(t,null!==(r=s.get(e))&&void 0!==r?r:null))}),a))}recalculateAndSaveOverlays(e,t){let r=tg(),n=new eo((e,t)=>e-t),i=tv();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,t).next(e=>{for(let i of e)i.keys().forEach(e=>{let s=t.get(e);if(null===s)return;let a=r.get(e)||ed.empty();a=i.applyToLocalView(s,a),r.set(e,a);let o=(n.get(i.batchId)||tv()).add(e);n=n.insert(i.batchId,o)})}).next(()=>{let s=[],a=n.getReverseIterator();for(;a.hasNext();){let n=a.getNext(),o=n.key,l=n.value,u=tg();l.forEach(e=>{if(!i.has(e)){let n=tF(t.get(e),r.get(e));null!==n&&u.set(e,n),i=i.add(e)}}),s.push(this.documentOverlayCache.saveOverlays(e,o,u))}return j.waitFor(s)}).next(()=>r)}recalculateAndSaveOverlaysForDocumentKeys(e,t){return this.remoteDocumentCache.getEntries(e,t).next(t=>this.recalculateAndSaveOverlays(e,t))}getDocumentsMatchingQuery(e,t,r,n){return B.isDocumentKey(t.path)&&null===t.collectionGroup&&0===t.filters.length?this.getDocumentsMatchingDocumentQuery(e,t.path):tt(t)?this.getDocumentsMatchingCollectionGroupQuery(e,t,r,n):this.getDocumentsMatchingCollectionQuery(e,t,r,n)}getNextDocuments(e,t,r,n){return this.remoteDocumentCache.getAllFromCollectionGroup(e,t,r,n).next(i=>{let s=n-i.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,t,r.largestBatchId,n-i.size):j.resolve(tg()),a=-1,o=i;return s.next(t=>j.forEach(t,(t,r)=>(a{o=o.insert(t,e)}))).next(()=>this.populateOverlays(e,t,i)).next(()=>this.computeViews(e,o,t,tv())).next(e=>({batchId:a,changes:tp(e)})))})}getDocumentsMatchingDocumentQuery(e,t){return this.getDocument(e,new B(t)).next(e=>{let t=tm();return e.isFoundDocument()&&(t=t.insert(e.key,e)),t})}getDocumentsMatchingCollectionGroupQuery(e,t,r,n){let i=t.collectionGroup,s=tm();return this.indexManager.getCollectionParents(e,i).next(a=>j.forEach(a,a=>{let o=new e7(a.child(i),null,t.explicitOrderBy.slice(),t.filters.slice(),t.limit,t.limitType,t.startAt,t.endAt);return this.getDocumentsMatchingCollectionQuery(e,o,r,n).next(e=>{e.forEach((e,t)=>{s=s.insert(e,t)})})}).next(()=>s))}getDocumentsMatchingCollectionQuery(e,t,r,n){let i;return this.documentOverlayCache.getOverlaysForCollection(e,t.path,r.largestBatchId).next(s=>(i=s,this.remoteDocumentCache.getDocumentsMatchingQuery(e,t,r,i,n))).next(e=>{i.forEach((t,r)=>{let n=r.getKey();null===e.get(n)&&(e=e.insert(n,eq.newInvalidDocument(n)))});let r=tm();return e.forEach((e,n)=>{let s=i.get(e);void 0!==s&&tP(s.mutation,n,ed.empty(),O.now()),tu(t,n)&&(r=r.insert(e,n))}),r})}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rR{constructor(e){this.serializer=e,this.cr=new Map,this.lr=new Map}getBundleMetadata(e,t){return j.resolve(this.cr.get(t))}saveBundleMetadata(e,t){return this.cr.set(t.id,{id:t.id,version:t.version,createTime:ru(t.createTime)}),j.resolve()}getNamedQuery(e,t){return j.resolve(this.lr.get(t))}saveNamedQuery(e,t){return this.lr.set(t.name,{name:t.name,query:function(e){let t=function(e){var t;let r,n=function(e){let t=rd(e);return 4===t.length?P.emptyPath():ry(t)}(e.parent),i=e.structuredQuery,s=i.from?i.from.length:0,a=null;if(s>0){1===s||_();let e=i.from[0];e.allDescendants?a=e.collectionId:n=n.child(e.collectionId)}let o=[];i.where&&(o=function(e){var t;let r=function e(t){return void 0!==t.unaryFilter?function(e){switch(e.unaryFilter.op){case"IS_NAN":let t=r_(e.unaryFilter.field);return ej.create(t,"==",{doubleValue:NaN});case"IS_NULL":let r=r_(e.unaryFilter.field);return ej.create(r,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":let n=r_(e.unaryFilter.field);return ej.create(n,"!=",{doubleValue:NaN});case"IS_NOT_NULL":let i=r_(e.unaryFilter.field);return ej.create(i,"!=",{nullValue:"NULL_VALUE"});default:return _()}}(t):void 0!==t.fieldFilter?ej.create(r_(t.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 _()}}(t.fieldFilter.op),t.fieldFilter.value):void 0!==t.compositeFilter?eG.create(t.compositeFilter.filters.map(t=>e(t)),function(e){switch(e){case"AND":return"and";case"OR":return"or";default:return _()}}(t.compositeFilter.op)):_()}(e);return r instanceof eG&&eH(t=r)&&eW(t)?r.getFilters():[r]}(i.where));let l=[];i.orderBy&&(l=i.orderBy.map(e=>new eK(r_(e.field),function(e){switch(e){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(e.direction))));let u=null;i.limit&&(u=null==(r="object"==typeof(t=i.limit)?t.value:t)?null:r);let h=null;i.startAt&&(h=function(e){let t=!!e.before;return new eB(e.values||[],t)}(i.startAt));let c=null;return i.endAt&&(c=function(e){let t=!e.before;return new eB(e.values||[],t)}(i.endAt)),new e7(n,a,l,o,u,"F",h,c)}({parent:e.parent,structuredQuery:e.structuredQuery});return"LAST"===e.limitType?ts(t,t.limit,"L"):t}(t.bundledQuery),readTime:ru(t.readTime)}),j.resolve()}}/** + * @license + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rL{constructor(){this.overlays=new eo(B.comparator),this.hr=new Map}getOverlay(e,t){return j.resolve(this.overlays.get(t))}getOverlays(e,t){let r=tg();return j.forEach(t,t=>this.getOverlay(e,t).next(e=>{null!==e&&r.set(t,e)})).next(()=>r)}saveOverlays(e,t,r){return r.forEach((r,n)=>{this.ht(e,t,n)}),j.resolve()}removeOverlaysForBatchId(e,t,r){let n=this.hr.get(r);return void 0!==n&&(n.forEach(e=>this.overlays=this.overlays.remove(e)),this.hr.delete(r)),j.resolve()}getOverlaysForCollection(e,t,r){let n=tg(),i=t.length+1,s=new B(t.child("")),a=this.overlays.getIteratorFrom(s);for(;a.hasNext();){let e=a.getNext().value,s=e.getKey();if(!t.isPrefixOf(s.path))break;s.path.length===i&&e.largestBatchId>r&&n.set(e.getKey(),e)}return j.resolve(n)}getOverlaysForCollectionGroup(e,t,r,n){let i=new eo((e,t)=>e-t),s=this.overlays.getIterator();for(;s.hasNext();){let e=s.getNext().value;if(e.getKey().getCollectionGroup()===t&&e.largestBatchId>r){let t=i.get(e.largestBatchId);null===t&&(t=tg(),i=i.insert(e.largestBatchId,t)),t.set(e.getKey(),e)}}let a=tg(),o=i.getIterator();for(;o.hasNext()&&(o.getNext().value.forEach((e,t)=>a.set(e,t)),!(a.size()>=n)););return j.resolve(a)}ht(e,t,r){let n=this.overlays.get(r.key);if(null!==n){let e=this.hr.get(n.largestBatchId).delete(r.key);this.hr.set(n.largestBatchId,e)}this.overlays=this.overlays.insert(r.key,new tH(t,r));let i=this.hr.get(t);void 0===i&&(i=tv(),this.hr.set(t,i)),this.hr.set(t,i.add(r.key))}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rV{constructor(){this.Pr=new eh(rO.Ir),this.Tr=new eh(rO.Er)}isEmpty(){return this.Pr.isEmpty()}addReference(e,t){let r=new rO(e,t);this.Pr=this.Pr.add(r),this.Tr=this.Tr.add(r)}dr(e,t){e.forEach(e=>this.addReference(e,t))}removeReference(e,t){this.Ar(new rO(e,t))}Rr(e,t){e.forEach(e=>this.removeReference(e,t))}Vr(e){let t=new B(new P([])),r=new rO(t,e),n=new rO(t,e+1),i=[];return this.Tr.forEachInRange([r,n],e=>{this.Ar(e),i.push(e.key)}),i}mr(){this.Pr.forEach(e=>this.Ar(e))}Ar(e){this.Pr=this.Pr.delete(e),this.Tr=this.Tr.delete(e)}gr(e){let t=new B(new P([])),r=new rO(t,e),n=new rO(t,e+1),i=tv();return this.Tr.forEachInRange([r,n],e=>{i=i.add(e.key)}),i}containsKey(e){let t=new rO(e,0),r=this.Pr.firstAfterOrEqual(t);return null!==r&&e.isEqual(r.key)}}class rO{constructor(e,t){this.key=e,this.pr=t}static Ir(e,t){return B.comparator(e.key,t.key)||L(e.pr,t.pr)}static Er(e,t){return L(e.pr,t.pr)||B.comparator(e.key,t.key)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rM{constructor(e,t){this.indexManager=e,this.referenceDelegate=t,this.mutationQueue=[],this.yr=1,this.wr=new eh(rO.Ir)}checkEmpty(e){return j.resolve(0===this.mutationQueue.length)}addMutationBatch(e,t,r,n){let i=this.yr;this.yr++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];let s=new tG(i,t,r,n);for(let t of(this.mutationQueue.push(s),n))this.wr=this.wr.add(new rO(t.key,i)),this.indexManager.addToCollectionParentIndex(e,t.key.path.popLast());return j.resolve(s)}lookupMutationBatch(e,t){return j.resolve(this.Sr(t))}getNextMutationBatchAfterBatchId(e,t){let r=this.br(t+1),n=r<0?0:r;return j.resolve(this.mutationQueue.length>n?this.mutationQueue[n]:null)}getHighestUnacknowledgedBatchId(){return j.resolve(0===this.mutationQueue.length?-1:this.yr-1)}getAllMutationBatches(e){return j.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,t){let r=new rO(t,0),n=new rO(t,Number.POSITIVE_INFINITY),i=[];return this.wr.forEachInRange([r,n],e=>{let t=this.Sr(e.pr);i.push(t)}),j.resolve(i)}getAllMutationBatchesAffectingDocumentKeys(e,t){let r=new eh(L);return t.forEach(e=>{let t=new rO(e,0),n=new rO(e,Number.POSITIVE_INFINITY);this.wr.forEachInRange([t,n],e=>{r=r.add(e.pr)})}),j.resolve(this.Dr(r))}getAllMutationBatchesAffectingQuery(e,t){let r=t.path,n=r.length+1,i=r;B.isDocumentKey(i)||(i=i.child(""));let s=new rO(new B(i),0),a=new eh(L);return this.wr.forEachWhile(e=>{let t=e.key.path;return!!r.isPrefixOf(t)&&(t.length===n&&(a=a.add(e.pr)),!0)},s),j.resolve(this.Dr(a))}Dr(e){let t=[];return e.forEach(e=>{let r=this.Sr(e);null!==r&&t.push(r)}),t}removeMutationBatch(e,t){0===this.Cr(t.batchId,"removed")||_(),this.mutationQueue.shift();let r=this.wr;return j.forEach(t.mutations,n=>{let i=new rO(n.key,t.batchId);return r=r.delete(i),this.referenceDelegate.markPotentiallyOrphaned(e,n.key)}).next(()=>{this.wr=r})}Mn(e){}containsKey(e,t){let r=new rO(t,0),n=this.wr.firstAfterOrEqual(r);return j.resolve(t.isEqual(n&&n.key))}performConsistencyCheck(e){return this.mutationQueue.length,j.resolve()}Cr(e,t){return this.br(e)}br(e){return 0===this.mutationQueue.length?0:e-this.mutationQueue[0].batchId}Sr(e){let t=this.br(e);return t<0||t>=this.mutationQueue.length?null:this.mutationQueue[t]}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rF{constructor(e){this.vr=e,this.docs=new eo(B.comparator),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,t){let r=t.key,n=this.docs.get(r),i=n?n.size:0,s=this.vr(t);return this.docs=this.docs.insert(r,{document:t.mutableCopy(),size:s}),this.size+=s-i,this.indexManager.addToCollectionParentIndex(e,r.path.popLast())}removeEntry(e){let t=this.docs.get(e);t&&(this.docs=this.docs.remove(e),this.size-=t.size)}getEntry(e,t){let r=this.docs.get(t);return j.resolve(r?r.document.mutableCopy():eq.newInvalidDocument(t))}getEntries(e,t){let r=td;return t.forEach(e=>{let t=this.docs.get(e);r=r.insert(e,t?t.document.mutableCopy():eq.newInvalidDocument(e))}),j.resolve(r)}getDocumentsMatchingQuery(e,t,r,n){let i=td,s=t.path,a=new B(s.child("")),o=this.docs.getIteratorFrom(a);for(;o.hasNext();){let{key:e,value:{document:a}}=o.getNext();if(!s.isPrefixOf(e.path))break;e.path.length>s.length+1||0>=function(e,t){let r=e.readTime.compareTo(t.readTime);return 0!==r?r:0!==(r=B.comparator(e.documentKey,t.documentKey))?r:L(e.largestBatchId,t.largestBatchId)}(new z(a.readTime,a.key,-1),r)||(n.has(a.key)||tu(t,a))&&(i=i.insert(a.key,a.mutableCopy()))}return j.resolve(i)}getAllFromCollectionGroup(e,t,r,n){_()}Fr(e,t){return j.forEach(this.docs,e=>t(e))}newChangeBuffer(e){return new rP(this)}getSize(e){return j.resolve(this.size)}}class rP extends rN{constructor(e){super(),this.ar=e}applyChanges(e){let t=[];return this.changes.forEach((r,n)=>{n.isValidDocument()?t.push(this.ar.addEntry(e,n)):this.ar.removeEntry(r)}),j.waitFor(t)}getFromCache(e,t){return this.ar.getEntry(e,t)}getAllFromCache(e,t){return this.ar.getEntries(e,t)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rU{constructor(e){this.persistence=e,this.Mr=new tc(e=>e8(e),e5),this.lastRemoteSnapshotVersion=M.min(),this.highestTargetId=0,this.Or=0,this.Nr=new rV,this.targetCount=0,this.Br=rD.Nn()}forEachTarget(e,t){return this.Mr.forEach((e,r)=>t(r)),j.resolve()}getLastRemoteSnapshotVersion(e){return j.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return j.resolve(this.Or)}allocateTargetId(e){return this.highestTargetId=this.Br.next(),j.resolve(this.highestTargetId)}setTargetsMetadata(e,t,r){return r&&(this.lastRemoteSnapshotVersion=r),t>this.Or&&(this.Or=t),j.resolve()}qn(e){this.Mr.set(e.target,e);let t=e.targetId;t>this.highestTargetId&&(this.Br=new rD(t),this.highestTargetId=t),e.sequenceNumber>this.Or&&(this.Or=e.sequenceNumber)}addTargetData(e,t){return this.qn(t),this.targetCount+=1,j.resolve()}updateTargetData(e,t){return this.qn(t),j.resolve()}removeTargetData(e,t){return this.Mr.delete(t.target),this.Nr.Vr(t.targetId),this.targetCount-=1,j.resolve()}removeTargets(e,t,r){let n=0,i=[];return this.Mr.forEach((s,a)=>{a.sequenceNumber<=t&&null===r.get(a.targetId)&&(this.Mr.delete(s),i.push(this.removeMatchingKeysForTargetId(e,a.targetId)),n++)}),j.waitFor(i).next(()=>n)}getTargetCount(e){return j.resolve(this.targetCount)}getTargetData(e,t){let r=this.Mr.get(t)||null;return j.resolve(r)}addMatchingKeys(e,t,r){return this.Nr.dr(t,r),j.resolve()}removeMatchingKeys(e,t,r){this.Nr.Rr(t,r);let n=this.persistence.referenceDelegate,i=[];return n&&t.forEach(t=>{i.push(n.markPotentiallyOrphaned(e,t))}),j.waitFor(i)}removeMatchingKeysForTargetId(e,t){return this.Nr.Vr(t),j.resolve()}getMatchingKeysForTargetId(e,t){let r=this.Nr.gr(t);return j.resolve(r)}containsKey(e,t){return j.resolve(this.Nr.containsKey(t))}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rq{constructor(e,t){this.Lr={},this.overlays={},this.kr=new er(0),this.qr=!1,this.qr=!0,this.referenceDelegate=e(this),this.Qr=new rU(this),this.indexManager=new rC,this.remoteDocumentCache=new rF(e=>this.referenceDelegate.Kr(e)),this.serializer=new rI(t),this.$r=new rR(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.qr=!1,Promise.resolve()}get started(){return this.qr}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let t=this.overlays[e.toKey()];return t||(t=new rL,this.overlays[e.toKey()]=t),t}getMutationQueue(e,t){let r=this.Lr[e.toKey()];return r||(r=new rM(t,this.referenceDelegate),this.Lr[e.toKey()]=r),r}getTargetCache(){return this.Qr}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.$r}runTransaction(e,t,r){g("MemoryPersistence","Starting transaction:",e);let n=new rB(this.kr.next());return this.referenceDelegate.Ur(),r(n).next(e=>this.referenceDelegate.Wr(n).next(()=>e)).toPromise().then(e=>(n.raiseOnCommittedEvent(),e))}Gr(e,t){return j.or(Object.values(this.Lr).map(r=>()=>r.containsKey(e,t)))}}class rB extends K{constructor(e){super(),this.currentSequenceNumber=e}}class r${constructor(e){this.persistence=e,this.zr=new rV,this.jr=null}static Hr(e){return new r$(e)}get Jr(){if(this.jr)return this.jr;throw _()}addReference(e,t,r){return this.zr.addReference(r,t),this.Jr.delete(r.toString()),j.resolve()}removeReference(e,t,r){return this.zr.removeReference(r,t),this.Jr.add(r.toString()),j.resolve()}markPotentiallyOrphaned(e,t){return this.Jr.add(t.toString()),j.resolve()}removeTarget(e,t){this.zr.Vr(t.targetId).forEach(e=>this.Jr.add(e.toString()));let r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(e,t.targetId).next(e=>{e.forEach(e=>this.Jr.add(e.toString()))}).next(()=>r.removeTargetData(e,t))}Ur(){this.jr=new Set}Wr(e){let t=this.persistence.getRemoteDocumentCache().newChangeBuffer();return j.forEach(this.Jr,r=>{let n=B.fromPath(r);return this.Yr(e,n).next(e=>{e||t.removeEntry(n,M.min())})}).next(()=>(this.jr=null,t.apply(e)))}updateLimboDocument(e,t){return this.Yr(e,t).next(e=>{e?this.Jr.delete(t.toString()):this.Jr.add(t.toString())})}Kr(e){return 0}Yr(e,t){return j.or([()=>j.resolve(this.zr.containsKey(t)),()=>this.persistence.getTargetCache().containsKey(e,t),()=>this.persistence.Gr(e,t)])}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rz{constructor(e,t,r,n){this.targetId=e,this.fromCache=t,this.qi=r,this.Qi=n}static Ki(e,t){let r=tv(),n=tv();for(let e of t.docChanges)switch(e.type){case 0:r=r.add(e.doc.key);break;case 1:n=n.add(e.doc.key)}return new rz(e,t.fromCache,r,n)}}/** + * @license + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rK{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(e){this._documentReadCount+=e}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rQ{constructor(){this.$i=!1,this.Ui=!1,this.Wi=100,this.Gi=(0,l.G6)()?8:W.v((0,l.z$)())>0?6:4}initialize(e,t){this.zi=e,this.indexManager=t,this.$i=!0}getDocumentsMatchingQuery(e,t,r,n){let i={result:null};return this.ji(e,t).next(e=>{i.result=e}).next(()=>{if(!i.result)return this.Hi(e,t,n,r).next(e=>{i.result=e})}).next(()=>{if(i.result)return;let r=new rK;return this.Ji(e,t,r).next(n=>{if(i.result=n,this.Ui)return this.Yi(e,t,r,n.size)})}).next(()=>i.result)}Yi(e,t,r,n){return r.documentReadCountthis.Gi*n?(p()<=o.in.DEBUG&&g("QueryEngine","The SDK decides to create cache indexes for query:",tl(t),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(e,tn(t))):j.resolve())}ji(e,t){if(te(t))return j.resolve(null);let r=tn(t);return this.indexManager.getIndexType(e,r).next(n=>0===n?null:(null!==t.limit&&1===n&&(r=tn(t=ts(t,null,"F"))),this.indexManager.getDocumentsMatchingTarget(e,r).next(n=>{let i=tv(...n);return this.zi.getDocuments(e,i).next(n=>this.indexManager.getMinOffset(e,r).next(r=>{let s=this.Zi(t,n);return this.Xi(t,s,i,r.readTime)?this.ji(e,ts(t,null,"F")):this.es(e,s,t,r)}))})))}Hi(e,t,r,n){return te(t)||n.isEqual(M.min())?j.resolve(null):this.zi.getDocuments(e,r).next(i=>{let s=this.Zi(t,i);return this.Xi(t,s,r,n)?j.resolve(null):(p()<=o.in.DEBUG&&g("QueryEngine","Re-using previous result from %s to execute query: %s",n.toString(),tl(t)),this.es(e,s,t,function(e,t){let r=e.toTimestamp().seconds,n=e.toTimestamp().nanoseconds+1;return new z(M.fromTimestamp(1e9===n?new O(r+1,0):new O(r,n)),B.empty(),-1)}(n,0)).next(e=>e))})}Zi(e,t){let r=new eh(th(e));return t.forEach((t,n)=>{tu(e,n)&&(r=r.add(n))}),r}Xi(e,t,r,n){if(null===e.limit)return!1;if(r.size!==t.size)return!0;let i="F"===e.limitType?t.last():t.first();return!!i&&(i.hasPendingWrites||i.version.compareTo(n)>0)}Ji(e,t,r){return p()<=o.in.DEBUG&&g("QueryEngine","Using full collection scan to execute query:",tl(t)),this.zi.getDocumentsMatchingQuery(e,t,z.min(),r)}es(e,t,r,n){return this.zi.getDocumentsMatchingQuery(e,r,n).next(e=>(t.forEach(t=>{e=e.insert(t.key,t)}),e))}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rj{constructor(e,t,r,n){this.persistence=e,this.ts=t,this.serializer=n,this.ns=new eo(L),this.rs=new tc(e=>e8(e),e5),this.ss=new Map,this.os=e.getRemoteDocumentCache(),this.Qr=e.getTargetCache(),this.$r=e.getBundleCache(),this._s(r)}_s(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new rx(this.os,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.os.setIndexManager(this.indexManager),this.ts.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",t=>e.collect(t,this.ns))}}async function rG(e,t){return await e.persistence.runTransaction("Handle user change","readonly",r=>{let n;return e.mutationQueue.getAllMutationBatches(r).next(i=>(n=i,e._s(t),e.mutationQueue.getAllMutationBatches(r))).next(t=>{let i=[],s=[],a=tv();for(let e of n)for(let t of(i.push(e.batchId),e.mutations))a=a.add(t.key);for(let e of t)for(let t of(s.push(e.batchId),e.mutations))a=a.add(t.key);return e.localDocuments.getDocuments(r,a).next(e=>({us:e,removedBatchIds:i,addedBatchIds:s}))})})}function rW(e){return e.persistence.runTransaction("Get last remote snapshot version","readonly",t=>e.Qr.getLastRemoteSnapshotVersion(t))}async function rH(e,t,r){let n=e.ns.get(t);try{r||await e.persistence.runTransaction("Release target",r?"readwrite":"readwrite-primary",t=>e.persistence.referenceDelegate.removeTarget(t,n))}catch(e){if(!J(e))throw e;g("LocalStore",`Failed to update sequence numbers for target ${t}: ${e}`)}e.ns=e.ns.remove(t),e.rs.delete(n.target)}function rY(e,t,r){let n=M.min(),i=tv();return e.persistence.runTransaction("Execute query","readwrite",s=>(function(e,t,r){let n=e.rs.get(r);return void 0!==n?j.resolve(e.ns.get(n)):e.Qr.getTargetData(t,r)})(e,s,tn(t)).next(t=>{if(t)return n=t.lastLimboFreeSnapshotVersion,e.Qr.getMatchingKeysForTargetId(s,t.targetId).next(e=>{i=e})}).next(()=>e.ts.getDocumentsMatchingQuery(s,t,r?n:M.min(),r?i:tv())).next(r=>{var n;let s;return n=t.collectionGroup||(t.path.length%2==1?t.path.lastSegment():t.path.get(t.path.length-2)),s=e.ss.get(n)||M.min(),r.forEach((e,t)=>{t.readTime.compareTo(s)>0&&(s=t.readTime)}),e.ss.set(n,s),{documents:r,hs:i}}))}class rJ{constructor(){this.activeTargetIds=t_}As(e){this.activeTargetIds=this.activeTargetIds.add(e)}Rs(e){this.activeTargetIds=this.activeTargetIds.delete(e)}ds(){return JSON.stringify({activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()})}}class rX{constructor(){this.no=new rJ,this.ro={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,t,r){}addLocalQueryTarget(e){return this.no.As(e),this.ro[e]||"not-current"}updateQueryState(e,t,r){this.ro[e]=t}removeLocalQueryTarget(e){this.no.Rs(e)}isLocalQueryTarget(e){return this.no.activeTargetIds.has(e)}clearQueryState(e){delete this.ro[e]}getAllActiveQueryTargets(){return this.no.activeTargetIds}isActiveQueryTarget(e){return this.no.activeTargetIds.has(e)}start(){return this.no=new rJ,Promise.resolve()}handleUserChange(e,t,r){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rZ{io(e){}shutdown(){}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class r0{constructor(){this.so=()=>this.oo(),this._o=()=>this.ao(),this.uo=[],this.co()}io(e){this.uo.push(e)}shutdown(){window.removeEventListener("online",this.so),window.removeEventListener("offline",this._o)}co(){window.addEventListener("online",this.so),window.addEventListener("offline",this._o)}oo(){for(let e of(g("ConnectivityMonitor","Network connectivity changed: AVAILABLE"),this.uo))e(0)}ao(){for(let e of(g("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE"),this.uo))e(1)}static D(){return"undefined"!=typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener}}/** + * @license + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let r1=null;function r2(){return null===r1?r1=268435456+Math.round(2147483648*Math.random()):r1++,"0x"+r1.toString(16)}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let r4={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class r9{constructor(e){this.lo=e.lo,this.ho=e.ho}Po(e){this.Io=e}To(e){this.Eo=e}onMessage(e){this.Ao=e}close(){this.ho()}send(e){this.lo(e)}Ro(){this.Io()}Vo(e){this.Eo(e)}mo(e){this.Ao(e)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let r3="WebChannelConnection";class r8 extends class{constructor(e){this.databaseInfo=e,this.databaseId=e.databaseId;let t=e.ssl?"https":"http",r=encodeURIComponent(this.databaseId.projectId),n=encodeURIComponent(this.databaseId.database);this.fo=t+"://"+e.host,this.po=`projects/${r}/databases/${n}`,this.yo="(default)"===this.databaseId.database?`project_id=${r}`:`project_id=${r}&database_id=${n}`}get wo(){return!1}So(e,t,r,n,i){let s=r2(),a=this.bo(e,t.toUriEncodedString());g("RestConnection",`Sending RPC '${e}' ${s}:`,a,r);let o={"google-cloud-resource-prefix":this.po,"x-goog-request-params":this.yo};return this.Do(o,n,i),this.Co(e,a,o,r).then(t=>(g("RestConnection",`Received RPC '${e}' ${s}: `,t),t),t=>{throw w("RestConnection",`RPC '${e}' ${s} failed with error: `,t,"url: ",a,"request:",r),t})}vo(e,t,r,n,i,s){return this.So(e,t,r,n,i)}Do(e,t,r){e["X-Goog-Api-Client"]=function(){return"gl-js/ fire/"+f}(),e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),t&&t.headers.forEach((t,r)=>e[r]=t),r&&r.headers.forEach((t,r)=>e[r]=t)}bo(e,t){let r=r4[e];return`${this.fo}/v1/${t}:${r}`}terminate(){}}{constructor(e){super(e),this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams,this.longPollingOptions=e.longPollingOptions}Co(e,t,r,n){let i=r2();return new Promise((s,a)=>{let o=new u.JJ;o.setWithCredentials(!0),o.listenOnce(u.tw.COMPLETE,()=>{try{switch(o.getLastErrorCode()){case u.jK.NO_ERROR:let t=o.getResponseJson();g(r3,`XHR for RPC '${e}' ${i} received:`,JSON.stringify(t)),s(t);break;case u.jK.TIMEOUT:g(r3,`RPC '${e}' ${i} timed out`),a(new T(E.DEADLINE_EXCEEDED,"Request time out"));break;case u.jK.HTTP_ERROR:let r=o.getStatus();if(g(r3,`RPC '${e}' ${i} failed with status:`,r,"response text:",o.getResponseText()),r>0){let e=o.getResponseJson();Array.isArray(e)&&(e=e[0]);let t=null==e?void 0:e.error;if(t&&t.status&&t.message){let e=function(e){let t=e.toLowerCase().replace(/_/g,"-");return Object.values(E).indexOf(t)>=0?t:E.UNKNOWN}(t.status);a(new T(e,t.message))}else a(new T(E.UNKNOWN,"Server responded with status "+o.getStatus()))}else a(new T(E.UNAVAILABLE,"Connection failed."));break;default:_()}}finally{g(r3,`RPC '${e}' ${i} completed.`)}});let l=JSON.stringify(n);g(r3,`RPC '${e}' ${i} sending request:`,n),o.send(t,"POST",l,r,15)})}Fo(e,t,r){let i=r2(),s=[this.fo,"/","google.firestore.v1.Firestore","/",e,"/channel"],a=(0,u.UE)(),o=(0,u.FJ)(),l={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},h=this.longPollingOptions.timeoutSeconds;void 0!==h&&(l.longPollingTimeout=Math.round(1e3*h)),this.useFetchStreams&&(l.useFetchStreams=!0),this.Do(l.initMessageHeaders,t,r),l.encodeInitMessageHeaders=!0;let c=s.join("");g(r3,`Creating RPC '${e}' stream ${i}: ${c}`,l);let d=a.createWebChannel(c,l),f=!1,m=!1,p=new r9({lo:t=>{m?g(r3,`Not sending because RPC '${e}' stream ${i} is closed:`,t):(f||(g(r3,`Opening RPC '${e}' stream ${i} transport.`),d.open(),f=!0),g(r3,`RPC '${e}' stream ${i} sending:`,t),d.send(t))},ho:()=>d.close()}),y=(e,t,r)=>{e.listen(t,e=>{try{r(e)}catch(e){setTimeout(()=>{throw e},0)}})};return y(d,u.ii.EventType.OPEN,()=>{m||g(r3,`RPC '${e}' stream ${i} transport opened.`)}),y(d,u.ii.EventType.CLOSE,()=>{m||(m=!0,g(r3,`RPC '${e}' stream ${i} transport closed`),p.Vo())}),y(d,u.ii.EventType.ERROR,t=>{m||(m=!0,w(r3,`RPC '${e}' stream ${i} transport errored:`,t),p.Vo(new T(E.UNAVAILABLE,"The operation could not be completed")))}),y(d,u.ii.EventType.MESSAGE,t=>{var r;if(!m){let s=t.data[0];s||_();let a=s.error||(null===(r=s[0])||void 0===r?void 0:r.error);if(a){g(r3,`RPC '${e}' stream ${i} received error:`,a);let t=a.status,r=function(e){let t=n[e];if(void 0!==t)return tJ(t)}(t),s=a.message;void 0===r&&(r=E.INTERNAL,s="Unknown error status: "+t+" with message "+a.message),m=!0,p.Vo(new T(r,s)),d.close()}else g(r3,`RPC '${e}' stream ${i} received:`,s),p.mo(s)}}),y(o,u.ju.STAT_EVENT,t=>{t.stat===u.kN.PROXY?g(r3,`RPC '${e}' stream ${i} detected buffering proxy`):t.stat===u.kN.NOPROXY&&g(r3,`RPC '${e}' stream ${i} detected no buffering proxy`)}),setTimeout(()=>{p.Ro()},0),p}}function r5(){return"undefined"!=typeof document?document:null}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function r6(e){return new rs(e,!0)}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class r7{constructor(e,t,r=1e3,n=1.5,i=6e4){this.oi=e,this.timerId=t,this.Mo=r,this.xo=n,this.Oo=i,this.No=0,this.Bo=null,this.Lo=Date.now(),this.reset()}reset(){this.No=0}ko(){this.No=this.Oo}qo(e){this.cancel();let t=Math.floor(this.No+this.Qo()),r=Math.max(0,Date.now()-this.Lo),n=Math.max(0,t-r);n>0&&g("ExponentialBackoff",`Backing off for ${n} ms (base delay: ${this.No} ms, delay with jitter: ${t} ms, last attempt: ${r} ms ago)`),this.Bo=this.oi.enqueueAfterDelay(this.timerId,n,()=>(this.Lo=Date.now(),e())),this.No*=this.xo,this.Nothis.Oo&&(this.No=this.Oo)}Ko(){null!==this.Bo&&(this.Bo.skipDelay(),this.Bo=null)}cancel(){null!==this.Bo&&(this.Bo.cancel(),this.Bo=null)}Qo(){return(Math.random()-.5)*this.No}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ne{constructor(e,t,r,n,i,s,a,o){this.oi=e,this.$o=r,this.Uo=n,this.connection=i,this.authCredentialsProvider=s,this.appCheckCredentialsProvider=a,this.listener=o,this.state=0,this.Wo=0,this.Go=null,this.zo=null,this.stream=null,this.jo=new r7(e,t)}Ho(){return 1===this.state||5===this.state||this.Jo()}Jo(){return 2===this.state||3===this.state}start(){4!==this.state?this.auth():this.Yo()}async stop(){this.Ho()&&await this.close(0)}Zo(){this.state=0,this.jo.reset()}Xo(){this.Jo()&&null===this.Go&&(this.Go=this.oi.enqueueAfterDelay(this.$o,6e4,()=>this.e_()))}t_(e){this.n_(),this.stream.send(e)}async e_(){if(this.Jo())return this.close(0)}n_(){this.Go&&(this.Go.cancel(),this.Go=null)}r_(){this.zo&&(this.zo.cancel(),this.zo=null)}async close(e,t){this.n_(),this.r_(),this.jo.cancel(),this.Wo++,4!==e?this.jo.reset():t&&t.code===E.RESOURCE_EXHAUSTED?(y(t.toString()),y("Using maximum backoff delay to prevent overloading the backend."),this.jo.ko()):t&&t.code===E.UNAUTHENTICATED&&3!==this.state&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),null!==this.stream&&(this.i_(),this.stream.close(),this.stream=null),this.state=e,await this.listener.To(t)}i_(){}auth(){this.state=1;let e=this.s_(this.Wo),t=this.Wo;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([e,r])=>{this.Wo===t&&this.o_(e,r)},t=>{e(()=>{let e=new T(E.UNKNOWN,"Fetching auth token failed: "+t.message);return this.__(e)})})}o_(e,t){let r=this.s_(this.Wo);this.stream=this.a_(e,t),this.stream.Po(()=>{r(()=>(this.state=2,this.zo=this.oi.enqueueAfterDelay(this.Uo,1e4,()=>(this.Jo()&&(this.state=3),Promise.resolve())),this.listener.Po()))}),this.stream.To(e=>{r(()=>this.__(e))}),this.stream.onMessage(e=>{r(()=>this.onMessage(e))})}Yo(){this.state=5,this.jo.qo(async()=>{this.state=0,this.start()})}__(e){return g("PersistentStream",`close with error: ${e}`),this.stream=null,this.close(4,e)}s_(e){return t=>{this.oi.enqueueAndForget(()=>this.Wo===e?t():(g("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class nt extends ne{constructor(e,t,r,n,i,s){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",t,r,n,s),this.serializer=i}a_(e,t){return this.connection.Fo("Listen",e,t)}onMessage(e){this.jo.reset();let t=function(e,t){let r;if("targetChange"in t){var n,i;t.targetChange;let s="NO_CHANGE"===(n=t.targetChange.targetChangeType||"NO_CHANGE")?0:"ADD"===n?1:"REMOVE"===n?2:"CURRENT"===n?3:"RESET"===n?4:_(),a=t.targetChange.targetIds||[],o=(i=t.targetChange.resumeToken,e.useProto3Json?(void 0===i||"string"==typeof i||_(),em.fromBase64String(i||"")):(void 0===i||i instanceof Uint8Array||_(),em.fromUint8Array(i||new Uint8Array))),l=t.targetChange.cause;r=new t5(s,a,o,l&&new T(void 0===l.code?E.UNKNOWN:tJ(l.code),l.message||"")||null)}else if("documentChange"in t){t.documentChange;let n=t.documentChange;n.document,n.document.name,n.document.updateTime;let i=rm(e,n.document.name),s=ru(n.document.updateTime),a=n.document.createTime?ru(n.document.createTime):M.min(),o=new eU({mapValue:{fields:n.document.fields}}),l=eq.newFoundDocument(i,s,a,o);r=new t3(n.targetIds||[],n.removedTargetIds||[],l.key,l)}else if("documentDelete"in t){t.documentDelete;let n=t.documentDelete;n.document;let i=rm(e,n.document),s=n.readTime?ru(n.readTime):M.min(),a=eq.newNoDocument(i,s);r=new t3([],n.removedTargetIds||[],a.key,a)}else if("documentRemove"in t){t.documentRemove;let n=t.documentRemove;n.document;let i=rm(e,n.document);r=new t3([],n.removedTargetIds||[],i,null)}else{if(!("filter"in t))return _();{t.filter;let e=t.filter;e.targetId;let{count:n=0,unchangedNames:i}=e,s=new tY(n,i);r=new t8(e.targetId,s)}}return r}(this.serializer,e),r=function(e){if(!("targetChange"in e))return M.min();let t=e.targetChange;return t.targetIds&&t.targetIds.length?M.min():t.readTime?ru(t.readTime):M.min()}(e);return this.listener.u_(t,r)}c_(e){let t={};t.database=rg(this.serializer),t.addTarget=function(e,t){let r;let n=t.target;if((r=e6(n)?{documents:{documents:[rp(e,n.path)]}}:{query:function(e,t){var r,n;let i;let s={structuredQuery:{}},a=t.path;null!==t.collectionGroup?(i=a,s.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(i=a.popLast(),s.structuredQuery.from=[{collectionId:a.lastSegment()}]),s.parent=rp(e,i);let o=function(e){if(0!==e.length)return function e(t){return t instanceof ej?function(e){if("=="===e.op){if(eO(e.value))return{unaryFilter:{field:rv(e.field),op:"IS_NAN"}};if(eV(e.value))return{unaryFilter:{field:rv(e.field),op:"IS_NULL"}}}else if("!="===e.op){if(eO(e.value))return{unaryFilter:{field:rv(e.field),op:"IS_NOT_NAN"}};if(eV(e.value))return{unaryFilter:{field:rv(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:rv(e.field),op:rn[e.op],value:e.value}}}(t):t instanceof eG?function(t){let r=t.getFilters().map(t=>e(t));return 1===r.length?r[0]:{compositeFilter:{op:ri[t.op],filters:r}}}(t):_()}(eG.create(e,"and"))}(t.filters);o&&(s.structuredQuery.where=o);let l=function(e){if(0!==e.length)return e.map(e=>({field:rv(e.field),direction:rr[e.dir]}))}(t.orderBy);l&&(s.structuredQuery.orderBy=l);let u=ra(e,t.limit);return null!==u&&(s.structuredQuery.limit=u),t.startAt&&(s.structuredQuery.startAt={before:(r=t.startAt).inclusive,values:r.position}),t.endAt&&(s.structuredQuery.endAt={before:!(n=t.endAt).inclusive,values:n.position}),{ut:s,parent:i}}(e,n).ut}).targetId=t.targetId,t.resumeToken.approximateByteSize()>0){r.resumeToken=rl(e,t.resumeToken);let n=ra(e,t.expectedCount);null!==n&&(r.expectedCount=n)}else if(t.snapshotVersion.compareTo(M.min())>0){r.readTime=ro(e,t.snapshotVersion.toTimestamp());let n=ra(e,t.expectedCount);null!==n&&(r.expectedCount=n)}return r}(this.serializer,e);let r=function(e,t){let r=function(e){switch(e){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return _()}}(t.purpose);return null==r?null:{"goog-listen-tags":r}}(this.serializer,e);r&&(t.labels=r),this.t_(t)}l_(e){let t={};t.database=rg(this.serializer),t.removeTarget=e,this.t_(t)}}class nr extends ne{constructor(e,t,r,n,i,s){super(e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",t,r,n,s),this.serializer=i,this.h_=!1}get P_(){return this.h_}start(){this.h_=!1,this.lastStreamToken=void 0,super.start()}i_(){this.h_&&this.I_([])}a_(e,t){return this.connection.Fo("Write",e,t)}onMessage(e){var t,r;if(e.streamToken||_(),this.lastStreamToken=e.streamToken,this.h_){this.jo.reset();let n=(t=e.writeResults,r=e.commitTime,t&&t.length>0?(void 0!==r||_(),t.map(e=>{let t;return(t=e.updateTime?ru(e.updateTime):ru(r)).isEqual(M.min())&&(t=ru(r)),new tL(t,e.transformResults||[])})):[]),i=ru(e.commitTime);return this.listener.T_(i,n)}return e.writeResults&&0!==e.writeResults.length&&_(),this.h_=!0,this.listener.E_()}d_(){let e={};e.database=rg(this.serializer),this.t_(e)}I_(e){let t={streamToken:this.lastStreamToken,writes:e.map(e=>(function(e,t){var r;let n;if(t instanceof tq)n={update:rw(e,t.key,t.value)};else if(t instanceof tQ)n={delete:rf(e,t.key)};else if(t instanceof tB)n={update:rw(e,t.key,t.data),updateMask:function(e){let t=[];return e.fields.forEach(e=>t.push(e.canonicalString())),{fieldPaths:t}}(t.fieldMask)};else{if(!(t instanceof tj))return _();n={verify:rf(e,t.key)}}return t.fieldTransforms.length>0&&(n.updateTransforms=t.fieldTransforms.map(e=>(function(e,t){let r=t.transform;if(r instanceof tC)return{fieldPath:t.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(r instanceof tA)return{fieldPath:t.field.canonicalString(),appendMissingElements:{values:r.elements}};if(r instanceof tD)return{fieldPath:t.field.canonicalString(),removeAllFromArray:{values:r.elements}};if(r instanceof tk)return{fieldPath:t.field.canonicalString(),increment:r.Ie};throw _()})(0,e))),t.precondition.isNone||(n.currentDocument=void 0!==(r=t.precondition).updateTime?{updateTime:ro(e,r.updateTime.toTimestamp())}:void 0!==r.exists?{exists:r.exists}:_()),n})(this.serializer,e))};this.t_(t)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class nn extends class{}{constructor(e,t,r,n){super(),this.authCredentials=e,this.appCheckCredentials=t,this.connection=r,this.serializer=n,this.A_=!1}R_(){if(this.A_)throw new T(E.FAILED_PRECONDITION,"The client has already been terminated.")}So(e,t,r,n){return this.R_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([i,s])=>this.connection.So(e,rc(t,r),n,i,s)).catch(e=>{throw"FirebaseError"===e.name?(e.code===E.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),e):new T(E.UNKNOWN,e.toString())})}vo(e,t,r,n,i){return this.R_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([s,a])=>this.connection.vo(e,rc(t,r),n,s,a,i)).catch(e=>{throw"FirebaseError"===e.name?(e.code===E.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),e):new T(E.UNKNOWN,e.toString())})}terminate(){this.A_=!0,this.connection.terminate()}}class ni{constructor(e,t){this.asyncQueue=e,this.onlineStateHandler=t,this.state="Unknown",this.m_=0,this.f_=null,this.g_=!0}p_(){0===this.m_&&(this.y_("Unknown"),this.f_=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this.f_=null,this.w_("Backend didn't respond within 10 seconds."),this.y_("Offline"),Promise.resolve())))}S_(e){"Online"===this.state?this.y_("Unknown"):(this.m_++,this.m_>=1&&(this.b_(),this.w_(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.y_("Offline")))}set(e){this.b_(),this.m_=0,"Online"===e&&(this.g_=!1),this.y_(e)}y_(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}w_(e){let t=`Could not reach Cloud Firestore backend. ${e} +This 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.g_?(y(t),this.g_=!1):g("OnlineStateTracker",t)}b_(){null!==this.f_&&(this.f_.cancel(),this.f_=null)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ns{constructor(e,t,r,n,i){this.localStore=e,this.datastore=t,this.asyncQueue=r,this.remoteSyncer={},this.D_=[],this.C_=new Map,this.v_=new Set,this.F_=[],this.M_=i,this.M_.io(e=>{r.enqueueAndForget(async()=>{nm(this)&&(g("RemoteStore","Restarting streams for network reachability change."),await async function(e){e.v_.add(4),await no(e),e.x_.set("Unknown"),e.v_.delete(4),await na(e)}(this))})}),this.x_=new ni(r,n)}}async function na(e){if(nm(e))for(let t of e.F_)await t(!0)}async function no(e){for(let t of e.F_)await t(!1)}function nl(e,t){e.C_.has(t.targetId)||(e.C_.set(t.targetId,t),nf(e)?nd(e):nN(e).Jo()&&nh(e,t))}function nu(e,t){let r=nN(e);e.C_.delete(t),r.Jo()&&nc(e,t),0===e.C_.size&&(r.Jo()?r.Xo():nm(e)&&e.x_.set("Unknown"))}function nh(e,t){if(e.O_.Oe(t.targetId),t.resumeToken.approximateByteSize()>0||t.snapshotVersion.compareTo(M.min())>0){let r=e.remoteSyncer.getRemoteKeysForTarget(t.targetId).size;t=t.withExpectedCount(r)}nN(e).c_(t)}function nc(e,t){e.O_.Oe(t),nN(e).l_(t)}function nd(e){e.O_=new t7({getRemoteKeysForTarget:t=>e.remoteSyncer.getRemoteKeysForTarget(t),_t:t=>e.C_.get(t)||null,nt:()=>e.datastore.serializer.databaseId}),nN(e).start(),e.x_.p_()}function nf(e){return nm(e)&&!nN(e).Ho()&&e.C_.size>0}function nm(e){return 0===e.v_.size}async function np(e){e.C_.forEach((t,r)=>{nh(e,t)})}async function ng(e,t){e.O_=void 0,nf(e)?(e.x_.S_(t),nd(e)):e.x_.set("Unknown")}async function ny(e,t,r){if(e.x_.set("Online"),t instanceof t5&&2===t.state&&t.cause)try{await async function(e,t){let r=t.cause;for(let n of t.targetIds)e.C_.has(n)&&(await e.remoteSyncer.rejectListen(n,r),e.C_.delete(n),e.O_.removeTarget(n))}(e,t)}catch(r){g("RemoteStore","Failed to remove targets %s: %s ",t.targetIds.join(","),r),await nw(e,r)}else if(t instanceof t3?e.O_.$e(t):t instanceof t8?e.O_.Je(t):e.O_.Ge(t),!r.isEqual(M.min()))try{let t=await rW(e.localStore);r.compareTo(t)>=0&&await function(e,t){let r=e.O_.it(t);return r.targetChanges.forEach((r,n)=>{if(r.resumeToken.approximateByteSize()>0){let i=e.C_.get(n);i&&e.C_.set(n,i.withResumeToken(r.resumeToken,t))}}),r.targetMismatches.forEach((t,r)=>{let n=e.C_.get(t);if(!n)return;e.C_.set(t,n.withResumeToken(em.EMPTY_BYTE_STRING,n.snapshotVersion)),nc(e,t);let i=new rT(n.target,t,r,n.sequenceNumber);nh(e,i)}),e.remoteSyncer.applyRemoteEvent(r)}(e,r)}catch(t){g("RemoteStore","Failed to raise snapshot:",t),await nw(e,t)}}async function nw(e,t,r){if(!J(t))throw t;e.v_.add(1),await no(e),e.x_.set("Offline"),r||(r=()=>rW(e.localStore)),e.asyncQueue.enqueueRetryable(async()=>{g("RemoteStore","Retrying IndexedDB access"),await r(),e.v_.delete(1),await na(e)})}function nv(e,t){return t().catch(r=>nw(e,r,t))}async function n_(e){let t=nk(e),r=e.D_.length>0?e.D_[e.D_.length-1].batchId:-1;for(;nm(e)&&e.D_.length<10;)try{let n=await function(e,t){return e.persistence.runTransaction("Get next mutation batch","readonly",r=>(void 0===t&&(t=-1),e.mutationQueue.getNextMutationBatchAfterBatchId(r,t)))}(e.localStore,r);if(null===n){0===e.D_.length&&t.Xo();break}r=n.batchId,function(e,t){e.D_.push(t);let r=nk(e);r.Jo()&&r.P_&&r.I_(t.mutations)}(e,n)}catch(t){await nw(e,t)}nE(e)&&nT(e)}function nE(e){return nm(e)&&!nk(e).Ho()&&e.D_.length>0}function nT(e){nk(e).start()}async function nI(e){nk(e).d_()}async function nS(e){let t=nk(e);for(let r of e.D_)t.I_(r.mutations)}async function nC(e,t,r){let n=e.D_.shift(),i=tW.from(n,t,r);await nv(e,()=>e.remoteSyncer.applySuccessfulWrite(i)),await n_(e)}async function nA(e,t){t&&nk(e).P_&&await async function(e,t){var r;if(function(e){switch(e){default:return _();case E.CANCELLED:case E.UNKNOWN:case E.DEADLINE_EXCEEDED:case E.RESOURCE_EXHAUSTED:case E.INTERNAL:case E.UNAVAILABLE:case E.UNAUTHENTICATED:return!1;case E.INVALID_ARGUMENT:case E.NOT_FOUND:case E.ALREADY_EXISTS:case E.PERMISSION_DENIED:case E.FAILED_PRECONDITION:case E.ABORTED:case E.OUT_OF_RANGE:case E.UNIMPLEMENTED:case E.DATA_LOSS:return!0}}(r=t.code)&&r!==E.ABORTED){let r=e.D_.shift();nk(e).Zo(),await nv(e,()=>e.remoteSyncer.rejectFailedWrite(r.batchId,t)),await n_(e)}}(e,t),nE(e)&&nT(e)}async function nb(e,t){e.asyncQueue.verifyOperationInProgress(),g("RemoteStore","RemoteStore received new credentials");let r=nm(e);e.v_.add(3),await no(e),r&&e.x_.set("Unknown"),await e.remoteSyncer.handleCredentialChange(t),e.v_.delete(3),await na(e)}async function nD(e,t){t?(e.v_.delete(2),await na(e)):t||(e.v_.add(2),await no(e),e.x_.set("Unknown"))}function nN(e){var t,r,n;return e.N_||(e.N_=(t=e.datastore,r=e.asyncQueue,n={Po:np.bind(null,e),To:ng.bind(null,e),u_:ny.bind(null,e)},t.R_(),new nt(r,t.connection,t.authCredentials,t.appCheckCredentials,t.serializer,n)),e.F_.push(async t=>{t?(e.N_.Zo(),nf(e)?nd(e):e.x_.set("Unknown")):(await e.N_.stop(),e.O_=void 0)})),e.N_}function nk(e){var t,r,n;return e.B_||(e.B_=(t=e.datastore,r=e.asyncQueue,n={Po:nI.bind(null,e),To:nA.bind(null,e),E_:nS.bind(null,e),T_:nC.bind(null,e)},t.R_(),new nr(r,t.connection,t.authCredentials,t.appCheckCredentials,t.serializer,n)),e.F_.push(async t=>{t?(e.B_.Zo(),await n_(e)):(await e.B_.stop(),e.D_.length>0&&(g("RemoteStore",`Stopping write stream with ${e.D_.length} pending writes`),e.D_=[]))})),e.B_}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class nx{constructor(e,t,r,n,i){this.asyncQueue=e,this.timerId=t,this.targetTimeMs=r,this.op=n,this.removalCallback=i,this.deferred=new I,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(e=>{})}get promise(){return this.deferred.promise}static createAndSchedule(e,t,r,n,i){let s=new nx(e,t,Date.now()+r,n,i);return s.start(r),s}start(e){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new T(E.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>null!==this.timerHandle?(this.clearTimeout(),this.op().then(e=>this.deferred.resolve(e))):Promise.resolve())}clearTimeout(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function nR(e,t){if(y("AsyncQueue",`${t}: ${e}`),J(e))return new T(E.UNAVAILABLE,`${t}: ${e}`);throw e}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class nL{constructor(e){this.comparator=e?(t,r)=>e(t,r)||B.comparator(t.key,r.key):(e,t)=>B.comparator(e.key,t.key),this.keyedMap=tm(),this.sortedSet=new eo(this.comparator)}static emptySet(e){return new nL(e.comparator)}has(e){return null!=this.keyedMap.get(e)}get(e){return this.keyedMap.get(e)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(e){let t=this.keyedMap.get(e);return t?this.sortedSet.indexOf(t):-1}get size(){return this.sortedSet.size}forEach(e){this.sortedSet.inorderTraversal((t,r)=>(e(t),!1))}add(e){let t=this.delete(e.key);return t.copy(t.keyedMap.insert(e.key,e),t.sortedSet.insert(e,null))}delete(e){let t=this.get(e);return t?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(t)):this}isEqual(e){if(!(e instanceof nL)||this.size!==e.size)return!1;let t=this.sortedSet.getIterator(),r=e.sortedSet.getIterator();for(;t.hasNext();){let e=t.getNext().key,n=r.getNext().key;if(!e.isEqual(n))return!1}return!0}toString(){let e=[];return this.forEach(t=>{e.push(t.toString())}),0===e.length?"DocumentSet ()":"DocumentSet (\n "+e.join(" \n")+"\n)"}copy(e,t){let r=new nL;return r.comparator=this.comparator,r.keyedMap=e,r.sortedSet=t,r}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class nV{constructor(){this.L_=new eo(B.comparator)}track(e){let t=e.doc.key,r=this.L_.get(t);r?0!==e.type&&3===r.type?this.L_=this.L_.insert(t,e):3===e.type&&1!==r.type?this.L_=this.L_.insert(t,{type:r.type,doc:e.doc}):2===e.type&&2===r.type?this.L_=this.L_.insert(t,{type:2,doc:e.doc}):2===e.type&&0===r.type?this.L_=this.L_.insert(t,{type:0,doc:e.doc}):1===e.type&&0===r.type?this.L_=this.L_.remove(t):1===e.type&&2===r.type?this.L_=this.L_.insert(t,{type:1,doc:r.doc}):0===e.type&&1===r.type?this.L_=this.L_.insert(t,{type:2,doc:e.doc}):_():this.L_=this.L_.insert(t,e)}k_(){let e=[];return this.L_.inorderTraversal((t,r)=>{e.push(r)}),e}}class nO{constructor(e,t,r,n,i,s,a,o,l){this.query=e,this.docs=t,this.oldDocs=r,this.docChanges=n,this.mutatedKeys=i,this.fromCache=s,this.syncStateChanged=a,this.excludesMetadataChanges=o,this.hasCachedResults=l}static fromInitialDocuments(e,t,r,n,i){let s=[];return t.forEach(e=>{s.push({type:0,doc:e})}),new nO(e,t,nL.emptySet(t),s,r,n,!0,!1,i)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(e){if(!(this.fromCache===e.fromCache&&this.hasCachedResults===e.hasCachedResults&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&ta(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;let t=this.docChanges,r=e.docChanges;if(t.length!==r.length)return!1;for(let e=0;eto(e),ta),this.onlineState="Unknown",this.K_=new Set}}async function nP(e,t){let r=t.query,n=!1,i=e.queries.get(r);if(i||(n=!0,i=new nM),n)try{i.q_=await e.onListen(r)}catch(r){let e=nR(r,`Initialization of query '${tl(t.query)}' failed`);return void t.onError(e)}e.queries.set(r,i),i.Q_.push(t),t.U_(e.onlineState),i.q_&&t.W_(i.q_)&&n$(e)}async function nU(e,t){let r=t.query,n=!1,i=e.queries.get(r);if(i){let e=i.Q_.indexOf(t);e>=0&&(i.Q_.splice(e,1),n=0===i.Q_.length)}if(n)return e.queries.delete(r),e.onUnlisten(r)}function nq(e,t){let r=!1;for(let n of t){let t=n.query,i=e.queries.get(t);if(i){for(let e of i.Q_)e.W_(n)&&(r=!0);i.q_=n}}r&&n$(e)}function nB(e,t,r){let n=e.queries.get(t);if(n)for(let e of n.Q_)e.onError(r);e.queries.delete(t)}function n$(e){e.K_.forEach(e=>{e.next()})}class nz{constructor(e,t,r){this.query=e,this.G_=t,this.z_=!1,this.j_=null,this.onlineState="Unknown",this.options=r||{}}W_(e){if(!this.options.includeMetadataChanges){let t=[];for(let r of e.docChanges)3!==r.type&&t.push(r);e=new nO(e.query,e.docs,e.oldDocs,t,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}let t=!1;return this.z_?this.H_(e)&&(this.G_.next(e),t=!0):this.J_(e,this.onlineState)&&(this.Y_(e),t=!0),this.j_=e,t}onError(e){this.G_.error(e)}U_(e){this.onlineState=e;let t=!1;return this.j_&&!this.z_&&this.J_(this.j_,e)&&(this.Y_(this.j_),t=!0),t}J_(e,t){return!e.fromCache||(!this.options.Z_||!("Offline"!==t))&&(!e.docs.isEmpty()||e.hasCachedResults||"Offline"===t)}H_(e){if(e.docChanges.length>0)return!0;let t=this.j_&&this.j_.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!t)&&!0===this.options.includeMetadataChanges}Y_(e){e=nO.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.z_=!0,this.G_.next(e)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class nK{constructor(e){this.key=e}}class nQ{constructor(e){this.key=e}}class nj{constructor(e,t){this.query=e,this.oa=t,this._a=null,this.hasCachedResults=!1,this.current=!1,this.aa=tv(),this.mutatedKeys=tv(),this.ua=th(e),this.ca=new nL(this.ua)}get la(){return this.oa}ha(e,t){let r=t?t.Pa:new nV,n=t?t.ca:this.ca,i=t?t.mutatedKeys:this.mutatedKeys,s=n,a=!1,o="F"===this.query.limitType&&n.size===this.query.limit?n.last():null,l="L"===this.query.limitType&&n.size===this.query.limit?n.first():null;if(e.inorderTraversal((e,t)=>{let u=n.get(e),h=tu(this.query,t)?t:null,c=!!u&&this.mutatedKeys.has(u.key),d=!!h&&(h.hasLocalMutations||this.mutatedKeys.has(h.key)&&h.hasCommittedMutations),f=!1;u&&h?u.data.isEqual(h.data)?c!==d&&(r.track({type:3,doc:h}),f=!0):this.Ia(u,h)||(r.track({type:2,doc:h}),f=!0,(o&&this.ua(h,o)>0||l&&0>this.ua(h,l))&&(a=!0)):!u&&h?(r.track({type:0,doc:h}),f=!0):u&&!h&&(r.track({type:1,doc:u}),f=!0,(o||l)&&(a=!0)),f&&(h?(s=s.add(h),i=d?i.add(e):i.delete(e)):(s=s.delete(e),i=i.delete(e)))}),null!==this.query.limit)for(;s.size>this.query.limit;){let e="F"===this.query.limitType?s.last():s.first();s=s.delete(e.key),i=i.delete(e.key),r.track({type:1,doc:e})}return{ca:s,Pa:r,Xi:a,mutatedKeys:i}}Ia(e,t){return e.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations}applyChanges(e,t,r,n){let i=this.ca;this.ca=e.ca,this.mutatedKeys=e.mutatedKeys;let s=e.Pa.k_();s.sort((e,t)=>(function(e,t){let r=e=>{switch(e){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return _()}};return r(e)-r(t)})(e.type,t.type)||this.ua(e.doc,t.doc)),this.Ta(r),n=null!=n&&n;let a=t&&!n?this.Ea():[],o=0===this.aa.size&&this.current&&!n?1:0,l=o!==this._a;return(this._a=o,0!==s.length||l)?{snapshot:new nO(this.query,e.ca,i,s,e.mutatedKeys,0===o,l,!1,!!r&&r.resumeToken.approximateByteSize()>0),da:a}:{da:a}}U_(e){return this.current&&"Offline"===e?(this.current=!1,this.applyChanges({ca:this.ca,Pa:new nV,mutatedKeys:this.mutatedKeys,Xi:!1},!1)):{da:[]}}Aa(e){return!this.oa.has(e)&&!!this.ca.has(e)&&!this.ca.get(e).hasLocalMutations}Ta(e){e&&(e.addedDocuments.forEach(e=>this.oa=this.oa.add(e)),e.modifiedDocuments.forEach(e=>{}),e.removedDocuments.forEach(e=>this.oa=this.oa.delete(e)),this.current=e.current)}Ea(){if(!this.current)return[];let e=this.aa;this.aa=tv(),this.ca.forEach(e=>{this.Aa(e.key)&&(this.aa=this.aa.add(e.key))});let t=[];return e.forEach(e=>{this.aa.has(e)||t.push(new nQ(e))}),this.aa.forEach(r=>{e.has(r)||t.push(new nK(r))}),t}Ra(e){this.oa=e.hs,this.aa=tv();let t=this.ha(e.documents);return this.applyChanges(t,!0)}Va(){return nO.fromInitialDocuments(this.query,this.ca,this.mutatedKeys,0===this._a,this.hasCachedResults)}}class nG{constructor(e,t,r){this.query=e,this.targetId=t,this.view=r}}class nW{constructor(e){this.key=e,this.ma=!1}}class nH{constructor(e,t,r,n,i,s){this.localStore=e,this.remoteStore=t,this.eventManager=r,this.sharedClientState=n,this.currentUser=i,this.maxConcurrentLimboResolutions=s,this.fa={},this.ga=new tc(e=>to(e),ta),this.pa=new Map,this.ya=new Set,this.wa=new eo(B.comparator),this.Sa=new Map,this.ba=new rV,this.Da={},this.Ca=new Map,this.va=rD.Bn(),this.onlineState="Unknown",this.Fa=void 0}get isPrimaryClient(){return!0===this.Fa}}async function nY(e,t){var r,n;let i,s;let a=(e.remoteStore.remoteSyncer.applyRemoteEvent=n0.bind(null,e),e.remoteStore.remoteSyncer.getRemoteKeysForTarget=ii.bind(null,e),e.remoteStore.remoteSyncer.rejectListen=n2.bind(null,e),e.fa.u_=nq.bind(null,e.eventManager),e.fa.xa=nB.bind(null,e.eventManager),e),o=a.ga.get(t);if(o)i=o.targetId,a.sharedClientState.addLocalQueryTarget(i),s=o.view.Va();else{let e=await (r=a.localStore,n=tn(t),r.persistence.runTransaction("Allocate target","readwrite",e=>{let t;return r.Qr.getTargetData(e,n).next(i=>i?(t=i,j.resolve(t)):r.Qr.allocateTargetId(e).next(i=>(t=new rT(n,i,"TargetPurposeListen",e.currentSequenceNumber),r.Qr.addTargetData(e,t).next(()=>t))))}).then(e=>{let t=r.ns.get(e.targetId);return(null===t||e.snapshotVersion.compareTo(t.snapshotVersion)>0)&&(r.ns=r.ns.insert(e.targetId,e),r.rs.set(n,e.targetId)),e})),o=a.sharedClientState.addLocalQueryTarget(e.targetId);i=e.targetId,s=await nJ(a,t,i,"current"===o,e.resumeToken),a.isPrimaryClient&&nl(a.remoteStore,e)}return s}async function nJ(e,t,r,n,i){e.Ma=(t,r,n)=>(async function(e,t,r,n){let i=t.view.ha(r);i.Xi&&(i=await rY(e.localStore,t.query,!1).then(({documents:e})=>t.view.ha(e,i)));let s=n&&n.targetChanges.get(t.targetId),a=n&&null!=n.targetMismatches.get(t.targetId),o=t.view.applyChanges(i,e.isPrimaryClient,s,a);return n7(e,t.targetId,o.da),o.snapshot})(e,t,r,n);let s=await rY(e.localStore,t,!0),a=new nj(t,s.hs),o=a.ha(s.documents),l=t9.createSynthesizedTargetChangeForCurrentChange(r,n&&"Offline"!==e.onlineState,i),u=a.applyChanges(o,e.isPrimaryClient,l);n7(e,r,u.da);let h=new nG(t,r,a);return e.ga.set(t,h),e.pa.has(r)?e.pa.get(r).push(t):e.pa.set(r,[t]),u.snapshot}async function nX(e,t){let r=e.ga.get(t),n=e.pa.get(r.targetId);if(n.length>1)return e.pa.set(r.targetId,n.filter(e=>!ta(e,t))),void e.ga.delete(t);e.isPrimaryClient?(e.sharedClientState.removeLocalQueryTarget(r.targetId),e.sharedClientState.isActiveQueryTarget(r.targetId)||await rH(e.localStore,r.targetId,!1).then(()=>{e.sharedClientState.clearQueryState(r.targetId),nu(e.remoteStore,r.targetId),n5(e,r.targetId)}).catch(Q)):(n5(e,r.targetId),await rH(e.localStore,r.targetId,!0))}async function nZ(e,t,r){var n;let i=(e.remoteStore.remoteSyncer.applySuccessfulWrite=n4.bind(null,e),e.remoteStore.remoteSyncer.rejectFailedWrite=n9.bind(null,e),e);try{let e;let s=await function(e,t){let r,n;let i=O.now(),s=t.reduce((e,t)=>e.add(t.key),tv());return e.persistence.runTransaction("Locally write mutations","readwrite",a=>{let o=td,l=tv();return e.os.getEntries(a,s).next(e=>{(o=e).forEach((e,t)=>{t.isValidDocument()||(l=l.add(e))})}).next(()=>e.localDocuments.getOverlayedDocuments(a,o)).next(n=>{r=n;let s=[];for(let e of t){let t=function(e,t){let r=null;for(let n of e.fieldTransforms){let e=t.data.field(n.field),i=tS(n.transform,e||null);null!=i&&(null===r&&(r=eU.empty()),r.set(n.field,i))}return r||null}(e,r.get(e.key).overlayedDocument);null!=t&&s.push(new tB(e.key,t,function e(t){let r=[];return es(t.fields,(t,n)=>{let i=new q([t]);if(eM(n)){let t=e(n.mapValue).fields;if(0===t.length)r.push(i);else for(let e of t)r.push(i.child(e))}else r.push(i)}),new ed(r)}(t.value.mapValue),tV.exists(!0)))}return e.mutationQueue.addMutationBatch(a,i,s,t)}).next(t=>{n=t;let i=t.applyToLocalDocumentSet(r,l);return e.documentOverlayCache.saveOverlays(a,t.batchId,i)})}).then(()=>({batchId:n.batchId,changes:tp(r)}))}(i.localStore,t);i.sharedClientState.addPendingMutation(s.batchId),n=s.batchId,(e=i.Da[i.currentUser.toKey()])||(e=new eo(L)),e=e.insert(n,r),i.Da[i.currentUser.toKey()]=e,await it(i,s.changes),await n_(i.remoteStore)}catch(t){let e=nR(t,"Failed to persist write");r.reject(e)}}async function n0(e,t){try{let r=await function(e,t){let r=t.snapshotVersion,n=e.ns;return e.persistence.runTransaction("Apply remote event","readwrite-primary",i=>{var s;let a,o;let l=e.os.newChangeBuffer({trackRemovals:!0});n=e.ns;let u=[];t.targetChanges.forEach((s,a)=>{var o;let l=n.get(a);if(!l)return;u.push(e.Qr.removeMatchingKeys(i,s.removedDocuments,a).next(()=>e.Qr.addMatchingKeys(i,s.addedDocuments,a)));let h=l.withSequenceNumber(i.currentSequenceNumber);null!==t.targetMismatches.get(a)?h=h.withResumeToken(em.EMPTY_BYTE_STRING,M.min()).withLastLimboFreeSnapshotVersion(M.min()):s.resumeToken.approximateByteSize()>0&&(h=h.withResumeToken(s.resumeToken,r)),n=n.insert(a,h),o=h,(0===l.resumeToken.approximateByteSize()||o.snapshotVersion.toMicroseconds()-l.snapshotVersion.toMicroseconds()>=3e8||s.addedDocuments.size+s.modifiedDocuments.size+s.removedDocuments.size>0)&&u.push(e.Qr.updateTargetData(i,h))});let h=td,c=tv();if(t.documentUpdates.forEach(r=>{t.resolvedLimboDocuments.has(r)&&u.push(e.persistence.referenceDelegate.updateLimboDocument(i,r))}),u.push((s=t.documentUpdates,a=tv(),o=tv(),s.forEach(e=>a=a.add(e)),l.getEntries(i,a).next(e=>{let t=td;return s.forEach((r,n)=>{let i=e.get(r);n.isFoundDocument()!==i.isFoundDocument()&&(o=o.add(r)),n.isNoDocument()&&n.version.isEqual(M.min())?(l.removeEntry(r,n.readTime),t=t.insert(r,n)):!i.isValidDocument()||n.version.compareTo(i.version)>0||0===n.version.compareTo(i.version)&&i.hasPendingWrites?(l.addEntry(n),t=t.insert(r,n)):g("LocalStore","Ignoring outdated watch update for ",r,". Current version:",i.version," Watch version:",n.version)}),{cs:t,ls:o}})).next(e=>{h=e.cs,c=e.ls})),!r.isEqual(M.min())){let t=e.Qr.getLastRemoteSnapshotVersion(i).next(t=>e.Qr.setTargetsMetadata(i,i.currentSequenceNumber,r));u.push(t)}return j.waitFor(u).next(()=>l.apply(i)).next(()=>e.localDocuments.getLocalViewOfDocuments(i,h,c)).next(()=>h)}).then(t=>(e.ns=n,t))}(e.localStore,t);t.targetChanges.forEach((t,r)=>{let n=e.Sa.get(r);n&&(t.addedDocuments.size+t.modifiedDocuments.size+t.removedDocuments.size<=1||_(),t.addedDocuments.size>0?n.ma=!0:t.modifiedDocuments.size>0?n.ma||_():t.removedDocuments.size>0&&(n.ma||_(),n.ma=!1))}),await it(e,r,t)}catch(e){await Q(e)}}function n1(e,t,r){var n;if(e.isPrimaryClient&&0===r||!e.isPrimaryClient&&1===r){let r;let i=[];e.ga.forEach((e,r)=>{let n=r.view.U_(t);n.snapshot&&i.push(n.snapshot)}),(n=e.eventManager).onlineState=t,r=!1,n.queries.forEach((e,n)=>{for(let e of n.Q_)e.U_(t)&&(r=!0)}),r&&n$(n),i.length&&e.fa.u_(i),e.onlineState=t,e.isPrimaryClient&&e.sharedClientState.setOnlineState(t)}}async function n2(e,t,r){e.sharedClientState.updateQueryState(t,"rejected",r);let n=e.Sa.get(t),i=n&&n.key;if(i){let r=new eo(B.comparator);r=r.insert(i,eq.newNoDocument(i,M.min()));let n=tv().add(i),s=new t4(M.min(),new Map,new eo(L),r,n);await n0(e,s),e.wa=e.wa.remove(i),e.Sa.delete(t),ie(e)}else await rH(e.localStore,t,!1).then(()=>n5(e,t,r)).catch(Q)}async function n4(e,t){var r;let n=t.batch.batchId;try{let i=await (r=e.localStore).persistence.runTransaction("Acknowledge batch","readwrite-primary",e=>{let n=t.batch.keys(),i=r.os.newChangeBuffer({trackRemovals:!0});return(function(e,t,r,n){let i=r.batch,s=i.keys(),a=j.resolve();return s.forEach(e=>{a=a.next(()=>n.getEntry(t,e)).next(t=>{let s=r.docVersions.get(e);null!==s||_(),0>t.version.compareTo(s)&&(i.applyToRemoteDocument(t,r),t.isValidDocument()&&(t.setReadTime(r.commitVersion),n.addEntry(t)))})}),a.next(()=>e.mutationQueue.removeMutationBatch(t,i))})(r,e,t,i).next(()=>i.apply(e)).next(()=>r.mutationQueue.performConsistencyCheck(e)).next(()=>r.documentOverlayCache.removeOverlaysForBatchId(e,n,t.batch.batchId)).next(()=>r.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(e,function(e){let t=tv();for(let r=0;r0&&(t=t.add(e.batch.mutations[r].key));return t}(t))).next(()=>r.localDocuments.getDocuments(e,n))});n8(e,n,null),n3(e,n),e.sharedClientState.updateMutationState(n,"acknowledged"),await it(e,i)}catch(e){await Q(e)}}async function n9(e,t,r){var n;try{let i=await (n=e.localStore).persistence.runTransaction("Reject batch","readwrite-primary",e=>{let r;return n.mutationQueue.lookupMutationBatch(e,t).next(t=>(null!==t||_(),r=t.keys(),n.mutationQueue.removeMutationBatch(e,t))).next(()=>n.mutationQueue.performConsistencyCheck(e)).next(()=>n.documentOverlayCache.removeOverlaysForBatchId(e,r,t)).next(()=>n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(e,r)).next(()=>n.localDocuments.getDocuments(e,r))});n8(e,t,r),n3(e,t),e.sharedClientState.updateMutationState(t,"rejected",r),await it(e,i)}catch(e){await Q(e)}}function n3(e,t){(e.Ca.get(t)||[]).forEach(e=>{e.resolve()}),e.Ca.delete(t)}function n8(e,t,r){let n=e.Da[e.currentUser.toKey()];if(n){let i=n.get(t);i&&(r?i.reject(r):i.resolve(),n=n.remove(t)),e.Da[e.currentUser.toKey()]=n}}function n5(e,t,r=null){for(let n of(e.sharedClientState.removeLocalQueryTarget(t),e.pa.get(t)))e.ga.delete(n),r&&e.fa.xa(n,r);e.pa.delete(t),e.isPrimaryClient&&e.ba.Vr(t).forEach(t=>{e.ba.containsKey(t)||n6(e,t)})}function n6(e,t){e.ya.delete(t.path.canonicalString());let r=e.wa.get(t);null!==r&&(nu(e.remoteStore,r),e.wa=e.wa.remove(t),e.Sa.delete(r),ie(e))}function n7(e,t,r){for(let n of r)n instanceof nK?(e.ba.addReference(n.key,t),function(e,t){let r=t.key,n=r.path.canonicalString();e.wa.get(r)||e.ya.has(n)||(g("SyncEngine","New document in limbo: "+r),e.ya.add(n),ie(e))}(e,n)):n instanceof nQ?(g("SyncEngine","Document no longer in limbo: "+n.key),e.ba.removeReference(n.key,t),e.ba.containsKey(n.key)||n6(e,n.key)):_()}function ie(e){for(;e.ya.size>0&&e.wa.size{s.push(e.Ma(o,t,r).then(t=>{if((t||r)&&e.isPrimaryClient&&e.sharedClientState.updateQueryState(o.targetId,(null==t?void 0:t.fromCache)?"not-current":"current"),t){n.push(t);let e=rz.Ki(o.targetId,t);i.push(e)}}))}),await Promise.all(s),e.fa.u_(n),await async function(e,t){try{await e.persistence.runTransaction("notifyLocalViewChanges","readwrite",r=>j.forEach(t,t=>j.forEach(t.qi,n=>e.persistence.referenceDelegate.addReference(r,t.targetId,n)).next(()=>j.forEach(t.Qi,n=>e.persistence.referenceDelegate.removeReference(r,t.targetId,n)))))}catch(e){if(!J(e))throw e;g("LocalStore","Failed to update sequence numbers: "+e)}for(let r of t){let t=r.targetId;if(!r.fromCache){let r=e.ns.get(t),n=r.snapshotVersion,i=r.withLastLimboFreeSnapshotVersion(n);e.ns=e.ns.insert(t,i)}}}(e.localStore,i))}async function ir(e,t){if(!e.currentUser.isEqual(t)){g("SyncEngine","User change. New user:",t.toKey());let r=await rG(e.localStore,t);e.currentUser=t,e.Ca.forEach(e=>{e.forEach(e=>{e.reject(new T(E.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))})}),e.Ca.clear(),e.sharedClientState.handleUserChange(t,r.removedBatchIds,r.addedBatchIds),await it(e,r.us)}}function ii(e,t){let r=e.Sa.get(t);if(r&&r.ma)return tv().add(r.key);{let r=tv(),n=e.pa.get(t);if(!n)return r;for(let t of n){let n=e.ga.get(t);r=r.unionWith(n.view.la)}return r}}class is{constructor(){this.synchronizeTabs=!1}async initialize(e){this.serializer=r6(e.databaseInfo.databaseId),this.sharedClientState=this.createSharedClientState(e),this.persistence=this.createPersistence(e),await this.persistence.start(),this.localStore=this.createLocalStore(e),this.gcScheduler=this.createGarbageCollectionScheduler(e,this.localStore),this.indexBackfillerScheduler=this.createIndexBackfillerScheduler(e,this.localStore)}createGarbageCollectionScheduler(e,t){return null}createIndexBackfillerScheduler(e,t){return null}createLocalStore(e){var t;return t=this.persistence,new rj(t,new rQ,e.initialUser,this.serializer)}createPersistence(e){return new rq(r$.Hr,this.serializer)}createSharedClientState(e){return new rX}async terminate(){var e,t;null===(e=this.gcScheduler)||void 0===e||e.stop(),null===(t=this.indexBackfillerScheduler)||void 0===t||t.stop(),this.sharedClientState.shutdown(),await this.persistence.shutdown()}}class ia{async initialize(e,t){this.localStore||(this.localStore=e.localStore,this.sharedClientState=e.sharedClientState,this.datastore=this.createDatastore(t),this.remoteStore=this.createRemoteStore(t),this.eventManager=this.createEventManager(t),this.syncEngine=this.createSyncEngine(t,!e.synchronizeTabs),this.sharedClientState.onlineStateHandler=e=>n1(this.syncEngine,e,1),this.remoteStore.remoteSyncer.handleCredentialChange=ir.bind(null,this.syncEngine),await nD(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return new nF}createDatastore(e){let t=r6(e.databaseInfo.databaseId),r=new r8(e.databaseInfo);return new nn(e.authCredentials,e.appCheckCredentials,r,t)}createRemoteStore(e){var t;return t=this.localStore,new ns(t,this.datastore,e.asyncQueue,e=>n1(this.syncEngine,e,0),r0.D()?new r0:new rZ)}createSyncEngine(e,t){return function(e,t,r,n,i,s,a){let o=new nH(e,t,r,n,i,s);return a&&(o.Fa=!0),o}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,t)}async terminate(){var e;await async function(e){g("RemoteStore","RemoteStore shutting down."),e.v_.add(5),await no(e),e.M_.shutdown(),e.x_.set("Unknown")}(this.remoteStore),null===(e=this.datastore)||void 0===e||e.terminate()}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *//** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class io{constructor(e){this.observer=e,this.muted=!1}next(e){this.observer.next&&this.Ba(this.observer.next,e)}error(e){this.observer.error?this.Ba(this.observer.error,e):y("Uncaught Error in snapshot listener:",e.toString())}La(){this.muted=!0}Ba(e,t){this.muted||setTimeout(()=>{this.muted||e(t)},0)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class il{constructor(e,t,r,n){this.authCredentials=e,this.appCheckCredentials=t,this.asyncQueue=r,this.databaseInfo=n,this.user=d.UNAUTHENTICATED,this.clientId=R.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this.authCredentials.start(r,async e=>{g("FirestoreClient","Received user=",e.uid),await this.authCredentialListener(e),this.user=e}),this.appCheckCredentials.start(r,e=>(g("FirestoreClient","Received new app check token=",e),this.appCheckCredentialListener(e,this.user)))}get configuration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new T(E.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){this.asyncQueue.enterRestrictedMode();let e=new I;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(async()=>{try{this._onlineComponents&&await this._onlineComponents.terminate(),this._offlineComponents&&await this._offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),e.resolve()}catch(r){let t=nR(r,"Failed to shutdown persistence");e.reject(t)}}),e.promise}}async function iu(e,t){e.asyncQueue.verifyOperationInProgress(),g("FirestoreClient","Initializing OfflineComponentProvider");let r=e.configuration;await t.initialize(r);let n=r.initialUser;e.setCredentialChangeListener(async e=>{n.isEqual(e)||(await rG(t.localStore,e),n=e)}),t.persistence.setDatabaseDeletedListener(()=>e.terminate()),e._offlineComponents=t}async function ih(e,t){e.asyncQueue.verifyOperationInProgress();let r=await ic(e);g("FirestoreClient","Initializing OnlineComponentProvider"),await t.initialize(r,e.configuration),e.setCredentialChangeListener(e=>nb(t.remoteStore,e)),e.setAppCheckTokenChangeListener((e,r)=>nb(t.remoteStore,r)),e._onlineComponents=t}async function ic(e){if(!e._offlineComponents){if(e._uninitializedComponentsProvider){g("FirestoreClient","Using user provided OfflineComponentProvider");try{await iu(e,e._uninitializedComponentsProvider._offline)}catch(t){if(!("FirebaseError"===t.name?t.code===E.FAILED_PRECONDITION||t.code===E.UNIMPLEMENTED:!("undefined"!=typeof DOMException&&t instanceof DOMException)||22===t.code||20===t.code||11===t.code))throw t;w("Error using user provided cache. Falling back to memory cache: "+t),await iu(e,new is)}}else g("FirestoreClient","Using default OfflineComponentProvider"),await iu(e,new is)}return e._offlineComponents}async function id(e){return e._onlineComponents||(e._uninitializedComponentsProvider?(g("FirestoreClient","Using user provided OnlineComponentProvider"),await ih(e,e._uninitializedComponentsProvider._online)):(g("FirestoreClient","Using default OnlineComponentProvider"),await ih(e,new ia))),e._onlineComponents}async function im(e){let t=await id(e),r=t.eventManager;return r.onListen=nY.bind(null,t.syncEngine),r.onUnlisten=nX.bind(null,t.syncEngine),r}/** + * @license + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function ip(e){let t={};return void 0!==e.timeoutSeconds&&(t.timeoutSeconds=e.timeoutSeconds),t}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let ig=new Map;/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function iy(e,t,r){if(!r)throw new T(E.INVALID_ARGUMENT,`Function ${e}() cannot be called with an empty ${t}.`)}function iw(e){if(!B.isDocumentKey(e))throw new T(E.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${e} has ${e.length}.`)}function iv(e){if(B.isDocumentKey(e))throw new T(E.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${e} has ${e.length}.`)}function i_(e){if(void 0===e)return"undefined";if(null===e)return"null";if("string"==typeof e)return e.length>20&&(e=`${e.substring(0,20)}...`),JSON.stringify(e);if("number"==typeof e||"boolean"==typeof e)return""+e;if("object"==typeof e){if(e instanceof Array)return"an array";{var t;let r=(t=e).constructor?t.constructor.name:null;return r?`a custom ${r} object`:"an object"}}return"function"==typeof e?"a function":_()}function iE(e,t){if("_delegate"in e&&(e=e._delegate),!(e instanceof t)){if(t.name===e.constructor.name)throw new T(E.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{let r=i_(e);throw new T(E.INVALID_ARGUMENT,`Expected type '${t.name}', but it was: ${r}`)}}return e}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class iT{constructor(e){var t,r;if(void 0===e.host){if(void 0!==e.ssl)throw new T(E.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=e.host,this.ssl=null===(t=e.ssl)||void 0===t||t;if(this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,this.localCache=e.localCache,void 0===e.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==e.cacheSizeBytes&&e.cacheSizeBytes<1048576)throw new T(E.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}(function(e,t,r,n){if(!0===t&&!0===n)throw new T(E.INVALID_ARGUMENT,`${e} and ${r} cannot be used together.`)})("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalForceLongPolling?this.experimentalAutoDetectLongPolling=!1:void 0===e.experimentalAutoDetectLongPolling?this.experimentalAutoDetectLongPolling=!0:this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,this.experimentalLongPollingOptions=ip(null!==(r=e.experimentalLongPollingOptions)&&void 0!==r?r:{}),function(e){if(void 0!==e.timeoutSeconds){if(isNaN(e.timeoutSeconds))throw new T(E.INVALID_ARGUMENT,`invalid long polling timeout: ${e.timeoutSeconds} (must not be NaN)`);if(e.timeoutSeconds<5)throw new T(E.INVALID_ARGUMENT,`invalid long polling timeout: ${e.timeoutSeconds} (minimum allowed value is 5)`);if(e.timeoutSeconds>30)throw new T(E.INVALID_ARGUMENT,`invalid long polling timeout: ${e.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!e.useFetchStreams}isEqual(e){var t,r;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&&(t=this.experimentalLongPollingOptions,r=e.experimentalLongPollingOptions,t.timeoutSeconds===r.timeoutSeconds)&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}class iI{constructor(e,t,r,n){this._authCredentials=e,this._appCheckCredentials=t,this._databaseId=r,this._app=n,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new iT({}),this._settingsFrozen=!1}get app(){if(!this._app)throw new T(E.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return void 0!==this._terminateTask}_setSettings(e){if(this._settingsFrozen)throw new T(E.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 iT(e),void 0!==e.credentials&&(this._authCredentials=function(e){if(!e)return new C;switch(e.type){case"firstParty":return new N(e.sessionIndex||"0",e.iamToken||null,e.authTokenFactory||null);case"provider":return e.client;default:throw new T(E.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(e.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(e){let t=ig.get(e);t&&(g("ComponentProvider","Removing Datastore"),ig.delete(e),t.terminate())}(this),Promise.resolve()}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class iS{constructor(e,t,r){this.converter=t,this._query=r,this.type="query",this.firestore=e}withConverter(e){return new iS(this.firestore,e,this._query)}}class iC{constructor(e,t,r){this.converter=t,this._key=r,this.type="document",this.firestore=e}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new iA(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new iC(this.firestore,e,this._key)}}class iA extends iS{constructor(e,t,r){super(e,t,new e7(r)),this._path=r,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){let e=this._path.popLast();return e.isEmpty()?null:new iC(this.firestore,null,new B(e))}withConverter(e){return new iA(this.firestore,e,this._path)}}function ib(e,t,...r){if(e=(0,l.m9)(e),iy("collection","path",t),e instanceof iI){let n=P.fromString(t,...r);return iv(n),new iA(e,null,n)}{if(!(e instanceof iC||e instanceof iA))throw new T(E.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");let n=e._path.child(P.fromString(t,...r));return iv(n),new iA(e.firestore,null,n)}}function iD(e,t,...r){if(e=(0,l.m9)(e),1==arguments.length&&(t=R.newId()),iy("doc","path",t),e instanceof iI){let n=P.fromString(t,...r);return iw(n),new iC(e,null,new B(n))}{if(!(e instanceof iC||e instanceof iA))throw new T(E.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");let n=e._path.child(P.fromString(t,...r));return iw(n),new iC(e.firestore,e instanceof iA?e.converter:null,new B(n))}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class iN{constructor(){this.Xa=Promise.resolve(),this.eu=[],this.tu=!1,this.nu=[],this.ru=null,this.iu=!1,this.su=!1,this.ou=[],this.jo=new r7(this,"async_queue_retry"),this._u=()=>{let e=r5();e&&g("AsyncQueue","Visibility state changed to "+e.visibilityState),this.jo.Ko()};let e=r5();e&&"function"==typeof e.addEventListener&&e.addEventListener("visibilitychange",this._u)}get isShuttingDown(){return this.tu}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.au(),this.uu(e)}enterRestrictedMode(e){if(!this.tu){this.tu=!0,this.su=e||!1;let t=r5();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this._u)}}enqueue(e){if(this.au(),this.tu)return new Promise(()=>{});let t=new I;return this.uu(()=>this.tu&&this.su?Promise.resolve():(e().then(t.resolve,t.reject),t.promise)).then(()=>t.promise)}enqueueRetryable(e){this.enqueueAndForget(()=>(this.eu.push(e),this.cu()))}async cu(){if(0!==this.eu.length){try{await this.eu[0](),this.eu.shift(),this.jo.reset()}catch(e){if(!J(e))throw e;g("AsyncQueue","Operation failed with retryable error: "+e)}this.eu.length>0&&this.jo.qo(()=>this.cu())}}uu(e){let t=this.Xa.then(()=>(this.iu=!0,e().catch(e=>{let t;throw this.ru=e,this.iu=!1,y("INTERNAL UNHANDLED ERROR: ",(t=e.message||"",e.stack&&(t=e.stack.includes(e.message)?e.stack:e.message+"\n"+e.stack),t)),e}).then(e=>(this.iu=!1,e))));return this.Xa=t,t}enqueueAfterDelay(e,t,r){this.au(),this.ou.indexOf(e)>-1&&(t=0);let n=nx.createAndSchedule(this,e,t,r,e=>this.lu(e));return this.nu.push(n),n}au(){this.ru&&_()}verifyOperationInProgress(){}async hu(){let e;do e=this.Xa,await e;while(e!==this.Xa)}Pu(e){for(let t of this.nu)if(t.timerId===e)return!0;return!1}Iu(e){return this.hu().then(()=>{for(let t of(this.nu.sort((e,t)=>e.targetTimeMs-t.targetTimeMs),this.nu))if(t.skipDelay(),"all"!==e&&t.timerId===e)break;return this.hu()})}Tu(e){this.ou.push(e)}lu(e){let t=this.nu.indexOf(e);this.nu.splice(t,1)}}class ik extends iI{constructor(e,t,r,n){super(e,t,r,n),this.type="firestore",this._queue=new iN,this._persistenceKey=(null==n?void 0:n.name)||"[DEFAULT]"}_terminate(){return this._firestoreClient||iL(this),this._firestoreClient.terminate()}}function ix(e,t){let r="object"==typeof e?e:(0,s.Mq)(),n=(0,s.qX)(r,"firestore").getImmediate({identifier:"string"==typeof e?e:t||"(default)"});if(!n._initialized){let e=(0,l.P0)("firestore");e&&function(e,t,r,n={}){var i;let s=(e=iE(e,iI))._getSettings(),a=`${t}:${r}`;if("firestore.googleapis.com"!==s.host&&s.host!==a&&w("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used."),e._setSettings(Object.assign(Object.assign({},s),{host:a,ssl:!1})),n.mockUserToken){let t,r;if("string"==typeof n.mockUserToken)t=n.mockUserToken,r=d.MOCK_USER;else{t=(0,l.Sg)(n.mockUserToken,null===(i=e._app)||void 0===i?void 0:i.options.projectId);let s=n.mockUserToken.sub||n.mockUserToken.user_id;if(!s)throw new T(E.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");r=new d(s)}e._authCredentials=new A(new S(t,r))}}(n,...e)}return n}function iR(e){return e._firestoreClient||iL(e),e._firestoreClient.verifyNotTerminated(),e._firestoreClient}function iL(e){var t,r,n,i;let s=e._freezeSettings(),a=(i=e._databaseId,new eT(i,(null===(t=e._app)||void 0===t?void 0:t.options.appId)||"",e._persistenceKey,s.host,s.ssl,s.experimentalForceLongPolling,s.experimentalAutoDetectLongPolling,ip(s.experimentalLongPollingOptions),s.useFetchStreams));e._firestoreClient=new il(e._authCredentials,e._appCheckCredentials,e._queue,a),(null===(r=s.localCache)||void 0===r?void 0:r._offlineComponentProvider)&&(null===(n=s.localCache)||void 0===n?void 0:n._onlineComponentProvider)&&(e._firestoreClient._uninitializedComponentsProvider={_offlineKind:s.localCache.kind,_offline:s.localCache._offlineComponentProvider,_online:s.localCache._onlineComponentProvider})}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class iV{constructor(e){this._byteString=e}static fromBase64String(e){try{return new iV(em.fromBase64String(e))}catch(e){throw new T(E.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+e)}}static fromUint8Array(e){return new iV(em.fromUint8Array(e))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(e){return this._byteString.isEqual(e._byteString)}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class iO{constructor(...e){for(let t=0;t90)throw new T(E.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(t)||t<-180||t>180)throw new T(E.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+t);this._lat=e,this._long=t}get latitude(){return this._lat}get longitude(){return this._long}isEqual(e){return this._lat===e._lat&&this._long===e._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(e){return L(this._lat,e._lat)||L(this._long,e._long)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let iU=/^__.*__$/;class iq{constructor(e,t,r){this.data=e,this.fieldMask=t,this.fieldTransforms=r}toMutation(e,t){return null!==this.fieldMask?new tB(e,this.data,this.fieldMask,t,this.fieldTransforms):new tq(e,this.data,t,this.fieldTransforms)}}class iB{constructor(e,t,r){this.data=e,this.fieldMask=t,this.fieldTransforms=r}toMutation(e,t){return new tB(e,this.data,this.fieldMask,t,this.fieldTransforms)}}function i$(e){switch(e){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw _()}}class iz{constructor(e,t,r,n,i,s){this.settings=e,this.databaseId=t,this.serializer=r,this.ignoreUndefinedProperties=n,void 0===i&&this.Eu(),this.fieldTransforms=i||[],this.fieldMask=s||[]}get path(){return this.settings.path}get du(){return this.settings.du}Au(e){return new iz(Object.assign(Object.assign({},this.settings),e),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}Ru(e){var t;let r=null===(t=this.path)||void 0===t?void 0:t.child(e),n=this.Au({path:r,Vu:!1});return n.mu(e),n}fu(e){var t;let r=null===(t=this.path)||void 0===t?void 0:t.child(e),n=this.Au({path:r,Vu:!1});return n.Eu(),n}gu(e){return this.Au({path:void 0,Vu:!0})}pu(e){return i0(e,this.settings.methodName,this.settings.yu||!1,this.path,this.settings.wu)}contains(e){return void 0!==this.fieldMask.find(t=>e.isPrefixOf(t))||void 0!==this.fieldTransforms.find(t=>e.isPrefixOf(t.field))}Eu(){if(this.path)for(let e=0;e=Number.MIN_SAFE_INTEGER?tT(n):tE(r,n)}if("boolean"==typeof e)return{booleanValue:e};if("string"==typeof e)return{stringValue:e};if(e instanceof Date){let r=O.fromDate(e);return{timestampValue:ro(t.serializer,r)}}if(e instanceof O){let r=new O(e.seconds,1e3*Math.floor(e.nanoseconds/1e3));return{timestampValue:ro(t.serializer,r)}}if(e instanceof iP)return{geoPointValue:{latitude:e.latitude,longitude:e.longitude}};if(e instanceof iV)return{bytesValue:rl(t.serializer,e._byteString)};if(e instanceof iC){let r=t.databaseId,n=e.firestore._databaseId;if(!n.isEqual(r))throw t.pu(`Document reference is for database ${n.projectId}/${n.database} but should be for database ${r.projectId}/${r.database}`);return{referenceValue:rh(e.firestore._databaseId||t.databaseId,e._key.path)}}throw t.pu(`Unsupported field value: ${i_(e)}`)}(e,t)}function iW(e,t){let r={};return ea(e)?t.path&&t.path.length>0&&t.fieldMask.push(t.path):es(e,(e,n)=>{let i=iG(n,t.Ru(e));null!=i&&(r[e]=i)}),{mapValue:{fields:r}}}function iH(e){return!("object"!=typeof e||null===e||e instanceof Array||e instanceof Date||e instanceof O||e instanceof iP||e instanceof iV||e instanceof iC||e instanceof iF)}function iY(e,t,r){if(!iH(r)||!("object"==typeof r&&null!==r&&(Object.getPrototypeOf(r)===Object.prototype||null===Object.getPrototypeOf(r)))){let n=i_(r);throw"an object"===n?t.pu(e+" a custom object"):t.pu(e+" "+n)}}function iJ(e,t,r){if((t=(0,l.m9)(t))instanceof iO)return t._internalPath;if("string"==typeof t)return iZ(e,t);throw i0("Field path arguments must be of type string or ",e,!1,void 0,r)}let iX=RegExp("[~\\*/\\[\\]]");function iZ(e,t,r){if(t.search(iX)>=0)throw i0(`Invalid field path (${t}). Paths must not contain '~', '*', '/', '[', or ']'`,e,!1,void 0,r);try{return new iO(...t.split("."))._internalPath}catch(n){throw i0(`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,e,!1,void 0,r)}}function i0(e,t,r,n,i){let s=n&&!n.isEmpty(),a=void 0!==i,o=`Function ${t}() called with invalid data`;r&&(o+=" (via `toFirestore()`)"),o+=". ";let l="";return(s||a)&&(l+=" (found",s&&(l+=` in field ${n}`),a&&(l+=` in document ${i}`),l+=")"),new T(E.INVALID_ARGUMENT,o+e+l)}function i1(e,t){return e.some(e=>e.isEqual(t))}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class i2{constructor(e,t,r,n,i){this._firestore=e,this._userDataWriter=t,this._key=r,this._document=n,this._converter=i}get id(){return this._key.path.lastSegment()}get ref(){return new iC(this._firestore,this._converter,this._key)}exists(){return null!==this._document}data(){if(this._document){if(this._converter){let e=new i4(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}get(e){if(this._document){let t=this._document.data.field(i9("DocumentSnapshot.get",e));if(null!==t)return this._userDataWriter.convertValue(t)}}}class i4 extends i2{data(){return super.data()}}function i9(e,t){return"string"==typeof t?iZ(e,t):t instanceof iO?t._internalPath:t._delegate._internalPath}class i3{}class i8 extends i3{}function i5(e,t,...r){let n=[];for(let i of(t instanceof i3&&n.push(t),function(e){let t=e.filter(e=>e instanceof se).length,r=e.filter(e=>e instanceof i6).length;if(t>1||t>0&&r>0)throw new T(E.INVALID_ARGUMENT,"InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.")}(n=n.concat(r)),n))e=i._apply(e);return e}class i6 extends i8{constructor(e,t,r){super(),this._field=e,this._op=t,this._value=r,this.type="where"}static _create(e,t,r){return new i6(e,t,r)}_apply(e){let t=this._parse(e);return sn(e._query,t),new iS(e.firestore,e.converter,ti(e._query,t))}_parse(e){let t=iQ(e.firestore);return function(e,t,r,n,i,s,a){let o;if(i.isKeyField()){if("array-contains"===s||"array-contains-any"===s)throw new T(E.INVALID_ARGUMENT,`Invalid Query. You can't perform '${s}' queries on documentId().`);if("in"===s||"not-in"===s){sr(a,s);let t=[];for(let r of a)t.push(st(n,e,r));o={arrayValue:{values:t}}}else o=st(n,e,a)}else"in"!==s&&"not-in"!==s&&"array-contains-any"!==s||sr(a,s),o=function(e,t,r,n=!1){return iG(r,e.Su(n?4:3,t))}(r,t,a,"in"===s||"not-in"===s);return ej.create(i,s,o)}(e._query,"where",t,e.firestore._databaseId,this._field,this._op,this._value)}}function i7(e,t,r){let n=i9("where",e);return i6._create(n,t,r)}class se extends i3{constructor(e,t){super(),this.type=e,this._queryConstraints=t}static _create(e,t){return new se(e,t)}_parse(e){let t=this._queryConstraints.map(t=>t._parse(e)).filter(e=>e.getFilters().length>0);return 1===t.length?t[0]:eG.create(t,this._getOperator())}_apply(e){let t=this._parse(e);return 0===t.getFilters().length?e:(function(e,t){let r=e;for(let e of t.getFlattenedFilters())sn(r,e),r=ti(r,e)}(e._query,t),new iS(e.firestore,e.converter,ti(e._query,t)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return"and"===this.type?"and":"or"}}function st(e,t,r){if("string"==typeof(r=(0,l.m9)(r))){if(""===r)throw new T(E.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!tt(t)&&-1!==r.indexOf("/"))throw new T(E.INVALID_ARGUMENT,`Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${r}' contains a '/' character.`);let n=t.path.child(P.fromString(r));if(!B.isDocumentKey(n))throw new T(E.INVALID_ARGUMENT,`Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${n}' is not because it has an odd number of segments (${n.length}).`);return ex(e,new B(n))}if(r instanceof iC)return ex(e,r._key);throw new T(E.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${i_(r)}.`)}function sr(e,t){if(!Array.isArray(e)||0===e.length)throw new T(E.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${t.toString()}' filters.`)}function sn(e,t){let r=function(e,t){for(let r of e)for(let e of r.getFlattenedFilters())if(t.indexOf(e.op)>=0)return e.op;return null}(e.filters,function(e){switch(e){case"!=":return["!=","not-in"];case"array-contains-any":case"in":return["not-in"];case"not-in":return["array-contains-any","in","not-in","!="];default:return[]}}(t.op));if(null!==r)throw r===t.op?new T(E.INVALID_ARGUMENT,`Invalid query. You cannot use more than one '${t.op.toString()}' filter.`):new T(E.INVALID_ARGUMENT,`Invalid query. You cannot use '${t.op.toString()}' filters with '${r.toString()}' filters.`)}class si{convertValue(e,t="none"){switch(eC(e)){case 0:return null;case 1:return e.booleanValue;case 2:return ey(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(ew(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 _()}}convertObject(e,t){return this.convertObjectMap(e.fields,t)}convertObjectMap(e,t="none"){let r={};return es(e,(e,n)=>{r[e]=this.convertValue(n,t)}),r}convertGeoPoint(e){return new iP(ey(e.latitude),ey(e.longitude))}convertArray(e,t){return(e.values||[]).map(e=>this.convertValue(e,t))}convertServerTimestamp(e,t){switch(t){case"previous":let r=e_(e);return null==r?null:this.convertValue(r,t);case"estimate":return this.convertTimestamp(eE(e));default:return null}}convertTimestamp(e){let t=eg(e);return new O(t.seconds,t.nanos)}convertDocumentKey(e,t){let r=P.fromString(e);rE(r)||_();let n=new eI(r.get(1),r.get(3)),i=new B(r.popFirst(5));return n.isEqual(t)||y(`Document ${i} contains a document reference within a different database (${n.projectId}/${n.database}) which is not supported. It will be treated as a reference in the current database (${t.projectId}/${t.database}) instead.`),i}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ss{constructor(e,t){this.hasPendingWrites=e,this.fromCache=t}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class sa extends i2{constructor(e,t,r,n,i,s){super(e,t,r,n,s),this._firestore=e,this._firestoreImpl=e,this.metadata=i}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){let t=new so(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)}}get(e,t={}){if(this._document){let r=this._document.data.field(i9("DocumentSnapshot.get",e));if(null!==r)return this._userDataWriter.convertValue(r,t.serverTimestamps)}}}class so extends sa{data(e={}){return super.data(e)}}class sl{constructor(e,t,r,n){this._firestore=e,this._userDataWriter=t,this._snapshot=n,this.metadata=new ss(n.hasPendingWrites,n.fromCache),this.query=r}get docs(){let e=[];return this.forEach(t=>e.push(t)),e}get size(){return this._snapshot.docs.size}get empty(){return 0===this.size}forEach(e,t){this._snapshot.docs.forEach(r=>{e.call(t,new so(this._firestore,this._userDataWriter,r.key,r,new ss(this._snapshot.mutatedKeys.has(r.key),this._snapshot.fromCache),this.query.converter))})}docChanges(e={}){let t=!!e.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new T(E.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()){let t=0;return e._snapshot.docChanges.map(r=>{let n=new so(e._firestore,e._userDataWriter,r.doc.key,r.doc,new ss(e._snapshot.mutatedKeys.has(r.doc.key),e._snapshot.fromCache),e.query.converter);return r.doc,{type:"added",doc:n,oldIndex:-1,newIndex:t++}})}{let r=e._snapshot.oldDocs;return e._snapshot.docChanges.filter(e=>t||3!==e.type).map(t=>{let n=new so(e._firestore,e._userDataWriter,t.doc.key,t.doc,new ss(e._snapshot.mutatedKeys.has(t.doc.key),e._snapshot.fromCache),e.query.converter),i=-1,s=-1;return 0!==t.type&&(i=r.indexOf(t.doc.key),r=r.delete(t.doc.key)),1!==t.type&&(s=(r=r.add(t.doc)).indexOf(t.doc.key)),{type:function(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return _()}}(t.type),doc:n,oldIndex:i,newIndex:s}})}}(this,t),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function su(e){e=iE(e,iC);let t=iE(e.firestore,ik);return(function(e,t,r={}){let n=new I;return e.asyncQueue.enqueueAndForget(async()=>(function(e,t,r,n,i){let s=new io({next:s=>{t.enqueueAndForget(()=>nU(e,a));let o=s.docs.has(r);!o&&s.fromCache?i.reject(new T(E.UNAVAILABLE,"Failed to get document because the client is offline.")):o&&s.fromCache&&n&&"server"===n.source?i.reject(new T(E.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(s)},error:e=>i.reject(e)}),a=new nz(new e7(r.path),s,{includeMetadataChanges:!0,Z_:!0});return nP(e,a)})(await im(e),e.asyncQueue,t,r,n)),n.promise})(iR(t),e._key).then(r=>(function(e,t,r){let n=r.docs.get(t._key),i=new sh(e);return new sa(e,i,t._key,n,new ss(r.hasPendingWrites,r.fromCache),t.converter)})(t,e,r))}class sh extends si{constructor(e){super(),this.firestore=e}convertBytes(e){return new iV(e)}convertReference(e){let t=this.convertDocumentKey(e,this.firestore._databaseId);return new iC(this.firestore,null,t)}}function sc(e){e=iE(e,iS);let t=iE(e.firestore,ik),r=iR(t),n=new sh(t);return(/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function(e){if("L"===e.limitType&&0===e.explicitOrderBy.length)throw new T(E.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}(e._query),(function(e,t,r={}){let n=new I;return e.asyncQueue.enqueueAndForget(async()=>(function(e,t,r,n,i){let s=new nz(r,new io({next:r=>{t.enqueueAndForget(()=>nU(e,s)),r.fromCache&&"server"===n.source?i.reject(new T(E.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(r)},error:e=>i.reject(e)}),{includeMetadataChanges:!0,Z_:!0});return nP(e,s)})(await im(e),e.asyncQueue,t,r,n)),n.promise})(r,e._query).then(r=>new sl(t,n,e,r)))}function sd(e,t,r,...n){e=iE(e,iC);let i=iE(e.firestore,ik),s=iQ(i);return sp(i,[("string"==typeof(t=(0,l.m9)(t))||t instanceof iO?function(e,t,r,n,i,s){let a=e.Su(1,t,r),o=[iJ(t,n,r)],u=[i];if(s.length%2!=0)throw new T(E.INVALID_ARGUMENT,`Function ${t}() needs to be called with an even number of arguments that alternate between field names and values.`);for(let e=0;e=0;--e)if(!i1(h,o[e])){let t=o[e],r=u[e];r=(0,l.m9)(r);let n=a.fu(t);if(r instanceof ij)h.push(t);else{let e=iG(r,n);null!=e&&(h.push(t),c.set(t,e))}}return new iB(c,new ed(h),a.fieldTransforms)}(s,"updateDoc",e._key,t,r,n):function(e,t,r,n){let i=e.Su(1,t,r);iY("Data must be an object, but it was:",i,n);let s=[],a=eU.empty();return es(n,(e,n)=>{let o=iZ(t,e,r);n=(0,l.m9)(n);let u=i.fu(o);if(n instanceof ij)s.push(o);else{let e=iG(n,u);null!=e&&(s.push(o),a.set(o,e))}}),new iB(a,new ed(s),i.fieldTransforms)}(s,"updateDoc",e._key,t)).toMutation(e._key,tV.exists(!0))])}function sf(e){return sp(iE(e.firestore,ik),[new tQ(e._key,tV.none())])}function sm(e,t){var r,n;let i=iE(e.firestore,ik),s=iD(e),a=(r=e.converter)?n&&(n.merge||n.mergeFields)?r.toFirestore(t,n):r.toFirestore(t):t;return sp(i,[(function(e,t,r,n,i,s={}){let a,o;let l=e.Su(s.merge||s.mergeFields?2:0,t,r,i);iY("Data must be an object, but it was:",l,n);let u=iW(n,l);if(s.merge)a=new ed(l.fieldMask),o=l.fieldTransforms;else if(s.mergeFields){let e=[];for(let n of s.mergeFields){let i=iJ(t,n,r);if(!l.contains(i))throw new T(E.INVALID_ARGUMENT,`Field '${i}' is specified in your field mask but missing from your input data.`);i1(e,i)||e.push(i)}a=new ed(e),o=l.fieldTransforms.filter(e=>a.covers(e.field))}else a=null,o=l.fieldTransforms;return new iq(new eU(u),a,o)})(iQ(e.firestore),"addDoc",s._key,a,null!==e.converter,{}).toMutation(s._key,tV.exists(!1))]).then(()=>s)}function sp(e,t){return function(e,t){let r=new I;return e.asyncQueue.enqueueAndForget(async()=>nZ(await id(e).then(e=>e.syncEngine),t,r)),r.promise}(iR(e),t)}new WeakMap,function(e=!0){f=s.Jn,(0,s.Xd)(new a.wA("firestore",(t,{instanceIdentifier:r,options:n})=>{let i=t.getProvider("app").getImmediate(),s=new ik(new b(t.getProvider("auth-internal")),new x(t.getProvider("app-check-internal")),function(e,t){if(!Object.prototype.hasOwnProperty.apply(e.options,["projectId"]))throw new T(E.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new eI(e.options.projectId,t)}(i,r),i);return n=Object.assign({useFetchStreams:e},n),s._setSettings(n),s},"PUBLIC").setMultipleInstances(!0)),(0,s.KN)(c,"4.4.2",void 0),(0,s.KN)(c,"4.4.2","esm2017")}()}}]); \ No newline at end of file diff --git a/out/_next/static/chunks/c16184b3-33702c9ab78f9540.js b/out/_next/static/chunks/c16184b3-33702c9ab78f9540.js new file mode 100644 index 0000000..5aef216 --- /dev/null +++ b/out/_next/static/chunks/c16184b3-33702c9ab78f9540.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[976],{9417:function(c,e,n){n.d(e,{Vui:function(){return i},Yai:function(){return s},a0w:function(){return a},fV7:function(){return r},wJh:function(){return f}});var i={prefix:"fas",iconName:"trash-can",icon:[448,512,[61460,"trash-alt"],"f2ed","M135.2 17.7C140.6 6.8 151.7 0 163.8 0H284.2c12.1 0 23.2 6.8 28.6 17.7L320 32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 96 0 81.7 0 64S14.3 32 32 32h96l7.2-14.3zM32 128H416V448c0 35.3-28.7 64-64 64H96c-35.3 0-64-28.7-64-64V128zm96 64c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16z"]},s={prefix:"fas",iconName:"pen-to-square",icon:[512,512,["edit"],"f044","M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160V416c0 53 43 96 96 96H352c53 0 96-43 96-96V320c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H96z"]},r={prefix:"fas",iconName:"circle-check",icon:[512,512,[61533,"check-circle"],"f058","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"]},a={prefix:"fas",iconName:"circle-arrow-left",icon:[512,512,["arrow-circle-left"],"f0a8","M512 256A256 256 0 1 0 0 256a256 256 0 1 0 512 0zM231 127c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-71 71L376 232c13.3 0 24 10.7 24 24s-10.7 24-24 24l-182.1 0 71 71c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L119 273c-9.4-9.4-9.4-24.6 0-33.9L231 127z"]},f={prefix:"fas",iconName:"map-pin",icon:[320,512,[128205],"f276","M16 144a144 144 0 1 1 288 0A144 144 0 1 1 16 144zM160 80c8.8 0 16-7.2 16-16s-7.2-16-16-16c-53 0-96 43-96 96c0 8.8 7.2 16 16 16s16-7.2 16-16c0-35.3 28.7-64 64-64zM128 480V317.1c10.4 1.9 21.1 2.9 32 2.9s21.6-1 32-2.9V480c0 17.7-14.3 32-32 32s-32-14.3-32-32z"]}}}]); \ No newline at end of file diff --git a/out/_next/static/chunks/fd9d1056-eb01b4e7e03982cf.js b/out/_next/static/chunks/fd9d1056-eb01b4e7e03982cf.js new file mode 100644 index 0000000..c6b0bf5 --- /dev/null +++ b/out/_next/static/chunks/fd9d1056-eb01b4e7e03982cf.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[971],{4417:function(e,t,n){var r,l=n(2265),a=n(8172),o={usingClientEntryPoint:!1,Events:null,Dispatcher:{current:null}};function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;np||(e.current=d[p],d[p]=null,p--)}function g(e,t){d[++p]=e.current,e.current=t}var y=Symbol.for("react.element"),v=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),S=Symbol.for("react.provider"),C=Symbol.for("react.context"),E=Symbol.for("react.server_context"),x=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),L=Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var T=Symbol.for("react.offscreen"),F=Symbol.for("react.legacy_hidden"),M=Symbol.for("react.cache");Symbol.for("react.tracing_marker");var O=Symbol.iterator;function R(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=O&&e[O]||e["@@iterator"])?e:null}var D=m(null),A=m(null),I=m(null),U=m(null),$={$$typeof:C,_currentValue:null,_currentValue2:null,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};function B(e,t){switch(g(I,t),g(A,e),g(D,null),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)&&(t=t.namespaceURI)?sW(t):0;break;default:if(t=(e=8===e?t.parentNode:t).tagName,e=e.namespaceURI)t=sH(e=sW(e),t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}h(D),g(D,t)}function V(){h(D),h(A),h(I)}function j(e){null!==e.memoizedState&&g(U,e);var t=D.current,n=sH(t,e.type);t!==n&&(g(A,e),g(D,n))}function Q(e){A.current===e&&(h(D),h(A)),U.current===e&&(h(U),$._currentValue=null)}var W=a.unstable_scheduleCallback,H=a.unstable_cancelCallback,q=a.unstable_shouldYield,K=a.unstable_requestPaint,Y=a.unstable_now,X=a.unstable_getCurrentPriorityLevel,G=a.unstable_ImmediatePriority,Z=a.unstable_UserBlockingPriority,J=a.unstable_NormalPriority,ee=a.unstable_LowPriority,et=a.unstable_IdlePriority,en=null,er=null,el=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(ea(e)/eo|0)|0},ea=Math.log,eo=Math.LN2,ei=128,eu=4194304;function es(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194176&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ec(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,l=e.suspendedLanes;e=e.pingedLanes;var a=134217727&n;return 0!==a?0!=(n=a&~l)?r=es(n):0!=(e&=a)&&(r=es(e)):0!=(n&=~l)?r=es(n):0!==e&&(r=es(e)),0===r?0:0!==t&&t!==r&&0==(t&l)&&((l=r&-r)>=(e=t&-t)||32===l&&0!=(4194176&e))?t:r}function ef(e,t){return e.errorRecoveryDisabledLanes&t?0:0!=(e=-536870913&e.pendingLanes)?e:536870912&e?536870912:0}function ed(){var e=eu;return 0==(62914560&(eu<<=1))&&(eu=4194304),e}function ep(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function em(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0)}function eh(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-el(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|4194218&n}function eg(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-el(n),l=1<l||u[r]!==s[l]){var c="\n"+u[r].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=r&&0<=l);break}}}finally{eK=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?eq(n):""}var eX=Symbol.for("react.client.reference");function eG(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function eZ(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function eJ(e){e._valueTracker||(e._valueTracker=function(e){var t=eZ(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var l=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},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 e0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=eZ(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function e1(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var e2=/[\n"\\]/g;function e3(e){return e.replace(e2,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function e4(e,t,n,r,l,a,o,i){e.name="",null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o?e.type=o:e.removeAttribute("type"),null!=t?"number"===o?(0===t&&""===e.value||e.value!=t)&&(e.value=""+eG(t)):e.value!==""+eG(t)&&(e.value=""+eG(t)):"submit"!==o&&"reset"!==o||e.removeAttribute("value"),null!=t?e8(e,o,eG(t)):null!=n?e8(e,o,eG(n)):null!=r&&e.removeAttribute("value"),null==l&&null!=a&&(e.defaultChecked=!!a),null!=l&&(e.checked=l&&"function"!=typeof l&&"symbol"!=typeof l),null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&"boolean"!=typeof i?e.name=""+eG(i):e.removeAttribute("name")}function e6(e,t,n,r,l,a,o,i){if(null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a&&(e.type=a),null!=t||null!=n){if(!("submit"!==a&&"reset"!==a||null!=t))return;n=null!=n?""+eG(n):"",t=null!=t?""+eG(t):n,i||t===e.value||(e.value=t),e.defaultValue=t}r="function"!=typeof(r=null!=r?r:l)&&"symbol"!=typeof r&&!!r,e.checked=i?e.checked:!!r,e.defaultChecked=!!r,null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o&&(e.name=o)}function e8(e,t,n){"number"===t&&e1(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}var e5=Array.isArray;function e7(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=iU.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}var tn=tt;"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(tn=function(e,t){return MSApp.execUnsafeLocalFunction(function(){return tt(e,t)})});var tr=tn;function tl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType){n.nodeValue=t;return}}e.textContent=t}var ta=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function to(e,t,n){var r=0===t.indexOf("--");null==n||"boolean"==typeof n||""===n?r?e.setProperty(t,""):"float"===t?e.cssFloat="":e[t]="":r?e.setProperty(t,n):"number"!=typeof n||0===n||ta.has(t)?"float"===t?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function ti(e,t,n){if(null!=t&&"object"!=typeof t)throw Error(i(62));if(e=e.style,null!=n){for(var r in n)!n.hasOwnProperty(r)||null!=t&&t.hasOwnProperty(r)||(0===r.indexOf("--")?e.setProperty(r,""):"float"===r?e.cssFloat="":e[r]="");for(var l in t)r=t[l],t.hasOwnProperty(l)&&n[l]!==r&&to(e,l,r)}else for(var a in t)t.hasOwnProperty(a)&&to(e,a,t[a])}function tu(e){if(-1===e.indexOf("-"))return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ts=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),tc=null;function tf(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var td=null,tp=null;function tm(e){var t=eT(e);if(t&&(e=t.stateNode)){var n=eM(e);switch(e=t.stateNode,t.type){case"input":if(e4(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+e3(""+t)+'"][type="radio"]'),t=0;t>=o,l-=o,t$=1<<32-el(t)+l|n<h?(g=f,f=null):g=f.sibling;var y=p(l,f,i[h],u);if(null===y){null===f&&(f=g);break}e&&f&&null===y.alternate&&t(l,f),o=a(y,o,h),null===c?s=y:c.sibling=y,c=y,f=g}if(h===i.length)return n(l,f),tK&&tV(l,h),s;if(null===f){for(;hg?(y=h,h=null):y=h.sibling;var b=p(l,h,v.value,s);if(null===b){null===h&&(h=y);break}e&&h&&null===b.alternate&&t(l,h),o=a(b,o,g),null===f?c=b:f.sibling=b,f=b,h=y}if(v.done)return n(l,h),tK&&tV(l,g),c;if(null===h){for(;!v.done;g++,v=u.next())null!==(v=d(l,v.value,s))&&(o=a(v,o,g),null===f?c=v:f.sibling=v,f=v);return tK&&tV(l,g),c}for(h=r(l,h);!v.done;g++,v=u.next())null!==(v=m(h,l,g,v.value,s))&&(e&&null!==v.alternate&&h.delete(null===v.key?g:v.key),o=a(v,o,g),null===f?c=v:f.sibling=v,f=v);return e&&h.forEach(function(e){return t(l,e)}),tK&&tV(l,g),c}(c,f,h,g);if("function"==typeof h.then)return s(c,f,n_(h),g);if(h.$$typeof===C||h.$$typeof===E)return s(c,f,an(c,h,g),g);nT(c,h)}return"string"==typeof h&&""!==h||"number"==typeof h?(h=""+h,null!==f&&6===f.tag?(n(c,f.sibling),(f=l(f,h)).return=c):(n(c,f),(f=iv(h,c.mode,g)).return=c),o(c=f)):n(c,f)}(s,c,f,h),nP=null,s}}var nO=nM(!0),nR=nM(!1),nD=m(null),nA=m(0);function nI(e,t){g(nA,e=ob),g(nD,t),ob=e|t.baseLanes}function nU(){g(nA,ob),g(nD,nD.current)}function n$(){ob=nA.current,h(nD),h(nA)}var nB=m(null),nV=null;function nj(e){var t=e.alternate;g(nq,1&nq.current),g(nB,e),null===nV&&(null===t||null!==nD.current?nV=e:null!==t.memoizedState&&(nV=e))}function nQ(e){if(22===e.tag){if(g(nq,nq.current),g(nB,e),null===nV){var t=e.alternate;null!==t&&null!==t.memoizedState&&(nV=e)}}else nW(e)}function nW(){g(nq,nq.current),g(nB,nB.current)}function nH(e){h(nB),nV===e&&(nV=null),h(nq)}var nq=m(0);function nK(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!=(128&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 nY=null,nX=null,nG=!1,nZ=!1,nJ=!1,n0=0;function n1(e){e!==nX&&null===e.next&&(null===nX?nY=nX=e:nX=nX.next=e),nZ=!0,nG||(nG=!0,n8(n4))}function n2(e){if(!nJ&&nZ){var t=null;nJ=!0;do for(var n=!1,r=nY;null!==r;){if(!e||0===r.tag){var l=oh,a=ec(r,r===op?l:0);if(0!=(3&a))try{if(n=!0,l=r,0!=(6&od))throw Error(i(327));if(!ie()){var o=o3(l,a);if(0!==l.tag&&2===o){var u=a,s=ef(l,u);0!==s&&(a=s,o=oQ(l,u,s))}if(1===o)throw u=ow,oG(l,0),oq(l,a,0),n1(l),u;6===o?oq(l,a,ox):(l.finishedWork=l.current.alternate,l.finishedLanes=a,o7(l,oP,oL,ox))}n1(l)}catch(e){null===t?t=[e]:t.push(e)}}r=r.next}while(n);if(nJ=!1,null!==t){if(1a?a:8;var o=ro.transition;ro.transition={},li(e,!1,t,n);try{var i=l();if(null!==i&&"object"==typeof i&&"function"==typeof i.then){var u=rt(i,r);lo(e,t,u)}else{var s=rn(i,r);lo(e,t,s)}}catch(n){lo(e,t,{then:function(){},status:"rejected",reason:n})}finally{ey=a,ro.transition=o}}function le(e,t,n,r){if(5!==e.tag)throw Error(i(476));if(null===e.memoizedState){var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rT,lastRenderedState:f},a=l;l={memoizedState:f,baseState:f,baseQueue:null,queue:l,next:null},e.memoizedState=l;var o=e.alternate;null!==o&&(o.memoizedState=l)}else a=e.memoizedState.queue;r9(e,a,t,f,function(){return n(r)})}function lt(){var e=at($);return null!==e?e:f}function ln(){return rN().memoizedState}function lr(){return rN().memoizedState}function ll(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=oB(t),r=nd(t,e=nf(n),n);null!==r&&(oV(r,t,n),np(r,t,n)),t={cache:au()},e.payload=t;return}t=t.return}}function la(e,t,n){var r=oB(e);n={lane:r,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},lu(e)?ls(t,n):null!==(n=nl(e,t,n,r))&&(oV(n,e,r),lc(n,t,r))}function lo(e,t,n){var r=oB(e),l={lane:r,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(lu(e))ls(t,l);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var o=t.lastRenderedState,i=a(o,n);if(l.hasEagerState=!0,l.eagerState=i,tF(i,o)){nr(e,t,l,0),null===op&&nn();return}}catch(e){}finally{}null!==(n=nl(e,t,l,r))&&(oV(n,e,r),lc(n,t,r))}}function li(e,t,n,r){if(r={lane:2,revertLane:n5(),action:r,hasEagerState:!1,eagerState:null,next:null},lu(e)){if(t)throw Error(i(479))}else null!==(t=nl(e,n,r,2))&&oV(t,e,2)}function lu(e){var t=e.alternate;return e===ru||null!==t&&t===ru}function ls(e,t){rd=rf=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function lc(e,t,n){if(0!=(4194176&n)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,eg(e,n)}}i$=function(){return{lastEffect:null,events:null,stores:null}};var lf={readContext:at,use:rL,useCallback:rv,useContext:rv,useEffect:rv,useImperativeHandle:rv,useInsertionEffect:rv,useLayoutEffect:rv,useMemo:rv,useReducer:rv,useRef:rv,useState:rv,useDebugValue:rv,useDeferredValue:rv,useTransition:rv,useSyncExternalStore:rv,useId:rv};lf.useCacheRefresh=rv,lf.useHostTransitionStatus=rv,lf.useFormState=rv,lf.useOptimistic=rv;var ld={readContext:at,use:rL,useCallback:function(e,t){return rP().memoizedState=[e,void 0===t?null:t],e},useContext:at,useEffect:rJ,useImperativeHandle:function(e,t,n){n=null!=n?n.concat([e]):null,rG(4194308,4,r3.bind(null,t,e),n)},useLayoutEffect:function(e,t){return rG(4194308,4,e,t)},useInsertionEffect:function(e,t){rG(4,2,e,t)},useMemo:function(e,t){var n=rP();return t=void 0===t?null:t,rp&&e(),e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=rP();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=la.bind(null,ru,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},rP().memoizedState=e},useState:function(e){var t=(e=rB(e)).queue,n=lo.bind(null,ru,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:r6,useDeferredValue:function(e){return rP().memoizedState=e,e},useTransition:function(){var e=rB(!1);return e=r9.bind(null,ru,e.queue,!0,!1),rP().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=ru,l=rP();if(tK){if(void 0===n)throw Error(i(407));n=n()}else{if(n=t(),null===op)throw Error(i(349));0!=(60&oh)||rD(r,t,n)}l.memoizedState=n;var a={value:n,getSnapshot:t};return l.queue=a,rJ(rI.bind(null,r,a,e),[e]),r.flags|=2048,rY(9,rA.bind(null,r,a,n,t),{destroy:void 0},null),n},useId:function(){var e=rP(),t=op.identifierPrefix;if(tK){var n=tB,r=t$;t=":"+t+"R"+(n=(r&~(1<<32-el(r)-1)).toString(32)+n),0<(n=rm++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=ry++).toString(32)+":";return e.memoizedState=t},useCacheRefresh:function(){return rP().memoizedState=ll.bind(null,ru)}};ld.useHostTransitionStatus=lt,ld.useFormState=function(e,t){if(tK){var n=op.formState;if(null!==n){e:{if(tK){if(tq){t:{for(var r=tq,l=tX;8!==r.nodeType;)if(!l||null===(r=s4(r))){r=null;break t}r="F!"===(l=r.data)||"F"===l?r:null}if(r){tq=s4(r),r="F!"===r.data;break e}}t3()}r=!1}r&&(t=n[0])}}return(n=rP()).memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rH,lastRenderedState:t},n.queue=r,n=lo.bind(null,ru,r),r.dispatch=n,r=rP(),l={state:t,dispatch:null,action:e,pending:null},r.queue=l,n=rj.bind(null,ru,l,n),l.dispatch=n,r.memoizedState=e,[t,n]},ld.useOptimistic=function(e){var t=rP();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=li.bind(null,ru,!0,n),n.dispatch=t,[e,t]};var lp={readContext:at,use:rL,useCallback:r8,useContext:at,useEffect:r0,useImperativeHandle:r4,useInsertionEffect:r1,useLayoutEffect:r2,useMemo:r5,useReducer:rF,useRef:rX,useState:function(){return rF(rT)},useDebugValue:r6,useDeferredValue:function(e){return r7(rN(),rs.memoizedState,e)},useTransition:function(){var e=rF(rT)[0],t=rN().memoizedState;return["boolean"==typeof e?e:r_(e),t]},useSyncExternalStore:rR,useId:ln};lp.useCacheRefresh=lr,lp.useHostTransitionStatus=lt,lp.useFormState=function(e){return rq(rN(),rs,e)},lp.useOptimistic=function(e,t){return rV(rN(),rs,e,t)};var lm={readContext:at,use:rL,useCallback:r8,useContext:at,useEffect:r0,useImperativeHandle:r4,useInsertionEffect:r1,useLayoutEffect:r2,useMemo:r5,useReducer:rO,useRef:rX,useState:function(){return rO(rT)},useDebugValue:r6,useDeferredValue:function(e){var t=rN();return null===rs?(t.memoizedState=e,e):r7(t,rs.memoizedState,e)},useTransition:function(){var e=rO(rT)[0],t=rN().memoizedState;return["boolean"==typeof e?e:r_(e),t]},useSyncExternalStore:rR,useId:ln};function lh(e,t){if(e&&e.defaultProps)for(var n in t=u({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}function lg(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:u({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}lm.useCacheRefresh=lr,lm.useHostTransitionStatus=lt,lm.useFormState=function(e){var t=rN(),n=rs;if(null!==n)return rq(t,n,e);t=t.memoizedState;var r=(n=rN()).queue.dispatch;return n.memoizedState=e,[t,r]},lm.useOptimistic=function(e,t){var n=rN();return null!==rs?rV(n,rs,e,t):(n.baseState=e,[e,n.queue.dispatch])};var ly={isMounted:function(e){return!!(e=e._reactInternals)&&ty(e)===e},enqueueSetState:function(e,t,n){var r=oB(e=e._reactInternals),l=nf(r);l.payload=t,null!=n&&(l.callback=n),null!==(t=nd(e,l,r))&&(oV(t,e,r),np(t,e,r))},enqueueReplaceState:function(e,t,n){var r=oB(e=e._reactInternals),l=nf(r);l.tag=1,l.payload=t,null!=n&&(l.callback=n),null!==(t=nd(e,l,r))&&(oV(t,e,r),np(t,e,r))},enqueueForceUpdate:function(e,t){var n=oB(e=e._reactInternals),r=nf(n);r.tag=2,null!=t&&(r.callback=t),null!==(t=nd(e,r,n))&&(oV(t,e,n),np(t,e,n))}};function lv(e,t,n,r,l,a,o){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,o):!t.prototype||!t.prototype.isPureReactComponent||!nv(n,r)||!nv(l,a)}function lb(e,t,n){var r=!1,l=tw,a=t.contextType;return"object"==typeof a&&null!==a?a=at(a):(l=tz(t)?tE:tS.current,a=(r=null!=(r=t.contextTypes))?tx(e,l):tw),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=ly,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=a),t}function lk(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&&ly.enqueueReplaceState(t,t.state,null)}function lw(e,t,n,r){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs={},ns(e);var a=t.contextType;"object"==typeof a&&null!==a?l.context=at(a):(a=tz(t)?tE:tS.current,l.context=tx(e,a)),l.state=e.memoizedState,"function"==typeof(a=t.getDerivedStateFromProps)&&(lg(e,t,a,n),l.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof l.getSnapshotBeforeUpdate||"function"!=typeof l.UNSAFE_componentWillMount&&"function"!=typeof l.componentWillMount||(t=l.state,"function"==typeof l.componentWillMount&&l.componentWillMount(),"function"==typeof l.UNSAFE_componentWillMount&&l.UNSAFE_componentWillMount(),t!==l.state&&ly.enqueueReplaceState(l,l.state,null),nh(e,n,l,r),l.state=e.memoizedState),"function"==typeof l.componentDidMount&&(e.flags|=4194308)}function lS(e,t){try{var n="",r=t;do n+=function(e){switch(e.tag){case 26:case 27:case 5:return eq(e.type);case 16:return eq("Lazy");case 13:return eq("Suspense");case 19:return eq("SuspenseList");case 0:case 2:case 15:return e=eY(e.type,!1);case 11:return e=eY(e.type.render,!1);case 1:return e=eY(e.type,!0);default:return""}}(r),r=r.return;while(r);var l=n}catch(e){l="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:l,digest:null}}function lC(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function lE(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}function lx(e,t,n){(n=nf(n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){oT||(oT=!0,oF=r),lE(e,t)},n}function lz(e,t,n){(n=nf(n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){lE(e,t)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){lE(e,t),"function"!=typeof r&&(null===oM?oM=new Set([this]):oM.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}function lP(e,t,n,r,l){return 0==(1&e.mode)?e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=nf(2)).tag=2,nd(n,t,2))),n.lanes|=2):(e.flags|=65536,e.lanes=l),e}var lN=s.ReactCurrentOwner,l_=Error(i(461)),lL=!1;function lT(e,t,n,r){t.child=null===e?nR(t,null,n,r):nO(t,e.child,n,r)}function lF(e,t,n,r,l){n=n.render;var a=t.ref;return(ae(t,l),r=rk(e,t,n,r,a,l),n=rE(),null===e||lL)?(tK&&n&&tQ(t),t.flags|=1,lT(e,t,r,l),t.child):(rx(e,t,l),l0(e,t,l))}function lM(e,t,n,r,l){if(null===e){var a=n.type;return"function"!=typeof a||id(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=ih(n.type,null,r,null,t,t.mode,l)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,lO(e,t,a,r,l))}if(a=e.child,0==(e.lanes&l)){var o=a.memoizedProps;if((n=null!==(n=n.compare)?n:nv)(o,r)&&e.ref===t.ref)return l0(e,t,l)}return t.flags|=1,(e=ip(a,r)).ref=t.ref,e.return=t,t.child=e}function lO(e,t,n,r,l){if(null!==e){var a=e.memoizedProps;if(nv(a,r)&&e.ref===t.ref){if(lL=!1,t.pendingProps=r=a,0==(e.lanes&l))return t.lanes=e.lanes,l0(e,t,l);0!=(131072&e.flags)&&(lL=!0)}}return lI(e,t,n,r,l)}function lR(e,t,n){var r=t.pendingProps,l=r.children,a=0!=(2&t.stateNode._pendingVisibility),o=null!==e?e.memoizedState:null;if(lA(e,t),"hidden"===r.mode||a){if(0!=(128&t.flags)){if(n=null!==o?o.baseLanes|n:n,null!==e){for(l=0,r=t.child=e.child;null!==r;)l=l|r.lanes|r.childLanes,r=r.sibling;t.childLanes=l&~n}else t.childLanes=0,t.child=null;return lD(e,t,n)}if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null},null!==e&&ap(t,null),nU(),nQ(t);else{if(0==(536870912&n))return t.lanes=t.childLanes=536870912,lD(e,t,null!==o?o.baseLanes|n:n);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&ap(t,null!==o?o.cachePool:null),null!==o?nI(t,o):nU(),nQ(t)}}else null!==o?(ap(t,o.cachePool),nI(t,o),nW(t),t.memoizedState=null):(null!==e&&ap(t,null),nU(),nW(t));return lT(e,t,l,n),t.child}function lD(e,t,n){var r=ad();return r=null===r?null:{parent:ai._currentValue,pool:r},t.memoizedState={baseLanes:n,cachePool:r},null!==e&&ap(t,null),nU(),nQ(t),null}function lA(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function lI(e,t,n,r,l){var a=tz(n)?tE:tS.current;return(a=tx(t,a),ae(t,l),n=rk(e,t,n,r,a,l),r=rE(),null===e||lL)?(tK&&r&&tQ(t),t.flags|=1,lT(e,t,n,l),t.child):(rx(e,t,l),l0(e,t,l))}function lU(e,t,n,r,l,a){return(ae(t,a),n=rS(t,r,n,l),rw(),r=rE(),null===e||lL)?(tK&&r&&tQ(t),t.flags|=1,lT(e,t,n,a),t.child):(rx(e,t,a),l0(e,t,a))}function l$(e,t,n,r,l){if(tz(n)){var a=!0;tL(t)}else a=!1;if(ae(t,l),null===t.stateNode)lJ(e,t),lb(t,n,r),lw(t,n,r,l),r=!0;else if(null===e){var o=t.stateNode,i=t.memoizedProps;o.props=i;var u=o.context,s=n.contextType;s="object"==typeof s&&null!==s?at(s):tx(t,s=tz(n)?tE:tS.current);var c=n.getDerivedStateFromProps,f="function"==typeof c||"function"==typeof o.getSnapshotBeforeUpdate;f||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(i!==r||u!==s)&&lk(t,o,r,s),nu=!1;var d=t.memoizedState;o.state=d,nh(t,r,o,l),u=t.memoizedState,i!==r||d!==u||tC.current||nu?("function"==typeof c&&(lg(t,n,c,r),u=t.memoizedState),(i=nu||lv(t,n,i,r,d,u,s))?(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|=4194308)):("function"==typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),o.props=r,o.state=u,o.context=s,r=i):("function"==typeof o.componentDidMount&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,nc(e,t),i=t.memoizedProps,s=t.type===t.elementType?i:lh(t.type,i),o.props=s,f=t.pendingProps,d=o.context,u="object"==typeof(u=n.contextType)&&null!==u?at(u):tx(t,u=tz(n)?tE:tS.current);var p=n.getDerivedStateFromProps;(c="function"==typeof p||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(i!==f||d!==u)&&lk(t,o,r,u),nu=!1,d=t.memoizedState,o.state=d,nh(t,r,o,l);var m=t.memoizedState;i!==f||d!==m||tC.current||nu?("function"==typeof p&&(lg(t,n,p,r),m=t.memoizedState),(s=nu||lv(t,n,s,r,d,m,u)||!1)?(c||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(r,m,u),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,m,u)),"function"==typeof o.componentDidUpdate&&(t.flags|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof o.componentDidUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=u,r=s):("function"!=typeof o.componentDidUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return lB(e,t,n,r,a,l)}function lB(e,t,n,r,l,a){lA(e,t);var o=0!=(128&t.flags);if(!r&&!o)return l&&tT(t,n,!1),l0(e,t,a);r=t.stateNode,lN.current=t;var i=o&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&o?(t.child=nO(t,e.child,null,a),t.child=nO(t,null,i,a)):lT(e,t,i,a),t.memoizedState=r.state,l&&tT(t,n,!0),t.child}function lV(e){var t=e.stateNode;t.pendingContext?tN(e,t.pendingContext,t.pendingContext!==t.context):t.context&&tN(e,t.context,!1),B(e,t.containerInfo)}function lj(e,t,n,r,l){return t5(),t7(l),t.flags|=256,lT(e,t,n,r),t.child}var lQ={dehydrated:null,treeContext:null,retryLane:0};function lW(e){return{baseLanes:e,cachePool:am()}}function lH(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=ox),e}function lq(e,t,n){var r,l=t.pendingProps,a=!1,o=0!=(128&t.flags);if((r=o)||(r=(null===e||null!==e.memoizedState)&&0!=(2&nq.current)),r&&(a=!0,t.flags&=-129),r=0!=(32&t.flags),t.flags&=-33,null===e){if(tK){if(a?nj(t):nW(t),tK){var u=o=tq;if(u){if(!t1(t,u)){t2(t)&&t3(),tq=s4(u);var s=tH;tq&&t1(t,tq)?tG(s,u):(tZ(tH,t),tK=!1,tH=t,tq=o)}}else t2(t)&&t3(),tZ(tH,t),tK=!1,tH=t,tq=o}if(null!==(o=t.memoizedState)&&null!==(o=o.dehydrated))return 0==(1&t.mode)?t.lanes=2:"$!"===o.data?t.lanes=16:t.lanes=536870912,null;nH(t)}return(o=l.children,l=l.fallback,a)?(nW(t),a=t.mode,u=t.child,o={mode:"hidden",children:o},0==(1&a)&&null!==u?(u.childLanes=0,u.pendingProps=o):u=iy(o,a,0,null),l=ig(l,a,n,null),u.return=t,l.return=t,u.sibling=l,t.child=u,(a=t.child).memoizedState=lW(n),a.childLanes=lH(e,r,n),t.memoizedState=lQ,l):(nj(t),lK(t,o))}if(null!==(u=e.memoizedState)&&null!==(s=u.dehydrated))return function(e,t,n,r,l,a,o,u){if(n)return 256&t.flags?(nj(t),t.flags&=-257,lY(e,t,u,a=lC(Error(i(422))))):null!==t.memoizedState?(nW(t),t.child=e.child,t.flags|=128,null):(nW(t),a=l.fallback,o=t.mode,l=iy({mode:"visible",children:l.children},o,0,null),a=ig(a,o,u,null),a.flags|=2,l.return=t,a.return=t,l.sibling=a,t.child=l,0!=(1&t.mode)&&nO(t,e.child,null,u),(o=t.child).memoizedState=lW(u),o.childLanes=lH(e,r,u),t.memoizedState=lQ,a);if(nj(t),0==(1&t.mode))return lY(e,t,u,null);if("$!"===a.data){if(a=a.nextSibling&&a.nextSibling.dataset)var s=a.dgst;return a=s,(r=Error(i(419))).digest=a,lY(e,t,u,a=lC(r,a,void 0))}if(r=0!=(u&e.childLanes),lL||r){if(null!==(r=op)){if(0!=(42&(l=u&-u)))l=1;else switch(l){case 2:l=1;break;case 8:l=4;break;case 32:l=16;break;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:l=64;break;case 268435456:l=134217728;break;default:l=0}if(0!==(l=0!=(l&(r.suspendedLanes|u))?0:l)&&l!==o.retryLane)throw o.retryLane=l,na(e,l),oV(r,e,l),l_}return"$?"!==a.data&&o2(),lY(e,t,u,null)}return"$?"===a.data?(t.flags|=128,t.child=e.child,t=ii.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,tq=s3(a.nextSibling),tH=t,tK=!0,tY=null,tX=!1,null!==e&&(tA[tI++]=t$,tA[tI++]=tB,tA[tI++]=tU,t$=e.id,tB=e.overflow,tU=t),t=lK(t,l.children),t.flags|=4096,t)}(e,t,o,r,l,s,u,n);if(a){nW(t),a=l.fallback,o=t.mode,s=(u=e.child).sibling;var c={mode:"hidden",children:l.children};return 0==(1&o)&&t.child!==u?((l=t.child).childLanes=0,l.pendingProps=c,t.deletions=null):(l=ip(u,c)).subtreeFlags=31457280&u.subtreeFlags,null!==s?a=ip(s,a):(a=ig(a,o,n,null),a.flags|=2),a.return=t,l.return=t,l.sibling=a,t.child=l,l=a,a=t.child,null===(o=e.child.memoizedState)?o=lW(n):(null!==(u=o.cachePool)?(s=ai._currentValue,u=u.parent!==s?{parent:s,pool:s}:u):u=am(),o={baseLanes:o.baseLanes|n,cachePool:u}),a.memoizedState=o,a.childLanes=lH(e,r,n),t.memoizedState=lQ,l}return nj(t),e=(r=e.child).sibling,r=ip(r,{mode:"visible",children:l.children}),0==(1&t.mode)&&(r.lanes=n),r.return=t,r.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function lK(e,t){return(t=iy({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function lY(e,t,n,r){return null!==r&&t7(r),nO(t,e.child,null,n),e=lK(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function lX(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),l7(e.return,t,n)}function lG(e,t,n,r,l){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=l)}function lZ(e,t,n){var r=t.pendingProps,l=r.revealOrder,a=r.tail;if(lT(e,t,r.children,n),0!=(2&(r=nq.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&lX(e,n,t);else if(19===e.tag)lX(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(g(nq,r),0==(1&t.mode))t.memoizedState=null;else switch(l){case"forwards":for(l=null,n=t.child;null!==n;)null!==(e=n.alternate)&&null===nK(e)&&(l=n),n=n.sibling;null===(n=l)?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),lG(t,!1,l,n,a);break;case"backwards":for(n=null,l=t.child,t.child=null;null!==l;){if(null!==(e=l.alternate)&&null===nK(e)){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}lG(t,!0,n,null,a);break;case"together":lG(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function lJ(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function l0(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),oS|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(i(153));if(null!==t.child){for(n=ip(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=ip(e,e.pendingProps)).return=t;n.sibling=null}return t.child}var l1=m(null),l2=null,l3=null,l4=null;function l6(){l4=l3=l2=null}function l8(e,t,n){g(l1,t._currentValue),t._currentValue=n}function l5(e){e._currentValue=l1.current,h(l1)}function l7(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function l9(e,t,n){var r=e.child;for(null!==r&&(r.return=e);null!==r;){var l=r.dependencies;if(null!==l)for(var a=r.child,o=l.firstContext;null!==o;){if(o.context===t){if(1===r.tag){(o=nf(n&-n)).tag=2;var u=r.updateQueue;if(null!==u){var s=(u=u.shared).pending;null===s?o.next=o:(o.next=s.next,s.next=o),u.pending=o}}r.lanes|=n,null!==(o=r.alternate)&&(o.lanes|=n),l7(r.return,n,e),l.lanes|=n;break}o=o.next}else if(10===r.tag)a=r.type===e.type?null:r.child;else if(18===r.tag){if(null===(a=r.return))throw Error(i(341));a.lanes|=n,null!==(l=a.alternate)&&(l.lanes|=n),l7(a,n,e),a=r.sibling}else a=r.child;if(null!==a)a.return=r;else for(a=r;null!==a;){if(a===e){a=null;break}if(null!==(r=a.sibling)){r.return=a.return,a=r;break}a=a.return}r=a}}function ae(e,t){l2=e,l4=l3=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(lL=!0),e.firstContext=null)}function at(e){return ar(l2,e)}function an(e,t,n){return null===l2&&ae(e,n),ar(e,t)}function ar(e,t){var n=t._currentValue;if(l4!==t){if(t={context:t,memoizedValue:n,next:null},null===l3){if(null===e)throw Error(i(308));l3=t,e.dependencies={lanes:0,firstContext:t}}else l3=l3.next=t}return n}var al="undefined"!=typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},aa=a.unstable_scheduleCallback,ao=a.unstable_NormalPriority,ai={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_defaultValue:null,_globalName:null};function au(){return{controller:new al,data:new Map,refCount:0}}function as(e){e.refCount--,0===e.refCount&&aa(ao,function(){e.controller.abort()})}var ac=s.ReactCurrentBatchConfig,af=m(null);function ad(){var e=af.current;return null!==e?e:op.pooledCache}function ap(e,t){null===t?g(af,af.current):g(af,t.pool)}function am(){var e=ad();return null===e?null:{parent:ai._currentValue,pool:e}}function ah(e){e.flags|=4}function ag(e){e.flags|=2097664}function ay(e,t){if("stylesheet"!==t.type||0!=(4&t.state.loading))e.flags&=-16777217;else if(e.flags|=16777216,0==(42&oh)&&!(t="stylesheet"!==t.type||0!=(3&t.state.loading))){if(oJ())e.flags|=8192;else throw nx=nw,nk}}function av(e,t){null!==t?e.flags|=4:16384&e.flags&&(t=22!==e.tag?ed():536870912,e.lanes|=t)}function ab(e,t){if(!tK)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 ak(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;null!==l;)n|=l.lanes|l.childLanes,r|=31457280&l.subtreeFlags,r|=31457280&l.flags,l.return=e,l=l.sibling;else for(l=e.child;null!==l;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function aw(e,t){switch(tW(t),t.tag){case 1:null!=(e=t.type.childContextTypes)&&tP();break;case 3:l5(ai),V(),h(tC),h(tS);break;case 26:case 27:case 5:Q(t);break;case 4:V();break;case 13:nH(t);break;case 19:h(nq);break;case 10:l5(t.type._context);break;case 22:case 23:nH(t),n$(),null!==e&&h(af);break;case 24:l5(ai)}}function aS(e,t,n){var r=Array.prototype.slice.call(arguments,3);try{t.apply(n,r)}catch(e){this.onError(e)}}var aC=!1,aE=null,ax=!1,az=null,aP={onError:function(e){aC=!0,aE=e}};function aN(e,t,n,r,l,a,o,i,u){aC=!1,aE=null,aS.apply(aP,arguments)}var a_=!1,aL=!1,aT="function"==typeof WeakSet?WeakSet:Set,aF=null;function aM(e,t){try{var n=e.ref;if(null!==n){var r=e.stateNode;switch(e.tag){case 26:case 27:case 5:var l=r;break;default:l=r}"function"==typeof n?e.refCleanup=n(l):n.current=l}}catch(n){ir(e,t,n)}}function aO(e,t){var n=e.ref,r=e.refCleanup;if(null!==n){if("function"==typeof r)try{r()}catch(n){ir(e,t,n)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof n)try{n(null)}catch(n){ir(e,t,n)}else n.current=null}}function aR(e,t,n){try{n()}catch(n){ir(e,t,n)}}var aD=!1;function aA(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var l=r=r.next;do{if((l.tag&e)===e){var a=l.inst,o=a.destroy;void 0!==o&&(a.destroy=void 0,aR(t,n,o))}l=l.next}while(l!==r)}}function aI(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create,l=n.inst;r=r(),l.destroy=r}n=n.next}while(n!==t)}}function aU(e,t){try{aI(t,e)}catch(t){ir(e,e.return,t)}}function a$(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{ny(t,n)}catch(t){ir(e,e.return,t)}}}function aB(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break;case"img":n.src&&(r.src=n.src)}}catch(t){ir(e,e.return,t)}}function aV(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:a2(e,n),4&r&&aU(n,5);break;case 1:if(a2(e,n),4&r){if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(e){ir(n,n.return,e)}else{var l=n.elementType===n.type?t.memoizedProps:lh(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){ir(n,n.return,e)}}}64&r&&a$(n),512&r&&aM(n,n.return);break;case 3:if(a2(e,n),64&r&&null!==(r=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:e=n.child.stateNode}try{ny(r,e)}catch(e){ir(n,n.return,e)}}break;case 26:a2(e,n),512&r&&aM(n,n.return);break;case 27:case 5:a2(e,n),null===t&&4&r&&aB(n),512&r&&aM(n,n.return);break;case 12:default:a2(e,n);break;case 13:a2(e,n),4&r&&aX(e,n);break;case 22:if(0!=(1&n.mode)){if(!(l=null!==n.memoizedState||a_)){t=null!==t&&null!==t.memoizedState||aL;var a=a_,o=aL;a_=l,(aL=t)&&!o?function e(t,n,r){for(r=r&&0!=(8772&n.subtreeFlags),n=n.child;null!==n;){var l=n.alternate,a=t,o=n,i=o.flags;switch(o.tag){case 0:case 11:case 15:e(a,o,r),aU(o,4);break;case 1:if(e(a,o,r),"function"==typeof(a=o.stateNode).componentDidMount)try{a.componentDidMount()}catch(e){ir(o,o.return,e)}if(null!==(l=o.updateQueue)){var u=l.shared.hiddenCallbacks;if(null!==u)for(l.shared.hiddenCallbacks=null,l=0;l title"))),s$(l,n,r),l[ew]=e,eR(l),n=l;break e;case"link":var a=cp("link","href",t).get(n+(r.href||""));if(a){for(var o=0;o",e=e.removeChild(e.firstChild);break;case"select":e="string"==typeof r.is?l.createElement("select",{is:r.is}):l.createElement("select"),r.multiple?e.multiple=!0:r.size&&(e.size=r.size);break;default:e="string"==typeof r.is?l.createElement(n,{is:r.is}):l.createElement(n)}}e[ew]=t,e[eS]=r;e:for(l=t.child;null!==l;){if(5===l.tag||6===l.tag)e.appendChild(l.stateNode);else if(4!==l.tag&&27!==l.tag&&null!==l.child){l.child.return=l,l=l.child;continue}if(l===t)break;for(;null===l.sibling;){if(null===l.return||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}switch(t.stateNode=e,s$(e,n,r),n){case"button":case"input":case"select":case"textarea":e=!!r.autoFocus;break;case"img":e=!0;break;default:e=!1}e&&ah(t)}null!==t.ref&&ag(t)}return ak(t),t.flags&=-16777217,null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&ah(t);else{if("string"!=typeof r&&null===t.stateNode)throw Error(i(166));if(e=I.current,t6(t)){e:{if(e=t.stateNode,n=t.memoizedProps,e[ew]=t,(r=e.nodeValue!==n)&&null!==(l=tH))switch(l.tag){case 3:if(l=0!=(1&l.mode),sD(e.nodeValue,n,l),l){e=!1;break e}break;case 27:case 5:var a=0!=(1&l.mode);if(!0!==l.memoizedProps.suppressHydrationWarning&&sD(e.nodeValue,n,a),a){e=!1;break e}}e=r}e&&ah(t)}else(e=sQ(e).createTextNode(r))[ew]=t,t.stateNode=e}return ak(t),null;case 13:if(nH(t),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(tK&&null!==tq&&0!=(1&t.mode)&&0==(128&t.flags))t8(),t5(),t.flags|=384,l=!1;else if(l=t6(t),null!==r&&null!==r.dehydrated){if(null===e){if(!l)throw Error(i(318));if(!(l=null!==(l=t.memoizedState)?l.dehydrated:null))throw Error(i(317));l[ew]=t}else t5(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;ak(t),l=!1}else null!==tY&&(oW(tY),tY=null),l=!0;if(!l)return 256&t.flags?t:null}if(0!=(128&t.flags))return t.lanes=n,t;return n=null!==r,e=null!==e&&null!==e.memoizedState,n&&(r=t.child,l=null,null!==r.alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(l=r.alternate.memoizedState.cachePool.pool),a=null,null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(a=r.memoizedState.cachePool.pool),a!==l&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),av(t,t.updateQueue),ak(t),null;case 4:return V(),null===e&&sz(t.stateNode.containerInfo),ak(t),null;case 10:return l5(t.type._context),ak(t),null;case 19:if(h(nq),null===(l=t.memoizedState))return ak(t),null;if(r=0!=(128&t.flags),null===(a=l.rendering)){if(r)ab(l,!1);else{if(0!==ok||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(a=nK(e))){for(t.flags|=128,ab(l,!1),e=a.updateQueue,t.updateQueue=e,av(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)im(n,e),n=n.sibling;return g(nq,1&nq.current|2),t.child}e=e.sibling}null!==l.tail&&Y()>o_&&(t.flags|=128,r=!0,ab(l,!1),t.lanes=4194304)}}else{if(!r){if(null!==(e=nK(a))){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,av(t,e),ab(l,!0),null===l.tail&&"hidden"===l.tailMode&&!a.alternate&&!tK)return ak(t),null}else 2*Y()-l.renderingStartTime>o_&&536870912!==n&&(t.flags|=128,r=!0,ab(l,!1),t.lanes=4194304)}l.isBackwards?(a.sibling=t.child,t.child=a):(null!==(e=l.last)?e.sibling=a:t.child=a,l.last=a)}if(null!==l.tail)return t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=Y(),t.sibling=null,e=nq.current,g(nq,r?1&e|2:1&e),t;return ak(t),null;case 22:case 23:return nH(t),n$(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(536870912&n)&&0==(128&t.flags)&&(ak(t),6&t.subtreeFlags&&(t.flags|=8192)):ak(t),null!==(n=t.updateQueue)&&av(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&h(af),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),l5(ai),ak(t),null;case 25:return null}throw Error(i(156,t.tag))}(t.alternate,t,ob);if(null!==n){om=n;return}if(null!==(t=t.sibling)){om=t;return}om=t=e}while(null!==t);0===ok&&(ok=5)}function o7(e,t,n,r){var l=ey,a=of.transition;try{of.transition=null,ey=2,function(e,t,n,r,l){do ie();while(null!==oR);if(0!=(6&od))throw Error(i(327));var a=e.finishedWork,o=e.finishedLanes;if(null!==a){if(e.finishedWork=null,e.finishedLanes=0,a===e.current)throw Error(i(177));e.callbackNode=null,e.callbackPriority=0,e.cancelPendingCommit=null;var u=a.lanes|a.childLanes;if(function(e,t,n){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.entangledLanes&=t,e.errorRecoveryDisabledLanes&=t,e.shellSuspendCounter=0,t=e.entanglements;for(var l=e.expirationTimes,a=e.hiddenUpdates;0r&&(l=r,r=a,a=l),l=u8(n,a);var o=u8(n,r);l&&o&&(1!==e.rangeCount||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&((t=t.createRange()).setStart(l.node,l.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;nn?32:n;n=of.transition;var l=ey;try{if(of.transition=null,ey=r,null===oR)var a=!1;else{r=oI,oI=null;var o=oR,u=oD;if(oR=null,oD=0,0!=(6&od))throw Error(i(331));var s=od;if(od|=4,ol(o.current),a5(o,o.current,u,r),od=s,n2(!1),er&&"function"==typeof er.onPostCommitFiberRoot)try{er.onPostCommitFiberRoot(en,o)}catch(e){}a=!0}return a}finally{ey=l,of.transition=n,o9(e,t)}}return!1}function it(e,t,n){t=lx(e,t=lS(n,t),2),null!==(e=nd(e,t,2))&&(em(e,2),n1(e))}function ir(e,t,n){if(3===e.tag)it(e,e,n);else for(;null!==t;){if(3===t.tag){it(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===oM||!oM.has(r))){e=lz(t,e=lS(n,e),2),null!==(t=nd(t,e,2))&&(em(t,2),n1(t));break}}t=t.return}}function il(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new oi;var l=new Set;r.set(t,l)}else void 0===(l=r.get(t))&&(l=new Set,r.set(t,l));l.has(n)||(ov=!0,l.add(n),e=ia.bind(null,e,t,n),t.then(e,e))}function ia(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,op===e&&(oh&n)===n&&(4===ok||3===ok&&(62914560&oh)===oh&&300>Y()-oN?0==(2&od)&&oG(e,0):oE|=n),n1(e)}function io(e,t){0===t&&(t=0==(1&e.mode)?2:ed()),null!==(e=na(e,t))&&(em(e,t),n1(e))}function ii(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),io(e,n)}function iu(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;null!==l&&(n=l.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}null!==r&&r.delete(t),io(e,n)}function is(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.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ic(e,t,n,r){return new is(e,t,n,r)}function id(e){return!(!(e=e.prototype)||!e.isReactComponent)}function ip(e,t){var n=e.alternate;return null===n?((n=ic(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.subtreeFlags=0,n.deletions=null),n.flags=31457280&e.flags,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.refCleanup=e.refCleanup,n}function im(e,t){e.flags&=31457282;var n=e.alternate;return null===n?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ih(e,t,n,r,l,a,o){if(l=2,r=e,"function"==typeof e)id(e)&&(l=1);else if("string"==typeof e)l=!function(e,t,n){if(1===n||null!=t.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":if("string"!=typeof t.precedence||"string"!=typeof t.href||""===t.href)break;return!0;case"link":if("string"!=typeof t.rel||"string"!=typeof t.href||""===t.href||t.onLoad||t.onError)break;if("stylesheet"===t.rel)return e=t.disabled,"string"==typeof t.precedence&&null==e;return!0;case"script":if(!0===t.async&&!t.onLoad&&!t.onError&&"string"==typeof t.src&&t.src)return!0}return!1}(e,n,D.current)?"html"===e||"head"===e||"body"===e?27:5:26;else e:switch(e){case b:return ig(n.children,a,o,t);case k:l=8,0!=(1&(a|=8))&&(a|=16);break;case w:return(e=ic(12,n,t,2|a)).elementType=w,e.lanes=o,e;case z:return(e=ic(13,n,t,a)).elementType=z,e.lanes=o,e;case P:return(e=ic(19,n,t,a)).elementType=P,e.lanes=o,e;case T:return iy(n,a,o,t);case F:case L:case M:return(e=ic(24,n,t,a)).elementType=M,e.lanes=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case S:l=10;break e;case C:l=9;break e;case x:l=11;break e;case N:l=14;break e;case _:l=16,r=null;break e}throw Error(i(130,null==e?e:typeof e,""))}return(t=ic(l,n,t,a)).elementType=e,t.type=r,t.lanes=o,t}function ig(e,t,n,r){return(e=ic(7,e,r,t)).lanes=n,e}function iy(e,t,n,r){(e=ic(22,e,r,t)).elementType=T,e.lanes=n;var l={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var e=l._current;if(null===e)throw Error(i(456));if(0==(2&l._pendingVisibility)){var t=na(e,2);null!==t&&(l._pendingVisibility|=2,oV(t,e,2))}},attach:function(){var e=l._current;if(null===e)throw Error(i(456));if(0!=(2&l._pendingVisibility)){var t=na(e,2);null!==t&&(l._pendingVisibility&=-3,oV(t,e,2))}}};return e.stateNode=l,e}function iv(e,t,n){return(e=ic(6,e,null,t)).lanes=n,e}function ib(e,t,n){return(t=ic(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ik(e,t,n,r,l,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ep(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ep(0),this.hiddenUpdates=ep(null),this.identifierPrefix=r,this.onRecoverableError=l,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=a,this.incompleteTransitions=new Map}function iw(e,t,n,r,l,a,o,i,u,s,c){return e=new ik(e,t,n,i,u,c),1===t?(t=1,!0===a&&(t|=24)):t=0,a=ic(3,null,null,t),e.current=a,a.stateNode=e,t=au(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},ns(a),e}function iS(e){if(!e)return tw;e=e._reactInternals;e:{if(ty(e)!==e||1!==e.tag)throw Error(i(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(tz(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(i(171))}if(1===e.tag){var n=e.type;if(tz(n))return t_(e,n,t)}return t}function iC(e,t,n,r,l,a,o,i,u,s,c){return(e=iw(n,r,!0,e,l,a,o,i,u,s,c)).context=iS(null),(l=nf(r=oB(n=e.current))).callback=null!=t?t:null,nd(n,l,r),e.current.lanes=r,em(e,r),n1(e),e}function iE(e,t,n,r){var l=t.current,a=oB(l);return n=iS(n),null===t.context?t.context=n:t.pendingContext=n,(t=nf(a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=nd(l,t,a))&&(oV(e,l,a),np(e,l,a)),a}function ix(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function iz(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n=uR),uI=!1;function uU(e,t){switch(e){case"keyup":return -1!==uM.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function u$(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var uB=!1,uV={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 uj(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!uV[e.type]:"textarea"===t}function uQ(e,t,n,r){th(r),0<(t=sL(t,"onChange")).length&&(n=new iH("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var uW=null,uH=null;function uq(e){sS(e,0)}function uK(e){if(e0(eF(e)))return e}function uY(e,t){if("change"===e)return t}var uX=!1;if(e$){if(e$){var uG="oninput"in document;if(!uG){var uZ=document.createElement("div");uZ.setAttribute("oninput","return;"),uG="function"==typeof uZ.oninput}r=uG}else r=!1;uX=r&&(!document.documentMode||9=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=u6(r)}}function u5(){for(var e=window,t=e1();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(n)e=t.contentWindow;else break;t=e1(e.document)}return t}function u7(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 u9=e$&&"documentMode"in document&&11>=document.documentMode,se=null,st=null,sn=null,sr=!1;function sl(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;sr||null==se||se!==e1(r)||(r="selectionStart"in(r=se)&&u7(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},sn&&nv(sn,r)||(sn=r,0<(r=sL(st,"onSelect")).length&&(t=new iH("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=se)))}function sa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var so={animationend:sa("Animation","AnimationEnd"),animationiteration:sa("Animation","AnimationIteration"),animationstart:sa("Animation","AnimationStart"),transitionend:sa("Transition","TransitionEnd")},si={},su={};function ss(e){if(si[e])return si[e];if(!so[e])return e;var t,n=so[e];for(t in n)if(n.hasOwnProperty(t)&&t in su)return si[e]=n[t];return e}e$&&(su=document.createElement("div").style,"AnimationEvent"in window||(delete so.animationend.animation,delete so.animationiteration.animation,delete so.animationstart.animation),"TransitionEvent"in window||delete so.transitionend.transition);var sc=ss("animationend"),sf=ss("animationiteration"),sd=ss("animationstart"),sp=ss("transitionend"),sm=new Map,sh="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll scrollEnd toggle touchMove waiting wheel".split(" ");function sg(e,t){sm.set(e,t),eI(t,[e])}for(var sy=0;sy title"):null)}var ch=null;function cg(){}function cy(){if(this.count--,0===this.count){if(this.stylesheets)cb(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var cv=null;function cb(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,cv=new Map,t.forEach(ck,e),cv=null,cy.call(e))}function ck(e,t){if(!(4&t.state.loading)){var n=cv.get(e);if(n)var r=n.get("last");else{n=new Map,cv.set(e,n);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a