@tern-secure/auth 1.1.0-canary.v20251108045933 → 1.1.0-canary.v20251125170702
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/492_ternsecure_f36de9_1.1.0-canary.v20251125170702.js +1 -0
- package/dist/687_ternsecure_f36de9_1.1.0-canary.v20251125170702.js +1 -0
- package/dist/68_ternsecure_f36de9_1.1.0-canary.v20251125170702.js +1 -0
- package/dist/framework_ternsecure_f36de9_1.1.0-canary.v20251125170702.js +1 -0
- package/dist/signin_ternsecure_f36de9_1.1.0-canary.v20251125170702.css +2 -0
- package/dist/signin_ternsecure_f36de9_1.1.0-canary.v20251125170702.js +1 -0
- package/dist/signup_ternsecure_f36de9_1.1.0-canary.v20251125170702.css +2 -0
- package/dist/signup_ternsecure_f36de9_1.1.0-canary.v20251125170702.js +1 -0
- package/dist/ternsecure.browser.js +30 -0
- package/dist/ternsecure.css +2 -0
- package/dist/ternsecure.js +17 -0
- package/dist/ternsecure.mjs +17 -0
- package/dist/types/auth/AuthCookieManager.d.ts +0 -1
- package/dist/types/auth/cookies/authTime_cookie.d.ts +0 -1
- package/dist/types/index.browser.d.ts +1 -0
- package/dist/types/index.d.ts +3 -10
- package/dist/types/instance/c_coreApiClient.d.ts +2 -2
- package/dist/types/instance/constants.d.ts +3 -0
- package/dist/types/instance/coreApiClient.d.ts +0 -1
- package/dist/types/instance/events.d.ts +0 -1
- package/dist/types/instance/{TernAuth.d.ts → ternsecure.d.ts} +31 -7
- package/dist/types/lib/utils.d.ts +2 -0
- package/dist/types/resources/Base.d.ts +16 -3
- package/dist/types/resources/Error.d.ts +0 -1
- package/dist/types/resources/Session.d.ts +2 -2
- package/dist/types/resources/SignIn.d.ts +27 -10
- package/dist/types/resources/SignUp.d.ts +12 -10
- package/dist/types/resources/internal.d.ts +1 -2
- package/dist/types/ui/Renderer.d.ts +26 -0
- package/dist/types/ui/common/ProviderInitialIcon.d.ts +6 -0
- package/dist/types/ui/common/VerificationCodeCard.d.ts +12 -0
- package/dist/types/ui/common/VerificationLinkCard.d.ts +7 -0
- package/dist/types/ui/common/constants.d.ts +8 -0
- package/dist/types/ui/common/index.d.ts +3 -0
- package/dist/types/ui/components/sign-in/ResetPassword.d.ts +1 -0
- package/dist/types/ui/components/sign-in/ResetPasswordSuccess.d.ts +1 -0
- package/dist/types/ui/components/sign-in/SignIn.d.ts +4 -0
- package/dist/types/ui/components/sign-in/SignInEmailLinkCard.d.ts +2 -0
- package/dist/types/ui/components/sign-in/SignInFactorOne.d.ts +1 -0
- package/dist/types/ui/components/sign-in/SignInFactorOneCodeForm.d.ts +7 -0
- package/dist/types/ui/components/sign-in/SignInFactorOnePasswordCard.d.ts +6 -0
- package/dist/types/ui/components/sign-in/SignInFactorOnePhoneCodeCard.d.ts +7 -0
- package/dist/types/ui/components/sign-in/SignInPassword.d.ts +8 -0
- package/dist/types/ui/components/sign-in/SignInSocialButtons.d.ts +1 -0
- package/dist/types/ui/components/sign-in/SignInStart.d.ts +7 -0
- package/dist/types/ui/components/sign-in/SignInVerifyEmail.d.ts +1 -0
- package/dist/types/ui/components/sign-in/index.d.ts +4 -0
- package/dist/types/ui/components/sign-up/SignUp.d.ts +8 -0
- package/dist/types/ui/components/sign-up/SignUpEmailLinkCard.d.ts +2 -0
- package/dist/types/ui/components/sign-up/SignUpSocialButtons.d.ts +1 -0
- package/dist/types/ui/components/sign-up/SignUpStart.d.ts +1 -0
- package/dist/types/ui/components/sign-up/SignUpVerifyEmail.d.ts +1 -0
- package/dist/types/ui/components/sign-up/index.d.ts +2 -0
- package/dist/types/ui/components/sign-up/util.d.ts +14 -0
- package/dist/types/ui/components/user-button/index.d.ts +1 -0
- package/dist/types/ui/components/user-button/userButton.d.ts +1 -0
- package/dist/types/ui/ctx/TernAuthContext.d.ts +4 -0
- package/dist/types/ui/ctx/TernAuthUIComponentCtx.d.ts +8 -0
- package/dist/types/ui/ctx/TernSecureContextWrapper.d.ts +8 -0
- package/dist/types/ui/ctx/TernSecureOptions.d.ts +10 -0
- package/dist/types/ui/ctx/components/SignIn.d.ts +21 -0
- package/dist/types/ui/ctx/components/SignUp.d.ts +14 -0
- package/dist/types/ui/ctx/components/UserButton.d.ts +10 -0
- package/dist/types/ui/ctx/components/index.d.ts +3 -0
- package/dist/types/ui/ctx/index.d.ts +4 -0
- package/dist/types/ui/ctx/utils.d.ts +3 -0
- package/dist/types/ui/customize/FieldControl.d.ts +15 -0
- package/dist/types/ui/customize/FieldLabelControl.d.ts +11 -0
- package/dist/types/ui/customize/Form.d.ts +36 -0
- package/dist/types/ui/elements/CodeControl.d.ts +47 -0
- package/dist/types/ui/elements/ErrorCard.d.ts +10 -0
- package/dist/types/ui/elements/LoadingCard.d.ts +1 -0
- package/dist/types/ui/elements/RouterLink.d.ts +42 -0
- package/dist/types/ui/elements/SocialButtons.d.ts +6 -0
- package/dist/types/ui/elements/TimerButton.d.ts +9 -0
- package/dist/types/ui/elements/alert.d.ts +8 -0
- package/dist/types/ui/elements/avatar.d.ts +6 -0
- package/dist/types/ui/elements/button.d.ts +10 -0
- package/dist/types/ui/elements/card.d.ts +9 -0
- package/dist/types/ui/elements/ctx/CardStateCtx.d.ts +26 -0
- package/dist/types/ui/elements/ctx/index.d.ts +1 -0
- package/dist/types/ui/elements/field.d.ts +24 -0
- package/dist/types/ui/elements/index.d.ts +16 -0
- package/dist/types/ui/elements/input.d.ts +3 -0
- package/dist/types/ui/elements/label.d.ts +4 -0
- package/dist/types/ui/elements/separator.d.ts +4 -0
- package/dist/types/ui/hooks/index.d.ts +6 -0
- package/dist/types/ui/hooks/useEmailLink.d.ts +11 -0
- package/dist/types/ui/hooks/useFetch.d.ts +44 -0
- package/dist/types/ui/hooks/useLoadingStatus.d.ts +14 -0
- package/dist/types/ui/hooks/useNavigateToFlowStart.d.ts +3 -0
- package/dist/types/ui/hooks/useSafeState.d.ts +9 -0
- package/dist/types/ui/hooks/useWindowEventListener.d.ts +3 -0
- package/dist/types/ui/icons/index.d.ts +13 -0
- package/dist/types/ui/lazyLoading/common.d.ts +2 -0
- package/dist/types/ui/lazyLoading/components.d.ts +11 -0
- package/dist/types/ui/lazyLoading/providersCtx.d.ts +26 -0
- package/dist/types/ui/portal/index.d.ts +12 -0
- package/dist/types/ui/router/BaseRouter.d.ts +21 -0
- package/dist/types/ui/router/HashRouter.d.ts +8 -0
- package/dist/types/ui/router/PathRouter.d.ts +8 -0
- package/dist/types/ui/router/Route.d.ts +19 -0
- package/dist/types/ui/router/RouterCtx.d.ts +32 -0
- package/dist/types/ui/router/Switch.d.ts +4 -0
- package/dist/types/ui/router/index.d.ts +7 -0
- package/dist/types/ui/router/newPaths.d.ts +1 -0
- package/dist/types/ui/router/pathToRegexp.d.ts +127 -0
- package/dist/types/ui/types.d.ts +18 -0
- package/dist/types/ui/utils/form.d.ts +19 -0
- package/dist/types/ui/utils/index.d.ts +1 -0
- package/dist/types/ui/utils/sleep.d.ts +1 -0
- package/dist/types/utils/construct.d.ts +3 -1
- package/dist/types/utils/index.d.ts +1 -1
- package/dist/types/utils/normalizeRoutingOptions.d.ts +6 -0
- package/dist/types/utils/path.d.ts +0 -1
- package/dist/types/utils/querystring.d.ts +0 -1
- package/dist/types/utils/redirectUrls.d.ts +4 -9
- package/dist/types/utils/windowNavigate.d.ts +0 -1
- package/dist/ui-common_ternsecure_f36de9_1.1.0-canary.v20251125170702.js +1 -0
- package/dist/userbutton_ternsecure_f36de9_1.1.0-canary.v20251125170702.js +1 -0
- package/dist/vendors_ternsecure_f36de9_1.1.0-canary.v20251125170702.js +1 -0
- package/package.json +63 -24
- package/dist/cjs/auth/AuthCookieManager.js +0 -113
- package/dist/cjs/auth/AuthCookieManager.js.map +0 -1
- package/dist/cjs/auth/cookies/authTime_cookie.js +0 -62
- package/dist/cjs/auth/cookies/authTime_cookie.js.map +0 -1
- package/dist/cjs/auth/request.js +0 -159
- package/dist/cjs/auth/request.js.map +0 -1
- package/dist/cjs/global.d.js +0 -2
- package/dist/cjs/global.d.js.map +0 -1
- package/dist/cjs/index.js +0 -47
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/instance/TernAuth.js +0 -524
- package/dist/cjs/instance/TernAuth.js.map +0 -1
- package/dist/cjs/instance/TernAuthServer.js +0 -95
- package/dist/cjs/instance/TernAuthServer.js.map +0 -1
- package/dist/cjs/instance/c_coreApiClient.js +0 -264
- package/dist/cjs/instance/c_coreApiClient.js.map +0 -1
- package/dist/cjs/instance/coreApiClient.js +0 -255
- package/dist/cjs/instance/coreApiClient.js.map +0 -1
- package/dist/cjs/instance/events.js +0 -39
- package/dist/cjs/instance/events.js.map +0 -1
- package/dist/cjs/instance/jwtClient.js +0 -72
- package/dist/cjs/instance/jwtClient.js.map +0 -1
- package/dist/cjs/resources/Base.js +0 -137
- package/dist/cjs/resources/Base.js.map +0 -1
- package/dist/cjs/resources/Error.js +0 -31
- package/dist/cjs/resources/Error.js.map +0 -1
- package/dist/cjs/resources/Session.js +0 -105
- package/dist/cjs/resources/Session.js.map +0 -1
- package/dist/cjs/resources/SignIn.js +0 -256
- package/dist/cjs/resources/SignIn.js.map +0 -1
- package/dist/cjs/resources/SignUp.js +0 -72
- package/dist/cjs/resources/SignUp.js.map +0 -1
- package/dist/cjs/resources/Token.js +0 -32
- package/dist/cjs/resources/Token.js.map +0 -1
- package/dist/cjs/resources/UserData.js +0 -43
- package/dist/cjs/resources/UserData.js.map +0 -1
- package/dist/cjs/resources/cookie.js +0 -154
- package/dist/cjs/resources/cookie.js.map +0 -1
- package/dist/cjs/resources/index.js +0 -23
- package/dist/cjs/resources/index.js.map +0 -1
- package/dist/cjs/resources/internal.js +0 -35
- package/dist/cjs/resources/internal.js.map +0 -1
- package/dist/cjs/utils/construct.js +0 -253
- package/dist/cjs/utils/construct.js.map +0 -1
- package/dist/cjs/utils/index.js +0 -29
- package/dist/cjs/utils/index.js.map +0 -1
- package/dist/cjs/utils/jwt.js +0 -46
- package/dist/cjs/utils/jwt.js.map +0 -1
- package/dist/cjs/utils/mapDecode.js +0 -33
- package/dist/cjs/utils/mapDecode.js.map +0 -1
- package/dist/cjs/utils/path.js +0 -33
- package/dist/cjs/utils/path.js.map +0 -1
- package/dist/cjs/utils/querystring.js +0 -70
- package/dist/cjs/utils/querystring.js.map +0 -1
- package/dist/cjs/utils/redirectUrls.js +0 -156
- package/dist/cjs/utils/redirectUrls.js.map +0 -1
- package/dist/cjs/utils/windowNavigate.js +0 -45
- package/dist/cjs/utils/windowNavigate.js.map +0 -1
- package/dist/esm/auth/AuthCookieManager.js +0 -89
- package/dist/esm/auth/AuthCookieManager.js.map +0 -1
- package/dist/esm/auth/cookies/authTime_cookie.js +0 -38
- package/dist/esm/auth/cookies/authTime_cookie.js.map +0 -1
- package/dist/esm/auth/request.js +0 -134
- package/dist/esm/auth/request.js.map +0 -1
- package/dist/esm/global.d.js +0 -1
- package/dist/esm/global.d.js.map +0 -1
- package/dist/esm/index.js +0 -16
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/instance/TernAuth.js +0 -510
- package/dist/esm/instance/TernAuth.js.map +0 -1
- package/dist/esm/instance/TernAuthServer.js +0 -73
- package/dist/esm/instance/TernAuthServer.js.map +0 -1
- package/dist/esm/instance/c_coreApiClient.js +0 -236
- package/dist/esm/instance/c_coreApiClient.js.map +0 -1
- package/dist/esm/instance/coreApiClient.js +0 -226
- package/dist/esm/instance/coreApiClient.js.map +0 -1
- package/dist/esm/instance/events.js +0 -14
- package/dist/esm/instance/events.js.map +0 -1
- package/dist/esm/instance/jwtClient.js +0 -47
- package/dist/esm/instance/jwtClient.js.map +0 -1
- package/dist/esm/resources/Base.js +0 -113
- package/dist/esm/resources/Base.js.map +0 -1
- package/dist/esm/resources/Error.js +0 -9
- package/dist/esm/resources/Error.js.map +0 -1
- package/dist/esm/resources/Session.js +0 -81
- package/dist/esm/resources/Session.js.map +0 -1
- package/dist/esm/resources/SignIn.js +0 -240
- package/dist/esm/resources/SignIn.js.map +0 -1
- package/dist/esm/resources/SignUp.js +0 -48
- package/dist/esm/resources/SignUp.js.map +0 -1
- package/dist/esm/resources/Token.js +0 -8
- package/dist/esm/resources/Token.js.map +0 -1
- package/dist/esm/resources/UserData.js +0 -19
- package/dist/esm/resources/UserData.js.map +0 -1
- package/dist/esm/resources/cookie.js +0 -130
- package/dist/esm/resources/cookie.js.map +0 -1
- package/dist/esm/resources/index.js +0 -2
- package/dist/esm/resources/index.js.map +0 -1
- package/dist/esm/resources/internal.js +0 -8
- package/dist/esm/resources/internal.js.map +0 -1
- package/dist/esm/utils/construct.js +0 -215
- package/dist/esm/utils/construct.js.map +0 -1
- package/dist/esm/utils/index.js +0 -5
- package/dist/esm/utils/index.js.map +0 -1
- package/dist/esm/utils/jwt.js +0 -22
- package/dist/esm/utils/jwt.js.map +0 -1
- package/dist/esm/utils/mapDecode.js +0 -9
- package/dist/esm/utils/mapDecode.js.map +0 -1
- package/dist/esm/utils/path.js +0 -9
- package/dist/esm/utils/path.js.map +0 -1
- package/dist/esm/utils/querystring.js +0 -45
- package/dist/esm/utils/querystring.js.map +0 -1
- package/dist/esm/utils/redirectUrls.js +0 -132
- package/dist/esm/utils/redirectUrls.js.map +0 -1
- package/dist/esm/utils/windowNavigate.js +0 -19
- package/dist/esm/utils/windowNavigate.js.map +0 -1
- package/dist/types/auth/AuthCookieManager.d.ts.map +0 -1
- package/dist/types/auth/cookies/authTime_cookie.d.ts.map +0 -1
- package/dist/types/auth/request.d.ts +0 -49
- package/dist/types/auth/request.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/instance/TernAuth.d.ts.map +0 -1
- package/dist/types/instance/TernAuthServer.d.ts +0 -32
- package/dist/types/instance/TernAuthServer.d.ts.map +0 -1
- package/dist/types/instance/c_coreApiClient.d.ts.map +0 -1
- package/dist/types/instance/coreApiClient.d.ts.map +0 -1
- package/dist/types/instance/events.d.ts.map +0 -1
- package/dist/types/instance/jwtClient.d.ts +0 -22
- package/dist/types/instance/jwtClient.d.ts.map +0 -1
- package/dist/types/resources/Base.d.ts.map +0 -1
- package/dist/types/resources/Error.d.ts.map +0 -1
- package/dist/types/resources/Session.d.ts.map +0 -1
- package/dist/types/resources/SignIn.d.ts.map +0 -1
- package/dist/types/resources/SignUp.d.ts.map +0 -1
- package/dist/types/resources/Token.d.ts +0 -5
- package/dist/types/resources/Token.d.ts.map +0 -1
- package/dist/types/resources/UserData.d.ts +0 -8
- package/dist/types/resources/UserData.d.ts.map +0 -1
- package/dist/types/resources/cookie.d.ts +0 -24
- package/dist/types/resources/cookie.d.ts.map +0 -1
- package/dist/types/resources/index.d.ts +0 -2
- package/dist/types/resources/index.d.ts.map +0 -1
- package/dist/types/resources/internal.d.ts.map +0 -1
- package/dist/types/utils/construct.d.ts.map +0 -1
- package/dist/types/utils/index.d.ts.map +0 -1
- package/dist/types/utils/jwt.d.ts +0 -12
- package/dist/types/utils/jwt.d.ts.map +0 -1
- package/dist/types/utils/mapDecode.d.ts +0 -4
- package/dist/types/utils/mapDecode.d.ts.map +0 -1
- package/dist/types/utils/path.d.ts.map +0 -1
- package/dist/types/utils/querystring.d.ts.map +0 -1
- package/dist/types/utils/redirectUrls.d.ts.map +0 -1
- package/dist/types/utils/windowNavigate.d.ts.map +0 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
(()=>{var e={407:function(e,t,r){"use strict";r.d(t,{Ej:()=>n,UU:()=>a,e8:()=>i});let n=["redirect_url","after_sign_in_url","after_sign_up_url","sign_in_force_redirect_url","sign_in_fallback_redirect_url","sign_up_force_redirect_url","sign_up_fallback_redirect_url"],i=["email_address","phone_number","username"],a=["email_address","password"]},634:function(e,t,r){"use strict";r.d(t,{cn:()=>H});var n=r(238);let i=(e,t)=>{if(0===e.length)return t.classGroupId;let r=e[0],n=t.nextPart.get(r),a=n?i(e.slice(1),n):void 0;if(a)return a;if(0===t.validators.length)return;let s=e.join("-");return t.validators.find(({validator:e})=>e(s))?.classGroupId},a=/^\[(.+)\]$/,s=(e,t,r,n)=>{e.forEach(e=>{if("string"==typeof e){(""===e?t:o(t,e)).classGroupId=r;return}"function"==typeof e?l(e)?s(e(n),t,r,n):t.validators.push({validator:e,classGroupId:r}):Object.entries(e).forEach(([e,i])=>{s(i,o(t,e),r,n)})})},o=(e,t)=>{let r=e;return t.split("-").forEach(e=>{r.nextPart.has(e)||r.nextPart.set(e,{nextPart:new Map,validators:[]}),r=r.nextPart.get(e)}),r},l=e=>e.isThemeGetter,u=(e,t)=>t?e.map(([e,r])=>[e,r.map(e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,r])=>[t+e,r])):e)]):e,c=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(e=>{"["===e[0]?(t.push(...r.sort(),e),r=[]):r.push(e)}),t.push(...r.sort()),t},d=/\s+/;function h(){let e,t,r=0,n="";for(;r<arguments.length;)(e=arguments[r++])&&(t=f(e))&&(n&&(n+=" "),n+=t);return n}let f=e=>{let t;if("string"==typeof e)return e;let r="";for(let n=0;n<e.length;n++)e[n]&&(t=f(e[n]))&&(r&&(r+=" "),r+=t);return r},p=e=>{let t=t=>t[e]||[];return t.isThemeGetter=!0,t},m=/^\[(?:([a-z-]+):)?(.+)\]$/i,g=/^\d+\/\d+$/,v=new Set(["px","full","screen"]),y=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,b=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,w=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,S=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,k=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,E=e=>_(e)||v.has(e)||g.test(e),x=e=>D(e,"length",U),_=e=>!!e&&!Number.isNaN(Number(e)),C=e=>D(e,"number",_),I=e=>!!e&&Number.isInteger(Number(e)),T=e=>e.endsWith("%")&&_(e.slice(0,-1)),P=e=>m.test(e),A=e=>y.test(e),R=new Set(["length","size","percentage"]),N=e=>D(e,R,z),O=e=>D(e,"position",z),L=new Set(["image","url"]),M=e=>D(e,L,$),F=e=>D(e,"",V),j=()=>!0,D=(e,t,r)=>{let n=m.exec(e);return!!n&&(n[1]?"string"==typeof t?n[1]===t:t.has(n[1]):r(n[2]))},U=e=>b.test(e)&&!w.test(e),z=()=>!1,V=e=>S.test(e),$=e=>k.test(e),B=function(e,...t){let r,n,o,l=function(c){let d;return n=(r={cache:(e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,r=new Map,n=new Map,i=(i,a)=>{r.set(i,a),++t>e&&(t=0,n=r,r=new Map)};return{get(e){let t=r.get(e);return void 0!==t?t:void 0!==(t=n.get(e))?(i(e,t),t):void 0},set(e,t){r.has(e)?r.set(e,t):i(e,t)}}})((d=t.reduce((e,t)=>t(e),e())).cacheSize),parseClassName:(e=>{let{separator:t,experimentalParseClassName:r}=e,n=1===t.length,i=t[0],a=t.length,s=e=>{let r,s=[],o=0,l=0;for(let u=0;u<e.length;u++){let c=e[u];if(0===o){if(c===i&&(n||e.slice(u,u+a)===t)){s.push(e.slice(l,u)),l=u+a;continue}if("/"===c){r=u;continue}}"["===c?o++:"]"===c&&o--}let u=0===s.length?e:e.substring(l),c=u.startsWith("!"),d=c?u.substring(1):u;return{modifiers:s,hasImportantModifier:c,baseClassName:d,maybePostfixModifierPosition:r&&r>l?r-l:void 0}};return r?e=>r({className:e,parseClassName:s}):s})(d),...(e=>{let t=(e=>{let{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return u(Object.entries(e.classGroups),r).forEach(([e,r])=>{s(r,n,e,t)}),n})(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:e=>{let r=e.split("-");return""===r[0]&&1!==r.length&&r.shift(),i(r,t)||(e=>{if(a.test(e)){let t=a.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}})(e)},getConflictingClassGroupIds:(e,t)=>{let i=r[e]||[];return t&&n[e]?[...i,...n[e]]:i}}})(d)}).cache.get,o=r.cache.set,l=f,f(c)};function f(e){let t=n(e);if(t)return t;let i=((e,t)=>{let{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i}=t,a=[],s=e.trim().split(d),o="";for(let e=s.length-1;e>=0;e-=1){let t=s[e],{modifiers:l,hasImportantModifier:u,baseClassName:d,maybePostfixModifierPosition:h}=r(t),f=!!h,p=n(f?d.substring(0,h):d);if(!p){if(!f||!(p=n(d))){o=t+(o.length>0?" "+o:o);continue}f=!1}let m=c(l).join(":"),g=u?m+"!":m,v=g+p;if(a.includes(v))continue;a.push(v);let y=i(p,f);for(let e=0;e<y.length;++e){let t=y[e];a.push(g+t)}o=t+(o.length>0?" "+o:o)}return o})(e,r);return o(e,i),i}return function(){return l(h.apply(null,arguments))}}(()=>{let e=p("colors"),t=p("spacing"),r=p("blur"),n=p("brightness"),i=p("borderColor"),a=p("borderRadius"),s=p("borderSpacing"),o=p("borderWidth"),l=p("contrast"),u=p("grayscale"),c=p("hueRotate"),d=p("invert"),h=p("gap"),f=p("gradientColorStops"),m=p("gradientColorStopPositions"),g=p("inset"),v=p("margin"),y=p("opacity"),b=p("padding"),w=p("saturate"),S=p("scale"),k=p("sepia"),R=p("skew"),L=p("space"),D=p("translate"),U=()=>["auto","contain","none"],z=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto",P,t],$=()=>[P,t],B=()=>["",E,x],H=()=>["auto",_,P],W=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],q=()=>["solid","dashed","dotted","double","none"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],G=()=>["start","end","center","between","around","evenly","stretch"],Q=()=>["","0",P],Y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],J=()=>[_,P];return{cacheSize:500,separator:":",theme:{colors:[j],spacing:[E,x],blur:["none","",A,P],brightness:J(),borderColor:[e],borderRadius:["none","","full",A,P],borderSpacing:$(),borderWidth:B(),contrast:J(),grayscale:Q(),hueRotate:J(),invert:Q(),gap:$(),gradientColorStops:[e],gradientColorStopPositions:[T,x],inset:V(),margin:V(),opacity:J(),padding:$(),saturate:J(),scale:J(),sepia:Q(),skew:J(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",P]}],container:["container"],columns:[{columns:[A]}],"break-after":[{"break-after":Y()}],"break-before":[{"break-before":Y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...W(),P]}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",I,P]}],basis:[{basis:V()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",P]}],grow:[{grow:Q()}],shrink:[{shrink:Q()}],order:[{order:["first","last","none",I,P]}],"grid-cols":[{"grid-cols":[j]}],"col-start-end":[{col:["auto",{span:["full",I,P]},P]}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":[j]}],"row-start-end":[{row:["auto",{span:[I,P]},P]}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",P]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",P]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...G()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...G(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...G(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[L]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[L]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",P,t]}],"min-w":[{"min-w":[P,t,"min","max","fit"]}],"max-w":[{"max-w":[P,t,"none","full","min","max","fit","prose",{screen:[A]},A]}],h:[{h:[P,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[P,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[P,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[P,t,"auto","min","max","fit"]}],"font-size":[{text:["base",A,x]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",C]}],"font-family":[{font:[j]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",P]}],"line-clamp":[{"line-clamp":["none",_,C]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",E,P]}],"list-image":[{"list-image":["none",P]}],"list-style-type":[{list:["none","disc","decimal",P]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",E,x]}],"underline-offset":[{"underline-offset":["auto",E,P]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",P]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",P]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...W(),O]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",N]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},M]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[o]}],"border-w-x":[{"border-x":[o]}],"border-w-y":[{"border-y":[o]}],"border-w-s":[{"border-s":[o]}],"border-w-e":[{"border-e":[o]}],"border-w-t":[{"border-t":[o]}],"border-w-r":[{"border-r":[o]}],"border-w-b":[{"border-b":[o]}],"border-w-l":[{"border-l":[o]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...q(),"hidden"]}],"divide-x":[{"divide-x":[o]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[o]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:q()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...q()]}],"outline-offset":[{"outline-offset":[E,P]}],"outline-w":[{outline:[E,x]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[E,x]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",A,F]}],"shadow-color":[{shadow:[j]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...K(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":K()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",A,P]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[w]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",P]}],duration:[{duration:J()}],ease:[{ease:["linear","in","out","in-out",P]}],delay:[{delay:J()}],animate:[{animate:["none","spin","ping","pulse","bounce",P]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[I,P]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"skew-x":[{"skew-x":[R]}],"skew-y":[{"skew-y":[R]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",P]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",P]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",P]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[E,x,C]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function H(...e){return B((0,n.$)(e))}},423:function(e,t,r){"use strict";r.d(t,{y:()=>n.TernSecureAPIResponseError,R:()=>n.TernSecureRuntimeError});let n=require("@tern-secure/shared/errors-api")},953:function(e,t,r){"use strict";r.d(t,{T:()=>i});var n=r(410);r(58);let i=({id:e,className:t})=>{switch(e){case"google":return(0,n.jsxs)("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,n.jsx)("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z",fill:"#4285F4"}),(0,n.jsx)("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),(0,n.jsx)("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),(0,n.jsx)("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]});case"github":return(0,n.jsx)("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,n.jsx)("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})});case"microsoft":return(0,n.jsxs)("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 23 23",fill:"currentColor",children:[(0,n.jsx)("path",{fill:"#f35325",d:"M1 1h10v10H1z"}),(0,n.jsx)("path",{fill:"#81bc06",d:"M12 1h10v10H12z"}),(0,n.jsx)("path",{fill:"#05a6f0",d:"M1 12h10v10H1z"}),(0,n.jsx)("path",{fill:"#ffba08",d:"M12 12h10v10H12z"})]});case"apple":return(0,n.jsx)("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,n.jsx)("path",{d:"M17.05 20.28c-.98.95-2.05.88-3.08.4-1.09-.5-2.08-.48-3.24.02-1.44.62-2.2.44-3.06-.4C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.74 1.18 0 2.45-1.62 4.37-1.62 1.71.12 2.7.84 3.4 1.84-3.18 1.62-2.67 5.86.34 7.1-.68 1.75-1.6 3.47-3.19 4.91zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z"})});case"facebook":return(0,n.jsx)("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,n.jsx)("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z",fill:"#1877F2"})});case"twitter":return(0,n.jsx)("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,n.jsx)("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})});default:return null}}},648:function(e,t,r){"use strict";r.d(t,{_:()=>o});var n=r(410),i=r(634),a=r(580),s=r(384);let o=e=>{let{navigate:t}=(0,s.rd)(),r=(0,a.f0)();return(0,n.jsx)("div",{className:"relative flex justify-center p-6 md:p-10",children:(0,n.jsx)("div",{className:"w-full max-w-sm",children:(0,n.jsxs)(a.Zp,{className:(0,i.cn)("mt-8 w-full max-w-md"),children:[(0,n.jsxs)(a.aR,{className:"space-y-1 text-center",children:[(0,n.jsx)(a.ZB,{children:"Verify your email"}),(0,n.jsx)(a.BT,{className:(0,i.cn)("text-muted-foreground"),children:e.emailSent?"We've sent a verification link to your email address. Please check your inbox and click the link to continue.":"Sending verification email..."})]}),(0,n.jsxs)(a.Wu,{className:"space-y-4",children:[r.error&&(0,n.jsx)(a.Fc,{variant:"destructive",className:"animate-in fade-in-50",children:(0,n.jsx)(a.TN,{children:r.error.message})}),e.emailSent&&e.onResend&&(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)(a.Fc,{children:(0,n.jsx)(a.TN,{children:"Didn't receive the email? Check your spam folder or click the button below to resend."})}),(0,n.jsx)(a.MS,{onClick:()=>void e.onResend?.(),disabled:e.isLoading,variant:"outline",className:"w-full",startDisabled:!0,throttleTimeInSec:60,children:e.isLoading?"Sending...":"Resend verification email"})]})]}),(0,n.jsx)(a.ry,{className:"text-center",children:(0,n.jsx)("a",{onClick:()=>void t("../"),children:"Go back"})})]})})})}},687:function(e,t,r){"use strict";r.r(t),r.d(t,{PasswordResetSuccess:()=>f,PasswordReset:()=>h,SignIn:()=>F,SignInModal:()=>j}),r(878);var n=r(410),i=r(973),a=r(58),s=r(197),o=r(977),l=r(384),u=r(634),c=r(580);function d(){let e=(0,o.o1)(),t=(0,c.f0)(),{navigate:r}=(0,l.rd)(),i=(0,c.T3)({defaultValues:{email:""},validators:{onSubmitAsync:async({value:n})=>{try{await e?.sendPasswordResetEmail(n.email),r("../reset-password-success")}catch(e){throw t.setError({status:"error",name:"ResetPasswordError",message:e.message||"Failed to send reset email",error:e}),e}}}});return(0,n.jsx)("div",{className:"relative flex justify-center p-6 md:p-10",children:(0,n.jsxs)(c.Zp,{className:(0,u.cn)("mt-8 w-full max-w-md"),children:[(0,n.jsxs)(c.aR,{className:"space-y-1",children:[(0,n.jsx)(c.ZB,{children:"Reset Password"}),(0,n.jsx)(c.BT,{children:"Enter your email address and we'll send you a link to reset your password"})]}),(0,n.jsxs)(c.Wu,{children:[t.error&&(0,n.jsx)(c.Fc,{variant:"destructive",className:"animate-in fade-in-50 mb-4",children:(0,n.jsx)(c.TN,{children:t.error.message})}),(0,n.jsx)("form",{onSubmit:e=>{e.preventDefault(),e.stopPropagation(),i.handleSubmit()},children:(0,n.jsxs)(c.M_,{children:[(0,n.jsx)(i.AppField,{name:"email",children:e=>(0,n.jsx)(e.TernEmailField,{label:"Email",placeholder:"Enter your email",disabled:i.state.isSubmitting,required:!0})}),(0,n.jsxs)("div",{className:"flex gap-3",children:[(0,n.jsx)(c.$n,{type:"submit",disabled:!i.state.canSubmit||i.state.isSubmitting,className:"flex-1",children:i.state.isSubmitting?"Sending...":"Send Reset Link"}),(0,n.jsx)(c.$n,{type:"button",variant:"outline",onClick:()=>{r("../")},disabled:i.state.isSubmitting,className:"flex-1",children:"Cancel"})]})]})})]})]})})}let h=()=>(0,n.jsx)(c.pe,{children:(0,n.jsx)(d,{})});function f(){let{navigate:e}=(0,l.rd)();return(0,n.jsx)("div",{className:"relative flex items-center justify-center",children:(0,n.jsxs)(c.Zp,{className:(0,u.cn)("w-full max-w-md mx-auto mt-8"),children:[(0,n.jsxs)(c.aR,{className:"space-y-1 text-center",children:[(0,n.jsx)("div",{className:"w-12 h-12 mx-auto bg-green-500 rounded-full flex items-center justify-center text-white text-2xl",children:"✓"}),(0,n.jsx)(c.ZB,{className:"font-bold",children:"Check your email"}),(0,n.jsx)(c.BT,{className:"text-muted-foreground",children:"Password reset instructions sent"})]}),(0,n.jsx)(c.Wu,{className:"space-y-4",children:(0,n.jsx)(c.$n,{onClick:()=>e("../"),className:"w-full",children:"Back to sign in"})})]})})}var p=r(282),m=r(904),g=r(777);let v={password:""},y=e=>{let t=(0,c.f0)(),{signInWithPassword:r,onForgotPassword:i}=e,a=(0,c.T3)({defaultValues:v,validators:{onSubmitAsync:({value:e})=>r?.(e.password)}});return(0,n.jsx)("div",{className:"relative flex justify-center p-6 md:p-10",children:(0,n.jsx)("div",{className:"w-full max-w-sm",children:(0,n.jsxs)(c.Zp,{className:(0,u.cn)("mt-8 w-full max-w-md"),children:[(0,n.jsxs)(c.aR,{className:"space-y-1 text-center",children:[(0,n.jsx)(c.ZB,{className:(0,u.cn)("font-bold"),children:"Enter your password"}),(0,n.jsx)(c.BT,{className:(0,u.cn)("text-muted-foreground"),children:"Enter the password for your account to continue"})]}),(0,n.jsxs)(c.Wu,{className:"space-y-4",children:[t.error&&(0,n.jsx)(c.Fc,{variant:"destructive",className:"animate-in fade-in-50",children:(0,n.jsx)(c.TN,{children:t.error.message})}),(0,n.jsx)("form",{onSubmit:e=>{e.preventDefault(),e.stopPropagation(),a.handleSubmit()},children:(0,n.jsxs)(c.M_,{children:[(0,n.jsx)(a.AppField,{name:"password",children:e=>(0,n.jsx)(e.TernPasswordField,{label:"Password",placeholder:"Enter your password",disabled:a.state.isSubmitting||t.isLoading,required:!0,onForgotPassword:i})}),(0,n.jsx)(g.pr,{canSubmit:a.state.canSubmit,isSubmitting:a.state.isSubmitting,submitText:"Continue",submittingText:"Signing in..."})]})})]})]})})})},b=e=>{let t=(0,c.f0)(),r=(0,c.xM)({onCodeEntryFinished:(t,r,n)=>{e.onCodeEntryFinishedAction(t,r,n)},onResendCodeClicked:e.onResendCodeClicked});return(0,n.jsxs)(c.Zp,{className:"w-full max-w-md",children:[(0,n.jsxs)(c.aR,{children:[(0,n.jsx)(c.ZB,{children:e.cardTitle}),(0,n.jsx)(c.BT,{children:e.cardDescription})]}),(0,n.jsx)(c.Wu,{children:(0,n.jsxs)(c.oA,{isLoading:r.isLoading,otpControl:r.otpControl,onResendCode:r.onResendCode,children:[(0,n.jsxs)("div",{className:"space-y-4",children:[t.error&&(0,n.jsx)(c.Fc,{variant:"destructive",children:(0,n.jsx)(c.TN,{children:t.error.message})}),(0,n.jsxs)("div",{className:"space-y-2 flex flex-col items-center",children:[(0,n.jsx)(c.JU,{htmlFor:"code",children:e.inputLabel}),(0,n.jsx)(c.iG,{})]})]}),(0,n.jsxs)("div",{className:"flex flex-col space-y-2 mt-4",children:[(0,n.jsx)(c.Ro,{}),e.onBackLinkClicked&&(0,n.jsx)(c.$n,{variant:"ghost",onClick:e.onBackLinkClicked,disabled:r.isLoading,children:"Back"})]})]})})]})},w=e=>{let t=(0,o.o1)(),r=(0,c.f0)(),{navigate:s}=(0,l.rd)(),{afterSignInUrl:u}=(0,o.r3)(),d=(0,i.useTernSecure)(),h=(0,a.useRef)(null),[f,p]=(0,a.useState)(null),[m,g]=(0,a.useState)(!1),v=(0,a.useCallback)(async e=>{if(!t?.identifier)return;let n=await t.authenticateWithPhoneNumber({phoneNumber:t.identifier,appVerifier:e});"error"===n.status&&r.setError({status:"error",message:n.message,error:n.error})},[t,r]);return(0,a.useEffect)(()=>{(async()=>{if("phone_code"===e.factor.strategy&&t&&h.current&&!f&&!m){g(!0);try{let e=h.current;e.id||(e.id="recaptcha-container");let r=t.createRecaptchaVerifier(e,{size:"invisible",callback:e=>{},"expired-callback":()=>{p(null),g(!1)}});p(r),await v(r)}catch(e){console.error("Failed to initialize Recaptcha",e),r.setError({status:"error",message:"Failed to initialize security verification",error:e}),g(!1)}}})()},[e.factor.strategy,t,f,m,v,r]),(0,n.jsxs)(n.Fragment,{children:["phone_code"===e.factor.strategy&&(0,n.jsx)("div",{ref:h,id:"recaptcha-container",style:{minHeight:"78px",display:"flex",justifyContent:"center",alignItems:"center",width:"100%"}}),(0,n.jsx)(b,{cardTitle:"Enter Code",cardDescription:`Please enter the code sent to your ${"phone_code"===e.factor.strategy?"phone":"email"}.`,onCodeEntryFinishedAction:(r,n,i)=>{(async()=>{try{let a;a="phone_code"===e.factor.strategy?await t?.attemptPhoneNumberVerification({code:r}):await t?.attemptFirstFactor({strategy:e.factor.strategy,code:r}),a?.status==="success"?(await n(),t?.user&&await d.createActiveSession({session:t.user,redirectUrl:u})):await i(Error("Verification failed"))}catch(e){await i(e)}})()},onResendCodeClicked:r=>{r.preventDefault(),(async()=>{"phone_code"===e.factor.strategy&&t?.identifier&&f&&await v(f)})()},onBackLinkClicked:()=>{s("../")}})]})},S=e=>(0,n.jsx)(w,{...e}),k=(0,c.dm)(function(){let e=(0,o.o1)(),t=(0,i.useTernSecure)(),r=t.requiresVerification,s=(0,c.f0)(),u=(0,l.rd)(),{navigate:d}=u,{afterSignInUrl:h}=(0,p.r)(),[f,g]=a.useState(null),v=(0,m.u)(f,e?.supportedFirstFactors);a.useEffect(()=>{(e?.status==="needs_identifier"||e?.status===null)&&u.navigate("../")},[e?.status,u]);let b=async n=>{if(!e?.identifier)return void s.setError({status:"error",message:"Identifier is missing"});let i=await e?.authenticateWithPassword({email:e.identifier,password:n});if(i?.status==="error"&&s.setError({status:"error",message:i.message,error:i.error}),i?.status==="success"){if(r&&!i.user.emailVerified)return void d("../verify-email-address");await t.createActiveSession({session:i.user,redirectUrl:h})}};if(!v&&e?.status)return(0,n.jsx)(c.Jr,{});if(!v)return(0,n.jsx)(c.B0,{});switch(v?.strategy){case"password":return(0,n.jsx)(y,{signInWithPassword:b,onForgotPassword:()=>{d("../reset-password")}});case"phone_code":return(0,n.jsx)(S,{factor:{...v}});default:return(0,n.jsx)(c.B0,{})}});var E=r(423);r(953);let x=e=>{let{isExternal:t,children:r,href:i,onClick:a,...s}=e,o=a?e=>{i||e.preventDefault(),a(e)}:void 0;return(0,n.jsx)("a",{...s,onClick:o,href:i||"",target:i&&t?"_blank":void 0,rel:i&&t?"noopener":void 0,children:r})},_=e=>{let{to:t,onClick:r,...i}=e,a=(0,l.rd)(),s=a.resolve(t||a.indexPath);return(0,n.jsx)(x,{...i,onClick:e=>(e.preventDefault(),r&&!t)?r(e):a.navigate(s.href),href:s.href})},C=()=>{let e=(0,o.o1)(),t=(0,i.useTernSecure)(),r=(0,c.f0)(),{afterSignInUrl:a}=(0,o.r3)(),s=async(n,i={mode:"popup"})=>{let s=await e?.authenticateWithSocialProvider(n,{mode:i.mode||"popup",customParameters:i.customParameters,scopes:i.scopes});s?.status==="error"&&r.setError({status:"error",message:s.message,error:s.error}),s?.status==="success"&&await t.createActiveSession({session:s.user,redirectUrl:a})};return(0,n.jsx)(c.VR,{onProviderClick:e=>void s(e),disabled:r.isLoading})},I={email:"",password:""},T=e=>{let{onError:t,isDisabled:r,signInWithPassword:i,onForgotPassword:a}=e,s=(0,c.T3)({defaultValues:I,validators:{onSubmitAsync:async({value:e})=>{try{i&&await i(e.email,e.password)}catch(e){throw t?.(e),e}}}});return(0,n.jsxs)(c.M_,{children:[(0,n.jsx)("form",{onSubmit:e=>{e.preventDefault(),e.stopPropagation(),s.handleSubmit()},className:"flex flex-col gap-7",children:(0,n.jsx)(s.Subscribe,{selector:e=>[e.canSubmit,e.isSubmitting],children:([e,t])=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.AppField,{name:"email",children:e=>(0,n.jsx)(e.TernEmailField,{label:"Email",placeholder:"Enter your email",disabled:t||r,required:!0})}),(0,n.jsx)(s.AppField,{name:"password",children:e=>(0,n.jsx)(e.TernPasswordField,{label:"Password",placeholder:"Enter your password",disabled:t||r,required:!0,onForgotPassword:a})}),(0,n.jsx)(g.pr,{canSubmit:e,isSubmitting:t,submitText:"Sign In",submittingText:"Signing in..."}),(0,n.jsx)(c.KB,{children:"Or continue with"})]})})}),(0,n.jsx)(C,{})]})},P=({src:e,alt:t})=>(0,n.jsx)("div",{className:"mb-4 flex justify-center",children:(0,n.jsx)("img",{src:e,alt:t,className:"h-10 w-auto"})}),A=(0,c.dm)(function(){let e=(0,o.o1)(),t=(0,i.useTernSecure)(),r=(0,o.At)(),{appName:s}=r,d=(0,p.r)(),h=r.signUpMode||"public",f=r.passwordAuthentication??!0,m=t.requiresVerification,v=(0,c.f0)(),{navigate:y}=(0,l.rd)(),{afterSignInUrl:b,signUpUrl:w,showCombinedForm:S,appearance:k}=d,x=d.preferredEmailStrategy||"password",I=(0,a.useMemo)(()=>["email_address","phone_number"],[]),A=k?.layout,R=A?.logoPlacement||"inside",N=A?.logoImageUrl,O=A?.socialButtonsPlacement||"bottom",L=d.initialValues?.phoneNumber!==void 0&&void 0===d.initialValues.emailAddress&&I.includes("phone_number"),[M,F]=(0,a.useState)(L?"phone_number":I[0]||""),j=d.initialValues||{},D=(0,a.useMemo)(()=>({email_address:j.emailAddress,email_address_username:j.emailAddress||j.username,username:j.username,phone_number:j.phoneNumber}),[j.emailAddress,j.phoneNumber,j.username]),{fieldName:U,label:z,placeholder:V}=(0,a.useMemo)(()=>"phone_number"===M?{fieldName:"phoneNumber",label:"Phone number",placeholder:"Enter your phone number"}:{fieldName:"email",label:"Email",placeholder:"Enter your email"},[M]),$=(0,a.useMemo)(()=>"phone_number"===M?"tel":"email",[M]),B=(0,a.useMemo)(()=>({[U]:D[M]||""}),[U,M,D[M]]),H=(0,c.T3)({defaultValues:B,validators:{onSubmitAsync:({value:e})=>W(e)}}),W=async r=>{try{let n,i,a=await e?.create((n=r.phoneNumber||r.email||r.identifier||"",i="phone_number"===M?"phone_code":"email_code",("phone_number"!==M&&"password"===x&&(i="password"),"password"===i)?{strategy:"password",identifier:n}:{strategy:i,identifier:n}));switch(a?.status){case"needs_first_factor":return y("factor-one");case"needs_email_verification":return y("verify-email-address");case"success":return t.createActiveSession({redirectUrl:b})}}catch(e){if(e instanceof E.y){let t=e.errors[0];v.setError({status:"error",message:t?.message||e.message,error:t})}else v.setError({status:"error",message:"An unexpected error occurred.",error:e})}},q=async(r,n)=>{let i=await e?.authenticateWithPassword({email:r,password:n});if(i?.status==="error"&&v.setError({status:"error",message:i.message,error:i.error}),i?.status==="success"){if(m&&i?.user.emailVerified===!1)return void y("verify-email-address");await t.createActiveSession({session:i.user,redirectUrl:b})}};return(0,n.jsx)("div",{className:"relative flex justify-center p-6 md:p-10",children:(0,n.jsxs)("div",{className:"w-full max-w-sm",children:["outside"===R&&N&&(0,n.jsx)(P,{src:N,alt:s||"App Logo"}),(0,n.jsxs)(c.Zp,{className:(0,u.cn)("mt-8 w-full max-w-md"),children:[(0,n.jsxs)(c.aR,{className:"space-y-1 text-center",children:["inside"===R&&N&&(0,n.jsx)(P,{src:N,alt:s||"App Logo"}),(0,n.jsx)(c.ZB,{className:(0,u.cn)("font-bold"),children:s?`Sign in to ${s}`:"Sign in"}),(0,n.jsx)(c.BT,{className:(0,u.cn)("text-muted-foreground"),children:"Please sign in to continue"})]}),(0,n.jsxs)(c.Wu,{className:"space-y-4",children:[v.error&&(0,n.jsx)(c.Fc,{variant:"destructive",className:"animate-in fade-in-50",children:(0,n.jsx)(c.TN,{children:v.error.message})}),S?(0,n.jsxs)(c.M_,{children:["top"===O&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(C,{}),f&&(0,n.jsx)(c.KB,{children:"Or continue with"})]}),f&&(0,n.jsx)("form",{onSubmit:e=>{e.preventDefault(),e.stopPropagation(),H.handleSubmit()},className:"flex flex-col gap-7",children:(0,n.jsx)(H.Subscribe,{selector:e=>[e.canSubmit,e.isSubmitting],children:([e,t])=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(H.AppField,{name:U,children:e=>"tel"===$?(0,n.jsx)(e.TernTextField,{label:z,placeholder:V,disabled:t||v.isLoading,required:!0}):(0,n.jsx)(e.TernEmailField,{label:z,placeholder:V,disabled:t||v.isLoading,required:!0})}),(0,n.jsx)(g.pr,{canSubmit:e,isSubmitting:t,submitText:"Continue",submittingText:"Continuing..."}),"bottom"===O&&(0,n.jsx)(c.KB,{children:"Or continue with"})]})})}),"bottom"===O&&(0,n.jsx)(C,{})]}):f&&(0,n.jsx)(T,{signInWithPassword:q,onError:e=>{v.setError(e)},isDisabled:v.isLoading,onForgotPassword:()=>{y("reset-password")}}),"public"===h&&(0,n.jsxs)(c.ry,{className:"text-center",children:["Don't have an account? ",(0,n.jsx)(_,{to:w,children:"Sign up"})]})]})]})]})})});var R=r(648);function N(){let e=(0,o.o1)(),{afterSignInUrl:t}=(0,o.r3)(),r=(0,c.f0)(),[i,s]=a.useState(!1);a.useEffect(()=>{l()},[]);let l=async()=>{let n=await e?.attemptEmailVerification({url:t,handleCodeInApp:!0});n?.status==="error"?r.setError({status:"error",message:n.message,error:n.error}):s(!0)},u=async()=>{r.setLoading(),await l(),r.setIdle()};return(0,n.jsx)(R._,{emailSent:i,onResend:u,isLoading:r.isLoading})}let O=(0,c.dm)(()=>(0,n.jsx)(N,{}));function L(){let e=(0,i.useTernSecure)();return a.useEffect(()=>{e.redirectToSignIn()},[]),null}function M(){return(0,n.jsxs)(l.dO,{children:[(0,n.jsx)(l.qh,{path:"reset-password",children:(0,n.jsx)(h,{})}),(0,n.jsx)(l.qh,{path:"reset-password-success",children:(0,n.jsx)(f,{})}),(0,n.jsx)(l.qh,{path:"factor-one",children:(0,n.jsx)(k,{})}),(0,n.jsx)(l.qh,{path:"verify-email-address",canActivate:e=>!!e.signIn?.identifier,children:(0,n.jsx)(O,{})}),(0,n.jsx)(l.qh,{index:!0,children:(0,n.jsx)(A,{})}),(0,n.jsx)(l.qh,{children:(0,n.jsx)(L,{})})]})}M.displayName="SignIn";let F=function(){let e=(0,o.r3)(),t={componentName:"SignUp",forceRedirectUrl:e.signUpForceRedirectUrl,fallbackRedirectUrl:e.signUpFallbackRedirectUrl,signInUrl:e.signInUrl,...(0,s.C)({routing:e?.routing,path:e?.path})};return(0,n.jsx)(o.gh.Provider,{value:t,children:(0,n.jsx)(M,{})})},j=e=>(0,n.jsx)(l.qh,{path:"sign-in",children:(0,n.jsx)(o.QI.Provider,{value:{componentName:"SignIn",...e,routing:"virtual",mode:"modal"},children:(0,n.jsx)("div",{children:(0,n.jsx)(F,{...e,routing:"virtual"})})})})},102:function(e,t,r){"use strict";r.r(t),r.d(t,{SignUp:()=>y,SignUpModal:()=>b,SignUpVerifyEmail:()=>m,SignUpStart:()=>h}),r(878);var n=r(410),i=r(973),a=r(58),s=r(977),o=r(384),l=r(634),u=r(580),c=r(777);let d=()=>{let e=(0,s.o1)(),t=(0,i.useTernSecure)(),r=(0,u.f0)(),{afterSignUpUrl:a}=(0,s.Xu)(),o=async(n,i={mode:"popup"})=>{let s=await e?.authenticateWithSocialProvider(n,{mode:i.mode||"popup",customParameters:i.customParameters,scopes:i.scopes});s?.status==="error"&&r.setError({status:"error",message:s.message,error:s.error}),s?.status==="success"&&await t.createActiveSession({session:s.user,redirectUrl:a})};return(0,n.jsx)(u.VR,{onProviderClick:e=>void o(e),disabled:r.isLoading})},h=(0,u.dm)(function(){let e=(0,s.Kp)(),t=(0,u.f0)(),{navigate:r}=(0,o.rd)(),a=(0,s.Xu)(),{afterSignUpUrl:h,signInUrl:f,shouldShowForm:p=!0}=a,{createActiveSession:m}=(0,i.useTernSecure)(),{appName:g}=(0,s.At)(),v=(0,u.T3)({defaultValues:{email:"",password:""},validators:{onSubmitAsync:async({value:e})=>await y(e.email,e.password)}}),y=async(n,i)=>{if(!e)return;let s=await e.withEmailAndPassword({email:n,password:i});if("error"===s.status)return void t.setError({status:"error",message:s.message,error:s.error});let o=a.afterSignUpUrl||"/";await (({signUp:e,verifyEmailPath:t,navigate:r,handleComplete:n})=>"complete"===e.status?n&&n():"missing_requirements"===e.status&&e.unverifiedFields?.includes("email_address")&&t?r(t):void 0)({signUp:s,verifyEmailPath:"verify-email-address",handleComplete:async()=>m({session:s.user,redirectUrl:h}),navigate:r,redirectUrlComplete:o})};return(0,n.jsx)("div",{className:"relative flex justify-center p-6 md:p-10",children:(0,n.jsx)("div",{className:"w-full max-w-sm",children:(0,n.jsxs)(u.Zp,{className:(0,l.cn)("mt-8 w-full max-w-md"),children:[(0,n.jsxs)(u.aR,{className:"space-y-1 text-center",children:[(0,n.jsx)(u.ZB,{children:g?`Create your ${g} account`:"Create your account"}),(0,n.jsx)(u.BT,{className:(0,l.cn)("text-muted-foreground"),children:p?"Welcome! Please fill in the details to get started.":"Welcome! Please sign up to continue."})]}),(0,n.jsxs)(u.Wu,{className:"space-y-4",children:[t.error&&(0,n.jsx)(u.Fc,{variant:"destructive",className:"animate-in fade-in-50",children:(0,n.jsx)(u.TN,{children:t.error.message})}),(0,n.jsxs)(u.M_,{children:[p&&(0,n.jsx)("form",{onSubmit:e=>{e.preventDefault(),e.stopPropagation(),v.handleSubmit()},className:"flex flex-col gap-7",children:(0,n.jsx)(v.Subscribe,{selector:e=>[e.canSubmit,e.isSubmitting],children:([e,r])=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(v.AppField,{name:"email",children:e=>(0,n.jsx)(e.TernEmailField,{label:"Email",placeholder:"Enter your email",disabled:r||t.isLoading,required:!0})}),(0,n.jsx)(v.AppField,{name:"password",children:e=>(0,n.jsx)(e.TernPasswordField,{label:"Password",placeholder:"Enter your password",disabled:r||t.isLoading,required:!0})}),(0,n.jsx)(c.pr,{canSubmit:e,isSubmitting:r,submitText:"Continue",submittingText:"Creating Account..."}),(0,n.jsx)(u.KB,{children:"Or continue with"})]})})}),(0,n.jsx)(d,{})]})]}),(0,n.jsxs)(u.ry,{className:"text-center",children:["Already have an account? ",(0,n.jsx)("a",{href:f,children:"Sign In"})]})]})})})});var f=r(648);function p(){let e=(0,s.Kp)(),{afterSignUpUrl:t}=(0,s.Xu)(),r=(0,u.f0)(),[i,o]=a.useState(!1);a.useEffect(()=>{l()},[]);let l=async()=>{let n=await e?.attemptEmailVerification({url:t,handleCodeInApp:!0});n?.status==="error"?r.setError({status:"error",message:n.message,error:n.error}):o(!0)},c=async()=>{r.setLoading(),await l(),r.setIdle()};return(0,n.jsx)(f._,{emailSent:i,onResend:c,isLoading:r.isLoading})}let m=(0,u.dm)(()=>(0,n.jsx)(p,{}));function g(){let e=(0,i.useTernSecure)();return a.useEffect(()=>{e.redirectToSignUp()},[]),null}function v(){return(0,n.jsxs)(o.dO,{children:[(0,n.jsx)(o.qh,{path:"verify-email-address",canActivate:e=>!!e.signUp?.user?.email,children:(0,n.jsx)(m,{})}),(0,n.jsx)(o.qh,{index:!0,children:(0,n.jsx)(h,{})}),(0,n.jsx)(o.qh,{children:(0,n.jsx)(g,{})})]})}v.displayName="SignUp";let y=v,b=e=>(0,n.jsx)(o.qh,{path:"sign-up",children:(0,n.jsx)(s.gh.Provider,{value:{componentName:"SignUp",...e,routing:"virtual",mode:"modal"},children:(0,n.jsx)("div",{children:(0,n.jsx)(y,{...e,routing:"virtual"})})})})},947:function(e,t,r){"use strict";r.r(t),r.d(t,{UserButton:()=>o});var n=r(410),i=r(973),a=r(977),s=r(580);function o(){let e,t=(0,a.ZY)(),r=(0,i.useTernSecure)(),o="User Avatar";return t?(e=t.displayName?.charAt(0).toUpperCase()||"U",t.displayName&&(o=`${t.displayName}'s Avatar`)):(e="?",o="Guest Avatar"),(0,n.jsx)(n.Fragment,{children:t?(0,n.jsxs)(s.$n,{onClick:()=>{r.signOut()},variant:"outline",style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,n.jsxs)(s.eu,{children:[(0,n.jsx)(s.BK,{src:t?.photoURL||void 0,alt:o}),(0,n.jsx)(s.q5,{children:e})]}),"Sign Out"]}):(0,n.jsxs)(s.$n,{onClick:()=>{r.redirectToSignIn()},variant:"outline",style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,n.jsxs)(s.eu,{children:[(0,n.jsx)(s.BK,{src:void 0,alt:o}),(0,n.jsx)(s.q5,{children:e})]}),"Sign In"]})})}},967:function(e,t,r){"use strict";r.d(t,{At:()=>o,az:()=>s});var n=r(410),i=r(58);let a=i.createContext({});function s({children:e,value:t}){return(0,n.jsx)(a.Provider,{value:t,children:e})}function o(){let e=i.useContext(a);if(void 0===e)throw Error("TernSecureAuthOptions context is not available. Ensure that the context is properly initialized.");return e}},282:function(e,t,r){"use strict";r.d(t,{Q:()=>d,r:()=>h});var n=r(973),i=r(907),a=r(58),s=r(407),o=r(117),l=r(384),u=r(967),c=r(904);let d=(0,a.createContext)(null),h=()=>{let e=(0,a.useContext)(d),{navigate:t}=(0,l.rd)(),{queryParams:r,queryString:h}=(0,l.rd)(),f=(0,u.At)(),p=(0,n.useTernSecure)();if(null===e||"SignIn"!==e.componentName)throw Error("useSignInContext called outside of the mounted SignIn component.");let m="restricted"!==f.signUpMode&&!!(!f.signUpUrl&&f.signInUrl&&!(0,i.isAbsoluteUrl)(f.signInUrl)),g=e.showCombinedForm??!0,{componentName:v,mode:y,...b}=e,w=(0,a.useMemo)(()=>(0,c.t)(h,s.e8),[]),S=(0,a.useCallback)((e,t,r="AuthError",n)=>{let i=Error(e);return i.name=r,i.code=t,i.response=n,i},[]),k=(0,a.useCallback)(e=>{console.error(e)},[]),E=new o.nQ(f,{...b,signInFallbackRedirectUrl:b.signInFallbackRedirectUrl||b.fallbackRedirectUrl,signInForceRedirectUrl:b.signInForceRedirectUrl||b.forceRedirectUrl},r,y);delete b.fallbackRedirectUrl,delete b.forceRedirectUrl;let x=p.constructUrlWithAuthRedirect(E.getAfterSignInUrl()),_=p.constructUrlWithAuthRedirect(E.getAfterSignUpUrl()),C=()=>t(x),I="path"===b.routing&&b.path||f.signInUrl,T=m?"path"===b.routing&&b.path||f.signUpUrl:b.signUpUrl||f.signUpUrl,P=E.getPreservedSearchParams();I=(0,o.kZ)({base:I,hashSearchParams:[r,P]},{stringify:!0}),T=(0,o.kZ)({base:T,hashSearchParams:[r,P]},{stringify:!0});let A=E.toSearchParams().toString(),R=(0,a.useCallback)(async(e,t)=>{try{if(await p.createActiveSession({session:e}),t?.onPreRedirect)try{await t.onPreRedirect()&&C()}catch(t){let e=S("Pre-redirect validation failed","PRE_REDIRECT_FAILED","PreRedirectError",t);k(e)}else C()}catch(e){k(S(e instanceof Error?e.message:"Failed to create session","SESSION_CREATION_FAILED","SessionError",e))}},[p,S,k,C]),N=(0,a.useCallback)(async()=>{try{let e=await p.getRedirectResult();if(e&&e.success)await R(e.user);else if(e&&!e.success){let t=S(e.message||"Redirect sign-in failed",e.error||"REDIRECT_FAILED","RedirectError",e);k(t)}}catch(e){k(S(e instanceof Error?e.message:"Failed to check redirect result","REDIRECT_CHECK_FAILED","RedirectError",e))}},[p,R,k,S]);return m&&(T=(0,o.kZ)({base:I,hashPath:"/challenge",hashSearchParams:[r,P]},{stringify:!0})),{...b,componentName:v,afterSignInUrl:x,afterSignUpUrl:_,signInUrl:I,signUpUrl:T,queryParams:r,initialValues:{...b.initialValues,...w},authQueryString:A,checkRedirectResult:N,onSignInSuccess:R,handleSignInError:k,redirectAfterSignIn:C,isCombinedFlow:m,showCombinedForm:g}}},977:function(e,t,r){"use strict";r.d(t,{g7:()=>w,gh:()=>v,ZY:()=>u,TernSecureContextWrapper:()=>s,r3:()=>d.r,At:()=>c.At,Kp:()=>l,QI:()=>d.Q,TernSecureOptionsProvider:()=>c.az,o1:()=>o,Xu:()=>y});var n=r(410),i=r(973),a=r(58);function s(e){let t=e.ternsecure,[r,s]=a.useState({user:t.user,session:t.currentSession});a.useEffect(()=>t.addListener(e=>s({...e})),[]);let o=a.useMemo(()=>({value:t}),[]);return(0,n.jsx)(i.TernSecureAuthCtx.Provider,{value:o,children:e.children})}function o(){let e=(0,i.useTernSecureAuthCtx)();return(0,i.assertContextExists)(e,i.TernSecureAuthCtx),e.signIn}function l(){let e=(0,i.useTernSecureAuthCtx)();return(0,i.assertContextExists)(e,i.TernSecureAuthCtx),e.signUp}function u(){let e=(0,i.useTernSecureAuthCtx)();return(0,i.assertContextExists)(e,i.TernSecureAuthCtx),e.user||null}var c=r(967),d=r(282),h=r(407),f=r(117),p=r(753),m=r(384),g=r(904);let v=(0,a.createContext)(null),y=()=>{let e=(0,a.useContext)(v),{navigate:t}=(0,m.rd)(),{queryParams:r,queryString:n}=(0,m.rd)(),s=(0,c.At)(),o=(0,i.useTernSecure)(),l=(0,a.useMemo)(()=>(0,g.t)(n,h.UU),[]);if(!e||"SignUp"!==e.componentName)throw Error("useSignUpContext called outside of the mounted SignUp component.");let{componentName:u,mode:d,...y}=e,b=new p.n(s,{...y,signUpFallbackRedirectUrl:y.signUpFallbackRedirectUrl||y.fallbackRedirectUrl,signUpForceRedirectUrl:y.signUpForceRedirectUrl||y.forceRedirectUrl},r,d);delete y.fallbackRedirectUrl,delete y.forceRedirectUrl;let w=o.constructUrlWithAuthRedirect(b.getAfterSignInUrl()),S=o.constructUrlWithAuthRedirect(b.getAfterSignInUrl()),k="path"===y.routing&&y.path||s.signUpUrl,E=y.signInUrl||s.signInUrl,x=b.getPreservedSearchParams();E=(0,f.kZ)({base:E,hashSearchParams:[r,x]},{stringify:!0}),k=(0,f.kZ)({base:k,hashSearchParams:[r,x]},{stringify:!0});let _=b.toSearchParams().toString();return{...y,componentName:u,signInUrl:E,signUpUrl:k,afterSignUpUrl:w,afterSignInUrl:S,navigateAfterSignUp:()=>t(w),queryParams:r,initialValues:{...y.initialValues,...l},authQueryString:_}},b=(0,a.createContext)(null);function w({componentName:e,props:t,children:r}){switch(e){case"SignIn":return(0,n.jsx)(d.Q.Provider,{value:{componentName:e,...t},children:r});case"SignUp":return(0,n.jsx)(v.Provider,{value:{componentName:e,...t},children:r});case"UserButton":return(0,n.jsx)(b.Provider,{value:{componentName:e,...t},children:r});default:throw Error(`unknown component context: ${e}`)}}},904:function(e,t,r){"use strict";r.d(t,{t:()=>i,u:()=>a});var n=r(99);function i(e,t){let r={};return new URLSearchParams(e).forEach((e,i)=>{t.includes(i)&&"string"==typeof e&&(r[(0,n.snakeToCamel)(i)]=e)}),r}function a(e,t){return e||t?.[0]||null}},580:function(e,t,r){"use strict";let n;r.d(t,{aR:()=>e$,JU:()=>e3,BT:()=>eH,Fc:()=>tx,TN:()=>tC,q5:()=>tk,Wu:()=>eW,ZB:()=>eB,Jr:()=>tA,iG:()=>t$,MS:()=>tO,xM:()=>tF,dm:()=>eX,$n:()=>eN,bg:()=>ti,Ro:()=>tV,Zp:()=>eV,KB:()=>tn,pe:()=>eJ,oA:()=>tz,f0:()=>eQ,dh:()=>tt,B0:()=>tP,pd:()=>tI,T3:()=>eD,ry:()=>tr,M_:()=>e7,D0:()=>te,VR:()=>tN,eu:()=>tw,BK:()=>tS});var i=r(410),a=r(58),s=r.t(a,2),o=r(272);function l(e,t){return"function"==typeof e?e(t):e}function u(e,t){return y(t).reduce((e,t)=>null===e?null:void 0!==e?e[t]:void 0,e)}function c(e,t,r){let n=y(t);return function e(t){if(!n.length)return l(r,t);let i=n.shift();if("string"==typeof i||"number"==typeof i&&!Array.isArray(t))return"object"==typeof t?(null===t&&(t={}),{...t,[i]:e(t[i])}):{[i]:e()};if(Array.isArray(t)&&"number"==typeof i){let r=t.slice(0,i);return[...r.length?r:Array(i),e(t[i]),...t.slice(i+1)]}return[...Array(i),e()]}(e)}let d=/^(\d+)$/gm,h=/\.(\d+)(?=\.)/gm,f=/^(\d+)\./gm,p=/\.(\d+$)/gm,m=/\.{2,}/gm,g="__int__",v=`${g}$1`;function y(e){if(Array.isArray(e))return[...e];if("string"!=typeof e)throw Error("Path must be a string.");return e.replace(/(^\[)|]/gm,"").replace(/\[/g,".").replace(d,v).replace(h,`.${v}.`).replace(f,`${v}.`).replace(p,`.${v}`).replace(m,".").split(".").map(e=>{if(e.startsWith(g)){let t=e.substring(g.length),r=parseInt(t,10);return String(r)===t?r:t}return e})}function b(e,t){return 0===e.length?t:0===t.length?e:t.startsWith("[")||t.startsWith(".")?e+t:`${e}.${t}`}function w(e,t){return t.validationLogic({form:t.form,validators:t.validators,event:{type:e,async:!1},runValidation:e=>e.validators.filter(Boolean).map(e=>({cause:e.cause,validate:e.fn}))})}function S(e,t){let{asyncDebounceMs:r}=t,{onBlurAsyncDebounceMs:n,onChangeAsyncDebounceMs:i,onDynamicAsyncDebounceMs:a}=t.validators||{},s=r??0;return t.validationLogic({form:t.form,validators:t.validators,event:{type:e,async:!0},runValidation:t=>t.validators.filter(Boolean).map(t=>{let r=t?.cause||e,o=s;switch(r){case"change":o=i??s;break;case"blur":o=n??s;break;case"dynamic":o=a??s;break;case"submit":o=0}return"submit"===e&&(o=0),{cause:r,validate:t.fn,debounceMs:o}})})}let k=e=>!!e&&"object"==typeof e&&"fields"in e;function E(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[r,n]of e)if(!t.has(r)||!Object.is(n,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let r of e)if(!t.has(r))return!1;return!0}let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let i of r)if(!n.includes(i)||!E(e[i],t[i]))return!1;return!0}let x=({newFormValidatorError:e,isPreviousErrorFromFormValidator:t,previousErrorValue:r})=>e?{newErrorValue:e,newSource:"form"}:t?{newErrorValue:void 0,newSource:void 0}:r?{newErrorValue:r,newSource:"field"}:{newErrorValue:void 0,newSource:void 0},_=({formLevelError:e,fieldLevelError:t})=>t?{newErrorValue:t,newSource:"field"}:e?{newErrorValue:e,newSource:"form"}:{newErrorValue:void 0,newSource:void 0};function C(e,t){return null==e?t:{...e,...t}}let I=256,T=[];for(;I--;)T[I]=(I+256).toString(16).substring(1);class P{constructor(e,t){this.listeners=new Set,this.subscribe=e=>{var t,r;this.listeners.add(e);let n=null==(r=null==(t=this.options)?void 0:t.onSubscribe)?void 0:r.call(t,e,this);return()=>{this.listeners.delete(e),null==n||n()}},this.prevState=e,this.state=e,this.options=t}setState(e){var t,r,n;(this.prevState=this.state,null==(t=this.options)?void 0:t.updateFn)?this.state=this.options.updateFn(this.prevState)(e):"function"==typeof e?this.state=e(this.prevState):this.state=e,null==(n=null==(r=this.options)?void 0:r.onUpdate)||n.call(r),D(this)}}class A{constructor(e){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{let e=this.options.deps.length,t=Array(e),r=Array(e);for(let n=0;n<e;n++){let e=this.options.deps[n];t[n]=e.prevState,r[n]=e.state}return this.lastSeenDepValues=r,{prevDepVals:t,currDepVals:r,prevVal:this.prevState??void 0}},this.recompute=()=>{var e,t;this.prevState=this.state;let r=this.getDepVals();this.state=this.options.fn(r),null==(t=(e=this.options).onUpdate)||t.call(e)},this.checkIfRecalculationNeededDeeply=()=>{for(let e of this.options.deps)e instanceof A&&e.checkIfRecalculationNeededDeeply();let e=!1,t=this.lastSeenDepValues,{currDepVals:r}=this.getDepVals();for(let n=0;n<r.length;n++)if(r[n]!==t[n]){e=!0;break}e&&this.recompute()},this.mount=()=>(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{for(let e of(this.unregisterFromGraph(),this._subscriptions))e()}),this.subscribe=e=>{var t,r;this.listeners.add(e);let n=null==(r=(t=this.options).onSubscribe)?void 0:r.call(t,e,this);return()=>{this.listeners.delete(e),null==n||n()}},this.options=e,this.state=e.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(e=this.options.deps){for(let t of e)if(t instanceof A)t.registerOnGraph(),this.registerOnGraph(t.options.deps);else if(t instanceof P){let e=R.get(t);e||(e=new Set,R.set(t,e)),e.add(this);let r=N.get(this);r||(r=new Set,N.set(this,r)),r.add(t)}}unregisterFromGraph(e=this.options.deps){for(let t of e)if(t instanceof A)this.unregisterFromGraph(t.options.deps);else if(t instanceof P){let e=R.get(t);e&&e.delete(this);let r=N.get(this);r&&r.delete(t)}}}let R=new WeakMap,N=new WeakMap,O={current:[]},L=!1,M=0,F=new Set,j=new Map;function D(e){if((M>0&&!j.has(e)&&j.set(e,e.prevState),F.add(e),!(M>0))&&!L)try{for(L=!0;F.size>0;){let e=Array.from(F);for(let t of(F.clear(),e)){let e=j.get(t)??t.prevState;t.prevState=e,function(e){let t={prevVal:e.prevState,currentVal:e.state};for(let r of e.listeners)r(t)}(t)}for(let t of e){let e=R.get(t);e&&(O.current.push(t),function e(t){for(let r of Array.from(t).sort((e,t)=>e instanceof A&&e.options.deps.includes(t)?1:t instanceof A&&t.options.deps.includes(e)?-1:0)){if(O.current.includes(r))continue;O.current.push(r),r.recompute();let t=N.get(r);if(t)for(let r of t){let t=R.get(r);t&&e(t)}}}(e))}for(let t of e){let e=R.get(t);if(e)for(let t of e)!function(e){let t={prevVal:e.prevState,currentVal:e.state};for(let r of e.listeners)r(t)}(t)}}}finally{L=!1,O.current=[],j.clear()}}function U(e){M++;try{e()}finally{if(0==--M){let e=F.values().next().value;e&&D(e)}}}function z(e,...t){return"function"==typeof e?e(...t):e}class V{#e=!0;#t;#r;#n;#i;#a;#s;#o;#l=0;#u=5;#c=!1;#d=()=>{this.debugLog("Connected to event bus"),this.#a=!0,this.#c=!1,this.debugLog("Emitting queued events",this.#i),this.#i.forEach(e=>this.emitEventToBus(e)),this.#i=[],this.stopConnectLoop(),this.#r().removeEventListener("tanstack-connect-success",this.#d)};#h=()=>{if(this.#l<this.#u){this.#l++,this.dispatchCustomEvent("tanstack-connect",{});return}this.#r().removeEventListener("tanstack-connect",this.#h),this.debugLog("Max retries reached, giving up on connection"),this.stopConnectLoop()};#f=()=>{this.#c||(this.#c=!0,this.#r().addEventListener("tanstack-connect-success",this.#d),this.#h())};constructor({pluginId:e,debug:t=!1,enabled:r=!0,reconnectEveryMs:n=300}){this.#t=e,this.#e=r,this.#r=this.getGlobalTarget,this.#n=t,this.debugLog(" Initializing event subscription for plugin",this.#t),this.#i=[],this.#a=!1,this.#s=null,this.#o=n}startConnectLoop(){null!==this.#s||this.#a||(this.debugLog(`Starting connect loop (every ${this.#o}ms)`),this.#s=setInterval(this.#h,this.#o))}stopConnectLoop(){this.#c=!1,null!==this.#s&&(clearInterval(this.#s),this.#s=null,this.debugLog("Stopped connect loop"))}debugLog(...e){this.#n&&console.log(`🌴 [tanstack-devtools:${this.#t}-plugin]`,...e)}getGlobalTarget(){if("undefined"!=typeof globalThis&&globalThis.__TANSTACK_EVENT_TARGET__)return this.debugLog("Using global event target"),globalThis.__TANSTACK_EVENT_TARGET__;if("undefined"!=typeof window&&void 0!==window.addEventListener)return this.debugLog("Using window as event target"),window;let e="undefined"!=typeof EventTarget?new EventTarget:void 0;return void 0===e||void 0===e.addEventListener?(this.debugLog("No event mechanism available, running in non-web environment"),{addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!1}):(this.debugLog("Using new EventTarget as fallback"),e)}getPluginId(){return this.#t}dispatchCustomEventShim(e,t){try{let r=new Event(e,{detail:t});this.#r().dispatchEvent(r)}catch(e){this.debugLog("Failed to dispatch shim event")}}dispatchCustomEvent(e,t){try{this.#r().dispatchEvent(new CustomEvent(e,{detail:t}))}catch(r){this.dispatchCustomEventShim(e,t)}}emitEventToBus(e){this.debugLog("Emitting event to client bus",e),this.dispatchCustomEvent("tanstack-dispatch-event",e)}emit(e,t){if(!this.#e)return void this.debugLog("Event bus client is disabled, not emitting event",e,t);if(!this.#a){this.debugLog("Bus not available, will be pushed as soon as connected"),this.#i.push({type:`${this.#t}:${e}`,payload:t,pluginId:this.#t}),"undefined"==typeof CustomEvent||this.#c||(this.#f(),this.startConnectLoop());return}return this.emitEventToBus({type:`${this.#t}:${e}`,payload:t,pluginId:this.#t})}on(e,t){let r=`${this.#t}:${e}`;if(!this.#e)return this.debugLog("Event bus client is disabled, not registering event",r),()=>{};let n=e=>{this.debugLog("Received event from bus",e.detail),t(e.detail)};return this.#r().addEventListener(r,n),this.debugLog("Registered event to bus",r),()=>{this.#r().removeEventListener(r,n)}}onAll(e){if(!this.#e)return this.debugLog("Event bus client is disabled, not registering event"),()=>{};let t=t=>{e(t.detail)};return this.#r().addEventListener("tanstack-devtools-global",t),()=>this.#r().removeEventListener("tanstack-devtools-global",t)}onAllPluginEvents(e){if(!this.#e)return this.debugLog("Event bus client is disabled, not registering event"),()=>{};let t=t=>{let r=t.detail;this.#t&&r.pluginId!==this.#t||e(r)};return this.#r().addEventListener("tanstack-devtools-global",t),()=>this.#r().removeEventListener("tanstack-devtools-global",t)}}let $=new class extends V{constructor(e){super({pluginId:"pacer",debug:e?.debug})}};function B(){return{executionCount:0,isPending:!1,lastArgs:void 0,lastExecutionTime:0,nextExecutionTime:0,status:"idle",maybeExecuteCount:0}}let H={enabled:!0,leading:!0,trailing:!0,wait:0};class W{constructor(e,t){this.fn=e,this.store=new P(B()),this.setOptions=e=>{this.options={...this.options,...e},this.#p()||this.cancel()},this.#m=e=>{this.store.setState(t=>{let r={...t,...e},{isPending:n}=r;return{...r,status:this.#p()?n?"pending":"idle":"disabled"}}),$.emit("Throttler",this)},this.#p=()=>!!z(this.options.enabled,this),this.#g=()=>z(this.options.wait,this),this.maybeExecute=(...e)=>{this.#m({maybeExecuteCount:this.store.state.maybeExecuteCount+1});let t=Date.now(),r=t-this.store.state.lastExecutionTime,n=this.#g();if(this.options.leading&&r>=n)this.#v(...e);else if(this.#m({lastArgs:e}),!this.#y&&this.options.trailing){let e=this.store.state.lastExecutionTime?t-this.store.state.lastExecutionTime:0;this.#m({isPending:!0}),this.#y=setTimeout(()=>{let{lastArgs:e}=this.store.state;void 0!==e&&this.#v(...e)},n-e)}},this.#v=(...e)=>{if(!this.#p())return;this.fn(...e);let t=Date.now(),r=t+this.#g();this.#b(),this.#m({executionCount:this.store.state.executionCount+1,lastExecutionTime:t,nextExecutionTime:r,isPending:!1,lastArgs:void 0}),this.options.onExecute?.(e,this),setTimeout(()=>{this.store.state.isPending||this.#m({nextExecutionTime:void 0})},this.#g())},this.flush=()=>{this.store.state.isPending&&this.store.state.lastArgs&&this.#v(...this.store.state.lastArgs)},this.#b=()=>{this.#y&&(clearTimeout(this.#y),this.#y=void 0)},this.cancel=()=>{this.#b(),this.#m({lastArgs:void 0,isPending:!1})},this.reset=()=>{this.#m(B())},this.key=function(e){return e||("undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():"")}(t.key),this.options={...H,...t},this.#m(this.options.initialState??{}),$.on("d-Throttler",e=>{e.payload.key===this.key&&(this.#m(e.payload.store.state),this.setOptions(e.payload.options))})}#y;#m;#p;#g;#v;#b}let q=e=>{if(!e.validators)return e.runValidation({validators:[],form:e.form});let t=e.event.async,r=t?void 0:{fn:e.validators.onMount,cause:"mount"},n={fn:t?e.validators.onChangeAsync:e.validators.onChange,cause:"change"},i={fn:t?e.validators.onBlurAsync:e.validators.onBlur,cause:"blur"},a={fn:t?e.validators.onSubmitAsync:e.validators.onSubmit,cause:"submit"},s=t?void 0:{fn:()=>void 0,cause:"server"};switch(e.event.type){case"mount":return e.runValidation({validators:[r],form:e.form});case"submit":return e.runValidation({validators:[n,i,a,s],form:e.form});case"server":return e.runValidation({validators:[],form:e.form});case"blur":return e.runValidation({validators:[i,s],form:e.form});case"change":return e.runValidation({validators:[n,s],form:e.form});default:throw Error(`Unknown validation event type: ${e.event.type}`)}},K=(e,t)=>{let r=function(e,t){let r=new Map;for(let n of e){let e=n.path??[],i=t,a="";for(let t=0;t<e.length;t++){let r=e[t];if(void 0===r)continue;let n="object"==typeof r?r.key:r,s=Number(n);Array.isArray(i)&&!Number.isNaN(s)?a+=`[${s}]`:a+=(t>0?".":"")+String(n),i="object"==typeof i&&null!==i?i[n]:void 0}r.set(a,(r.get(a)??[]).concat(n))}return Object.fromEntries(r)}(e,t);return{form:r,fields:r}},G={validate({value:e,validationSource:t},r){let n=r["~standard"].validate(e);if(n instanceof Promise)throw Error("async function passed to sync validator");if(n.issues)return"field"===t?n.issues:K(n.issues,e)},async validateAsync({value:e,validationSource:t},r){let n=await r["~standard"].validate(e);if(n.issues)return"field"===t?n.issues:K(n.issues,e)}},Q=e=>!!e&&"~standard"in e,Y={isValidating:!1,isTouched:!1,isBlurred:!1,isDirty:!1,isPristine:!0,isValid:!0,isDefaultValue:!0,errors:[],errorMap:{},errorSourceMap:{}};function J(e){function t(e,t){return`${e}[${t}]`}function r(t,r){("up"===r?t:[...t].reverse()).forEach(t=>{var i;let a=(i=t.toString(),i.replace(/\[(\d+)\]/,(e,t)=>{let n=parseInt(t,10),i="up"===r?n+1:Math.max(0,n-1);return`[${i}]`})),s=e.getFieldMeta(a);s?e.setFieldMeta(t,s):e.setFieldMeta(t,n())})}let n=()=>Y;return{handleArrayFieldMetaShift:function(i,a,s,o){let l=function(r,n,i,a){let s=[t(r,n)];if("swap"===i)s.push(t(r,a));else if("move"===i){let[e,i]=[Math.min(n,a),Math.max(n,a)];for(let n=e;n<=i;n++)s.push(t(r,n))}else{let i=e.getFieldValue(r),a=Array.isArray(i)?i.length:0;for(let e=n+1;e<a;e++)s.push(t(r,e))}return Object.keys(e.fieldInfo).filter(e=>s.some(t=>e.startsWith(t)))}(i,a,s,o);({insert:()=>{var s,o,u;return s=l,o=i,u=a,void(r(s,"down"),s.forEach(r=>{r.toString().startsWith(t(o,u))&&e.setFieldMeta(r,n())}))},remove:()=>{r(l,"up")},swap:()=>{var r,n,s,u;return void 0!==o&&(r=l,n=i,s=a,u=o,void r.forEach(r=>{if(!r.toString().startsWith(t(n,s)))return;let i=r.toString().replace(t(n,s),t(n,u)),[a,o]=[e.getFieldMeta(r),e.getFieldMeta(i)];a&&e.setFieldMeta(i,a),o&&e.setFieldMeta(r,o)}))},move:()=>{var n,s,u,c;let d;return void 0!==o&&(n=l,s=i,u=a,c=o,d=new Map(Object.keys(e.fieldInfo).filter(e=>e.startsWith(t(s,u))).map(t=>[t,e.getFieldMeta(t)])),void(r(n,u<c?"up":"down"),Object.keys(e.fieldInfo).filter(e=>e.startsWith(t(s,c))).forEach(r=>{let n=r.replace(t(s,c),t(s,u)),i=d.get(n);i&&e.setFieldMeta(r,i)})))}})[s]()}}}let X=new class extends V{constructor(){super({pluginId:"form-devtools",reconnectEveryMs:1e3})}};function Z(e){return{values:e.values??{},errorMap:e.errorMap??{},fieldMetaBase:e.fieldMetaBase??{},isSubmitted:e.isSubmitted??!1,isSubmitting:e.isSubmitting??!1,isValidating:e.isValidating??!1,submissionAttempts:e.submissionAttempts??0,isSubmitSuccessful:e.isSubmitSuccessful??!1,validationMetaMap:e.validationMetaMap??{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}}}class ee{constructor(e){this.options={},this.fieldInfo={},this.prevTransformArray=[],this.mount=()=>{let e=this.fieldMetaDerived.mount(),t=this.store.mount(),r=()=>{e(),t(),X.emit("form-unmounted",{id:this._formId})};this.options.listeners?.onMount?.({formApi:this});let{onMount:n}=this.options.validators||{};return X.emit("form-api",{id:this._formId,state:this.store.state,options:this.options}),n&&this.validateSync("mount"),r},this.update=e=>{if(!e)return;let t=this.options;this.options=e;let r=!!e.transform?.deps?.some((e,t)=>e!==this.prevTransformArray[t]),n=e.defaultValues&&!E(e.defaultValues,t.defaultValues)&&!this.state.isTouched,i=!E(e.defaultState,t.defaultState)&&!this.state.isTouched;(n||i||r)&&(U(()=>{this.baseStore.setState(()=>Z(Object.assign({},this.state,i?e.defaultState:{},n?{values:e.defaultValues}:{},r?{_force_re_eval:!this.state._force_re_eval}:{})))}),X.emit("form-api",{id:this._formId,state:this.store.state,options:this.options}))},this.reset=(e,t)=>{let{fieldMeta:r}=this.state,n=this.resetFieldMeta(r);e&&!t?.keepDefaultValues&&(this.options={...this.options,defaultValues:e}),this.baseStore.setState(()=>Z({...this.options.defaultState,values:e??this.options.defaultValues??this.options.defaultState?.values,fieldMetaBase:n}))},this.validateAllFields=async e=>{let t=[];return U(()=>{Object.values(this.fieldInfo).forEach(r=>{if(!r.instance)return;let n=r.instance;t.push(Promise.resolve().then(()=>n.validate(e,{skipFormValidation:!0}))),r.instance.state.meta.isTouched||r.instance.setMeta(e=>({...e,isTouched:!0}))})}),(await Promise.all(t)).flat()},this.validateArrayFieldsStartingFrom=async(e,t,r)=>{let n=this.getFieldValue(e),i=Array.isArray(n)?Math.max(n.length-1,0):null,a=[`${e}[${t}]`];for(let r=t+1;r<=(i??0);r++)a.push(`${e}[${r}]`);let s=Object.keys(this.fieldInfo).filter(e=>a.some(t=>e.startsWith(t))),o=[];return U(()=>{s.forEach(e=>{o.push(Promise.resolve().then(()=>this.validateField(e,r)))})}),(await Promise.all(o)).flat()},this.validateField=(e,t)=>{let r=this.fieldInfo[e]?.instance;return r?(r.state.meta.isTouched||r.setMeta(e=>({...e,isTouched:!0})),r.validate(t)):[]},this.validateSync=e=>{let t=w(e,{...this.options,form:this,validationLogic:this.options.validationLogic||q}),r=!1,n={};return U(()=>{for(let e of t){if(!e.validate)continue;let{formError:t,fieldErrors:i}=et(this.runValidator({validate:e.validate,value:{value:this.state.values,formApi:this,validationSource:"form"},type:"validate"})),a=er(e.cause);for(let e of Object.keys(this.state.fieldMeta)){if(void 0===this.baseStore.state.fieldMetaBase[e])continue;let t=this.getFieldMeta(e);if(!t)continue;let{errorMap:r,errorSourceMap:s}=t,o=i?.[e],{newErrorValue:l,newSource:u}=x({newFormValidatorError:o,isPreviousErrorFromFormValidator:s?.[a]==="form",previousErrorValue:r?.[a]});"form"===u&&(n[e]={...n[e],[a]:o}),r?.[a]!==l&&this.setFieldMeta(e,e=>({...e,errorMap:{...e.errorMap,[a]:l},errorSourceMap:{...e.errorSourceMap,[a]:u}}))}this.state.errorMap?.[a]!==t&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[a]:t}})),(t||i)&&(r=!0)}let i=er("submit");this.state.errorMap?.[i]&&"submit"!==e&&!r&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[i]:void 0}}));let a=er("server");this.state.errorMap?.[a]&&"server"!==e&&!r&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[a]:void 0}}))}),{hasErrored:r,fieldsErrorMap:n}},this.validateAsync=async e=>{let t,r=S(e,{...this.options,form:this,validationLogic:this.options.validationLogic||q});this.state.isFormValidating||this.baseStore.setState(e=>({...e,isFormValidating:!0}));let n=[];for(let e of r){if(!e.validate)continue;let r=er(e.cause),i=this.state.validationMetaMap[r];i?.lastAbortController.abort();let a=new AbortController;this.state.validationMetaMap[r]={lastAbortController:a},n.push(new Promise(async r=>{let n;try{n=await new Promise((t,r)=>{setTimeout(async()=>{if(a.signal.aborted)return t(void 0);try{t(await this.runValidator({validate:e.validate,value:{value:this.state.values,formApi:this,validationSource:"form",signal:a.signal},type:"validateAsync"}))}catch(e){r(e)}},e.debounceMs)})}catch(e){n=e}let{formError:i,fieldErrors:s}=et(n);s&&(t=t?{...t,...s}:s);let o=er(e.cause);for(let e of Object.keys(this.state.fieldMeta)){if(void 0===this.baseStore.state.fieldMetaBase[e])continue;let r=this.getFieldMeta(e);if(!r)continue;let{errorMap:n,errorSourceMap:i}=r,{newErrorValue:a,newSource:s}=x({newFormValidatorError:t?.[e],isPreviousErrorFromFormValidator:i?.[o]==="form",previousErrorValue:n?.[o]});n?.[o]!==a&&this.setFieldMeta(e,e=>({...e,errorMap:{...e.errorMap,[o]:a},errorSourceMap:{...e.errorSourceMap,[o]:s}}))}this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[o]:i}})),r(t?{fieldErrors:t,errorMapKey:o}:void 0)}))}let i={};if(n.length){for(let e of(await Promise.all(n)))if(e?.fieldErrors){let{errorMapKey:t}=e;for(let[r,n]of Object.entries(e.fieldErrors)){let e={...i[r]||{},[t]:n};i[r]=e}}}return this.baseStore.setState(e=>({...e,isFormValidating:!1})),i},this.validate=e=>{let{hasErrored:t,fieldsErrorMap:r}=this.validateSync(e);return t&&!this.options.asyncAlways?r:this.validateAsync(e)},this.getFieldValue=e=>u(this.state.values,e),this.getFieldMeta=e=>this.state.fieldMeta[e],this.getFieldInfo=e=>this.fieldInfo[e]||={instance:null,validationMetaMap:{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}},this.setFieldMeta=(e,t)=>{this.baseStore.setState(r=>({...r,fieldMetaBase:{...r.fieldMetaBase,[e]:l(t,r.fieldMetaBase[e])}}))},this.resetFieldMeta=e=>Object.keys(e).reduce((e,t)=>(e[t]=Y,e),{}),this.setFieldValue=(e,t,r)=>{let n=r?.dontUpdateMeta??!1,i=r?.dontRunListeners??!1,a=r?.dontValidate??!1;U(()=>{n||this.setFieldMeta(e,e=>({...e,isTouched:!0,isDirty:!0,errorMap:{...e?.errorMap,onMount:void 0}})),this.baseStore.setState(r=>({...r,values:c(r.values,e,t)}))}),i||this.getFieldInfo(e).instance?.triggerOnChangeListener(),a||this.validateField(e,"change")},this.deleteField=e=>{let t=[...Object.keys(this.fieldInfo).filter(t=>{let r=e.toString();return t!==r&&t.startsWith(r)}),e];this.baseStore.setState(e=>{let r={...e};return t.forEach(e=>{var t;let n;t=r.values,n=y(e),r.values=function e(t){if(!t)return;if(1===n.length){let e=n[0];if(Array.isArray(t)&&"number"==typeof e)return t.filter((t,r)=>r!==e);let{[e]:r,...i}=t;return i}let r=n.shift();if("string"==typeof r&&"object"==typeof t)return{...t,[r]:e(t[r])};if("number"==typeof r&&Array.isArray(t)){if(r>=t.length)return t;let n=t.slice(0,r);return[...n.length?n:Array(r),e(t[r]),...t.slice(r+1)]}throw Error("It seems we have created an infinite loop in deleteBy. ")}(t),delete this.fieldInfo[e],delete r.fieldMetaBase[e]}),r})},this.pushFieldValue=(e,t,r)=>{this.setFieldValue(e,e=>[...Array.isArray(e)?e:[],t],r)},this.insertFieldValue=async(e,t,r,n)=>{this.setFieldValue(e,e=>[...e.slice(0,t),r,...e.slice(t)],C(n,{dontValidate:!0}));let i=n?.dontValidate??!1;i||await this.validateField(e,"change"),J(this).handleArrayFieldMetaShift(e,t,"insert"),i||await this.validateArrayFieldsStartingFrom(e,t,"change")},this.replaceFieldValue=async(e,t,r,n)=>{this.setFieldValue(e,e=>e.map((e,n)=>n===t?r:e),C(n,{dontValidate:!0})),n?.dontValidate||(await this.validateField(e,"change"),await this.validateArrayFieldsStartingFrom(e,t,"change"))},this.removeFieldValue=async(e,t,r)=>{let n=this.getFieldValue(e),i=Array.isArray(n)?Math.max(n.length-1,0):null;if(this.setFieldValue(e,e=>e.filter((e,r)=>r!==t),C(r,{dontValidate:!0})),J(this).handleArrayFieldMetaShift(e,t,"remove"),null!==i){let t=`${e}[${i}]`;this.deleteField(t)}r?.dontValidate||(await this.validateField(e,"change"),await this.validateArrayFieldsStartingFrom(e,t,"change"))},this.swapFieldValues=(e,t,r,n)=>{this.setFieldValue(e,e=>{let n=e[t],i=e[r];return c(c(e,`${t}`,i),`${r}`,n)},C(n,{dontValidate:!0})),J(this).handleArrayFieldMetaShift(e,t,"swap",r),n?.dontValidate||(this.validateField(e,"change"),this.validateField(`${e}[${t}]`,"change"),this.validateField(`${e}[${r}]`,"change"))},this.moveFieldValues=(e,t,r,n)=>{this.setFieldValue(e,e=>{let n=[...e];return n.splice(r,0,n.splice(t,1)[0]),n},C(n,{dontValidate:!0})),J(this).handleArrayFieldMetaShift(e,t,"move",r),n?.dontValidate||(this.validateField(e,"change"),this.validateField(`${e}[${t}]`,"change"),this.validateField(`${e}[${r}]`,"change"))},this.clearFieldValues=(e,t)=>{let r=this.getFieldValue(e),n=Array.isArray(r)?Math.max(r.length-1,0):null;if(this.setFieldValue(e,[],C(t,{dontValidate:!0})),null!==n)for(let t=0;t<=n;t++){let r=`${e}[${t}]`;this.deleteField(r)}t?.dontValidate||this.validateField(e,"change")},this.resetField=e=>{this.baseStore.setState(t=>({...t,fieldMetaBase:{...t.fieldMetaBase,[e]:Y},values:this.options.defaultValues?c(t.values,e,u(this.options.defaultValues,e)):t.values}))},this.getAllErrors=()=>({form:{errors:this.state.errors,errorMap:this.state.errorMap},fields:Object.entries(this.state.fieldMeta).reduce((e,[t,r])=>(Object.keys(r).length&&r.errors.length&&(e[t]={errors:r.errors,errorMap:r.errorMap}),e),{})}),this.parseValuesWithSchema=e=>G.validate({value:this.state.values,validationSource:"form"},e),this.parseValuesWithSchemaAsync=e=>G.validateAsync({value:this.state.values,validationSource:"form"},e),this.timeoutIds={validations:{},listeners:{},formListeners:{}},this._formId=e?.formId??function(){let e,t=0,r="";if(!n||I+16>256){for(n=Array(256),t=256;t--;)n[t]=256*Math.random()|0;t=0,I=0}for(;t<16;t++)e=n[I+t],6===t?r+=T[15&e|64]:8===t?r+=T[63&e|128]:r+=T[e],1&t&&t>1&&t<11&&(r+="-");return I++,r}(),this._devtoolsSubmissionOverride=!1,this.baseStore=new P(Z({...e?.defaultState,values:e?.defaultValues??e?.defaultState?.values})),this.fieldMetaDerived=new A({deps:[this.baseStore],fn:({prevDepVals:e,currDepVals:t,prevVal:r})=>{let n=e?.[0],i=t[0],a=0,s={};for(let e of Object.keys(i.fieldMetaBase)){var o;let t=i.fieldMetaBase[e],l=n?.fieldMetaBase[e],c=r?.[e],d=u(i.values,e),h=c?.errors;if(!l||t.errorMap!==l.errorMap){h=Object.values(t.errorMap??{}).filter(e=>void 0!==e);let r=this.getFieldInfo(e)?.instance;r&&!r.options.disableErrorFlat&&(h=h?.flat(1))}let f=!!(Array.isArray(o=h??[])&&0===o.length),p=!t.isDirty,m=E(d,u(this.options.defaultValues,e))||E(d,this.getFieldInfo(e)?.instance?.options.defaultValue);if(c&&c.isPristine===p&&c.isValid===f&&c.isDefaultValue===m&&c.errors===h&&t===l){s[e]=c,a++;continue}s[e]={...t,errors:h,isPristine:p,isValid:f,isDefaultValue:m}}return Object.keys(i.fieldMetaBase).length&&r&&a===Object.keys(i.fieldMetaBase).length?r:s}}),this.store=new A({deps:[this.baseStore,this.fieldMetaDerived],fn:({prevDepVals:e,currDepVals:t,prevVal:r})=>{let n=e?.[0],i=t[0],a=Object.values(t[1]).filter(Boolean),s=a.some(e=>e.isValidating),o=a.every(e=>e.isValid),l=a.some(e=>e.isTouched),u=a.some(e=>e.isBlurred),c=a.every(e=>e.isDefaultValue),d=l&&i.errorMap?.onMount,h=a.some(e=>e.isDirty),f=!h,p=!!(i.errorMap?.onMount||a.some(e=>e?.errorMap?.onMount)),m=r?.errors??[];n&&i.errorMap===n.errorMap||(m=Object.values(i.errorMap).reduce((e,t)=>(void 0===t||(t&&k(t)?e.push(t.form):e.push(t)),e),[]));let g=0===m.length,v=o&&g,y=this.options.canSubmitWhenInvalid??!1,b=0===i.submissionAttempts&&!l&&!p||!s&&!i.isSubmitting&&v||y,w=i.errorMap;if(d&&(m=m.filter(e=>e!==i.errorMap.onMount),w=Object.assign(w,{onMount:void 0})),r&&n&&r.errorMap===w&&r.fieldMeta===this.fieldMetaDerived.state&&r.errors===m&&r.isFieldsValidating===s&&r.isFieldsValid===o&&r.isFormValid===g&&r.isValid===v&&r.canSubmit===b&&r.isTouched===l&&r.isBlurred===u&&r.isPristine===f&&r.isDefaultValue===c&&r.isDirty===h&&E(n,i))return r;let S={...i,errorMap:w,fieldMeta:this.fieldMetaDerived.state,errors:m,isFieldsValidating:s,isFieldsValid:o,isFormValid:g,isValid:v,canSubmit:b,isTouched:l,isBlurred:u,isPristine:f,isDefaultValue:c,isDirty:h},x=this.options.transform?.deps??[];if(x.length!==this.prevTransformArray.length||x.some((e,t)=>e!==this.prevTransformArray[t])){let e=Object.assign({},this,{state:S});this.options.transform?.fn(e),S=e.state,this.prevTransformArray=x}return S}}),this.handleSubmit=this.handleSubmit.bind(this),this.update(e||{});const t=new W(e=>X.emit("form-state",{id:this._formId,state:e}),{wait:300}).maybeExecute;this.store.subscribe(()=>{t(this.store.state)}),X.on("request-form-state",e=>{e.payload.id===this._formId&&X.emit("form-api",{id:this._formId,state:this.store.state,options:this.options})}),X.on("request-form-reset",e=>{e.payload.id===this._formId&&this.reset()}),X.on("request-form-force-submit",e=>{e.payload.id===this._formId&&(this._devtoolsSubmissionOverride=!0,this.handleSubmit(),this._devtoolsSubmissionOverride=!1)})}get state(){return this.store.state}get formId(){return this._formId}runValidator(e){return Q(e.validate)?G[e.type](e.value,e.validate):e.validate(e.value)}async handleSubmit(e){this.baseStore.setState(e=>({...e,isSubmitted:!1,submissionAttempts:e.submissionAttempts+1,isSubmitSuccessful:!1})),U(()=>{Object.values(this.fieldInfo).forEach(e=>{e.instance&&(e.instance.state.meta.isTouched||e.instance.setMeta(e=>({...e,isTouched:!0})))})});let t=e??this.options.onSubmitMeta;if(!this.state.canSubmit&&!this._devtoolsSubmissionOverride)return void this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t});this.baseStore.setState(e=>({...e,isSubmitting:!0}));let r=()=>{this.baseStore.setState(e=>({...e,isSubmitting:!1}))};if(await this.validateAllFields("submit"),!this.state.isFieldsValid){r(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t}),X.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:"validateAllFields",errors:Object.values(this.state.fieldMeta).map(e=>e.errors).flat()});return}if(await this.validate("submit"),!this.state.isValid){r(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t}),X.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:"validate",errors:this.state.errors});return}U(()=>{Object.values(this.fieldInfo).forEach(e=>{e.instance?.options.listeners?.onSubmit?.({value:e.instance.state.value,fieldApi:e.instance})})}),this.options.listeners?.onSubmit?.({formApi:this,meta:t});try{await this.options.onSubmit?.({value:this.state.values,formApi:this,meta:t}),U(()=>{this.baseStore.setState(e=>({...e,isSubmitted:!0,isSubmitSuccessful:!0})),X.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!0}),r()})}catch(e){throw this.baseStore.setState(e=>({...e,isSubmitSuccessful:!1})),X.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:"inflight",onError:e}),r(),e}}setErrorMap(e){U(()=>{Object.entries(e).forEach(([e,t])=>{if(k(t)){let{formError:r,fieldErrors:n}=et(t);for(let t of Object.keys(this.fieldInfo))this.getFieldMeta(t)&&this.setFieldMeta(t,r=>({...r,errorMap:{...r.errorMap,[e]:n?.[t]},errorSourceMap:{...r.errorSourceMap,[e]:"form"}}));this.baseStore.setState(t=>({...t,errorMap:{...t.errorMap,[e]:r}}))}else this.baseStore.setState(r=>({...r,errorMap:{...r.errorMap,[e]:t}}))})})}}function et(e){if(e)return k(e)?{formError:et(e.form).formError,fieldErrors:e.fields}:{formError:e};return{formError:void 0}}function er(e){switch(e){case"submit":return"onSubmit";case"blur":return"onBlur";case"mount":return"onMount";case"server":return"onServer";case"dynamic":return"onDynamic";default:return"onChange"}}var en=r(791);function ei(e,t=e=>e){return(0,en.useSyncExternalStoreWithSelector)(e.subscribe,()=>e.state,()=>e.state,t,ea)}function ea(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[r,n]of e)if(!t.has(r)||!Object.is(n,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let r of e)if(!t.has(r))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();let r=es(e);if(r.length!==es(t).length)return!1;for(let n=0;n<r.length;n++)if(!Object.prototype.hasOwnProperty.call(t,r[n])||!Object.is(e[r[n]],t[r[n]]))return!1;return!0}function es(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}class eo{constructor(e){this.options={},this.mount=()=>{let e=this.store.mount();void 0!==this.options.defaultValue&&this.form.setFieldValue(this.name,this.options.defaultValue,{dontUpdateMeta:!0}),this.getInfo().instance=this,this.update(this.options);let{onMount:t}=this.options.validators||{};if(t){let e=this.runValidator({validate:t,value:{value:this.state.value,fieldApi:this,validationSource:"field"},type:"validate"});e&&this.setMeta(t=>({...t,errorMap:{...t?.errorMap,onMount:e},errorSourceMap:{...t?.errorSourceMap,onMount:"field"}}))}return this.options.listeners?.onMount?.({value:this.state.value,fieldApi:this}),e},this.update=e=>{this.options=e;let t=this.name!==e.name;if(this.name=e.name,void 0===this.state.value){let r=u(e.form.options.defaultValues,e.name),n=e.defaultValue??r;t?this.setValue(e=>e||n,{dontUpdateMeta:!0}):void 0!==n&&this.setValue(n,{dontUpdateMeta:!0})}void 0===this.form.getFieldMeta(this.name)&&this.setMeta(this.state.meta)},this.getValue=()=>this.form.getFieldValue(this.name),this.setValue=(e,t)=>{this.form.setFieldValue(this.name,e,C(t,{dontRunListeners:!0,dontValidate:!0})),t?.dontRunListeners||this.triggerOnChangeListener(),t?.dontValidate||this.validate("change")},this.getMeta=()=>this.store.state.meta,this.setMeta=e=>this.form.setFieldMeta(this.name,e),this.getInfo=()=>this.form.getFieldInfo(this.name),this.pushValue=(e,t)=>{this.form.pushFieldValue(this.name,e,C(t,{dontRunListeners:!0})),t?.dontRunListeners||this.triggerOnChangeListener()},this.insertValue=(e,t,r)=>{this.form.insertFieldValue(this.name,e,t,C(r,{dontRunListeners:!0})),r?.dontRunListeners||this.triggerOnChangeListener()},this.replaceValue=(e,t,r)=>{this.form.replaceFieldValue(this.name,e,t,C(r,{dontRunListeners:!0})),r?.dontRunListeners||this.triggerOnChangeListener()},this.removeValue=(e,t)=>{this.form.removeFieldValue(this.name,e,C(t,{dontRunListeners:!0})),t?.dontRunListeners||this.triggerOnChangeListener()},this.swapValues=(e,t,r)=>{this.form.swapFieldValues(this.name,e,t,C(r,{dontRunListeners:!0})),r?.dontRunListeners||this.triggerOnChangeListener()},this.moveValue=(e,t,r)=>{this.form.moveFieldValues(this.name,e,t,C(r,{dontRunListeners:!0})),r?.dontRunListeners||this.triggerOnChangeListener()},this.clearValues=e=>{this.form.clearFieldValues(this.name,C(e,{dontRunListeners:!0})),e?.dontRunListeners||this.triggerOnChangeListener()},this.getLinkedFields=e=>{let t=Object.values(this.form.fieldInfo),r=[];for(let n of t){if(!n.instance)continue;let{onChangeListenTo:t,onBlurListenTo:i}=n.instance.options.validators||{};"change"===e&&t?.includes(this.name)&&r.push(n.instance),"blur"===e&&i?.includes(this.name)&&r.push(n.instance)}return r},this.validateSync=(e,t)=>{let r=w(e,{...this.options,form:this.form,validationLogic:this.form.options.validationLogic||q}),n=this.getLinkedFields(e).reduce((t,r)=>{let n=w(e,{...r.options,form:r.form,validationLogic:r.form.options.validationLogic||q});return n.forEach(e=>{e.field=r}),t.concat(n)},[]),i=!1;U(()=>{let e=(e,r)=>{let n=eu(r.cause),a=r.validate?el(e.runValidator({validate:r.validate,value:{value:e.store.state.value,validationSource:"field",fieldApi:e},type:"validate"})):void 0,{newErrorValue:s,newSource:o}=_({formLevelError:t[n],fieldLevelError:a});e.state.meta.errorMap?.[n]!==s&&e.setMeta(e=>({...e,errorMap:{...e.errorMap,[n]:s},errorSourceMap:{...e.errorSourceMap,[n]:o}})),s&&(i=!0)};for(let t of r)e(this,t);for(let t of n)t.validate&&e(t.field,t)});let a=eu("submit");return this.state.meta.errorMap?.[a]&&"submit"!==e&&!i&&this.setMeta(e=>({...e,errorMap:{...e.errorMap,[a]:void 0},errorSourceMap:{...e.errorSourceMap,[a]:void 0}})),{hasErrored:i}},this.validateAsync=async(e,t)=>{let r=S(e,{...this.options,form:this.form,validationLogic:this.form.options.validationLogic||q}),n=await t,i=this.getLinkedFields(e),a=i.reduce((t,r)=>{let n=S(e,{...r.options,form:r.form,validationLogic:r.form.options.validationLogic||q});return n.forEach(e=>{e.field=r}),t.concat(n)},[]);for(let e of(this.state.meta.isValidating||this.setMeta(e=>({...e,isValidating:!0})),i))e.setMeta(e=>({...e,isValidating:!0}));let s=[],o=[],l=(e,t,r)=>{let i=eu(t.cause),a=e.getInfo().validationMetaMap[i];a?.lastAbortController.abort();let s=new AbortController;this.getInfo().validationMetaMap[i]={lastAbortController:s},r.push(new Promise(async r=>{let a;try{a=await new Promise((r,n)=>{this.timeoutIds.validations[t.cause]&&clearTimeout(this.timeoutIds.validations[t.cause]),this.timeoutIds.validations[t.cause]=setTimeout(async()=>{if(s.signal.aborted)return r(void 0);try{r(await this.runValidator({validate:t.validate,value:{value:e.store.state.value,fieldApi:e,signal:s.signal,validationSource:"field"},type:"validateAsync"}))}catch(e){n(e)}},t.debounceMs)})}catch(e){a=e}if(s.signal.aborted)return r(void 0);let o=el(a),{newErrorValue:l,newSource:u}=_({formLevelError:n[this.name]?.[i],fieldLevelError:o});e.setMeta(e=>({...e,errorMap:{...e?.errorMap,[i]:l},errorSourceMap:{...e.errorSourceMap,[i]:u}})),r(l)}))};for(let e of r)e.validate&&l(this,e,s);for(let e of a)e.validate&&l(e.field,e,o);let u=[];for(let e of((s.length||o.length)&&(u=await Promise.all(s),await Promise.all(o)),this.setMeta(e=>({...e,isValidating:!1})),i))e.setMeta(e=>({...e,isValidating:!1}));return u.filter(Boolean)},this.validate=(e,t)=>{if(!this.state.meta.isTouched)return[];let{fieldsErrorMap:r}=t?.skipFormValidation?{fieldsErrorMap:{}}:this.form.validateSync(e),{hasErrored:n}=this.validateSync(e,r[this.name]??{});if(n&&!this.options.asyncAlways)return this.getInfo().validationMetaMap[eu(e)]?.lastAbortController.abort(),this.state.meta.errors;let i=t?.skipFormValidation?Promise.resolve({}):this.form.validateAsync(e);return this.validateAsync(e,i)},this.handleChange=e=>{this.setValue(e)},this.handleBlur=()=>{this.state.meta.isTouched||this.setMeta(e=>({...e,isTouched:!0})),this.state.meta.isBlurred||this.setMeta(e=>({...e,isBlurred:!0})),this.validate("blur"),this.triggerOnBlurListener()},this.parseValueWithSchema=e=>G.validate({value:this.state.value,validationSource:"field"},e),this.parseValueWithSchemaAsync=e=>G.validateAsync({value:this.state.value,validationSource:"field"},e),this.form=e.form,this.name=e.name,this.timeoutIds={validations:{},listeners:{},formListeners:{}},this.store=new A({deps:[this.form.store],fn:()=>({value:this.form.getFieldValue(this.name),meta:this.form.getFieldMeta(this.name)??{...Y,...e.defaultMeta}})}),this.options=e}get state(){return this.store.state}runValidator(e){return Q(e.validate)?G[e.type](e.value,e.validate):e.validate(e.value)}setErrorMap(e){this.setMeta(t=>({...t,errorMap:{...t.errorMap,...e}}))}triggerOnBlurListener(){let e=this.form.options.listeners?.onBlurDebounceMs;e&&e>0?(this.timeoutIds.formListeners.blur&&clearTimeout(this.timeoutIds.formListeners.blur),this.timeoutIds.formListeners.blur=setTimeout(()=>{this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this})},e)):this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this});let t=this.options.listeners?.onBlurDebounceMs;t&&t>0?(this.timeoutIds.listeners.blur&&clearTimeout(this.timeoutIds.listeners.blur),this.timeoutIds.listeners.blur=setTimeout(()=>{this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})},t)):this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})}triggerOnChangeListener(){let e=this.form.options.listeners?.onChangeDebounceMs;e&&e>0?(this.timeoutIds.formListeners.change&&clearTimeout(this.timeoutIds.formListeners.change),this.timeoutIds.formListeners.change=setTimeout(()=>{this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this})},e)):this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this});let t=this.options.listeners?.onChangeDebounceMs;t&&t>0?(this.timeoutIds.listeners.change&&clearTimeout(this.timeoutIds.listeners.change),this.timeoutIds.listeners.change=setTimeout(()=>{this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this})},t)):this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this})}}function el(e){if(e)return e}function eu(e){switch(e){case"submit":return"onSubmit";case"blur":return"onBlur";case"mount":return"onMount";case"server":return"onServer";case"dynamic":return"onDynamic";default:return"onChange"}}let ec="undefined"!=typeof window?a.useLayoutEffect:a.useEffect,ed=({children:e,...t})=>{let r=function(e){let[t]=(0,a.useState)(()=>{let t=new eo({...e,form:e.form,name:e.name});return t.Field=ed,t});return ec(t.mount,[t]),ec(()=>{t.update(e)}),ei(t.store,"array"===e.mode?e=>[e.meta,Object.keys(e.value??[]).length]:void 0),t}(t),n=(0,a.useMemo)(()=>l(e,r),[e,r,r.state.value,r.state.meta]);return(0,i.jsx)(i.Fragment,{children:n})};function eh({form:e,selector:t,children:r}){return l(r,ei(e.store,t))}class ef{constructor(e){if(this.getFormFieldName=e=>{if("string"==typeof this.fieldsMap)return b(this.fieldsMap,e);let t=y(e)[0];if("string"!=typeof t)return"";let r=e.slice(t.length);return b(this.fieldsMap[t],r)},this.getFormFieldOptions=e=>{let t={...e},r=t.validators;if(t.name=this.getFormFieldName(e.name),r&&(r.onChangeListenTo||r.onBlurListenTo)){let e={...r},n=e=>{if(e)return e.map(e=>this.getFormFieldName(e))};e.onChangeListenTo=n(r.onChangeListenTo),e.onBlurListenTo=n(r.onBlurListenTo),t.validators=e}return t},this.mount=()=>this.store.mount(),this.validateArrayFieldsStartingFrom=async(e,t,r)=>this.form.validateArrayFieldsStartingFrom(this.getFormFieldName(e),t,r),this.validateField=(e,t)=>this.form.validateField(this.getFormFieldName(e),t),this.getFieldValue=e=>this.form.getFieldValue(this.getFormFieldName(e)),this.getFieldMeta=e=>this.form.getFieldMeta(this.getFormFieldName(e)),this.setFieldMeta=(e,t)=>this.form.setFieldMeta(this.getFormFieldName(e),t),this.setFieldValue=(e,t,r)=>this.form.setFieldValue(this.getFormFieldName(e),t,r),this.deleteField=e=>this.form.deleteField(this.getFormFieldName(e)),this.pushFieldValue=(e,t,r)=>this.form.pushFieldValue(this.getFormFieldName(e),t,r),this.insertFieldValue=async(e,t,r,n)=>this.form.insertFieldValue(this.getFormFieldName(e),t,r,n),this.replaceFieldValue=async(e,t,r,n)=>this.form.replaceFieldValue(this.getFormFieldName(e),t,r,n),this.removeFieldValue=async(e,t,r)=>this.form.removeFieldValue(this.getFormFieldName(e),t,r),this.swapFieldValues=(e,t,r,n)=>this.form.swapFieldValues(this.getFormFieldName(e),t,r,n),this.moveFieldValues=(e,t,r,n)=>this.form.moveFieldValues(this.getFormFieldName(e),t,r,n),this.clearFieldValues=(e,t)=>this.form.clearFieldValues(this.getFormFieldName(e),t),this.resetField=e=>this.form.resetField(this.getFormFieldName(e)),this.validateAllFields=e=>this.form.validateAllFields(e),e.form instanceof ef){const t=e.form;if(this.form=t.form,"string"==typeof e.fields)this.fieldsMap=t.getFormFieldName(e.fields);else{const r={...e.fields};for(const e in r)r[e]=t.getFormFieldName(r[e]);this.fieldsMap=r}}else this.form=e.form,this.fieldsMap=e.fields;this.store=new A({deps:[this.form.store],fn:({currDepVals:e})=>{let t,r=e[0];if("string"==typeof this.fieldsMap)t=u(r.values,this.fieldsMap);else{t={};let e=this.fieldsMap;for(let n in e)t[n]=u(r.values,e[n])}return{values:t}}})}get state(){return this.store.state}async handleSubmit(e){return this.form.handleSubmit(e)}}function ep({lens:e,selector:t,children:r}){return l(r,ei(e.store,t))}let em=(0,a.createContext)(null),eg=(0,a.createContext)(null);function ev(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function ey(...e){return t=>{let r=!1,n=e.map(e=>{let n=ev(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){let r=n[t];"function"==typeof r?r():ev(e[t],null)}}}}var eb=Symbol.for("react.lazy"),ew=s[" use ".trim().toString()];function eS(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===eb&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}function ek(e){var t;let r,n=(t=e,(r=a.forwardRef((e,t)=>{let{children:r,...n}=e;if(eS(r)&&"function"==typeof ew&&(r=ew(r._payload)),a.isValidElement(r)){var i;let e,s,o=(i=r,(s=(e=Object.getOwnPropertyDescriptor(i.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?i.ref:(s=(e=Object.getOwnPropertyDescriptor(i,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?i.props.ref:i.props.ref||i.ref),l=function(e,t){let r={...t};for(let n in t){let i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(r[n]=i):"style"===n?r[n]={...i,...a}:"className"===n&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==a.Fragment&&(l.ref=t?ey(t,o):o),a.cloneElement(r,l)}return a.Children.count(r)>1?a.Children.only(null):null})).displayName=`${t}.SlotClone`,r),s=a.forwardRef((e,t)=>{let{children:r,...s}=e;eS(r)&&"function"==typeof ew&&(r=ew(r._payload));let o=a.Children.toArray(r),l=o.find(e_);if(l){let e=l.props.children,r=o.map(t=>t!==l?t:a.Children.count(e)>1?a.Children.only(null):a.isValidElement(e)?e.props.children:null);return(0,i.jsx)(n,{...s,ref:t,children:a.isValidElement(e)?a.cloneElement(e,void 0,r):null})}return(0,i.jsx)(n,{...s,ref:t,children:r})});return s.displayName=`${e}.Slot`,s}var eE=ek("Slot"),ex=Symbol("radix.slottable");function e_(e){return a.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===ex}var eC=r(238);let eI=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,eT=eC.$,eP=(e,t)=>r=>{var n;if((null==t?void 0:t.variants)==null)return eT(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:i,defaultVariants:a}=t,s=Object.keys(i).map(e=>{let t=null==r?void 0:r[e],n=null==a?void 0:a[e];if(null===t)return null;let s=eI(t)||eI(n);return i[e][s]}),o=r&&Object.entries(r).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{});return eT(e,s,null==t||null==(n=t.compoundVariants)?void 0:n.reduce((e,t)=>{let{class:r,className:n,...i}=t;return Object.entries(i).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...a,...o}[t]):({...a,...o})[t]===r})?[...e,r,n]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)};var eA=r(634);let eR=eP("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function eN({className:e,variant:t,size:r,asChild:n=!1,...a}){return(0,i.jsx)(n?eE:"button",{"data-slot":"button",className:(0,eA.cn)(eR({variant:t,size:r,className:e})),...a})}let eO=()=>{let e=eM().state.meta.errors;if(!e||0===e.length)return null;let t=e.map(e=>({message:e}));return(0,i.jsx)(ti,{errors:t})},{fieldContext:eL,useFieldContext:eM,formContext:eF,useFormContext:ej}={fieldContext:em,useFieldContext:function(){let e=(0,a.useContext)(em);if(!e)throw Error("`fieldContext` only works when within a `fieldComponent` passed to `createFormHook`");return e},useFormContext:function(){let e=(0,a.useContext)(eg);if(!e)throw Error("`formContext` only works when within a `formComponent` passed to `createFormHook`");return e},formContext:eg},{useAppForm:eD,withForm:eU}=function({fieldComponents:e,fieldContext:t,formContext:r,formComponents:n}){return{useAppForm:function(s){let o=function(e){let t=(0,a.useId)(),[r]=(0,a.useState)(()=>{let r=new ee({...e,formId:t});return r.Field=function(e){return(0,i.jsx)(ed,{...e,form:r})},r.Subscribe=function(e){return(0,i.jsx)(eh,{form:r,selector:e.selector,children:e.children})},r});return ec(r.mount,[]),ec(()=>{r.update(e)}),r}(s),l=(0,a.useMemo)(()=>({children:e})=>(0,i.jsx)(r.Provider,{value:o,children:e}),[o]),u=(0,a.useMemo)(()=>({children:r,...n})=>(0,i.jsx)(o.Field,{...n,children:n=>(0,i.jsx)(t.Provider,{value:n,children:r(Object.assign(n,e))})}),[o]);return(0,a.useMemo)(()=>Object.assign(o,{AppField:u,AppForm:l,...n}),[o,u,l])},withForm:function({render:e,props:t}){return r=>e({...t,...r})},withFieldGroup:function({render:e,props:t,defaultValues:r}){return function(s){let o=function(e){let[t]=(0,a.useState)(()=>{let r=new ef(e),n=e.form instanceof ef?e.form.form:e.form;return r.AppForm=function(e){return(0,i.jsx)(n.AppForm,{...e})},r.AppField=function(e){return(0,i.jsx)(n.AppField,{...t.getFormFieldOptions(e)})},r.Field=function(e){return(0,i.jsx)(n.Field,{...t.getFormFieldOptions(e)})},r.Subscribe=function(e){return(0,i.jsx)(ep,{lens:t,selector:e.selector,children:e.children})},Object.assign(r,{...e.formComponents})});return ec(t.mount,[t]),t}((0,a.useMemo)(()=>({form:s.form,fields:s.fields,defaultValues:r,formComponents:n}),[s.form,s.fields]));return e({...t,...s,group:o})}}}}({fieldContext:eL,formContext:eF,fieldComponents:{EmailField:function({label:e,placeholder:t,disabled:r,required:n}){let a=eM();return(0,i.jsxs)("div",{className:"space-y-2",children:[e&&(0,i.jsx)(e3,{htmlFor:a.name,children:e}),(0,i.jsx)(tI,{id:a.name,name:a.name,type:"email",value:a.state.value,onBlur:a.handleBlur,onChange:e=>a.handleChange(e.target.value),placeholder:t,disabled:r,required:!0}),(0,i.jsx)(ez,{})]})},PasswordField:function({label:e,placeholder:t,disabled:r,required:n}){let s=eM(),[l,u]=(0,a.useState)(!1);return(0,i.jsxs)("div",{className:"space-y-2",children:[e&&(0,i.jsx)(e3,{htmlFor:s.name,children:e}),(0,i.jsxs)("div",{className:"relative",children:[(0,i.jsx)(tI,{id:s.name,name:s.name,type:l?"text":"password",value:s.state.value,onBlur:s.handleBlur,onChange:e=>s.handleChange(e.target.value),placeholder:t,disabled:r,required:!0,className:"pr-10"}),(0,i.jsxs)("button",{type:"button",className:"absolute right-2 top-1/2 h-8 w-8 -translate-y-1/2 hover:bg-transparent",onClick:()=>u(!l),disabled:r,children:[l?(0,i.jsx)(o.X_,{className:"text-muted-foreground hover:text-foreground h-4 w-4"}):(0,i.jsx)(o.kU,{className:"text-muted-foreground hover:text-foreground h-4 w-4"}),(0,i.jsx)("span",{className:"sr-only",children:l?"Hide password":"Show password"})]})]}),(0,i.jsx)(ez,{})]})},TernEmailField:({label:e,placeholder:t,disabled:r,required:n})=>{let a=eM();return(0,i.jsxs)(te,{children:[e&&(0,i.jsx)(tt,{htmlFor:a.name,children:e}),(0,i.jsx)(tI,{id:a.name,name:a.name,type:"email",value:a.state.value,onBlur:a.handleBlur,onChange:e=>a.handleChange(e.target.value),placeholder:t,disabled:r,required:n}),(0,i.jsx)(eO,{})]})},TernPasswordField:({label:e,placeholder:t,disabled:r,required:n,onForgotPassword:s})=>{let l=eM(),[u,c]=(0,a.useState)(!1);return(0,i.jsxs)(te,{children:[e&&(0,i.jsxs)("div",{className:"flex items-center",children:[(0,i.jsx)(tt,{htmlFor:l.name,children:e}),s&&(0,i.jsx)("button",{type:"button",onClick:s,disabled:r,className:"ml-auto inline-block text-sm underline-offset-4 hover:underline",children:"Forgot your password?"})]}),(0,i.jsxs)("div",{className:"relative",children:[(0,i.jsx)(tI,{id:l.name,name:l.name,type:u?"text":"password",value:l.state.value,onBlur:l.handleBlur,onChange:e=>l.handleChange(e.target.value),placeholder:t,disabled:r,required:n,className:"pr-10"}),(0,i.jsxs)("button",{type:"button",className:"absolute right-2 top-1/2 h-8 w-8 -translate-y-1/2 hover:bg-transparent",onClick:()=>c(!u),disabled:r,children:[u?(0,i.jsx)(o.X_,{className:"text-muted-foreground hover:text-foreground h-4 w-4"}):(0,i.jsx)(o.kU,{className:"text-muted-foreground hover:text-foreground h-4 w-4"}),(0,i.jsx)("span",{className:"sr-only",children:u?"Hide password":"Show password"})]})]}),(0,i.jsx)(eO,{})]})},TernTextField:({label:e,placeholder:t,disabled:r,required:n})=>{let a=eM();return(0,i.jsxs)(te,{children:[e&&(0,i.jsx)(tt,{htmlFor:a.name,children:e}),(0,i.jsx)(tI,{id:a.name,name:a.name,value:a.state.value,onBlur:a.handleBlur,onChange:e=>a.handleChange(e.target.value),placeholder:t,disabled:r,required:n}),(0,i.jsx)(eO,{})]})}},formComponents:{SubscribeButton:({label:e})=>{let t=ej();return(0,i.jsx)(t.Subscribe,{selector:e=>e.isSubmitting,children:t=>(0,i.jsx)(eN,{disabled:t,children:e})})}}});function ez(){let e=eM().state.meta.errors;return e&&0!==e.length?(0,i.jsx)("div",{className:"mt-1 text-sm text-red-500",children:e.map((e,t)=>(0,i.jsx)("div",{children:e},t))}):null}function eV({className:e,...t}){return(0,i.jsx)("div",{"data-slot":"card",className:(0,eA.cn)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function e$({className:e,...t}){return(0,i.jsx)("div",{"data-slot":"card-header",className:(0,eA.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function eB({className:e,...t}){return(0,i.jsx)("div",{"data-slot":"card-title",className:(0,eA.cn)("leading-none font-semibold",e),...t})}function eH({className:e,...t}){return(0,i.jsx)("div",{"data-slot":"card-description",className:(0,eA.cn)("text-muted-foreground text-sm",e),...t})}function eW({className:e,...t}){return(0,i.jsx)("div",{"data-slot":"card-content",className:(0,eA.cn)("px-6",e),...t})}function eq({className:e,...t}){return(0,i.jsx)("div",{"data-slot":"card-footer",className:(0,eA.cn)("flex items-center px-6 [.border-t]:pt-6",e),...t})}var eK=r(973);let[eG,eQ]=(0,eK.createContextAndHook)("CardState"),eY={status:"idle",error:null};function eJ({children:e}){let[t,r]=a.useState(eY),n=(0,a.useCallback)(e=>{r(t=>({...t,...e}))},[]),s=(0,a.useCallback)(e=>{r(t=>({...t,status:e,error:"error"===e?t.error:null}))},[]),o=(0,a.useCallback)(()=>{r(e=>({...e,status:"loading",error:null}))},[]),l=(0,a.useCallback)(e=>{r(t=>({...t,status:"error",error:{success:!1,message:e.message,error:"code"in e?e.code:void 0,...e}}))},[]),u=(0,a.useCallback)(()=>{r(e=>({...e,status:"idle",error:null}))},[]),c=(0,a.useCallback)(()=>{r(e=>({...e,error:null,status:"idle"}))},[]),d=a.useMemo(()=>({value:{...t,setCardState:n,setStatus:s,setLoading:o,setError:l,setIdle:u,clearError:c,isLoading:"loading"===t.status,isError:"error"===t.status,isSuccess:"success"===t.status,isIdle:"idle"===t.status}}),[t,n,s,o,l,u,c]);return(0,i.jsx)(eG.Provider,{value:d,children:e})}let eX=e=>t=>(0,i.jsx)(eJ,{children:(0,i.jsx)(e,{...t})});r(309);var eZ=Symbol("radix.slottable");function e0(e){return a.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===eZ}var e1=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{var r,n;let s,o,l,u=(n=r=`Primitive.${t}`,(s=a.forwardRef((e,t)=>{let{children:r,...n}=e;if(a.isValidElement(r)){var i;let e,s,o=(i=r,(s=(e=Object.getOwnPropertyDescriptor(i.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?i.ref:(s=(e=Object.getOwnPropertyDescriptor(i,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?i.props.ref:i.props.ref||i.ref),l=function(e,t){let r={...t};for(let n in t){let i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(r[n]=i):"style"===n?r[n]={...i,...a}:"className"===n&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==a.Fragment&&(l.ref=t?ey(t,o):o),a.cloneElement(r,l)}return a.Children.count(r)>1?a.Children.only(null):null})).displayName=`${n}.SlotClone`,o=s,(l=a.forwardRef((e,t)=>{let{children:r,...n}=e,s=a.Children.toArray(r),l=s.find(e0);if(l){let e=l.props.children,r=s.map(t=>t!==l?t:a.Children.count(e)>1?a.Children.only(null):a.isValidElement(e)?e.props.children:null);return(0,i.jsx)(o,{...n,ref:t,children:a.isValidElement(e)?a.cloneElement(e,void 0,r):null})}return(0,i.jsx)(o,{...n,ref:t,children:r})})).displayName=`${r}.Slot`,l),c=a.forwardRef((e,r)=>{let{asChild:n,...a}=e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,i.jsx)(n?u:t,{...a,ref:r})});return c.displayName=`Primitive.${t}`,{...e,[t]:c}},{}),e2=a.forwardRef((e,t)=>(0,i.jsx)(e1.label,{...e,ref:t,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));function e3({className:e,...t}){return(0,i.jsx)(e2,{"data-slot":"label",className:(0,eA.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}e2.displayName="Label";var e4="horizontal",e6=["horizontal","vertical"],e5=a.forwardRef((e,t)=>{var r;let{decorative:n,orientation:a=e4,...s}=e,o=(r=a,e6.includes(r))?a:e4;return(0,i.jsx)(e1.div,{"data-orientation":o,...n?{role:"none"}:{"aria-orientation":"vertical"===o?o:void 0,role:"separator"},...s,ref:t})});function e8({className:e,orientation:t="horizontal",decorative:r=!0,...n}){return(0,i.jsx)(e5,{"data-slot":"separator",decorative:r,orientation:t,className:(0,eA.cn)("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...n})}function e7({className:e,...t}){return(0,i.jsx)("div",{"data-slot":"field-group",className:(0,eA.cn)("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",e),...t})}e5.displayName="Separator";let e9=eP("group/field flex w-full gap-3 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],horizontal:["flex-row items-center","[&>[data-slot=field-label]]:flex-auto","has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"],responsive:["flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto","@md/field-group:[&>[data-slot=field-label]]:flex-auto","@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"]}},defaultVariants:{orientation:"vertical"}});function te({className:e,orientation:t="vertical",...r}){return(0,i.jsx)("div",{role:"group","data-slot":"field","data-orientation":t,className:(0,eA.cn)(e9({orientation:t}),e),...r})}function tt({className:e,...t}){return(0,i.jsx)(e3,{"data-slot":"field-label",className:(0,eA.cn)("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4","has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10",e),...t})}function tr({className:e,...t}){return(0,i.jsx)("p",{"data-slot":"field-description",className:(0,eA.cn)("text-muted-foreground text-sm leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance","last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5","[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",e),...t})}function tn({children:e,className:t,...r}){return(0,i.jsxs)("div",{"data-slot":"field-separator","data-content":!!e,className:(0,eA.cn)("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",t),...r,children:[(0,i.jsx)(e8,{className:"absolute inset-0 top-1/2"}),e&&(0,i.jsx)("span",{className:"bg-background text-muted-foreground relative mx-auto block w-fit px-2","data-slot":"field-separator-content",children:e})]})}function ti({className:e,children:t,errors:r,...n}){let s=(0,a.useMemo)(()=>{if(t)return t;if(!r?.length)return null;let e=[...new Map(r.map(e=>[e?.message,e])).values()];return e?.length==1?e[0]?.message:(0,i.jsx)("ul",{className:"ml-4 flex list-disc flex-col gap-1",children:e.map((e,t)=>e?.message&&(0,i.jsx)("li",{children:e.message},t))})},[t,r]);return s?(0,i.jsx)("div",{role:"alert","data-slot":"field-error",className:(0,eA.cn)("text-destructive text-sm font-normal",e),...n,children:s}):null}var ta=globalThis?.document?a.useLayoutEffect:()=>{},ts=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let r=ek(`Primitive.${t}`),n=a.forwardRef((e,n)=>{let{asChild:a,...s}=e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,i.jsx)(a?r:t,{...s,ref:n})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),to=r(801);function tl(){return()=>{}}var tu="Avatar",[tc,td]=function(e,t=[]){let r=[],n=()=>{let t=r.map(e=>a.createContext(e));return function(r){let n=r?.[e]||t;return a.useMemo(()=>({[`__scope${e}`]:{...r,[e]:n}}),[r,n])}};return n.scopeName=e,[function(t,n){let s=a.createContext(n);s.displayName=t+"Context";let o=r.length;r=[...r,n];let l=t=>{let{scope:r,children:n,...l}=t,u=r?.[e]?.[o]||s,c=a.useMemo(()=>l,Object.values(l));return(0,i.jsx)(u.Provider,{value:c,children:n})};return l.displayName=t+"Provider",[l,function(r,i){let l=i?.[e]?.[o]||s,u=a.useContext(l);if(u)return u;if(void 0!==n)return n;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let n=r.reduce((t,{useScope:r,scopeName:n})=>{let i=r(e)[`__scope${n}`];return{...t,...i}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return r.scopeName=t.scopeName,r}(n,...t)]}(tu),[th,tf]=tc(tu),tp=a.forwardRef((e,t)=>{let{__scopeAvatar:r,...n}=e,[s,o]=a.useState("idle");return(0,i.jsx)(th,{scope:r,imageLoadingStatus:s,onImageLoadingStatusChange:o,children:(0,i.jsx)(ts.span,{...n,ref:t})})});tp.displayName=tu;var tm="AvatarImage",tg=a.forwardRef((e,t)=>{var r;let n,{__scopeAvatar:s,src:o,onLoadingStatusChange:l=()=>{},...u}=e,c=tf(tm,s),d=function(e,{referrerPolicy:t,crossOrigin:r}){let n=(0,to.useSyncExternalStore)(tl,()=>!0,()=>!1),i=a.useRef(null),s=n?(i.current||(i.current=new window.Image),i.current):null,[o,l]=a.useState(()=>tb(s,e));return ta(()=>{l(tb(s,e))},[s,e]),ta(()=>{let e=e=>()=>{l(e)};if(!s)return;let n=e("loaded"),i=e("error");return s.addEventListener("load",n),s.addEventListener("error",i),t&&(s.referrerPolicy=t),"string"==typeof r&&(s.crossOrigin=r),()=>{s.removeEventListener("load",n),s.removeEventListener("error",i)}},[s,r,t]),o}(o,u),h=(r=e=>{l(e),c.onImageLoadingStatusChange(e)},n=a.useRef(r),a.useEffect(()=>{n.current=r}),a.useMemo(()=>(...e)=>n.current?.(...e),[]));return ta(()=>{"idle"!==d&&h(d)},[d,h]),"loaded"===d?(0,i.jsx)(ts.img,{...u,ref:t,src:o}):null});tg.displayName=tm;var tv="AvatarFallback",ty=a.forwardRef((e,t)=>{let{__scopeAvatar:r,delayMs:n,...s}=e,o=tf(tv,r),[l,u]=a.useState(void 0===n);return a.useEffect(()=>{if(void 0!==n){let e=window.setTimeout(()=>u(!0),n);return()=>window.clearTimeout(e)}},[n]),l&&"loaded"!==o.imageLoadingStatus?(0,i.jsx)(ts.span,{...s,ref:t}):null});function tb(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function tw({className:e,...t}){return(0,i.jsx)(tp,{"data-slot":"avatar",className:(0,eA.cn)("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function tS({className:e,...t}){return(0,i.jsx)(tg,{"data-slot":"avatar-image",className:(0,eA.cn)("aspect-square size-full",e),...t})}function tk({className:e,...t}){return(0,i.jsx)(ty,{"data-slot":"avatar-fallback",className:(0,eA.cn)("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}ty.displayName=tv;let tE=eP("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),tx=a.forwardRef(({className:e,variant:t,...r},n)=>(0,i.jsx)("div",{ref:n,role:"alert",className:(0,eA.cn)(tE({variant:t}),e),...r}));tx.displayName="Alert";let t_=a.forwardRef(({className:e,...t},r)=>(0,i.jsx)("h5",{ref:r,className:(0,eA.cn)("mb-1 font-medium leading-none tracking-tight",e),...t}));t_.displayName="AlertTitle";let tC=a.forwardRef(({className:e,...t},r)=>(0,i.jsx)("div",{ref:r,className:(0,eA.cn)("text-sm [&_p]:leading-relaxed",e),...t}));tC.displayName="AlertDescription";let tI=a.forwardRef(({className:e,type:t,...r},n)=>(0,i.jsx)("input",{type:t,className:(0,eA.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...r}));tI.displayName="Input";let tT=({children:e})=>(0,i.jsx)("div",{className:"flex flex-col items-center justify-center py-8",children:e}),tP=eX(()=>(0,i.jsx)("div",{className:"relative flex justify-center p-6 md:p-10",children:(0,i.jsx)("div",{className:"w-full max-w-sm",children:(0,i.jsxs)(eV,{className:"w-full max-w-md",children:[(0,i.jsx)(e$,{className:"space-y-1 text-center",children:(0,i.jsx)(eB,{children:"Loading"})}),(0,i.jsx)(eW,{children:(0,i.jsx)(tT,{children:(0,i.jsx)(o.wm,{className:"text-muted-foreground h-8 w-8 animate-spin"})})})]})})})),tA=eX(({cardTitle:e="Unable to sign in",cardSubtitle:t="An error occurred during the sign in process",message:r,onBackLinkClick:n})=>{let a=eQ(),s=r||a.error?.message||"An unexpected error occurred";return(0,i.jsx)("div",{className:"relative flex justify-center p-6 md:p-10",children:(0,i.jsx)("div",{className:"w-full max-w-sm",children:(0,i.jsxs)(eV,{className:"w-full max-w-md",children:[(0,i.jsxs)(e$,{className:"space-y-1 text-center",children:[(0,i.jsx)(eB,{className:"font-bold text-destructive",children:e}),(0,i.jsx)(eH,{children:t})]}),(0,i.jsx)(eW,{className:"grid gap-4",children:(0,i.jsxs)(tx,{variant:"destructive",children:[(0,i.jsx)(o.RI,{className:"h-4 w-4"}),(0,i.jsx)(t_,{children:"Error"}),(0,i.jsx)(tC,{children:s})]})}),n&&(0,i.jsx)(eq,{children:(0,i.jsx)(eN,{variant:"outline",className:"w-full",onClick:n,children:"Go back"})})]})})})});var tR=r(953);let tN=({onProviderClick:e,disabled:t})=>{let r=["google","github","facebook","microsoft","twitter"];return(0,i.jsx)("div",{className:"grid gap-4 sm:grid-cols-2",children:r.map((n,a)=>(0,i.jsxs)(eN,{variant:"outline",className:(0,eA.cn)("w-full gap-2",r.length%2!=0&&a===r.length-1&&"sm:col-span-2"),onClick:()=>e(n),disabled:t,children:[(0,i.jsx)(tR.T,{id:n,className:"h-4 w-4"}),n.charAt(0).toUpperCase()+n.slice(1)]},n))})},tO=({onClick:e,children:t,startDisabled:r,throttleTimeInSec:n=30,showCounter:s=!0,...o})=>{let[l,u]=a.useState(0),c=a.useRef(void 0);(0,eK.useSafeLayoutEffect)(()=>{r&&d()},[]),(0,a.useEffect)(()=>()=>clearInterval(c.current),[]);let d=()=>{u(n),c.current=window.setInterval(()=>{u(e=>(1===e&&clearInterval(c.current),e-1))},1e3)};return(0,i.jsxs)(eN,{...o,variant:o.variant||"link",disabled:l>0||o.disabled,onClick:t=>{l||(e?.(t),d())},children:[t,l>0&&s?` (${l})`:""]})};var tL=r(643);let tM=e=>new Promise(t=>setTimeout(t,e)),tF=e=>{let t=eQ(),{id:r="code",onCodeEntryFinished:n,onResendCodeClicked:i,onResolve:s}=e,o=tj({length:6}),l=(0,tL.mN)(),u=async e=>{await tM(750),await s?.(e)},c=async e=>{let r=e?.message||(e instanceof Error?e.message:"Invalid code");t.setError({status:"error",message:r,error:e}),o.setError(r),l.setIdle(),await tM(750),o.reset()};o.onCodeEntryFinished(e=>{l.setLoading(),o.otpInputProps.clearFeedback(),n(e,u,c)});let d=(0,a.useCallback)(e=>{o.reset(),i?.(e)},[o,i]);return{isLoading:l.isLoading,otpControl:o,onResendCode:i?d:void 0,onFakeContinue:()=>{o.otpInputProps.clearFeedback(),n("",u,c)}}},tj=e=>{let t=a.useRef(null),r=a.useRef(void 0),{length:n=6}=e||{},[i,s]=a.useState(Array(n).fill("")),[o,l]=a.useState(null),[u,c]=a.useState(null);return a.useEffect(()=>{if(i.filter(e=>e).length===n){let e=i.map(e=>e||" ").join("");r.current?.(e)}},[i,n]),{otpInputProps:{length:n,values:i,setValues:s,feedback:o,feedbackType:u,clearFeedback:()=>{l(null),c(null)},ref:t},onCodeEntryFinished:e=>{r.current=e},reset:()=>t.current?.reset(),setError:e=>{l(e),c("error")}}},[tD,tU]=(0,eK.createContextAndHook)("OTPInputContext"),tz=({children:e,...t})=>(0,i.jsx)(tD.Provider,{value:{value:t},children:e}),tV=()=>{let{resendButton:e,onResendCode:t,isLoading:r,otpControl:n}=tU();return t?(0,i.jsx)(tO,{onClick:t,startDisabled:!0,disabled:"success"===n.otpInputProps.feedbackType||r,showCounter:"success"!==n.otpInputProps.feedbackType}):null},t$=a.forwardRef((e,t)=>{let[r,n]=a.useState(!1),s=a.useRef([]),o=a.useRef(!1),{otpControl:l,isLoading:u,isDisabled:c,centerAlign:d=!0}=tU(),{feedback:h,values:f,setValues:p,feedbackType:m,length:g}=l.otpInputProps;a.useImperativeHandle(t,()=>({reset:()=>{p(f.map(()=>"")),n(!1),setTimeout(()=>y(0),0)}})),a.useLayoutEffect(()=>{setTimeout(()=>y(0),0)},[]),a.useEffect(()=>{h&&n(!0)},[h]);let v=({eventValue:e,inputPosition:t})=>{let r=(e||"").split("");if(0!==r.length&&r.every(e=>tH(e))){if(r.length===g){p([...r]),y(g-1);return}p(f.map((e,n)=>n<t?e:r[n-t]||e)),y(t+r.length)}},y=e=>{let t=Math.min(Math.max(0,e),s.current.length-1),r=s.current[t];r&&(r.focus(),f[t]&&r.select())};return(0,i.jsx)("div",{className:(0,eA.cn)("flex gap-2 direction-ltr p-1 -ml-1",d?"justify-center items-center":"",u&&"opacity-50 pointer-events-none","error"===m&&"text-red-500"),children:f.map((e,t)=>(0,i.jsx)(tB,{value:e,onClick:e=>{if(e.preventDefault(),!o.current){y(0),o.current=!0;return}y(t)},onChange:e=>{e.preventDefault(),v({eventValue:e.target.value||"",inputPosition:t})},onKeyDown:e=>{switch(e.key){case"Backspace":let r;e.preventDefault(),(r=[...f])[t]="",p(r),y(t-1);return;case"ArrowLeft":e.preventDefault(),y(t-1);return;case"ArrowRight":e.preventDefault(),y(t+1);return;case" ":e.preventDefault();return}},onInput:e=>{e.preventDefault(),tH(e.target.value)&&y(t+1)},onPaste:e=>{e.preventDefault(),v({eventValue:e.clipboardData.getData("text/plain")||"",inputPosition:t})},id:`digit-${t}-field`,ref:e=>{s.current[t]=e},autoFocus:0===t||void 0,autoComplete:"one-time-code","aria-label":`${0===t?"Enter verification code. ":""}Digit ${t+1}`,disabled:c||u||r||"success"===m,hasError:"error"===m,isSuccessfullyFilled:"success"===m,type:"text",inputMode:"numeric",name:`codeInput-${t}`},t))})}),tB=a.forwardRef((e,t)=>{let{isSuccessfullyFilled:r,hasError:n,className:a,...s}=e;return(0,i.jsx)(tI,{ref:t,type:"text",className:(0,eA.cn)("text-center p-0.5 h-10 w-10 rounded-md bg-transparent sm:h-8 sm:w-8",r?"border-green-500":"",n?"border-red-500":"",a),...s})}),tH=e=>void 0!=e&&Number.isInteger(+e)},643:function(e,t,r){"use strict";r.d(t,{Cb:()=>s,U3:()=>i,mN:()=>o});var n=r(58);let i=(e,t)=>{n.useEffect(()=>{let r=[e].flat().filter(e=>!!e);if(r.length)return r.forEach(e=>window.addEventListener(e,t)),()=>{r.forEach(e=>window.removeEventListener(e,t))}},[e,t])};var a=r(384);let s=()=>{let e=(0,a.rd)();return{navigateToFlowStart:async()=>{let t=e.indexPath;return t!==e.currentPath?e.navigate(t):e.urlStateParam?.path?e.navigate("/"+e.basePath+e.urlStateParam?.startPath):void 0}}},o=e=>{let[t,r]=function(e){let[t,r]=n.useState(e),i=n.useRef(!0);return n.useEffect(()=>()=>{i.current=!1},[]),[t,n.useCallback(e=>{i.current&&r(e)},[])]}({status:"idle",metadata:void 0,...e});return{status:t.status,setIdle:e=>r({status:"idle",metadata:e}),setError:e=>r({status:"error",metadata:e}),setLoading:e=>r({status:"loading",metadata:e}),loadingMetadata:"loading"===t.status?t.metadata:void 0,isLoading:"loading"===t.status,isIdle:"idle"===t.status}}},272:function(e,t,r){"use strict";r.d(t,{kU:()=>g,X_:()=>y,RI:()=>p,wm:()=>h});var n,i,a,s,o,l,u,c=r(58);function d(){return(d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}let h=e=>c.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,className:"lucide lucide-loader-circle-icon lucide-loader-circle",viewBox:"0 0 24 24"},e),n||(n=c.createElement("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})));function f(){return(f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}let p=e=>c.createElement("svg",f({xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,className:"lucide lucide-alert-circle",viewBox:"0 0 24 24"},e),i||(i=c.createElement("circle",{cx:12,cy:12,r:10})),a||(a=c.createElement("path",{d:"M12 8v4M12 16h.01"})));function m(){return(m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}let g=e=>c.createElement("svg",m({xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,className:"lucide lucide-eye",viewBox:"0 0 24 24"},e),s||(s=c.createElement("path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7"})),o||(o=c.createElement("circle",{cx:12,cy:12,r:3})));function v(){return(v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}let y=e=>c.createElement("svg",v({xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,className:"lucide lucide-eye-off",viewBox:"0 0 24 24"},e),l||(l=c.createElement("path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24M10.73 5.08A10 10 0 0 1 12 5c7 0 10 7 10 7a13.2 13.2 0 0 1-1.67 2.68"})),u||(u=c.createElement("path",{d:"M6.61 6.61A13.5 13.5 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61M2 2l20 20"})))},869:function(e,t,r){"use strict";r.d(t,{createRoot:()=>n.createRoot}),r(977);var n=r(566)},530:function(e,t,r){"use strict";r.d(t,{Portal:()=>c});var n=r(410),i=r(58),a=r(309),s=r(407),o=r(197),l=r(977),u=r(384);function c({props:e,component:t,componentName:r,node:c}){let d={...e,...(0,o.C)({routing:e?.routing,path:e?.path})},h=(0,n.jsx)(l.g7,{componentName:r,props:d,children:(0,n.jsx)(i.Suspense,{fallback:"",children:i.createElement(t,d)})});if(d?.routing==="path"){if(!d?.path)throw Error("PathRouter requires a path to be specified in routing options.");return a.createPortal((0,n.jsx)(u.$,{preservedParams:s.Ej,basePath:d.path,children:h}),c)}return a.createPortal((0,n.jsx)(u.I9,{preservedParams:s.Ej,children:h}),c)}},384:function(e,t,r){"use strict";r.d(t,{$:()=>b,qh:()=>m,dO:()=>w,I9:()=>y,rd:()=>a});var n=r(58);let i=n.createContext(null);i.displayName="RouteContext";let a=()=>{let e=n.useContext(i);if(!e)throw Error("useRouter called while Router is null");return e};var s=r(410),o=r(973),l=r(117),u=r(643);let c=(e,t,r,n)=>{let i=e;r&&(i=t,n||(i+="/"+r)),i.startsWith("//")&&(i=i.substr(1));let a=t+(r?"/"+r:"");return a.startsWith("//")&&(a=a.substr(1)),[i,a]};function d(e,t){let r=[];return function(e,t,r={}){let{decode:n=e=>e}=r;return function(r){let i=e.exec(r);if(!i)return!1;let{0:a,index:s}=i,o=Object.create(null);for(let e=1;e<i.length;e++){if(void 0===i[e])continue;let r=t[e-1];"*"===r.modifier||"+"===r.modifier?o[r.name]=i[e].split(r.prefix+r.suffix).map(e=>n(e,r)):o[r.name]=n(i[e],r)}return{path:a,index:s,params:o}}}(function e(t,r,n){if(t instanceof RegExp){if(!r)return t;let e=t.source.match(/\((?!\?)/g);if(e)for(let t=0;t<e.length;t++)r.push({name:t,prefix:"",suffix:"",modifier:"",pattern:""});return t}if(Array.isArray(t)){let i;return i=t.map(t=>e(t,r,n).source),RegExp(`(?:${i.join("|")})`,f(n))}return function(e,t,r={}){let{strict:n=!1,start:i=!0,end:a=!0,encode:s=e=>e}=r,o=`[${h(r.endsWith||"")}]|$`,l=`[${h(r.delimiter||"/#?")}]`,u=i?"^":"";for(let r of e)if("string"==typeof r)u+=h(s(r));else{let e=h(s(r.prefix)),n=h(s(r.suffix));if(r.pattern)if(t&&t.push(r),e||n)if("+"===r.modifier||"*"===r.modifier){let t="*"===r.modifier?"?":"";u+=`(?:${e}((?:${r.pattern})(?:${n}${e}(?:${r.pattern}))*)${n})${t}`}else u+=`(?:${e}(${r.pattern})${n})${r.modifier}`;else u+=`(${r.pattern})${r.modifier}`;else u+=`(?:${e}${n})${r.modifier}`}if(a)n||(u+=`${l}?`),u+=r.endsWith?`(?=${o})`:"$";else{let t=e[e.length-1],r="string"==typeof t?l.indexOf(t[t.length-1])>-1:void 0===t;n||(u+=`(?:${l}(?=${o}))?`),r||(u+=`(?=${l}|${o})`)}return new RegExp(u,f(r))}(function(e,t={}){let r=function(e){let t=[],r=0;for(;r<e.length;){let n=e[r];if("*"===n||"+"===n||"?"===n){t.push({type:"MODIFIER",index:r,value:e[r++]});continue}if("\\"===n){t.push({type:"ESCAPED_CHAR",index:r++,value:e[r++]});continue}if("{"===n){t.push({type:"OPEN",index:r,value:e[r++]});continue}if("}"===n){t.push({type:"CLOSE",index:r,value:e[r++]});continue}if(":"===n){let n="",i=r+1;for(;i<e.length;){let t=e.charCodeAt(i);if(t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||95===t){n+=e[i++];continue}break}if(!n)throw TypeError(`Missing parameter name at ${r}`);t.push({type:"NAME",index:r,value:n}),r=i;continue}if("("===n){let n=1,i="",a=r+1;if("?"===e[a])throw TypeError(`Pattern cannot start with "?" at ${a}`);for(;a<e.length;){if("\\"===e[a]){i+=e[a++]+e[a++];continue}if(")"===e[a]){if(0==--n){a++;break}}else if("("===e[a]&&(n++,"?"!==e[a+1]))throw TypeError(`Capturing groups are not allowed at ${a}`);i+=e[a++]}if(n)throw TypeError(`Unbalanced pattern at ${r}`);if(!i)throw TypeError(`Missing pattern at ${r}`);t.push({type:"PATTERN",index:r,value:i}),r=a;continue}t.push({type:"CHAR",index:r,value:e[r++]})}return t.push({type:"END",index:r,value:""}),t}(e),{prefixes:n="./"}=t,i=`[^${h(t.delimiter||"/#?")}]+?`,a=[],s=0,o=0,l="",u=e=>{if(o<r.length&&r[o].type===e)return r[o++].value},c=e=>{let t=u(e);if(void 0!==t)return t;let{type:n,index:i}=r[o];throw TypeError(`Unexpected ${n} at ${i}, expected ${e}`)},d=()=>{let e,t="";for(;e=u("CHAR")||u("ESCAPED_CHAR");)t+=e;return t};for(;o<r.length;){let e=u("CHAR"),t=u("NAME"),r=u("PATTERN");if(t||r){let o=e||"";-1===n.indexOf(o)&&(l+=o,o=""),l&&(a.push(l),l=""),a.push({name:t||s++,prefix:o,suffix:"",pattern:r||i,modifier:u("MODIFIER")||""});continue}let o=e||u("ESCAPED_CHAR");if(o){l+=o;continue}if(l&&(a.push(l),l=""),u("OPEN")){let e=d(),t=u("NAME")||"",r=u("PATTERN")||"",n=d();c("CLOSE"),a.push({name:t||(r?s++:""),pattern:t&&!r?i:r,prefix:e,suffix:n,modifier:u("MODIFIER")||""});continue}c("END")}return a}(t,n),r,n)}(e,r,t),r,t)}function h(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function f(e){return e&&e.sensitive?"":"i"}let p=({canActivate:e,children:t})=>{let{navigateToFlowStart:r}=(0,u.Cb)(),i=(0,o.useTernSecure)();return(n.useEffect(()=>{e(i)||r()}),e(i))?(0,s.jsx)(s.Fragment,{children:t}):null};function m(e){let t=a();if(!e.children)return null;if(!e.index&&!e.path)return(0,s.jsx)(s.Fragment,{children:e.children});if(!t.matches(e.path,e.index))return null;let[r,n]=c(t.indexPath,t.fullPath,e.path,e.index),o=(e,{searchParams:t}={})=>{let r=new URL(e,window.location.origin+n+"/");return t&&(r.search=t.toString()),r.pathname=(0,l.Kj)(r.pathname),r},u=(e,i)=>{let[a,s]=c(r,n,e,i),o=(0,l.Kj)(t.currentPath),u=e&&d(s+"/:foo*")(o)||i&&d(a)(o)||i&&d(s)(o)||!1;return!1!==u&&u.params},h=t.getMatchData(e.path,e.index)||{},f={};for(let[e,t]of Object.entries(h))f[e]=t;let m=(e.flowStart?(0,l.yY)(t.fullPath).replace("/"+t.basePath,""):t.flowStartPath)||t.startPath;return(0,s.jsx)(i.Provider,{value:{basePath:t.basePath,startPath:t.startPath,flowStartPath:m,fullPath:n,indexPath:r,currentPath:t.currentPath,baseNavigate:t.baseNavigate,getMatchData:u,matches:(e,t)=>!!u(e,t),navigate:(e,{searchParams:r}={})=>{let n=o(e,{searchParams:r});return t.baseNavigate(n)},resolve:o,refresh:t.refresh,params:f,queryString:t.queryString,queryParams:t.queryParams,urlStateParam:t.urlStateParam},children:e.canActivate?(0,s.jsx)(p,{canActivate:e.canActivate,children:e.children}):e.children})}let g=({basePath:e,startPath:t,getPath:r,getQueryString:a,internalNavigate:h,refreshEvents:f,preservedParams:p,urlStateParam:g,children:v})=>{let{navigate:y}=(0,o.useTernSecure)(),[b,w]=n.useState({path:r(),queryString:a()}),S=b.path,k=b.queryString,E=(0,l.vA)(b.queryString),x=(e,t)=>{let[r,n]=c("","",e,t),i=(0,l.Kj)(S),a=e&&d(n+"/:foo*")(i)||t&&d(r)(i)||t&&d(n)(i)||!1;return!1!==a&&a.params},_=n.useCallback(()=>{let e=r(),t=a();(e!==S||t!==k)&&w({path:e,queryString:t})},[S,k,r,a]);(0,u.U3)(f,_);let C=async t=>{if(!t)return;let r=t.origin!==window.location.origin;if(!t.pathname.startsWith("/"+e)||r){let e=await y(t.href);return _(),e}if(p){let e=(0,l.vA)(t.search);p.forEach(t=>{!e[t]&&E[t]&&(e[t]=E[t])}),t.search=(0,l.Ws)(e)}let n=await h(t,{metadata:{navigationType:"internal"}});return w({path:t.pathname,queryString:t.search}),n};return(0,s.jsx)(i.Provider,{value:{basePath:e,startPath:t,flowStartPath:t,fullPath:"",indexPath:"",currentPath:S,queryString:k,queryParams:E,getMatchData:x.bind(void 0),matches:((e,t)=>!!x(e,t)).bind(void 0),baseNavigate:C.bind(void 0),navigate:async()=>{},resolve:(e=>new URL(e,window.location.origin)).bind(void 0),refresh:_.bind(void 0),params:{},urlStateParam:g},children:(0,s.jsx)(m,{path:e,children:v})})},v="TERNSECURE-ROUTER/HASH",y=({preservedParams:e,children:t})=>{let r=async e=>{if(e)return window.location.hash=(0,l.FV)(e).substring(1+v.length),Promise.resolve()},n=()=>new URL((0,l.tL)(window.location.hash)?window.location.origin+window.location.hash.substring(1):window.location.origin);return(0,s.jsx)(g,{getPath:()=>"/"===n().pathname?"/"+v:"/"+v+n().pathname,basePath:v,startPath:"",getQueryString:()=>n().search,internalNavigate:r,refreshEvents:["popstate","hashchange"],preservedParams:e,children:t})},b=({basePath:e,preservedParams:t,children:r})=>{let{navigate:i}=(0,o.useTernSecure)(),[a,u]=n.useState(!1);if(!i)throw Error("Missing navigate option.");let c=(e,t)=>{if(e)return i((0,l.FV)(e),t)};return(n.useEffect(()=>{(async()=>{if((0,l.tL)(window.location.hash)){let e=(0,l.yR)(new URL(window.location.href));await c(e.href,{replace:!0}),u(!0)}})()},[u,i,window.location.hash]),(0,l.tL)(window.location.hash)&&!a)?null:(0,s.jsx)(g,{basePath:e.substring(1),startPath:"",getPath:()=>window.location.pathname,getQueryString:()=>window.location.search,internalNavigate:c,refreshEvents:["popstate"],preservedParams:t,children:r})};function w({children:e}){let t=a(),r=null;return n.Children.forEach(e,e=>{if(r||!(e&&n.isValidElement(e)&&"object"==typeof e&&e.type===m))return;let{index:i,path:a}=e.props;(!i&&!a||t.matches(a,i))&&(r=e)}),(0,s.jsx)(s.Fragment,{children:r})}},777:function(e,t,r){"use strict";r.d(t,{pr:()=>o});var n=r(410),i=r(634),a=r(580),s=r(272);function o({canSubmit:e,isSubmitting:t,submitText:r,submittingText:o,className:l}){return(0,n.jsx)(a.$n,{type:"submit",disabled:!e||t,className:(0,i.cn)("backgroundColor: 'var(--tern-primary, #2563EB)' w-full",l),children:t?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.wm,{className:"mr-2 h-4 w-4 animate-spin"}),o]}):r})}},892:function(e,t,r){"use strict";r.d(t,{kZ:()=>c,vU:()=>y,yY:()=>v,kU:()=>f,Kj:()=>h,FV:()=>d,tL:()=>m,yR:()=>g});var n=r(99);let i=require("@tern-secure/shared/globs"),a=require("@tern-secure/shared/logger"),s=RegExp("/{1,}","g");var o=r(327);let l="http://ternsecure-dummy",u=["javascript:"];function c(e,t={}){let{base:r,hashPath:i,hashSearch:a,searchParams:u,hashSearchParams:d,...h}=e,f=new URL(r||"","undefined"!=typeof window&&window.location?window.location.href:"http://react-native-fake-base-url");if(u instanceof URLSearchParams&&u.forEach((e,t)=>{null!=e&&f.searchParams.set((0,n.camelToSnake)(t),e)}),Object.assign(f,h),i||a||d){var p;let e=new URL(l+f.hash.substring(1));for(let[t,r]of(p=e.pathname,e.pathname=[p,i||""].filter(e=>e).join("/").replace(s,"/"),Object.entries((0,o.v)(a||""))))e.searchParams.append(t,r);if(d)for(let t of Array.isArray(d)?d:[d])(t instanceof URLSearchParams||"object"==typeof t)&&new URLSearchParams(t).forEach((t,r)=>{null!=t&&e.searchParams.set((0,n.camelToSnake)(r),t)});let t=e.href.replace(l,"");"/"!==t&&(f.hash=t)}let{stringify:m,skipOrigin:g}=t;return m?g?f.href.replace(f.origin,""):f.href:f}function d(e){return(e=new URL(e.toString(),window.location.origin)).href.replace(e.origin,"")}let h=e=>(e||"").replace(/\/+$/,"");function f(e,t){try{return new URL(e)}catch{return new URL(e,t)}}let p=[/\0/,/^\/\//,/[\x00-\x1F]/],m=e=>new URL(e,l).hash.startsWith("#/"),g=e=>{let t=new URL(e);if(!m(t))return t;let r=new URL(t.hash.replace("#/","/"),t.href),n=new URL([t.pathname,r.pathname].map(e=>e.split("/")).flat().filter(Boolean).join("/"),t.origin);return t.searchParams.forEach((e,t)=>{n.searchParams.set(t,e)}),r.searchParams.forEach((e,t)=>{n.searchParams.set(t,e)}),n},v=e=>e.replace(/TERN-ROUTER\/(.*?)\//,""),y=(e,t)=>r=>{let n=r;if("string"==typeof n&&(n=f(n,t)),!e)return!0;let s=t===n.origin,o=!function(e){if(function(e){if(!function(e){if(!e)return!1;try{return new URL(e),!0}catch{return!1}}(e))return!1;let t=new URL(e).protocol;return u.some(e=>e===t)}(e))return!0;for(let t of p)if(t.test(e.pathname))return!0;return!1}(n)&&(s||e.map(e=>"string"==typeof e?i.globs.toRegexp(h(e)):e).some(e=>e.test(h(n.origin))));return o||a.logger.warnOnce(`TernSecure: Redirect URL ${n} is not on one of the allowedRedirectOrigins, falling back to the default redirect URL.`),o}},117:function(e,t,r){"use strict";r.d(t,{VY:()=>s,kZ:()=>n.kZ,vA:()=>i.v,yY:()=>n.yY,Ws:()=>i.W,nQ:()=>a.n,Kj:()=>n.Kj,FV:()=>n.FV,tL:()=>n.tL,y7:()=>o,yR:()=>n.yR});var n=r(892),i=r(327),a=r(753);let s=["http:","https:","wails:","chrome-extension:"];function o(e){let t=new URL(e,window.location.href);window.dispatchEvent(new CustomEvent("ternsecure:beforeunload")),window.location.href=t.href}},197:function(e,t,r){"use strict";r.d(t,{C:()=>n});let n=({routing:e,path:t})=>{if(t&&!e)return{routing:"path",path:t};if("path"!==e&&t)throw Error(`TernSecureJs: Invalid routing strategy, path cannot be used in tandem with ${e}.`);return{routing:e,path:t}}},327:function(e,t,r){"use strict";r.d(t,{W:()=>i,v:()=>n});let n=e=>{let t={};return new URLSearchParams(e).forEach((e,r)=>{if(r in t){let n=t[r];Array.isArray(n)?n.push(e):t[r]=[n,e]}else t[r]=e}),t},i=(e,t={})=>{if(null==e||!e||"object"!=typeof e)return"";let r=new URLSearchParams;return Object.keys(e).forEach(n=>{let i=t.keyEncoder?t.keyEncoder(n):n,a=e[n];if(Array.isArray(a))a.forEach(e=>void 0!==e&&r.append(i,e||""));else{if(void 0===a)return;"object"==typeof a&&null!==a?r.append(i,JSON.stringify(a)):r.append(i,String(a??""))}}),r.toString()}},753:function(e,t,r){"use strict";r.d(t,{n:()=>s});var n=r(99);let i=require("@tern-secure/shared/object");var a=r(892);class s{static keys=["signInForceRedirectUrl","signInFallbackRedirectUrl","signUpForceRedirectUrl","signUpFallbackRedirectUrl","afterSignInUrl","afterSignUpUrl","redirectUrl"];static preserved=["redirectUrl"];options;fromOptions;fromProps;fromSearchParams;mode;constructor(e,t={},r={},n){this.options=e,this.fromOptions=this.#w(e||{}),this.fromProps=this.#w(t||{}),this.fromSearchParams=this.#S(r||{}),this.mode=n}getAfterSignInUrl(){return this.#k("signIn")}getAfterSignUpUrl(){return this.#k("signUp")}getPreservedSearchParams(){return this.#E(this.#x())}toSearchParams(){return this.#E(this.#_())}#E(e){let t=Object.fromEntries(Object.entries(e).map(([e,t])=>[(0,n.camelToSnake)(e),t]));return new URLSearchParams((0,i.removeUndefined)(t))}#x(){return Object.fromEntries(Object.entries({...this.fromSearchParams}).filter(([e])=>s.preserved.includes(e)))}#_(){let e=this.fromSearchParams.signUpForceRedirectUrl||this.fromProps.signUpForceRedirectUrl||this.fromOptions.signUpForceRedirectUrl,t=this.fromSearchParams.signUpFallbackRedirectUrl||this.fromProps.signUpFallbackRedirectUrl||this.fromOptions.signUpFallbackRedirectUrl,r=this.fromSearchParams.signInForceRedirectUrl||this.fromProps.signInForceRedirectUrl||this.fromOptions.signInForceRedirectUrl,n=this.fromSearchParams.signInFallbackRedirectUrl||this.fromProps.signInFallbackRedirectUrl||this.fromOptions.signInFallbackRedirectUrl,i=this.fromSearchParams.afterSignInUrl||this.fromProps.afterSignInUrl||this.fromOptions.afterSignInUrl,a={signUpForceRedirectUrl:e,signUpFallbackRedirectUrl:t,signInForceRedirectUrl:r,signInFallbackRedirectUrl:n,afterSignInUrl:i,afterSignUpUrl:this.fromSearchParams.afterSignUpUrl||this.fromProps.afterSignUpUrl||this.fromOptions.afterSignUpUrl,redirectUrl:this.fromSearchParams.redirectUrl||this.fromProps.redirectUrl||this.fromOptions.redirectUrl};return e&&delete a.signUpFallbackRedirectUrl,r&&delete a.signInFallbackRedirectUrl,a}#k(e){let t,r=`${e}ForceRedirectUrl`,n=`${e}FallbackRedirectUrl`;return(t=this.fromSearchParams[r]||this.fromProps[r]||this.fromOptions[r],t||=this.fromSearchParams.redirectUrl,(t||=this.fromSearchParams[n]||this.fromProps[n]||this.fromOptions[n])||"modal"!==this.mode)?t||"/":window.location.href}#w(e){let t={};return s.keys.forEach(r=>{t[r]=e[r]}),(0,i.applyFunctionToObj)(this.#C(this.#I((0,i.filterProps)(t,Boolean))),e=>e.toString())}#S(e){let t={};return s.keys.forEach(r=>{e instanceof URLSearchParams?t[r]=e.get((0,n.camelToSnake)(r)):t[r]=e[(0,n.camelToSnake)(r)]}),(0,i.applyFunctionToObj)(this.#C(this.#I((0,i.filterProps)(t,Boolean))),e=>e.toString())}#I(e){return(0,i.applyFunctionToObj)(e,e=>(0,a.kU)(e,window.location.origin))}#C=e=>(0,i.filterProps)(e,(0,a.vU)(this.options?.allowedRedirectOrigins,window.location.origin))}},51:function(e,t,r){"use strict";var n,i=r(253),a=r(58),s=r(309);function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do 0!=(4098&(t=e).flags)&&(r=t.return),e=t.return;while(e)}return 3===t.tag?r:null}function u(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function c(e){if(l(e)!==e)throw Error(o(188))}var d=Object.assign,h=Symbol.for("react.element"),f=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),y=Symbol.for("react.provider"),b=Symbol.for("react.consumer"),w=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),_=Symbol.for("react.lazy");Symbol.for("react.scope");var C=Symbol.for("react.activity");Symbol.for("react.legacy_hidden"),Symbol.for("react.tracing_marker");var I=Symbol.for("react.memo_cache_sentinel");Symbol.for("react.view_transition");var T=Symbol.iterator;function P(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=T&&e[T]||e["@@iterator"])?e:null}var A=Symbol.for("react.client.reference"),R=Array.isArray,N=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L={pending:!1,data:null,method:null,action:null},M=[],F=-1;function j(e){return{current:e}}function D(e){0>F||(e.current=M[F],M[F]=null,F--)}function U(e,t){M[++F]=e.current,e.current=t}var z=j(null),V=j(null),$=j(null),B=j(null);function H(e,t){switch(U($,t),U(V,e),U(z,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?ua(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)e=us(t=ua(t),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}D(z),U(z,e)}function W(){D(z),D(V),D($)}function q(e){null!==e.memoizedState&&U(B,e);var t=z.current,r=us(t,e.type);t!==r&&(U(V,e),U(z,r))}function K(e){V.current===e&&(D(z),D(V)),B.current===e&&(D(B),uQ._currentValue=L)}var G=Object.prototype.hasOwnProperty,Q=i.unstable_scheduleCallback,Y=i.unstable_cancelCallback,J=i.unstable_shouldYield,X=i.unstable_requestPaint,Z=i.unstable_now,ee=i.unstable_getCurrentPriorityLevel,et=i.unstable_ImmediatePriority,er=i.unstable_UserBlockingPriority,en=i.unstable_NormalPriority,ei=i.unstable_LowPriority,ea=i.unstable_IdlePriority,es=i.log,eo=i.unstable_setDisableYieldValue,el=null,eu=null;function ec(e){if("function"==typeof es&&eo(e),eu&&"function"==typeof eu.setStrictMode)try{eu.setStrictMode(el,e)}catch(e){}}var ed=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(eh(e)/ef|0)|0},eh=Math.log,ef=Math.LN2,ep=256,em=4194304;function eg(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:return 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 4194048&e;case 4194304:case 8388608:case 0x1000000:case 0x2000000:return 0x3c00000&e;case 0x4000000:return 0x4000000;case 0x8000000:return 0x8000000;case 0x10000000:return 0x10000000;case 0x20000000:return 0x20000000;case 0x40000000:return 0;default:return e}}function ev(e,t,r){var n=e.pendingLanes;if(0===n)return 0;var i=0,a=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var o=0x7ffffff&n;return 0!==o?0!=(n=o&~a)?i=eg(n):0!=(s&=o)?i=eg(s):r||0!=(r=o&~e)&&(i=eg(r)):0!=(o=n&~a)?i=eg(o):0!==s?i=eg(s):r||0!=(r=n&~e)&&(i=eg(r)),0===i?0:0!==t&&t!==i&&0==(t&a)&&((a=i&-i)>=(r=t&-t)||32===a&&0!=(4194048&r))?t:i}function ey(e,t){return 0==(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function eb(){var e=ep;return 0==(4194048&(ep<<=1))&&(ep=256),e}function ew(){var e=em;return 0==(0x3c00000&(em<<=1))&&(em=4194304),e}function eS(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function ek(e,t){e.pendingLanes|=t,0x10000000!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function eE(e,t,r){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-ed(t);e.entangledLanes|=t,e.entanglements[n]=0x40000000|e.entanglements[n]|4194090&r}function ex(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-ed(r),i=1<<n;i&t|e[n]&t&&(e[n]|=t),r&=~i}}function e_(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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 0x1000000:case 0x2000000:e=128;break;case 0x10000000:e=0x8000000;break;default:e=0}return e}function eC(e){return 2<(e&=-e)?8<e?0!=(0x7ffffff&e)?32:0x10000000:8:2}function eI(){var e=O.p;return 0!==e?e:void 0===(e=window.event)?32:u7(e.type)}var eT=Math.random().toString(36).slice(2),eP="__reactFiber$"+eT,eA="__reactProps$"+eT,eR="__reactContainer$"+eT,eN="__reactEvents$"+eT,eO="__reactListeners$"+eT,eL="__reactHandles$"+eT,eM="__reactResources$"+eT,eF="__reactMarker$"+eT;function ej(e){delete e[eP],delete e[eA],delete e[eN],delete e[eO],delete e[eL]}function eD(e){var t=e[eP];if(t)return t;for(var r=e.parentNode;r;){if(t=r[eR]||r[eP]){if(r=t.alternate,null!==t.child||null!==r&&null!==r.child)for(e=uw(e);null!==e;){if(r=e[eP])return r;e=uw(e)}return t}r=(e=r).parentNode}return null}function eU(e){if(e=e[eP]||e[eR]){var t=e.tag;if(5===t||6===t||13===t||26===t||27===t||3===t)return e}return null}function ez(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e.stateNode;throw Error(o(33))}function eV(e){var t=e[eM];return t||(t=e[eM]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function e$(e){e[eF]=!0}var eB=new Set,eH={};function eW(e,t){eq(e,t),eq(e+"Capture",t)}function eq(e,t){for(eH[e]=t,e=0;e<t.length;e++)eB.add(t[e])}var eK=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),eG={},eQ={};function eY(e,t,r){if(G.call(eQ,t)||!G.call(eG,t)&&(eK.test(t)?eQ[t]=!0:(eG[t]=!0,!1)))if(null===r)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if("data-"!==n&&"aria-"!==n)return void e.removeAttribute(t)}e.setAttribute(t,""+r)}}function eJ(e,t,r){if(null===r)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+r)}}function eX(e,t,r,n){if(null===n)e.removeAttribute(r);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(t,r,""+n)}}function eZ(e){if(void 0===tO)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);tO=t&&t[1]||"",tL=-1<e.stack.indexOf("\n at")?" (<anonymous>)":-1<e.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+tO+e+tL}var e0=!1;function e1(e,t){if(!e||e0)return"";e0=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var r=function(){throw Error()};if(Object.defineProperty(r.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(r,[])}catch(e){var n=e}Reflect.construct(e,[],r)}else{try{r.call()}catch(e){n=e}e.call(r.prototype)}}else{try{throw Error()}catch(e){n=e}(r=e())&&"function"==typeof r.catch&&r.catch(function(){})}}catch(e){if(e&&n&&"string"==typeof e.stack)return[e.stack,n.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var a=n.DetermineComponentFrameRoot(),s=a[0],o=a[1];if(s&&o){var l=s.split("\n"),u=o.split("\n");for(i=n=0;n<l.length&&!l[n].includes("DetermineComponentFrameRoot");)n++;for(;i<u.length&&!u[i].includes("DetermineComponentFrameRoot");)i++;if(n===l.length||i===u.length)for(n=l.length-1,i=u.length-1;1<=n&&0<=i&&l[n]!==u[i];)i--;for(;1<=n&&0<=i;n--,i--)if(l[n]!==u[i]){if(1!==n||1!==i)do if(n--,i--,0>i||l[n]!==u[i]){var c="\n"+l[n].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=n&&0<=i);break}}}finally{e0=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?eZ(r):""}function e2(e){try{var t="";do t+=function(e){switch(e.tag){case 26:case 27:case 5:return eZ(e.type);case 16:return eZ("Lazy");case 13:return eZ("Suspense");case 19:return eZ("SuspenseList");case 0:case 15:return e1(e.type,!1);case 11:return e1(e.type.render,!1);case 1:return e1(e.type,!0);case 31:return eZ("Activity");default:return""}}(e),e=e.return;while(e);return t}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}function e3(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function e4(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function e6(e){e._valueTracker||(e._valueTracker=function(e){var t=e4(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==r&&"function"==typeof r.get&&"function"==typeof r.set){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function e5(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=e4(e)?e.checked?"true":"false":e.value),(e=n)!==r&&(t.setValue(e),!0)}function e8(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 e7=/[\n"\\]/g;function e9(e){return e.replace(e7,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function te(e,t,r,n,i,a,s,o){e.name="",null!=s&&"function"!=typeof s&&"symbol"!=typeof s&&"boolean"!=typeof s?e.type=s:e.removeAttribute("type"),null!=t?"number"===s?(0===t&&""===e.value||e.value!=t)&&(e.value=""+e3(t)):e.value!==""+e3(t)&&(e.value=""+e3(t)):"submit"!==s&&"reset"!==s||e.removeAttribute("value"),null!=t?tr(e,s,e3(t)):null!=r?tr(e,s,e3(r)):null!=n&&e.removeAttribute("value"),null==i&&null!=a&&(e.defaultChecked=!!a),null!=i&&(e.checked=i&&"function"!=typeof i&&"symbol"!=typeof i),null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o?e.name=""+e3(o):e.removeAttribute("name")}function tt(e,t,r,n,i,a,s,o){if(null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a&&(e.type=a),null!=t||null!=r){if(("submit"===a||"reset"===a)&&null==t)return;r=null!=r?""+e3(r):"",t=null!=t?""+e3(t):r,o||t===e.value||(e.value=t),e.defaultValue=t}n="function"!=typeof(n=null!=n?n:i)&&"symbol"!=typeof n&&!!n,e.checked=o?e.checked:!!n,e.defaultChecked=!!n,null!=s&&"function"!=typeof s&&"symbol"!=typeof s&&"boolean"!=typeof s&&(e.name=s)}function tr(e,t,r){"number"===t&&e8(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function tn(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i<r.length;i++)t["$"+r[i]]=!0;for(r=0;r<e.length;r++)i=t.hasOwnProperty("$"+e[r].value),e[r].selected!==i&&(e[r].selected=i),i&&n&&(e[r].defaultSelected=!0)}else{for(i=0,r=""+e3(r),t=null;i<e.length;i++){if(e[i].value===r){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function ti(e,t,r){if(null!=t&&((t=""+e3(t))!==e.value&&(e.value=t),null==r)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=null!=r?""+e3(r):""}function ta(e,t,r,n){if(null==t){if(null!=n){if(null!=r)throw Error(o(92));if(R(n)){if(1<n.length)throw Error(o(93));n=n[0]}r=n}null==r&&(r=""),t=r}e.defaultValue=r=e3(t),(n=e.textContent)===r&&""!==n&&null!==n&&(e.value=n)}function ts(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&3===r.nodeType){r.nodeValue=t;return}}e.textContent=t}var to=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 tl(e,t,r){var n=0===t.indexOf("--");null==r||"boolean"==typeof r||""===r?n?e.setProperty(t,""):"float"===t?e.cssFloat="":e[t]="":n?e.setProperty(t,r):"number"!=typeof r||0===r||to.has(t)?"float"===t?e.cssFloat=r:e[t]=(""+r).trim():e[t]=r+"px"}function tu(e,t,r){if(null!=t&&"object"!=typeof t)throw Error(o(62));if(e=e.style,null!=r){for(var n in r)!r.hasOwnProperty(n)||null!=t&&t.hasOwnProperty(n)||(0===n.indexOf("--")?e.setProperty(n,""):"float"===n?e.cssFloat="":e[n]="");for(var i in t)n=t[i],t.hasOwnProperty(i)&&r[i]!==n&&tl(e,i,n)}else for(var a in t)t.hasOwnProperty(a)&&tl(e,a,t[a])}function tc(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 td=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"]]),th=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function tf(e){return th.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var tp=null;function tm(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var tg=null,tv=null;function ty(e){var t=eU(e);if(t&&(e=t.stateNode)){var r=e[eA]||null;switch(e=t.stateNode,t.type){case"input":if(te(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),t=r.name,"radio"===r.type&&null!=t){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+e9(""+t)+'"][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var i=n[eA]||null;if(!i)throw Error(o(90));te(n,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<r.length;t++)(n=r[t]).form===e.form&&e5(n)}break;case"textarea":ti(e,r.value,r.defaultValue);break;case"select":null!=(t=r.value)&&tn(e,!!r.multiple,t,!1)}}}var tb=!1;function tw(e,t,r){if(tb)return e(t,r);tb=!0;try{return e(t)}finally{if(tb=!1,(null!==tg||null!==tv)&&(le(),tg&&(t=tg,e=tv,tv=tg=null,ty(t),e)))for(t=0;t<e.length;t++)ty(e[t])}}function tS(e,t){var r=e.stateNode;if(null===r)return null;var n=r[eA]||null;if(null===n)return null;switch(r=n[t],t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(n="button"!==(e=e.type)&&"input"!==e&&"select"!==e&&"textarea"!==e),e=!n;break;default:e=!1}if(e)return null;if(r&&"function"!=typeof r)throw Error(o(231,t,typeof r));return r}var tk="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,tE=!1;if(tk)try{var tx={};Object.defineProperty(tx,"passive",{get:function(){tE=!0}}),window.addEventListener("test",tx,tx),window.removeEventListener("test",tx,tx)}catch(e){tE=!1}var t_=null,tC=null,tI=null;function tT(){if(tI)return tI;var e,t,r=tC,n=r.length,i="value"in t_?t_.value:t_.textContent,a=i.length;for(e=0;e<n&&r[e]===i[e];e++);var s=n-e;for(t=1;t<=s&&r[n-t]===i[a-t];t++);return tI=i.slice(e,1<t?1-t:void 0)}function tP(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function tA(){return!0}function tR(){return!1}function tN(e){function t(t,r,n,i,a){for(var s in this._reactName=t,this._targetInst=n,this.type=r,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(s)&&(t=e[s],this[s]=t?t(i):i[s]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?tA:tR,this.isPropagationStopped=tR,this}return d(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=tA)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=tA)},persist:function(){},isPersistent:tA}),t}var tO,tL,tM,tF,tj,tD={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},tU=tN(tD),tz=d({},tD,{view:0,detail:0}),tV=tN(tz),t$=d({},tz,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tZ,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==tj&&(tj&&"mousemove"===e.type?(tM=e.screenX-tj.screenX,tF=e.screenY-tj.screenY):tF=tM=0,tj=e),tM)},movementY:function(e){return"movementY"in e?e.movementY:tF}}),tB=tN(t$),tH=tN(d({},t$,{dataTransfer:0})),tW=tN(d({},tz,{relatedTarget:0})),tq=tN(d({},tD,{animationName:0,elapsedTime:0,pseudoElement:0})),tK=tN(d({},tD,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),tG=tN(d({},tD,{data:0})),tQ={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},tY={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},tJ={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tX(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=tJ[e])&&!!t[e]}function tZ(){return tX}var t0=tN(d({},tz,{key:function(e){if(e.key){var t=tQ[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tP(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?tY[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tZ,charCode:function(e){return"keypress"===e.type?tP(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tP(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),t1=tN(d({},t$,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),t2=tN(d({},tz,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tZ})),t3=tN(d({},tD,{propertyName:0,elapsedTime:0,pseudoElement:0})),t4=tN(d({},t$,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),t6=tN(d({},tD,{newState:0,oldState:0})),t5=[9,13,27,32],t8=tk&&"CompositionEvent"in window,t7=null;tk&&"documentMode"in document&&(t7=document.documentMode);var t9=tk&&"TextEvent"in window&&!t7,re=tk&&(!t8||t7&&8<t7&&11>=t7),rt=!1;function rr(e,t){switch(e){case"keyup":return -1!==t5.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function rn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var ri=!1,ra={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 rs(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!ra[e.type]:"textarea"===t}function ro(e,t,r,n){tg?tv?tv.push(n):tv=[n]:tg=n,0<(t=l1(t,"onChange")).length&&(r=new tU("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var rl=null,ru=null;function rc(e){lK(e,0)}function rd(e){if(e5(ez(e)))return e}function rh(e,t){if("change"===e)return t}var rf=!1;if(tk){if(tk){var rp="oninput"in document;if(!rp){var rm=document.createElement("div");rm.setAttribute("oninput","return;"),rp="function"==typeof rm.oninput}n=rp}else n=!1;rf=n&&(!document.documentMode||9<document.documentMode)}function rg(){rl&&(rl.detachEvent("onpropertychange",rv),ru=rl=null)}function rv(e){if("value"===e.propertyName&&rd(ru)){var t=[];ro(t,ru,e,tm(e)),tw(rc,t)}}function ry(e,t,r){"focusin"===e?(rg(),rl=t,ru=r,rl.attachEvent("onpropertychange",rv)):"focusout"===e&&rg()}function rb(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return rd(ru)}function rw(e,t){if("click"===e)return rd(t)}function rS(e,t){if("input"===e||"change"===e)return rd(t)}var rk="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function rE(e,t){if(rk(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var i=r[n];if(!G.call(t,i)||!rk(e[i],t[i]))return!1}return!0}function rx(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function r_(e,t){var r,n=rx(e);for(e=0;n;){if(3===n.nodeType){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=rx(n)}}function rC(e){e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;for(var t=e8(e.document);t instanceof e.HTMLIFrameElement;){try{var r="string"==typeof t.contentWindow.location.href}catch(e){r=!1}if(r)e=t.contentWindow;else break;t=e8(e.document)}return t}function rI(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 rT=tk&&"documentMode"in document&&11>=document.documentMode,rP=null,rA=null,rR=null,rN=!1;function rO(e,t,r){var n=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;rN||null==rP||rP!==e8(n)||(n="selectionStart"in(n=rP)&&rI(n)?{start:n.selectionStart,end:n.selectionEnd}:{anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},rR&&rE(rR,n)||(rR=n,0<(n=l1(rA,"onSelect")).length&&(t=new tU("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=rP)))}function rL(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var rM={animationend:rL("Animation","AnimationEnd"),animationiteration:rL("Animation","AnimationIteration"),animationstart:rL("Animation","AnimationStart"),transitionrun:rL("Transition","TransitionRun"),transitionstart:rL("Transition","TransitionStart"),transitioncancel:rL("Transition","TransitionCancel"),transitionend:rL("Transition","TransitionEnd")},rF={},rj={};function rD(e){if(rF[e])return rF[e];if(!rM[e])return e;var t,r=rM[e];for(t in r)if(r.hasOwnProperty(t)&&t in rj)return rF[e]=r[t];return e}tk&&(rj=document.createElement("div").style,"AnimationEvent"in window||(delete rM.animationend.animation,delete rM.animationiteration.animation,delete rM.animationstart.animation),"TransitionEvent"in window||delete rM.transitionend.transition);var rU=rD("animationend"),rz=rD("animationiteration"),rV=rD("animationstart"),r$=rD("transitionrun"),rB=rD("transitionstart"),rH=rD("transitioncancel"),rW=rD("transitionend"),rq=new Map,rK="abort auxClick beforeToggle 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 toggle touchMove waiting wheel".split(" ");function rG(e,t){rq.set(e,t),eW(t,[e])}rK.push("scrollEnd");var rQ=new WeakMap;function rY(e,t){if("object"==typeof e&&null!==e){var r=rQ.get(e);return void 0!==r?r:(t={value:e,source:t,stack:e2(t)},rQ.set(e,t),t)}return{value:e,source:t,stack:e2(t)}}var rJ=[],rX=0,rZ=0;function r0(){for(var e=rX,t=rZ=rX=0;t<e;){var r=rJ[t];rJ[t++]=null;var n=rJ[t];rJ[t++]=null;var i=rJ[t];rJ[t++]=null;var a=rJ[t];if(rJ[t++]=null,null!==n&&null!==i){var s=n.pending;null===s?i.next=i:(i.next=s.next,s.next=i),n.pending=i}0!==a&&r4(r,i,a)}}function r1(e,t,r,n){rJ[rX++]=e,rJ[rX++]=t,rJ[rX++]=r,rJ[rX++]=n,rZ|=n,e.lanes|=n,null!==(e=e.alternate)&&(e.lanes|=n)}function r2(e,t,r,n){return r1(e,t,r,n),r6(e)}function r3(e,t){return r1(e,null,null,t),r6(e)}function r4(e,t,r){e.lanes|=r;var n=e.alternate;null!==n&&(n.lanes|=r);for(var i=!1,a=e.return;null!==a;)a.childLanes|=r,null!==(n=a.alternate)&&(n.childLanes|=r),22===a.tag&&(null===(e=a.stateNode)||1&e._visibility||(i=!0)),e=a,a=a.return;return 3===e.tag?(a=e.stateNode,i&&null!==t&&(i=31-ed(r),null===(n=(e=a.hiddenUpdates)[i])?e[i]=[t]:n.push(t),t.lane=0x20000000|r),a):null}function r6(e){if(50<o2)throw o2=0,o3=null,Error(o(185));for(var t=e.return;null!==t;)t=(e=t).return;return 3===e.tag?e.stateNode:null}var r5={};function r8(e,t,r,n){this.tag=e,this.key=r,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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function r7(e,t,r,n){return new r8(e,t,r,n)}function r9(e){return!(!(e=e.prototype)||!e.isReactComponent)}function ne(e,t){var r=e.alternate;return null===r?((r=r7(e.tag,t,e.key,e.mode)).elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=0x3e00000&e.flags,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function nt(e,t){e.flags&=0x3e00002;var r=e.alternate;return null===r?(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=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,e.dependencies=null===(t=r.dependencies)?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function nr(e,t,r,n,i,a){var s=0;if(n=e,"function"==typeof e)r9(e)&&(s=1);else if("string"==typeof e)s=!function(e,t,r){if(1===r||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(t.async&&"function"!=typeof t.async&&"symbol"!=typeof t.async&&!t.onLoad&&!t.onError&&t.src&&"string"==typeof t.src)return!0}return!1}(e,r,z.current)?"html"===e||"head"===e||"body"===e?27:5:26;else e:switch(e){case C:return(e=r7(31,r,t,i)).elementType=C,e.lanes=a,e;case m:return nn(r.children,i,a,t);case g:s=8,i|=24;break;case v:return(e=r7(12,r,t,2|i)).elementType=v,e.lanes=a,e;case k:return(e=r7(13,r,t,i)).elementType=k,e.lanes=a,e;case E:return(e=r7(19,r,t,i)).elementType=E,e.lanes=a,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case y:case w:s=10;break e;case b:s=9;break e;case S:s=11;break e;case x:s=14;break e;case _:s=16,n=null;break e}s=29,r=Error(o(130,null===e?"null":typeof e,"")),n=null}return(t=r7(s,r,t,i)).elementType=e,t.type=n,t.lanes=a,t}function nn(e,t,r,n){return(e=r7(7,e,n,t)).lanes=r,e}function ni(e,t,r){return(e=r7(6,e,null,t)).lanes=r,e}function na(e,t,r){return(t=r7(4,null!==e.children?e.children:[],e.key,t)).lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ns=[],no=0,nl=null,nu=0,nc=[],nd=0,nh=null,nf=1,np="";function nm(e,t){ns[no++]=nu,ns[no++]=nl,nl=e,nu=t}function ng(e,t,r){nc[nd++]=nf,nc[nd++]=np,nc[nd++]=nh,nh=e;var n=nf;e=np;var i=32-ed(n)-1;n&=~(1<<i),r+=1;var a=32-ed(t)+i;if(30<a){var s=i-i%5;a=(n&(1<<s)-1).toString(32),n>>=s,i-=s,nf=1<<32-ed(t)+i|r<<i|n,np=a+e}else nf=1<<a|r<<i|n,np=e}function nv(e){null!==e.return&&(nm(e,1),ng(e,1,0))}function ny(e){for(;e===nl;)nl=ns[--no],ns[no]=null,nu=ns[--no],ns[no]=null;for(;e===nh;)nh=nc[--nd],nc[nd]=null,np=nc[--nd],nc[nd]=null,nf=nc[--nd],nc[nd]=null}var nb=null,nw=null,nS=!1,nk=null,nE=!1,nx=Error(o(519));function n_(e){throw nR(rY(Error(o(418,"")),e)),nx}function nC(e){var t=e.stateNode,r=e.type,n=e.memoizedProps;switch(t[eP]=e,t[eA]=n,r){case"dialog":lG("cancel",t),lG("close",t);break;case"iframe":case"object":case"embed":lG("load",t);break;case"video":case"audio":for(r=0;r<lW.length;r++)lG(lW[r],t);break;case"source":lG("error",t);break;case"img":case"image":case"link":lG("error",t),lG("load",t);break;case"details":lG("toggle",t);break;case"input":lG("invalid",t),tt(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0),e6(t);break;case"select":lG("invalid",t);break;case"textarea":lG("invalid",t),ta(t,n.value,n.defaultValue,n.children),e6(t)}"string"!=typeof(r=n.children)&&"number"!=typeof r&&"bigint"!=typeof r||t.textContent===""+r||!0===n.suppressHydrationWarning||l8(t.textContent,r)?(null!=n.popover&&(lG("beforetoggle",t),lG("toggle",t)),null!=n.onScroll&&lG("scroll",t),null!=n.onScrollEnd&&lG("scrollend",t),null!=n.onClick&&(t.onclick=l7),t=!0):t=!1,t||n_(e)}function nI(e){for(nb=e.return;nb;)switch(nb.tag){case 5:case 13:nE=!1;return;case 27:case 3:nE=!0;return;default:nb=nb.return}}function nT(e){if(e!==nb)return!1;if(!nS)return nI(e),nS=!0,!1;var t,r=e.tag;if((t=3!==r&&27!==r)&&((t=5===r)&&(t="form"===(t=e.type)||"button"===t||uo(e.type,e.memoizedProps)),t=!t),t&&nw&&n_(e),nI(e),13===r){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(r=0,e=e.nextSibling;e;){if(8===e.nodeType)if("/$"===(t=e.data)){if(0===r){nw=uy(e.nextSibling);break e}r--}else"$"!==t&&"$!"!==t&&"$?"!==t||r++;e=e.nextSibling}nw=null}}else 27===r?(r=nw,up(e.type)?(e=ub,ub=null,nw=e):nw=r):nw=nb?uy(e.stateNode.nextSibling):null;return!0}function nP(){nw=nb=null,nS=!1}function nA(){var e=nk;return null!==e&&(null===oB?oB=e:oB.push.apply(oB,e),nk=null),e}function nR(e){null===nk?nk=[e]:nk.push(e)}var nN=j(null),nO=null,nL=null;function nM(e,t,r){U(nN,t._currentValue),t._currentValue=r}function nF(e){e._currentValue=nN.current,D(nN)}function nj(e,t,r){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==n&&(n.childLanes|=t)):null!==n&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function nD(e,t,r,n){var i=e.child;for(null!==i&&(i.return=e);null!==i;){var a=i.dependencies;if(null!==a){var s=i.child;a=a.firstContext;e:for(;null!==a;){var l=a;a=i;for(var u=0;u<t.length;u++)if(l.context===t[u]){a.lanes|=r,null!==(l=a.alternate)&&(l.lanes|=r),nj(a.return,r,e),n||(s=null);break e}a=l.next}}else if(18===i.tag){if(null===(s=i.return))throw Error(o(341));s.lanes|=r,null!==(a=s.alternate)&&(a.lanes|=r),nj(s,r,e),s=null}else s=i.child;if(null!==s)s.return=i;else for(s=i;null!==s;){if(s===e){s=null;break}if(null!==(i=s.sibling)){i.return=s.return,s=i;break}s=s.return}i=s}}function nU(e,t,r,n){e=null;for(var i=t,a=!1;null!==i;){if(!a){if(0!=(524288&i.flags))a=!0;else if(0!=(262144&i.flags))break}if(10===i.tag){var s=i.alternate;if(null===s)throw Error(o(387));if(null!==(s=s.memoizedProps)){var l=i.type;rk(i.pendingProps.value,s.value)||(null!==e?e.push(l):e=[l])}}else if(i===B.current){if(null===(s=i.alternate))throw Error(o(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(null!==e?e.push(uQ):e=[uQ])}i=i.return}null!==e&&nD(t,e,r,n),t.flags|=262144}function nz(e){for(e=e.firstContext;null!==e;){if(!rk(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function nV(e){nO=e,nL=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function n$(e){return nH(nO,e)}function nB(e,t){return null===nO&&nV(e),nH(e,t)}function nH(e,t){var r=t._currentValue;if(t={context:t,memoizedValue:r,next:null},null===nL){if(null===e)throw Error(o(308));nL=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else nL=nL.next=t;return r}var nW="undefined"!=typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},nq=i.unstable_scheduleCallback,nK=i.unstable_NormalPriority,nG={$$typeof:w,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function nQ(){return{controller:new nW,data:new Map,refCount:0}}function nY(e){e.refCount--,0===e.refCount&&nq(nK,function(){e.controller.abort()})}var nJ=null,nX=0,nZ=0,n0=null;function n1(){if(0==--nX&&null!==nJ){null!==n0&&(n0.status="fulfilled");var e=nJ;nJ=null,nZ=0,n0=null;for(var t=0;t<e.length;t++)(0,e[t])()}}var n2=N.S;N.S=function(e,t){"object"==typeof t&&null!==t&&"function"==typeof t.then&&function(e,t){if(null===nJ){var r=nJ=[];nX=0,nZ=lz(),n0={status:"pending",value:void 0,then:function(e){r.push(e)}}}nX++,t.then(n1,n1)}(0,t),null!==n2&&n2(e,t)};var n3=j(null);function n4(){var e=n3.current;return null!==e?e:oI.pooledCache}function n6(e,t){null===t?U(n3,n3.current):U(n3,t.pool)}function n5(){var e=n4();return null===e?null:{parent:nG._currentValue,pool:e}}var n8=Error(o(460)),n7=Error(o(474)),n9=Error(o(542)),ie={then:function(){}};function it(e){return"fulfilled"===(e=e.status)||"rejected"===e}function ir(){}function ii(e,t,r){switch(void 0===(r=e[r])?e.push(t):r!==t&&(t.then(ir,ir),t=r),t.status){case"fulfilled":return t.value;case"rejected":throw io(e=t.reason),e;default:if("string"==typeof t.status)t.then(ir,ir);else{if(null!==(e=oI)&&100<e.shellSuspendCounter)throw Error(o(482));(e=t).status="pending",e.then(function(e){if("pending"===t.status){var r=t;r.status="fulfilled",r.value=e}},function(e){if("pending"===t.status){var r=t;r.status="rejected",r.reason=e}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw io(e=t.reason),e}throw ia=t,n8}}var ia=null;function is(){if(null===ia)throw Error(o(459));var e=ia;return ia=null,e}function io(e){if(e===n8||e===n9)throw Error(o(483))}var il=!1;function iu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ic(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function id(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ih(e,t,r){var n=e.updateQueue;if(null===n)return null;if(n=n.shared,0!=(2&oC)){var i=n.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),n.pending=t,t=r6(e),r4(e,null,r),t}return r1(e,n,t,r),r6(e)}function ip(e,t,r){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194048&r))){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,ex(e,r)}}function im(e,t){var r=e.updateQueue,n=e.alternate;if(null!==n&&r===(n=n.updateQueue)){var i=null,a=null;if(null!==(r=r.firstBaseUpdate)){do{var s={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};null===a?i=a=s:a=a.next=s,r=r.next}while(null!==r);null===a?i=a=t:a=a.next=t}else i=a=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:n.shared,callbacks:n.callbacks},e.updateQueue=r;return}null===(e=r.lastBaseUpdate)?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}var ig=!1;function iv(){if(ig){var e=n0;if(null!==e)throw e}}function iy(e,t,r,n){ig=!1;var i=e.updateQueue;il=!1;var a=i.firstBaseUpdate,s=i.lastBaseUpdate,o=i.shared.pending;if(null!==o){i.shared.pending=null;var l=o,u=l.next;l.next=null,null===s?a=u:s.next=u,s=l;var c=e.alternate;null!==c&&(o=(c=c.updateQueue).lastBaseUpdate)!==s&&(null===o?c.firstBaseUpdate=u:o.next=u,c.lastBaseUpdate=l)}if(null!==a){var h=i.baseState;for(s=0,c=u=l=null,o=a;;){var f=-0x20000001&o.lane,p=f!==o.lane;if(p?(oP&f)===f:(n&f)===f){0!==f&&f===nZ&&(ig=!0),null!==c&&(c=c.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var m=e,g=o;switch(f=t,g.tag){case 1:if("function"==typeof(m=g.payload)){h=m.call(r,h,f);break e}h=m;break e;case 3:m.flags=-65537&m.flags|128;case 0:if(null==(f="function"==typeof(m=g.payload)?m.call(r,h,f):m))break e;h=d({},h,f);break e;case 2:il=!0}}null!==(f=o.callback)&&(e.flags|=64,p&&(e.flags|=8192),null===(p=i.callbacks)?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:o.tag,payload:o.payload,callback:o.callback,next:null},null===c?(u=c=p,l=h):c=c.next=p,s|=f;if(null===(o=o.next))if(null===(o=i.shared.pending))break;else o=(p=o).next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}null===c&&(l=h),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,null===a&&(i.shared.lanes=0),oj|=s,e.lanes=s,e.memoizedState=h}}function ib(e,t){if("function"!=typeof e)throw Error(o(191,e));e.call(t)}function iw(e,t){var r=e.callbacks;if(null!==r)for(e.callbacks=null,e=0;e<r.length;e++)ib(r[e],t)}var iS=j(null),ik=j(0);function iE(e,t){U(ik,e=oM),U(iS,t),oM=e|t.baseLanes}function ix(){U(ik,oM),U(iS,iS.current)}function i_(){oM=ik.current,D(iS),D(ik)}var iC=0,iI=null,iT=null,iP=null,iA=!1,iR=!1,iN=!1,iO=0,iL=0,iM=null,iF=0;function ij(){throw Error(o(321))}function iD(e,t){if(null===t)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!rk(e[r],t[r]))return!1;return!0}function iU(e,t,r,n,i,a){return iC=a,iI=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,N.H=null===e||null===e.memoizedState?aW:aq,iN=!1,a=r(n,i),iN=!1,iR&&(a=iV(t,r,n,i)),iz(e),a}function iz(e){N.H=aH;var t=null!==iT&&null!==iT.next;if(iC=0,iP=iT=iI=null,iA=!1,iL=0,iM=null,t)throw Error(o(300));null===e||sg||null!==(e=e.dependencies)&&nz(e)&&(sg=!0)}function iV(e,t,r,n){iI=e;var i=0;do{if(iR&&(iM=null),iL=0,iR=!1,25<=i)throw Error(o(301));if(i+=1,iP=iT=null,null!=e.updateQueue){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,null!=a.memoCache&&(a.memoCache.index=0)}N.H=aK,a=t(r,n)}while(iR);return a}function i$(){var e=N.H,t=e.useState()[0];return t="function"==typeof t.then?iQ(t):t,e=e.useState()[0],(null!==iT?iT.memoizedState:null)!==e&&(iI.flags|=1024),t}function iB(){var e=0!==iO;return iO=0,e}function iH(e,t,r){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r}function iW(e){if(iA){for(e=e.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}iA=!1}iC=0,iP=iT=iI=null,iR=!1,iL=iO=0,iM=null}function iq(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===iP?iI.memoizedState=iP=e:iP=iP.next=e,iP}function iK(){if(null===iT){var e=iI.alternate;e=null!==e?e.memoizedState:null}else e=iT.next;var t=null===iP?iI.memoizedState:iP.next;if(null!==t)iP=t,iT=e;else{if(null===e){if(null===iI.alternate)throw Error(o(467));throw Error(o(310))}e={memoizedState:(iT=e).memoizedState,baseState:iT.baseState,baseQueue:iT.baseQueue,queue:iT.queue,next:null},null===iP?iI.memoizedState=iP=e:iP=iP.next=e}return iP}function iG(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function iQ(e){var t=iL;return iL+=1,null===iM&&(iM=[]),e=ii(iM,e,t),t=iI,null===(null===iP?t.memoizedState:iP.next)&&(N.H=null===(t=t.alternate)||null===t.memoizedState?aW:aq),e}function iY(e){if(null!==e&&"object"==typeof e){if("function"==typeof e.then)return iQ(e);if(e.$$typeof===w)return n$(e)}throw Error(o(438,String(e)))}function iJ(e){var t=null,r=iI.updateQueue;if(null!==r&&(t=r.memoCache),null==t){var n=iI.alternate;null!==n&&null!==(n=n.updateQueue)&&null!=(n=n.memoCache)&&(t={data:n.data.map(function(e){return e.slice()}),index:0})}if(null==t&&(t={data:[],index:0}),null===r&&(r=iG(),iI.updateQueue=r),r.memoCache=t,void 0===(r=t.data[t.index]))for(r=t.data[t.index]=Array(e),n=0;n<e;n++)r[n]=I;return t.index++,r}function iX(e,t){return"function"==typeof t?t(e):t}function iZ(e){return i0(iK(),iT,e)}function i0(e,t,r){var n=e.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=r;var i=e.baseQueue,a=n.pending;if(null!==a){if(null!==i){var s=i.next;i.next=a.next,a.next=s}t.baseQueue=i=a,n.pending=null}if(a=e.baseState,null===i)e.memoizedState=a;else{t=i.next;var l=s=null,u=null,c=t,d=!1;do{var h=-0x20000001&c.lane;if(h!==c.lane?(oP&h)===h:(iC&h)===h){var f=c.revertLane;if(0===f)null!==u&&(u=u.next={lane:0,revertLane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),h===nZ&&(d=!0);else if((iC&f)===f){c=c.next,f===nZ&&(d=!0);continue}else h={lane:0,revertLane:c.revertLane,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},null===u?(l=u=h,s=a):u=u.next=h,iI.lanes|=f,oj|=f;h=c.action,iN&&r(a,h),a=c.hasEagerState?c.eagerState:r(a,h)}else f={lane:h,revertLane:c.revertLane,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},null===u?(l=u=f,s=a):u=u.next=f,iI.lanes|=h,oj|=h;c=c.next}while(null!==c&&c!==t);if(null===u?s=a:u.next=l,!rk(a,e.memoizedState)&&(sg=!0,d&&null!==(r=n0)))throw r;e.memoizedState=a,e.baseState=s,e.baseQueue=u,n.lastRenderedState=a}return null===i&&(n.lanes=0),[e.memoizedState,n.dispatch]}function i1(e){var t=iK(),r=t.queue;if(null===r)throw Error(o(311));r.lastRenderedReducer=e;var n=r.dispatch,i=r.pending,a=t.memoizedState;if(null!==i){r.pending=null;var s=i=i.next;do a=e(a,s.action),s=s.next;while(s!==i);rk(a,t.memoizedState)||(sg=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),r.lastRenderedState=a}return[a,n]}function i2(e,t,r){var n=iI,i=iK(),a=nS;if(a){if(void 0===r)throw Error(o(407));r=r()}else r=t();var s=!rk((iT||i).memoizedState,r);if(s&&(i.memoizedState=r,sg=!0),i=i.queue,ag(2048,8,i6.bind(null,n,i,e),[e]),i.getSnapshot!==t||s||null!==iP&&1&iP.memoizedState.tag){if(n.flags|=2048,ah(9,af(),i4.bind(null,n,i,r,t),null),null===oI)throw Error(o(349));a||0!=(124&iC)||i3(n,t,r)}return r}function i3(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},null===(t=iI.updateQueue)?(t=iG(),iI.updateQueue=t,t.stores=[e]):null===(r=t.stores)?t.stores=[e]:r.push(e)}function i4(e,t,r,n){t.value=r,t.getSnapshot=n,i5(t)&&i8(e)}function i6(e,t,r){return r(function(){i5(t)&&i8(e)})}function i5(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!rk(e,r)}catch(e){return!0}}function i8(e){var t=r3(e,2);null!==t&&o5(t,e,2)}function i7(e){var t=iq();if("function"==typeof e){var r=e;if(e=r(),iN){ec(!0);try{r()}finally{ec(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:iX,lastRenderedState:e},t}function i9(e,t,r,n){return e.baseState=r,i0(e,iT,"function"==typeof n?n:iX)}function ae(e,t,r,n,i){if(aV(e))throw Error(o(485));if(null!==(e=t.action)){var a={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(e){a.listeners.push(e)}};null!==N.T?r(!0):a.isTransition=!1,n(a),null===(r=t.pending)?(a.next=t.pending=a,at(t,a)):(a.next=r.next,t.pending=r.next=a)}}function at(e,t){var r=t.action,n=t.payload,i=e.state;if(t.isTransition){var a=N.T,s={};N.T=s;try{var o=r(i,n),l=N.S;null!==l&&l(s,o),ar(e,t,o)}catch(r){ai(e,t,r)}finally{N.T=a}}else try{a=r(i,n),ar(e,t,a)}catch(r){ai(e,t,r)}}function ar(e,t,r){null!==r&&"object"==typeof r&&"function"==typeof r.then?r.then(function(r){an(e,t,r)},function(r){return ai(e,t,r)}):an(e,t,r)}function an(e,t,r){t.status="fulfilled",t.value=r,aa(t),e.state=r,null!==(t=e.pending)&&((r=t.next)===t?e.pending=null:(r=r.next,t.next=r,at(e,r)))}function ai(e,t,r){var n=e.pending;if(e.pending=null,null!==n){n=n.next;do t.status="rejected",t.reason=r,aa(t),t=t.next;while(t!==n)}e.action=null}function aa(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function as(e,t){return t}function ao(e,t){if(nS){var r=oI.formState;if(null!==r){e:{var n=iI;if(nS){if(nw){t:{for(var i=nw,a=nE;8!==i.nodeType;)if(!a||null===(i=uy(i.nextSibling))){i=null;break t}i="F!"===(a=i.data)||"F"===a?i:null}if(i){nw=uy(i.nextSibling),n="F!"===i.data;break e}}n_(n)}n=!1}n&&(t=r[0])}}return(r=iq()).memoizedState=r.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:as,lastRenderedState:t},r.queue=n,r=aD.bind(null,iI,n),n.dispatch=r,n=i7(!1),a=az.bind(null,iI,!1,n.queue),n=iq(),i={state:t,dispatch:null,action:e,pending:null},n.queue=i,r=ae.bind(null,iI,i,a,r),i.dispatch=r,n.memoizedState=e,[t,r,!1]}function al(e){return au(iK(),iT,e)}function au(e,t,r){if(t=i0(e,t,as)[0],e=iZ(iX)[0],"object"==typeof t&&null!==t&&"function"==typeof t.then)try{var n=iQ(t)}catch(e){if(e===n8)throw n9;throw e}else n=t;var i=(t=iK()).queue,a=i.dispatch;return r!==t.memoizedState&&(iI.flags|=2048,ah(9,af(),ac.bind(null,i,r),null)),[n,a,e]}function ac(e,t){e.action=t}function ad(e){var t=iK(),r=iT;if(null!==r)return au(t,r,e);iK(),t=t.memoizedState;var n=(r=iK()).queue.dispatch;return r.memoizedState=e,[t,n,!1]}function ah(e,t,r,n){return e={tag:e,create:r,deps:n,inst:t,next:null},null===(t=iI.updateQueue)&&(t=iG(),iI.updateQueue=t),null===(r=t.lastEffect)?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e),e}function af(){return{destroy:void 0,resource:void 0}}function ap(){return iK().memoizedState}function am(e,t,r,n){var i=iq();n=void 0===n?null:n,iI.flags|=e,i.memoizedState=ah(1|t,af(),r,n)}function ag(e,t,r,n){var i=iK();n=void 0===n?null:n;var a=i.memoizedState.inst;null!==iT&&null!==n&&iD(n,iT.memoizedState.deps)?i.memoizedState=ah(t,a,r,n):(iI.flags|=e,i.memoizedState=ah(1|t,a,r,n))}function av(e,t){am(8390656,8,e,t)}function ay(e,t){ag(2048,8,e,t)}function ab(e,t){return ag(4,2,e,t)}function aw(e,t){return ag(4,4,e,t)}function aS(e,t){if("function"==typeof t){var r=t(e=e());return function(){"function"==typeof r?r():t(null)}}if(null!=t)return t.current=e=e(),function(){t.current=null}}function ak(e,t,r){r=null!=r?r.concat([e]):null,ag(4,4,aS.bind(null,t,e),r)}function aE(){}function ax(e,t){var r=iK();t=void 0===t?null:t;var n=r.memoizedState;return null!==t&&iD(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function a_(e,t){var r=iK();t=void 0===t?null:t;var n=r.memoizedState;if(null!==t&&iD(t,n[1]))return n[0];if(n=e(),iN){ec(!0);try{e()}finally{ec(!1)}}return r.memoizedState=[n,t],n}function aC(e,t,r){return void 0===r||0!=(0x40000000&iC)?e.memoizedState=t:(e.memoizedState=r,e=o6(),iI.lanes|=e,oj|=e,r)}function aI(e,t,r,n){return rk(r,t)?r:null!==iS.current?(rk(e=aC(e,r,n),t)||(sg=!0),e):0==(42&iC)?(sg=!0,e.memoizedState=r):(e=o6(),iI.lanes|=e,oj|=e,t)}function aT(e,t,r,n,i){var a=O.p;O.p=0!==a&&8>a?a:8;var s=N.T,o={};N.T=o,az(e,!1,t,r);try{var l=i(),u=N.S;if(null!==u&&u(o,l),null!==l&&"object"==typeof l&&"function"==typeof l.then){var c,d,h=(c=[],d={status:"pending",value:null,reason:null,then:function(e){c.push(e)}},l.then(function(){d.status="fulfilled",d.value=n;for(var e=0;e<c.length;e++)(0,c[e])(n)},function(e){for(d.status="rejected",d.reason=e,e=0;e<c.length;e++)(0,c[e])(void 0)}),d);aU(e,t,h,o4(e))}else aU(e,t,n,o4(e))}catch(r){aU(e,t,{then:function(){},status:"rejected",reason:r},o4())}finally{O.p=a,N.T=s}}function aP(){}function aA(e,t,r,n){if(5!==e.tag)throw Error(o(476));var i=aR(e).queue;aT(e,i,t,L,null===r?aP:function(){return aN(e),r(n)})}function aR(e){var t=e.memoizedState;if(null!==t)return t;var r={};return(t={memoizedState:L,baseState:L,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:iX,lastRenderedState:L},next:null}).next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:iX,lastRenderedState:r},next:null},e.memoizedState=t,null!==(e=e.alternate)&&(e.memoizedState=t),t}function aN(e){var t=aR(e).next.queue;aU(e,t,{},o4())}function aO(){return n$(uQ)}function aL(){return iK().memoizedState}function aM(){return iK().memoizedState}function aF(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var r=o4(),n=ih(t,e=id(r),r);null!==n&&(o5(n,t,r),ip(n,t,r)),t={cache:nQ()},e.payload=t;return}t=t.return}}function aj(e,t,r){var n=o4();r={lane:n,revertLane:0,action:r,hasEagerState:!1,eagerState:null,next:null},aV(e)?a$(t,r):null!==(r=r2(e,t,r,n))&&(o5(r,e,n),aB(r,t,n))}function aD(e,t,r){aU(e,t,r,o4())}function aU(e,t,r,n){var i={lane:n,revertLane:0,action:r,hasEagerState:!1,eagerState:null,next:null};if(aV(e))a$(t,i);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var s=t.lastRenderedState,o=a(s,r);if(i.hasEagerState=!0,i.eagerState=o,rk(o,s))return r1(e,t,i,0),null===oI&&r0(),!1}catch(e){}finally{}if(null!==(r=r2(e,t,i,n)))return o5(r,e,n),aB(r,t,n),!0}return!1}function az(e,t,r,n){if(n={lane:2,revertLane:lz(),action:n,hasEagerState:!1,eagerState:null,next:null},aV(e)){if(t)throw Error(o(479))}else null!==(t=r2(e,r,n,2))&&o5(t,e,2)}function aV(e){var t=e.alternate;return e===iI||null!==t&&t===iI}function a$(e,t){iR=iA=!0;var r=e.pending;null===r?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function aB(e,t,r){if(0!=(4194048&r)){var n=t.lanes;n&=e.pendingLanes,t.lanes=r|=n,ex(e,r)}}var aH={readContext:n$,use:iY,useCallback:ij,useContext:ij,useEffect:ij,useImperativeHandle:ij,useLayoutEffect:ij,useInsertionEffect:ij,useMemo:ij,useReducer:ij,useRef:ij,useState:ij,useDebugValue:ij,useDeferredValue:ij,useTransition:ij,useSyncExternalStore:ij,useId:ij,useHostTransitionStatus:ij,useFormState:ij,useActionState:ij,useOptimistic:ij,useMemoCache:ij,useCacheRefresh:ij},aW={readContext:n$,use:iY,useCallback:function(e,t){return iq().memoizedState=[e,void 0===t?null:t],e},useContext:n$,useEffect:av,useImperativeHandle:function(e,t,r){r=null!=r?r.concat([e]):null,am(4194308,4,aS.bind(null,t,e),r)},useLayoutEffect:function(e,t){return am(4194308,4,e,t)},useInsertionEffect:function(e,t){am(4,2,e,t)},useMemo:function(e,t){var r=iq();t=void 0===t?null:t;var n=e();if(iN){ec(!0);try{e()}finally{ec(!1)}}return r.memoizedState=[n,t],n},useReducer:function(e,t,r){var n=iq();if(void 0!==r){var i=r(t);if(iN){ec(!0);try{r(t)}finally{ec(!1)}}}else i=t;return n.memoizedState=n.baseState=i,n.queue=e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},e=e.dispatch=aj.bind(null,iI,e),[n.memoizedState,e]},useRef:function(e){return iq().memoizedState={current:e}},useState:function(e){var t=(e=i7(e)).queue,r=aD.bind(null,iI,t);return t.dispatch=r,[e.memoizedState,r]},useDebugValue:aE,useDeferredValue:function(e,t){return aC(iq(),e,t)},useTransition:function(){var e=i7(!1);return e=aT.bind(null,iI,e.queue,!0,!1),iq().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,r){var n=iI,i=iq();if(nS){if(void 0===r)throw Error(o(407));r=r()}else{if(r=t(),null===oI)throw Error(o(349));0!=(124&oP)||i3(n,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,av(i6.bind(null,n,a,e),[e]),n.flags|=2048,ah(9,af(),i4.bind(null,n,a,r,t),null),r},useId:function(){var e=iq(),t=oI.identifierPrefix;if(nS){var r=np,n=nf;t="\xab"+t+"R"+(r=(n&~(1<<32-ed(n)-1)).toString(32)+r),0<(r=iO++)&&(t+="H"+r.toString(32)),t+="\xbb"}else t="\xab"+t+"r"+(r=iF++).toString(32)+"\xbb";return e.memoizedState=t},useHostTransitionStatus:aO,useFormState:ao,useActionState:ao,useOptimistic:function(e){var t=iq();t.memoizedState=t.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=r,t=az.bind(null,iI,!0,r),r.dispatch=t,[e,t]},useMemoCache:iJ,useCacheRefresh:function(){return iq().memoizedState=aF.bind(null,iI)}},aq={readContext:n$,use:iY,useCallback:ax,useContext:n$,useEffect:ay,useImperativeHandle:ak,useInsertionEffect:ab,useLayoutEffect:aw,useMemo:a_,useReducer:iZ,useRef:ap,useState:function(){return iZ(iX)},useDebugValue:aE,useDeferredValue:function(e,t){return aI(iK(),iT.memoizedState,e,t)},useTransition:function(){var e=iZ(iX)[0],t=iK().memoizedState;return["boolean"==typeof e?e:iQ(e),t]},useSyncExternalStore:i2,useId:aL,useHostTransitionStatus:aO,useFormState:al,useActionState:al,useOptimistic:function(e,t){return i9(iK(),iT,e,t)},useMemoCache:iJ,useCacheRefresh:aM},aK={readContext:n$,use:iY,useCallback:ax,useContext:n$,useEffect:ay,useImperativeHandle:ak,useInsertionEffect:ab,useLayoutEffect:aw,useMemo:a_,useReducer:i1,useRef:ap,useState:function(){return i1(iX)},useDebugValue:aE,useDeferredValue:function(e,t){var r=iK();return null===iT?aC(r,e,t):aI(r,iT.memoizedState,e,t)},useTransition:function(){var e=i1(iX)[0],t=iK().memoizedState;return["boolean"==typeof e?e:iQ(e),t]},useSyncExternalStore:i2,useId:aL,useHostTransitionStatus:aO,useFormState:ad,useActionState:ad,useOptimistic:function(e,t){var r=iK();return null!==iT?i9(r,iT,e,t):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:iJ,useCacheRefresh:aM},aG=null,aQ=0;function aY(e){var t=aQ;return aQ+=1,null===aG&&(aG=[]),ii(aG,e,t)}function aJ(e,t){e.ref=void 0!==(t=t.props.ref)?t:null}function aX(e,t){if(t.$$typeof===h)throw Error(o(525));throw Error(o(31,"[object Object]"===(e=Object.prototype.toString.call(t))?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function aZ(e){return(0,e._init)(e._payload)}function a0(e){function t(t,r){if(e){var n=t.deletions;null===n?(t.deletions=[r],t.flags|=16):n.push(r)}}function r(r,n){if(!e)return null;for(;null!==n;)t(r,n),n=n.sibling;return null}function n(e){for(var t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function i(e,t){return(e=ne(e,t)).index=0,e.sibling=null,e}function a(t,r,n){return(t.index=n,e)?null!==(n=t.alternate)?(n=n.index)<r?(t.flags|=0x4000002,r):n:(t.flags|=0x4000002,r):(t.flags|=1048576,r)}function s(t){return e&&null===t.alternate&&(t.flags|=0x4000002),t}function l(e,t,r,n){return null===t||6!==t.tag?(t=ni(r,e.mode,n)).return=e:(t=i(t,r)).return=e,t}function u(e,t,r,n){var a=r.type;return a===m?d(e,t,r.props.children,n,r.key):(null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===_&&aZ(a)===t.type)?aJ(t=i(t,r.props),r):aJ(t=nr(r.type,r.key,r.props,null,e.mode,n),r),t.return=e,t)}function c(e,t,r,n){return null===t||4!==t.tag||t.stateNode.containerInfo!==r.containerInfo||t.stateNode.implementation!==r.implementation?(t=na(r,e.mode,n)).return=e:(t=i(t,r.children||[])).return=e,t}function d(e,t,r,n,a){return null===t||7!==t.tag?(t=nn(r,e.mode,n,a)).return=e:(t=i(t,r)).return=e,t}function h(e,t,r){if("string"==typeof t&&""!==t||"number"==typeof t||"bigint"==typeof t)return(t=ni(""+t,e.mode,r)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case f:return aJ(r=nr(t.type,t.key,t.props,null,e.mode,r),t),r.return=e,r;case p:return(t=na(t,e.mode,r)).return=e,t;case _:return h(e,t=(0,t._init)(t._payload),r)}if(R(t)||P(t))return(t=nn(t,e.mode,r,null)).return=e,t;if("function"==typeof t.then)return h(e,aY(t),r);if(t.$$typeof===w)return h(e,nB(e,t),r);aX(e,t)}return null}function g(e,t,r,n){var i=null!==t?t.key:null;if("string"==typeof r&&""!==r||"number"==typeof r||"bigint"==typeof r)return null!==i?null:l(e,t,""+r,n);if("object"==typeof r&&null!==r){switch(r.$$typeof){case f:return r.key===i?u(e,t,r,n):null;case p:return r.key===i?c(e,t,r,n):null;case _:return g(e,t,r=(i=r._init)(r._payload),n)}if(R(r)||P(r))return null!==i?null:d(e,t,r,n,null);if("function"==typeof r.then)return g(e,t,aY(r),n);if(r.$$typeof===w)return g(e,t,nB(e,r),n);aX(e,r)}return null}function v(e,t,r,n,i){if("string"==typeof n&&""!==n||"number"==typeof n||"bigint"==typeof n)return l(t,e=e.get(r)||null,""+n,i);if("object"==typeof n&&null!==n){switch(n.$$typeof){case f:return u(t,e=e.get(null===n.key?r:n.key)||null,n,i);case p:return c(t,e=e.get(null===n.key?r:n.key)||null,n,i);case _:return v(e,t,r,n=(0,n._init)(n._payload),i)}if(R(n)||P(n))return d(t,e=e.get(r)||null,n,i,null);if("function"==typeof n.then)return v(e,t,r,aY(n),i);if(n.$$typeof===w)return v(e,t,r,nB(t,n),i);aX(t,n)}return null}return function(l,u,c,d){try{aQ=0;var y=function l(u,c,d,y){if("object"==typeof d&&null!==d&&d.type===m&&null===d.key&&(d=d.props.children),"object"==typeof d&&null!==d){switch(d.$$typeof){case f:e:{for(var b=d.key;null!==c;){if(c.key===b){if((b=d.type)===m){if(7===c.tag){r(u,c.sibling),(y=i(c,d.props.children)).return=u,u=y;break e}}else if(c.elementType===b||"object"==typeof b&&null!==b&&b.$$typeof===_&&aZ(b)===c.type){r(u,c.sibling),aJ(y=i(c,d.props),d),y.return=u,u=y;break e}r(u,c);break}t(u,c),c=c.sibling}d.type===m?(y=nn(d.props.children,u.mode,y,d.key)).return=u:(aJ(y=nr(d.type,d.key,d.props,null,u.mode,y),d),y.return=u),u=y}return s(u);case p:e:{for(b=d.key;null!==c;){if(c.key===b)if(4===c.tag&&c.stateNode.containerInfo===d.containerInfo&&c.stateNode.implementation===d.implementation){r(u,c.sibling),(y=i(c,d.children||[])).return=u,u=y;break e}else{r(u,c);break}t(u,c),c=c.sibling}(y=na(d,u.mode,y)).return=u,u=y}return s(u);case _:return l(u,c,d=(b=d._init)(d._payload),y)}if(R(d))return function(i,s,o,l){for(var u=null,c=null,d=s,f=s=0,p=null;null!==d&&f<o.length;f++){d.index>f?(p=d,d=null):p=d.sibling;var m=g(i,d,o[f],l);if(null===m){null===d&&(d=p);break}e&&d&&null===m.alternate&&t(i,d),s=a(m,s,f),null===c?u=m:c.sibling=m,c=m,d=p}if(f===o.length)return r(i,d),nS&&nm(i,f),u;if(null===d){for(;f<o.length;f++)null!==(d=h(i,o[f],l))&&(s=a(d,s,f),null===c?u=d:c.sibling=d,c=d);return nS&&nm(i,f),u}for(d=n(d);f<o.length;f++)null!==(p=v(d,i,f,o[f],l))&&(e&&null!==p.alternate&&d.delete(null===p.key?f:p.key),s=a(p,s,f),null===c?u=p:c.sibling=p,c=p);return e&&d.forEach(function(e){return t(i,e)}),nS&&nm(i,f),u}(u,c,d,y);if(P(d)){if("function"!=typeof(b=P(d)))throw Error(o(150));return function(i,s,l,u){if(null==l)throw Error(o(151));for(var c=null,d=null,f=s,p=s=0,m=null,y=l.next();null!==f&&!y.done;p++,y=l.next()){f.index>p?(m=f,f=null):m=f.sibling;var b=g(i,f,y.value,u);if(null===b){null===f&&(f=m);break}e&&f&&null===b.alternate&&t(i,f),s=a(b,s,p),null===d?c=b:d.sibling=b,d=b,f=m}if(y.done)return r(i,f),nS&&nm(i,p),c;if(null===f){for(;!y.done;p++,y=l.next())null!==(y=h(i,y.value,u))&&(s=a(y,s,p),null===d?c=y:d.sibling=y,d=y);return nS&&nm(i,p),c}for(f=n(f);!y.done;p++,y=l.next())null!==(y=v(f,i,p,y.value,u))&&(e&&null!==y.alternate&&f.delete(null===y.key?p:y.key),s=a(y,s,p),null===d?c=y:d.sibling=y,d=y);return e&&f.forEach(function(e){return t(i,e)}),nS&&nm(i,p),c}(u,c,d=b.call(d),y)}if("function"==typeof d.then)return l(u,c,aY(d),y);if(d.$$typeof===w)return l(u,c,nB(u,d),y);aX(u,d)}return"string"==typeof d&&""!==d||"number"==typeof d||"bigint"==typeof d?(d=""+d,null!==c&&6===c.tag?(r(u,c.sibling),(y=i(c,d)).return=u):(r(u,c),(y=ni(d,u.mode,y)).return=u),s(u=y)):r(u,c)}(l,u,c,d);return aG=null,y}catch(e){if(e===n8||e===n9)throw e;var b=r7(29,e,null,l.mode);return b.lanes=d,b.return=l,b}finally{}}}var a1=a0(!0),a2=a0(!1),a3=j(null),a4=null;function a6(e){var t=e.alternate;U(a9,1&a9.current),U(a3,e),null===a4&&(null===t||null!==iS.current?a4=e:null!==t.memoizedState&&(a4=e))}function a5(e){if(22===e.tag){if(U(a9,a9.current),U(a3,e),null===a4){var t=e.alternate;null!==t&&null!==t.memoizedState&&(a4=e)}}else a8(e)}function a8(){U(a9,a9.current),U(a3,a3.current)}function a7(e){D(a3),a4===e&&(a4=null),D(a9)}var a9=j(0);function se(e){for(var t=e;null!==t;){if(13===t.tag){var r=t.memoizedState;if(null!==r&&(null===(r=r.dehydrated)||"$?"===r.data||uv(r)))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}function st(e,t,r,n){r=null==(r=r(n,t=e.memoizedState))?t:d({},t,r),e.memoizedState=r,0===e.lanes&&(e.updateQueue.baseState=r)}var sr={enqueueSetState:function(e,t,r){e=e._reactInternals;var n=o4(),i=id(n);i.payload=t,null!=r&&(i.callback=r),null!==(t=ih(e,i,n))&&(o5(t,e,n),ip(t,e,n))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=o4(),i=id(n);i.tag=1,i.payload=t,null!=r&&(i.callback=r),null!==(t=ih(e,i,n))&&(o5(t,e,n),ip(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=o4(),n=id(r);n.tag=2,null!=t&&(n.callback=t),null!==(t=ih(e,n,r))&&(o5(t,e,r),ip(t,e,r))}};function sn(e,t,r,n,i,a,s){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(n,a,s):!t.prototype||!t.prototype.isPureReactComponent||!rE(r,n)||!rE(i,a)}function si(e,t,r,n){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(r,n),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&sr.enqueueReplaceState(t,t.state,null)}function sa(e,t){var r=t;if("ref"in t)for(var n in r={},t)"ref"!==n&&(r[n]=t[n]);if(e=e.defaultProps)for(var i in r===t&&(r=d({},r)),e)void 0===r[i]&&(r[i]=e[i]);return r}var ss="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)};function so(e){ss(e)}function sl(e){console.error(e)}function su(e){ss(e)}function sc(e,t){try{(0,e.onUncaughtError)(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function sd(e,t,r){try{(0,e.onCaughtError)(r.value,{componentStack:r.stack,errorBoundary:1===t.tag?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function sh(e,t,r){return(r=id(r)).tag=3,r.payload={element:null},r.callback=function(){sc(e,t)},r}function sf(e){return(e=id(e)).tag=3,e}function sp(e,t,r,n){var i=r.type.getDerivedStateFromError;if("function"==typeof i){var a=n.value;e.payload=function(){return i(a)},e.callback=function(){sd(t,r,n)}}var s=r.stateNode;null!==s&&"function"==typeof s.componentDidCatch&&(e.callback=function(){sd(t,r,n),"function"!=typeof i&&(null===oG?oG=new Set([this]):oG.add(this));var e=n.stack;this.componentDidCatch(n.value,{componentStack:null!==e?e:""})})}var sm=Error(o(461)),sg=!1;function sv(e,t,r,n){t.child=null===e?a2(t,null,r,n):a1(t,e.child,r,n)}function sy(e,t,r,n,i){r=r.render;var a=t.ref;if("ref"in n){var s={};for(var o in n)"ref"!==o&&(s[o]=n[o])}else s=n;return(nV(t),n=iU(e,t,r,s,a,i),o=iB(),null===e||sg)?(nS&&o&&nv(t),t.flags|=1,sv(e,t,n,i),t.child):(iH(e,t,i),sD(e,t,i))}function sb(e,t,r,n,i){if(null===e){var a=r.type;return"function"!=typeof a||r9(a)||void 0!==a.defaultProps||null!==r.compare?((e=nr(r.type,null,n,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,sw(e,t,a,n,i))}if(a=e.child,!sU(e,i)){var s=a.memoizedProps;if((r=null!==(r=r.compare)?r:rE)(s,n)&&e.ref===t.ref)return sD(e,t,i)}return t.flags|=1,(e=ne(a,n)).ref=t.ref,e.return=t,t.child=e}function sw(e,t,r,n,i){if(null!==e){var a=e.memoizedProps;if(rE(a,n)&&e.ref===t.ref)if(sg=!1,t.pendingProps=n=a,!sU(e,i))return t.lanes=e.lanes,sD(e,t,i);else 0!=(131072&e.flags)&&(sg=!0)}return sx(e,t,r,n,i)}function sS(e,t,r){var n=t.pendingProps,i=n.children,a=null!==e?e.memoizedState:null;if("hidden"===n.mode){if(0!=(128&t.flags)){if(n=null!==a?a.baseLanes|r:r,null!==e){for(a=0,i=t.child=e.child;null!==i;)a=a|i.lanes|i.childLanes,i=i.sibling;t.childLanes=a&~n}else t.childLanes=0,t.child=null;return sk(e,t,n,r)}if(0==(0x20000000&r))return t.lanes=t.childLanes=0x20000000,sk(e,t,null!==a?a.baseLanes|r:r,r);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&n6(t,null!==a?a.cachePool:null),null!==a?iE(t,a):ix(),a5(t)}else null!==a?(n6(t,a.cachePool),iE(t,a),a8(t),t.memoizedState=null):(null!==e&&n6(t,null),ix(),a8(t));return sv(e,t,i,r),t.child}function sk(e,t,r,n){var i=n4();return t.memoizedState={baseLanes:r,cachePool:i=null===i?null:{parent:nG._currentValue,pool:i}},null!==e&&n6(t,null),ix(),a5(t),null!==e&&nU(e,t,n,!0),null}function sE(e,t){var r=t.ref;if(null===r)null!==e&&null!==e.ref&&(t.flags|=4194816);else{if("function"!=typeof r&&"object"!=typeof r)throw Error(o(284));(null===e||e.ref!==r)&&(t.flags|=4194816)}}function sx(e,t,r,n,i){return(nV(t),r=iU(e,t,r,n,void 0,i),n=iB(),null===e||sg)?(nS&&n&&nv(t),t.flags|=1,sv(e,t,r,i),t.child):(iH(e,t,i),sD(e,t,i))}function s_(e,t,r,n,i,a){return(nV(t),t.updateQueue=null,r=iV(t,n,r,i),iz(e),n=iB(),null===e||sg)?(nS&&n&&nv(t),t.flags|=1,sv(e,t,r,a),t.child):(iH(e,t,a),sD(e,t,a))}function sC(e,t,r,n,i){if(nV(t),null===t.stateNode){var a=r5,s=r.contextType;"object"==typeof s&&null!==s&&(a=n$(s)),t.memoizedState=null!==(a=new r(n,a)).state&&void 0!==a.state?a.state:null,a.updater=sr,t.stateNode=a,a._reactInternals=t,(a=t.stateNode).props=n,a.state=t.memoizedState,a.refs={},iu(t),s=r.contextType,a.context="object"==typeof s&&null!==s?n$(s):r5,a.state=t.memoizedState,"function"==typeof(s=r.getDerivedStateFromProps)&&(st(t,r,s,n),a.state=t.memoizedState),"function"==typeof r.getDerivedStateFromProps||"function"==typeof a.getSnapshotBeforeUpdate||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||(s=a.state,"function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),s!==a.state&&sr.enqueueReplaceState(a,a.state,null),iy(t,n,a,i),iv(),a.state=t.memoizedState),"function"==typeof a.componentDidMount&&(t.flags|=4194308),n=!0}else if(null===e){a=t.stateNode;var o=t.memoizedProps,l=sa(r,o);a.props=l;var u=a.context,c=r.contextType;s=r5,"object"==typeof c&&null!==c&&(s=n$(c));var d=r.getDerivedStateFromProps;c="function"==typeof d||"function"==typeof a.getSnapshotBeforeUpdate,o=t.pendingProps!==o,c||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(o||u!==s)&&si(t,a,n,s),il=!1;var h=t.memoizedState;a.state=h,iy(t,n,a,i),iv(),u=t.memoizedState,o||h!==u||il?("function"==typeof d&&(st(t,r,d,n),u=t.memoizedState),(l=il||sn(t,r,l,n,h,u,s))?(c||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=u),a.props=n,a.state=u,a.context=s,n=l):("function"==typeof a.componentDidMount&&(t.flags|=4194308),n=!1)}else{a=t.stateNode,ic(e,t),c=sa(r,s=t.memoizedProps),a.props=c,d=t.pendingProps,h=a.context,u=r.contextType,l=r5,"object"==typeof u&&null!==u&&(l=n$(u)),(u="function"==typeof(o=r.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||h!==l)&&si(t,a,n,l),il=!1,h=t.memoizedState,a.state=h,iy(t,n,a,i),iv();var f=t.memoizedState;s!==d||h!==f||il||null!==e&&null!==e.dependencies&&nz(e.dependencies)?("function"==typeof o&&(st(t,r,o,n),f=t.memoizedState),(c=il||sn(t,r,c,n,h,f,l)||null!==e&&null!==e.dependencies&&nz(e.dependencies))?(u||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(n,f,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(n,f,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=f),a.props=n,a.state=f,a.context=l,n=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),n=!1)}return a=n,sE(e,t),n=0!=(128&t.flags),a||n?(a=t.stateNode,r=n&&"function"!=typeof r.getDerivedStateFromError?null:a.render(),t.flags|=1,null!==e&&n?(t.child=a1(t,e.child,null,i),t.child=a1(t,null,r,i)):sv(e,t,r,i),t.memoizedState=a.state,e=t.child):e=sD(e,t,i),e}function sI(e,t,r,n){return nP(),t.flags|=256,sv(e,t,r,n),t.child}var sT={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function sP(e){return{baseLanes:e,cachePool:n5()}}function sA(e,t,r){return e=null!==e?e.childLanes&~r:0,t&&(e|=oz),e}function sR(e,t,r){var n,i=t.pendingProps,a=!1,s=0!=(128&t.flags);if((n=s)||(n=(null===e||null!==e.memoizedState)&&0!=(2&a9.current)),n&&(a=!0,t.flags&=-129),n=0!=(32&t.flags),t.flags&=-33,null===e){if(nS){if(a?a6(t):a8(t),nS){var l,u=nw;if(l=u){r:{for(l=u,u=nE;8!==l.nodeType;)if(!u||null===(l=uy(l.nextSibling))){u=null;break r}u=l}null!==u?(t.memoizedState={dehydrated:u,treeContext:null!==nh?{id:nf,overflow:np}:null,retryLane:0x20000000,hydrationErrors:null},(l=r7(18,null,null,0)).stateNode=u,l.return=t,t.child=l,nb=t,nw=null,l=!0):l=!1}l||n_(t)}if(null!==(u=t.memoizedState)&&null!==(u=u.dehydrated))return uv(u)?t.lanes=32:t.lanes=0x20000000,null;a7(t)}return(u=i.children,i=i.fallback,a)?(a8(t),u=sO({mode:"hidden",children:u},a=t.mode),i=nn(i,a,r,null),u.return=t,i.return=t,u.sibling=i,t.child=u,(a=t.child).memoizedState=sP(r),a.childLanes=sA(e,n,r),t.memoizedState=sT,i):(a6(t),sN(t,u))}if(null!==(l=e.memoizedState)&&null!==(u=l.dehydrated)){if(s)256&t.flags?(a6(t),t.flags&=-257,t=sL(e,t,r)):null!==t.memoizedState?(a8(t),t.child=e.child,t.flags|=128,t=null):(a8(t),a=i.fallback,u=t.mode,i=sO({mode:"visible",children:i.children},u),a=nn(a,u,r,null),a.flags|=2,i.return=t,a.return=t,i.sibling=a,t.child=i,a1(t,e.child,null,r),(i=t.child).memoizedState=sP(r),i.childLanes=sA(e,n,r),t.memoizedState=sT,t=a);else if(a6(t),uv(u)){if(n=u.nextSibling&&u.nextSibling.dataset)var c=n.dgst;n=c,(i=Error(o(419))).stack="",i.digest=n,nR({value:i,source:null,stack:null}),t=sL(e,t,r)}else if(sg||nU(e,t,r,!1),n=0!=(r&e.childLanes),sg||n){if(null!==(n=oI)&&0!==(i=0!=((i=0!=(42&(i=r&-r))?1:e_(i))&(n.suspendedLanes|r))?0:i)&&i!==l.retryLane)throw l.retryLane=i,r3(e,i),o5(n,e,i),sm;"$?"===u.data||ls(),t=sL(e,t,r)}else"$?"===u.data?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,nw=uy(u.nextSibling),nb=t,nS=!0,nk=null,nE=!1,null!==e&&(nc[nd++]=nf,nc[nd++]=np,nc[nd++]=nh,nf=e.id,np=e.overflow,nh=t),t=sN(t,i.children),t.flags|=4096);return t}return a?(a8(t),a=i.fallback,u=t.mode,c=(l=e.child).sibling,(i=ne(l,{mode:"hidden",children:i.children})).subtreeFlags=0x3e00000&l.subtreeFlags,null!==c?a=ne(c,a):(a=nn(a,u,r,null),a.flags|=2),a.return=t,i.return=t,i.sibling=a,t.child=i,i=a,a=t.child,null===(u=e.child.memoizedState)?u=sP(r):(null!==(l=u.cachePool)?(c=nG._currentValue,l=l.parent!==c?{parent:c,pool:c}:l):l=n5(),u={baseLanes:u.baseLanes|r,cachePool:l}),a.memoizedState=u,a.childLanes=sA(e,n,r),t.memoizedState=sT,i):(a6(t),e=(r=e.child).sibling,(r=ne(r,{mode:"visible",children:i.children})).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 sN(e,t){return(t=sO({mode:"visible",children:t},e.mode)).return=e,e.child=t}function sO(e,t){return(e=r7(22,e,null,t)).lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function sL(e,t,r){return a1(t,e.child,null,r),e=sN(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function sM(e,t,r){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),nj(e.return,t,r)}function sF(e,t,r,n,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=n,a.tail=r,a.tailMode=i)}function sj(e,t,r){var n=t.pendingProps,i=n.revealOrder,a=n.tail;if(sv(e,t,n.children,r),0!=(2&(n=a9.current)))n=1&n|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&&sM(e,r,t);else if(19===e.tag)sM(e,r,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}n&=1}switch(U(a9,n),i){case"forwards":for(i=null,r=t.child;null!==r;)null!==(e=r.alternate)&&null===se(e)&&(i=r),r=r.sibling;null===(r=i)?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null),sF(t,!1,i,r,a);break;case"backwards":for(r=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===se(e)){t.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}sF(t,!0,r,null,a);break;case"together":sF(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function sD(e,t,r){if(null!==e&&(t.dependencies=e.dependencies),oj|=t.lanes,0==(r&t.childLanes)){if(null===e)return null;else if(nU(e,t,r,!1),0==(r&t.childLanes))return null}if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(r=ne(e=t.child,e.pendingProps),t.child=r,r.return=t;null!==e.sibling;)e=e.sibling,(r=r.sibling=ne(e,e.pendingProps)).return=t;r.sibling=null}return t.child}function sU(e,t){return 0!=(e.lanes&t)||!!(null!==(e=e.dependencies)&&nz(e))}function sz(e,t,r){if(null!==e)if(e.memoizedProps!==t.pendingProps)sg=!0;else{if(!sU(e,r)&&0==(128&t.flags))return sg=!1,function(e,t,r){switch(t.tag){case 3:H(t,t.stateNode.containerInfo),nM(t,nG,e.memoizedState.cache),nP();break;case 27:case 5:q(t);break;case 4:H(t,t.stateNode.containerInfo);break;case 10:nM(t,t.type,t.memoizedProps.value);break;case 13:var n=t.memoizedState;if(null!==n){if(null!==n.dehydrated)return a6(t),t.flags|=128,null;if(0!=(r&t.child.childLanes))return sR(e,t,r);return a6(t),null!==(e=sD(e,t,r))?e.sibling:null}a6(t);break;case 19:var i=0!=(128&e.flags);if((n=0!=(r&t.childLanes))||(nU(e,t,r,!1),n=0!=(r&t.childLanes)),i){if(n)return sj(e,t,r);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),U(a9,a9.current),!n)return null;break;case 22:case 23:return t.lanes=0,sS(e,t,r);case 24:nM(t,nG,e.memoizedState.cache)}return sD(e,t,r)}(e,t,r);sg=0!=(131072&e.flags)}else sg=!1,nS&&0!=(1048576&t.flags)&&ng(t,nu,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var n=t.elementType,i=n._init;if(n=i(n._payload),t.type=n,"function"==typeof n)r9(n)?(e=sa(n,e),t.tag=1,t=sC(null,t,n,e,r)):(t.tag=0,t=sx(null,t,n,e,r));else{if(null!=n){if((i=n.$$typeof)===S){t.tag=11,t=sy(null,t,n,e,r);break e}else if(i===x){t.tag=14,t=sb(null,t,n,e,r);break e}}throw Error(o(306,t=function e(t){if(null==t)return null;if("function"==typeof t)return t.$$typeof===A?null:t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case m:return"Fragment";case v:return"Profiler";case g:return"StrictMode";case k:return"Suspense";case E:return"SuspenseList";case C:return"Activity"}if("object"==typeof t)switch(t.$$typeof){case p:return"Portal";case w:return(t.displayName||"Context")+".Provider";case b:return(t._context.displayName||"Context")+".Consumer";case S:var r=t.render;return(t=t.displayName)||(t=""!==(t=r.displayName||r.name||"")?"ForwardRef("+t+")":"ForwardRef"),t;case x:return null!==(r=t.displayName||null)?r:e(t.type)||"Memo";case _:r=t._payload,t=t._init;try{return e(t(r))}catch(e){}}return null}(n)||n,""))}}return t;case 0:return sx(e,t,t.type,t.pendingProps,r);case 1:return i=sa(n=t.type,t.pendingProps),sC(e,t,n,i,r);case 3:e:{if(H(t,t.stateNode.containerInfo),null===e)throw Error(o(387));n=t.pendingProps;var a=t.memoizedState;i=a.element,ic(e,t),iy(t,n,null,r);var s=t.memoizedState;if(nM(t,nG,n=s.cache),n!==a.cache&&nD(t,[nG],r,!0),iv(),n=s.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=sI(e,t,n,r);break e}else if(n!==i){nR(i=rY(Error(o(424)),t)),t=sI(e,t,n,r);break e}else for(nw=uy((e=9===(e=t.stateNode.containerInfo).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e).firstChild),nb=t,nS=!0,nk=null,nE=!0,r=a2(t,null,n,r),t.child=r;r;)r.flags=-3&r.flags|4096,r=r.sibling;else{if(nP(),n===i){t=sD(e,t,r);break e}sv(e,t,n,r)}t=t.child}return t;case 26:return sE(e,t),null===e?(r=uP(t.type,null,t.pendingProps,null))?t.memoizedState=r:nS||(r=t.type,e=t.pendingProps,(n=ui($.current).createElement(r))[eP]=t,n[eA]=e,ut(n,r,e),e$(n),t.stateNode=n):t.memoizedState=uP(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return q(t),null===e&&nS&&(n=t.stateNode=uS(t.type,t.pendingProps,$.current),nb=t,nE=!0,i=nw,up(t.type)?(ub=i,nw=uy(n.firstChild)):nw=i),sv(e,t,t.pendingProps.children,r),sE(e,t),null===e&&(t.flags|=4194304),t.child;case 5:return null===e&&nS&&((i=n=nw)&&(null!==(n=function(e,t,r,n){for(;1===e.nodeType;){if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&("INPUT"!==e.nodeName||"hidden"!==e.type))break}else if(n){if(!e[eF])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if("stylesheet"===(i=e.getAttribute("rel"))&&e.hasAttribute("data-precedence")||i!==r.rel||e.getAttribute("href")!==(null==r.href||""===r.href?null:r.href)||e.getAttribute("crossorigin")!==(null==r.crossOrigin?null:r.crossOrigin)||e.getAttribute("title")!==(null==r.title?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(((i=e.getAttribute("src"))!==(null==r.src?null:r.src)||e.getAttribute("type")!==(null==r.type?null:r.type)||e.getAttribute("crossorigin")!==(null==r.crossOrigin?null:r.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else{if("input"!==t||"hidden"!==e.type)return e;var i=null==r.name?null:""+r.name;if("hidden"===r.type&&e.getAttribute("name")===i)return e}if(null===(e=uy(e.nextSibling)))break}return null}(n,t.type,t.pendingProps,nE))?(t.stateNode=n,nb=t,nw=uy(n.firstChild),nE=!1,i=!0):i=!1),i||n_(t)),q(t),i=t.type,a=t.pendingProps,s=null!==e?e.memoizedProps:null,n=a.children,uo(i,a)?n=null:null!==s&&uo(i,s)&&(t.flags|=32),null!==t.memoizedState&&(uQ._currentValue=i=iU(e,t,i$,null,null,r)),sE(e,t),sv(e,t,n,r),t.child;case 6:return null===e&&nS&&((e=r=nw)&&(null!==(r=function(e,t,r){if(""===t)return null;for(;3!==e.nodeType;)if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!r||null===(e=uy(e.nextSibling)))return null;return e}(r,t.pendingProps,nE))?(t.stateNode=r,nb=t,nw=null,e=!0):e=!1),e||n_(t)),null;case 13:return sR(e,t,r);case 4:return H(t,t.stateNode.containerInfo),n=t.pendingProps,null===e?t.child=a1(t,null,n,r):sv(e,t,n,r),t.child;case 11:return sy(e,t,t.type,t.pendingProps,r);case 7:return sv(e,t,t.pendingProps,r),t.child;case 8:case 12:return sv(e,t,t.pendingProps.children,r),t.child;case 10:return n=t.pendingProps,nM(t,t.type,n.value),sv(e,t,n.children,r),t.child;case 9:return i=t.type._context,n=t.pendingProps.children,nV(t),n=n(i=n$(i)),t.flags|=1,sv(e,t,n,r),t.child;case 14:return sb(e,t,t.type,t.pendingProps,r);case 15:return sw(e,t,t.type,t.pendingProps,r);case 19:return sj(e,t,r);case 31:return n=t.pendingProps,r=t.mode,n={mode:n.mode,children:n.children},null===e?(r=sO(n,r)).ref=t.ref:(r=ne(e.child,n)).ref=t.ref,t.child=r,r.return=t,t=r;case 22:return sS(e,t,r);case 24:return nV(t),n=n$(nG),null===e?(null===(i=n4())&&(i=oI,a=nQ(),i.pooledCache=a,a.refCount++,null!==a&&(i.pooledCacheLanes|=r),i=a),t.memoizedState={parent:n,cache:i},iu(t),nM(t,nG,i)):(0!=(e.lanes&r)&&(ic(e,t),iy(t,null,null,r),iv()),i=e.memoizedState,a=t.memoizedState,i.parent!==n?(i={parent:n,cache:n},t.memoizedState=i,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=i),nM(t,nG,n)):(nM(t,nG,n=a.cache),n!==i.cache&&nD(t,[nG],r,!0))),sv(e,t,t.pendingProps.children,r),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function sV(e){e.flags|=4}function s$(e,t){if("stylesheet"!==t.type||0!=(4&t.state.loading))e.flags&=-0x1000001;else if(e.flags|=0x1000000,!u$(t)){if(null!==(t=a3.current)&&((4194048&oP)===oP?null!==a4:(0x3c00000&oP)!==oP&&0==(0x20000000&oP)||t!==a4))throw ia=ie,n7;e.flags|=8192}}function sB(e,t){null!==t&&(e.flags|=4),16384&e.flags&&(t=22!==e.tag?ew():0x20000000,e.lanes|=t,oV|=t)}function sH(e,t){if(!nS)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;null!==t;)null!==t.alternate&&(r=t),t=t.sibling;null===r?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;null!==r;)null!==r.alternate&&(n=r),r=r.sibling;null===n?t||null===e.tail?e.tail=null:e.tail.sibling=null:n.sibling=null}}function sW(e){var t=null!==e.alternate&&e.alternate.child===e.child,r=0,n=0;if(t)for(var i=e.child;null!==i;)r|=i.lanes|i.childLanes,n|=0x3e00000&i.subtreeFlags,n|=0x3e00000&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function sq(e,t){switch(ny(t),t.tag){case 3:nF(nG),W();break;case 26:case 27:case 5:K(t);break;case 4:W();break;case 13:a7(t);break;case 19:D(a9);break;case 10:nF(t.type);break;case 22:case 23:a7(t),i_(),null!==e&&D(n3);break;case 24:nF(nG)}}function sK(e,t){try{var r=t.updateQueue,n=null!==r?r.lastEffect:null;if(null!==n){var i=n.next;r=i;do{if((r.tag&e)===e){n=void 0;var a=r.create;r.inst.destroy=n=a()}r=r.next}while(r!==i)}}catch(e){lS(t,t.return,e)}}function sG(e,t,r){try{var n=t.updateQueue,i=null!==n?n.lastEffect:null;if(null!==i){var a=i.next;n=a;do{if((n.tag&e)===e){var s=n.inst,o=s.destroy;if(void 0!==o){s.destroy=void 0,i=t;try{o()}catch(e){lS(i,r,e)}}}n=n.next}while(n!==a)}}catch(e){lS(t,t.return,e)}}function sQ(e){var t=e.updateQueue;if(null!==t){var r=e.stateNode;try{iw(t,r)}catch(t){lS(e,e.return,t)}}}function sY(e,t,r){r.props=sa(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(r){lS(e,t,r)}}function sJ(e,t){try{var r=e.ref;if(null!==r){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;default:n=e.stateNode}"function"==typeof r?e.refCleanup=r(n):r.current=n}}catch(r){lS(e,t,r)}}function sX(e,t){var r=e.ref,n=e.refCleanup;if(null!==r)if("function"==typeof n)try{n()}catch(r){lS(e,t,r)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof r)try{r(null)}catch(r){lS(e,t,r)}else r.current=null}function sZ(e){var t=e.type,r=e.memoizedProps,n=e.stateNode;try{switch(t){case"button":case"input":case"select":case"textarea":r.autoFocus&&n.focus();break;case"img":r.src?n.src=r.src:r.srcSet&&(n.srcset=r.srcSet)}}catch(t){lS(e,e.return,t)}}function s0(e,t,r){try{var n=e.stateNode;(function(e,t,r,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,a=null,s=null,l=null,u=null,c=null,d=null;for(p in r){var h=r[p];if(r.hasOwnProperty(p)&&null!=h)switch(p){case"checked":case"value":break;case"defaultValue":u=h;default:n.hasOwnProperty(p)||l9(e,t,p,null,n,h)}}for(var f in n){var p=n[f];if(h=r[f],n.hasOwnProperty(f)&&(null!=p||null!=h))switch(f){case"type":a=p;break;case"name":i=p;break;case"checked":c=p;break;case"defaultChecked":d=p;break;case"value":s=p;break;case"defaultValue":l=p;break;case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(o(137,t));break;default:p!==h&&l9(e,t,f,p,n,h)}}te(e,s,l,u,c,d,a,i);return;case"select":for(a in p=s=l=f=null,r)if(u=r[a],r.hasOwnProperty(a)&&null!=u)switch(a){case"value":break;case"multiple":p=u;default:n.hasOwnProperty(a)||l9(e,t,a,null,n,u)}for(i in n)if(a=n[i],u=r[i],n.hasOwnProperty(i)&&(null!=a||null!=u))switch(i){case"value":f=a;break;case"defaultValue":l=a;break;case"multiple":s=a;default:a!==u&&l9(e,t,i,a,n,u)}t=l,r=s,n=p,null!=f?tn(e,!!r,f,!1):!!n!=!!r&&(null!=t?tn(e,!!r,t,!0):tn(e,!!r,r?[]:"",!1));return;case"textarea":for(l in p=f=null,r)if(i=r[l],r.hasOwnProperty(l)&&null!=i&&!n.hasOwnProperty(l))switch(l){case"value":case"children":break;default:l9(e,t,l,null,n,i)}for(s in n)if(i=n[s],a=r[s],n.hasOwnProperty(s)&&(null!=i||null!=a))switch(s){case"value":f=i;break;case"defaultValue":p=i;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=i)throw Error(o(91));break;default:i!==a&&l9(e,t,s,i,n,a)}ti(e,f,p);return;case"option":for(var m in r)f=r[m],r.hasOwnProperty(m)&&null!=f&&!n.hasOwnProperty(m)&&("selected"===m?e.selected=!1:l9(e,t,m,null,n,f));for(u in n)f=n[u],p=r[u],n.hasOwnProperty(u)&&f!==p&&(null!=f||null!=p)&&("selected"===u?e.selected=f&&"function"!=typeof f&&"symbol"!=typeof f:l9(e,t,u,f,n,p));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var g in r)f=r[g],r.hasOwnProperty(g)&&null!=f&&!n.hasOwnProperty(g)&&l9(e,t,g,null,n,f);for(c in n)if(f=n[c],p=r[c],n.hasOwnProperty(c)&&f!==p&&(null!=f||null!=p))switch(c){case"children":case"dangerouslySetInnerHTML":if(null!=f)throw Error(o(137,t));break;default:l9(e,t,c,f,n,p)}return;default:if(tc(t)){for(var v in r)f=r[v],r.hasOwnProperty(v)&&void 0!==f&&!n.hasOwnProperty(v)&&ue(e,t,v,void 0,n,f);for(d in n)f=n[d],p=r[d],n.hasOwnProperty(d)&&f!==p&&(void 0!==f||void 0!==p)&&ue(e,t,d,f,n,p);return}}for(var y in r)f=r[y],r.hasOwnProperty(y)&&null!=f&&!n.hasOwnProperty(y)&&l9(e,t,y,null,n,f);for(h in n)f=n[h],p=r[h],n.hasOwnProperty(h)&&f!==p&&(null!=f||null!=p)&&l9(e,t,h,f,n,p)})(n,e.type,r,t),n[eA]=t}catch(t){lS(e,e.return,t)}}function s1(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag&&up(e.type)||4===e.tag}function s2(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||s1(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(27===e.tag&&up(e.type)||2&e.flags||null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function s3(e,t,r){var n=e.tag;if(5===n||6===n)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(4!==n&&(27===n&&up(e.type)&&(r=e.stateNode),null!==(e=e.child)))for(s3(e,t,r),e=e.sibling;null!==e;)s3(e,t,r),e=e.sibling}function s4(e){var t=e.stateNode,r=e.memoizedProps;try{for(var n=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);ut(t,n,r),t[eP]=e,t[eA]=r}catch(t){lS(e,e.return,t)}}var s6=!1,s5=!1,s8=!1,s7="function"==typeof WeakSet?WeakSet:Set,s9=null;function oe(e,t,r){var n=r.flags;switch(r.tag){case 0:case 11:case 15:od(e,r),4&n&&sK(5,r);break;case 1:if(od(e,r),4&n)if(e=r.stateNode,null===t)try{e.componentDidMount()}catch(e){lS(r,r.return,e)}else{var i=sa(r.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){lS(r,r.return,e)}}64&n&&sQ(r),512&n&&sJ(r,r.return);break;case 3:if(od(e,r),64&n&&null!==(e=r.updateQueue)){if(t=null,null!==r.child)switch(r.child.tag){case 27:case 5:case 1:t=r.child.stateNode}try{iw(e,t)}catch(e){lS(r,r.return,e)}}break;case 27:null===t&&4&n&&s4(r);case 26:case 5:od(e,r),null===t&&4&n&&sZ(r),512&n&&sJ(r,r.return);break;case 12:default:od(e,r);break;case 13:od(e,r),4&n&&oa(e,r),64&n&&null!==(e=r.memoizedState)&&null!==(e=e.dehydrated)&&function(e,t){var r=e.ownerDocument;if("$?"!==e.data||"complete"===r.readyState)t();else{var n=function(){t(),r.removeEventListener("DOMContentLoaded",n)};r.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}(e,r=l_.bind(null,r));break;case 22:if(!(n=null!==r.memoizedState||s6)){t=null!==t&&null!==t.memoizedState||s5,i=s6;var a=s5;s6=n,(s5=t)&&!a?function e(t,r,n){for(n=n&&0!=(8772&r.subtreeFlags),r=r.child;null!==r;){var i=r.alternate,a=t,s=r,o=s.flags;switch(s.tag){case 0:case 11:case 15:e(a,s,n),sK(4,s);break;case 1:if(e(a,s,n),"function"==typeof(a=(i=s).stateNode).componentDidMount)try{a.componentDidMount()}catch(e){lS(i,i.return,e)}if(null!==(a=(i=s).updateQueue)){var l=i.stateNode;try{var u=a.shared.hiddenCallbacks;if(null!==u)for(a.shared.hiddenCallbacks=null,a=0;a<u.length;a++)ib(u[a],l)}catch(e){lS(i,i.return,e)}}n&&64&o&&sQ(s),sJ(s,s.return);break;case 27:s4(s);case 26:case 5:e(a,s,n),n&&null===i&&4&o&&sZ(s),sJ(s,s.return);break;case 12:default:e(a,s,n);break;case 13:e(a,s,n),n&&4&o&&oa(a,s);break;case 22:null===s.memoizedState&&e(a,s,n),sJ(s,s.return);case 30:}r=r.sibling}}(e,r,0!=(8772&r.subtreeFlags)):od(e,r),s6=i,s5=a}case 30:}}var ot=null,or=!1;function on(e,t,r){for(r=r.child;null!==r;)oi(e,t,r),r=r.sibling}function oi(e,t,r){if(eu&&"function"==typeof eu.onCommitFiberUnmount)try{eu.onCommitFiberUnmount(el,r)}catch(e){}switch(r.tag){case 26:s5||sX(r,t),on(e,t,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode).parentNode.removeChild(r);break;case 27:s5||sX(r,t);var n=ot,i=or;up(r.type)&&(ot=r.stateNode,or=!1),on(e,t,r),uk(r.stateNode),ot=n,or=i;break;case 5:s5||sX(r,t);case 6:if(n=ot,i=or,ot=null,on(e,t,r),ot=n,or=i,null!==ot)if(or)try{(9===ot.nodeType?ot.body:"HTML"===ot.nodeName?ot.ownerDocument.body:ot).removeChild(r.stateNode)}catch(e){lS(r,t,e)}else try{ot.removeChild(r.stateNode)}catch(e){lS(r,t,e)}break;case 18:null!==ot&&(or?(um(9===(e=ot).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,r.stateNode),cg(e)):um(ot,r.stateNode));break;case 4:n=ot,i=or,ot=r.stateNode.containerInfo,or=!0,on(e,t,r),ot=n,or=i;break;case 0:case 11:case 14:case 15:s5||sG(2,r,t),s5||sG(4,r,t),on(e,t,r);break;case 1:s5||(sX(r,t),"function"==typeof(n=r.stateNode).componentWillUnmount&&sY(r,t,n)),on(e,t,r);break;case 21:default:on(e,t,r);break;case 22:s5=(n=s5)||null!==r.memoizedState,on(e,t,r),s5=n}}function oa(e,t){if(null===t.memoizedState&&null!==(e=t.alternate)&&null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))try{cg(e)}catch(e){lS(t,t.return,e)}}function os(e,t){var r=function(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new s7),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new s7),t;default:throw Error(o(435,e.tag))}}(e);t.forEach(function(t){var n=lC.bind(null,e,t);r.has(t)||(r.add(t),t.then(n,n))})}function oo(e,t){var r=t.deletions;if(null!==r)for(var n=0;n<r.length;n++){var i=r[n],a=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 27:if(up(l.type)){ot=l.stateNode,or=!1;break e}break;case 5:ot=l.stateNode,or=!1;break e;case 3:case 4:ot=l.stateNode.containerInfo,or=!0;break e}l=l.return}if(null===ot)throw Error(o(160));oi(a,s,i),ot=null,or=!1,null!==(a=i.alternate)&&(a.return=null),i.return=null}if(13878&t.subtreeFlags)for(t=t.child;null!==t;)ou(t,e),t=t.sibling}var ol=null;function ou(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:oo(t,e),oc(e),4&n&&(sG(3,e,e.return),sK(3,e),sG(5,e,e.return));break;case 1:oo(t,e),oc(e),512&n&&(s5||null===r||sX(r,r.return)),64&n&&s6&&null!==(e=e.updateQueue)&&null!==(n=e.callbacks)&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=null===r?n:r.concat(n));break;case 26:var i=ol;if(oo(t,e),oc(e),512&n&&(s5||null===r||sX(r,r.return)),4&n){var a=null!==r?r.memoizedState:null;if(n=e.memoizedState,null===r)if(null===n)if(null===e.stateNode){e:{n=e.type,r=e.memoizedProps,i=i.ownerDocument||i;t:switch(n){case"title":(!(a=i.getElementsByTagName("title")[0])||a[eF]||a[eP]||"http://www.w3.org/2000/svg"===a.namespaceURI||a.hasAttribute("itemprop"))&&(a=i.createElement(n),i.head.insertBefore(a,i.querySelector("head > title"))),ut(a,n,r),a[eP]=e,e$(a),n=a;break e;case"link":var s=uz("link","href",i).get(n+(r.href||""));if(s){for(var l=0;l<s.length;l++)if((a=s[l]).getAttribute("href")===(null==r.href||""===r.href?null:r.href)&&a.getAttribute("rel")===(null==r.rel?null:r.rel)&&a.getAttribute("title")===(null==r.title?null:r.title)&&a.getAttribute("crossorigin")===(null==r.crossOrigin?null:r.crossOrigin)){s.splice(l,1);break t}}ut(a=i.createElement(n),n,r),i.head.appendChild(a);break;case"meta":if(s=uz("meta","content",i).get(n+(r.content||""))){for(l=0;l<s.length;l++)if((a=s[l]).getAttribute("content")===(null==r.content?null:""+r.content)&&a.getAttribute("name")===(null==r.name?null:r.name)&&a.getAttribute("property")===(null==r.property?null:r.property)&&a.getAttribute("http-equiv")===(null==r.httpEquiv?null:r.httpEquiv)&&a.getAttribute("charset")===(null==r.charSet?null:r.charSet)){s.splice(l,1);break t}}ut(a=i.createElement(n),n,r),i.head.appendChild(a);break;default:throw Error(o(468,n))}a[eP]=e,e$(a),n=a}e.stateNode=n}else uV(i,e.type,e.stateNode);else e.stateNode=uM(i,n,e.memoizedProps);else a!==n?(null===a?null!==r.stateNode&&(r=r.stateNode).parentNode.removeChild(r):a.count--,null===n?uV(i,e.type,e.stateNode):uM(i,n,e.memoizedProps)):null===n&&null!==e.stateNode&&s0(e,e.memoizedProps,r.memoizedProps)}break;case 27:oo(t,e),oc(e),512&n&&(s5||null===r||sX(r,r.return)),null!==r&&4&n&&s0(e,e.memoizedProps,r.memoizedProps);break;case 5:if(oo(t,e),oc(e),512&n&&(s5||null===r||sX(r,r.return)),32&e.flags){i=e.stateNode;try{ts(i,"")}catch(t){lS(e,e.return,t)}}4&n&&null!=e.stateNode&&(i=e.memoizedProps,s0(e,i,null!==r?r.memoizedProps:i)),1024&n&&(s8=!0);break;case 6:if(oo(t,e),oc(e),4&n){if(null===e.stateNode)throw Error(o(162));n=e.memoizedProps,r=e.stateNode;try{r.nodeValue=n}catch(t){lS(e,e.return,t)}}break;case 3:if(uU=null,i=ol,ol=u_(t.containerInfo),oo(t,e),ol=i,oc(e),4&n&&null!==r&&r.memoizedState.isDehydrated)try{cg(t.containerInfo)}catch(t){lS(e,e.return,t)}s8&&(s8=!1,function e(t){if(1024&t.subtreeFlags)for(t=t.child;null!==t;){var r=t;e(r),5===r.tag&&1024&r.flags&&r.stateNode.reset(),t=t.sibling}}(e));break;case 4:n=ol,ol=u_(e.stateNode.containerInfo),oo(t,e),oc(e),ol=n;break;case 12:default:oo(t,e),oc(e);break;case 13:oo(t,e),oc(e),8192&e.child.flags&&null!==e.memoizedState!=(null!==r&&null!==r.memoizedState)&&(oW=Z()),4&n&&null!==(n=e.updateQueue)&&(e.updateQueue=null,os(e,n));break;case 22:i=null!==e.memoizedState;var u=null!==r&&null!==r.memoizedState,c=s6,d=s5;if(s6=c||i,s5=d||u,oo(t,e),s5=d,s6=c,oc(e),8192&n)e:for((t=e.stateNode)._visibility=i?-2&t._visibility:1|t._visibility,i&&(null===r||u||s6||s5||function e(t){for(t=t.child;null!==t;){var r=t;switch(r.tag){case 0:case 11:case 14:case 15:sG(4,r,r.return),e(r);break;case 1:sX(r,r.return);var n=r.stateNode;"function"==typeof n.componentWillUnmount&&sY(r,r.return,n),e(r);break;case 27:uk(r.stateNode);case 26:case 5:sX(r,r.return),e(r);break;case 22:null===r.memoizedState&&e(r);break;default:e(r)}t=t.sibling}}(e)),r=null,t=e;;){if(5===t.tag||26===t.tag){if(null===r){u=r=t;try{if(a=u.stateNode,i)s=a.style,"function"==typeof s.setProperty?s.setProperty("display","none","important"):s.display="none";else{l=u.stateNode;var h=u.memoizedProps.style,f=null!=h&&h.hasOwnProperty("display")?h.display:null;l.style.display=null==f||"boolean"==typeof f?"":(""+f).trim()}}catch(e){lS(u,u.return,e)}}}else if(6===t.tag){if(null===r){u=t;try{u.stateNode.nodeValue=i?"":u.memoizedProps}catch(e){lS(u,u.return,e)}}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&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)break e;r===t&&(r=null),t=t.return}r===t&&(r=null),t.sibling.return=t.return,t=t.sibling}4&n&&null!==(n=e.updateQueue)&&null!==(r=n.retryQueue)&&(n.retryQueue=null,os(e,r));break;case 19:oo(t,e),oc(e),4&n&&null!==(n=e.updateQueue)&&(e.updateQueue=null,os(e,n));case 30:case 21:}}function oc(e){var t=e.flags;if(2&t){try{for(var r,n=e.return;null!==n;){if(s1(n)){r=n;break}n=n.return}if(null==r)throw Error(o(160));switch(r.tag){case 27:var i=r.stateNode,a=s2(e);s3(e,a,i);break;case 5:var s=r.stateNode;32&r.flags&&(ts(s,""),r.flags&=-33);var l=s2(e);s3(e,l,s);break;case 3:case 4:var u=r.stateNode.containerInfo,c=s2(e);!function e(t,r,n){var i=t.tag;if(5===i||6===i)t=t.stateNode,r?(9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).insertBefore(t,r):((r=9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).appendChild(t),null!=(n=n._reactRootContainer)||null!==r.onclick||(r.onclick=l7));else if(4!==i&&(27===i&&up(t.type)&&(n=t.stateNode,r=null),null!==(t=t.child)))for(e(t,r,n),t=t.sibling;null!==t;)e(t,r,n),t=t.sibling}(e,c,u);break;default:throw Error(o(161))}}catch(t){lS(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function od(e,t){if(8772&t.subtreeFlags)for(t=t.child;null!==t;)oe(e,t.alternate,t),t=t.sibling}function oh(e,t){var r=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(r=e.memoizedState.cachePool.pool),e=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(e=t.memoizedState.cachePool.pool),e!==r&&(null!=e&&e.refCount++,null!=r&&nY(r))}function of(e,t){e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&nY(e))}function op(e,t,r,n){if(10256&t.subtreeFlags)for(t=t.child;null!==t;)om(e,t,r,n),t=t.sibling}function om(e,t,r,n){var i=t.flags;switch(t.tag){case 0:case 11:case 15:op(e,t,r,n),2048&i&&sK(9,t);break;case 1:case 13:default:op(e,t,r,n);break;case 3:op(e,t,r,n),2048&i&&(e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&nY(e)));break;case 12:if(2048&i){op(e,t,r,n),e=t.stateNode;try{var a=t.memoizedProps,s=a.id,o=a.onPostCommit;"function"==typeof o&&o(s,null===t.alternate?"mount":"update",e.passiveEffectDuration,-0)}catch(e){lS(t,t.return,e)}}else op(e,t,r,n);break;case 23:break;case 22:a=t.stateNode,s=t.alternate,null!==t.memoizedState?2&a._visibility?op(e,t,r,n):og(e,t):2&a._visibility?op(e,t,r,n):(a._visibility|=2,function e(t,r,n,i,a){for(a=a&&0!=(10256&r.subtreeFlags),r=r.child;null!==r;){var s=r,o=s.flags;switch(s.tag){case 0:case 11:case 15:e(t,s,n,i,a),sK(8,s);break;case 23:break;case 22:var l=s.stateNode;null!==s.memoizedState?2&l._visibility?e(t,s,n,i,a):og(t,s):(l._visibility|=2,e(t,s,n,i,a)),a&&2048&o&&oh(s.alternate,s);break;case 24:e(t,s,n,i,a),a&&2048&o&&of(s.alternate,s);break;default:e(t,s,n,i,a)}r=r.sibling}}(e,t,r,n,0!=(10256&t.subtreeFlags))),2048&i&&oh(s,t);break;case 24:op(e,t,r,n),2048&i&&of(t.alternate,t)}}function og(e,t){if(10256&t.subtreeFlags)for(t=t.child;null!==t;){var r=t,n=r.flags;switch(r.tag){case 22:og(e,r),2048&n&&oh(r.alternate,r);break;case 24:og(e,r),2048&n&&of(r.alternate,r);break;default:og(e,r)}t=t.sibling}}var ov=8192;function oy(e){if(e.subtreeFlags&ov)for(e=e.child;null!==e;)ob(e),e=e.sibling}function ob(e){switch(e.tag){case 26:oy(e),e.flags&ov&&null!==e.memoizedState&&function(e,t,r){if(null===uB)throw Error(o(475));var n=uB;if("stylesheet"===t.type&&("string"!=typeof r.media||!1!==matchMedia(r.media).matches)&&0==(4&t.state.loading)){if(null===t.instance){var i=uA(r.href),a=e.querySelector(uR(i));if(a){null!==(e=a._p)&&"object"==typeof e&&"function"==typeof e.then&&(n.count++,n=uW.bind(n),e.then(n,n)),t.state.loading|=4,t.instance=a,e$(a);return}a=e.ownerDocument||e,r=uN(r),(i=uE.get(i))&&uj(r,i),e$(a=a.createElement("link"));var s=a;s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),ut(a,"link",r),t.instance=a}null===n.stylesheets&&(n.stylesheets=new Map),n.stylesheets.set(t,e),(e=t.state.preload)&&0==(3&t.state.loading)&&(n.count++,t=uW.bind(n),e.addEventListener("load",t),e.addEventListener("error",t))}}(ol,e.memoizedState,e.memoizedProps);break;case 5:default:oy(e);break;case 3:case 4:var t=ol;ol=u_(e.stateNode.containerInfo),oy(e),ol=t;break;case 22:null===e.memoizedState&&(null!==(t=e.alternate)&&null!==t.memoizedState?(t=ov,ov=0x1000000,oy(e),ov=t):oy(e))}}function ow(e){var t=e.alternate;if(null!==t&&null!==(e=t.child)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(null!==e)}}function oS(e){var t=e.deletions;if(0!=(16&e.flags)){if(null!==t)for(var r=0;r<t.length;r++){var n=t[r];s9=n,oE(n,e)}ow(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)ok(e),e=e.sibling}function ok(e){switch(e.tag){case 0:case 11:case 15:oS(e),2048&e.flags&&sG(9,e,e.return);break;case 3:case 12:default:oS(e);break;case 22:var t=e.stateNode;null!==e.memoizedState&&2&t._visibility&&(null===e.return||13!==e.return.tag)?(t._visibility&=-3,function e(t){var r=t.deletions;if(0!=(16&t.flags)){if(null!==r)for(var n=0;n<r.length;n++){var i=r[n];s9=i,oE(i,t)}ow(t)}for(t=t.child;null!==t;){switch((r=t).tag){case 0:case 11:case 15:sG(8,r,r.return),e(r);break;case 22:2&(n=r.stateNode)._visibility&&(n._visibility&=-3,e(r));break;default:e(r)}t=t.sibling}}(e)):oS(e)}}function oE(e,t){for(;null!==s9;){var r=s9;switch(r.tag){case 0:case 11:case 15:sG(8,r,t);break;case 23:case 22:if(null!==r.memoizedState&&null!==r.memoizedState.cachePool){var n=r.memoizedState.cachePool.pool;null!=n&&n.refCount++}break;case 24:nY(r.memoizedState.cache)}if(null!==(n=r.child))n.return=r,s9=n;else for(r=e;null!==s9;){var i=(n=s9).sibling,a=n.return;if(!function e(t){var r=t.alternate;null!==r&&(t.alternate=null,e(r)),t.child=null,t.deletions=null,t.sibling=null,5===t.tag&&null!==(r=t.stateNode)&&ej(r),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}(n),n===r){s9=null;break}if(null!==i){i.return=a,s9=i;break}s9=a}}}var ox={getCacheForType:function(e){var t=n$(nG),r=t.data.get(e);return void 0===r&&(r=e(),t.data.set(e,r)),r}},o_="function"==typeof WeakMap?WeakMap:Map,oC=0,oI=null,oT=null,oP=0,oA=0,oR=null,oN=!1,oO=!1,oL=!1,oM=0,oF=0,oj=0,oD=0,oU=0,oz=0,oV=0,o$=null,oB=null,oH=!1,oW=0,oq=1/0,oK=null,oG=null,oQ=0,oY=null,oJ=null,oX=0,oZ=0,o0=null,o1=null,o2=0,o3=null;function o4(){if(0!=(2&oC)&&0!==oP)return oP&-oP;if(null!==N.T){var e=nZ;return 0!==e?e:lz()}return eI()}function o6(){0===oz&&(oz=0==(0x20000000&oP)||nS?eb():0x20000000);var e=a3.current;return null!==e&&(e.flags|=32),oz}function o5(e,t,r){(e===oI&&(2===oA||9===oA)||null!==e.cancelPendingCommit)&&(lr(e,0),o9(e,oP,oz,!1)),ek(e,r),(0==(2&oC)||e!==oI)&&(e===oI&&(0==(2&oC)&&(oD|=r),4===oF&&o9(e,oP,oz,!1)),lO(e))}function o8(e,t,r){if(0!=(6&oC))throw Error(o(327));for(var n=!r&&0==(124&t)&&0==(t&e.expiredLanes)||ey(e,t),i=n?function(e,t){var r=oC;oC|=2;var n=li(),i=la();oI!==e||oP!==t?(oK=null,oq=Z()+500,lr(e,t)):oO=ey(e,t);e:for(;;)try{if(0!==oA&&null!==oT){t=oT;var a=oR;t:switch(oA){case 1:oA=0,oR=null,lc(e,t,a,1);break;case 2:case 9:if(it(a)){oA=0,oR=null,lu(t);break}t=function(){2!==oA&&9!==oA||oI!==e||(oA=7),lO(e)},a.then(t,t);break e;case 3:oA=7;break e;case 4:oA=5;break e;case 7:it(a)?(oA=0,oR=null,lu(t)):(oA=0,oR=null,lc(e,t,a,7));break;case 5:var s=null;switch(oT.tag){case 26:s=oT.memoizedState;case 5:case 27:var l=oT;if(s?u$(s):1){oA=0,oR=null;var u=l.sibling;if(null!==u)oT=u;else{var c=l.return;null!==c?(oT=c,ld(c)):oT=null}break t}}oA=0,oR=null,lc(e,t,a,5);break;case 6:oA=0,oR=null,lc(e,t,a,6);break;case 8:lt(),oF=6;break e;default:throw Error(o(462))}}for(;null!==oT&&!J();)ll(oT);break}catch(t){ln(e,t)}return(nL=nO=null,N.H=n,N.A=i,oC=r,null!==oT)?0:(oI=null,oP=0,r0(),oF)}(e,t):lo(e,t,!0),a=n;;){if(0===i)oO&&!n&&o9(e,t,0,!1);else{if(r=e.current.alternate,a&&!function(e){for(var t=e;;){var r=t.tag;if((0===r||11===r||15===r)&&16384&t.flags&&null!==(r=t.updateQueue)&&null!==(r=r.stores))for(var n=0;n<r.length;n++){var i=r[n],a=i.getSnapshot;i=i.value;try{if(!rk(a(),i))return!1}catch(e){return!1}}if(r=t.child,16384&t.subtreeFlags&&null!==r)r.return=t,t=r;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(r)){i=lo(e,t,!1),a=!1;continue}if(2===i){if(a=t,e.errorRecoveryDisabledLanes&a)var s=0;else s=0!=(s=-0x20000001&e.pendingLanes)?s:0x20000000&s?0x20000000:0;if(0!==s){t=s;e:{i=o$;var l=e.current.memoizedState.isDehydrated;if(l&&(lr(e,s).flags|=256),2!==(s=lo(e,s,!1))){if(oL&&!l){e.errorRecoveryDisabledLanes|=a,oD|=a,i=4;break e}a=oB,oB=i,null!==a&&(null===oB?oB=a:oB.push.apply(oB,a))}i=s}if(a=!1,2!==i)continue}}if(1===i){lr(e,0),o9(e,t,0,!0);break}e:{switch(n=e,a=i){case 0:case 1:throw Error(o(345));case 4:if((4194048&t)!==t)break;case 6:o9(n,t,oz,!oN);break e;case 2:oB=null;break;case 3:case 5:break;default:throw Error(o(329))}if((0x3c00000&t)===t&&10<(i=oW+300-Z())){if(o9(n,t,oz,!oN),0!==ev(n,0,!0))break e;n.timeoutHandle=uu(o7.bind(null,n,r,oB,oK,oH,t,oz,oD,oV,oN,a,2,-0,0),i);break e}o7(n,r,oB,oK,oH,t,oz,oD,oV,oN,a,0,-0,0)}}break}lO(e)}function o7(e,t,r,n,i,a,s,l,u,c,d,h,f,p){if(e.timeoutHandle=-1,(8192&(h=t.subtreeFlags)||0x1002000==(0x1002000&h))&&(uB={stylesheets:null,count:0,unsuspend:uH},ob(t),null!==(h=function(){if(null===uB)throw Error(o(475));var e=uB;return e.stylesheets&&0===e.count&&uK(e,e.stylesheets),0<e.count?function(t){var r=setTimeout(function(){if(e.stylesheets&&uK(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(r)}}:null}()))){e.cancelPendingCommit=h(lf.bind(null,e,t,a,r,n,i,s,l,u,d,1,f,p)),o9(e,a,s,!c);return}lf(e,t,a,r,n,i,s,l,u)}function o9(e,t,r,n){t&=~oU,t&=~oD,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var i=t;0<i;){var a=31-ed(i),s=1<<a;n[a]=-1,i&=~s}0!==r&&eE(e,r,t)}function le(){return 0!=(6&oC)||(lL(0,!1),!1)}function lt(){if(null!==oT){if(0===oA)var e=oT.return;else e=oT,nL=nO=null,iW(e),aG=null,aQ=0,e=oT;for(;null!==e;)sq(e.alternate,e),e=e.return;oT=null}}function lr(e,t){var r=e.timeoutHandle;-1!==r&&(e.timeoutHandle=-1,uc(r)),null!==(r=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,r()),lt(),oI=e,oT=r=ne(e.current,null),oP=t,oA=0,oR=null,oN=!1,oO=ey(e,t),oL=!1,oV=oz=oU=oD=oj=oF=0,oB=o$=null,oH=!1,0!=(8&t)&&(t|=32&t);var n=e.entangledLanes;if(0!==n)for(e=e.entanglements,n&=t;0<n;){var i=31-ed(n),a=1<<i;t|=e[i],n&=~a}return oM=t,r0(),r}function ln(e,t){iI=null,N.H=aH,t===n8||t===n9?(t=is(),oA=3):t===n7?(t=is(),oA=4):oA=t===sm?8:null!==t&&"object"==typeof t&&"function"==typeof t.then?6:1,oR=t,null===oT&&(oF=1,sc(e,rY(t,e.current)))}function li(){var e=N.H;return N.H=aH,null===e?aH:e}function la(){var e=N.A;return N.A=ox,e}function ls(){oF=4,oN||(4194048&oP)!==oP&&null!==a3.current||(oO=!0),0==(0x7ffffff&oj)&&0==(0x7ffffff&oD)||null===oI||o9(oI,oP,oz,!1)}function lo(e,t,r){var n=oC;oC|=2;var i=li(),a=la();(oI!==e||oP!==t)&&(oK=null,lr(e,t)),t=!1;var s=oF;e:for(;;)try{if(0!==oA&&null!==oT){var o=oT,l=oR;switch(oA){case 8:lt(),s=6;break e;case 3:case 2:case 9:case 6:null===a3.current&&(t=!0);var u=oA;if(oA=0,oR=null,lc(e,o,l,u),r&&oO){s=0;break e}break;default:u=oA,oA=0,oR=null,lc(e,o,l,u)}}(function(){for(;null!==oT;)ll(oT)})(),s=oF;break}catch(t){ln(e,t)}return t&&e.shellSuspendCounter++,nL=nO=null,oC=n,N.H=i,N.A=a,null===oT&&(oI=null,oP=0,r0()),s}function ll(e){var t=sz(e.alternate,e,oM);e.memoizedProps=e.pendingProps,null===t?ld(e):oT=t}function lu(e){var t=e,r=t.alternate;switch(t.tag){case 15:case 0:t=s_(r,t,t.pendingProps,t.type,void 0,oP);break;case 11:t=s_(r,t,t.pendingProps,t.type.render,t.ref,oP);break;case 5:iW(t);default:sq(r,t),t=sz(r,t=oT=nt(t,oM),oM)}e.memoizedProps=e.pendingProps,null===t?ld(e):oT=t}function lc(e,t,r,n){nL=nO=null,iW(t),aG=null,aQ=0;var i=t.return;try{if(function(e,t,r,n,i){if(r.flags|=32768,null!==n&&"object"==typeof n&&"function"==typeof n.then){if(null!==(t=r.alternate)&&nU(t,r,i,!0),null!==(r=a3.current)){switch(r.tag){case 13:return null===a4?ls():null===r.alternate&&0===oF&&(oF=3),r.flags&=-257,r.flags|=65536,r.lanes=i,n===ie?r.flags|=16384:(null===(t=r.updateQueue)?r.updateQueue=new Set([n]):t.add(n),lk(e,n,i)),!1;case 22:return r.flags|=65536,n===ie?r.flags|=16384:(null===(t=r.updateQueue)?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},r.updateQueue=t):null===(r=t.retryQueue)?t.retryQueue=new Set([n]):r.add(n),lk(e,n,i)),!1}throw Error(o(435,r.tag))}return lk(e,n,i),ls(),!1}if(nS)return null!==(t=a3.current)?(0==(65536&t.flags)&&(t.flags|=256),t.flags|=65536,t.lanes=i,n!==nx&&nR(rY(e=Error(o(422),{cause:n}),r))):(n!==nx&&nR(rY(t=Error(o(423),{cause:n}),r)),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,n=rY(n,r),i=sh(e.stateNode,n,i),im(e,i),4!==oF&&(oF=2)),!1;var a=Error(o(520),{cause:n});if(a=rY(a,r),null===o$?o$=[a]:o$.push(a),4!==oF&&(oF=2),null===t)return!0;n=rY(n,r),r=t;do{switch(r.tag){case 3:return r.flags|=65536,e=i&-i,r.lanes|=e,e=sh(r.stateNode,n,e),im(r,e),!1;case 1:if(t=r.type,a=r.stateNode,0==(128&r.flags)&&("function"==typeof t.getDerivedStateFromError||null!==a&&"function"==typeof a.componentDidCatch&&(null===oG||!oG.has(a))))return r.flags|=65536,i&=-i,r.lanes|=i,sp(i=sf(i),e,r,n),im(r,i),!1}r=r.return}while(null!==r);return!1}(e,i,t,r,oP)){oF=1,sc(e,rY(r,e.current)),oT=null;return}}catch(t){if(null!==i)throw oT=i,t;oF=1,sc(e,rY(r,e.current)),oT=null;return}32768&t.flags?(nS||1===n?e=!0:oO||0!=(0x20000000&oP)?e=!1:(oN=e=!0,(2===n||9===n||3===n||6===n)&&null!==(n=a3.current)&&13===n.tag&&(n.flags|=16384)),lh(t,e)):ld(t)}function ld(e){var t=e;do{if(0!=(32768&t.flags))return void lh(t,oN);e=t.return;var r=function(e,t,r){var n=t.pendingProps;switch(ny(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return sW(t),null;case 3:return r=t.stateNode,n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),nF(nG),W(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(null===e||null===e.child)&&(nT(t)?sV(t):null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,nA())),sW(t),null;case 26:return r=t.memoizedState,null===e?(sV(t),null!==r?(sW(t),s$(t,r)):(sW(t),t.flags&=-0x1000001)):r?r!==e.memoizedState?(sV(t),sW(t),s$(t,r)):(sW(t),t.flags&=-0x1000001):(e.memoizedProps!==n&&sV(t),sW(t),t.flags&=-0x1000001),null;case 27:K(t),r=$.current;var i=t.type;if(null!==e&&null!=t.stateNode)e.memoizedProps!==n&&sV(t);else{if(!n){if(null===t.stateNode)throw Error(o(166));return sW(t),null}e=z.current,nT(t)?nC(t,e):(e=uS(i,n,r),t.stateNode=e,sV(t))}return sW(t),null;case 5:if(K(t),r=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==n&&sV(t);else{if(!n){if(null===t.stateNode)throw Error(o(166));return sW(t),null}if(e=z.current,nT(t))nC(t,e);else{switch(i=ui($.current),e){case 1:e=i.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:e=i.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":e=i.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":e=i.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":(e=i.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e="string"==typeof n.is?i.createElement("select",{is:n.is}):i.createElement("select"),n.multiple?e.multiple=!0:n.size&&(e.size=n.size);break;default:e="string"==typeof n.is?i.createElement(r,{is:n.is}):i.createElement(r)}}e[eP]=t,e[eA]=n;e:for(i=t.child;null!==i;){if(5===i.tag||6===i.tag)e.appendChild(i.stateNode);else if(4!==i.tag&&27!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(t.stateNode=e,ut(e,r,n),r){case"button":case"input":case"select":case"textarea":e=!!n.autoFocus;break;case"img":e=!0;break;default:e=!1}e&&sV(t)}}return sW(t),t.flags&=-0x1000001,null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==n&&sV(t);else{if("string"!=typeof n&&null===t.stateNode)throw Error(o(166));if(e=$.current,nT(t)){if(e=t.stateNode,r=t.memoizedProps,n=null,null!==(i=nb))switch(i.tag){case 27:case 5:n=i.memoizedProps}e[eP]=t,(e=!!(e.nodeValue===r||null!==n&&!0===n.suppressHydrationWarning||l8(e.nodeValue,r)))||n_(t)}else(e=ui(e).createTextNode(n))[eP]=t,t.stateNode=e}return sW(t),null;case 13:if(n=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(i=nT(t),null!==n&&null!==n.dehydrated){if(null===e){if(!i)throw Error(o(318));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(o(317));i[eP]=t}else nP(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;sW(t),i=!1}else i=nA(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i){if(256&t.flags)return a7(t),t;return a7(t),null}}if(a7(t),0!=(128&t.flags))return t.lanes=r,t;if(r=null!==n,e=null!==e&&null!==e.memoizedState,r){n=t.child,i=null,null!==n.alternate&&null!==n.alternate.memoizedState&&null!==n.alternate.memoizedState.cachePool&&(i=n.alternate.memoizedState.cachePool.pool);var a=null;null!==n.memoizedState&&null!==n.memoizedState.cachePool&&(a=n.memoizedState.cachePool.pool),a!==i&&(n.flags|=2048)}return r!==e&&r&&(t.child.flags|=8192),sB(t,t.updateQueue),sW(t),null;case 4:return W(),null===e&&lJ(t.stateNode.containerInfo),sW(t),null;case 10:return nF(t.type),sW(t),null;case 19:if(D(a9),null===(i=t.memoizedState))return sW(t),null;if(n=0!=(128&t.flags),null===(a=i.rendering))if(n)sH(i,!1);else{if(0!==oF||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(a=se(e))){for(t.flags|=128,sH(i,!1),e=a.updateQueue,t.updateQueue=e,sB(t,e),t.subtreeFlags=0,e=r,r=t.child;null!==r;)nt(r,e),r=r.sibling;return U(a9,1&a9.current|2),t.child}e=e.sibling}null!==i.tail&&Z()>oq&&(t.flags|=128,n=!0,sH(i,!1),t.lanes=4194304)}else{if(!n)if(null!==(e=se(a))){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,sB(t,e),sH(i,!0),null===i.tail&&"hidden"===i.tailMode&&!a.alternate&&!nS)return sW(t),null}else 2*Z()-i.renderingStartTime>oq&&0x20000000!==r&&(t.flags|=128,n=!0,sH(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(null!==(e=i.last)?e.sibling=a:t.child=a,i.last=a)}if(null!==i.tail)return t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Z(),t.sibling=null,e=a9.current,U(a9,n?1&e|2:1&e),t;return sW(t),null;case 22:case 23:return a7(t),i_(),n=null!==t.memoizedState,null!==e?null!==e.memoizedState!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?0!=(0x20000000&r)&&0==(128&t.flags)&&(sW(t),6&t.subtreeFlags&&(t.flags|=8192)):sW(t),null!==(r=t.updateQueue)&&sB(t,r.retryQueue),r=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(r=e.memoizedState.cachePool.pool),n=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(n=t.memoizedState.cachePool.pool),n!==r&&(t.flags|=2048),null!==e&&D(n3),null;case 24:return r=null,null!==e&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),nF(nG),sW(t),null;case 25:case 30:return null}throw Error(o(156,t.tag))}(t.alternate,t,oM);if(null!==r){oT=r;return}if(null!==(t=t.sibling)){oT=t;return}oT=t=e}while(null!==t);0===oF&&(oF=5)}function lh(e,t){do{var r=function(e,t){switch(ny(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return nF(nG),W(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return K(t),null;case 13:if(a7(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));nP()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return D(a9),null;case 4:return W(),null;case 10:return nF(t.type),null;case 22:case 23:return a7(t),i_(),null!==e&&D(n3),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return nF(nG),null;default:return null}}(e.alternate,e);if(null!==r){r.flags&=32767,oT=r;return}if(null!==(r=e.return)&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!t&&null!==(e=e.sibling)){oT=e;return}oT=e=r}while(null!==e);oF=6,oT=null}function lf(e,t,r,n,i,a,s,l,u){e.cancelPendingCommit=null;do ly();while(0!==oQ);if(0!=(6&oC))throw Error(o(327));if(null!==t){if(t===e.current)throw Error(o(177));if(!function(e,t,r,n,i,a){var s=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var o=e.entanglements,l=e.expirationTimes,u=e.hiddenUpdates;for(r=s&~r;0<r;){var c=31-ed(r),d=1<<c;o[c]=0,l[c]=-1;var h=u[c];if(null!==h)for(u[c]=null,c=0;c<h.length;c++){var f=h[c];null!==f&&(f.lane&=-0x20000001)}r&=~d}0!==n&&eE(e,n,0),0!==a&&0===i&&0!==e.tag&&(e.suspendedLanes|=a&~(s&~t))}(e,r,a=t.lanes|t.childLanes|rZ,s,l,u),e===oI&&(oT=oI=null,oP=0),oJ=t,oY=e,oX=r,oZ=a,o0=i,o1=n,0!=(10256&t.subtreeFlags)||0!=(10256&t.flags)?(e.callbackNode=null,e.callbackPriority=0,Q(en,function(){return lb(!0),null})):(e.callbackNode=null,e.callbackPriority=0),n=0!=(13878&t.flags),0!=(13878&t.subtreeFlags)||n){n=N.T,N.T=null,i=O.p,O.p=2,s=oC,oC|=4;try{!function(e,t){if(e=e.containerInfo,ur=u1,rI(e=rC(e))){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{var n=(r=(r=e.ownerDocument)&&r.defaultView||window).getSelection&&r.getSelection();if(n&&0!==n.rangeCount){r=n.anchorNode;var i,a=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{r.nodeType,s.nodeType}catch(e){r=null;break e}var l=0,u=-1,c=-1,d=0,h=0,f=e,p=null;t:for(;;){for(;f!==r||0!==a&&3!==f.nodeType||(u=l+a),f!==s||0!==n&&3!==f.nodeType||(c=l+n),3===f.nodeType&&(l+=f.nodeValue.length),null!==(i=f.firstChild);)p=f,f=i;for(;;){if(f===e)break t;if(p===r&&++d===a&&(u=l),p===s&&++h===n&&(c=l),null!==(i=f.nextSibling))break;p=(f=p).parentNode}f=i}r=-1===u||-1===c?null:{start:u,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(un={focusedElem:e,selectionRange:r},u1=!1,s9=t;null!==s9;)if(e=(t=s9).child,0!=(1024&t.subtreeFlags)&&null!==e)e.return=t,s9=e;else for(;null!==s9;){switch(s=(t=s9).alternate,e=t.flags,t.tag){case 0:case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if(0!=(1024&e)&&null!==s){e=void 0,r=t,a=s.memoizedProps,s=s.memoizedState,n=r.stateNode;try{var m=sa(r.type,a,r.elementType===r.type);e=n.getSnapshotBeforeUpdate(m,s),n.__reactInternalSnapshotBeforeUpdate=e}catch(e){lS(r,r.return,e)}}break;case 3:if(0!=(1024&e)){if(9===(r=(e=t.stateNode.containerInfo).nodeType))ug(e);else if(1===r)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ug(e);break;default:e.textContent=""}}break;default:if(0!=(1024&e))throw Error(o(163))}if(null!==(e=t.sibling)){e.return=t.return,s9=e;break}s9=t.return}}(e,t,r)}finally{oC=s,O.p=i,N.T=n}}oQ=1,lp(),lm(),lg()}}function lp(){if(1===oQ){oQ=0;var e=oY,t=oJ,r=0!=(13878&t.flags);if(0!=(13878&t.subtreeFlags)||r){r=N.T,N.T=null;var n=O.p;O.p=2;var i=oC;oC|=4;try{ou(t,e);var a=un,s=rC(e.containerInfo),o=a.focusedElem,l=a.selectionRange;if(s!==o&&o&&o.ownerDocument&&function e(t,r){return!!t&&!!r&&(t===r||(!t||3!==t.nodeType)&&(r&&3===r.nodeType?e(t,r.parentNode):"contains"in t?t.contains(r):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(r))))}(o.ownerDocument.documentElement,o)){if(null!==l&&rI(o)){var u=l.start,c=l.end;if(void 0===c&&(c=u),"selectionStart"in o)o.selectionStart=u,o.selectionEnd=Math.min(c,o.value.length);else{var d=o.ownerDocument||document,h=d&&d.defaultView||window;if(h.getSelection){var f=h.getSelection(),p=o.textContent.length,m=Math.min(l.start,p),g=void 0===l.end?m:Math.min(l.end,p);!f.extend&&m>g&&(s=g,g=m,m=s);var v=r_(o,m),y=r_(o,g);if(v&&y&&(1!==f.rangeCount||f.anchorNode!==v.node||f.anchorOffset!==v.offset||f.focusNode!==y.node||f.focusOffset!==y.offset)){var b=d.createRange();b.setStart(v.node,v.offset),f.removeAllRanges(),m>g?(f.addRange(b),f.extend(y.node,y.offset)):(b.setEnd(y.node,y.offset),f.addRange(b))}}}}for(d=[],f=o;f=f.parentNode;)1===f.nodeType&&d.push({element:f,left:f.scrollLeft,top:f.scrollTop});for("function"==typeof o.focus&&o.focus(),o=0;o<d.length;o++){var w=d[o];w.element.scrollLeft=w.left,w.element.scrollTop=w.top}}u1=!!ur,un=ur=null}finally{oC=i,O.p=n,N.T=r}}e.current=t,oQ=2}}function lm(){if(2===oQ){oQ=0;var e=oY,t=oJ,r=0!=(8772&t.flags);if(0!=(8772&t.subtreeFlags)||r){r=N.T,N.T=null;var n=O.p;O.p=2;var i=oC;oC|=4;try{oe(e,t.alternate,t)}finally{oC=i,O.p=n,N.T=r}}oQ=3}}function lg(){if(4===oQ||3===oQ){oQ=0,X();var e=oY,t=oJ,r=oX,n=o1;0!=(10256&t.subtreeFlags)||0!=(10256&t.flags)?oQ=5:(oQ=0,oJ=oY=null,lv(e,e.pendingLanes));var i=e.pendingLanes;if(0===i&&(oG=null),eC(r),t=t.stateNode,eu&&"function"==typeof eu.onCommitFiberRoot)try{eu.onCommitFiberRoot(el,t,void 0,128==(128&t.current.flags))}catch(e){}if(null!==n){t=N.T,i=O.p,O.p=2,N.T=null;try{for(var a=e.onRecoverableError,s=0;s<n.length;s++){var o=n[s];a(o.value,{componentStack:o.stack})}}finally{N.T=t,O.p=i}}0!=(3&oX)&&ly(),lO(e),i=e.pendingLanes,0!=(4194090&r)&&0!=(42&i)?e===o3?o2++:(o2=0,o3=e):o2=0,lL(0,!1)}}function lv(e,t){0==(e.pooledCacheLanes&=t)&&null!=(t=e.pooledCache)&&(e.pooledCache=null,nY(t))}function ly(e){return lp(),lm(),lg(),lb(e)}function lb(){if(5!==oQ)return!1;var e=oY,t=oZ;oZ=0;var r=eC(oX),n=N.T,i=O.p;try{O.p=32>r?32:r,N.T=null,r=o0,o0=null;var a=oY,s=oX;if(oQ=0,oJ=oY=null,oX=0,0!=(6&oC))throw Error(o(331));var l=oC;if(oC|=4,ok(a.current),om(a,a.current,s,r),oC=l,lL(0,!1),eu&&"function"==typeof eu.onPostCommitFiberRoot)try{eu.onPostCommitFiberRoot(el,a)}catch(e){}return!0}finally{O.p=i,N.T=n,lv(e,t)}}function lw(e,t,r){t=rY(r,t),t=sh(e.stateNode,t,2),null!==(e=ih(e,t,2))&&(ek(e,2),lO(e))}function lS(e,t,r){if(3===e.tag)lw(e,e,r);else for(;null!==t;){if(3===t.tag){lw(t,e,r);break}if(1===t.tag){var n=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof n.componentDidCatch&&(null===oG||!oG.has(n))){e=rY(r,e),null!==(n=ih(t,r=sf(2),2))&&(sp(r,n,t,e),ek(n,2),lO(n));break}}t=t.return}}function lk(e,t,r){var n=e.pingCache;if(null===n){n=e.pingCache=new o_;var i=new Set;n.set(t,i)}else void 0===(i=n.get(t))&&(i=new Set,n.set(t,i));i.has(r)||(oL=!0,i.add(r),e=lE.bind(null,e,t,r),t.then(e,e))}function lE(e,t,r){var n=e.pingCache;null!==n&&n.delete(t),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,oI===e&&(oP&r)===r&&(4===oF||3===oF&&(0x3c00000&oP)===oP&&300>Z()-oW?0==(2&oC)&&lr(e,0):oU|=r,oV===oP&&(oV=0)),lO(e)}function lx(e,t){0===t&&(t=ew()),null!==(e=r3(e,t))&&(ek(e,t),lO(e))}function l_(e){var t=e.memoizedState,r=0;null!==t&&(r=t.retryLane),lx(e,r)}function lC(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;null!==i&&(r=i.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(o(314))}null!==n&&n.delete(t),lx(e,r)}var lI=null,lT=null,lP=!1,lA=!1,lR=!1,lN=0;function lO(e){e!==lT&&null===e.next&&(null===lT?lI=lT=e:lT=lT.next=e),lA=!0,lP||(lP=!0,uh(function(){0!=(6&oC)?Q(et,lM):lF()}))}function lL(e,t){if(!lR&&lA){lR=!0;do for(var r=!1,n=lI;null!==n;){if(!t)if(0!==e){var i=n.pendingLanes;if(0===i)var a=0;else{var s=n.suspendedLanes,o=n.pingedLanes;a=0xc000095&(a=(1<<31-ed(42|e)+1)-1&(i&~(s&~o)))?0xc000095&a|1:a?2|a:0}0!==a&&(r=!0,lU(n,a))}else a=oP,0==(3&(a=ev(n,n===oI?a:0,null!==n.cancelPendingCommit||-1!==n.timeoutHandle)))||ey(n,a)||(r=!0,lU(n,a));n=n.next}while(r);lR=!1}}function lM(){lF()}function lF(){lA=lP=!1;var e,t=0;0!==lN&&(((e=window.event)&&"popstate"===e.type?e===ul||(ul=e,0):(ul=null,1))||(t=lN),lN=0);for(var r=Z(),n=null,i=lI;null!==i;){var a=i.next,s=lj(i,r);0===s?(i.next=null,null===n?lI=a:n.next=a,null===a&&(lT=n)):(n=i,(0!==t||0!=(3&s))&&(lA=!0)),i=a}lL(t,!1)}function lj(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,a=-0x3c00001&e.pendingLanes;0<a;){var s=31-ed(a),o=1<<s,l=i[s];-1===l?(0==(o&r)||0!=(o&n))&&(i[s]=function(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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 t+5e3;default:return -1}}(o,t)):l<=t&&(e.expiredLanes|=o),a&=~o}if(t=oI,r=oP,r=ev(e,e===t?r:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle),n=e.callbackNode,0===r||e===t&&(2===oA||9===oA)||null!==e.cancelPendingCommit)return null!==n&&null!==n&&Y(n),e.callbackNode=null,e.callbackPriority=0;if(0==(3&r)||ey(e,r)){if((t=r&-r)===e.callbackPriority)return t;switch(null!==n&&Y(n),eC(r)){case 2:case 8:r=er;break;case 32:default:r=en;break;case 0x10000000:r=ea}return r=Q(r,n=lD.bind(null,e)),e.callbackPriority=t,e.callbackNode=r,t}return null!==n&&null!==n&&Y(n),e.callbackPriority=2,e.callbackNode=null,2}function lD(e,t){if(0!==oQ&&5!==oQ)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(ly(!0)&&e.callbackNode!==r)return null;var n=oP;return 0===(n=ev(e,e===oI?n:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle))?null:(o8(e,n,t),lj(e,Z()),null!=e.callbackNode&&e.callbackNode===r?lD.bind(null,e):null)}function lU(e,t){if(ly())return null;o8(e,t,!0)}function lz(){return 0===lN&&(lN=eb()),lN}function lV(e){return null==e||"symbol"==typeof e||"boolean"==typeof e?null:"function"==typeof e?e:tf(""+e)}function l$(e,t){var r=t.ownerDocument.createElement("input");return r.name=t.name,r.value=t.value,e.id&&r.setAttribute("form",e.id),t.parentNode.insertBefore(r,t),e=new FormData(e),r.parentNode.removeChild(r),e}for(var lB=0;lB<rK.length;lB++){var lH=rK[lB];rG(lH.toLowerCase(),"on"+(lH[0].toUpperCase()+lH.slice(1)))}rG(rU,"onAnimationEnd"),rG(rz,"onAnimationIteration"),rG(rV,"onAnimationStart"),rG("dblclick","onDoubleClick"),rG("focusin","onFocus"),rG("focusout","onBlur"),rG(r$,"onTransitionRun"),rG(rB,"onTransitionStart"),rG(rH,"onTransitionCancel"),rG(rW,"onTransitionEnd"),eq("onMouseEnter",["mouseout","mouseover"]),eq("onMouseLeave",["mouseout","mouseover"]),eq("onPointerEnter",["pointerout","pointerover"]),eq("onPointerLeave",["pointerout","pointerover"]),eW("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),eW("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),eW("onBeforeInput",["compositionend","keypress","textInput","paste"]),eW("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),eW("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),eW("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var lW="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),lq=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(lW));function lK(e,t){t=0!=(4&t);for(var r=0;r<e.length;r++){var n=e[r],i=n.event;n=n.listeners;e:{var a=void 0;if(t)for(var s=n.length-1;0<=s;s--){var o=n[s],l=o.instance,u=o.currentTarget;if(o=o.listener,l!==a&&i.isPropagationStopped())break e;a=o,i.currentTarget=u;try{a(i)}catch(e){ss(e)}i.currentTarget=null,a=l}else for(s=0;s<n.length;s++){if(l=(o=n[s]).instance,u=o.currentTarget,o=o.listener,l!==a&&i.isPropagationStopped())break e;a=o,i.currentTarget=u;try{a(i)}catch(e){ss(e)}i.currentTarget=null,a=l}}}}function lG(e,t){var r=t[eN];void 0===r&&(r=t[eN]=new Set);var n=e+"__bubble";r.has(n)||(lX(t,e,2,!1),r.add(n))}function lQ(e,t,r){var n=0;t&&(n|=4),lX(r,e,n,t)}var lY="_reactListening"+Math.random().toString(36).slice(2);function lJ(e){if(!e[lY]){e[lY]=!0,eB.forEach(function(t){"selectionchange"!==t&&(lq.has(t)||lQ(t,!1,e),lQ(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[lY]||(t[lY]=!0,lQ("selectionchange",!1,t))}}function lX(e,t,r,n){switch(u7(t)){case 2:var i=u2;break;case 8:i=u3;break;default:i=u4}r=i.bind(null,t,r,e),i=void 0,tE&&("touchstart"===t||"touchmove"===t||"wheel"===t)&&(i=!0),n?void 0!==i?e.addEventListener(t,r,{capture:!0,passive:i}):e.addEventListener(t,r,!0):void 0!==i?e.addEventListener(t,r,{passive:i}):e.addEventListener(t,r,!1)}function lZ(e,t,r,n,i){var a=n;if(0==(1&t)&&0==(2&t)&&null!==n)e:for(;;){if(null===n)return;var s=n.tag;if(3===s||4===s){var o=n.stateNode.containerInfo;if(o===i)break;if(4===s)for(s=n.return;null!==s;){var u=s.tag;if((3===u||4===u)&&s.stateNode.containerInfo===i)return;s=s.return}for(;null!==o;){if(null===(s=eD(o)))return;if(5===(u=s.tag)||6===u||26===u||27===u){n=a=s;continue e}o=o.parentNode}}n=n.return}tw(function(){var n=a,i=tm(r),s=[];e:{var o=rq.get(e);if(void 0!==o){var u=tU,c=e;switch(e){case"keypress":if(0===tP(r))break e;case"keydown":case"keyup":u=t0;break;case"focusin":c="focus",u=tW;break;case"focusout":c="blur",u=tW;break;case"beforeblur":case"afterblur":u=tW;break;case"click":if(2===r.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=tB;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=tH;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=t2;break;case rU:case rz:case rV:u=tq;break;case rW:u=t3;break;case"scroll":case"scrollend":u=tV;break;case"wheel":u=t4;break;case"copy":case"cut":case"paste":u=tK;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=t1;break;case"toggle":case"beforetoggle":u=t6}var d=0!=(4&t),h=!d&&("scroll"===e||"scrollend"===e),f=d?null!==o?o+"Capture":null:o;d=[];for(var p,m=n;null!==m;){var g=m;if(p=g.stateNode,5!==(g=g.tag)&&26!==g&&27!==g||null===p||null===f||null!=(g=tS(m,f))&&d.push(l0(m,g,p)),h)break;m=m.return}0<d.length&&(o=new u(o,c,null,r,i),s.push({event:o,listeners:d}))}}if(0==(7&t)){if((o="mouseover"===e||"pointerover"===e,u="mouseout"===e||"pointerout"===e,!(o&&r!==tp&&(c=r.relatedTarget||r.fromElement)&&(eD(c)||c[eR])))&&(u||o)&&(o=i.window===i?i:(o=i.ownerDocument)?o.defaultView||o.parentWindow:window,u?(c=r.relatedTarget||r.toElement,u=n,null!==(c=c?eD(c):null)&&(h=l(c),d=c.tag,c!==h||5!==d&&27!==d&&6!==d)&&(c=null)):(u=null,c=n),u!==c)){if(d=tB,g="onMouseLeave",f="onMouseEnter",m="mouse",("pointerout"===e||"pointerover"===e)&&(d=t1,g="onPointerLeave",f="onPointerEnter",m="pointer"),h=null==u?o:ez(u),p=null==c?o:ez(c),(o=new d(g,m+"leave",u,r,i)).target=h,o.relatedTarget=p,g=null,eD(i)===n&&((d=new d(f,m+"enter",c,r,i)).target=p,d.relatedTarget=h,g=d),h=g,u&&c)t:{for(d=u,f=c,m=0,p=d;p;p=l2(p))m++;for(p=0,g=f;g;g=l2(g))p++;for(;0<m-p;)d=l2(d),m--;for(;0<p-m;)f=l2(f),p--;for(;m--;){if(d===f||null!==f&&d===f.alternate)break t;d=l2(d),f=l2(f)}d=null}else d=null;null!==u&&l3(s,o,u,d,!1),null!==c&&null!==h&&l3(s,h,c,d,!0)}e:{if("select"===(u=(o=n?ez(n):window).nodeName&&o.nodeName.toLowerCase())||"input"===u&&"file"===o.type)var v,y=rh;else if(rs(o))if(rf)y=rS;else{y=rb;var b=ry}else(u=o.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===o.type||"radio"===o.type)?y=rw:n&&tc(n.elementType)&&(y=rh);if(y&&(y=y(e,n))){ro(s,y,r,i);break e}b&&b(e,o,n),"focusout"===e&&n&&"number"===o.type&&null!=n.memoizedProps.value&&tr(o,"number",o.value)}switch(b=n?ez(n):window,e){case"focusin":(rs(b)||"true"===b.contentEditable)&&(rP=b,rA=n,rR=null);break;case"focusout":rR=rA=rP=null;break;case"mousedown":rN=!0;break;case"contextmenu":case"mouseup":case"dragend":rN=!1,rO(s,r,i);break;case"selectionchange":if(rT)break;case"keydown":case"keyup":rO(s,r,i)}if(t8)t:{switch(e){case"compositionstart":var w="onCompositionStart";break t;case"compositionend":w="onCompositionEnd";break t;case"compositionupdate":w="onCompositionUpdate";break t}w=void 0}else ri?rr(e,r)&&(w="onCompositionEnd"):"keydown"===e&&229===r.keyCode&&(w="onCompositionStart");w&&(re&&"ko"!==r.locale&&(ri||"onCompositionStart"!==w?"onCompositionEnd"===w&&ri&&(v=tT()):(tC="value"in(t_=i)?t_.value:t_.textContent,ri=!0)),0<(b=l1(n,w)).length&&(w=new tG(w,e,null,r,i),s.push({event:w,listeners:b}),v?w.data=v:null!==(v=rn(r))&&(w.data=v))),(v=t9?function(e,t){switch(e){case"compositionend":return rn(t);case"keypress":if(32!==t.which)return null;return rt=!0," ";case"textInput":return" "===(e=t.data)&&rt?null:e;default:return null}}(e,r):function(e,t){if(ri)return"compositionend"===e||!t8&&rr(e,t)?(e=tT(),tI=tC=t_=null,ri=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return re&&"ko"!==t.locale?null:t.data}}(e,r))&&0<(w=l1(n,"onBeforeInput")).length&&(b=new tG("onBeforeInput","beforeinput",null,r,i),s.push({event:b,listeners:w}),b.data=v);var S=e;if("submit"===S&&n&&n.stateNode===i){var k=lV((i[eA]||null).action),E=r.submitter;E&&null!==(S=(S=E[eA]||null)?lV(S.formAction):E.getAttribute("formAction"))&&(k=S,E=null);var x=new tU("action","action",null,r,i);s.push({event:x,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(0!==lN){var e=E?l$(i,E):new FormData(i);aA(n,{pending:!0,data:e,method:i.method,action:k},null,e)}}else"function"==typeof k&&(x.preventDefault(),aA(n,{pending:!0,data:e=E?l$(i,E):new FormData(i),method:i.method,action:k},k,e))},currentTarget:i}]})}}lK(s,t)})}function l0(e,t,r){return{instance:e,listener:t,currentTarget:r}}function l1(e,t){for(var r=t+"Capture",n=[];null!==e;){var i=e,a=i.stateNode;if(5!==(i=i.tag)&&26!==i&&27!==i||null===a||(null!=(i=tS(e,r))&&n.unshift(l0(e,i,a)),null!=(i=tS(e,t))&&n.push(l0(e,i,a))),3===e.tag)return n;e=e.return}return[]}function l2(e){if(null===e)return null;do e=e.return;while(e&&5!==e.tag&&27!==e.tag);return e||null}function l3(e,t,r,n,i){for(var a=t._reactName,s=[];null!==r&&r!==n;){var o=r,l=o.alternate,u=o.stateNode;if(o=o.tag,null!==l&&l===n)break;5!==o&&26!==o&&27!==o||null===u||(l=u,i?null!=(u=tS(r,a))&&s.unshift(l0(r,u,l)):i||null!=(u=tS(r,a))&&s.push(l0(r,u,l))),r=r.return}0!==s.length&&e.push({event:t,listeners:s})}var l4=/\r\n?/g,l6=/\u0000|\uFFFD/g;function l5(e){return("string"==typeof e?e:""+e).replace(l4,"\n").replace(l6,"")}function l8(e,t){return t=l5(t),l5(e)===t}function l7(){}function l9(e,t,r,n,i,a){switch(r){case"children":"string"==typeof n?"body"===t||"textarea"===t&&""===n||ts(e,n):("number"==typeof n||"bigint"==typeof n)&&"body"!==t&&ts(e,""+n);break;case"className":eJ(e,"class",n);break;case"tabIndex":eJ(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":eJ(e,r,n);break;case"style":tu(e,n,a);break;case"data":if("object"!==t){eJ(e,"data",n);break}case"src":case"href":if(""===n&&("a"!==t||"href"!==r)||null==n||"function"==typeof n||"symbol"==typeof n||"boolean"==typeof n){e.removeAttribute(r);break}n=tf(""+n),e.setAttribute(r,n);break;case"action":case"formAction":if("function"==typeof n){e.setAttribute(r,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}if("function"==typeof a&&("formAction"===r?("input"!==t&&l9(e,t,"name",i.name,i,null),l9(e,t,"formEncType",i.formEncType,i,null),l9(e,t,"formMethod",i.formMethod,i,null),l9(e,t,"formTarget",i.formTarget,i,null)):(l9(e,t,"encType",i.encType,i,null),l9(e,t,"method",i.method,i,null),l9(e,t,"target",i.target,i,null))),null==n||"symbol"==typeof n||"boolean"==typeof n){e.removeAttribute(r);break}n=tf(""+n),e.setAttribute(r,n);break;case"onClick":null!=n&&(e.onclick=l7);break;case"onScroll":null!=n&&lG("scroll",e);break;case"onScrollEnd":null!=n&&lG("scrollend",e);break;case"dangerouslySetInnerHTML":if(null!=n){if("object"!=typeof n||!("__html"in n))throw Error(o(61));if(null!=(r=n.__html)){if(null!=i.children)throw Error(o(60));e.innerHTML=r}}break;case"multiple":e.multiple=n&&"function"!=typeof n&&"symbol"!=typeof n;break;case"muted":e.muted=n&&"function"!=typeof n&&"symbol"!=typeof n;break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":case"autoFocus":case"innerText":case"textContent":break;case"xlinkHref":if(null==n||"function"==typeof n||"boolean"==typeof n||"symbol"==typeof n){e.removeAttribute("xlink:href");break}r=tf(""+n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":null!=n&&"function"!=typeof n&&"symbol"!=typeof n?e.setAttribute(r,""+n):e.removeAttribute(r);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":n&&"function"!=typeof n&&"symbol"!=typeof n?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":!0===n?e.setAttribute(r,""):!1!==n&&null!=n&&"function"!=typeof n&&"symbol"!=typeof n?e.setAttribute(r,n):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":null!=n&&"function"!=typeof n&&"symbol"!=typeof n&&!isNaN(n)&&1<=n?e.setAttribute(r,n):e.removeAttribute(r);break;case"rowSpan":case"start":null==n||"function"==typeof n||"symbol"==typeof n||isNaN(n)?e.removeAttribute(r):e.setAttribute(r,n);break;case"popover":lG("beforetoggle",e),lG("toggle",e),eY(e,"popover",n);break;case"xlinkActuate":eX(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":eX(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":eX(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":eX(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":eX(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":eX(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":eX(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":eX(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":eX(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":eY(e,"is",n);break;default:2<r.length&&("o"===r[0]||"O"===r[0])&&("n"===r[1]||"N"===r[1])||eY(e,r=td.get(r)||r,n)}}function ue(e,t,r,n,i,a){switch(r){case"style":tu(e,n,a);break;case"dangerouslySetInnerHTML":if(null!=n){if("object"!=typeof n||!("__html"in n))throw Error(o(61));if(null!=(r=n.__html)){if(null!=i.children)throw Error(o(60));e.innerHTML=r}}break;case"children":"string"==typeof n?ts(e,n):("number"==typeof n||"bigint"==typeof n)&&ts(e,""+n);break;case"onScroll":null!=n&&lG("scroll",e);break;case"onScrollEnd":null!=n&&lG("scrollend",e);break;case"onClick":null!=n&&(e.onclick=l7);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":case"innerText":case"textContent":break;default:if(!eH.hasOwnProperty(r))e:{if("o"===r[0]&&"n"===r[1]&&(i=r.endsWith("Capture"),t=r.slice(2,i?r.length-7:void 0),"function"==typeof(a=null!=(a=e[eA]||null)?a[r]:null)&&e.removeEventListener(t,a,i),"function"==typeof n)){"function"!=typeof a&&null!==a&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(t,n,i);break e}r in e?e[r]=n:!0===n?e.setAttribute(r,""):eY(e,r,n)}}}function ut(e,t,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":lG("error",e),lG("load",e);var n,i=!1,a=!1;for(n in r)if(r.hasOwnProperty(n)){var s=r[n];if(null!=s)switch(n){case"src":i=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:l9(e,t,n,s,r,null)}}a&&l9(e,t,"srcSet",r.srcSet,r,null),i&&l9(e,t,"src",r.src,r,null);return;case"input":lG("invalid",e);var l=n=s=a=null,u=null,c=null;for(i in r)if(r.hasOwnProperty(i)){var d=r[i];if(null!=d)switch(i){case"name":a=d;break;case"type":s=d;break;case"checked":u=d;break;case"defaultChecked":c=d;break;case"value":n=d;break;case"defaultValue":l=d;break;case"children":case"dangerouslySetInnerHTML":if(null!=d)throw Error(o(137,t));break;default:l9(e,t,i,d,r,null)}}tt(e,n,l,u,c,s,a,!1),e6(e);return;case"select":for(a in lG("invalid",e),i=s=n=null,r)if(r.hasOwnProperty(a)&&null!=(l=r[a]))switch(a){case"value":n=l;break;case"defaultValue":s=l;break;case"multiple":i=l;default:l9(e,t,a,l,r,null)}t=n,r=s,e.multiple=!!i,null!=t?tn(e,!!i,t,!1):null!=r&&tn(e,!!i,r,!0);return;case"textarea":for(s in lG("invalid",e),n=a=i=null,r)if(r.hasOwnProperty(s)&&null!=(l=r[s]))switch(s){case"value":i=l;break;case"defaultValue":a=l;break;case"children":n=l;break;case"dangerouslySetInnerHTML":if(null!=l)throw Error(o(91));break;default:l9(e,t,s,l,r,null)}ta(e,i,a,n),e6(e);return;case"option":for(u in r)r.hasOwnProperty(u)&&null!=(i=r[u])&&("selected"===u?e.selected=i&&"function"!=typeof i&&"symbol"!=typeof i:l9(e,t,u,i,r,null));return;case"dialog":lG("beforetoggle",e),lG("toggle",e),lG("cancel",e),lG("close",e);break;case"iframe":case"object":lG("load",e);break;case"video":case"audio":for(i=0;i<lW.length;i++)lG(lW[i],e);break;case"image":lG("error",e),lG("load",e);break;case"details":lG("toggle",e);break;case"embed":case"source":case"link":lG("error",e),lG("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(c in r)if(r.hasOwnProperty(c)&&null!=(i=r[c]))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:l9(e,t,c,i,r,null)}return;default:if(tc(t)){for(d in r)r.hasOwnProperty(d)&&void 0!==(i=r[d])&&ue(e,t,d,i,r,void 0);return}}for(l in r)r.hasOwnProperty(l)&&null!=(i=r[l])&&l9(e,t,l,i,r,null)}var ur=null,un=null;function ui(e){return 9===e.nodeType?e:e.ownerDocument}function ua(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function us(e,t){if(0===e)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return 1===e&&"foreignObject"===t?0:e}function uo(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"bigint"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ul=null,uu="function"==typeof setTimeout?setTimeout:void 0,uc="function"==typeof clearTimeout?clearTimeout:void 0,ud="function"==typeof Promise?Promise:void 0,uh="function"==typeof queueMicrotask?queueMicrotask:void 0!==ud?function(e){return ud.resolve(null).then(e).catch(uf)}:uu;function uf(e){setTimeout(function(){throw e})}function up(e){return"head"===e}function um(e,t){var r=t,n=0,i=0;do{var a=r.nextSibling;if(e.removeChild(r),a&&8===a.nodeType)if("/$"===(r=a.data)){if(0<n&&8>n){r=n;var s=e.ownerDocument;if(1&r&&uk(s.documentElement),2&r&&uk(s.body),4&r)for(uk(r=s.head),s=r.firstChild;s;){var o=s.nextSibling,l=s.nodeName;s[eF]||"SCRIPT"===l||"STYLE"===l||"LINK"===l&&"stylesheet"===s.rel.toLowerCase()||r.removeChild(s),s=o}}if(0===i){e.removeChild(a),cg(t);return}i--}else"$"===r||"$?"===r||"$!"===r?i++:n=r.charCodeAt(0)-48;else n=0;r=a}while(r);cg(t)}function ug(e){var t=e.firstChild;for(t&&10===t.nodeType&&(t=t.nextSibling);t;){var r=t;switch(t=t.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":ug(r),ej(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===r.rel.toLowerCase())continue}e.removeChild(r)}}function uv(e){return"$!"===e.data||"$?"===e.data&&"complete"===e.ownerDocument.readyState}function uy(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t||"F!"===t||"F"===t)break;if("/$"===t)return null}}return e}var ub=null;function uw(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var r=e.data;if("$"===r||"$!"===r||"$?"===r){if(0===t)return e;t--}else"/$"===r&&t++}e=e.previousSibling}return null}function uS(e,t,r){switch(t=ui(r),e){case"html":if(!(e=t.documentElement))throw Error(o(452));return e;case"head":if(!(e=t.head))throw Error(o(453));return e;case"body":if(!(e=t.body))throw Error(o(454));return e;default:throw Error(o(451))}}function uk(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ej(e)}var uE=new Map,ux=new Set;function u_(e){return"function"==typeof e.getRootNode?e.getRootNode():9===e.nodeType?e:e.ownerDocument}var uC=O.d;O.d={f:function(){var e=uC.f(),t=le();return e||t},r:function(e){var t=eU(e);null!==t&&5===t.tag&&"form"===t.type?aN(t):uC.r(e)},D:function(e){uC.D(e),uT("dns-prefetch",e,null)},C:function(e,t){uC.C(e,t),uT("preconnect",e,t)},L:function(e,t,r){if(uC.L(e,t,r),uI&&e&&t){var n='link[rel="preload"][as="'+e9(t)+'"]';"image"===t&&r&&r.imageSrcSet?(n+='[imagesrcset="'+e9(r.imageSrcSet)+'"]',"string"==typeof r.imageSizes&&(n+='[imagesizes="'+e9(r.imageSizes)+'"]')):n+='[href="'+e9(e)+'"]';var i=n;switch(t){case"style":i=uA(e);break;case"script":i=uO(e)}uE.has(i)||(e=d({rel:"preload",href:"image"===t&&r&&r.imageSrcSet?void 0:e,as:t},r),uE.set(i,e),null!==uI.querySelector(n)||"style"===t&&uI.querySelector(uR(i))||"script"===t&&uI.querySelector(uL(i))||(ut(t=uI.createElement("link"),"link",e),e$(t),uI.head.appendChild(t)))}},m:function(e,t){if(uC.m(e,t),uI&&e){var r=t&&"string"==typeof t.as?t.as:"script",n='link[rel="modulepreload"][as="'+e9(r)+'"][href="'+e9(e)+'"]',i=n;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=uO(e)}if(!uE.has(i)&&(e=d({rel:"modulepreload",href:e},t),uE.set(i,e),null===uI.querySelector(n))){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(uI.querySelector(uL(i)))return}ut(r=uI.createElement("link"),"link",e),e$(r),uI.head.appendChild(r)}}},X:function(e,t){if(uC.X(e,t),uI&&e){var r=eV(uI).hoistableScripts,n=uO(e),i=r.get(n);i||((i=uI.querySelector(uL(n)))||(e=d({src:e,async:!0},t),(t=uE.get(n))&&uD(e,t),e$(i=uI.createElement("script")),ut(i,"link",e),uI.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(n,i))}},S:function(e,t,r){if(uC.S(e,t,r),uI&&e){var n=eV(uI).hoistableStyles,i=uA(e);t=t||"default";var a=n.get(i);if(!a){var s={loading:0,preload:null};if(a=uI.querySelector(uR(i)))s.loading=5;else{e=d({rel:"stylesheet",href:e,"data-precedence":t},r),(r=uE.get(i))&&uj(e,r);var o=a=uI.createElement("link");e$(o),ut(o,"link",e),o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),o.addEventListener("load",function(){s.loading|=1}),o.addEventListener("error",function(){s.loading|=2}),s.loading|=4,uF(a,t,uI)}a={type:"stylesheet",instance:a,count:1,state:s},n.set(i,a)}}},M:function(e,t){if(uC.M(e,t),uI&&e){var r=eV(uI).hoistableScripts,n=uO(e),i=r.get(n);i||((i=uI.querySelector(uL(n)))||(e=d({src:e,async:!0,type:"module"},t),(t=uE.get(n))&&uD(e,t),e$(i=uI.createElement("script")),ut(i,"link",e),uI.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(n,i))}}};var uI="undefined"==typeof document?null:document;function uT(e,t,r){if(uI&&"string"==typeof t&&t){var n=e9(t);n='link[rel="'+e+'"][href="'+n+'"]',"string"==typeof r&&(n+='[crossorigin="'+r+'"]'),ux.has(n)||(ux.add(n),e={rel:e,crossOrigin:r,href:t},null===uI.querySelector(n)&&(ut(t=uI.createElement("link"),"link",e),e$(t),uI.head.appendChild(t)))}}function uP(e,t,r,n){var i=(i=$.current)?u_(i):null;if(!i)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return"string"==typeof r.precedence&&"string"==typeof r.href?(t=uA(r.href),(n=(r=eV(i).hoistableStyles).get(t))||(n={type:"style",instance:null,count:0,state:null},r.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if("stylesheet"===r.rel&&"string"==typeof r.href&&"string"==typeof r.precedence){e=uA(r.href);var a,s,l,u,c=eV(i).hoistableStyles,d=c.get(e);if(d||(i=i.ownerDocument||i,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,d),(c=i.querySelector(uR(e)))&&!c._p&&(d.instance=c,d.state.loading=5),uE.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},uE.set(e,r),c||(a=i,s=e,l=r,u=d.state,a.querySelector('link[rel="preload"][as="style"]['+s+"]")?u.loading=1:(u.preload=s=a.createElement("link"),s.addEventListener("load",function(){return u.loading|=1}),s.addEventListener("error",function(){return u.loading|=2}),ut(s,"link",l),e$(s),a.head.appendChild(s))))),t&&null===n)throw Error(o(528,""));return d}if(t&&null!==n)throw Error(o(529,""));return null;case"script":return t=r.async,"string"==typeof(r=r.src)&&t&&"function"!=typeof t&&"symbol"!=typeof t?(t=uO(r),(n=(r=eV(i).hoistableScripts).get(t))||(n={type:"script",instance:null,count:0,state:null},r.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function uA(e){return'href="'+e9(e)+'"'}function uR(e){return'link[rel="stylesheet"]['+e+"]"}function uN(e){return d({},e,{"data-precedence":e.precedence,precedence:null})}function uO(e){return'[src="'+e9(e)+'"]'}function uL(e){return"script[async]"+e}function uM(e,t,r){if(t.count++,null===t.instance)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+e9(r.href)+'"]');if(n)return t.instance=n,e$(n),n;var i=d({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return e$(n=(e.ownerDocument||e).createElement("style")),ut(n,"style",i),uF(n,r.precedence,e),t.instance=n;case"stylesheet":i=uA(r.href);var a=e.querySelector(uR(i));if(a)return t.state.loading|=4,t.instance=a,e$(a),a;n=uN(r),(i=uE.get(i))&&uj(n,i),e$(a=(e.ownerDocument||e).createElement("link"));var s=a;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),ut(a,"link",n),t.state.loading|=4,uF(a,r.precedence,e),t.instance=a;case"script":if(a=uO(r.src),i=e.querySelector(uL(a)))return t.instance=i,e$(i),i;return n=r,(i=uE.get(a))&&uD(n=d({},r),i),e$(i=(e=e.ownerDocument||e).createElement("script")),ut(i,"link",n),e.head.appendChild(i),t.instance=i;case"void":return null;default:throw Error(o(443,t.type))}return"stylesheet"===t.type&&0==(4&t.state.loading)&&(n=t.instance,t.state.loading|=4,uF(n,r.precedence,e)),t.instance}function uF(e,t,r){for(var n=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=n.length?n[n.length-1]:null,a=i,s=0;s<n.length;s++){var o=n[s];if(o.dataset.precedence===t)a=o;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=9===r.nodeType?r.head:r).insertBefore(e,t.firstChild)}function uj(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.title&&(e.title=t.title)}function uD(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.integrity&&(e.integrity=t.integrity)}var uU=null;function uz(e,t,r){if(null===uU){var n=new Map,i=uU=new Map;i.set(r,n)}else(n=(i=uU).get(r))||(n=new Map,i.set(r,n));if(n.has(e))return n;for(n.set(e,null),r=r.getElementsByTagName(e),i=0;i<r.length;i++){var a=r[i];if(!(a[eF]||a[eP]||"link"===e&&"stylesheet"===a.getAttribute("rel"))&&"http://www.w3.org/2000/svg"!==a.namespaceURI){var s=a.getAttribute(t)||"";s=e+s;var o=n.get(s);o?o.push(a):n.set(s,[a])}}return n}function uV(e,t,r){(e=e.ownerDocument||e).head.insertBefore(r,"title"===t?e.querySelector("head > title"):null)}function u$(e){return"stylesheet"!==e.type||0!=(3&e.state.loading)}var uB=null;function uH(){}function uW(){if(this.count--,0===this.count){if(this.stylesheets)uK(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var uq=null;function uK(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,uq=new Map,t.forEach(uG,e),uq=null,uW.call(e))}function uG(e,t){if(!(4&t.state.loading)){var r=uq.get(e);if(r)var n=r.get(null);else{r=new Map,uq.set(e,r);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a<i.length;a++){var s=i[a];("LINK"===s.nodeName||"not all"!==s.getAttribute("media"))&&(r.set(s.dataset.precedence,s),n=s)}n&&r.set(null,n)}s=(i=t.instance).getAttribute("data-precedence"),(a=r.get(s)||n)===n&&r.set(null,i),r.set(s,i),this.count++,n=uW.bind(this),i.addEventListener("load",n),i.addEventListener("error",n),a?a.parentNode.insertBefore(i,a.nextSibling):(e=9===e.nodeType?e.head:e).insertBefore(i,e.firstChild),t.state.loading|=4}}var uQ={$$typeof:w,Provider:null,Consumer:null,_currentValue:L,_currentValue2:L,_threadCount:0};function uY(e,t,r,n,i,a,s,o){this.tag=1,this.containerInfo=e,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=eS(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=eS(0),this.hiddenUpdates=eS(null),this.identifierPrefix=n,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=o,this.incompleteTransitions=new Map}function uJ(e,t,r,n,i,a){i=i?r5:r5,null===n.context?n.context=i:n.pendingContext=i,(n=id(t)).payload={element:r},null!==(a=void 0===a?null:a)&&(n.callback=a),null!==(r=ih(e,n,t))&&(o5(r,e,t),ip(r,e,t))}function uX(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var r=e.retryLane;e.retryLane=0!==r&&r<t?r:t}}function uZ(e,t){uX(e,t),(e=e.alternate)&&uX(e,t)}function u0(e){if(13===e.tag){var t=r3(e,0x4000000);null!==t&&o5(t,e,0x4000000),uZ(e,0x4000000)}}var u1=!0;function u2(e,t,r,n){var i=N.T;N.T=null;var a=O.p;try{O.p=2,u4(e,t,r,n)}finally{O.p=a,N.T=i}}function u3(e,t,r,n){var i=N.T;N.T=null;var a=O.p;try{O.p=8,u4(e,t,r,n)}finally{O.p=a,N.T=i}}function u4(e,t,r,n){if(u1){var i=u6(n);if(null===i)lZ(e,t,n,u5,r),co(e,n);else if(function(e,t,r,n,i){switch(t){case"focusin":return ce=cl(ce,e,t,r,n,i),!0;case"dragenter":return ct=cl(ct,e,t,r,n,i),!0;case"mouseover":return cr=cl(cr,e,t,r,n,i),!0;case"pointerover":var a=i.pointerId;return cn.set(a,cl(cn.get(a)||null,e,t,r,n,i)),!0;case"gotpointercapture":return a=i.pointerId,ci.set(a,cl(ci.get(a)||null,e,t,r,n,i)),!0}return!1}(i,e,t,r,n))n.stopPropagation();else if(co(e,n),4&t&&-1<cs.indexOf(e)){for(;null!==i;){var a=eU(i);if(null!==a)switch(a.tag){case 3:if((a=a.stateNode).current.memoizedState.isDehydrated){var s=eg(a.pendingLanes);if(0!==s){var o=a;for(o.pendingLanes|=2,o.entangledLanes|=2;s;){var l=1<<31-ed(s);o.entanglements[1]|=l,s&=~l}lO(a),0==(6&oC)&&(oq=Z()+500,lL(0,!1))}}break;case 13:null!==(o=r3(a,2))&&o5(o,a,2),le(),uZ(a,2)}if(null===(a=u6(n))&&lZ(e,t,n,u5,r),a===i)break;i=a}null!==i&&n.stopPropagation()}else lZ(e,t,n,null,r)}}function u6(e){return u8(e=tm(e))}var u5=null;function u8(e){if(u5=null,null!==(e=eD(e))){var t=l(e);if(null===t)e=null;else{var r=t.tag;if(13===r){if(null!==(e=u(t)))return e;e=null}else if(3===r){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return u5=e,null}function u7(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ee()){case et:return 2;case er:return 8;case en:case ei:return 32;case ea:return 0x10000000;default:return 32}default:return 32}}var u9=!1,ce=null,ct=null,cr=null,cn=new Map,ci=new Map,ca=[],cs="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function co(e,t){switch(e){case"focusin":case"focusout":ce=null;break;case"dragenter":case"dragleave":ct=null;break;case"mouseover":case"mouseout":cr=null;break;case"pointerover":case"pointerout":cn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ci.delete(t.pointerId)}}function cl(e,t,r,n,i,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:a,targetContainers:[i]},null!==t&&null!==(t=eU(t))&&u0(t)):(e.eventSystemFlags|=n,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i)),e}function cu(e){var t=eD(e.target);if(null!==t){var r=l(t);if(null!==r){if(13===(t=r.tag)){if(null!==(t=u(r))){e.blockedOn=t,function(e,t){var r=O.p;try{return O.p=e,t()}finally{O.p=r}}(e.priority,function(){if(13===r.tag){var e=o4(),t=r3(r,e=e_(e));null!==t&&o5(t,r,e),uZ(r,e)}});return}}else if(3===t&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=3===r.tag?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function cc(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var r=u6(e.nativeEvent);if(null!==r)return null!==(t=eU(r))&&u0(t),e.blockedOn=r,!1;var n=new(r=e.nativeEvent).constructor(r.type,r);tp=n,r.target.dispatchEvent(n),tp=null,t.shift()}return!0}function cd(e,t,r){cc(e)&&r.delete(t)}function ch(){u9=!1,null!==ce&&cc(ce)&&(ce=null),null!==ct&&cc(ct)&&(ct=null),null!==cr&&cc(cr)&&(cr=null),cn.forEach(cd),ci.forEach(cd)}function cf(e,t){e.blockedOn===t&&(e.blockedOn=null,u9||(u9=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,ch)))}var cp=null;function cm(e){cp!==e&&(cp=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){cp===e&&(cp=null);for(var t=0;t<e.length;t+=3){var r=e[t],n=e[t+1],i=e[t+2];if("function"!=typeof n)if(null===u8(n||r))continue;else break;var a=eU(r);null!==a&&(e.splice(t,3),t-=3,aA(a,{pending:!0,data:i,method:r.method,action:n},n,i))}}))}function cg(e){function t(t){return cf(t,e)}null!==ce&&cf(ce,e),null!==ct&&cf(ct,e),null!==cr&&cf(cr,e),cn.forEach(t),ci.forEach(t);for(var r=0;r<ca.length;r++){var n=ca[r];n.blockedOn===e&&(n.blockedOn=null)}for(;0<ca.length&&null===(r=ca[0]).blockedOn;)cu(r),null===r.blockedOn&&ca.shift();if(null!=(r=(e.ownerDocument||e).$$reactFormReplay))for(n=0;n<r.length;n+=3){var i=r[n],a=r[n+1],s=i[eA]||null;if("function"==typeof a)s||cm(r);else if(s){var o=null;if(a&&a.hasAttribute("formAction")){if(i=a,s=a[eA]||null)o=s.formAction;else if(null!==u8(i))continue}else o=s.action;"function"==typeof o?r[n+1]=o:(r.splice(n,3),n-=3),cm(r)}}}function cv(e){this._internalRoot=e}function cy(e){this._internalRoot=e}cy.prototype.render=cv.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(o(409));uJ(t.current,o4(),e,t,null,null)},cy.prototype.unmount=cv.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;uJ(e.current,2,null,e,null,null),le(),t[eR]=null}},cy.prototype.unstable_scheduleHydration=function(e){if(e){var t=eI();e={blockedOn:null,target:e,priority:t};for(var r=0;r<ca.length&&0!==t&&t<ca[r].priority;r++);ca.splice(r,0,e),0===r&&cu(e)}};var cb=a.version;if("19.1.0"!==cb)throw Error(o(527,cb,"19.1.0"));if(O.findDOMNode=function(e){var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(o(188));throw Error(o(268,e=Object.keys(e).join(",")))}return null===(e=null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=l(e)))throw Error(o(188));return t!==e?null:e}for(var r=e,n=t;;){var i=r.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(n=i.return)){r=n;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===r)return c(i),e;if(a===n)return c(i),t;a=a.sibling}throw Error(o(188))}if(r.return!==n.return)r=i,n=a;else{for(var s=!1,u=i.child;u;){if(u===r){s=!0,r=i,n=a;break}if(u===n){s=!0,n=i,r=a;break}u=u.sibling}if(!s){for(u=a.child;u;){if(u===r){s=!0,r=a,n=i;break}if(u===n){s=!0,n=a,r=i;break}u=u.sibling}if(!s)throw Error(o(189))}}if(r.alternate!==n)throw Error(o(190))}if(3!==r.tag)throw Error(o(188));return r.stateNode.current===r?e:t}(t))?function e(t){var r=t.tag;if(5===r||26===r||27===r||6===r)return t;for(t=t.child;null!==t;){if(null!==(r=e(t)))return r;t=t.sibling}return null}(e):null)?null:e.stateNode},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var cw=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!cw.isDisabled&&cw.supportsFiber)try{el=cw.inject({bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:N,reconcilerVersion:"19.1.0"}),eu=cw}catch(e){}}t.createRoot=function(e,t){if(!(r=e)||1!==r.nodeType&&9!==r.nodeType&&11!==r.nodeType)throw Error(o(299));var r,n,i,a,s,l,u,c,d,h=!1,f="",p=so,m=sl,g=su,v=null;return null!=t&&(!0===t.unstable_strictMode&&(h=!0),void 0!==t.identifierPrefix&&(f=t.identifierPrefix),void 0!==t.onUncaughtError&&(p=t.onUncaughtError),void 0!==t.onCaughtError&&(m=t.onCaughtError),void 0!==t.onRecoverableError&&(g=t.onRecoverableError),void 0!==t.unstable_transitionCallbacks&&(v=t.unstable_transitionCallbacks)),n=e,i=1,a=!1,s=null,l=0,u=h,c=0,d=null,n=new uY(n,i,a,f,p,m,g,null),i=1,!0===u&&(i|=24),u=r7(3,null,null,i),n.current=u,u.stateNode=n,i=nQ(),i.refCount++,n.pooledCache=i,i.refCount++,u.memoizedState={element:null,isDehydrated:a,cache:i},iu(u),t=n,e[eR]=t.current,lJ(e),new cv(t)}},57:function(e,t,r){"use strict";var n=r(58);function i(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var s={d:{f:a,r:function(){throw Error(i(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},o=Symbol.for("react.portal"),l=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){return"font"===e?"":"string"==typeof t?"use-credentials"===t?t:"":void 0}t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,t.createPortal=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType)throw Error(i(299));return function(e,t,r){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:o,key:null==n?null:""+n,children:e,containerInfo:t,implementation:r}}(e,t,null,r)},t.flushSync=function(e){var t=l.T,r=s.p;try{if(l.T=null,s.p=2,e)return e()}finally{l.T=t,s.p=r,s.d.f()}},t.preconnect=function(e,t){"string"==typeof e&&(t=t?"string"==typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:null,s.d.C(e,t))},t.prefetchDNS=function(e){"string"==typeof e&&s.d.D(e)},t.preinit=function(e,t){if("string"==typeof e&&t&&"string"==typeof t.as){var r=t.as,n=u(r,t.crossOrigin),i="string"==typeof t.integrity?t.integrity:void 0,a="string"==typeof t.fetchPriority?t.fetchPriority:void 0;"style"===r?s.d.S(e,"string"==typeof t.precedence?t.precedence:void 0,{crossOrigin:n,integrity:i,fetchPriority:a}):"script"===r&&s.d.X(e,{crossOrigin:n,integrity:i,fetchPriority:a,nonce:"string"==typeof t.nonce?t.nonce:void 0})}},t.preinitModule=function(e,t){if("string"==typeof e)if("object"==typeof t&&null!==t){if(null==t.as||"script"===t.as){var r=u(t.as,t.crossOrigin);s.d.M(e,{crossOrigin:r,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0})}}else null==t&&s.d.M(e)},t.preload=function(e,t){if("string"==typeof e&&"object"==typeof t&&null!==t&&"string"==typeof t.as){var r=t.as,n=u(r,t.crossOrigin);s.d.L(e,r,{crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0,type:"string"==typeof t.type?t.type:void 0,fetchPriority:"string"==typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"string"==typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"==typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"==typeof t.imageSizes?t.imageSizes:void 0,media:"string"==typeof t.media?t.media:void 0})}},t.preloadModule=function(e,t){if("string"==typeof e)if(t){var r=u(t.as,t.crossOrigin);s.d.m(e,{as:"string"==typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:r,integrity:"string"==typeof t.integrity?t.integrity:void 0})}else s.d.m(e)},t.requestFormReset=function(e){s.d.r(e)},t.unstable_batchedUpdates=function(e,t){return e(t)},t.useFormState=function(e,t,r){return l.H.useFormState(e,t,r)},t.useFormStatus=function(){return l.H.useHostTransitionStatus()},t.version="19.1.0"},566: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(51)},309: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(57)},208:function(e,t){"use strict";var r=Symbol.for("react.transitional.element");function n(e,t,n){var i=null;if(void 0!==n&&(i=""+n),void 0!==t.key&&(i=""+t.key),"key"in t)for(var a in n={},t)"key"!==a&&(n[a]=t[a]);else n=t;return{$$typeof:r,type:e,key:i,ref:void 0!==(t=n.ref)?t:null,props:n}}t.Fragment=Symbol.for("react.fragment"),t.jsx=n,t.jsxs=n},955:function(e,t){"use strict";var r=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),f=Symbol.iterator,p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function v(e,t,r){this.props=e,this.context=t,this.refs=g,this.updater=r||p}function y(){}function b(e,t,r){this.props=e,this.context=t,this.refs=g,this.updater=r||p}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=v.prototype;var w=b.prototype=new y;w.constructor=b,m(w,v.prototype),w.isPureReactComponent=!0;var S=Array.isArray,k={H:null,A:null,T:null,S:null,V:null},E=Object.prototype.hasOwnProperty;function x(e,t,n,i,a,s){return{$$typeof:r,type:e,key:t,ref:void 0!==(n=s.ref)?n:null,props:s}}function _(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}var C=/\/+/g;function I(e,t){var r,n;return"object"==typeof e&&null!==e&&null!=e.key?(r=""+e.key,n={"=":"=0",":":"=2"},"$"+r.replace(/[=:]/g,function(e){return n[e]})):t.toString(36)}function T(){}function P(e,t,i){if(null==e)return e;var a=[],s=0;return!function e(t,i,a,s,o){var l,u,c,d=typeof t;("undefined"===d||"boolean"===d)&&(t=null);var p=!1;if(null===t)p=!0;else switch(d){case"bigint":case"string":case"number":p=!0;break;case"object":switch(t.$$typeof){case r:case n:p=!0;break;case h:return e((p=t._init)(t._payload),i,a,s,o)}}if(p)return o=o(t),p=""===s?"."+I(t,0):s,S(o)?(a="",null!=p&&(a=p.replace(C,"$&/")+"/"),e(o,i,a,"",function(e){return e})):null!=o&&(_(o)&&(l=o,u=a+(null==o.key||t&&t.key===o.key?"":(""+o.key).replace(C,"$&/")+"/")+p,o=x(l.type,u,void 0,void 0,void 0,l.props)),i.push(o)),1;p=0;var m=""===s?".":s+":";if(S(t))for(var g=0;g<t.length;g++)d=m+I(s=t[g],g),p+=e(s,i,a,d,o);else if("function"==typeof(g=null===(c=t)||"object"!=typeof c?null:"function"==typeof(c=f&&c[f]||c["@@iterator"])?c:null))for(t=g.call(t),g=0;!(s=t.next()).done;)d=m+I(s=s.value,g++),p+=e(s,i,a,d,o);else if("object"===d){if("function"==typeof t.then)return e(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(T,T):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(t),i,a,s,o);throw Error("Objects are not valid as a React child (found: "+("[object Object]"===(i=String(t))?"object with keys {"+Object.keys(t).join(", ")+"}":i)+"). If you meant to render a collection of children, use an array instead.")}return p}(e,a,"","",function(e){return t.call(i,e,s++)}),a}function A(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){(0===e._status||-1===e._status)&&(e._status=1,e._result=t)},function(t){(0===e._status||-1===e._status)&&(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var R="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)};function N(){}t.Children={map:P,forEach:function(e,t,r){P(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!_(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=v,t.Fragment=i,t.Profiler=s,t.PureComponent=b,t.StrictMode=a,t.Suspense=c,t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=k,t.__COMPILER_RUNTIME={__proto__:null,c:function(e){return k.H.useMemoCache(e)}},t.cache=function(e){return function(){return e.apply(null,arguments)}},t.cloneElement=function(e,t,r){if(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var n=m({},e.props),i=e.key,a=void 0;if(null!=t)for(s in void 0!==t.ref&&(a=void 0),void 0!==t.key&&(i=""+t.key),t)E.call(t,s)&&"key"!==s&&"__self"!==s&&"__source"!==s&&("ref"!==s||void 0!==t.ref)&&(n[s]=t[s]);var s=arguments.length-2;if(1===s)n.children=r;else if(1<s){for(var o=Array(s),l=0;l<s;l++)o[l]=arguments[l+2];n.children=o}return x(e.type,i,void 0,void 0,a,n)},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:o,_context:e},e},t.createElement=function(e,t,r){var n,i={},a=null;if(null!=t)for(n in void 0!==t.key&&(a=""+t.key),t)E.call(t,n)&&"key"!==n&&"__self"!==n&&"__source"!==n&&(i[n]=t[n]);var s=arguments.length-2;if(1===s)i.children=r;else if(1<s){for(var o=Array(s),l=0;l<s;l++)o[l]=arguments[l+2];i.children=o}if(e&&e.defaultProps)for(n in s=e.defaultProps)void 0===i[n]&&(i[n]=s[n]);return x(e,a,void 0,void 0,null,i)},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=_,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:A}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=k.T,r={};k.T=r;try{var n=e(),i=k.S;null!==i&&i(r,n),"object"==typeof n&&null!==n&&"function"==typeof n.then&&n.then(N,R)}catch(e){R(e)}finally{k.T=t}},t.unstable_useCacheRefresh=function(){return k.H.useCacheRefresh()},t.use=function(e){return k.H.use(e)},t.useActionState=function(e,t,r){return k.H.useActionState(e,t,r)},t.useCallback=function(e,t){return k.H.useCallback(e,t)},t.useContext=function(e){return k.H.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e,t){return k.H.useDeferredValue(e,t)},t.useEffect=function(e,t,r){var n=k.H;if("function"==typeof r)throw Error("useEffect CRUD overload is not enabled in this build of React.");return n.useEffect(e,t)},t.useId=function(){return k.H.useId()},t.useImperativeHandle=function(e,t,r){return k.H.useImperativeHandle(e,t,r)},t.useInsertionEffect=function(e,t){return k.H.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return k.H.useLayoutEffect(e,t)},t.useMemo=function(e,t){return k.H.useMemo(e,t)},t.useOptimistic=function(e,t){return k.H.useOptimistic(e,t)},t.useReducer=function(e,t,r){return k.H.useReducer(e,t,r)},t.useRef=function(e){return k.H.useRef(e)},t.useState=function(e){return k.H.useState(e)},t.useSyncExternalStore=function(e,t,r){return k.H.useSyncExternalStore(e,t,r)},t.useTransition=function(){return k.H.useTransition()},t.version="19.1.0"},58:function(e,t,r){"use strict";e.exports=r(955)},410:function(e,t,r){"use strict";e.exports=r(208)},927:function(e){var t=function(e){"use strict";var t,r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",o=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function c(e,r,n,a){var s,o,l,u,c=Object.create((r&&r.prototype instanceof g?r:g).prototype);return i(c,"_invoke",{value:(s=e,o=n,l=new I(a||[]),u=h,function(e,r){if(u===f)throw Error("Generator is already running");if(u===p){if("throw"===e)throw r;return P()}for(l.method=e,l.arg=r;;){var n=l.delegate;if(n){var i=function e(r,n){var i=n.method,a=r.iterator[i];if(t===a)return(n.delegate=null,"throw"===i&&r.iterator.return&&(n.method="return",n.arg=t,e(r,n),"throw"===n.method))?m:("return"!==i&&(n.method="throw",n.arg=TypeError("The iterator does not provide a '"+i+"' method")),m);var s=d(a,r.iterator,n.arg);if("throw"===s.type)return n.method="throw",n.arg=s.arg,n.delegate=null,m;var o=s.arg;return o?o.done?(n[r.resultName]=o.value,n.next=r.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):o:(n.method="throw",n.arg=TypeError("iterator result is not an object"),n.delegate=null,m)}(n,l);if(i){if(i===m)continue;return i}}if("next"===l.method)l.sent=l._sent=l.arg;else if("throw"===l.method){if(u===h)throw u=p,l.arg;l.dispatchException(l.arg)}else"return"===l.method&&l.abrupt("return",l.arg);u=f;var a=d(s,o,l);if("normal"===a.type){if(u=l.done?p:"suspendedYield",a.arg===m)continue;return{value:a.arg,done:l.done}}"throw"===a.type&&(u=p,l.method="throw",l.arg=a.arg)}})}),c}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var h="suspendedStart",f="executing",p="completed",m={};function g(){}function v(){}function y(){}var b={};u(b,s,function(){return this});var w=Object.getPrototypeOf,S=w&&w(w(T([])));S&&S!==r&&n.call(S,s)&&(b=S);var k=y.prototype=g.prototype=Object.create(b);function E(e){["next","throw","return"].forEach(function(t){u(e,t,function(e){return this._invoke(t,e)})})}function x(e,t){var r;i(this,"_invoke",{value:function(i,a){function s(){return new t(function(r,s){!function r(i,a,s,o){var l=d(e[i],e,a);if("throw"===l.type)o(l.arg);else{var u=l.arg,c=u.value;return c&&"object"==typeof c&&n.call(c,"__await")?t.resolve(c.__await).then(function(e){r("next",e,s,o)},function(e){r("throw",e,s,o)}):t.resolve(c).then(function(e){u.value=e,s(u)},function(e){return r("throw",e,s,o)})}}(i,a,r,s)})}return r=r?r.then(s,s):s()}})}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function T(e){if(e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}return{next:P}}function P(){return{value:t,done:!0}}return v.prototype=y,i(k,"constructor",{value:y,configurable:!0}),i(y,"constructor",{value:v,configurable:!0}),v.displayName=u(y,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,u(e,l,"GeneratorFunction")),e.prototype=Object.create(k),e},e.awrap=function(e){return{__await:e}},E(x.prototype),u(x.prototype,o,function(){return this}),e.AsyncIterator=x,e.async=function(t,r,n,i,a){void 0===a&&(a=Promise);var s=new x(c(t,r,n,i),a);return e.isGeneratorFunction(r)?s:s.next().then(function(e){return e.done?e.value:s.next()})},E(k),u(k,l,"Generator"),u(k,s,function(){return this}),u(k,"toString",function(){return"[object Generator]"}),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=T,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return o.type="throw",o.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],o=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var l=n.call(s,"catchLoc"),u=n.call(s,"finallyLoc");if(l&&u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);else if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(l){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else if(u){if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else throw Error("try statement without catch or finally")}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return(s.type=e,s.arg=t,a)?(this.method="next",this.next=a.finallyLoc,m):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;C(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},488:function(e,t){"use strict";function r(e,t){var r=e.length;for(e.push(t);0<r;){var n=r-1>>>1,i=e[n];if(0<a(i,t))e[n]=t,e[r]=i,r=n;else break}}function n(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;for(var n=0,i=e.length,s=i>>>1;n<s;){var o=2*(n+1)-1,l=e[o],u=o+1,c=e[u];if(0>a(l,r))u<i&&0>a(c,l)?(e[n]=c,e[u]=r,n=u):(e[n]=l,e[o]=r,n=o);else if(u<i&&0>a(c,r))e[n]=c,e[u]=r,n=u;else break}}return t}function a(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 s,o=performance;t.unstable_now=function(){return o.now()}}else{var l=Date,u=l.now();t.unstable_now=function(){return l.now()-u}}var c=[],d=[],h=1,f=null,p=3,m=!1,g=!1,v=!1,y=!1,b="function"==typeof setTimeout?setTimeout:null,w="function"==typeof clearTimeout?clearTimeout:null,S="undefined"!=typeof setImmediate?setImmediate:null;function k(e){for(var t=n(d);null!==t;){if(null===t.callback)i(d);else if(t.startTime<=e)i(d),t.sortIndex=t.expirationTime,r(c,t);else break;t=n(d)}}function E(e){if(v=!1,k(e),!g)if(null!==n(c))g=!0,x||(x=!0,s());else{var t=n(d);null!==t&&N(E,t.startTime-e)}}var x=!1,_=-1,C=5,I=-1;function T(){return!!y||!(t.unstable_now()-I<C)}function P(){if(y=!1,x){var e=t.unstable_now();I=e;var r=!0;try{e:{g=!1,v&&(v=!1,w(_),_=-1),m=!0;var a=p;try{t:{for(k(e),f=n(c);null!==f&&!(f.expirationTime>e&&T());){var o=f.callback;if("function"==typeof o){f.callback=null,p=f.priorityLevel;var l=o(f.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof l){f.callback=l,k(e),r=!0;break t}f===n(c)&&i(c),k(e)}else i(c);f=n(c)}if(null!==f)r=!0;else{var u=n(d);null!==u&&N(E,u.startTime-e),r=!1}}break e}finally{f=null,p=a,m=!1}}}finally{r?s():x=!1}}}if("function"==typeof S)s=function(){S(P)};else if("undefined"!=typeof MessageChannel){var A=new MessageChannel,R=A.port2;A.port1.onmessage=P,s=function(){R.postMessage(null)}}else s=function(){b(P,0)};function N(e,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_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var r=p;p=t;try{return e()}finally{p=r}},t.unstable_requestPaint=function(){y=!0},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=p;p=e;try{return t()}finally{p=r}},t.unstable_scheduleCallback=function(e,i,a){var o=t.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0<a?o+a:o,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=0x3fffffff;break;case 4:l=1e4;break;default:l=5e3}return l=a+l,e={id:h++,callback:i,priorityLevel:e,startTime:a,expirationTime:l,sortIndex:-1},a>o?(e.sortIndex=a,r(d,e),null===n(c)&&e===n(d)&&(v?(w(_),_=-1):v=!0,N(E,a-o))):(e.sortIndex=l,r(c,e),g||m||(g=!0,x||(x=!0,s()))),e},t.unstable_shouldYield=T,t.unstable_wrapCallback=function(e){var t=p;return function(){var r=p;p=t;try{return e.apply(this,arguments)}finally{p=r}}}},253:function(e,t,r){"use strict";e.exports=r(488)},606:function(e,t,r){"use strict";var n=r(58),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=n.useState,s=n.useEffect,o=n.useLayoutEffect,l=n.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=a({inst:{value:r,getSnapshot:t}}),i=n[0].inst,c=n[1];return o(function(){i.value=r,i.getSnapshot=t,u(i)&&c({inst:i})},[e,r,t]),s(function(){return u(i)&&c({inst:i}),e(function(){u(i)&&c({inst:i})})},[e]),l(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:c},649:function(e,t,r){"use strict";var n=r(58),i=r(801),a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=i.useSyncExternalStore,o=n.useRef,l=n.useEffect,u=n.useMemo,c=n.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,r,n,i){var d=o(null);if(null===d.current){var h={hasValue:!1,value:null};d.current=h}else h=d.current;var f=s(e,(d=u(function(){function e(e){if(!l){if(l=!0,s=e,e=n(e),void 0!==i&&h.hasValue){var t=h.value;if(i(t,e))return o=t}return o=e}if(t=o,a(s,e))return t;var r=n(e);return void 0!==i&&i(t,r)?(s=e,t):(s=e,o=r)}var s,o,l=!1,u=void 0===r?null:r;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]},[t,r,n,i]))[0],d[1]);return l(function(){h.hasValue=!0,h.value=f},[f]),c(f),f}},801:function(e,t,r){"use strict";e.exports=r(606)},791:function(e,t,r){"use strict";e.exports=r(649)},878:function(e,t,r){"use strict";e.exports={}},99:function(e){"use strict";e.exports=require("@tern-secure/shared/caseUtils")},973:function(e){"use strict";e.exports=require("@tern-secure/shared/react")},907:function(e){"use strict";e.exports=require("@tern-secure/shared/url")},238:function(e,t,r){"use strict";function n(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=function e(t){var r,n,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t)){var a=t.length;for(r=0;r<a;r++)t[r]&&(n=e(t[r]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}(e))&&(n&&(n+=" "),n+=t);return n}r.d(t,{$:()=>n})}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}r.m=e,r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},i=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,t){if(1&t&&(e=this(e)),8&t||"object"==typeof e&&e&&(4&t&&e.__esModule||16&t&&"function"==typeof e.then))return e;var a=Object.create(null);r.r(a);var s={};n=n||[null,i({}),i([]),i(i)];for(var o=2&t&&e;("object"==typeof o||"function"==typeof o)&&!~n.indexOf(o);o=i(o))Object.getOwnPropertyNames(o).forEach(t=>{s[t]=()=>e[t]});return s.default=()=>e,r.d(a,s),a},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.k=e=>""+e+".css",r.h=()=>"0361e966dcf15d5d",r.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.g.importScripts&&(a=r.g.location+"");var n,i,a,s=r.g.document;if(!a&&s&&(s.currentScript&&"SCRIPT"===s.currentScript.tagName.toUpperCase()&&(a=s.currentScript.src),!a)){var o=s.getElementsByTagName("script");if(o.length)for(var l=o.length-1;l>-1&&(!a||!/^http(s?):/.test(a));)a=o[l--].src}if(!a)throw Error("Automatic publicPath is not supported in this browser");r.p=a=a.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/");var u={};(()=>{"use strict";let e,t,n;r.r(u),r.d(u,{TernSecureAuth:()=>aE}),r(927);let i=require("@tern-secure/shared/errors"),a=require("@tern-secure/shared/ternStatusEvent");var s,o,l,c=r(907);let d=require("@tern-secure/shared/utils"),h=function(e){let t=[],r=0;for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);i<128?t[r++]=i:(i<2048?t[r++]=i>>6|192:((64512&i)==55296&&n+1<e.length&&(64512&e.charCodeAt(n+1))==56320?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++n)),t[r++]=i>>18|240,t[r++]=i>>12&63|128):t[r++]=i>>12|224,t[r++]=i>>6&63|128),t[r++]=63&i|128)}return t},f=function(e){let t=[],r=0,n=0;for(;r<e.length;){let i=e[r++];if(i<128)t[n++]=String.fromCharCode(i);else if(i>191&&i<224){let a=e[r++];t[n++]=String.fromCharCode((31&i)<<6|63&a)}else if(i>239&&i<365){let a=((7&i)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++])-65536;t[n++]=String.fromCharCode(55296+(a>>10)),t[n++]=String.fromCharCode(56320+(1023&a))}else{let a=e[r++],s=e[r++];t[n++]=String.fromCharCode((15&i)<<12|(63&a)<<6|63&s)}}return t.join("")},p={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(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();let r=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,n=[];for(let t=0;t<e.length;t+=3){let i=e[t],a=t+1<e.length,s=a?e[t+1]:0,o=t+2<e.length,l=o?e[t+2]:0,u=i>>2,c=(3&i)<<4|s>>4,d=(15&s)<<2|l>>6,h=63&l;!o&&(h=64,a||(d=64)),n.push(r[u],r[c],r[d],r[h])}return n.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(h(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):f(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();let r=t?this.charToByteMapWebSafe_:this.charToByteMap_,n=[];for(let t=0;t<e.length;){let i=r[e.charAt(t++)],a=t<e.length?r[e.charAt(t)]:0,s=++t<e.length?r[e.charAt(t)]:64,o=++t<e.length?r[e.charAt(t)]:64;if(++t,null==i||null==a||null==s||null==o)throw new m;let l=i<<2|a>>4;if(n.push(l),64!==s){let e=a<<4&240|s>>2;if(n.push(e),64!==o){let e=s<<6&192|o;n.push(e)}}}return n},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class m extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}let g=function(e){let t=h(e);return p.encodeByteArray(t,!0)},v=function(e){return g(e).replace(/\./g,"")},y=function(e){try{return p.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};function b(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw Error("Unable to locate global object.")}let w=()=>{try{return b().__FIREBASE_DEFAULTS__||(()=>{if("undefined"==typeof process||void 0===process.env)return;let e=process.env.__FIREBASE_DEFAULTS__;if(e)return JSON.parse(e)})()||(()=>{let e;if("undefined"==typeof document)return;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(e){return}let t=e&&y(e[1]);return t&&JSON.parse(t)})()}catch(e){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);return}},S=()=>w()?.config;class k{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}wrapCallback(e){return(t,r)=>{t?this.reject(t):this.resolve(r),"function"==typeof e&&(this.promise.catch(()=>{}),1===e.length?e(t):e(t,r))}}}function E(e){try{return(e.startsWith("http://")||e.startsWith("https://")?new URL(e).hostname:e).endsWith(".cloudworkstations.dev")}catch{return!1}}async function x(e){return(await fetch(e,{credentials:"include"})).ok}let _={},C=!1;function I(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function T(){try{return"object"==typeof indexedDB}catch(e){return!1}}class P extends Error{constructor(e,t,r){super(t),this.code=e,this.customData=r,this.name="FirebaseError",Object.setPrototypeOf(this,P.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,A.prototype.create)}}class A{constructor(e,t,r){this.service=e,this.serviceName=t,this.errors=r}create(e,...t){var r,n;let i=t[0]||{},a=`${this.service}/${e}`,s=this.errors[e],o=s?(r=s,n=i,r.replace(R,(e,t)=>{let r=n[t];return null!=r?String(r):`<${t}?>`})):"Error",l=`${this.serviceName}: ${o} (${a}).`;return new P(a,l,i)}}let R=/\{\$([^}]+)}/g;function N(e,t){if(e===t)return!0;let r=Object.keys(e),n=Object.keys(t);for(let i of r){if(!n.includes(i))return!1;let r=e[i],a=t[i];if(O(r)&&O(a)){if(!N(r,a))return!1}else if(r!==a)return!1}for(let e of n)if(!r.includes(e))return!1;return!0}function O(e){return null!==e&&"object"==typeof e}function L(e){let t=[];for(let[r,n]of Object.entries(e))Array.isArray(n)?n.forEach(e=>{t.push(encodeURIComponent(r)+"="+encodeURIComponent(e))}):t.push(encodeURIComponent(r)+"="+encodeURIComponent(n));return t.length?"&"+t.join("&"):""}function M(e){let t={};return e.replace(/^\?/,"").split("&").forEach(e=>{if(e){let[r,n]=e.split("=");t[decodeURIComponent(r)]=decodeURIComponent(n)}}),t}function F(e){let t=e.indexOf("?");if(!t)return"";let r=e.indexOf("#",t);return e.substring(t,r>0?r:void 0)}class j{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(()=>{e(this)}).catch(e=>{this.error(e)})}next(e){this.forEachObserver(t=>{t.next(e)})}error(e){this.forEachObserver(t=>{t.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,t,r){let n;if(void 0===e&&void 0===t&&void 0===r)throw Error("Missing Observer.");void 0===(n=!function(e,t){if("object"!=typeof e||null===e)return!1;for(let r of t)if(r in e&&"function"==typeof e[r])return!0;return!1}(e,["next","error","complete"])?{next:e,error:t,complete:r}:e).next&&(n.next=D),void 0===n.error&&(n.error=D),void 0===n.complete&&(n.complete=D);let i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?n.error(this.finalError):n.complete()}catch(e){}}),this.observers.push(n),i}unsubscribeOne(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let t=0;t<this.observers.length;t++)this.sendOne(t,e)}sendOne(e,t){this.task.then(()=>{if(void 0!==this.observers&&void 0!==this.observers[e])try{t(this.observers[e])}catch(e){"undefined"!=typeof console&&console.error&&console.error(e)}})}close(e){this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function D(){}function U(e){return e&&e._delegate?e._delegate:e}class z{constructor(e,t,r){this.name=e,this.instanceFactory=t,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}let V="[DEFAULT]";class ${constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){let t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){let e=new k;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{let r=this.getOrInitializeService({instanceIdentifier:t});r&&e.resolve(r)}catch(e){}}return this.instancesDeferred.get(t).promise}getImmediate(e){let t=this.normalizeInstanceIdentifier(e?.identifier),r=e?.optional??!1;if(this.isInitialized(t)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:t})}catch(e){if(r)return null;throw e}if(r)return null;throw Error(`Service ${this.name} is not available`)}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,this.shouldAutoInitialize()){if("EAGER"===e.instantiationMode)try{this.getOrInitializeService({instanceIdentifier:V})}catch(e){}for(let[e,t]of this.instancesDeferred.entries()){let r=this.normalizeInstanceIdentifier(e);try{let e=this.getOrInitializeService({instanceIdentifier:r});t.resolve(e)}catch(e){}}}}clearInstance(e=V){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){let e=Array.from(this.instances.values());await Promise.all([...e.filter(e=>"INTERNAL"in e).map(e=>e.INTERNAL.delete()),...e.filter(e=>"_delete"in e).map(e=>e._delete())])}isComponentSet(){return null!=this.component}isInitialized(e=V){return this.instances.has(e)}getOptions(e=V){return this.instancesOptions.get(e)||{}}initialize(e={}){let{options:t={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);let n=this.getOrInitializeService({instanceIdentifier:r,options:t});for(let[e,t]of this.instancesDeferred.entries())r===this.normalizeInstanceIdentifier(e)&&t.resolve(n);return n}onInit(e,t){let r=this.normalizeInstanceIdentifier(t),n=this.onInitCallbacks.get(r)??new Set;n.add(e),this.onInitCallbacks.set(r,n);let i=this.instances.get(r);return i&&e(i,r),()=>{n.delete(e)}}invokeOnInitCallbacks(e,t){let r=this.onInitCallbacks.get(t);if(r)for(let n of r)try{n(e,t)}catch{}}getOrInitializeService({instanceIdentifier:e,options:t={}}){var r;let n=this.instances.get(e);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:(r=e)===V?void 0:r,options:t}),this.instances.set(e,n),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(n,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,n)}catch{}return n||null}normalizeInstanceIdentifier(e=V){return this.component?this.component.multipleInstances?e:V:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class B{constructor(e){this.name=e,this.providers=new Map}addComponent(e){let t=this.getProvider(e.name);if(t.isComponentSet())throw Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);let t=new $(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}let H=[];(s=l||(l={}))[s.DEBUG=0]="DEBUG",s[s.VERBOSE=1]="VERBOSE",s[s.INFO=2]="INFO",s[s.WARN=3]="WARN",s[s.ERROR=4]="ERROR",s[s.SILENT=5]="SILENT";let W={debug:l.DEBUG,verbose:l.VERBOSE,info:l.INFO,warn:l.WARN,error:l.ERROR,silent:l.SILENT},q=l.INFO,K={[l.DEBUG]:"log",[l.VERBOSE]:"log",[l.INFO]:"info",[l.WARN]:"warn",[l.ERROR]:"error"},G=(e,t,...r)=>{if(t<e.logLevel)return;let n=new Date().toISOString(),i=K[t];if(i)console[i](`[${n}] ${e.name}:`,...r);else throw Error(`Attempted to log a message with an invalid logType (value: ${t})`)};class Q{constructor(e){this.name=e,this._logLevel=q,this._logHandler=G,this._userLogHandler=null,H.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in l))throw TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?W[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!=typeof e)throw TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,l.DEBUG,...e),this._logHandler(this,l.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,l.VERBOSE,...e),this._logHandler(this,l.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,l.INFO,...e),this._logHandler(this,l.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,l.WARN,...e),this._logHandler(this,l.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,l.ERROR,...e),this._logHandler(this,l.ERROR,...e)}}let Y=new WeakMap,J=new WeakMap,X=new WeakMap,Z=new WeakMap,ee=new WeakMap,et={get(e,t,r){if(e instanceof IDBTransaction){if("done"===t)return J.get(e);if("objectStoreNames"===t)return e.objectStoreNames||X.get(e);if("store"===t)return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return er(e[t])},set:(e,t,r)=>(e[t]=r,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function er(r){if(r instanceof IDBRequest){let e;return(e=new Promise((e,t)=>{let n=()=>{r.removeEventListener("success",i),r.removeEventListener("error",a)},i=()=>{e(er(r.result)),n()},a=()=>{t(r.error),n()};r.addEventListener("success",i),r.addEventListener("error",a)})).then(e=>{e instanceof IDBCursor&&Y.set(e,r)}).catch(()=>{}),ee.set(e,r),e}if(Z.has(r))return Z.get(r);let n=function(r){if("function"==typeof r)return r!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(t||(t=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(r)?function(...e){return r.apply(en(this),e),er(Y.get(this))}:function(...e){return er(r.apply(en(this),e))}:function(e,...t){let n=r.call(en(this),e,...t);return X.set(n,e.sort?e.sort():[e]),er(n)};return r instanceof IDBTransaction&&function(e){if(J.has(e))return;let t=new Promise((t,r)=>{let n=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",a),e.removeEventListener("abort",a)},i=()=>{t(),n()},a=()=>{r(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",i),e.addEventListener("error",a),e.addEventListener("abort",a)});J.set(e,t)}(r),(e||(e=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some(e=>r instanceof e)?new Proxy(r,et):r}(r);return n!==r&&(Z.set(r,n),ee.set(n,r)),n}let en=e=>ee.get(e);function ei(e,t,{blocked:r,upgrade:n,blocking:i,terminated:a}={}){let s=indexedDB.open(e,t),o=er(s);return n&&s.addEventListener("upgradeneeded",e=>{n(er(s.result),e.oldVersion,e.newVersion,er(s.transaction),e)}),r&&s.addEventListener("blocked",e=>r(e.oldVersion,e.newVersion,e)),o.then(e=>{a&&e.addEventListener("close",()=>a()),i&&e.addEventListener("versionchange",e=>i(e.oldVersion,e.newVersion,e))}).catch(()=>{}),o}let ea=["get","getKey","getAll","getAllKeys","count"],es=["put","add","delete","clear"],eo=new Map;function el(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&"string"==typeof t))return;if(eo.get(t))return eo.get(t);let r=t.replace(/FromIndex$/,""),n=t!==r,i=es.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||ea.includes(r)))return;let a=async function(e,...t){let a=this.transaction(e,i?"readwrite":"readonly"),s=a.store;return n&&(s=s.index(t.shift())),(await Promise.all([s[r](...t),i&&a.done]))[0]};return eo.set(t,a),a}et={...n=et,get:(e,t,r)=>el(e,t)||n.get(e,t,r),has:(e,t)=>!!el(e,t)||n.has(e,t)};class eu{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(e=>{let t;if(t=e.getComponent(),t?.type!=="VERSION")return null;{let t=e.getImmediate();return`${t.library}/${t.version}`}}).filter(e=>e).join(" ")}}let ec="@firebase/app",ed="0.14.2",eh=new Q("@firebase/app"),ef="[DEFAULT]",ep={[ec]:"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/data-connect":"fire-data-connect","@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","@firebase/ai":"fire-vertex","fire-js":"fire-js",firebase:"fire-js-all"},em=new Map,eg=new Map,ev=new Map;function ey(e,t){try{e.container.addComponent(t)}catch(r){eh.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,r)}}function eb(e){let t=e.name;if(ev.has(t))return eh.debug(`There were multiple attempts to register component ${t}.`),!1;for(let r of(ev.set(t,e),em.values()))ey(r,e);for(let t of eg.values())ey(t,e);return!0}function ew(e,t){let r=e.container.getProvider("heartbeat").getImmediate({optional:!0});return r&&r.triggerHeartbeat(),e.container.getProvider(t)}function eS(e){return null!=e&&void 0!==e.settings}let ek=new A("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","server-app-deleted":"Firebase Server App has been 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}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."});class eE{constructor(e,t,r){this._isDeleted=!1,this._options={...e},this._config={...t},this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new z("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}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(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw ek.create("app-deleted",{appName:this._name})}}let ex="12.2.0";function e_(e,t={}){let r=e;"object"!=typeof t&&(t={name:t});let n={name:ef,automaticDataCollectionEnabled:!0,...t},i=n.name;if("string"!=typeof i||!i)throw ek.create("bad-app-name",{appName:String(i)});if(r||(r=S()),!r)throw ek.create("no-options");let a=em.get(i);if(a)if(N(r,a.options)&&N(n,a.config))return a;else throw ek.create("duplicate-app",{appName:i});let s=new B(i);for(let e of ev.values())s.addComponent(e);let o=new eE(r,n,s);return em.set(i,o),o}function eC(e=ef){let t=em.get(e);if(!t&&e===ef&&S())return e_();if(!t)throw ek.create("no-app",{appName:e});return t}function eI(){return Array.from(em.values())}function eT(e,t,r){let n=ep[e]??e;r&&(n+=`-${r}`);let i=n.match(/\s|\//),a=t.match(/\s|\//);if(i||a){let e=[`Unable to register library "${n}" with version "${t}":`];i&&e.push(`library name "${n}" contains illegal characters (whitespace or "/")`),i&&a&&e.push("and"),a&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),eh.warn(e.join(" "));return}eb(new z(`${n}-version`,()=>({library:n,version:t}),"VERSION"))}let eP="firebase-heartbeat-store",eA=null;function eR(){return eA||(eA=ei("firebase-heartbeat-database",1,{upgrade:(e,t)=>{if(0===t)try{e.createObjectStore(eP)}catch(e){console.warn(e)}}}).catch(e=>{throw ek.create("idb-open",{originalErrorMessage:e.message})})),eA}async function eN(e){try{let t=(await eR()).transaction(eP),r=await t.objectStore(eP).get(eL(e));return await t.done,r}catch(e){if(e instanceof P)eh.warn(e.message);else{let t=ek.create("idb-get",{originalErrorMessage:e?.message});eh.warn(t.message)}}}async function eO(e,t){try{let r=(await eR()).transaction(eP,"readwrite"),n=r.objectStore(eP);await n.put(t,eL(e)),await r.done}catch(e){if(e instanceof P)eh.warn(e.message);else{let t=ek.create("idb-set",{originalErrorMessage:e?.message});eh.warn(t.message)}}}function eL(e){return`${e.name}!${e.options.appId}`}class eM{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new ej(t),this._heartbeatsCachePromise=this._storage.read().then(e=>(this._heartbeatsCache=e,e))}async triggerHeartbeat(){try{let e=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),t=eF();if(this._heartbeatsCache?.heartbeats==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,this._heartbeatsCache?.heartbeats==null)||this._heartbeatsCache.lastSentHeartbeatDate===t||this._heartbeatsCache.heartbeats.some(e=>e.date===t))return;if(this._heartbeatsCache.heartbeats.push({date:t,agent:e}),this._heartbeatsCache.heartbeats.length>30){let e=function(e){if(0===e.length)return -1;let t=0,r=e[0].date;for(let n=1;n<e.length;n++)e[n].date<r&&(r=e[n].date,t=n);return t}(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(e,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(e){eh.warn(e)}}async getHeartbeatsHeader(){try{if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,this._heartbeatsCache?.heartbeats==null||0===this._heartbeatsCache.heartbeats.length)return"";let e=eF(),{heartbeatsToSend:t,unsentEntries:r}=function(e,t=1024){let r=[],n=e.slice();for(let i of e){let e=r.find(e=>e.agent===i.agent);if(e){if(e.dates.push(i.date),eD(r)>t){e.dates.pop();break}}else if(r.push({agent:i.agent,dates:[i.date]}),eD(r)>t){r.pop();break}n=n.slice(1)}return{heartbeatsToSend:r,unsentEntries:n}}(this._heartbeatsCache.heartbeats),n=v(JSON.stringify({version:2,heartbeats:t}));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)),n}catch(e){return eh.warn(e),""}}}function eF(){return new Date().toISOString().substring(0,10)}class ej{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!T()&&new Promise((e,t)=>{try{let r=!0,n="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(n);i.onsuccess=()=>{i.result.close(),r||self.indexedDB.deleteDatabase(n),e(!0)},i.onupgradeneeded=()=>{r=!1},i.onerror=()=>{t(i.error?.message||"")}}catch(e){t(e)}}).then(()=>!0).catch(()=>!1)}async read(){if(!await this._canUseIndexedDBPromise)return{heartbeats:[]};{let e=await eN(this.app);return e?.heartbeats?e:{heartbeats:[]}}}async overwrite(e){if(await this._canUseIndexedDBPromise){let t=await this.read();return eO(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??t.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){if(await this._canUseIndexedDBPromise){let t=await this.read();return eO(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??t.lastSentHeartbeatDate,heartbeats:[...t.heartbeats,...e.heartbeats]})}}}function eD(e){return v(JSON.stringify({version:2,heartbeats:e})).length}eb(new z("platform-logger",e=>new eu(e),"PRIVATE")),eb(new z("heartbeat",e=>new eM(e),"PRIVATE")),eT(ec,ed,""),eT(ec,ed,"esm2020"),eT("fire-js",""),eT("firebase","12.2.1","app");let eU=new Map,ez={activated:!1,tokenObservers:[]},eV={initialized:!1,enabled:!1};function e$(e){return eU.get(e)||{...ez}}let eB="https://content-firebaseappcheck.googleapis.com/v1";class eH{constructor(e,t,r,n,i){if(this.operation=e,this.retryPolicy=t,this.getWaitDuration=r,this.lowerBound=n,this.upperBound=i,this.pending=null,this.nextErrorWaitInterval=n,n>i)throw Error("Proactive refresh lower bound greater than upper bound!")}start(){this.nextErrorWaitInterval=this.lowerBound,this.process(!0).catch(()=>{})}stop(){this.pending&&(this.pending.reject("cancelled"),this.pending=null)}isRunning(){return!!this.pending}async process(e){this.stop();try{var t;this.pending=new k,this.pending.promise.catch(e=>{}),await (t=this.getNextRun(e),new Promise(e=>{setTimeout(e,t)})),this.pending.resolve(),await this.pending.promise,this.pending=new k,this.pending.promise.catch(e=>{}),await this.operation(),this.pending.resolve(),await this.pending.promise,this.process(!0).catch(()=>{})}catch(e){this.retryPolicy(e)?this.process(!1).catch(()=>{}):this.stop()}}getNextRun(e){if(e)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();{let e=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),e}}}let eW=new A("appCheck","AppCheck",{"already-initialized":"You have already called initializeAppCheck() for FirebaseApp {$appName} with different options. To avoid this error, call initializeAppCheck() with the same options as when it was originally called. This will return the already initialized instance.","use-before-activation":"App Check is being used before initializeAppCheck() is called for FirebaseApp {$appName}. Call initializeAppCheck() before instantiating other Firebase services.","fetch-network-error":"Fetch failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.","fetch-parse-error":"Fetch client could not parse response. Original error: {$originalErrorMessage}.","fetch-status-error":"Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.","storage-open":"Error thrown when opening storage. Original error: {$originalErrorMessage}.","storage-get":"Error thrown when reading from storage. Original error: {$originalErrorMessage}.","storage-set":"Error thrown when writing to storage. Original error: {$originalErrorMessage}.","recaptcha-error":"ReCAPTCHA error.","initial-throttle":"{$httpStatus} error. Attempts allowed again after {$time}",throttled:"Requests throttled due to previous {$httpStatus} error. Attempts allowed again after {$time}"});function eq(e=!1){return e?self.grecaptcha?.enterprise:self.grecaptcha}function eK(e){if(!e$(e).activated)throw eW.create("use-before-activation",{appName:e.name})}function eG(e){let t=Math.round(e/1e3),r=Math.floor(t/86400),n=Math.floor((t-3600*r*24)/3600),i=Math.floor((t-3600*r*24-3600*n)/60),a="";return r&&(a+=eQ(r)+"d:"),n&&(a+=eQ(n)+"h:"),a+=eQ(i)+"m:"+eQ(t-3600*r*24-3600*n-60*i)+"s"}function eQ(e){return 0===e?"00":e>=10?e.toString():"0"+e}async function eY({url:e,body:t},r){let n,i,a={"Content-Type":"application/json"},s=r.getImmediate({optional:!0});if(s){let e=await s.getHeartbeatsHeader();e&&(a["X-Firebase-Client"]=e)}let o={method:"POST",body:JSON.stringify(t),headers:a};try{n=await fetch(e,o)}catch(e){throw eW.create("fetch-network-error",{originalErrorMessage:e?.message})}if(200!==n.status)throw eW.create("fetch-status-error",{httpStatus:n.status});try{i=await n.json()}catch(e){throw eW.create("fetch-parse-error",{originalErrorMessage:e?.message})}let l=i.ttl.match(/^([\d.]+)(s)$/);if(!l||!l[2]||isNaN(Number(l[1])))throw eW.create("fetch-parse-error",{originalErrorMessage:`ttl field (timeToLive) is not in standard Protobuf Duration format: ${i.ttl}`});let u=1e3*Number(l[1]),c=Date.now();return{token:i.token,expireTimeMillis:c+u,issuedAtTimeMillis:c}}function eJ(e,t){let{projectId:r,appId:n,apiKey:i}=e.options;return{url:`${eB}/projects/${r}/apps/${n}:exchangeDebugToken?key=${i}`,body:{debug_token:t}}}let eX="firebase-app-check-store",eZ="debug-token",e0=null;function e1(){return e0||(e0=new Promise((e,t)=>{try{let r=indexedDB.open("firebase-app-check-database",1);r.onsuccess=t=>{e(t.target.result)},r.onerror=e=>{t(eW.create("storage-open",{originalErrorMessage:e.target.error?.message}))},r.onupgradeneeded=e=>{let t=e.target.result;0===e.oldVersion&&t.createObjectStore(eX,{keyPath:"compositeKey"})}}catch(e){t(eW.create("storage-open",{originalErrorMessage:e?.message}))}}))}async function e2(e,t){let r=(await e1()).transaction(eX,"readwrite"),n=r.objectStore(eX).put({compositeKey:e,value:t});return new Promise((e,t)=>{n.onsuccess=t=>{e()},r.onerror=e=>{t(eW.create("storage-set",{originalErrorMessage:e.target.error?.message}))}})}async function e3(e){let t=(await e1()).transaction(eX,"readonly"),r=t.objectStore(eX).get(e);return new Promise((e,n)=>{r.onsuccess=t=>{let r=t.target.result;r?e(r.value):e(void 0)},t.onerror=e=>{n(eW.create("storage-get",{originalErrorMessage:e.target.error?.message}))}})}function e4(e){return`${e.options.appId}-${e.name}`}let e6=new Q("@firebase/app-check");async function e5(e){if(T()){let t;try{t=await e3(e4(e))}catch(e){e6.warn(`Failed to read token from IndexedDB. Error: ${e}`)}return t}}function e8(e,t){if(T())return e2(e4(e),t).catch(e=>{e6.warn(`Failed to write token to IndexedDB. Error: ${e}`)});return Promise.resolve()}async function e7(){let e;try{e=await e3(eZ)}catch(e){}if(e)return e;{let e=crypto.randomUUID();return e2(eZ,e).catch(e=>e6.warn(`Failed to persist debug token to IndexedDB. Error: ${e}`)),e}}function e9(){return eV.enabled}async function te(){if(eV.enabled&&eV.token)return eV.token.promise;throw Error(`
|
|
2
|
+
Can't get debug token in production mode.
|
|
3
|
+
`)}let tt={error:"UNKNOWN_ERROR"};async function tr(e,t=!1,r=!1){let n,i,a=e.app;eK(a);let s=e$(a),o=s.token;if(o&&!tl(o)&&(s.token=void 0,o=void 0),!o){let e=await s.cachedTokenPromise;e&&(tl(e)?o=e:await e8(a,void 0))}if(!t&&o&&tl(o))return{token:o.token};let l=!1;if(e9())try{s.exchangeTokenPromise||(s.exchangeTokenPromise=eY(eJ(a,await te()),e.heartbeatServiceProvider).finally(()=>{s.exchangeTokenPromise=void 0}),l=!0);let t=await s.exchangeTokenPromise;return await e8(a,t),s.token=t,{token:t.token}}catch(e){return"appCheck/throttled"===e.code||"appCheck/initial-throttle"===e.code?e6.warn(e.message):r&&e6.error(e),tu(e)}try{s.exchangeTokenPromise||(s.exchangeTokenPromise=s.provider.getToken().finally(()=>{s.exchangeTokenPromise=void 0}),l=!0),o=await e$(a).exchangeTokenPromise}catch(e){"appCheck/throttled"===e.code||"appCheck/initial-throttle"===e.code?e6.warn(e.message):r&&e6.error(e),i=e}return o?i?n=tl(o)?{token:o.token,internalError:i}:tu(i):(n={token:o.token},s.token=o,await e8(a,o)):n=tu(i),l&&to(a,n),n}async function tn(e){let t=e.app;eK(t);let{provider:r}=e$(t);if(e9()){let r=await te(),{token:n}=await eY(eJ(t,r),e.heartbeatServiceProvider);return{token:n}}{let{token:e}=await r.getToken();return{token:e}}}function ti(e,t,r,n){let{app:i}=e,a=e$(i);if(a.tokenObservers=[...a.tokenObservers,{next:r,error:n,type:t}],a.token&&tl(a.token)){let t=a.token;Promise.resolve().then(()=>{r({token:t.token}),ts(e)}).catch(()=>{})}a.cachedTokenPromise.then(()=>ts(e))}function ta(e,t){let r=e$(e),n=r.tokenObservers.filter(e=>e.next!==t);0===n.length&&r.tokenRefresher&&r.tokenRefresher.isRunning()&&r.tokenRefresher.stop(),r.tokenObservers=n}function ts(e){let{app:t}=e,r=e$(t),n=r.tokenRefresher;n||(r.tokenRefresher=n=function(e){let{app:t}=e;return new eH(async()=>{let r;if((r=e$(t).token?await tr(e,!0):await tr(e)).error)throw r.error;if(r.internalError)throw r.internalError},()=>!0,()=>{let e=e$(t);if(!e.token)return 0;{let t=e.token.issuedAtTimeMillis+(e.token.expireTimeMillis-e.token.issuedAtTimeMillis)*.5+3e5;return Math.max(0,(t=Math.min(t,e.token.expireTimeMillis-3e5))-Date.now())}},3e4,96e4)}(e)),!n.isRunning()&&r.isTokenAutoRefreshEnabled&&n.start()}function to(e,t){for(let r of e$(e).tokenObservers)try{"EXTERNAL"===r.type&&null!=t.error?r.error(t.error):r.next(t)}catch(e){}}function tl(e){return e.expireTimeMillis-Date.now()>0}function tu(e){return{token:p.encodeString(JSON.stringify(tt),!1),error:e}}class tc{constructor(e,t){this.app=e,this.heartbeatServiceProvider=t}_delete(){let{tokenObservers:e}=e$(this.app);for(let t of e)ta(this.app,t.next);return Promise.resolve()}}function td(e,t,r,n,i){r.ready(()=>{var a,s,o,l;let u,c;a=e,s=t,o=r,l=n,u=o.render(l,{sitekey:s,size:"invisible",callback:()=>{e$(a).reCAPTCHAState.succeeded=!0},"error-callback":()=>{e$(a).reCAPTCHAState.succeeded=!1}}),(c=e$(a)).reCAPTCHAState={...c.reCAPTCHAState,widgetId:u},i.resolve(r)})}function th(e){let t=`fire_app_check_${e.name}`,r=document.createElement("div");return r.id=t,r.style.display="none",document.body.appendChild(r),t}async function tf(e){eK(e);let t=e$(e).reCAPTCHAState,r=await t.initialized.promise;return new Promise((t,n)=>{let i=e$(e).reCAPTCHAState;r.ready(()=>{t(r.execute(i.widgetId,{action:"fire_app_check"}))})})}class tp{constructor(e){this._siteKey=e,this._throttleData=null}async getToken(){let e;tv(this._throttleData);let t=await tf(this._app).catch(e=>{throw eW.create("recaptcha-error")});if(!e$(this._app).reCAPTCHAState?.succeeded)throw eW.create("recaptcha-error");try{e=await eY(function(e,t){let{projectId:r,appId:n,apiKey:i}=e.options;return{url:`${eB}/projects/${r}/apps/${n}:exchangeRecaptchaV3Token?key=${i}`,body:{recaptcha_v3_token:t}}}(this._app,t),this._heartbeatServiceProvider)}catch(e){if(e.code?.includes("fetch-status-error"))throw this._throttleData=tg(Number(e.customData?.httpStatus),this._throttleData),eW.create("initial-throttle",{time:eG(this._throttleData.allowRequestsAfter-Date.now()),httpStatus:this._throttleData.httpStatus});throw e}return this._throttleData=null,e}initialize(e){var t,r;let n,i,a,s;this._app=e,this._heartbeatServiceProvider=ew(e,"heartbeat");(t=this._siteKey,n=new k,e$(e).reCAPTCHAState={initialized:n},i=th(e),(a=eq(!1))?td(e,t,a,i,n):(r=()=>{let r=eq(!1);if(!r)throw Error("no recaptcha");td(e,t,r,i,n)},(s=document.createElement("script")).src="https://www.google.com/recaptcha/api.js",s.onload=r,document.head.appendChild(s)),n.promise).catch(()=>{})}isEqual(e){return e instanceof tp&&this._siteKey===e._siteKey}}class tm{constructor(e){this._siteKey=e,this._throttleData=null}async getToken(){let e;tv(this._throttleData);let t=await tf(this._app).catch(e=>{throw eW.create("recaptcha-error")});if(!e$(this._app).reCAPTCHAState?.succeeded)throw eW.create("recaptcha-error");try{e=await eY(function(e,t){let{projectId:r,appId:n,apiKey:i}=e.options;return{url:`${eB}/projects/${r}/apps/${n}:exchangeRecaptchaEnterpriseToken?key=${i}`,body:{recaptcha_enterprise_token:t}}}(this._app,t),this._heartbeatServiceProvider)}catch(e){if(e.code?.includes("fetch-status-error"))throw this._throttleData=tg(Number(e.customData?.httpStatus),this._throttleData),eW.create("initial-throttle",{time:eG(this._throttleData.allowRequestsAfter-Date.now()),httpStatus:this._throttleData.httpStatus});throw e}return this._throttleData=null,e}initialize(e){var t,r;let n,i,a,s;this._app=e,this._heartbeatServiceProvider=ew(e,"heartbeat");(t=this._siteKey,n=new k,e$(e).reCAPTCHAState={initialized:n},i=th(e),(a=eq(!0))?td(e,t,a,i,n):(r=()=>{let r=eq(!0);if(!r)throw Error("no recaptcha");td(e,t,r,i,n)},(s=document.createElement("script")).src="https://www.google.com/recaptcha/enterprise.js",s.onload=r,document.head.appendChild(s)),n.promise).catch(()=>{})}isEqual(e){return e instanceof tm&&this._siteKey===e._siteKey}}function tg(e,t){if(404===e||403===e)return{backoffCount:1,allowRequestsAfter:Date.now()+864e5,httpStatus:e};{let r=t?t.backoffCount:0,n=function(e,t=1e3,r=2){let n=t*Math.pow(r,e),i=Math.round(.5*n*(Math.random()-.5)*2);return Math.min(144e5,n+i)}(r,1e3,2);return{backoffCount:r+1,allowRequestsAfter:Date.now()+n,httpStatus:e}}}function tv(e){if(e&&Date.now()-e.allowRequestsAfter<=0)throw eW.create("throttled",{time:eG(e.allowRequestsAfter-Date.now()),httpStatus:e.httpStatus})}let ty="app-check-internal";function tb(){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."}}eb(new z("app-check",e=>new tc(e.getProvider("app").getImmediate(),e.getProvider("heartbeat")),"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,r)=>{e.getProvider(ty).initialize()})),eb(new z(ty,e=>{var t;return t=e.getProvider("app-check").getImmediate(),{getToken:e=>tr(t,e),getLimitedUseToken:()=>tn(t),addTokenListener:e=>ti(t,"INTERNAL",e),removeTokenListener:e=>ta(t.app,e)}},"PUBLIC").setInstantiationMode("EXPLICIT")),eT("@firebase/app-check","0.11.0");let tw=new A("auth","Firebase",tb()),tS=new Q("@firebase/auth");function tk(e,...t){tS.logLevel<=l.ERROR&&tS.error(`Auth (${ex}): ${e}`,...t)}function tE(e,...t){throw tT(e,...t)}function tx(e,...t){return tT(e,...t)}function t_(e,t,r){return new A("auth","Firebase",{...tb(),[t]:r}).create(t,{appName:e.name})}function tC(e){return t_(e,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function tI(e,t,r){if(!(t instanceof r))throw r.name!==t.constructor.name&&tE(e,"argument-error"),t_(e,"argument-error",`Type of ${t.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function tT(e,...t){if("string"!=typeof e){let r=t[0],n=[...t.slice(1)];return n[0]&&(n[0].appName=e.name),e._errorFactory.create(r,...n)}return tw.create(e,...t)}function tP(e,t,...r){if(!e)throw tT(t,...r)}function tA(e){let t="INTERNAL ASSERTION FAILED: "+e;throw tk(t),Error(t)}function tR(){return"undefined"!=typeof self&&self.location?.href||""}function tN(){return"http:"===tO()||"https:"===tO()}function tO(){return"undefined"!=typeof self&&self.location?.protocol||null}class tL{constructor(e,t){var r;this.shortDelay=e,this.longDelay=t,r="Short delay should be less than long delay!",t>e||tA(r),this.isMobile="undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(I())||"object"==typeof navigator&&"ReactNative"===navigator.product}get(){let e;return!("undefined"!=typeof navigator&&navigator&&"onLine"in navigator&&"boolean"==typeof navigator.onLine&&(tN()||"object"==typeof(e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0)&&void 0!==e.id||"connection"in navigator))||navigator.onLine?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}function tM(e,t){var r,n;r=e.emulator,n="Emulator should always be set here",r||tA(n);let{url:i}=e.emulator;return t?`${i}${t.startsWith("/")?t.slice(1):t}`:i}class tF{static initialize(e,t,r){this.fetchImpl=e,t&&(this.headersImpl=t),r&&(this.responseImpl=r)}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 tA("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 tA("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 tA("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}let tj={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"},tD=["/v1/accounts:signInWithCustomToken","/v1/accounts:signInWithEmailLink","/v1/accounts:signInWithIdp","/v1/accounts:signInWithPassword","/v1/accounts:signInWithPhoneNumber","/v1/token"],tU=new tL(3e4,6e4);function tz(e,t){return e.tenantId&&!t.tenantId?{...t,tenantId:e.tenantId}:t}async function tV(e,t,r,n,i={}){return t$(e,i,async()=>{let i={},a={};n&&("GET"===t?a=n:i={body:JSON.stringify(n)});let s=L({key:e.config.apiKey,...a}).slice(1),o=await e._getAdditionalHeaders();o["Content-Type"]="application/json",e.languageCode&&(o["X-Firebase-Locale"]=e.languageCode);let l={method:t,headers:o,...i};return("undefined"==typeof navigator||"Cloudflare-Workers"!==navigator.userAgent)&&(l.referrerPolicy="no-referrer"),e.emulatorConfig&&E(e.emulatorConfig.host)&&(l.credentials="include"),tF.fetch()(await tH(e,e.config.apiHost,r,s),l)})}async function t$(e,t,r){e._canInitEmulator=!1;let n={...tj,...t};try{let t=new tW(e),i=await Promise.race([r(),t.promise]);t.clearNetworkTimeout();let a=await i.json();if("needConfirmation"in a)throw tq(e,"account-exists-with-different-credential",a);if(i.ok&&!("errorMessage"in a))return a;{let[t,r]=(i.ok?a.errorMessage:a.error.message).split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===t)throw tq(e,"credential-already-in-use",a);if("EMAIL_EXISTS"===t)throw tq(e,"email-already-in-use",a);if("USER_DISABLED"===t)throw tq(e,"user-disabled",a);let s=n[t]||t.toLowerCase().replace(/[_\s]+/g,"-");if(r)throw t_(e,s,r);tE(e,s)}}catch(t){if(t instanceof P)throw t;tE(e,"network-request-failed",{message:String(t)})}}async function tB(e,t,r,n,i={}){let a=await tV(e,t,r,n,i);return"mfaPendingCredential"in a&&tE(e,"multi-factor-auth-required",{_serverResponse:a}),a}async function tH(e,t,r,n){let i=`${t}${r}?${n}`,a=e.config.emulator?tM(e.config,i):`${e.config.apiScheme}://${i}`;return tD.includes(r)&&(await e._persistenceManagerAvailable,"COOKIE"===e._getPersistenceType())?e._getPersistence()._getFinalTarget(a).toString():a}class tW{clearNetworkTimeout(){clearTimeout(this.timer)}constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((e,t)=>{this.timer=setTimeout(()=>t(tx(this.auth,"network-request-failed")),tU.get())})}}function tq(e,t,r){let n={appName:e.name};r.email&&(n.email=r.email),r.phoneNumber&&(n.phoneNumber=r.phoneNumber);let i=tx(e,t,n);return i.customData._tokenResponse=r,i}function tK(e){return void 0!==e&&void 0!==e.getResponse}function tG(e){return void 0!==e&&void 0!==e.enterprise}class tQ{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)switch(t.enforcementState){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}return null}isProviderEnabled(e){return"ENFORCE"===this.getProviderEnforcementState(e)||"AUDIT"===this.getProviderEnforcementState(e)}isAnyProviderEnabled(){return this.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")||this.isProviderEnabled("PHONE_PROVIDER")}}async function tY(e){return(await tV(e,"GET","/v1/recaptchaParams")).recaptchaSiteKey||""}async function tJ(e,t){return tV(e,"GET","/v2/recaptchaConfig",tz(e,t))}async function tX(e,t){return tV(e,"POST","/v1/accounts:delete",t)}async function tZ(e,t){return tV(e,"POST","/v1/accounts:lookup",t)}function t0(e){if(e)try{let t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(e){}}async function t1(e,t=!1){let r=U(e),n=await r.getIdToken(t),i=t3(n);tP(i&&i.exp&&i.auth_time&&i.iat,r.auth,"internal-error");let a="object"==typeof i.firebase?i.firebase:void 0,s=a?.sign_in_provider;return{claims:i,token:n,authTime:t0(t2(i.auth_time)),issuedAtTime:t0(t2(i.iat)),expirationTime:t0(t2(i.exp)),signInProvider:s||null,signInSecondFactor:a?.sign_in_second_factor||null}}function t2(e){return 1e3*Number(e)}function t3(e){let[t,r,n]=e.split(".");if(void 0===t||void 0===r||void 0===n)return tk("JWT malformed, contained fewer than 3 sections"),null;try{let e=y(r);if(!e)return tk("Failed to decode base64 JWT payload"),null;return JSON.parse(e)}catch(e){return tk("Caught error parsing JWT payload as JSON",e?.toString()),null}}function t4(e){let t=t3(e);return tP(t,"internal-error"),tP(void 0!==t.exp,"internal-error"),tP(void 0!==t.iat,"internal-error"),Number(t.exp)-Number(t.iat)}async function t6(e,t,r=!1){if(r)return t;try{return await t}catch(t){throw t instanceof P&&function({code:e}){return"auth/user-disabled"===e||"auth/user-token-expired"===e}(t)&&e.auth.currentUser===e&&await e.auth.signOut(),t}}class t5{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){if(!e)return this.errorBackoff=3e4,Math.max(0,(this.user.stsTokenManager.expirationTime??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){e?.code==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}class t8{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=t0(this.lastLoginAt),this.creationTime=t0(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}async function t7(e){var t,r;let n=e.auth,i=await e.getIdToken(),a=await t6(e,tZ(n,{idToken:i}));tP(a?.users.length,n,"internal-error");let s=a.users[0];e._notifyReloadListener(s);let o=s.providerUserInfo?.length?re(s.providerUserInfo):[],l=(t=e.providerData,r=o,[...t.filter(e=>!r.some(t=>t.providerId===e.providerId)),...r]),u=e.isAnonymous,c=!(e.email&&s.passwordHash)&&!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 t8(s.createdAt,s.lastLoginAt),isAnonymous:!!u&&c})}async function t9(e){let t=U(e);await t7(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}function re(e){return e.map(({providerId:e,...t})=>({providerId:e,uid:t.rawId||"",displayName:t.displayName||null,email:t.email||null,phoneNumber:t.phoneNumber||null,photoURL:t.photoUrl||null}))}async function rt(e,t){let r=await t$(e,{},async()=>{let r=L({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:n,apiKey:i}=e.config,a=await tH(e,n,"/v1/token",`key=${i}`),s=await e._getAdditionalHeaders();s["Content-Type"]="application/x-www-form-urlencoded";let o={method:"POST",headers:s,body:r};return e.emulatorConfig&&E(e.emulatorConfig.host)&&(o.credentials="include"),tF.fetch()(a,o)});return{accessToken:r.access_token,expiresIn:r.expires_in,refreshToken:r.refresh_token}}async function rr(e,t){return tV(e,"POST","/v2/accounts:revokeToken",tz(e,t))}class rn{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){tP(e.idToken,"internal-error"),tP(void 0!==e.idToken,"internal-error"),tP(void 0!==e.refreshToken,"internal-error");let t="expiresIn"in e&&void 0!==e.expiresIn?Number(e.expiresIn):t4(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}updateFromIdToken(e){tP(0!==e.length,"internal-error");let t=t4(e);this.updateTokensAndExpiration(e,null,t)}async getToken(e,t=!1){return t||!this.accessToken||this.isExpired?(tP(this.refreshToken,e,"user-token-expired"),this.refreshToken)?(await this.refresh(e,this.refreshToken),this.accessToken):null:this.accessToken}clearRefreshToken(){this.refreshToken=null}async refresh(e,t){let{accessToken:r,refreshToken:n,expiresIn:i}=await rt(e,t);this.updateTokensAndExpiration(r,n,Number(i))}updateTokensAndExpiration(e,t,r){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*r}static fromJSON(e,t){let{refreshToken:r,accessToken:n,expirationTime:i}=t,a=new rn;return r&&(tP("string"==typeof r,"internal-error",{appName:e}),a.refreshToken=r),n&&(tP("string"==typeof n,"internal-error",{appName:e}),a.accessToken=n),i&&(tP("number"==typeof i,"internal-error",{appName:e}),a.expirationTime=i),a}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 rn,this.toJSON())}_performRefresh(){return tA("not implemented")}}function ri(e,t){tP("string"==typeof e||void 0===e,"internal-error",{appName:t})}class ra{constructor({uid:e,auth:t,stsTokenManager:r,...n}){this.providerId="firebase",this.proactiveRefresh=new t5(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=e,this.auth=t,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 t8(n.createdAt||void 0,n.lastLoginAt||void 0)}async getIdToken(e){let t=await t6(this,this.stsTokenManager.getToken(this.auth,e));return tP(t,this.auth,"internal-error"),this.accessToken!==t&&(this.accessToken=t,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),t}getIdTokenResult(e){return t1(this,e)}reload(){return t9(this)}_assign(e){this!==e&&(tP(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=>({...e})),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){let t=new ra({...this,auth:e,stsTokenManager:this.stsTokenManager._clone()});return t.metadata._copy(this.metadata),t}_onReload(e){tP(!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 r=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),r=!0),t&&await t7(this),await this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(eS(this.auth.app))return Promise.reject(tC(this.auth));let e=await this.getIdToken();return await t6(this,tX(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return{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=>({...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){let r=t.displayName??void 0,n=t.email??void 0,i=t.phoneNumber??void 0,a=t.photoURL??void 0,s=t.tenantId??void 0,o=t._redirectEventId??void 0,l=t.createdAt??void 0,u=t.lastLoginAt??void 0,{uid:c,emailVerified:d,isAnonymous:h,providerData:f,stsTokenManager:p}=t;tP(c&&p,e,"internal-error");let m=rn.fromJSON(this.name,p);tP("string"==typeof c,e,"internal-error"),ri(r,e.name),ri(n,e.name),tP("boolean"==typeof d,e,"internal-error"),tP("boolean"==typeof h,e,"internal-error"),ri(i,e.name),ri(a,e.name),ri(s,e.name),ri(o,e.name),ri(l,e.name),ri(u,e.name);let g=new ra({uid:c,auth:e,email:n,emailVerified:d,displayName:r,isAnonymous:h,photoURL:a,phoneNumber:i,tenantId:s,stsTokenManager:m,createdAt:l,lastLoginAt:u});return f&&Array.isArray(f)&&(g.providerData=f.map(e=>({...e}))),o&&(g._redirectEventId=o),g}static async _fromIdTokenResponse(e,t,r=!1){let n=new rn;n.updateFromServerResponse(t);let i=new ra({uid:t.localId,auth:e,stsTokenManager:n,isAnonymous:r});return await t7(i),i}static async _fromGetAccountInfoResponse(e,t,r){let n=t.users[0];tP(void 0!==n.localId,"internal-error");let i=void 0!==n.providerUserInfo?re(n.providerUserInfo):[],a=!(n.email&&n.passwordHash)&&!i?.length,s=new rn;s.updateFromIdToken(r);let o=new ra({uid:n.localId,auth:e,stsTokenManager:s,isAnonymous:a});return Object.assign(o,{uid:n.localId,displayName:n.displayName||null,photoURL:n.photoUrl||null,email:n.email||null,emailVerified:n.emailVerified||!1,phoneNumber:n.phoneNumber||null,tenantId:n.tenantId||null,providerData:i,metadata:new t8(n.createdAt,n.lastLoginAt),isAnonymous:!(n.email&&n.passwordHash)&&!i?.length}),o}}let rs=new Map;function ro(e){var t,r;t="Expected a class definition",e instanceof Function||tA(t);let n=rs.get(e);return n?(r="Instance stored in cache mismatched with class",n instanceof e||tA(r)):(n=new e,rs.set(e,n)),n}class rl{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){}}function ru(e,t,r){return`firebase:${e}:${t}:${r}`}rl.type="NONE";class rc{constructor(e,t,r){this.persistence=e,this.auth=t,this.userKey=r;const{config:n,name:i}=this.auth;this.fullUserKey=ru(this.userKey,n.apiKey,i),this.fullPersistenceKey=ru("persistence",n.apiKey,i),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);if(!e)return null;if("string"==typeof e){let t=await tZ(this.auth,{idToken:e}).catch(()=>void 0);return t?ra._fromGetAccountInfoResponse(this.auth,t,e):null}return ra._fromJSON(this.auth,e)}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,r="authUser"){if(!t.length)return new rc(ro(rl),e,r);let n=(await Promise.all(t.map(async e=>{if(await e._isAvailable())return e}))).filter(e=>e),i=n[0]||ro(rl),a=ru(r,e.config.apiKey,e.name),s=null;for(let r of t)try{let t=await r._get(a);if(t){let n;if("string"==typeof t){let r=await tZ(e,{idToken:t}).catch(()=>void 0);if(!r)break;n=await ra._fromGetAccountInfoResponse(e,r,t)}else n=ra._fromJSON(e,t);r!==i&&(s=n),i=r;break}}catch{}let o=n.filter(e=>e._shouldAllowMigration);return i._shouldAllowMigration&&o.length&&(i=o[0],s&&await i._set(a,s.toJSON()),await Promise.all(t.map(async e=>{if(e!==i)try{await e._remove(a)}catch{}}))),new rc(i,e,r)}}function rd(e){let t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";{if(rm(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(rh(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(rv(t))return"Blackberry";if(ry(t))return"Webos";if(rf(t))return"Safari";if((t.includes("chrome/")||rp(t))&&!t.includes("edge/"))return"Chrome";if(rg(t))return"Android";let r=e.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/);if(r?.length===2)return r[1]}return"Other"}function rh(e=I()){return/firefox\//i.test(e)}function rf(e=I()){let t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function rp(e=I()){return/crios\//i.test(e)}function rm(e=I()){return/iemobile/i.test(e)}function rg(e=I()){return/android/i.test(e)}function rv(e=I()){return/blackberry/i.test(e)}function ry(e=I()){return/webos/i.test(e)}function rb(e=I()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function rw(e=I()){return rb(e)||rg(e)||ry(e)||rv(e)||/windows phone/i.test(e)||rm(e)}function rS(e,t=[]){let r;switch(e){case"Browser":r=rd(I());break;case"Worker":r=`${rd(I())}-${e}`;break;default:r=e}let n=t.length?t.join(","):"FirebaseCore-web";return`${r}/JsCore/${ex}/${n}`}class rk{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){let r=t=>new Promise((r,n)=>{try{let n=e(t);r(n)}catch(e){n(e)}});r.onAbort=t,this.queue.push(r);let n=this.queue.length-1;return()=>{this.queue[n]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;let t=[];try{for(let r of this.queue)await r(e),r.onAbort&&t.push(r.onAbort)}catch(e){for(let e of(t.reverse(),t))try{e()}catch(e){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:e?.message})}}}async function rE(e,t={}){return tV(e,"GET","/v2/passwordPolicy",tz(e,t))}class rx{constructor(e){const t=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=t.minPasswordLength??6,t.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=t.maxPasswordLength),void 0!==t.containsLowercaseCharacter&&(this.customStrengthOptions.containsLowercaseLetter=t.containsLowercaseCharacter),void 0!==t.containsUppercaseCharacter&&(this.customStrengthOptions.containsUppercaseLetter=t.containsUppercaseCharacter),void 0!==t.containsNumericCharacter&&(this.customStrengthOptions.containsNumericCharacter=t.containsNumericCharacter),void 0!==t.containsNonAlphanumericCharacter&&(this.customStrengthOptions.containsNonAlphanumericCharacter=t.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,"ENFORCEMENT_STATE_UNSPECIFIED"===this.enforcementState&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=e.allowedNonAlphanumericCharacters?.join("")??"",this.forceUpgradeOnSignin=e.forceUpgradeOnSignin??!1,this.schemaVersion=e.schemaVersion}validatePassword(e){let t={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,t),this.validatePasswordCharacterOptions(e,t),t.isValid&&(t.isValid=t.meetsMinPasswordLength??!0),t.isValid&&(t.isValid=t.meetsMaxPasswordLength??!0),t.isValid&&(t.isValid=t.containsLowercaseLetter??!0),t.isValid&&(t.isValid=t.containsUppercaseLetter??!0),t.isValid&&(t.isValid=t.containsNumericCharacter??!0),t.isValid&&(t.isValid=t.containsNonAlphanumericCharacter??!0),t}validatePasswordLengthOptions(e,t){let r=this.customStrengthOptions.minPasswordLength,n=this.customStrengthOptions.maxPasswordLength;r&&(t.meetsMinPasswordLength=e.length>=r),n&&(t.meetsMaxPasswordLength=e.length<=n)}validatePasswordCharacterOptions(e,t){let r;this.updatePasswordCharacterOptionsStatuses(t,!1,!1,!1,!1);for(let n=0;n<e.length;n++)r=e.charAt(n),this.updatePasswordCharacterOptionsStatuses(t,r>="a"&&r<="z",r>="A"&&r<="Z",r>="0"&&r<="9",this.allowedNonAlphanumericCharacters.includes(r))}updatePasswordCharacterOptionsStatuses(e,t,r,n,i){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=t)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=r)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=n)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=i))}}class r_{constructor(e,t,r,n){this.app=e,this.heartbeatServiceProvider=t,this.appCheckServiceProvider=r,this.config=n,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new rC(this),this.idTokenSubscription=new rC(this),this.beforeStateQueue=new rk(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=tw,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this._resolvePersistenceManagerAvailable=void 0,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=n.sdkClientVersion,this._persistenceManagerAvailable=new Promise(e=>this._resolvePersistenceManagerAvailable=e)}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=ro(t)),this._initializationPromise=this.queue(async()=>{if(!this._deleted){if(this.persistenceManager=await rc.create(this,e),this._resolvePersistenceManagerAvailable?.(),!this._deleted){if(this._popupRedirectResolver?._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch(e){}await this.initializeCurrentUser(t),this.lastNotifiedUid=this.currentUser?.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 initializeCurrentUserFromIdToken(e){try{let t=await tZ(this,{idToken:e}),r=await ra._fromGetAccountInfoResponse(this,t,e);await this.directlySetCurrentUser(r)}catch(e){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",e),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(e){if(eS(this.app)){let e=this.app.settings.authIdToken;return e?new Promise(t=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(e).then(t,t))}):this.directlySetCurrentUser(null)}let t=await this.assertedPersistence.getCurrentUser(),r=t,n=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();let t=this.redirectUser?._redirectEventId,i=r?._redirectEventId,a=await this.tryRedirectSignIn(e);(!t||t===i)&&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=t,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(e))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return(tP(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 t7(e)}catch(e){if(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){if(eS(this.app))return Promise.reject(tC(this));let t=e?U(e):null;return t&&tP(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&&tP(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 eS(this.app)?Promise.reject(tC(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(e){return eS(this.app)?Promise.reject(tC(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(ro(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 rx(await rE(this));null===this.tenantId?this._projectPasswordPolicy=e:this._tenantPasswordPolicies[this.tenantId]=e}_getPersistenceType(){return this.assertedPersistence.persistence.type}_getPersistence(){return this.assertedPersistence.persistence}_updateErrorMap(e){this._errorFactory=new A("auth","Firebase",e())}onAuthStateChanged(e,t,r){return this.registerStateListener(this.authStateSubscription,e,t,r)}beforeAuthStateChanged(e,t){return this.beforeStateQueue.pushCallback(e,t)}onIdTokenChanged(e,t,r){return this.registerStateListener(this.idTokenSubscription,e,t,r)}authStateReady(){return new Promise((e,t)=>{if(this.currentUser)e();else{let r=this.onAuthStateChanged(()=>{r(),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 rr(this,t)}}toJSON(){return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:this._currentUser?.toJSON()}}async _setRedirectUser(e,t){let r=await this.getOrInitRedirectPersistenceManager(t);return null===e?r.removeCurrentUser():r.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){let t=e&&ro(e)||this._popupRedirectResolver;tP(t,this,"argument-error"),this.redirectPersistenceManager=await rc.create(this,[ro(t._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){return(this._isInitialized&&await this.queue(async()=>{}),this._currentUser?._redirectEventId===e)?this._currentUser:this.redirectUser?._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(){if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);let e=this.currentUser?.uid??null;this.lastNotifiedUid!==e&&(this.lastNotifiedUid=e,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,r,n){if(this._deleted)return()=>{};let i="function"==typeof t?t:t.next.bind(t),a=!1,s=this._isInitialized?Promise.resolve():this._initializationPromise;if(tP(s,this,"internal-error"),s.then(()=>{a||i(this.currentUser)}),"function"==typeof t){let i=e.addObserver(t,r,n);return()=>{a=!0,i()}}{let r=e.addObserver(t);return()=>{a=!0,r()}}}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 tP(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=rS(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){let e={"X-Client-Version":this.clientVersion};this.app.options.appId&&(e["X-Firebase-gmpid"]=this.app.options.appId);let t=await this.heartbeatServiceProvider.getImmediate({optional:!0})?.getHeartbeatsHeader();t&&(e["X-Firebase-Client"]=t);let r=await this._getAppCheckToken();return r&&(e["X-Firebase-AppCheck"]=r),e}async _getAppCheckToken(){if(eS(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;let e=await this.appCheckServiceProvider.getImmediate({optional:!0})?.getToken();return e?.error&&function(e,...t){tS.logLevel<=l.WARN&&tS.warn(`Auth (${ex}): ${e}`,...t)}(`Error while retrieving App Check token: ${e.error}`),e?.token}}class rC{constructor(e){this.auth=e,this.observer=null,this.addObserver=function(e,t){let r=new j(e,void 0);return r.subscribe.bind(r)}(e=>this.observer=e)}get next(){return tP(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}let rI={async loadJS(){throw Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function rT(e){return rI.loadJS(e)}function rP(e){return`__${e}${Math.floor(1e6*Math.random())}`}class rA{constructor(e){this.auth=e,this.counter=1e12,this._widgets=new Map}render(e,t){let r=this.counter;return this._widgets.set(r,new rO(e,this.auth.name,t||{})),this.counter++,r}reset(e){let t=e||1e12;this._widgets.get(t)?.delete(),this._widgets.delete(t)}getResponse(e){return this._widgets.get(e||1e12)?.getResponse()||""}async execute(e){return this._widgets.get(e||1e12)?.execute(),""}}class rR{constructor(){this.enterprise=new rN}ready(e){e()}execute(e,t){return Promise.resolve("token")}render(e,t){return""}}class rN{ready(e){e()}execute(e,t){return Promise.resolve("token")}render(e,t){return""}}class rO{constructor(e,t,r){this.params=r,this.timerId=null,this.deleted=!1,this.responseToken=null,this.clickHandler=()=>{this.execute()};const n="string"==typeof e?document.getElementById(e):e;tP(n,"argument-error",{appName:t}),this.container=n,this.isVisible="invisible"!==this.params.size,this.isVisible?this.execute():this.container.addEventListener("click",this.clickHandler)}getResponse(){return this.checkIfDeleted(),this.responseToken}delete(){this.checkIfDeleted(),this.deleted=!0,this.timerId&&(clearTimeout(this.timerId),this.timerId=null),this.container.removeEventListener("click",this.clickHandler)}execute(){this.checkIfDeleted(),this.timerId||(this.timerId=window.setTimeout(()=>{this.responseToken=function(e){let t=[],r="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let e=0;e<50;e++)t.push(r.charAt(Math.floor(Math.random()*r.length)));return t.join("")}(50);let{callback:e,"expired-callback":t}=this.params;if(e)try{e(this.responseToken)}catch(e){}this.timerId=window.setTimeout(()=>{if(this.timerId=null,this.responseToken=null,t)try{t()}catch(e){}this.isVisible&&this.execute()},6e4)},500))}checkIfDeleted(){if(this.deleted)throw Error("reCAPTCHA mock was already deleted!")}}let rL="NO_RECAPTCHA";class rM{constructor(e){this.type="recaptcha-enterprise",this.auth=U(e)}async verify(e="verify",t=!1){async function r(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,r)=>{tJ(e,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(n=>{if(void 0===n.recaptchaKey)r(Error("recaptcha Enterprise site key undefined"));else{let r=new tQ(n);return null==e.tenantId?e._agentRecaptchaConfig=r:e._tenantRecaptchaConfigs[e.tenantId]=r,t(r.siteKey)}}).catch(e=>{r(e)})})}function n(t,r,n){let i=window.grecaptcha;tG(i)?i.enterprise.ready(()=>{i.enterprise.execute(t,{action:e}).then(e=>{r(e)}).catch(()=>{r(rL)})}):n(Error("No reCAPTCHA enterprise script loaded."))}return this.auth.settings.appVerificationDisabledForTesting?new rR().execute("siteKey",{action:"verify"}):new Promise((e,i)=>{r(this.auth).then(r=>{if(!t&&tG(window.grecaptcha))n(r,e,i);else{if("undefined"==typeof window)return void i(Error("RecaptchaVerifier is only supported in browser"));let t=rI.recaptchaEnterpriseScript;0!==t.length&&(t+=r),rT(t).then(()=>{n(r,e,i)}).catch(e=>{i(e)})}}).catch(e=>{i(e)})})}}async function rF(e,t,r,n=!1,i=!1){let a,s=new rM(e);if(i)a=rL;else try{a=await s.verify(r)}catch(e){a=await s.verify(r,!0)}let o={...t};if("mfaSmsEnrollment"===r||"mfaSmsSignIn"===r){if("phoneEnrollmentInfo"in o){let e=o.phoneEnrollmentInfo.phoneNumber,t=o.phoneEnrollmentInfo.recaptchaToken;Object.assign(o,{phoneEnrollmentInfo:{phoneNumber:e,recaptchaToken:t,captchaResponse:a,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}else if("phoneSignInInfo"in o){let e=o.phoneSignInInfo.recaptchaToken;Object.assign(o,{phoneSignInInfo:{recaptchaToken:e,captchaResponse:a,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}return o}return n?Object.assign(o,{captchaResp:a}):Object.assign(o,{captchaResponse:a}),Object.assign(o,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(o,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),o}async function rj(e,t,r,n,i){if("EMAIL_PASSWORD_PROVIDER"===i)if(!e._getRecaptchaConfig()?.isProviderEnabled("EMAIL_PASSWORD_PROVIDER"))return n(e,t).catch(async i=>{if("auth/missing-recaptcha-token"!==i.code)return Promise.reject(i);{console.log(`${r} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);let i=await rF(e,t,r,"getOobCode"===r);return n(e,i)}});else{let i=await rF(e,t,r,"getOobCode"===r);return n(e,i)}if("PHONE_PROVIDER"!==i)return Promise.reject(i+" provider is not supported.");if(e._getRecaptchaConfig()?.isProviderEnabled("PHONE_PROVIDER")){let i=await rF(e,t,r);return n(e,i).catch(async i=>{if(e._getRecaptchaConfig()?.getProviderEnforcementState("PHONE_PROVIDER")==="AUDIT"&&("auth/missing-recaptcha-token"===i.code||"auth/invalid-app-credential"===i.code)){console.log(`Failed to verify with reCAPTCHA Enterprise. Automatically triggering the reCAPTCHA v2 flow to complete the ${r} flow.`);let i=await rF(e,t,r,!1,!0);return n(e,i)}return Promise.reject(i)})}{let i=await rF(e,t,r,!1,!0);return n(e,i)}}async function rD(e){let t=U(e),r=new tQ(await tJ(t,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}));null==t.tenantId?t._agentRecaptchaConfig=r:t._tenantRecaptchaConfigs[t.tenantId]=r,r.isAnyProviderEnabled()&&new rM(t).verify()}function rU(e){let t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function rz(e){if(!e)return null;let t=Number(e);return isNaN(t)?null:t}class rV{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return tA("not implemented")}_getIdTokenResponse(e){return tA("not implemented")}_linkToIdToken(e,t){return tA("not implemented")}_getReauthenticationResolver(e){return tA("not implemented")}}async function r$(e,t){return tV(e,"POST","/v1/accounts:signUp",t)}async function rB(e,t){return tB(e,"POST","/v1/accounts:signInWithPassword",tz(e,t))}async function rH(e,t){return tV(e,"POST","/v1/accounts:sendOobCode",tz(e,t))}async function rW(e,t){return rH(e,t)}async function rq(e,t){return tB(e,"POST","/v1/accounts:signInWithEmailLink",tz(e,t))}async function rK(e,t){return tB(e,"POST","/v1/accounts:signInWithEmailLink",tz(e,t))}class rG extends rV{constructor(e,t,r,n=null){super("password",r),this._email=e,this._password=t,this._tenantId=n}static _fromEmailAndPassword(e,t){return new rG(e,t,"password")}static _fromEmailAndCode(e,t,r=null){return new rG(e,t,"emailLink",r)}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(t?.email&&t?.password){if("password"===t.signInMethod)return this._fromEmailAndPassword(t.email,t.password);else if("emailLink"===t.signInMethod)return this._fromEmailAndCode(t.email,t.password,t.tenantId)}return null}async _getIdTokenResponse(e){switch(this.signInMethod){case"password":return rj(e,{returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signInWithPassword",rB,"EMAIL_PASSWORD_PROVIDER");case"emailLink":return rq(e,{email:this._email,oobCode:this._password});default:tE(e,"internal-error")}}async _linkToIdToken(e,t){switch(this.signInMethod){case"password":return rj(e,{idToken:t,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",r$,"EMAIL_PASSWORD_PROVIDER");case"emailLink":return rK(e,{idToken:t,email:this._email,oobCode:this._password});default:tE(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}async function rQ(e,t){return tB(e,"POST","/v1/accounts:signInWithIdp",tz(e,t))}class rY extends rV{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){let t=new rY(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):tE("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{providerId:t,signInMethod:r,...n}="string"==typeof e?JSON.parse(e):e;if(!t||!r)return null;let i=new rY(t,r);return i.idToken=n.idToken||void 0,i.accessToken=n.accessToken||void 0,i.secret=n.secret,i.nonce=n.nonce,i.pendingToken=n.pendingToken||null,i}_getIdTokenResponse(e){return rQ(e,this.buildRequest())}_linkToIdToken(e,t){let r=this.buildRequest();return r.idToken=t,rQ(e,r)}_getReauthenticationResolver(e){let t=this.buildRequest();return t.autoCreate=!1,rQ(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=L(t)}return e}}async function rJ(e,t){return tV(e,"POST","/v1/accounts:sendVerificationCode",tz(e,t))}async function rX(e,t){return tB(e,"POST","/v1/accounts:signInWithPhoneNumber",tz(e,t))}async function rZ(e,t){let r=await tB(e,"POST","/v1/accounts:signInWithPhoneNumber",tz(e,t));if(r.temporaryProof)throw tq(e,"account-exists-with-different-credential",r);return r}let r0={USER_NOT_FOUND:"user-not-found"};async function r1(e,t){return tB(e,"POST","/v1/accounts:signInWithPhoneNumber",tz(e,{...t,operation:"REAUTH"}),r0)}class r2 extends rV{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,t){return new r2({verificationId:e,verificationCode:t})}static _fromTokenResponse(e,t){return new r2({phoneNumber:e,temporaryProof:t})}_getIdTokenResponse(e){return rX(e,this._makeVerificationRequest())}_linkToIdToken(e,t){return rZ(e,{idToken:t,...this._makeVerificationRequest()})}_getReauthenticationResolver(e){return r1(e,this._makeVerificationRequest())}_makeVerificationRequest(){let{temporaryProof:e,phoneNumber:t,verificationId:r,verificationCode:n}=this.params;return e&&t?{temporaryProof:e,phoneNumber:t}:{sessionInfo:r,code:n}}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:r,phoneNumber:n,temporaryProof:i}=e;return r||t||n||i?new r2({verificationId:t,verificationCode:r,phoneNumber:n,temporaryProof:i}):null}}class r3{constructor(e){const t=M(F(e)),r=t.apiKey??null,n=t.oobCode??null,i=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}}(t.mode??null);tP(r&&n&&i,"argument-error"),this.apiKey=r,this.operation=i,this.code=n,this.continueUrl=t.continueUrl??null,this.languageCode=t.lang??null,this.tenantId=t.tenantId??null}static parseLink(e){let t,r,n,i=(r=(t=M(F(e)).link)?M(F(t)).deep_link_id:null,((n=M(F(e)).deep_link_id)?M(F(n)).link:null)||n||r||t||e);try{return new r3(i)}catch{return null}}}class r4{constructor(){this.providerId=r4.PROVIDER_ID}static credential(e,t){return rG._fromEmailAndPassword(e,t)}static credentialWithLink(e,t){let r=r3.parseLink(t);return tP(r,"argument-error"),rG._fromEmailAndCode(e,r.code,r.tenantId)}}r4.PROVIDER_ID="password",r4.EMAIL_PASSWORD_SIGN_IN_METHOD="password",r4.EMAIL_LINK_SIGN_IN_METHOD="emailLink";class r6{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}}class r5 extends r6{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}class r8 extends r5{static credentialFromJSON(e){let t="string"==typeof e?JSON.parse(e):e;return tP("providerId"in t&&"signInMethod"in t,"argument-error"),rY._fromParams(t)}credential(e){return this._credential({...e,nonce:e.rawNonce})}_credential(e){return tP(e.idToken||e.accessToken,"argument-error"),rY._fromParams({...e,providerId:this.providerId,signInMethod:this.providerId})}static credentialFromResult(e){return r8.oauthCredentialFromTaggedObject(e)}static credentialFromError(e){return r8.oauthCredentialFromTaggedObject(e.customData||{})}static oauthCredentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthIdToken:t,oauthAccessToken:r,oauthTokenSecret:n,pendingToken:i,nonce:a,providerId:s}=e;if(!r&&!n&&!t&&!i||!s)return null;try{return new r8(s)._credential({idToken:t,accessToken:r,nonce:a,pendingToken:i})}catch(e){return null}}}class r7 extends r5{constructor(){super("facebook.com")}static credential(e){return rY._fromParams({providerId:r7.PROVIDER_ID,signInMethod:r7.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return r7.credentialFromTaggedObject(e)}static credentialFromError(e){return r7.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return r7.credential(e.oauthAccessToken)}catch{return null}}}r7.FACEBOOK_SIGN_IN_METHOD="facebook.com",r7.PROVIDER_ID="facebook.com";class r9 extends r5{constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return rY._fromParams({providerId:r9.PROVIDER_ID,signInMethod:r9.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return r9.credentialFromTaggedObject(e)}static credentialFromError(e){return r9.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthIdToken:t,oauthAccessToken:r}=e;if(!t&&!r)return null;try{return r9.credential(t,r)}catch{return null}}}r9.GOOGLE_SIGN_IN_METHOD="google.com",r9.PROVIDER_ID="google.com";class ne extends r5{constructor(){super("github.com")}static credential(e){return rY._fromParams({providerId:ne.PROVIDER_ID,signInMethod:ne.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return ne.credentialFromTaggedObject(e)}static credentialFromError(e){return ne.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return ne.credential(e.oauthAccessToken)}catch{return null}}}ne.GITHUB_SIGN_IN_METHOD="github.com",ne.PROVIDER_ID="github.com";class nt extends r5{constructor(){super("twitter.com")}static credential(e,t){return rY._fromParams({providerId:nt.PROVIDER_ID,signInMethod:nt.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return nt.credentialFromTaggedObject(e)}static credentialFromError(e){return nt.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthAccessToken:t,oauthTokenSecret:r}=e;if(!t||!r)return null;try{return nt.credential(t,r)}catch{return null}}}async function nr(e,t){return tB(e,"POST","/v1/accounts:signUp",tz(e,t))}nt.TWITTER_SIGN_IN_METHOD="twitter.com",nt.PROVIDER_ID="twitter.com";class nn{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,t,r,n=!1){return new nn({user:await ra._fromIdTokenResponse(e,r,n),providerId:ni(r),_tokenResponse:r,operationType:t})}static async _forOperation(e,t,r){return await e._updateTokensIfNecessary(r,!0),new nn({user:e,providerId:ni(r),_tokenResponse:r,operationType:t})}}function ni(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}class na extends P{constructor(e,t,r,n){super(t.code,t.message),this.operationType=r,this.user=n,Object.setPrototypeOf(this,na.prototype),this.customData={appName:e.name,tenantId:e.tenantId??void 0,_serverResponse:t.customData._serverResponse,operationType:r}}static _fromErrorAndOperation(e,t,r,n){return new na(e,t,r,n)}}function ns(e,t,r,n){return("reauthenticate"===t?r._getReauthenticationResolver(e):r._getIdTokenResponse(e)).catch(r=>{if("auth/multi-factor-auth-required"===r.code)throw na._fromErrorAndOperation(e,r,t,n);throw r})}async function no(e,t,r=!1){let n=await t6(e,t._linkToIdToken(e.auth,await e.getIdToken()),r);return nn._forOperation(e,"link",n)}async function nl(e,t,r=!1){let{auth:n}=e;if(eS(n.app))return Promise.reject(tC(n));let i="reauthenticate";try{let a=await t6(e,ns(n,i,t,e),r);tP(a.idToken,n,"internal-error");let s=t3(a.idToken);tP(s,n,"internal-error");let{sub:o}=s;return tP(e.uid===o,n,"user-mismatch"),nn._forOperation(e,i,a)}catch(e){throw e?.code==="auth/user-not-found"&&tE(n,"user-mismatch"),e}}async function nu(e,t,r=!1){if(eS(e.app))return Promise.reject(tC(e));let n="signIn",i=await ns(e,n,t),a=await nn._fromIdTokenResponse(e,n,i);return r||await e._updateCurrentUser(a.user),a}async function nc(e,t){return nu(U(e),t)}class nd{constructor(e,t){this.factorId=e,this.uid=t.mfaEnrollmentId,this.enrollmentTime=new Date(t.enrolledAt).toUTCString(),this.displayName=t.displayName}static _fromServerResponse(e,t){return"phoneInfo"in t?nh._fromServerResponse(e,t):"totpInfo"in t?nf._fromServerResponse(e,t):tE(e,"internal-error")}}class nh extends nd{constructor(e){super("phone",e),this.phoneNumber=e.phoneInfo}static _fromServerResponse(e,t){return new nh(t)}}class nf extends nd{constructor(e){super("totp",e)}static _fromServerResponse(e,t){return new nf(t)}}async function np(e){let t=U(e);t._getPasswordPolicyInternal()&&await t._updatePasswordPolicy()}async function nm(e,t,r){if(eS(e.app))return Promise.reject(tC(e));let n=U(e),i=rj(n,{returnSecureToken:!0,email:t,password:r,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",nr,"EMAIL_PASSWORD_PROVIDER"),a=await i.catch(t=>{throw"auth/password-does-not-meet-requirements"===t.code&&np(e),t}),s=await nn._fromIdTokenResponse(n,"signIn",a);return await n._updateCurrentUser(s.user),s}function ng(e,t,r){return eS(e.app)?Promise.reject(tC(e)):nc(U(e),r4.credential(t,r)).catch(async t=>{throw"auth/password-does-not-meet-requirements"===t.code&&np(e),t})}async function nv(e,t){var r;let n=U(e),i={requestType:"VERIFY_EMAIL",idToken:await e.getIdToken()};t&&(r=n.auth,tP(t.url?.length>0,r,"invalid-continue-uri"),tP(void 0===t.dynamicLinkDomain||t.dynamicLinkDomain.length>0,r,"invalid-dynamic-link-domain"),tP(void 0===t.linkDomain||t.linkDomain.length>0,r,"invalid-hosting-link-domain"),i.continueUrl=t.url,i.dynamicLinkDomain=t.dynamicLinkDomain,i.linkDomain=t.linkDomain,i.canHandleCodeInApp=t.handleCodeInApp,t.iOS&&(tP(t.iOS.bundleId.length>0,r,"missing-ios-bundle-id"),i.iOSBundleId=t.iOS.bundleId),t.android&&(tP(t.android.packageName.length>0,r,"missing-android-pkg-name"),i.androidInstallApp=t.android.installApp,i.androidMinimumVersionCode=t.android.minimumVersion,i.androidPackageName=t.android.packageName));let{email:a}=await rW(n.auth,i);a!==e.email&&await e.reload()}function ny(e,t,r,n){return U(e).onIdTokenChanged(t,r,n)}function nb(e,t,r,n){return U(e).onAuthStateChanged(t,r,n)}function nw(e,t){return tV(e,"POST","/v2/accounts/mfaEnrollment:start",tz(e,t))}new WeakMap;let nS="__sak";class nk{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{if(!this.storage)return Promise.resolve(!1);return this.storage.setItem(nS,"1"),this.storage.removeItem(nS),Promise.resolve(!0)}catch{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 nE extends nk{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=rw(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(let t of Object.keys(this.listeners)){let r=this.storage.getItem(t),n=this.localCache[t];r!==n&&e(t,n,r)}}onStorageEvent(e,t=!1){let r;if(!e.key)return void this.forAllChangedKeys((e,t,r)=>{this.notifyListeners(e,r)});let n=e.key;t?this.detachListener():this.stopPolling();let i=()=>{let e=this.storage.getItem(n);(t||this.localCache[n]!==e)&&this.notifyListeners(n,e)},a=this.storage.getItem(n);((r=I()).indexOf("MSIE ")>=0||r.indexOf("Trident/")>=0)&&10===document.documentMode&&a!==e.newValue&&e.newValue!==e.oldValue?setTimeout(i,10):i()}notifyListeners(e,t){this.localCache[e]=t;let r=this.listeners[e];if(r)for(let e of Array.from(r))e(t?JSON.parse(t):t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,t,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:t,newValue:r}),!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]}}nE.type="LOCAL";class nx extends nk{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,t){}_removeListener(e,t){}}nx.type="SESSION";class n_{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 r=new n_(e);return this.receivers.push(r),r}isListeningto(e){return this.eventTarget===e}async handleEvent(e){let{eventId:t,eventType:r,data:n}=e.data,i=this.handlersMap[r];if(!i?.size)return;e.ports[0].postMessage({status:"ack",eventId:t,eventType:r});let a=Array.from(i).map(async t=>t(e.origin,n)),s=await Promise.all(a.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:r,response:s})}_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)}}function nC(e="",t=10){let r="";for(let e=0;e<t;e++)r+=Math.floor(10*Math.random());return e+r}n_.receivers=[];function nI(){return window}function nT(e,t){return tV(e,"POST","/v2/accounts/mfaSignIn:start",tz(e,t))}let nP=rP("rcb"),nA=new tL(3e4,6e4);class nR{constructor(){this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!nI().grecaptcha?.render}load(e,t=""){var r;return(tP((r=t).length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(r),e,"argument-error"),this.shouldResolveImmediately(t)&&tK(nI().grecaptcha))?Promise.resolve(nI().grecaptcha):new Promise((r,n)=>{let i=nI().setTimeout(()=>{n(tx(e,"network-request-failed"))},nA.get());nI()[nP]=()=>{nI().clearTimeout(i),delete nI()[nP];let a=nI().grecaptcha;if(!a||!tK(a))return void n(tx(e,"internal-error"));let s=a.render;a.render=(e,t)=>{let r=s(e,t);return this.counter++,r},this.hostLanguage=t,r(a)},rT(`${rI.recaptchaV2Script}?${L({onload:nP,render:"explicit",hl:t})}`).catch(()=>{clearTimeout(i),n(tx(e,"internal-error"))})})}clearedOneInstance(){this.counter--}shouldResolveImmediately(e){return!!nI().grecaptcha?.render&&(e===this.hostLanguage||this.counter>0||this.librarySeparatelyLoaded)}}class nN{async load(e){return new rA(e)}clearedOneInstance(){}}let nO="recaptcha",nL={theme:"light",type:"image"};class nM{constructor(e,t,r={...nL}){this.parameters=r,this.type=nO,this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=U(e),this.isInvisible="invisible"===this.parameters.size,tP("undefined"!=typeof document,this.auth,"operation-not-supported-in-this-environment");const n="string"==typeof t?document.getElementById(t):t;tP(n,this.auth,"argument-error"),this.container=n,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new nN:new nR,this.validateStartingState()}async verify(){this.assertNotDestroyed();let e=await this.render(),t=this.getAssertedRecaptcha(),r=t.getResponse(e);return r||new Promise(r=>{let n=e=>{e&&(this.tokenChangeListeners.delete(n),r(e))};this.tokenChangeListeners.add(n),this.isInvisible&&t.execute(e)})}render(){try{this.assertNotDestroyed()}catch(e){return Promise.reject(e)}return this.renderPromise||(this.renderPromise=this.makeRenderPromise().catch(e=>{throw this.renderPromise=null,e})),this.renderPromise}_reset(){this.assertNotDestroyed(),null!==this.widgetId&&this.getAssertedRecaptcha().reset(this.widgetId)}clear(){this.assertNotDestroyed(),this.destroyed=!0,this._recaptchaLoader.clearedOneInstance(),this.isInvisible||this.container.childNodes.forEach(e=>{this.container.removeChild(e)})}validateStartingState(){tP(!this.parameters.sitekey,this.auth,"argument-error"),tP(this.isInvisible||!this.container.hasChildNodes(),this.auth,"argument-error"),tP("undefined"!=typeof document,this.auth,"operation-not-supported-in-this-environment")}makeTokenCallback(e){return t=>{if(this.tokenChangeListeners.forEach(e=>e(t)),"function"==typeof e)e(t);else if("string"==typeof e){let r=nI()[e];"function"==typeof r&&r(t)}}}assertNotDestroyed(){tP(!this.destroyed,this.auth,"internal-error")}async makeRenderPromise(){if(await this.init(),!this.widgetId){let e=this.container;if(!this.isInvisible){let t=document.createElement("div");e.appendChild(t),e=t}this.widgetId=this.getAssertedRecaptcha().render(e,this.parameters)}return this.widgetId}async init(){let e;tP(tN()&&(void 0===nI().WorkerGlobalScope||"function"!=typeof nI().importScripts),this.auth,"internal-error"),await (e=null,new Promise(t=>{"complete"===document.readyState?t():(e=()=>t(),window.addEventListener("load",e))}).catch(t=>{throw e&&window.removeEventListener("load",e),t})),this.recaptcha=await this._recaptchaLoader.load(this.auth,this.auth.languageCode||void 0);let t=await tY(this.auth);tP(t,this.auth,"internal-error"),this.parameters.sitekey=t}getAssertedRecaptcha(){return tP(this.recaptcha,this.auth,"internal-error"),this.recaptcha}}class nF{constructor(e,t){this.verificationId=e,this.onConfirmation=t}confirm(e){let t=r2._fromVerification(this.verificationId,e);return this.onConfirmation(t)}}async function nj(e,t,r){if(eS(e.app))return Promise.reject(tC(e));let n=U(e);return new nF(await nD(n,t,U(r)),e=>nc(n,e))}async function nD(e,t,r){if(!e._getRecaptchaConfig())try{await rD(e)}catch(e){console.log("Failed to initialize reCAPTCHA Enterprise config. Triggering the reCAPTCHA v2 verification.")}try{let n;if(n="string"==typeof t?{phoneNumber:t}:t,"session"in n){let t=n.session;if("phoneNumber"in n){tP("enroll"===t.type,e,"internal-error");let i={idToken:t.credential,phoneEnrollmentInfo:{phoneNumber:n.phoneNumber,clientType:"CLIENT_TYPE_WEB"}},a=async(e,t)=>{if(t.phoneEnrollmentInfo.captchaResponse===rL){tP(r?.type===nO,e,"argument-error");let n=await nU(e,t,r);return nw(e,n)}return nw(e,t)},s=rj(e,i,"mfaSmsEnrollment",a,"PHONE_PROVIDER");return(await s.catch(e=>Promise.reject(e))).phoneSessionInfo.sessionInfo}{tP("signin"===t.type,e,"internal-error");let i=n.multiFactorHint?.uid||n.multiFactorUid;tP(i,e,"missing-multi-factor-info");let a={mfaPendingCredential:t.credential,mfaEnrollmentId:i,phoneSignInInfo:{clientType:"CLIENT_TYPE_WEB"}},s=async(e,t)=>{if(t.phoneSignInInfo.captchaResponse===rL){tP(r?.type===nO,e,"argument-error");let n=await nU(e,t,r);return nT(e,n)}return nT(e,t)},o=rj(e,a,"mfaSmsSignIn",s,"PHONE_PROVIDER");return(await o.catch(e=>Promise.reject(e))).phoneResponseInfo.sessionInfo}}{let t={phoneNumber:n.phoneNumber,clientType:"CLIENT_TYPE_WEB"},i=async(e,t)=>{if(t.captchaResponse===rL){tP(r?.type===nO,e,"argument-error");let n=await nU(e,t,r);return rJ(e,n)}return rJ(e,t)},a=rj(e,t,"sendVerificationCode",i,"PHONE_PROVIDER");return(await a.catch(e=>Promise.reject(e))).sessionInfo}}finally{r?._reset()}}async function nU(e,t,r){tP(r.type===nO,e,"argument-error");let n=await r.verify();tP("string"==typeof n,e,"argument-error");let i={...t};if("phoneEnrollmentInfo"in i){let e=i.phoneEnrollmentInfo.phoneNumber,t=i.phoneEnrollmentInfo.captchaResponse,r=i.phoneEnrollmentInfo.clientType,a=i.phoneEnrollmentInfo.recaptchaVersion;return Object.assign(i,{phoneEnrollmentInfo:{phoneNumber:e,recaptchaToken:n,captchaResponse:t,clientType:r,recaptchaVersion:a}}),i}if(!("phoneSignInInfo"in i))return Object.assign(i,{recaptchaToken:n}),i;{let e=i.phoneSignInInfo.captchaResponse,t=i.phoneSignInInfo.clientType,r=i.phoneSignInInfo.recaptchaVersion;return Object.assign(i,{phoneSignInInfo:{recaptchaToken:n,captchaResponse:e,clientType:t,recaptchaVersion:r}}),i}}class nz{constructor(e){this.providerId=nz.PROVIDER_ID,this.auth=U(e)}verifyPhoneNumber(e,t){return nD(this.auth,e,U(t))}static credential(e,t){return r2._fromVerification(e,t)}static credentialFromResult(e){return nz.credentialFromTaggedObject(e)}static credentialFromError(e){return nz.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{phoneNumber:t,temporaryProof:r}=e;return t&&r?r2._fromTokenResponse(t,r):null}}function nV(e,t){return t?ro(t):(tP(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}nz.PROVIDER_ID="phone",nz.PHONE_SIGN_IN_METHOD="phone";class n$ extends rV{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return rQ(e,this._buildIdpRequest())}_linkToIdToken(e,t){return rQ(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return rQ(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 nB(e){return nu(e.auth,new n$(e),e.bypassAuthState)}function nH(e){let{auth:t,user:r}=e;return tP(r,t,"internal-error"),nl(r,new n$(e),e.bypassAuthState)}async function nW(e){let{auth:t,user:r}=e;return tP(r,t,"internal-error"),no(r,new n$(e),e.bypassAuthState)}class nq{constructor(e,t,r,n,i=!1){this.auth=e,this.resolver=r,this.user=n,this.bypassAuthState=i,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:r,postBody:n,tenantId:i,error:a,type:s}=e;if(a)return void this.reject(a);let o={auth:this.auth,requestUri:t,sessionId:r,tenantId:i||void 0,postBody:n||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(s)(o))}catch(e){this.reject(e)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return nB;case"linkViaPopup":case"linkViaRedirect":return nW;case"reauthViaPopup":case"reauthViaRedirect":return nH;default:tE(this.auth,"internal-error")}}resolve(e){var t,r;t=this.pendingPromise,r="Pending promise was never set",t||tA(r),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){var t,r;t=this.pendingPromise,r="Pending promise was never set",t||tA(r),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}let nK=new tL(2e3,1e4);async function nG(e,t,r){if(eS(e.app))return Promise.reject(tx(e,"operation-not-supported-in-this-environment"));let n=U(e);tI(e,t,r6);let i=nV(n,r);return new nQ(n,"signInViaPopup",t,i).executeNotNull()}class nQ extends nq{constructor(e,t,r,n,i){super(e,t,n,i),this.provider=r,this.authWindow=null,this.pollId=null,nQ.currentPopupAction&&nQ.currentPopupAction.cancel(),nQ.currentPopupAction=this}async executeNotNull(){let e=await this.execute();return tP(e,this.auth,"internal-error"),e}async onExecution(){var e,t;e=1===this.filter.length,t="Popup operations only handle one event",e||tA(t);let r=nC();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],r),this.authWindow.associatedEvent=r,this.resolver._originValidation(this.auth).catch(e=>{this.reject(e)}),this.resolver._isIframeWebStorageSupported(this.auth,e=>{e||this.reject(tx(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){return this.authWindow?.associatedEvent||null}cancel(){this.reject(tx(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,nQ.currentPopupAction=null}pollUserCancellation(){let e=()=>{if(this.authWindow?.window?.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(tx(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(e,nK.get())};e()}}nQ.currentPopupAction=null;let nY=new Map;class nJ extends nq{constructor(e,t,r=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,r),this.eventId=null}async execute(){let e=nY.get(this.auth._key());if(!e){try{let t=await nX(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(t)}catch(t){e=()=>Promise.reject(t)}nY.set(this.auth._key(),e)}return this.bypassAuthState||nY.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if("signInViaRedirect"===e.type)return super.onAuthEvent(e);if("unknown"===e.type)return void this.resolve(null);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 nX(e,t){let r=n2(t),n=n1(e);if(!await n._isAvailable())return!1;let i=await n._get(r)==="true";return await n._remove(r),i}async function nZ(e,t){return n1(e)._set(n2(t),"true")}function n0(e,t){nY.set(e._key(),t)}function n1(e){return ro(e._redirectPersistence)}function n2(e){return ru("pendingRedirect",e.config.apiKey,e.name)}function n3(e,t,r){return n4(e,t,r)}async function n4(e,t,r){if(eS(e.app))return Promise.reject(tC(e));let n=U(e);tI(e,t,r6),await n._initializationPromise;let i=nV(n,r);return await nZ(i,n),i._openRedirect(n,t,"signInViaRedirect")}async function n6(e,t){return await U(e)._initializationPromise,n5(e,t,!1)}async function n5(e,t,r=!1){if(eS(e.app))return Promise.reject(tC(e));let n=U(e),i=nV(n,t),a=new nJ(n,i,r),s=await a.execute();return s&&!r&&(delete s.user._redirectEventId,await n._persistUserIfCurrent(s.user),await n._setRedirectUser(null,t)),s}class n8{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(r=>{this.isEventForConsumer(e,r)&&(t=!0,this.sendToConsumer(e,r),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!function(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return n9(e);default:return!1}}(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){if(e.error&&!n9(e)){let r=e.error.code?.split("auth/")[1]||"internal-error";t.onError(tx(this.auth,r))}else t.onAuthEvent(e)}isEventForConsumer(e,t){let r=null===t.eventId||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&r}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(n7(e))}saveEventToCache(e){this.cachedEventUids.add(n7(e)),this.lastProcessedEventTime=Date.now()}}function n7(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter(e=>e).join("-")}function n9({type:e,error:t}){return"unknown"===e&&t?.code==="auth/no-auth-event"}async function ie(e,t={}){return tV(e,"GET","/v1/projects",t)}let it=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,ir=/^https?/;async function ii(e){if(e.config.emulator)return;let{authorizedDomains:t}=await ie(e);for(let e of t)try{if(function(e){let t=tR(),{protocol:r,hostname:n}=new URL(t);if(e.startsWith("chrome-extension://")){let i=new URL(e);return""===i.hostname&&""===n?"chrome-extension:"===r&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):"chrome-extension:"===r&&i.hostname===n}if(!ir.test(r))return!1;if(it.test(e))return n===e;let i=e.replace(/\./g,"\\.");return RegExp("^(.+\\."+i+"|"+i+")$","i").test(n)}(e))return}catch{}tE(e,"unauthorized-domain")}let ia=new tL(3e4,6e4);function is(){let e=nI().___jsl;if(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<e.CP.length;t++)e.CP[t]=null}}let io=null,il=new tL(5e3,15e3),iu={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},ic=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);async function id(e){let t,r,n,i,a,s=await (io=io||new Promise((t,r)=>{function n(){is(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{is(),r(tx(e,"network-request-failed"))},timeout:ia.get()})}if(nI().gapi?.iframes?.Iframe)t(gapi.iframes.getContext());else if(nI().gapi?.load)n();else{let t=rP("iframefcb");return nI()[t]=()=>{gapi.load?n():r(tx(e,"network-request-failed"))},rT(`${rI.gapiScript}?onload=${t}`).catch(e=>r(e))}}).catch(e=>{throw io=null,e})),o=nI().gapi;return tP(o,e,"internal-error"),s.open({where:document.body,url:(tP((t=e.config).authDomain,e,"auth-domain-config-required"),r=t.emulator?tM(t,"emulator/auth/iframe"):`https://${e.config.authDomain}/__/auth/iframe`,n={apiKey:t.apiKey,appName:e.name,v:ex},(i=ic.get(e.config.apiHost))&&(n.eid=i),(a=e._getFrameworks()).length&&(n.fw=a.join(",")),`${r}?${L(n).slice(1)}`),messageHandlersFilter:o.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:iu,dontclear:!0},t=>new Promise(async(r,n)=>{await t.restyle({setHideOnLeave:!1});let i=tx(e,"network-request-failed"),a=nI().setTimeout(()=>{n(i)},il.get());function s(){nI().clearTimeout(a),r(t)}t.ping(s).then(s,()=>{n(i)})}))}let ih={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class ip{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(e){}}}let im=encodeURIComponent("fac");async function ig(e,t,r,n,i,a){tP(e.config.authDomain,e,"auth-domain-config-required"),tP(e.config.apiKey,e,"invalid-api-key");let s={apiKey:e.config.apiKey,appName:e.name,authType:r,redirectUrl:n,v:ex,eventId:i};if(t instanceof r6)for(let[r,n]of(t.setDefaultLanguage(e.languageCode),s.providerId=t.providerId||"",!function(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}(t.getCustomParameters())&&(s.customParameters=JSON.stringify(t.getCustomParameters())),Object.entries(a||{})))s[r]=n;if(t instanceof r5){let e=t.getScopes().filter(e=>""!==e);e.length>0&&(s.scopes=e.join(","))}for(let t of(e.tenantId&&(s.tid=e.tenantId),Object.keys(s)))void 0===s[t]&&delete s[t];let o=await e._getAppCheckToken(),l=o?`#${im}=${encodeURIComponent(o)}`:"";return`${function({config:e}){return e.emulator?tM(e,"emulator/auth/handler"):`https://${e.authDomain}/__/auth/handler`}(e)}?${L(s).slice(1)}${l}`}let iv="webStorageSupport",iy=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=nx,this._completeRedirectFn=n5,this._overrideRedirectResult=n0}async _openPopup(e,t,r,n){var i,a;i=this.eventManagers[e._key()]?.manager,a="_initialize() not called before _openPopup()",i||tA(a);let s=await ig(e,t,r,tR(),n);return function(e,t,r,n=500,i=600){let a=Math.max((window.screen.availHeight-i)/2,0).toString(),s=Math.max((window.screen.availWidth-n)/2,0).toString(),o="",l={...ih,width:n.toString(),height:i.toString(),top:a,left:s},u=I().toLowerCase();r&&(o=rp(u)?"_blank":r),rh(u)&&(t=t||"http://localhost",l.scrollbars="yes");let c=Object.entries(l).reduce((e,[t,r])=>`${e}${t}=${r},`,"");if(function(e=I()){return rb(e)&&!!window.navigator?.standalone}(u)&&"_self"!==o){var d,h;let e,r;return d=t||"",h=o,(e=document.createElement("a")).href=d,e.target=h,(r=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),e.dispatchEvent(r),new ip(null)}let f=window.open(t||"",o,c);tP(f,e,"popup-blocked");try{f.focus()}catch(e){}return new ip(f)}(e,s,nC())}async _openRedirect(e,t,r,n){var i;return await this._originValidation(e),i=await ig(e,t,r,tR(),n),nI().location.href=i,new Promise(()=>{})}_initialize(e){let t=e._key();if(this.eventManagers[t]){var r;let{manager:e,promise:n}=this.eventManagers[t];return e?Promise.resolve(e):(r="If manager is not set, promise should be",n||tA(r),n)}let n=this.initAndGetManager(e);return this.eventManagers[t]={promise:n},n.catch(()=>{delete this.eventManagers[t]}),n}async initAndGetManager(e){let t=await id(e),r=new n8(e);return t.register("authEvent",t=>(tP(t?.authEvent,e,"invalid-auth-event"),{status:r.onEvent(t.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:r},this.iframes[e._key()]=t,r}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(iv,{type:iv},r=>{let n=r?.[0]?.[iv];void 0!==n&&t(!!n),tE(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){let t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=ii(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return rw()||rf()||rb()}};var ib="@firebase/auth",iw="1.11.0";class iS{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){return this.assertAuthConfigured(),this.auth.currentUser?.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(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(){tP(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}w()?._authIdTokenMaxAge,rI={loadJS:e=>new Promise((t,r)=>{let n=document.createElement("script");n.setAttribute("src",e),n.onload=t,n.onerror=e=>{let t=tx("internal-error");t.customData=e,r(t)},n.type="text/javascript",n.charset="UTF-8",(document.getElementsByTagName("head")?.[0]??document).appendChild(n)}),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="},o="Browser",eb(new z("auth",(e,{options:t})=>{let r,n,i=e.getProvider("app").getImmediate(),a=e.getProvider("heartbeat"),s=e.getProvider("app-check-internal"),{apiKey:l,authDomain:u}=i.options;tP(l&&!l.includes(":"),"invalid-api-key",{appName:i.name});let c=new r_(i,a,s,{apiKey:l,authDomain:u,clientPlatform:o,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:rS(o)});return n=(Array.isArray(r=t?.persistence||[])?r:[r]).map(ro),t?.errorMap&&c._updateErrorMap(t.errorMap),c._initializeWithPersistence(n,t?.popupRedirectResolver),c},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,r)=>{e.getProvider("auth-internal").initialize()})),eb(new z("auth-internal",e=>new iS(U(e.getProvider("auth").getImmediate())),"PRIVATE").setInstantiationMode("EXPLICIT")),eT(ib,iw,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}}(o)),eT(ib,iw,"esm2020");let ik="@firebase/installations",iE="0.6.19",ix=`w:${iE}`,i_="FIS_v2",iC=new A("installations","Installations",{"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"not-registered":"Firebase Installation is not registered.","installation-not-found":"Firebase Installation not found.","request-failed":'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',"app-offline":"Could not process request. Application offline.","delete-pending-registration":"Can't delete installation while there is a pending registration request."});function iI(e){return e instanceof P&&e.code.includes("request-failed")}function iT({projectId:e}){return`https://firebaseinstallations.googleapis.com/v1/projects/${e}/installations`}function iP(e){return{token:e.token,requestStatus:2,expiresIn:Number(e.expiresIn.replace("s","000")),creationTime:Date.now()}}async function iA(e,t){let r=(await t.json()).error;return iC.create("request-failed",{requestName:e,serverCode:r.code,serverMessage:r.message,serverStatus:r.status})}function iR({apiKey:e}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}async function iN(e){let t=await e();return t.status>=500&&t.status<600?e():t}async function iO({appConfig:e,heartbeatServiceProvider:t},{fid:r}){let n=iT(e),i=iR(e),a=t.getImmediate({optional:!0});if(a){let e=await a.getHeartbeatsHeader();e&&i.append("x-firebase-client",e)}let s={method:"POST",headers:i,body:JSON.stringify({fid:r,authVersion:i_,appId:e.appId,sdkVersion:ix})},o=await iN(()=>fetch(n,s));if(o.ok){let e=await o.json();return{fid:e.fid||r,registrationStatus:2,refreshToken:e.refreshToken,authToken:iP(e.authToken)}}throw await iA("Create Installation",o)}function iL(e){return new Promise(t=>{setTimeout(t,e)})}let iM=/^[cdef][\w-]{21}$/;function iF(e){return`${e.appName}!${e.appId}`}let ij=new Map;function iD(e,t){var r,n;let i,a=iF(e);iU(a,t),r=a,n=t,(i=(!iz&&"BroadcastChannel"in self&&((iz=new BroadcastChannel("[Firebase] FID Change")).onmessage=e=>{iU(e.data.key,e.data.fid)}),iz))&&i.postMessage({key:r,fid:n}),0===ij.size&&iz&&(iz.close(),iz=null)}function iU(e,t){let r=ij.get(e);if(r)for(let e of r)e(t)}let iz=null,iV="firebase-installations-store",i$=null;function iB(){return i$||(i$=ei("firebase-installations-database",1,{upgrade:(e,t)=>{0===t&&e.createObjectStore(iV)}})),i$}async function iH(e,t){let r=iF(e),n=(await iB()).transaction(iV,"readwrite"),i=n.objectStore(iV),a=await i.get(r);return await i.put(t,r),await n.done,a&&a.fid===t.fid||iD(e,t.fid),t}async function iW(e){let t=iF(e),r=(await iB()).transaction(iV,"readwrite");await r.objectStore(iV).delete(t),await r.done}async function iq(e,t){let r=iF(e),n=(await iB()).transaction(iV,"readwrite"),i=n.objectStore(iV),a=await i.get(r),s=t(a);return void 0===s?await i.delete(r):await i.put(s,r),await n.done,s&&(!a||a.fid!==s.fid)&&iD(e,s.fid),s}async function iK(e){let t,r=await iq(e.appConfig,r=>{let n=function(e,t){if(0===t.registrationStatus){if(!navigator.onLine)return{installationEntry:t,registrationPromise:Promise.reject(iC.create("app-offline"))};let r={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},n=iG(e,r);return{installationEntry:r,registrationPromise:n}}return 1===t.registrationStatus?{installationEntry:t,registrationPromise:iQ(e)}:{installationEntry:t}}(e,iJ(r||{fid:function(){try{var e;let t=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(t),t[0]=112+t[0]%16;let r=(e=t,btoa(String.fromCharCode(...e)).replace(/\+/g,"-").replace(/\//g,"_").substr(0,22));return iM.test(r)?r:""}catch{return""}}(),registrationStatus:0}));return t=n.registrationPromise,n.installationEntry});return""===r.fid?{installationEntry:await t}:{installationEntry:r,registrationPromise:t}}async function iG(e,t){try{let r=await iO(e,t);return iH(e.appConfig,r)}catch(r){throw iI(r)&&409===r.customData.serverCode?await iW(e.appConfig):await iH(e.appConfig,{fid:t.fid,registrationStatus:0}),r}}async function iQ(e){let t=await iY(e.appConfig);for(;1===t.registrationStatus;)await iL(100),t=await iY(e.appConfig);if(0===t.registrationStatus){let{installationEntry:t,registrationPromise:r}=await iK(e);return r||t}return t}function iY(e){return iq(e,e=>{if(!e)throw iC.create("installation-not-found");return iJ(e)})}function iJ(e){var t;return 1===(t=e).registrationStatus&&t.registrationTime+1e4<Date.now()?{fid:e.fid,registrationStatus:0}:e}async function iX({appConfig:e,heartbeatServiceProvider:t},r){let n=function(e,{fid:t}){return`${iT(e)}/${t}/authTokens:generate`}(e,r),i=function(e,{refreshToken:t}){var r;let n=iR(e);return n.append("Authorization",(r=t,`${i_} ${r}`)),n}(e,r),a=t.getImmediate({optional:!0});if(a){let e=await a.getHeartbeatsHeader();e&&i.append("x-firebase-client",e)}let s={method:"POST",headers:i,body:JSON.stringify({installation:{sdkVersion:ix,appId:e.appId}})},o=await iN(()=>fetch(n,s));if(o.ok)return iP(await o.json());throw await iA("Generate Auth Token",o)}async function iZ(e,t=!1){let r,n=await iq(e.appConfig,n=>{var i,a,s;let o;if(!i3(n))throw iC.create("not-registered");let l=n.authToken;if(!t&&2===(i=l).requestStatus&&(a=i,!((o=Date.now())<a.creationTime)&&!(a.creationTime+a.expiresIn<o+36e5)))return n;if(1===l.requestStatus)return r=i0(e,t),n;{let t;if(!navigator.onLine)throw iC.create("app-offline");let i=(s=n,t={requestStatus:1,requestTime:Date.now()},{...s,authToken:t});return r=i2(e,i),i}});return r?await r:n.authToken}async function i0(e,t){let r=await i1(e.appConfig);for(;1===r.authToken.requestStatus;)await iL(100),r=await i1(e.appConfig);let n=r.authToken;return 0===n.requestStatus?iZ(e,t):n}function i1(e){return iq(e,e=>{var t;if(!i3(e))throw iC.create("not-registered");return 1===(t=e.authToken).requestStatus&&t.requestTime+1e4<Date.now()?{...e,authToken:{requestStatus:0}}:e})}async function i2(e,t){try{let r=await iX(e,t),n={...t,authToken:r};return await iH(e.appConfig,n),r}catch(r){if(iI(r)&&(401===r.customData.serverCode||404===r.customData.serverCode))await iW(e.appConfig);else{let r={...t,authToken:{requestStatus:0}};await iH(e.appConfig,r)}throw r}}function i3(e){return void 0!==e&&2===e.registrationStatus}async function i4(e){let{installationEntry:t,registrationPromise:r}=await iK(e);return r?r.catch(console.error):iZ(e).catch(console.error),t.fid}async function i6(e,t=!1){return await i5(e),(await iZ(e,t)).token}async function i5(e){let{registrationPromise:t}=await iK(e);t&&await t}function i8(e){return iC.create("missing-app-config-values",{valueName:e})}let i7="installations";eb(new z(i7,e=>{let t=e.getProvider("app").getImmediate(),r=function(e){if(!e||!e.options)throw i8("App Configuration");if(!e.name)throw i8("App Name");for(let t of["projectId","apiKey","appId"])if(!e.options[t])throw i8(t);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t),n=ew(t,"heartbeat");return{app:t,appConfig:r,heartbeatServiceProvider:n,_delete:()=>Promise.resolve()}},"PUBLIC")),eb(new z("installations-internal",e=>{let t=ew(e.getProvider("app").getImmediate(),i7).getImmediate();return{getId:()=>i4(t),getToken:e=>i6(t,e)}},"PRIVATE")),eT(ik,iE),eT(ik,iE,"esm2020");let i9=require("@tern-secure/shared/eventBus"),ae="session:sessionChanged",at=(0,i9.createEventBus)(),ar=require("@tern-secure/shared/browser");var an=r(423);class ai{static ternsecure;id;pathRoot="";static get apiClient(){return ai.ternsecure.getApiClient()}static get authCookieManager(){return this.ternsecure.authCookieManager()}get authCookieManager(){return ai.authCookieManager}isNew(){return!this.id}static async _baseFetchFromCoreApi(e){let t;try{t=await ai.apiClient.request(e,{timeoutMs:1e4})}catch(e){if(this.shouldRethrowofflineNetworkError())throw new an.R(e?.message||String(e),{code:"OFFLINE_NETWORK_ERROR"});if(!(0,ar.isValidBrowserOnline)())return console.warn(e),null;throw e}let{payload:r,status:n,statusText:i,headers:a}=t;if(a){let e=a.get("x-country");this.ternsecure.__internal_setCountry(e?e.toLowerCase():null)}if(n>=200&&n<=299)return r;if(n>=400){let e=r?.errors,t=e?.[0]?.message,s={data:e,status:n};if(429===n&&a){let e=a.get("retry-After");if(e){let t=parseInt(e,10);isNaN(t)||(s.retryAfter=t)}}throw new an.y(t||i,s)}return null}path(e){let t=this.pathRoot;if(this.isNew())return t;let r=t.replace(/[^/]$/,"$&/")+encodeURIComponent(this.id);return e?r.replace(/[^/]$/,"$&/")+encodeURIComponent(e):r}static async basePost(e){return this._baseFetchFromCoreApi({...e,method:"POST"})}async _fetchFromCoreApi(e){return ai._baseFetchFromCoreApi(e)}async basePost(e){return ai.basePost(e)}async _baseMutate(e={}){let{action:t,body:r,method:n,path:i}=e,a=await ai._baseFetchFromCoreApi({method:n,path:i||this.path(t),body:r});return this.fromJSON(a?.response||a)}async baseGet(e){return this._fetchFromCoreApi({...e,method:"GET"})}async _post(e){return this.basePost({path:e.path,body:e.body})}async _basePost(e={}){return this._baseMutate({...e,method:"POST"})}static async makeApiRequest(e){return this._baseFetchFromCoreApi(e)}async makeApiRequest(e){return this._fetchFromCoreApi(e)}static shouldRethrowofflineNetworkError(){let e=ai.ternsecure?._internal_getOption?.("experimental");return e?.rethrowOfflineNetworkErrors||!1}}class aa extends ai{pathRoot="/sessions/createsession";status;token;claims;authTime;expirationTime;issuedAtTime;signInProvider;signInSecondFactor;user;constructor(e){super(),this.initializeFromSessionData(e),this.fromJSON(e)}initializeFromSessionData(e){this.status=e.status||"pending",this.token=e.token||"",this.claims=e.claims||{},this.authTime=e.authTime||"",this.expirationTime=e.expirationTime||"",this.issuedAtTime=e.issuedAtTime||"",this.signInProvider=e.signInProvider||null,this.signInSecondFactor=e.signInSecondFactor||null,this.user=e.user}createSession=(e,t)=>this._post({path:this.pathRoot,body:{idToken:e,csrfToken:t}});getIdAndRefreshToken=async(e,t)=>{await this.createSession(e,t)};create=async e=>{await this.createSession(this.token,e),at.emit(ae,null)};toJSON(){return{status:this.status,token:this.token,claims:this.claims,authTime:this.authTime,expirationTime:this.expirationTime,issuedAtTime:this.issuedAtTime,signInProvider:this.signInProvider,signInSecondFactor:this.signInSecondFactor,user:this.user}}fromJSON(e){return e&&this.initializeFromSessionData(e),this}}class as extends ai{status=null;user=null;unverifiedFields;message;error;auth;constructor(e=null,t){super(),this.auth=t,this.fromJSON(e)}withEmailAndPassword=async e=>{try{let{email:t,password:r}=e,{user:n}=await nm(this.auth,t,r);return this.user=n,n.emailVerified||(this.status="missing_requirements",this.unverifiedFields=["email_address"],this.message="User created successfully. Email verification required."),this}catch(t){let e=(0,i.handleFirebaseAuthError)(t);return this.status="error",this.message=e.message,this.error=e.code,this}};withSocialProvider(){throw Error("Method not implemented.")}attemptEmailVerification=async e=>{try{if(!this.user)return this.status="error",this.message="No user found to send verification email",this.error="NO_USER",this;return await nv(this.user,{url:e?.url||window.location.origin,handleCodeInApp:e?.handleCodeInApp??!0}),this.message="Verification email sent successfully",this}catch(t){let e=(0,i.handleFirebaseAuthError)(t);return this.status="error",this.message=e.message,this.error=e.code,this}};fromJSON(e){return e&&(this.id=e.id,this.status=e.status),this}}class ao extends ai{pathRoot="/sign_ins/create";pathSessionRoot="/sessions/createsession";id;status=null;supportedFirstFactors=[];identifier=null;auth;csrfToken;_currentUser=null;_confirmationResult=null;constructor(e=null,t,r){super(),this.auth=t,this.csrfToken=r,this.fromJSON(e)}get user(){return this._currentUser}create=e=>this._basePost({path:this.pathRoot,body:e});attemptFirstFactor=async e=>{let t={...e};return this._basePost({body:{config:t,strategy:e.strategy},action:"attempt_first_factor"})};attemptPhoneNumberVerification=async e=>{if(!this._confirmationResult)throw new i.TernSecureError("UNKNOWN_ERROR","No confirmation result found");try{let t=await this._confirmationResult.confirm(e.code);return this._currentUser=t.user,this.status="success",this._confirmationResult=null,this}catch(t){let e=(0,i.handleFirebaseAuthError)(t);throw this.status="error",console.error(e),new i.TernSecureError(e.code,e.message)}};signInWithCredential=async e=>{let t={idToken:await e.user.getIdToken(),csrfToken:this.csrfToken};return this._post({path:this.pathSessionRoot,body:t})};authenticateWithPassword=async e=>{try{let{email:t,password:r}=e,{user:n,providerId:i,operationType:a}=await ng(this.auth,t,r);return this._currentUser=n,{status:"success",user:n,providerId:i,operationType:a,message:"Authentication successful"}}catch(t){let e=(0,i.handleFirebaseAuthError)(t);return{status:"error",message:e.message,error:e.code}}};createRecaptchaVerifier=(e,t)=>new nM(this.auth,e,t);authenticateWithPhoneNumber=async e=>{try{let{phoneNumber:t,appVerifier:r}=e;return this._confirmationResult=await nj(this.auth,t,r),this.status="needs_first_factor",{status:"needs_first_factor",message:"Verification code sent"}}catch(t){let e=(0,i.handleFirebaseAuthError)(t);return{status:"error",message:e.message,error:e.code}}};withCredential=async e=>{try{let{email:t,password:r}=e,n=await ng(this.auth,t,r);await this.signInWithCredential(n)}catch(e){console.error((0,i.handleFirebaseAuthError)(e))}};authenticateWithSocialProvider=async(e,t={})=>{try{let{mode:r="popup"}=t;if("redirect"!==r)return await this._signInWithPopUp(e,t);{let r=await this.authRedirectResult();if(r)return r;return await this._signInWithRedirect(e,t)}}catch(t){return{status:"error",message:t.message||`Sign in with ${e} failed`,error:t}}};completeMfaSignIn=async(e,t)=>{throw Error("Method not implemented.")};sendPasswordResetEmail=async e=>this._post({path:"/sign_ins/resetPasswordEmail",body:{email:e}});resendEmailVerification=async e=>{let t=this._currentUser;if(!t)throw Error("No user is currently signed in");if(t.emailVerified)return{isVerified:!0};let r={url:e?.url||"/sign-in",handleCodeInApp:e?.handleCodeInApp??!0};return await nv(t,r),{isVerified:!1}};attemptEmailVerification=async e=>{try{if(!(await this.resendEmailVerification(e)).isVerified)return{status:"needs_email_verification",message:"Verification email sent"};return{status:"success",message:"Email is already verified"}}catch(t){let e=(0,i.handleFirebaseAuthError)(t);return{status:"error",message:e.message,error:e.code}}};getProviderConfig(e){switch(e.toLowerCase()){case"google":return{provider:new r9};case"apple":return{provider:new r8("apple.com")};case"microsoft":return{provider:new r8("microsoft.com")};case"github":return{provider:new r8("github.com")};case"twitter":return{provider:new r8("twitter.com")};case"facebook":return{provider:new r8("facebook.com")};default:throw Error(`Unsupported provider: ${e}`)}}async authRedirectResult(){try{let e=await n6(this.auth);if(e){let{user:t,providerId:r,operationType:n}=e;return{status:"success",user:t,providerId:r,operationType:n}}return null}catch(t){let e=(0,i.handleFirebaseAuthError)(t);return{status:"error",message:e.message,error:e.code}}}setProviderCustomParameters(e,t){t&&0!==Object.keys(t).length&&e.setCustomParameters(t)}setProviderScopes(e,t){t&&0!==t.length&&(e instanceof r9?t.forEach(t=>{e.addScope(t)}):e instanceof r8&&e.addScope(t.join(" ")))}configureProvider(e,t){this.setProviderCustomParameters(e,t.customParameters),this.setProviderScopes(e,t.scopes)}executeAuthMethod=async(e,t,r={})=>{try{let n=this.getProviderConfig(t);this.configureProvider(n.provider,r);let{user:i,providerId:a,operationType:s}=await e(this.auth,n.provider);return{status:"success",message:"Authentication successful",user:i,providerId:a,operationType:s}}catch(t){let e=(0,i.handleFirebaseAuthError)(t);return{status:"error",message:e.message,error:e.code}}};async _signInWithRedirect(e,t={}){return this.executeAuthMethod(n3,e,t)}async _signInWithPopUp(e,t={}){return this.executeAuthMethod(nG,e,t)}async checkRedirectResult(){return this.authRedirectResult()}fromJSON(e){return e&&(this.id=e.id,this.status=e.status,this.supportedFirstFactors=e.supportedFirstFactors,this.identifier=e.identifier),this}}let al=require("@tern-secure/shared/cookie"),au=require("@tern-secure/shared/date"),ac={secure:!0,sameSite:"strict",expires:1/24};class ad{csrfCookieHandler=(0,al.cookieHandler)("__terncf");ternAutCookie=(()=>{let e=(0,al.cookieHandler)("tern_aut"),t=()=>{let t=e.get();return t?parseInt(t,10):0};return{get:t,set:r=>{let n=(0,au.addYears)(Date.now(),1);if(!Number.isInteger(r)||r<0)return void console.warn("[tern_aut] Invalid auth_time value provided:",r);let i=t();0===r&&i>0||e.set(r.toString(),{secure:!0,expires:n})},initialize:()=>{if(null==e.get()){let t=(0,au.addYears)(Date.now(),1);e.set("0",{secure:!0,expires:t})}}}})();constructor(){this.ensureCSRFToken(),this.ensureAuthTimeCookie()}generateCSRFToken(){let e=new Uint8Array(32);return crypto.getRandomValues(e),Array.from(e,e=>e.toString(16).padStart(2,"0")).join("")}ensureCSRFToken(){let e=this.getCSRFToken();return e||(e=this.generateCSRFToken(),this.setCSRFToken({token:e})),e}ensureAuthTimeCookie(){this.ternAutCookie.initialize()}getAuthTime(){return this.ternAutCookie.get()}setAuthTime(e){this.ternAutCookie.set(e)}setCSRFToken(e){try{e.token&&this.csrfCookieHandler.set(e.token,ac)}catch(e){throw console.error("Failed to set CSRF token:",e),Error("Unable to store CSRF token")}}getCSRFToken(){try{return this.csrfCookieHandler.get()}catch(e){console.error("Failed to get CSRF token:",e);return}}clearAuth(){try{this.csrfCookieHandler.remove()}catch(e){console.error("Failed to clear auth cookies:",e)}}}var ah=r(117),af=r(753),ap=r(99);class am extends Error{url;original;constructor(e,t){super(`Network error for ${e}: ${t.message}`),this.url=e,this.original=t,this.name="NetworkError"}}class ag extends Error{constructor(){super("Request timed out"),this.name="TimeoutError"}}class av extends Error{constructor(){super("Circuit breaker is open"),this.name="CircuitOpenError"}}async function ay(e){for(let t of e.beforeRequestHooks)if(!1===await t())return!1;return!0}async function ab(e,t){for(let r of e.afterResponseHooks)await r(t)}function aw(e,t){let{failureThreshold:r=5}=t;e.circuitBreaker.failures++,e.circuitBreaker.lastFailureTime=Date.now(),e.circuitBreaker.failures>=r&&(e.circuitBreaker.state="open")}async function aS(e,t,r,n){let i,{initialDelay:a=700,factor:s=2,maxDelay:o=5e3,maxTries:l="undefined"!=typeof navigator&&navigator.onLine?4:11}=t;for(let u=1;u<=l;u++)try{let t=await r();return e.circuitBreaker.failures=0,e.circuitBreaker.state="closed",t}catch(r){if(i=r,!n(r,u))throw r;if(aw(e,t),u<l){let e=Math.min(a*Math.pow(s,u-1),o);await new Promise(t=>setTimeout(t,(0,ap.jitteredDelay)(e)))}}throw i}function ak(){return"undefined"!=typeof window}class aE{static version="1.1.0-canary.v20251125170702";static sdkMetadata={name:"@tern-secure/auth",version:"1.1.0-canary.v20251125170702",environment:"production"};static mountComponentRenderer;#T;static instance=null;_currentUser=null;signedInSession=null;firebaseClientApp;authStateUnsubscribe=null;auth;csrfToken;isLoading=!1;error=null;user=null;__internal_country;customDomain;isVisible=!1;currentView=null;#P;#A;#R;#N;#O="loading";#L=[];#M={};#F;#j=(0,a.createTernAuthEventBus)();signIn;signUp;session;get isReady(){return"ready"===this.status}get status(){return this.#O}get version(){return aE.version}set sdkMetadata(e){aE.sdkMetadata=e}get sdkMetadata(){return aE.sdkMetadata}get requiresVerification(){return this.#M.requiresVerification??!0}load=async e=>{if(!this.isReady){this.#M=this.#D(e),console.debug("[TernSecureAuth] Loading with options:",this.#M),this.#M.sdkMetadata&&(aE.sdkMetadata=this.#M.sdkMetadata);try{await Promise.resolve(this.#U()),aE.mountComponentRenderer&&!this.#T&&(this.#T=aE.mountComponentRenderer(this,this.#M)),this.#z("ready"),this.#j.emit(a.ternEvents.Status,"ready")}catch(e){throw this.error=e,console.error("[TernSecureAuth] Load failed:",e),this.#z("error"),this.#j.emit(a.ternEvents.Status,"error"),e}}};__unstable__updateProps=e=>{let t={...e,options:this.#D({...this.#M,...e.options})};return this.#T?.ensureMounted().then(e=>e.updateProps(t))};#U=()=>{if(!this.#M.ternSecureConfig)throw Error("TernSecureConfig is required to initialize TernSecureAuth");if(!this.#M.apiUrl)throw Error("apiUrl is required to initialize TernSecureAuth");this.initializeFirebaseApp(this.#M.ternSecureConfig,{appName:this.#M.appName,tenantId:this.#M.tenantId}),"browserCookie"!==this.#M.persistence&&(this.authStateUnsubscribe=this.initAuthStateListener()),this.#F=new ad,this.csrfToken=this.#F.getCSRFToken(),this.signIn=new ao(null,this.auth,this.csrfToken),this.signUp=new as(null,this.auth),at.on(ae,()=>{this.#V(this.user||null),this.#$()})};assertComponentControlsReady(e){if(!aE.mountComponentRenderer)throw Error("TernSecure instance was loaded without UI components");if(!e)throw Error("TernSecure UI components are not ready yet.")}showSignIn(e,t){this.assertComponentControlsReady(this.#T),this.#T.ensureMounted({preloadHint:"SignIn"}).then(r=>r.mountComponent({name:"SignIn",appearanceKey:"default",node:e,props:t})),this.currentView="signIn",this.isVisible=!0}hideSignIn(e){this.assertComponentControlsReady(this.#T),this.#T.ensureMounted().then(t=>t.unmountComponent({node:e}))}showSignUp(e,t){this.assertComponentControlsReady(this.#T),this.#T.ensureMounted({preloadHint:"SignUp"}).then(r=>r.mountComponent({name:"SignUp",appearanceKey:"default",node:e,props:t})),this.currentView="signUp",this.isVisible=!0}hideSignUp(e){this.assertComponentControlsReady(this.#T),this.#T.ensureMounted().then(t=>t.unmountComponent({node:e}))}showUserButton(e){this.assertComponentControlsReady(this.#T),this.#T.ensureMounted({preloadHint:"UserButton"}).then(t=>t.mountComponent({name:"UserButton",appearanceKey:"default",node:e,props:{}}))}hideUserButton(e){this.assertComponentControlsReady(this.#T),this.#T.ensureMounted().then(t=>t.unmountComponent({node:e}))}get apiUrl(){return this.#R}get authDomain(){if(ak()){let e=(0,c.stripScheme)((0,d.handleValueOrFn)(this.#P,new URL(window.location.href)));return this.#N,e}return""}get instanceType(){return this.#N}constructor(e,t){this.#P=t?.domain,this.#R=e||"",this.#N="production",this.#A=function(e){async function t(r,n,i={}){let a={...n},{method:s="GET",body:o}=a,l={...i};if(a.url=function(t){let r,n=e.apiUrl?.includes("localhost")||e.apiUrl?.includes("127.0.0.1"),{path:i}=t,{instanceType:a,authDomain:s,apiUrl:o,apiBasePath:l="/api/auth"}=e;r=n?o?.startsWith("http")?o:`http://${o}`:`https://${("production"===a?s:"")||o}`;let u=`${l}/${i}`.replace(/\/+/g,"/");return(0,ah.kZ)({base:r,pathname:u,searchParams:t.search?new URLSearchParams(t.search):void 0},{stringify:!1})}({...a}),!function(e,t){let{recoveryTimeoutMs:r=6e4}=t,n=Date.now();if("open"===e.circuitBreaker.state)if(n-e.circuitBreaker.lastFailureTime>=r)e.circuitBreaker.state="half-open";else throw new av}(r,l),!await ay(r)){let e=new Response("{}",{status:200});return e.payload={response:{}},await ab(r,e),e}let{timeoutMs:u}=l,c="GET"===s?"GET":"POST",d=a.url.toString();a.headers=new Headers(a.headers),"GET"===s||o instanceof FormData||a.headers.has("content-type")||a.headers.set("content-type","application/json"),"application/x-www-form-urlencoded"===a.headers.get("content-type")?a.body=o?(0,ah.Ws)(o,{keyEncoder:ap.camelToSnake}):o:"application/json"===a.headers.get("content-type")&&o&&(a.body="string"==typeof o?o:JSON.stringify(o));let h=async()=>{let e,t=new AbortController,n=u?setTimeout(()=>{t.abort()},u):null,i={...a,credentials:"include",method:c};try{e=await fetch(d,i),n&&clearTimeout(n);let t=null;if(204===e.status)t=null;else try{t=await e.json()}catch{t={response:{}}}return e.payload=t,await ab(r,e),e}catch(e){if(n&&clearTimeout(n),"AbortError"===e.name)throw new ag;throw new am(d,e)}};return aS(r,l,h,(e,t)=>{var n;let i;return n=l.maxTries||("undefined"!=typeof navigator&&navigator.onLine?4:11),(i=e instanceof am&&"GET"===c.toUpperCase()&&t<n)||aw(r,l),i})}let r=function(e={}){return{circuitBreaker:{failures:0,lastFailureTime:0,state:"closed"},beforeRequestHooks:[],afterResponseHooks:[],clientOptions:e}}(e);return{onBeforeRequest:e=>{r.beforeRequestHooks.push(e)},onAfterResponse:e=>{r.afterResponseHooks.push(e)},request:(e,n={})=>t(r,e,n)}}({authDomain:this.authDomain,apiUrl:this.#R,instanceType:this.instanceType}),this.#j.emit(a.ternEvents.Status,"loading"),ai.ternsecure=this}getApiClient=()=>this.#A;setLoading(e){this.isLoading=e}authCookieManager(){return this.#F}_internal_getOption(e){return this.#M[e]}_internal_getAllOptions(){return Object.freeze({...this.#M})}static getOrCreateInstance(e,t){return this.instance||(this.instance=new aE(e,t)),this.instance}static clearInstance(){aE.instance&&(aE.instance.authStateUnsubscribe&&(aE.instance.authStateUnsubscribe(),aE.instance.authStateUnsubscribe=null),aE.instance=null)}static initialize(e){return this.getOrCreateInstance(e?.apiUrl||"")}initialize=async e=>{this.#B(e||{})};static create(e){let t=this.getOrCreateInstance(e?.apiUrl||"");return t.initialize(e),t}#B=e=>{this.#M=this.#D(e);try{if(!this.#M.ternSecureConfig)throw Error("TernSecureConfig is required to initialize TernSecureAuth");if(!this.#M.apiUrl)throw Error("apiUrl is required to initialize TernSecureAuth");this.initializeFirebaseApp(this.#M.ternSecureConfig,{appName:this.#M.appName,tenantId:this.#M.tenantId}),"browserCookie"!==this.#M.persistence&&(this.authStateUnsubscribe=this.initAuthStateListener()),this.#F=new ad,this.csrfToken=this.#F.getCSRFToken(),this.signIn=new ao(null,this.auth,this.csrfToken),this.signUp=new as(null,this.auth),at.on(ae,()=>{this.#V(this.user||null),this.#$()}),this.#z("ready"),this.#j.emit(a.ternEvents.Status,"ready")}catch(e){throw this.error=e,this.#z("error"),this.#j.emit(a.ternEvents.Status,"error"),e}};initializeFirebaseApp(e,t){let r=t?.appName||"[DEFAULT]";this.firebaseClientApp=0===eI().length?e_(e,r):eI()[0];let n=this.#H(),i=function(e,t){let r=ew(e,"auth");if(r.isInitialized()){let e=r.getImmediate();if(N(r.getOptions(),t??{}))return e;tE(e,"already-initialized")}return r.initialize({options:t})}(this.firebaseClientApp,{persistence:n,popupRedirectResolver:iy});if(this.auth=i,t?.tenantId&&(this.auth.tenantId=t.tenantId),this.#W(),this.#M.appCheck){let{provider:e,siteKey:t,isTokenAutoRefreshEnabled:r}=this.#M.appCheck,n="reCaptchaEnterprise"===e?new tm(t):new tp(t);!function(e=eC(),t){let r=ew(e=U(e),"app-check");if(eV.initialized||function(){let e=b();if(eV.initialized=!0,"string"!=typeof e.FIREBASE_APPCHECK_DEBUG_TOKEN&&!0!==e.FIREBASE_APPCHECK_DEBUG_TOKEN)return;eV.enabled=!0;let t=new k;eV.token=t,"string"==typeof e.FIREBASE_APPCHECK_DEBUG_TOKEN?t.resolve(e.FIREBASE_APPCHECK_DEBUG_TOKEN):t.resolve(e7())}(),e9()&&te().then(e=>console.log(`App Check debug token: ${e}. You will need to add it to your app's App Check settings in the Firebase console for it to work.`)),r.isInitialized()){r.getImmediate();let n=r.getOptions();if(n.isTokenAutoRefreshEnabled===t.isTokenAutoRefreshEnabled&&n.provider.isEqual(t.provider))return;throw eW.create("already-initialized",{appName:e.name})}let n=r.initialize({options:t});(function(e,t,r=!1){var n;let i=(n={...ez},eU.set(e,n),eU.get(e));i.activated=!0,i.provider=t,i.cachedTokenPromise=e5(e).then(t=>(t&&tl(t)&&(i.token=t,to(e,{token:t.token})),t)),i.isTokenAutoRefreshEnabled=r&&e.automaticDataCollectionEnabled,!e.automaticDataCollectionEnabled&&r&&e6.warn("`isTokenAutoRefreshEnabled` is true but `automaticDataCollectionEnabled` was set to false during `initializeApp()`. This blocks automatic token refresh."),i.provider.initialize(e)})(e,t.provider,t.isTokenAutoRefreshEnabled),e$(e).isTokenAutoRefreshEnabled&&ti(n,"INTERNAL",()=>{})}(this.firebaseClientApp,{provider:n,isTokenAutoRefreshEnabled:r??!0})}!function(e=eC()){ew(e,"installations").getImmediate()}(this.firebaseClientApp)}signOut=async e=>{let t=e?.redirectUrl||this.constructAfterSignOutUrl();e?.onBeforeSignOut&&await e.onBeforeSignOut(),await this.auth.signOut(),e?.onAfterSignOut&&await e.onAfterSignOut(),await this.navigate(t),at.emit("user:userSignOut",null),at.emit("token:tokenUpdate",{token:null}),this.#$()};get currentSession(){return this.signedInSession}initAuthListener(){return(async()=>{await this.auth.authStateReady();let e=this.auth.currentUser;this._currentUser=e,this.user=e,await this.updateCurrentSession(),this.#$()})(),()=>{}}initAuthStateListener(){return nb(this.auth,async e=>{await this.auth.authStateReady(),this._currentUser=e,this.user=e,await this.updateCurrentSession(),this.#$()})}_onIdTokenChanged(){return ny(this.auth,async e=>{await this.auth.authStateReady(),this._currentUser=e,this.user=e,await this.updateCurrentSession(),this.#$()})}async getIdToken(){return(await this.auth.authStateReady(),this.auth.currentUser)?function(e,t=!1){return U(e).getIdToken(t)}(this.auth.currentUser):null}onAuthStateChanged(e){return nb(this.auth,e)}onIdTokenChanged(e){return ny(this.auth,e)}async updateCurrentSession(){if(!this._currentUser){this.signedInSession=null;return}try{let e=await this._currentUser.getIdTokenResult();this.signedInSession={status:"active",token:e.token,claims:e.claims,issuedAtTime:e.issuedAtTime,expirationTime:e.expirationTime,authTime:e.authTime,signInProvider:e.signInProvider||"unknown",signInSecondFactor:e.signInSecondFactor}}catch(e){console.error("[TernSecureAuth] Error updating session:",e),this.signedInSession=null}}checkRedirectResult=async()=>{try{let e=await n6(this.auth);if(e)return{status:"success",user:e.user};return null}catch(t){let e=(0,i.handleFirebaseAuthError)(t);return{status:"error",message:e.message,error:e.code}}};getRedirectResult=async()=>this.checkRedirectResult();addListener=e=>(this.#L.push(e),this._currentUser&&e({user:this._currentUser,session:this.signedInSession}),()=>{this.#L=this.#L.filter(t=>t!==e)});on=(...e)=>{this.#j.on(...e)};off=(...e)=>{this.#j.off(...e)};createActiveSession=async({session:e,redirectUrl:t})=>{try{if(!e)throw Error("No session provided to createActiveSession");let r=await e.getIdTokenResult(),n=new aa(r);await n.create(this.csrfToken||""),t&&await this.navigate(this.constructUrlWithAuthRedirect(t)),this.#V(e),this.#$()}catch(e){console.error("[TernSecureAuth] Error creating active session:",e)}};navigate=async(e,t)=>{if(!e||!ak())return;let r=new URL(e,window.location.href);this.#q.includes(r.protocol)||(console.warn(`TernSecureAuth: "${r.protocol}" is not a valid protocol. Redirecting to "/" instead. If you think this is a mistake, please open an issue.`),r=new URL("/",window.location.href));let n=t?.replace&&this.#M.routerReplace?this.#M.routerReplace:this.#M.routerPush;if("null"!==r.origin&&r.origin!==window.location.origin||!n)return void(0,ah.y7)(r);let i={...t?.metadata?{__internal_metadata:t?.metadata}:{},windowNavigate:ah.y7};return await n((0,ah.FV)(r),i)};constructUrlWithAuthRedirect=e=>{if("production"===this.#N)return e;let t=new URL(e,window.location.origin);return t.origin===window.location.origin?t.href:t.toString()};#K=(e,t)=>{if(!e||!this.isReady)return"";let r="signInUrl"===e?this.#M.signInUrl:this.#M.signUpUrl,n=new af.n(this.#M,t).toSearchParams(),i=(0,ah.kZ)({base:r||("signInUrl"===e?"/sign-in":"/sign-up"),hashSearchParams:[n]},{stringify:!0,skipOrigin:!1});return this.constructUrlWithAuthRedirect(i)};#G=()=>this.constructUrlWithAuthRedirect(new af.n(this.#M).getAfterSignInUrl());constructAfterSignOutUrl=()=>this.#M.afterSignOutUrl?this.constructUrlWithAuthRedirect(this.#M.afterSignOutUrl):"/";redirectToSignIn=async e=>{if(ak())return this.navigate(this.constructSignInUrl(e))};redirectToSignUp=async e=>{if(ak())return this.navigate(this.constructSignUpUrl(e))};redirectAfterSignIn=async()=>{if(ak())return this.navigate(this.#G())};redirectAfterSignUp=()=>{throw Error("redirectAfterSignUp is not implemented yet")};constructSignInUrl=e=>this.#K("signInUrl",{...e,signInForceRedirectUrl:e?.signInForceRedirectUrl||window.location.href});constructSignUpUrl=e=>this.#K("signUpUrl",{...e,signUpForceRedirectUrl:e?.signUpForceRedirectUrl||window.location.href});get #q(){let e=ah.VY;return this.#M.allowedRedirectProtocols&&(e=e.concat(this.#M.allowedRedirectProtocols)),e}__internal_setCountry=e=>{this.__internal_country||(this.__internal_country=e)};#D=e=>({...e});#$=()=>{for(let e of this.#L)e({user:this.user,session:this.signedInSession})};#z(e){this.#O!==e&&(this.#O=e,this.#j.emit(a.ternEvents.Status,this.#O),"ready"===e&&this.#j.emit(a.ternEvents.Status,"ready"))}#V=e=>{this.user=e,this._currentUser=e};#H=()=>{switch(this.#M.persistence){case"browserCookie":case"none":default:return rl;case"session":return nx;case"local":return nE}};#Q=()=>{if("undefined"!=typeof process)return process.env.FIREBASE_AUTH_EMULATOR_HOST};#W=()=>{let e=this.#Q();if(!("development"===this.#N&&e)||!e)return;let t=e.startsWith("http")?e:`http://${e}`;try{!function(e,t,r){let n=U(e);tP(/^https?:\/\//.test(t),n,"invalid-emulator-scheme");let i=!!r?.disableWarnings,a=rU(t),{host:s,port:o}=function(e){let t=rU(e),r=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!r)return{host:"",port:null};let n=r[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(n);if(i){let e=i[1];return{host:e,port:rz(n.substr(e.length+1))}}{let[e,t]=n.split(":");return{host:e,port:rz(t)}}}(t),l=null===o?"":`:${o}`,u={url:`${a}//${s}${l}/`},c=Object.freeze({host:s,port:o,protocol:a.replace(":",""),options:Object.freeze({disableWarnings:i})});if(!n._canInitEmulator){tP(n.config.emulator&&n.emulatorConfig,n,"emulator-config-failed"),tP(N(u,n.config.emulator)&&N(c,n.emulatorConfig),n,"emulator-config-failed");return}n.config.emulator=u,n.emulatorConfig=c,n.settings.appVerificationDisabledForTesting=!0,E(s)?(x(`${a}//${s}${l}`),function(e,t){if("undefined"==typeof window||"undefined"==typeof document||!E(window.location.host)||_[e]===t||_[e]||C)return;function r(e){return`__firebase__banner__${e}`}_[e]=t;let n="__firebase__banner",i=function(){let e={prod:[],emulator:[]};for(let t of Object.keys(_))_[t]?e.emulator.push(t):e.prod.push(t);return e}().prod.length>0;function a(){let e,t,a=(e=document.getElementById(n),t=!1,e||((e=document.createElement("div")).setAttribute("id",n),t=!0),{created:t,element:e}),s=r("text"),o=document.getElementById(s)||document.createElement("span"),l=r("learnmore"),u=document.getElementById(l)||document.createElement("a"),c=r("preprendIcon"),d=document.getElementById(c)||document.createElementNS("http://www.w3.org/2000/svg","svg");if(a.created){let e,t=a.element;t.style.display="flex",t.style.background="#7faaf0",t.style.position="fixed",t.style.bottom="5px",t.style.left="5px",t.style.padding=".5em",t.style.borderRadius="5px",t.style.alignItems="center",u.setAttribute("id",l),u.innerText="Learn more",u.href="https://firebase.google.com/docs/studio/preview-apps#preview-backend",u.setAttribute("target","__blank"),u.style.paddingLeft="5px",u.style.textDecoration="underline";let r=((e=document.createElement("span")).style.cursor="pointer",e.style.marginLeft="16px",e.style.fontSize="24px",e.innerHTML=" ×",e.onclick=()=>{let e;C=!0,(e=document.getElementById(n))&&e.remove()},e);d.setAttribute("width","24"),d.setAttribute("id",c),d.setAttribute("height","24"),d.setAttribute("viewBox","0 0 24 24"),d.setAttribute("fill","none"),d.style.marginLeft="-6px",t.append(d,o,u,r),document.body.appendChild(t)}i?(o.innerText="Preview backend disconnected.",d.innerHTML=`<g clip-path="url(#clip0_6013_33858)">
|
|
4
|
+
<path d="M4.8 17.6L12 5.6L19.2 17.6H4.8ZM6.91667 16.4H17.0833L12 7.93333L6.91667 16.4ZM12 15.6C12.1667 15.6 12.3056 15.5444 12.4167 15.4333C12.5389 15.3111 12.6 15.1667 12.6 15C12.6 14.8333 12.5389 14.6944 12.4167 14.5833C12.3056 14.4611 12.1667 14.4 12 14.4C11.8333 14.4 11.6889 14.4611 11.5667 14.5833C11.4556 14.6944 11.4 14.8333 11.4 15C11.4 15.1667 11.4556 15.3111 11.5667 15.4333C11.6889 15.5444 11.8333 15.6 12 15.6ZM11.4 13.6H12.6V10.4H11.4V13.6Z" fill="#212121"/>
|
|
5
|
+
</g>
|
|
6
|
+
<defs>
|
|
7
|
+
<clipPath id="clip0_6013_33858">
|
|
8
|
+
<rect width="24" height="24" fill="white"/>
|
|
9
|
+
</clipPath>
|
|
10
|
+
</defs>`):(d.innerHTML=`<g clip-path="url(#clip0_6083_34804)">
|
|
11
|
+
<path d="M11.4 15.2H12.6V11.2H11.4V15.2ZM12 10C12.1667 10 12.3056 9.94444 12.4167 9.83333C12.5389 9.71111 12.6 9.56667 12.6 9.4C12.6 9.23333 12.5389 9.09444 12.4167 8.98333C12.3056 8.86111 12.1667 8.8 12 8.8C11.8333 8.8 11.6889 8.86111 11.5667 8.98333C11.4556 9.09444 11.4 9.23333 11.4 9.4C11.4 9.56667 11.4556 9.71111 11.5667 9.83333C11.6889 9.94444 11.8333 10 12 10ZM12 18.4C11.1222 18.4 10.2944 18.2333 9.51667 17.9C8.73889 17.5667 8.05556 17.1111 7.46667 16.5333C6.88889 15.9444 6.43333 15.2611 6.1 14.4833C5.76667 13.7056 5.6 12.8778 5.6 12C5.6 11.1111 5.76667 10.2833 6.1 9.51667C6.43333 8.73889 6.88889 8.06111 7.46667 7.48333C8.05556 6.89444 8.73889 6.43333 9.51667 6.1C10.2944 5.76667 11.1222 5.6 12 5.6C12.8889 5.6 13.7167 5.76667 14.4833 6.1C15.2611 6.43333 15.9389 6.89444 16.5167 7.48333C17.1056 8.06111 17.5667 8.73889 17.9 9.51667C18.2333 10.2833 18.4 11.1111 18.4 12C18.4 12.8778 18.2333 13.7056 17.9 14.4833C17.5667 15.2611 17.1056 15.9444 16.5167 16.5333C15.9389 17.1111 15.2611 17.5667 14.4833 17.9C13.7167 18.2333 12.8889 18.4 12 18.4ZM12 17.2C13.4444 17.2 14.6722 16.6944 15.6833 15.6833C16.6944 14.6722 17.2 13.4444 17.2 12C17.2 10.5556 16.6944 9.32778 15.6833 8.31667C14.6722 7.30555 13.4444 6.8 12 6.8C10.5556 6.8 9.32778 7.30555 8.31667 8.31667C7.30556 9.32778 6.8 10.5556 6.8 12C6.8 13.4444 7.30556 14.6722 8.31667 15.6833C9.32778 16.6944 10.5556 17.2 12 17.2Z" fill="#212121"/>
|
|
12
|
+
</g>
|
|
13
|
+
<defs>
|
|
14
|
+
<clipPath id="clip0_6083_34804">
|
|
15
|
+
<rect width="24" height="24" fill="white"/>
|
|
16
|
+
</clipPath>
|
|
17
|
+
</defs>`,o.innerText="Preview backend running in this workspace."),o.setAttribute("id",s)}"loading"===document.readyState?window.addEventListener("DOMContentLoaded",a):a()}("Auth",!0)):i||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())}()}(this.auth,t,{disableWarnings:!1}),console.warn(`[TernSecure] Firebase Auth Emulator connected at ${t}`)}catch(e){console.error("[TernSecure] Error connecting to Firebase Auth Emulator:",e)}}}var ax=r(410),a_=r(973),aC=r(58);let aI={SignIn:()=>Promise.resolve().then(r.bind(r,687)),SignUp:()=>Promise.resolve().then(r.bind(r,102)),UserButton:()=>Promise.resolve().then(r.bind(r,947))},aT=(0,aC.lazy)(()=>aI.SignIn().then(e=>({default:e.SignIn})));(0,aC.lazy)(()=>aI.SignIn().then(e=>({default:e.SignInModal})));let aP=(0,aC.lazy)(()=>aI.SignUp().then(e=>({default:e.SignUp}))),aA=(0,aC.lazy)(()=>aI.UserButton().then(e=>({default:e.UserButton}))),aR=async e=>aI[e]?.(),aN={SignIn:aT,SignUp:aP,UserButton:aA},aO=(0,aC.lazy)(()=>Promise.resolve().then(r.bind(r,977)).then(e=>({default:e.TernSecureContextWrapper}))),aL=(0,aC.lazy)(()=>Promise.resolve().then(r.bind(r,977)).then(e=>({default:e.TernSecureOptionsProvider}))),aM=(0,aC.lazy)(()=>Promise.resolve().then(r.bind(r,530)).then(e=>({default:e.Portal}))),aF=e=>(0,ax.jsx)(aO,{ternsecure:e.ternsecure,children:(0,ax.jsx)(aL,{value:e.options,children:e.children})}),aj=e=>(0,ax.jsx)(aM,{node:e.node,component:aN[e.componentName],props:e.componentProps,componentName:e.componentName},e.componentKey),aD="data-ternsecure-component",aU=0,az={},aV=e=>{let[t,r]=aC.useState({options:e.options,nodes:new Map}),{nodes:n}=t;return(0,a_.useSafeLayoutEffect)(()=>{az.mountComponent=e=>{let{name:t,node:i,props:a,appearanceKey:s}=e;if(!i)throw Error("Element is not a valid DOM element");r(e=>(e.nodes.set(i,{key:`p${++aU}`,name:t,props:a,appearanceKey:s}),{...e,nodes:n}))},az.unmountComponent=e=>{let{node:t}=e;r(e=>(e.nodes.delete(t),{...e,nodes:n}))},az.updateProps=({node:e,props:n,...i})=>{if(e&&n&&"object"==typeof n){let i=t.nodes.get(e);if(i){i.props={...n},r(e=>({...e}));return}}r(e=>({...e,...i,options:{...e.options,...i.options}}))},e.onComponentsMounted()},[]),(0,ax.jsx)(aC.Suspense,{fallback:"",children:(0,ax.jsx)(aF,{ternsecure:e.ternsecure,options:t.options,children:[...n].map(([e,t])=>(0,ax.jsx)(aj,{node:e,componentName:t.name,componentProps:t.props,componentKey:t.key},t.key))})})};aE.mountComponentRenderer=(e,t)=>{let n,i=document.getElementById(aD);return i||((i=document.createElement("div")).setAttribute("id",aD),document.body.appendChild(i)),{ensureMounted:async a=>{let{preloadHint:s}=a||{};if(!n){let a,o,l=(a=()=>{},o=()=>{},{promise:new Promise((e,t)=>{a=e,o=t}),resolve:a,reject:o});s&&aR(s),n=Promise.resolve().then(r.bind(r,869)).then(({createRoot:r})=>(r(i).render((0,ax.jsx)(aV,{ternsecure:e,options:t,onComponentsMounted:l.resolve})),l.promise.then(()=>az)))}return n.then(e=>e)}}}})();var c=exports;for(var d in u)c[d]=u[d];u.__esModule&&Object.defineProperty(c,"__esModule",{value:!0})})();
|